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
new file mode 100644
index 00000000..d92dc734
--- /dev/null
+++ b/src/main/java/org/openapitools/client/ApiResponse.java
@@ -0,0 +1,76 @@
+/*
+ * Unit OpenAPI specifications
+ * An OpenAPI specifications for unit-sdk clients
+ *
+ * The version of the OpenAPI document: 0.2.0
+ *
+ *
+ * NOTE: This class 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/Configuration.java b/src/main/java/org/openapitools/client/Configuration.java
new file mode 100644
index 00000000..5b6de771
--- /dev/null
+++ b/src/main/java/org/openapitools/client/Configuration.java
@@ -0,0 +1,41 @@
+/*
+ * Unit OpenAPI specifications
+ * An OpenAPI specifications for unit-sdk clients
+ *
+ * The version of the OpenAPI document: 0.2.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+
+package org.openapitools.client;
+
+@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
+public class Configuration {
+ public static final String VERSION = "0.2.0";
+
+ private static ApiClient defaultApiClient = new ApiClient();
+
+ /**
+ * Get the default API client, which would be used when creating API
+ * instances without providing an API client.
+ *
+ * @return Default API client
+ */
+ public static ApiClient getDefaultApiClient() {
+ return defaultApiClient;
+ }
+
+ /**
+ * Set the default API client, which would be used when creating API
+ * instances without providing an API client.
+ *
+ * @param apiClient API client
+ */
+ public static void setDefaultApiClient(ApiClient apiClient) {
+ defaultApiClient = apiClient;
+ }
+}
diff --git a/src/main/java/org/openapitools/client/GzipRequestInterceptor.java b/src/main/java/org/openapitools/client/GzipRequestInterceptor.java
new file mode 100644
index 00000000..4b311ce6
--- /dev/null
+++ b/src/main/java/org/openapitools/client/GzipRequestInterceptor.java
@@ -0,0 +1,85 @@
+/*
+ * Unit OpenAPI specifications
+ * An OpenAPI specifications for unit-sdk clients
+ *
+ * The version of the OpenAPI document: 0.2.0
+ *
+ *
+ * NOTE: This class 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
new file mode 100644
index 00000000..54d06199
--- /dev/null
+++ b/src/main/java/org/openapitools/client/JSON.java
@@ -0,0 +1,1732 @@
+/*
+ * Unit OpenAPI specifications
+ * An OpenAPI specifications for unit-sdk clients
+ *
+ * The version of the OpenAPI document: 0.2.0
+ *
+ *
+ * NOTE: This class 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 extends org.openapitools.client.model.Account> 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 extends org.openapitools.client.model.AccountLowBalanceClosureTransaction> 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 extends org.openapitools.client.model.AchPayment> 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 extends org.openapitools.client.model.AchRepayment> 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 extends org.openapitools.client.model.AdjustmentTransaction> 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 extends org.openapitools.client.model.Application> 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 extends org.openapitools.client.model.AtmAuthorizationRequest> 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 extends org.openapitools.client.model.AtmTransaction> 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 extends org.openapitools.client.model.AuthorizationRequest> 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 extends org.openapitools.client.model.BankRepaymentTransaction> 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 extends org.openapitools.client.model.BillPayTransaction> 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 extends org.openapitools.client.model.BillPayment> 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 extends org.openapitools.client.model.BookPayment> 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 extends org.openapitools.client.model.BookRepayment> 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 extends org.openapitools.client.model.BookTransaction> 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 extends org.openapitools.client.model.BusinessApplication> 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 extends org.openapitools.client.model.BusinessCreditCard> 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 extends org.openapitools.client.model.BusinessCustomer> 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 extends org.openapitools.client.model.BusinessDebitCard> 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 extends org.openapitools.client.model.BusinessVirtualCreditCard> 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 extends org.openapitools.client.model.BusinessVirtualDebitCard> 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 extends org.openapitools.client.model.Card> 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 extends org.openapitools.client.model.CardTransaction> 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 extends org.openapitools.client.model.CardTransactionAuthorizationRequest> 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 extends org.openapitools.client.model.CashDepositTransaction> 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 extends org.openapitools.client.model.ChargebackTransaction> 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 extends org.openapitools.client.model.CheckDepositTransaction> 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 extends org.openapitools.client.model.CheckPaymentTransaction> 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 extends org.openapitools.client.model.CreditAccount> 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 extends org.openapitools.client.model.CreditLimits> 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 extends org.openapitools.client.model.Customer> 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 extends org.openapitools.client.model.CustomerRepaymentReturnedTransaction> 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 extends org.openapitools.client.model.CustomerRepaymentTransaction> 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 extends org.openapitools.client.model.DepositAccount> 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 extends org.openapitools.client.model.DepositLimits> 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 extends org.openapitools.client.model.DishonoredAchTransaction> 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 extends org.openapitools.client.model.DisputeSettlementTransaction> 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 extends org.openapitools.client.model.DisputeTransaction> 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 extends org.openapitools.client.model.FeeTransaction> 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 extends org.openapitools.client.model.IndividualApplication> 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 extends org.openapitools.client.model.IndividualCustomer> 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 extends org.openapitools.client.model.IndividualDebitCard> 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 extends org.openapitools.client.model.IndividualVirtualDebitCard> 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 extends org.openapitools.client.model.InterchangeTransaction> 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 extends org.openapitools.client.model.InterestShareTransaction> 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 extends org.openapitools.client.model.InterestTransaction> 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 extends org.openapitools.client.model.Limits1> 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 extends org.openapitools.client.model.NegativeBalanceCoverageTransaction> 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 extends org.openapitools.client.model.OriginatedAchTransaction> 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 extends org.openapitools.client.model.Payment> 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 extends org.openapitools.client.model.PaymentAdvanceTransaction> 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 extends org.openapitools.client.model.PurchaseAuthorizationRequest> 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 extends org.openapitools.client.model.PurchaseTransaction> 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 extends org.openapitools.client.model.ReceivedAchTransaction> 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 extends org.openapitools.client.model.RecurringCreditAchPayment> 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 extends org.openapitools.client.model.RecurringCreditBookPayment> 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 extends org.openapitools.client.model.RecurringDebitAchPayment> 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