diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index af6a78b..f8d23f4 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -51,6 +51,8 @@ src/main/java/com/gr4vy/api/model/AuditLog.java src/main/java/com/gr4vy/api/model/AuditLogResource.java src/main/java/com/gr4vy/api/model/AuditLogUser.java src/main/java/com/gr4vy/api/model/AuditLogs.java +src/main/java/com/gr4vy/api/model/BINLookupRequest.java +src/main/java/com/gr4vy/api/model/BINLookupRequestContext.java src/main/java/com/gr4vy/api/model/BillingDetails.java src/main/java/com/gr4vy/api/model/BillingDetailsRequest.java src/main/java/com/gr4vy/api/model/BillingDetailsUpdateRequest.java @@ -67,9 +69,7 @@ src/main/java/com/gr4vy/api/model/CardSchemeDefinitions.java src/main/java/com/gr4vy/api/model/CartItem.java src/main/java/com/gr4vy/api/model/CheckoutSession.java src/main/java/com/gr4vy/api/model/CheckoutSessionCreateRequest.java -src/main/java/com/gr4vy/api/model/CheckoutSessionFieldsPaymentMethod.java src/main/java/com/gr4vy/api/model/CheckoutSessionRequest.java -src/main/java/com/gr4vy/api/model/CheckoutSessionSecureFieldsUpdate.java src/main/java/com/gr4vy/api/model/CheckoutSessionUpdateRequest.java src/main/java/com/gr4vy/api/model/Connection.java src/main/java/com/gr4vy/api/model/ConnectionDefinition.java @@ -78,6 +78,8 @@ src/main/java/com/gr4vy/api/model/ConnectionOptions.java src/main/java/com/gr4vy/api/model/ConnectionOptionsAdyenCard.java src/main/java/com/gr4vy/api/model/ConnectionOptionsCybersourceAntiFraud.java src/main/java/com/gr4vy/api/model/ConnectionOptionsForterAntiFraud.java +src/main/java/com/gr4vy/api/model/ConnectionOptionsPaypalPaypal.java +src/main/java/com/gr4vy/api/model/ConnectionOptionsPaypalPaypalAdditionalData.java src/main/java/com/gr4vy/api/model/Connections.java src/main/java/com/gr4vy/api/model/Cryptogram.java src/main/java/com/gr4vy/api/model/DigitalWallet.java @@ -204,6 +206,7 @@ src/main/java/com/gr4vy/api/model/ThreeDSecureResultRequestEventContext.java src/main/java/com/gr4vy/api/model/ThreeDSecureSuccessEvent.java src/main/java/com/gr4vy/api/model/ThreeDSecureSuccessEventContext.java src/main/java/com/gr4vy/api/model/ThreeDSecureSummary.java +src/main/java/com/gr4vy/api/model/ThreeDSecureV2.java src/main/java/com/gr4vy/api/model/TokenizedRequest.java src/main/java/com/gr4vy/api/model/Transaction.java src/main/java/com/gr4vy/api/model/TransactionCaptureRequest.java @@ -263,6 +266,8 @@ src/test/java/com/gr4vy/api/model/AuditLogResourceTest.java src/test/java/com/gr4vy/api/model/AuditLogTest.java src/test/java/com/gr4vy/api/model/AuditLogUserTest.java src/test/java/com/gr4vy/api/model/AuditLogsTest.java +src/test/java/com/gr4vy/api/model/BINLookupRequestContextTest.java +src/test/java/com/gr4vy/api/model/BINLookupRequestTest.java src/test/java/com/gr4vy/api/model/BillingDetailsRequestTest.java src/test/java/com/gr4vy/api/model/BillingDetailsTest.java src/test/java/com/gr4vy/api/model/BillingDetailsUpdateRequestTest.java @@ -278,9 +283,7 @@ src/test/java/com/gr4vy/api/model/CardSchemeDefinitionTest.java src/test/java/com/gr4vy/api/model/CardSchemeDefinitionsTest.java src/test/java/com/gr4vy/api/model/CartItemTest.java src/test/java/com/gr4vy/api/model/CheckoutSessionCreateRequestTest.java -src/test/java/com/gr4vy/api/model/CheckoutSessionFieldsPaymentMethodTest.java src/test/java/com/gr4vy/api/model/CheckoutSessionRequestTest.java -src/test/java/com/gr4vy/api/model/CheckoutSessionSecureFieldsUpdateTest.java src/test/java/com/gr4vy/api/model/CheckoutSessionTest.java src/test/java/com/gr4vy/api/model/CheckoutSessionUpdateRequestTest.java src/test/java/com/gr4vy/api/model/ConnectionDefinitionTest.java @@ -288,6 +291,8 @@ src/test/java/com/gr4vy/api/model/ConnectionDefinitionsTest.java src/test/java/com/gr4vy/api/model/ConnectionOptionsAdyenCardTest.java src/test/java/com/gr4vy/api/model/ConnectionOptionsCybersourceAntiFraudTest.java src/test/java/com/gr4vy/api/model/ConnectionOptionsForterAntiFraudTest.java +src/test/java/com/gr4vy/api/model/ConnectionOptionsPaypalPaypalAdditionalDataTest.java +src/test/java/com/gr4vy/api/model/ConnectionOptionsPaypalPaypalTest.java src/test/java/com/gr4vy/api/model/ConnectionOptionsTest.java src/test/java/com/gr4vy/api/model/ConnectionTest.java src/test/java/com/gr4vy/api/model/ConnectionsTest.java @@ -416,6 +421,7 @@ src/test/java/com/gr4vy/api/model/ThreeDSecureResultRequestEventTest.java src/test/java/com/gr4vy/api/model/ThreeDSecureSuccessEventContextTest.java src/test/java/com/gr4vy/api/model/ThreeDSecureSuccessEventTest.java src/test/java/com/gr4vy/api/model/ThreeDSecureSummaryTest.java +src/test/java/com/gr4vy/api/model/ThreeDSecureV2Test.java src/test/java/com/gr4vy/api/model/TokenizedRequestTest.java src/test/java/com/gr4vy/api/model/TransactionCaptureRequestTest.java src/test/java/com/gr4vy/api/model/TransactionCardRequestTest.java diff --git a/README.md b/README.md index 2f04355..92a4cdc 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ Add the `gr4vy-java` dependency to your pom.xml: com.github.gr4vy gr4vy-java - 0.13.0 + 0.16.0 ``` @@ -34,20 +34,17 @@ in a secure location but in this code sample we simply read the file from disk. Import Gr4vy: ```java import com.gr4vy.sdk.*; -import com.gr4vy.api.ApiException; import com.gr4vy.api.model.*; -import com.gr4vy.api.openapi.BuyersApi; ``` Call the API: ```java Gr4vyClient gr4vyClient = new Gr4vyClient("[YOUR_GR4VY_ID]", "private_key.pem"); - BuyersApi apiInstance = new BuyersApi(gr4vyClient.getClient()); try { - Buyers result = apiInstance.listBuyers(null, null, null); + Buyers result = gr4vyClient.listBuyers(null, null, null); System.out.println(result); - } catch (ApiException e) { + } catch (Gr4vyException e) { System.err.println("Exception when calling BuyersApi#listBuyers"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); @@ -100,11 +97,11 @@ needs to be created before it can be used in this way. ```java Gr4vyClient gr4vyClient = new Gr4vyClient("[YOUR_GR4VY_ID]", "private_key.pem"); - BuyersApi apiInstance = new BuyersApi(gr4vyClient.getClient()); + BuyerRequest buyer = new BuyerRequest(); buyer.setDisplayName("Tester T."); try { - Buyer result = apiInstance.newBuyer(buyer); + Buyer result = gr4vyClient.newBuyer(buyer); System.out.println(result); } catch (ApiException e) { @@ -141,7 +138,7 @@ example, `GET /buyers?limit=100` would be: String search = null; Integer limit = 100; String cursor = null; - Buyers response = api.listBuyers(search, limit, cursor); + Buyers response = client.listBuyers(search, limit, cursor); ``` To create, the API requires a request object for that resource that is conventiently @@ -154,7 +151,7 @@ the `addBuyer` method. ```java BuyerRequest buyer = new BuyerRequest(); buyer.setDisplayName("Tester T."); - Buyer result = apiInstance.addBuyer(buyer); + Buyer result = client.addBuyer(buyer); ``` So to update a buyer you will need to pass in the `BuyerUpdate` object to the @@ -163,23 +160,19 @@ So to update a buyer you will need to pass in the `BuyerUpdate` object to the ```java BuyerUpdate buyer = new BuyerUpdate(); buyer.setDisplayName("Tester T."); - Buyer result = apiInstance.updateBuyer(buyerId, buyer); + Buyer result = client.updateBuyer(buyerId, buyer); ``` ## Development -### Adding new APIs +### Updating models -To add new APIs, run the following command to update the models and APIs based -on the API spec. +To update API models, run the following command: ```sh ./openapi-generator-generate.sh ``` -Next, update `sdk_.go` to bind any new APIs or remove any APIs that are no -longer available. - Run the tests to ensure the changes do not break any existing tests. ```sh diff --git a/openapi-generator-generate.sh b/openapi-generator-generate.sh index 08745d8..529ce2f 100755 --- a/openapi-generator-generate.sh +++ b/openapi-generator-generate.sh @@ -11,4 +11,23 @@ docker run --rm \ -c /local/.openapi-generator-config.json rm -rf src/test/java/com/gr4vy/api -rm -rf api \ No newline at end of file +rm -rf api +mkdir src/main/model +cp -R src/main/java/com/gr4vy/api/model/* src/main/model/ +rm -rf src/main/java/com/gr4vy/api/* +mkdir src/main/java/com/gr4vy/api/model +cp -R src/main/model/* src/main/java/com/gr4vy/api/model/ +rm -rf src/main/model + +var1='OffsetDateTime' +rep1='String' +sed -i '' "s/$var1/$rep1/g" src/main/java/com/gr4vy/api/model/*.java + +var1='import org.threeten.bp.String;' +rep1='' +sed -i '' "s/$var1/$rep1/g" src/main/java/com/gr4vy/api/model/*.java + +var1='private String previousSchemeTransactionId = "null";' +rep1='private String previousSchemeTransactionId = null;' +sed -i '' "s/$var1/$rep1/g" src/main/java/com/gr4vy/api/model/*.java + diff --git a/pom.xml b/pom.xml index bde9620..5f4bb88 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ gr4vy jar gr4vy - 0.15.0 + 0.16.0 https://gr4vy.com Gr4vy Java SDK diff --git a/src/main/java/com/gr4vy/api/ApiCallback.java b/src/main/java/com/gr4vy/api/ApiCallback.java deleted file mode 100644 index 87462dc..0000000 --- a/src/main/java/com/gr4vy/api/ApiCallback.java +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Gr4vy API - * Welcome to the Gr4vy API reference documentation. Our API is still very much a work in product and subject to change. - * - * The version of the OpenAPI document: 1.1.0-beta - * Contact: code@gr4vy.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.gr4vy.api; - -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 downlond processing. - * - * @param bytesRead bytes Read - * @param contentLength content lenngth of the response - * @param done Read end - */ - void onDownloadProgress(long bytesRead, long contentLength, boolean done); -} diff --git a/src/main/java/com/gr4vy/api/ApiClient.java b/src/main/java/com/gr4vy/api/ApiClient.java deleted file mode 100644 index b0e4a2d..0000000 --- a/src/main/java/com/gr4vy/api/ApiClient.java +++ /dev/null @@ -1,1365 +0,0 @@ -/* - * Gr4vy API - * Welcome to the Gr4vy API reference documentation. Our API is still very much a work in product and subject to change. - * - * The version of the OpenAPI document: 1.1.0-beta - * Contact: code@gr4vy.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.gr4vy.api; - -import okhttp3.*; -import okhttp3.internal.http.HttpMethod; -import okhttp3.internal.tls.OkHostnameVerifier; -import okhttp3.logging.HttpLoggingInterceptor; -import okhttp3.logging.HttpLoggingInterceptor.Level; -import okio.BufferedSink; -import okio.Okio; -import org.threeten.bp.LocalDate; -import org.threeten.bp.OffsetDateTime; -import org.threeten.bp.format.DateTimeFormatter; - -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.util.*; -import java.util.Map.Entry; -import java.util.concurrent.TimeUnit; -import java.util.regex.Matcher; -import java.util.regex.Pattern; - -import com.gr4vy.api.auth.Authentication; -import com.gr4vy.api.auth.HttpBasicAuth; -import com.gr4vy.api.auth.HttpBearerAuth; -import com.gr4vy.api.auth.ApiKeyAuth; - -public class ApiClient { - - private String basePath = "https://api.plantly.gr4vy.app"; - 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 - */ - 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/1.1.0-beta/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.plantly.gr4vy.app - * @return An instance of OkHttpClient - */ - public ApiClient setBasePath(String basePath) { - this.basePath = basePath; - 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 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; - } - - 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; - } - - public DateFormat getDateFormat() { - return dateFormat; - } - - public ApiClient setDateFormat(DateFormat dateFormat) { - this.json.setDateFormat(dateFormat); - return this; - } - - public ApiClient setSqlDateFormat(DateFormat dateFormat) { - this.json.setSqlDateFormat(dateFormat); - return this; - } - - public ApiClient setOffsetDateTimeFormat(DateTimeFormatter dateFormat) { - this.json.setOffsetDateTimeFormat(dateFormat); - return this; - } - - public ApiClient setLocalDateFormat(DateTimeFormatter dateFormat) { - this.json.setLocalDateFormat(dateFormat); - return this; - } - - public ApiClient setLenientOnJson(boolean lenientOnJson) { - this.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!"); - } - - /** - * 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 tempopary 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 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 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 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(String.valueOf(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, - * or matches "any", JSON will be used. - */ - public String selectHeaderContentType(String[] contentTypes) { - if (contentTypes.length == 0 || 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 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 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 (isJsonMime(contentType)) { - String content; - if (obj != null) { - content = json.serialize(obj); - } else { - content = null; - } - return RequestBody.create(content, 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 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 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 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 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 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 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 ApiException If fail to serialize the request body object - */ - public Call buildCall(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(path, method, queryParams, collectionQueryParams, body, headerParams, cookieParams, formParams, authNames, callback); - - return httpClient.newCall(request); - } - - /** - * Build an HTTP request with the given options. - * - * @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 ApiException If fail to serialize the request body object - */ - public Request buildRequest(String path, String method, List queryParams, List collectionQueryParams, Object body, Map headerParams, Map cookieParams, Map formParams, String[] authNames, ApiCallback callback) throws ApiException { - updateParamsForAuth(authNames, queryParams, headerParams, cookieParams); - - final String url = buildUrl(path, queryParams, collectionQueryParams); - final Request.Builder reqBuilder = new Request.Builder().url(url); - processHeaderParams(headerParams, reqBuilder); - processCookieParams(cookieParams, reqBuilder); - - String contentType = (String) headerParams.get("Content-Type"); - // ensuring a default content type - if (contentType == null) { - contentType = "application/json"; - } - - RequestBody reqBody; - if (!HttpMethod.permitsRequestBody(method)) { - reqBody = null; - } else if ("application/x-www-form-urlencoded".equals(contentType)) { - reqBody = buildRequestBodyFormEncoding(formParams); - } else if ("multipart/form-data".equals(contentType)) { - 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("", MediaType.parse(contentType)); - } - } else { - reqBody = serialize(body, contentType); - } - - // 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 path The sub path - * @param queryParams The query parameters - * @param collectionQueryParams The collection query parameters - * @return The full URL - */ - public String buildUrl(String path, List queryParams, List collectionQueryParams) { - final StringBuilder url = new StringBuilder(); - url.append(basePath).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 - */ - public void updateParamsForAuth(String[] authNames, List queryParams, Map headerParams, Map cookieParams) { - for (String authName : authNames) { - Authentication auth = authentications.get(authName); - if (auth == null) { - throw new RuntimeException("Authentication undefined: " + authName); - } - auth.applyToParams(queryParams, headerParams, cookieParams); - } - } - - /** - * 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(); - Headers partHeaders = Headers.of("Content-Disposition", "form-data; name=\"" + param.getKey() + "\"; filename=\"" + file.getName() + "\""); - MediaType mediaType = MediaType.parse(guessContentTypeFromFile(file)); - mpBuilder.addPart(partHeaders, RequestBody.create(file, mediaType)); - } else { - Headers partHeaders = Headers.of("Content-Disposition", "form-data; name=\"" + param.getKey() + "\""); - mpBuilder.addPart(partHeaders, RequestBody.create(parameterToString(param.getValue()), null)); - } - } - 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; - } - } - - /** - * 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" + Integer.toString(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); - } - } -} diff --git a/src/main/java/com/gr4vy/api/ApiException.java b/src/main/java/com/gr4vy/api/ApiException.java deleted file mode 100644 index 8d43095..0000000 --- a/src/main/java/com/gr4vy/api/ApiException.java +++ /dev/null @@ -1,91 +0,0 @@ -/* - * Gr4vy API - * Welcome to the Gr4vy API reference documentation. Our API is still very much a work in product and subject to change. - * - * The version of the OpenAPI document: 1.1.0-beta - * Contact: code@gr4vy.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.gr4vy.api; - -import java.util.Map; -import java.util.List; - -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-08T13:56:38.178267Z[Etc/UTC]") -public class ApiException extends Exception { - private int code = 0; - private Map> 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, Map> responseHeaders, String responseBody) { - super(message, throwable); - this.code = code; - this.responseHeaders = responseHeaders; - this.responseBody = responseBody; - } - - public ApiException(String message, int code, Map> responseHeaders, String responseBody) { - this(message, (Throwable) null, code, responseHeaders, responseBody); - } - - public ApiException(String message, Throwable throwable, int code, Map> responseHeaders) { - this(message, throwable, code, responseHeaders, null); - } - - public ApiException(int code, Map> 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, 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; - } -} diff --git a/src/main/java/com/gr4vy/api/ApiResponse.java b/src/main/java/com/gr4vy/api/ApiResponse.java deleted file mode 100644 index df784bc..0000000 --- a/src/main/java/com/gr4vy/api/ApiResponse.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Gr4vy API - * Welcome to the Gr4vy API reference documentation. Our API is still very much a work in product and subject to change. - * - * The version of the OpenAPI document: 1.1.0-beta - * Contact: code@gr4vy.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.gr4vy.api; - -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/com/gr4vy/api/Configuration.java b/src/main/java/com/gr4vy/api/Configuration.java deleted file mode 100644 index 22c2a21..0000000 --- a/src/main/java/com/gr4vy/api/Configuration.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Gr4vy API - * Welcome to the Gr4vy API reference documentation. Our API is still very much a work in product and subject to change. - * - * The version of the OpenAPI document: 1.1.0-beta - * Contact: code@gr4vy.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.gr4vy.api; - -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-08T13:56:38.178267Z[Etc/UTC]") -public class Configuration { - 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/com/gr4vy/api/GzipRequestInterceptor.java b/src/main/java/com/gr4vy/api/GzipRequestInterceptor.java deleted file mode 100644 index 091ec61..0000000 --- a/src/main/java/com/gr4vy/api/GzipRequestInterceptor.java +++ /dev/null @@ -1,85 +0,0 @@ -/* - * Gr4vy API - * Welcome to the Gr4vy API reference documentation. Our API is still very much a work in product and subject to change. - * - * The version of the OpenAPI document: 1.1.0-beta - * Contact: code@gr4vy.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.gr4vy.api; - -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/com/gr4vy/api/JSON.java b/src/main/java/com/gr4vy/api/JSON.java deleted file mode 100644 index 912e221..0000000 --- a/src/main/java/com/gr4vy/api/JSON.java +++ /dev/null @@ -1,403 +0,0 @@ -/* - * Gr4vy API - * Welcome to the Gr4vy API reference documentation. Our API is still very much a work in product and subject to change. - * - * The version of the OpenAPI document: 1.1.0-beta - * Contact: code@gr4vy.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.gr4vy.api; - -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 org.threeten.bp.LocalDate; -import org.threeten.bp.OffsetDateTime; -import org.threeten.bp.format.DateTimeFormatter; - -import com.gr4vy.api.model.*; -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.util.Date; -import java.util.Locale; -import java.util.Map; -import java.util.HashMap; - -public class JSON { - private Gson gson; - private boolean isLenientOnJson = false; - private DateTypeAdapter dateTypeAdapter = new DateTypeAdapter(); - private SqlDateTypeAdapter sqlDateTypeAdapter = new SqlDateTypeAdapter(); - private OffsetDateTimeTypeAdapter offsetDateTimeTypeAdapter = new OffsetDateTimeTypeAdapter(); - private LocalDateTypeAdapter localDateTypeAdapter = new LocalDateTypeAdapter(); - private ByteArrayAdapter byteArrayAdapter = new ByteArrayAdapter(); - - @SuppressWarnings("unchecked") - public static GsonBuilder createGson() { - GsonFireBuilder fireBuilder = new GsonFireBuilder() - ; - 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; - } - - public JSON() { - gson = createGson() - .registerTypeAdapter(Date.class, dateTypeAdapter) - .registerTypeAdapter(java.sql.Date.class, sqlDateTypeAdapter) - .registerTypeAdapter(OffsetDateTime.class, offsetDateTimeTypeAdapter) - .registerTypeAdapter(LocalDate.class, localDateTypeAdapter) - .registerTypeAdapter(byte[].class, byteArrayAdapter) - .create(); - } - - /** - * Get Gson. - * - * @return Gson - */ - public Gson getGson() { - return gson; - } - - /** - * Set Gson. - * - * @param gson Gson - * @return JSON - */ - public JSON setGson(Gson gson) { - this.gson = gson; - return this; - } - - public JSON setLenientOnJson(boolean lenientOnJson) { - isLenientOnJson = lenientOnJson; - return this; - } - - /** - * Serialize the given Java object into JSON string. - * - * @param obj Object - * @return String representation of the JSON - */ - public 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 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 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 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 JSON setOffsetDateTimeFormat(DateTimeFormatter dateFormat) { - offsetDateTimeTypeAdapter.setFormat(dateFormat); - return this; - } - - public JSON setLocalDateFormat(DateTimeFormatter dateFormat) { - localDateTypeAdapter.setFormat(dateFormat); - return this; - } - - /** - * 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 JSON setDateFormat(DateFormat dateFormat) { - dateTypeAdapter.setFormat(dateFormat); - return this; - } - - public JSON setSqlDateFormat(DateFormat dateFormat) { - sqlDateTypeAdapter.setFormat(dateFormat); - return this; - } - -} diff --git a/src/main/java/com/gr4vy/api/Pair.java b/src/main/java/com/gr4vy/api/Pair.java deleted file mode 100644 index ef519b2..0000000 --- a/src/main/java/com/gr4vy/api/Pair.java +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Gr4vy API - * Welcome to the Gr4vy API reference documentation. Our API is still very much a work in product and subject to change. - * - * The version of the OpenAPI document: 1.1.0-beta - * Contact: code@gr4vy.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.gr4vy.api; - -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-08T13:56:38.178267Z[Etc/UTC]") -public class Pair { - private String name = ""; - private String value = ""; - - public Pair (String name, String value) { - setName(name); - setValue(value); - } - - private void setName(String name) { - if (!isValidString(name)) { - return; - } - - this.name = name; - } - - private void setValue(String value) { - if (!isValidString(value)) { - return; - } - - this.value = value; - } - - public String getName() { - return this.name; - } - - public String getValue() { - return this.value; - } - - private boolean isValidString(String arg) { - if (arg == null) { - return false; - } - - if (arg.trim().isEmpty()) { - return false; - } - - return true; - } -} diff --git a/src/main/java/com/gr4vy/api/ProgressRequestBody.java b/src/main/java/com/gr4vy/api/ProgressRequestBody.java deleted file mode 100644 index 5605dda..0000000 --- a/src/main/java/com/gr4vy/api/ProgressRequestBody.java +++ /dev/null @@ -1,73 +0,0 @@ -/* - * Gr4vy API - * Welcome to the Gr4vy API reference documentation. Our API is still very much a work in product and subject to change. - * - * The version of the OpenAPI document: 1.1.0-beta - * Contact: code@gr4vy.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.gr4vy.api; - -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/com/gr4vy/api/ProgressResponseBody.java b/src/main/java/com/gr4vy/api/ProgressResponseBody.java deleted file mode 100644 index e390f30..0000000 --- a/src/main/java/com/gr4vy/api/ProgressResponseBody.java +++ /dev/null @@ -1,72 +0,0 @@ -/* - * Gr4vy API - * Welcome to the Gr4vy API reference documentation. Our API is still very much a work in product and subject to change. - * - * The version of the OpenAPI document: 1.1.0-beta - * Contact: code@gr4vy.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.gr4vy.api; - -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/com/gr4vy/api/ServerConfiguration.java b/src/main/java/com/gr4vy/api/ServerConfiguration.java deleted file mode 100644 index 13beab2..0000000 --- a/src/main/java/com/gr4vy/api/ServerConfiguration.java +++ /dev/null @@ -1,58 +0,0 @@ -package com.gr4vy.api; - -import java.util.Map; - -/** - * Representing a Server configuration. - */ -public class ServerConfiguration { - public String URL; - public String description; - public Map variables; - - /** - * @param URL A URL to the target host. - * @param description A describtion of the host designated by the URL. - * @param variables A map between a variable name and its value. The value is used for substitution in the server's URL template. - */ - public ServerConfiguration(String URL, String description, Map variables) { - this.URL = URL; - this.description = description; - this.variables = variables; - } - - /** - * Format URL template using given variables. - * - * @param variables A map between a variable name and its value. - * @return Formatted URL. - */ - public String URL(Map variables) { - String url = this.URL; - - // go through variables and replace placeholders - for (Map.Entry variable: this.variables.entrySet()) { - String name = variable.getKey(); - ServerVariable serverVariable = variable.getValue(); - String value = serverVariable.defaultValue; - - if (variables != null && variables.containsKey(name)) { - value = variables.get(name); - if (serverVariable.enumValues.size() > 0 && !serverVariable.enumValues.contains(value)) { - throw new RuntimeException("The variable " + name + " in the server URL has invalid value " + value + "."); - } - } - url = url.replaceAll("\\{" + name + "\\}", value); - } - return url; - } - - /** - * Format URL template using default server variables. - * - * @return Formatted URL. - */ - public String URL() { - return URL(null); - } -} diff --git a/src/main/java/com/gr4vy/api/ServerVariable.java b/src/main/java/com/gr4vy/api/ServerVariable.java deleted file mode 100644 index f0fd935..0000000 --- a/src/main/java/com/gr4vy/api/ServerVariable.java +++ /dev/null @@ -1,23 +0,0 @@ -package com.gr4vy.api; - -import java.util.HashSet; - -/** - * Representing a Server Variable for server URL template substitution. - */ -public class ServerVariable { - public String description; - public String defaultValue; - public HashSet enumValues = null; - - /** - * @param description A description for the server variable. - * @param defaultValue The default value to use for substitution. - * @param enumValues An enumeration of string values to be used if the substitution options are from a limited set. - */ - public ServerVariable(String description, String defaultValue, HashSet enumValues) { - this.description = description; - this.defaultValue = defaultValue; - this.enumValues = enumValues; - } -} diff --git a/src/main/java/com/gr4vy/api/StringUtil.java b/src/main/java/com/gr4vy/api/StringUtil.java deleted file mode 100644 index 4992860..0000000 --- a/src/main/java/com/gr4vy/api/StringUtil.java +++ /dev/null @@ -1,83 +0,0 @@ -/* - * Gr4vy API - * Welcome to the Gr4vy API reference documentation. Our API is still very much a work in product and subject to change. - * - * The version of the OpenAPI document: 1.1.0-beta - * Contact: code@gr4vy.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.gr4vy.api; - -import java.util.Collection; -import java.util.Iterator; - -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-08T13:56:38.178267Z[Etc/UTC]") -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/com/gr4vy/api/auth/ApiKeyAuth.java b/src/main/java/com/gr4vy/api/auth/ApiKeyAuth.java deleted file mode 100644 index 265d9f6..0000000 --- a/src/main/java/com/gr4vy/api/auth/ApiKeyAuth.java +++ /dev/null @@ -1,77 +0,0 @@ -/* - * Gr4vy API - * Welcome to the Gr4vy API reference documentation. Our API is still very much a work in product and subject to change. - * - * The version of the OpenAPI document: 1.1.0-beta - * Contact: code@gr4vy.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.gr4vy.api.auth; - -import com.gr4vy.api.Pair; - -import java.util.Map; -import java.util.List; - -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-08T13:56:38.178267Z[Etc/UTC]") -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) { - 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/com/gr4vy/api/auth/Authentication.java b/src/main/java/com/gr4vy/api/auth/Authentication.java deleted file mode 100644 index 4e720f1..0000000 --- a/src/main/java/com/gr4vy/api/auth/Authentication.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Gr4vy API - * Welcome to the Gr4vy API reference documentation. Our API is still very much a work in product and subject to change. - * - * The version of the OpenAPI document: 1.1.0-beta - * Contact: code@gr4vy.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.gr4vy.api.auth; - -import com.gr4vy.api.Pair; - -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 - */ - void applyToParams(List queryParams, Map headerParams, Map cookieParams); -} diff --git a/src/main/java/com/gr4vy/api/auth/HttpBasicAuth.java b/src/main/java/com/gr4vy/api/auth/HttpBasicAuth.java deleted file mode 100644 index f14aa5a..0000000 --- a/src/main/java/com/gr4vy/api/auth/HttpBasicAuth.java +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Gr4vy API - * Welcome to the Gr4vy API reference documentation. Our API is still very much a work in product and subject to change. - * - * The version of the OpenAPI document: 1.1.0-beta - * Contact: code@gr4vy.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.gr4vy.api.auth; - -import com.gr4vy.api.Pair; - -import okhttp3.Credentials; - -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) { - if (username == null && password == null) { - return; - } - headerParams.put("Authorization", Credentials.basic( - username == null ? "" : username, - password == null ? "" : password)); - } -} diff --git a/src/main/java/com/gr4vy/api/auth/HttpBearerAuth.java b/src/main/java/com/gr4vy/api/auth/HttpBearerAuth.java deleted file mode 100644 index bf0e00d..0000000 --- a/src/main/java/com/gr4vy/api/auth/HttpBearerAuth.java +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Gr4vy API - * Welcome to the Gr4vy API reference documentation. Our API is still very much a work in product and subject to change. - * - * The version of the OpenAPI document: 1.1.0-beta - * Contact: code@gr4vy.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.gr4vy.api.auth; - -import com.gr4vy.api.Pair; - -import java.util.Map; -import java.util.List; - -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-08T13:56:38.178267Z[Etc/UTC]") -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) { - 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/com/gr4vy/api/model/APIKeyPairCreate.java b/src/main/java/com/gr4vy/api/model/APIKeyPairCreate.java index 899fc20..fb4a9b1 100644 --- a/src/main/java/com/gr4vy/api/model/APIKeyPairCreate.java +++ b/src/main/java/com/gr4vy/api/model/APIKeyPairCreate.java @@ -31,7 +31,7 @@ * A request to create an API key-pair. */ @ApiModel(description = "A request to create an API key-pair.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-08T13:56:38.178267Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-09-06T16:38:13.632050Z[Etc/UTC]") public class APIKeyPairCreate { public static final String SERIALIZED_NAME_DISPLAY_NAME = "display_name"; @SerializedName(SERIALIZED_NAME_DISPLAY_NAME) diff --git a/src/main/java/com/gr4vy/api/model/APIKeyPairRequest.java b/src/main/java/com/gr4vy/api/model/APIKeyPairRequest.java deleted file mode 100644 index 1e4d0d5..0000000 --- a/src/main/java/com/gr4vy/api/model/APIKeyPairRequest.java +++ /dev/null @@ -1,99 +0,0 @@ -/* - * Gr4vy API - * Welcome to the Gr4vy API reference documentation. Our API is still very much a work in product and subject to change. - * - * The version of the OpenAPI document: 1.1.0-beta - * Contact: code@gr4vy.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.gr4vy.api.model; - -import java.util.Objects; -import java.util.Arrays; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.io.IOException; - -/** - * A request to create an API key-pair. - */ -@ApiModel(description = "A request to create an API key-pair.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2022-12-22T14:21:56.132305Z[Etc/UTC]") -public class APIKeyPairRequest { - public static final String SERIALIZED_NAME_DISPLAY_NAME = "display_name"; - @SerializedName(SERIALIZED_NAME_DISPLAY_NAME) - private String displayName; - - - public APIKeyPairRequest displayName(String displayName) { - - this.displayName = displayName; - return this; - } - - /** - * A name for this key-pair which is used in the Gr4vy admin panel to give the key-pair a human readable name. - * @return displayName - **/ - @javax.annotation.Nullable - @ApiModelProperty(example = "Sandbox", value = "A name for this key-pair which is used in the Gr4vy admin panel to give the key-pair a human readable name.") - - public String getDisplayName() { - return displayName; - } - - - public void setDisplayName(String displayName) { - this.displayName = displayName; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - APIKeyPairRequest apIKeyPairRequest = (APIKeyPairRequest) o; - return Objects.equals(this.displayName, apIKeyPairRequest.displayName); - } - - @Override - public int hashCode() { - return Objects.hash(displayName); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class APIKeyPairRequest {\n"); - sb.append(" displayName: ").append(toIndentedString(displayName)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/src/main/java/com/gr4vy/api/model/APIKeyPairUpdate.java b/src/main/java/com/gr4vy/api/model/APIKeyPairUpdate.java index 57ab16c..4ba1308 100644 --- a/src/main/java/com/gr4vy/api/model/APIKeyPairUpdate.java +++ b/src/main/java/com/gr4vy/api/model/APIKeyPairUpdate.java @@ -28,7 +28,7 @@ * A request to update an API key-pair. */ @ApiModel(description = "A request to update an API key-pair.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-08T13:56:38.178267Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-09-06T16:38:13.632050Z[Etc/UTC]") public class APIKeyPairUpdate { public static final String SERIALIZED_NAME_DISPLAY_NAME = "display_name"; @SerializedName(SERIALIZED_NAME_DISPLAY_NAME) diff --git a/src/main/java/com/gr4vy/api/model/Address.java b/src/main/java/com/gr4vy/api/model/Address.java index 78de504..97429a7 100644 --- a/src/main/java/com/gr4vy/api/model/Address.java +++ b/src/main/java/com/gr4vy/api/model/Address.java @@ -28,7 +28,7 @@ * An address for the buyer. */ @ApiModel(description = "An address for the buyer.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-08T13:56:38.178267Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-09-06T16:38:13.632050Z[Etc/UTC]") public class Address { public static final String SERIALIZED_NAME_CITY = "city"; @SerializedName(SERIALIZED_NAME_CITY) diff --git a/src/main/java/com/gr4vy/api/model/AddressUpdate.java b/src/main/java/com/gr4vy/api/model/AddressUpdate.java deleted file mode 100644 index f902074..0000000 --- a/src/main/java/com/gr4vy/api/model/AddressUpdate.java +++ /dev/null @@ -1,330 +0,0 @@ -/* - * Gr4vy API - * Welcome to the Gr4vy API reference documentation. Our API is still very much a work in product and subject to change. - * - * The version of the OpenAPI document: 1.1.0-beta - * Contact: code@gr4vy.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.gr4vy.api.model; - -import java.util.Objects; -import java.util.Arrays; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.io.IOException; - -/** - * AddressUpdate - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2022-04-06T18:03:23.672646Z[Etc/UTC]") -public class AddressUpdate { - public static final String SERIALIZED_NAME_CITY = "city"; - @SerializedName(SERIALIZED_NAME_CITY) - private String city; - - public static final String SERIALIZED_NAME_COUNTRY = "country"; - @SerializedName(SERIALIZED_NAME_COUNTRY) - private String country; - - public static final String SERIALIZED_NAME_POSTAL_CODE = "postal_code"; - @SerializedName(SERIALIZED_NAME_POSTAL_CODE) - private String postalCode; - - public static final String SERIALIZED_NAME_STATE = "state"; - @SerializedName(SERIALIZED_NAME_STATE) - private String state; - - public static final String SERIALIZED_NAME_STATE_CODE = "state_code"; - @SerializedName(SERIALIZED_NAME_STATE_CODE) - private String stateCode; - - public static final String SERIALIZED_NAME_HOUSE_NUMBER_OR_NAME = "house_number_or_name"; - @SerializedName(SERIALIZED_NAME_HOUSE_NUMBER_OR_NAME) - private String houseNumberOrName; - - public static final String SERIALIZED_NAME_LINE1 = "line1"; - @SerializedName(SERIALIZED_NAME_LINE1) - private String line1; - - public static final String SERIALIZED_NAME_LINE2 = "line2"; - @SerializedName(SERIALIZED_NAME_LINE2) - private String line2; - - public static final String SERIALIZED_NAME_ORGANIZATION = "organization"; - @SerializedName(SERIALIZED_NAME_ORGANIZATION) - private String organization; - - - public AddressUpdate city(String city) { - - this.city = city; - return this; - } - - /** - * The city for the billing address. - * @return city - **/ - @javax.annotation.Nullable - @ApiModelProperty(example = "London", value = "The city for the billing address.") - - public String getCity() { - return city; - } - - - public void setCity(String city) { - this.city = city; - } - - - public AddressUpdate country(String country) { - - this.country = country; - return this; - } - - /** - * The country for the billing address. - * @return country - **/ - @javax.annotation.Nullable - @ApiModelProperty(example = "GB", value = "The country for the billing address.") - - public String getCountry() { - return country; - } - - - public void setCountry(String country) { - this.country = country; - } - - - public AddressUpdate postalCode(String postalCode) { - - this.postalCode = postalCode; - return this; - } - - /** - * The postal code or zip code for the billing address. - * @return postalCode - **/ - @javax.annotation.Nullable - @ApiModelProperty(example = "789123", value = "The postal code or zip code for the billing address.") - - public String getPostalCode() { - return postalCode; - } - - - public void setPostalCode(String postalCode) { - this.postalCode = postalCode; - } - - - public AddressUpdate state(String state) { - - this.state = state; - return this; - } - - /** - * The state, county, or province for the billing address. - * @return state - **/ - @javax.annotation.Nullable - @ApiModelProperty(example = "Greater London", value = "The state, county, or province for the billing address.") - - public String getState() { - return state; - } - - - public void setState(String state) { - this.state = state; - } - - - public AddressUpdate stateCode(String stateCode) { - - this.stateCode = stateCode; - return this; - } - - /** - * The code of state, county, or province for the billing address in ISO 3166-2 format. - * @return stateCode - **/ - @javax.annotation.Nullable - @ApiModelProperty(example = "GB-LND", value = "The code of state, county, or province for the billing address in ISO 3166-2 format.") - - public String getStateCode() { - return stateCode; - } - - - public void setStateCode(String stateCode) { - this.stateCode = stateCode; - } - - - public AddressUpdate houseNumberOrName(String houseNumberOrName) { - - this.houseNumberOrName = houseNumberOrName; - return this; - } - - /** - * The house number or name for the billing address. Not all payment services use this field but some do. - * @return houseNumberOrName - **/ - @javax.annotation.Nullable - @ApiModelProperty(example = "10", value = "The house number or name for the billing address. Not all payment services use this field but some do.") - - public String getHouseNumberOrName() { - return houseNumberOrName; - } - - - public void setHouseNumberOrName(String houseNumberOrName) { - this.houseNumberOrName = houseNumberOrName; - } - - - public AddressUpdate line1(String line1) { - - this.line1 = line1; - return this; - } - - /** - * The first line of the billing address. - * @return line1 - **/ - @javax.annotation.Nullable - @ApiModelProperty(example = "10 Oxford Street", value = "The first line of the billing address.") - - public String getLine1() { - return line1; - } - - - public void setLine1(String line1) { - this.line1 = line1; - } - - - public AddressUpdate line2(String line2) { - - this.line2 = line2; - return this; - } - - /** - * The second line of the billing address. - * @return line2 - **/ - @javax.annotation.Nullable - @ApiModelProperty(example = "New Oxford Court", value = "The second line of the billing address.") - - public String getLine2() { - return line2; - } - - - public void setLine2(String line2) { - this.line2 = line2; - } - - - public AddressUpdate organization(String organization) { - - this.organization = organization; - return this; - } - - /** - * The optional name of the company or organisation to add to the billing address. - * @return organization - **/ - @javax.annotation.Nullable - @ApiModelProperty(example = "Gr4vy", value = "The optional name of the company or organisation to add to the billing address.") - - public String getOrganization() { - return organization; - } - - - public void setOrganization(String organization) { - this.organization = organization; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - AddressUpdate addressUpdate = (AddressUpdate) o; - return Objects.equals(this.city, addressUpdate.city) && - Objects.equals(this.country, addressUpdate.country) && - Objects.equals(this.postalCode, addressUpdate.postalCode) && - Objects.equals(this.state, addressUpdate.state) && - Objects.equals(this.stateCode, addressUpdate.stateCode) && - Objects.equals(this.houseNumberOrName, addressUpdate.houseNumberOrName) && - Objects.equals(this.line1, addressUpdate.line1) && - Objects.equals(this.line2, addressUpdate.line2) && - Objects.equals(this.organization, addressUpdate.organization); - } - - @Override - public int hashCode() { - return Objects.hash(city, country, postalCode, state, stateCode, houseNumberOrName, line1, line2, organization); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class AddressUpdate {\n"); - sb.append(" city: ").append(toIndentedString(city)).append("\n"); - sb.append(" country: ").append(toIndentedString(country)).append("\n"); - sb.append(" postalCode: ").append(toIndentedString(postalCode)).append("\n"); - sb.append(" state: ").append(toIndentedString(state)).append("\n"); - sb.append(" stateCode: ").append(toIndentedString(stateCode)).append("\n"); - sb.append(" houseNumberOrName: ").append(toIndentedString(houseNumberOrName)).append("\n"); - sb.append(" line1: ").append(toIndentedString(line1)).append("\n"); - sb.append(" line2: ").append(toIndentedString(line2)).append("\n"); - sb.append(" organization: ").append(toIndentedString(organization)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/src/main/java/com/gr4vy/api/model/AntiFraudDecisionErrorEvent.java b/src/main/java/com/gr4vy/api/model/AntiFraudDecisionErrorEvent.java index e6aa50d..3e2699e 100644 --- a/src/main/java/com/gr4vy/api/model/AntiFraudDecisionErrorEvent.java +++ b/src/main/java/com/gr4vy/api/model/AntiFraudDecisionErrorEvent.java @@ -25,13 +25,13 @@ import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.UUID; -import org.threeten.bp.OffsetDateTime; + /** * This event logs the reason why we were unable to get an anti-fraud decision. */ @ApiModel(description = "This event logs the reason why we were unable to get an anti-fraud decision.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-08T13:56:38.178267Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-09-06T16:38:13.632050Z[Etc/UTC]") public class AntiFraudDecisionErrorEvent { /** * The type of this resource. Is always `transaction-event`. @@ -137,7 +137,7 @@ public NameEnum read(final JsonReader jsonReader) throws IOException { public static final String SERIALIZED_NAME_CREATED_AT = "created_at"; @SerializedName(SERIALIZED_NAME_CREATED_AT) - private OffsetDateTime createdAt; + private String createdAt; public static final String SERIALIZED_NAME_CONTEXT = "context"; @SerializedName(SERIALIZED_NAME_CONTEXT) @@ -213,7 +213,7 @@ public void setName(NameEnum name) { } - public AntiFraudDecisionErrorEvent createdAt(OffsetDateTime createdAt) { + public AntiFraudDecisionErrorEvent createdAt(String createdAt) { this.createdAt = createdAt; return this; @@ -226,12 +226,12 @@ public AntiFraudDecisionErrorEvent createdAt(OffsetDateTime createdAt) { @javax.annotation.Nullable @ApiModelProperty(example = "2013-07-16T19:23Z", value = "The date and time when this transaction was created in our system.") - public OffsetDateTime getCreatedAt() { + public String getCreatedAt() { return createdAt; } - public void setCreatedAt(OffsetDateTime createdAt) { + public void setCreatedAt(String createdAt) { this.createdAt = createdAt; } diff --git a/src/main/java/com/gr4vy/api/model/AntiFraudDecisionErrorEventContext.java b/src/main/java/com/gr4vy/api/model/AntiFraudDecisionErrorEventContext.java index c015062..da89baa 100644 --- a/src/main/java/com/gr4vy/api/model/AntiFraudDecisionErrorEventContext.java +++ b/src/main/java/com/gr4vy/api/model/AntiFraudDecisionErrorEventContext.java @@ -30,7 +30,7 @@ * Additional context for this event. */ @ApiModel(description = "Additional context for this event.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-08T13:56:38.178267Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-09-06T16:38:13.632050Z[Etc/UTC]") public class AntiFraudDecisionErrorEventContext { public static final String SERIALIZED_NAME_ANTI_FRAUD_SERVICE_ID = "anti_fraud_service_id"; @SerializedName(SERIALIZED_NAME_ANTI_FRAUD_SERVICE_ID) diff --git a/src/main/java/com/gr4vy/api/model/AntiFraudDecisionEvent.java b/src/main/java/com/gr4vy/api/model/AntiFraudDecisionEvent.java index 1421e1d..62a223c 100644 --- a/src/main/java/com/gr4vy/api/model/AntiFraudDecisionEvent.java +++ b/src/main/java/com/gr4vy/api/model/AntiFraudDecisionEvent.java @@ -25,13 +25,13 @@ import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.UUID; -import org.threeten.bp.OffsetDateTime; + /** * This event logs the request and response details of HTTP calls made to an anti-fraud provider. */ @ApiModel(description = "This event logs the request and response details of HTTP calls made to an anti-fraud provider.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-08T13:56:38.178267Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-09-06T16:38:13.632050Z[Etc/UTC]") public class AntiFraudDecisionEvent { /** * The type of this resource. Is always `transaction-event`. @@ -137,7 +137,7 @@ public NameEnum read(final JsonReader jsonReader) throws IOException { public static final String SERIALIZED_NAME_CREATED_AT = "created_at"; @SerializedName(SERIALIZED_NAME_CREATED_AT) - private OffsetDateTime createdAt; + private String createdAt; public static final String SERIALIZED_NAME_CONTEXT = "context"; @SerializedName(SERIALIZED_NAME_CONTEXT) @@ -213,7 +213,7 @@ public void setName(NameEnum name) { } - public AntiFraudDecisionEvent createdAt(OffsetDateTime createdAt) { + public AntiFraudDecisionEvent createdAt(String createdAt) { this.createdAt = createdAt; return this; @@ -226,12 +226,12 @@ public AntiFraudDecisionEvent createdAt(OffsetDateTime createdAt) { @javax.annotation.Nullable @ApiModelProperty(example = "2013-07-16T19:23Z", value = "The date and time when this transaction was created in our system.") - public OffsetDateTime getCreatedAt() { + public String getCreatedAt() { return createdAt; } - public void setCreatedAt(OffsetDateTime createdAt) { + public void setCreatedAt(String createdAt) { this.createdAt = createdAt; } diff --git a/src/main/java/com/gr4vy/api/model/AntiFraudDecisionEventContext.java b/src/main/java/com/gr4vy/api/model/AntiFraudDecisionEventContext.java index 2a2d1a1..1f7163d 100644 --- a/src/main/java/com/gr4vy/api/model/AntiFraudDecisionEventContext.java +++ b/src/main/java/com/gr4vy/api/model/AntiFraudDecisionEventContext.java @@ -30,7 +30,7 @@ * Additional context for this event. */ @ApiModel(description = "Additional context for this event.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-08T13:56:38.178267Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-09-06T16:38:13.632050Z[Etc/UTC]") public class AntiFraudDecisionEventContext { public static final String SERIALIZED_NAME_ANTI_FRAUD_SERVICE_ID = "anti_fraud_service_id"; @SerializedName(SERIALIZED_NAME_ANTI_FRAUD_SERVICE_ID) diff --git a/src/main/java/com/gr4vy/api/model/AntiFraudDecisionSkippedEvent.java b/src/main/java/com/gr4vy/api/model/AntiFraudDecisionSkippedEvent.java index b46630d..bac258f 100644 --- a/src/main/java/com/gr4vy/api/model/AntiFraudDecisionSkippedEvent.java +++ b/src/main/java/com/gr4vy/api/model/AntiFraudDecisionSkippedEvent.java @@ -25,13 +25,13 @@ import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.UUID; -import org.threeten.bp.OffsetDateTime; + /** * This event logs the reason why we skipped getting an anti-fraud decision. */ @ApiModel(description = "This event logs the reason why we skipped getting an anti-fraud decision.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-08T13:56:38.178267Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-09-06T16:38:13.632050Z[Etc/UTC]") public class AntiFraudDecisionSkippedEvent { /** * The type of this resource. Is always `transaction-event`. @@ -137,7 +137,7 @@ public NameEnum read(final JsonReader jsonReader) throws IOException { public static final String SERIALIZED_NAME_CREATED_AT = "created_at"; @SerializedName(SERIALIZED_NAME_CREATED_AT) - private OffsetDateTime createdAt; + private String createdAt; public static final String SERIALIZED_NAME_CONTEXT = "context"; @SerializedName(SERIALIZED_NAME_CONTEXT) @@ -213,7 +213,7 @@ public void setName(NameEnum name) { } - public AntiFraudDecisionSkippedEvent createdAt(OffsetDateTime createdAt) { + public AntiFraudDecisionSkippedEvent createdAt(String createdAt) { this.createdAt = createdAt; return this; @@ -226,12 +226,12 @@ public AntiFraudDecisionSkippedEvent createdAt(OffsetDateTime createdAt) { @javax.annotation.Nullable @ApiModelProperty(example = "2013-07-16T19:23Z", value = "The date and time when this transaction was created in our system.") - public OffsetDateTime getCreatedAt() { + public String getCreatedAt() { return createdAt; } - public void setCreatedAt(OffsetDateTime createdAt) { + public void setCreatedAt(String createdAt) { this.createdAt = createdAt; } diff --git a/src/main/java/com/gr4vy/api/model/AntiFraudDecisionSkippedEventContext.java b/src/main/java/com/gr4vy/api/model/AntiFraudDecisionSkippedEventContext.java index 8e836d8..02db505 100644 --- a/src/main/java/com/gr4vy/api/model/AntiFraudDecisionSkippedEventContext.java +++ b/src/main/java/com/gr4vy/api/model/AntiFraudDecisionSkippedEventContext.java @@ -29,7 +29,7 @@ * Additional context for this event. */ @ApiModel(description = "Additional context for this event.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-08T13:56:38.178267Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-09-06T16:38:13.632050Z[Etc/UTC]") public class AntiFraudDecisionSkippedEventContext { public static final String SERIALIZED_NAME_ANTI_FRAUD_SERVICE_ID = "anti_fraud_service_id"; @SerializedName(SERIALIZED_NAME_ANTI_FRAUD_SERVICE_ID) diff --git a/src/main/java/com/gr4vy/api/model/AntiFraudDecisionTransactionEvent.java b/src/main/java/com/gr4vy/api/model/AntiFraudDecisionTransactionEvent.java deleted file mode 100644 index 13ea407..0000000 --- a/src/main/java/com/gr4vy/api/model/AntiFraudDecisionTransactionEvent.java +++ /dev/null @@ -1,308 +0,0 @@ -/* - * Gr4vy API - * Welcome to the Gr4vy API reference documentation. Our API is still very much a work in product and subject to change. - * - * The version of the OpenAPI document: 1.1.0-beta - * Contact: code@gr4vy.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.gr4vy.api.model; - -import java.util.Objects; -import java.util.Arrays; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import com.gr4vy.api.model.AntiFraudDecisionTransactionEventContext; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.io.IOException; -import java.util.UUID; -import org.threeten.bp.OffsetDateTime; - -/** - * The request/response details of HTTP calls made to an anti-fraud provider. - */ -@ApiModel(description = "The request/response details of HTTP calls made to an anti-fraud provider.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-30T05:21:36.133441Z[Etc/UTC]") -public class AntiFraudDecisionTransactionEvent { - /** - * The type of this resource. Is always `transaction-event`. - */ - @JsonAdapter(TypeEnum.Adapter.class) - public enum TypeEnum { - TRANSACTION_EVENT("transaction-event"); - - 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 UUID id; - - /** - * The name of this resource. Is always `anti-fraud-decision `. - */ - @JsonAdapter(NameEnum.Adapter.class) - public enum NameEnum { - ANTI_FRAUD_DECISION("anti-fraud-decision"); - - private String value; - - NameEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static NameEnum fromValue(String value) { - for (NameEnum b : NameEnum.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 NameEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public NameEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return NameEnum.fromValue(value); - } - } - } - - public static final String SERIALIZED_NAME_NAME = "name"; - @SerializedName(SERIALIZED_NAME_NAME) - private NameEnum name; - - public static final String SERIALIZED_NAME_CREATED_AT = "created_at"; - @SerializedName(SERIALIZED_NAME_CREATED_AT) - private OffsetDateTime createdAt; - - public static final String SERIALIZED_NAME_CONTEXT = "context"; - @SerializedName(SERIALIZED_NAME_CONTEXT) - private AntiFraudDecisionTransactionEventContext context; - - - public AntiFraudDecisionTransactionEvent type(TypeEnum type) { - - this.type = type; - return this; - } - - /** - * The type of this resource. Is always `transaction-event`. - * @return type - **/ - @javax.annotation.Nullable - @ApiModelProperty(example = "transaction-event", value = "The type of this resource. Is always `transaction-event`.") - - public TypeEnum getType() { - return type; - } - - - public void setType(TypeEnum type) { - this.type = type; - } - - - public AntiFraudDecisionTransactionEvent id(UUID id) { - - this.id = id; - return this; - } - - /** - * The unique identifier for this event. - * @return id - **/ - @javax.annotation.Nullable - @ApiModelProperty(example = "fe26475d-ec3e-4884-9553-f7356683f7f9", value = "The unique identifier for this event.") - - public UUID getId() { - return id; - } - - - public void setId(UUID id) { - this.id = id; - } - - - public AntiFraudDecisionTransactionEvent name(NameEnum name) { - - this.name = name; - return this; - } - - /** - * The name of this resource. Is always `anti-fraud-decision `. - * @return name - **/ - @javax.annotation.Nullable - @ApiModelProperty(example = "anti-fraud-decision", value = "The name of this resource. Is always `anti-fraud-decision `.") - - public NameEnum getName() { - return name; - } - - - public void setName(NameEnum name) { - this.name = name; - } - - - public AntiFraudDecisionTransactionEvent createdAt(OffsetDateTime createdAt) { - - this.createdAt = createdAt; - return this; - } - - /** - * The date and time when this transaction was created in our system. - * @return createdAt - **/ - @javax.annotation.Nullable - @ApiModelProperty(example = "2013-07-16T19:23Z", value = "The date and time when this transaction was created in our system.") - - public OffsetDateTime getCreatedAt() { - return createdAt; - } - - - public void setCreatedAt(OffsetDateTime createdAt) { - this.createdAt = createdAt; - } - - - public AntiFraudDecisionTransactionEvent context(AntiFraudDecisionTransactionEventContext context) { - - this.context = context; - return this; - } - - /** - * Get context - * @return context - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - - public AntiFraudDecisionTransactionEventContext getContext() { - return context; - } - - - public void setContext(AntiFraudDecisionTransactionEventContext context) { - this.context = context; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - AntiFraudDecisionTransactionEvent antiFraudDecisionTransactionEvent = (AntiFraudDecisionTransactionEvent) o; - return Objects.equals(this.type, antiFraudDecisionTransactionEvent.type) && - Objects.equals(this.id, antiFraudDecisionTransactionEvent.id) && - Objects.equals(this.name, antiFraudDecisionTransactionEvent.name) && - Objects.equals(this.createdAt, antiFraudDecisionTransactionEvent.createdAt) && - Objects.equals(this.context, antiFraudDecisionTransactionEvent.context); - } - - @Override - public int hashCode() { - return Objects.hash(type, id, name, createdAt, context); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class AntiFraudDecisionTransactionEvent {\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); - sb.append(" context: ").append(toIndentedString(context)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/src/main/java/com/gr4vy/api/model/AntiFraudDecisionTransactionEventContext.java b/src/main/java/com/gr4vy/api/model/AntiFraudDecisionTransactionEventContext.java deleted file mode 100644 index 9856cc2..0000000 --- a/src/main/java/com/gr4vy/api/model/AntiFraudDecisionTransactionEventContext.java +++ /dev/null @@ -1,275 +0,0 @@ -/* - * Gr4vy API - * Welcome to the Gr4vy API reference documentation. Our API is still very much a work in product and subject to change. - * - * The version of the OpenAPI document: 1.1.0-beta - * Contact: code@gr4vy.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.gr4vy.api.model; - -import java.util.Objects; -import java.util.Arrays; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.io.IOException; -import java.math.BigDecimal; -import java.util.UUID; - -/** - * Anti-fraud decision context. - */ -@ApiModel(description = "Anti-fraud decision context.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-30T05:21:36.133441Z[Etc/UTC]") -public class AntiFraudDecisionTransactionEventContext { - public static final String SERIALIZED_NAME_REQUEST = "request"; - @SerializedName(SERIALIZED_NAME_REQUEST) - private String request; - - public static final String SERIALIZED_NAME_RESPONSE = "response"; - @SerializedName(SERIALIZED_NAME_RESPONSE) - private String response; - - public static final String SERIALIZED_NAME_RESPONSE_STATUS_CODE = "response_status_code"; - @SerializedName(SERIALIZED_NAME_RESPONSE_STATUS_CODE) - private BigDecimal responseStatusCode; - - public static final String SERIALIZED_NAME_DECISION = "decision"; - @SerializedName(SERIALIZED_NAME_DECISION) - private String decision; - - public static final String SERIALIZED_NAME_ANTI_FRAUD_SERVICE_ID = "anti_fraud_service_id"; - @SerializedName(SERIALIZED_NAME_ANTI_FRAUD_SERVICE_ID) - private UUID antiFraudServiceId; - - public static final String SERIALIZED_NAME_ANTI_FRAUD_SERVICE_NAME = "anti_fraud_service_name"; - @SerializedName(SERIALIZED_NAME_ANTI_FRAUD_SERVICE_NAME) - private String antiFraudServiceName; - - public static final String SERIALIZED_NAME_ANTI_FRAUD_SERVICE_DEFINITION_ID = "anti_fraud_service_definition_id"; - @SerializedName(SERIALIZED_NAME_ANTI_FRAUD_SERVICE_DEFINITION_ID) - private String antiFraudServiceDefinitionId; - - - public AntiFraudDecisionTransactionEventContext request(String request) { - - this.request = request; - return this; - } - - /** - * The HTTP body sent to fetch a decision. - * @return request - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "The HTTP body sent to fetch a decision.") - - public String getRequest() { - return request; - } - - - public void setRequest(String request) { - this.request = request; - } - - - public AntiFraudDecisionTransactionEventContext response(String response) { - - this.response = response; - return this; - } - - /** - * The HTTP body received from the anti-fraud provider. - * @return response - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "The HTTP body received from the anti-fraud provider.") - - public String getResponse() { - return response; - } - - - public void setResponse(String response) { - this.response = response; - } - - - public AntiFraudDecisionTransactionEventContext responseStatusCode(BigDecimal responseStatusCode) { - - this.responseStatusCode = responseStatusCode; - return this; - } - - /** - * The HTTP response status code from the anti-fraud provider. - * @return responseStatusCode - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "The HTTP response status code from the anti-fraud provider.") - - public BigDecimal getResponseStatusCode() { - return responseStatusCode; - } - - - public void setResponseStatusCode(BigDecimal responseStatusCode) { - this.responseStatusCode = responseStatusCode; - } - - - public AntiFraudDecisionTransactionEventContext decision(String decision) { - - this.decision = decision; - return this; - } - - /** - * The parsed decision response from the anti-fraud provider response. - * @return decision - **/ - @javax.annotation.Nullable - @ApiModelProperty(example = "ACCEPT", value = "The parsed decision response from the anti-fraud provider response.") - - public String getDecision() { - return decision; - } - - - public void setDecision(String decision) { - this.decision = decision; - } - - - public AntiFraudDecisionTransactionEventContext antiFraudServiceId(UUID antiFraudServiceId) { - - this.antiFraudServiceId = antiFraudServiceId; - return this; - } - - /** - * The unique ID of the anti-fraud service used. - * @return antiFraudServiceId - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "The unique ID of the anti-fraud service used.") - - public UUID getAntiFraudServiceId() { - return antiFraudServiceId; - } - - - public void setAntiFraudServiceId(UUID antiFraudServiceId) { - this.antiFraudServiceId = antiFraudServiceId; - } - - - public AntiFraudDecisionTransactionEventContext antiFraudServiceName(String antiFraudServiceName) { - - this.antiFraudServiceName = antiFraudServiceName; - return this; - } - - /** - * The name of the anti-fraud service used. - * @return antiFraudServiceName - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "The name of the anti-fraud service used.") - - public String getAntiFraudServiceName() { - return antiFraudServiceName; - } - - - public void setAntiFraudServiceName(String antiFraudServiceName) { - this.antiFraudServiceName = antiFraudServiceName; - } - - - public AntiFraudDecisionTransactionEventContext antiFraudServiceDefinitionId(String antiFraudServiceDefinitionId) { - - this.antiFraudServiceDefinitionId = antiFraudServiceDefinitionId; - return this; - } - - /** - * The anti-fraud service definition used. - * @return antiFraudServiceDefinitionId - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "The anti-fraud service definition used.") - - public String getAntiFraudServiceDefinitionId() { - return antiFraudServiceDefinitionId; - } - - - public void setAntiFraudServiceDefinitionId(String antiFraudServiceDefinitionId) { - this.antiFraudServiceDefinitionId = antiFraudServiceDefinitionId; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - AntiFraudDecisionTransactionEventContext antiFraudDecisionTransactionEventContext = (AntiFraudDecisionTransactionEventContext) o; - return Objects.equals(this.request, antiFraudDecisionTransactionEventContext.request) && - Objects.equals(this.response, antiFraudDecisionTransactionEventContext.response) && - Objects.equals(this.responseStatusCode, antiFraudDecisionTransactionEventContext.responseStatusCode) && - Objects.equals(this.decision, antiFraudDecisionTransactionEventContext.decision) && - Objects.equals(this.antiFraudServiceId, antiFraudDecisionTransactionEventContext.antiFraudServiceId) && - Objects.equals(this.antiFraudServiceName, antiFraudDecisionTransactionEventContext.antiFraudServiceName) && - Objects.equals(this.antiFraudServiceDefinitionId, antiFraudDecisionTransactionEventContext.antiFraudServiceDefinitionId); - } - - @Override - public int hashCode() { - return Objects.hash(request, response, responseStatusCode, decision, antiFraudServiceId, antiFraudServiceName, antiFraudServiceDefinitionId); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class AntiFraudDecisionTransactionEventContext {\n"); - sb.append(" request: ").append(toIndentedString(request)).append("\n"); - sb.append(" response: ").append(toIndentedString(response)).append("\n"); - sb.append(" responseStatusCode: ").append(toIndentedString(responseStatusCode)).append("\n"); - sb.append(" decision: ").append(toIndentedString(decision)).append("\n"); - sb.append(" antiFraudServiceId: ").append(toIndentedString(antiFraudServiceId)).append("\n"); - sb.append(" antiFraudServiceName: ").append(toIndentedString(antiFraudServiceName)).append("\n"); - sb.append(" antiFraudServiceDefinitionId: ").append(toIndentedString(antiFraudServiceDefinitionId)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/src/main/java/com/gr4vy/api/model/AntiFraudService.java b/src/main/java/com/gr4vy/api/model/AntiFraudService.java deleted file mode 100644 index 57004b5..0000000 --- a/src/main/java/com/gr4vy/api/model/AntiFraudService.java +++ /dev/null @@ -1,406 +0,0 @@ -/* - * Gr4vy API - * Welcome to the Gr4vy API reference documentation. Our API is still very much a work in product and subject to change. - * - * The version of the OpenAPI document: 1.1.0-beta - * Contact: code@gr4vy.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.gr4vy.api.model; - -import java.util.Objects; -import java.util.Arrays; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import com.gr4vy.api.model.AntiFraudServiceFields; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.io.IOException; -import java.util.ArrayList; -import java.util.List; -import java.util.UUID; -import org.threeten.bp.OffsetDateTime; - -/** - * AntiFraudService - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2022-10-18T22:22:07.544896Z[Etc/UTC]") -public class AntiFraudService { - /** - * The type of this resource. Is always `anti-fraud-service`. - */ - @JsonAdapter(TypeEnum.Adapter.class) - public enum TypeEnum { - ANTI_FRAUD_SERVICE("anti-fraud-service"); - - 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 UUID id; - - /** - * The name of the Anti-Fraud service provider. During update request, this value is used for validation only but the underlying service can not be changed for an existing service. - */ - @JsonAdapter(AntiFraudServiceDefinitionIdEnum.Adapter.class) - public enum AntiFraudServiceDefinitionIdEnum { - SIFT("sift"), - - CYBERSOURCE("cybersource"); - - private String value; - - AntiFraudServiceDefinitionIdEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static AntiFraudServiceDefinitionIdEnum fromValue(String value) { - for (AntiFraudServiceDefinitionIdEnum b : AntiFraudServiceDefinitionIdEnum.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 AntiFraudServiceDefinitionIdEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public AntiFraudServiceDefinitionIdEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return AntiFraudServiceDefinitionIdEnum.fromValue(value); - } - } - } - - public static final String SERIALIZED_NAME_ANTI_FRAUD_SERVICE_DEFINITION_ID = "anti_fraud_service_definition_id"; - @SerializedName(SERIALIZED_NAME_ANTI_FRAUD_SERVICE_DEFINITION_ID) - private AntiFraudServiceDefinitionIdEnum antiFraudServiceDefinitionId; - - public static final String SERIALIZED_NAME_DISPLAY_NAME = "display_name"; - @SerializedName(SERIALIZED_NAME_DISPLAY_NAME) - private String displayName; - - public static final String SERIALIZED_NAME_ACTIVE = "active"; - @SerializedName(SERIALIZED_NAME_ACTIVE) - private Boolean active = true; - - public static final String SERIALIZED_NAME_FIELDS = "fields"; - @SerializedName(SERIALIZED_NAME_FIELDS) - private List fields = null; - - public static final String SERIALIZED_NAME_CREATED_AT = "created_at"; - @SerializedName(SERIALIZED_NAME_CREATED_AT) - private OffsetDateTime createdAt; - - public static final String SERIALIZED_NAME_UPDATED_AT = "updated_at"; - @SerializedName(SERIALIZED_NAME_UPDATED_AT) - private OffsetDateTime updatedAt; - - - public AntiFraudService type(TypeEnum type) { - - this.type = type; - return this; - } - - /** - * The type of this resource. Is always `anti-fraud-service`. - * @return type - **/ - @javax.annotation.Nullable - @ApiModelProperty(example = "anti-fraud-service", value = "The type of this resource. Is always `anti-fraud-service`.") - - public TypeEnum getType() { - return type; - } - - - public void setType(TypeEnum type) { - this.type = type; - } - - - public AntiFraudService id(UUID id) { - - this.id = id; - return this; - } - - /** - * The unique Gr4vy ID for this anti-fraud service. - * @return id - **/ - @javax.annotation.Nullable - @ApiModelProperty(example = "fe26475d-ec3e-4884-9553-f7356683f7f9", value = "The unique Gr4vy ID for this anti-fraud service.") - - public UUID getId() { - return id; - } - - - public void setId(UUID id) { - this.id = id; - } - - - public AntiFraudService antiFraudServiceDefinitionId(AntiFraudServiceDefinitionIdEnum antiFraudServiceDefinitionId) { - - this.antiFraudServiceDefinitionId = antiFraudServiceDefinitionId; - return this; - } - - /** - * The name of the Anti-Fraud service provider. During update request, this value is used for validation only but the underlying service can not be changed for an existing service. - * @return antiFraudServiceDefinitionId - **/ - @javax.annotation.Nullable - @ApiModelProperty(example = "sift", value = "The name of the Anti-Fraud service provider. During update request, this value is used for validation only but the underlying service can not be changed for an existing service.") - - public AntiFraudServiceDefinitionIdEnum getAntiFraudServiceDefinitionId() { - return antiFraudServiceDefinitionId; - } - - - public void setAntiFraudServiceDefinitionId(AntiFraudServiceDefinitionIdEnum antiFraudServiceDefinitionId) { - this.antiFraudServiceDefinitionId = antiFraudServiceDefinitionId; - } - - - public AntiFraudService displayName(String displayName) { - - this.displayName = displayName; - return this; - } - - /** - * A unique name for this anti-fraud service which is used in the Gr4vy admin panel to give a anti-fraud service a human readable name. - * @return displayName - **/ - @javax.annotation.Nullable - @ApiModelProperty(example = "Sift Anti-Fraud Service.", value = "A unique name for this anti-fraud service which is used in the Gr4vy admin panel to give a anti-fraud service a human readable name.") - - public String getDisplayName() { - return displayName; - } - - - public void setDisplayName(String displayName) { - this.displayName = displayName; - } - - - public AntiFraudService active(Boolean active) { - - this.active = active; - return this; - } - - /** - * Defines if this service is currently active or not. - * @return active - **/ - @javax.annotation.Nullable - @ApiModelProperty(example = "true", value = "Defines if this service is currently active or not.") - - public Boolean getActive() { - return active; - } - - - public void setActive(Boolean active) { - this.active = active; - } - - - public AntiFraudService fields(List fields) { - - this.fields = fields; - return this; - } - - public AntiFraudService addFieldsItem(AntiFraudServiceFields fieldsItem) { - if (this.fields == null) { - this.fields = new ArrayList(); - } - this.fields.add(fieldsItem); - return this; - } - - /** - * A list of fields, each containing a key-value pair for anti-fraud service decision mapping e.g. for sift `approve_decision` will be in the response. - * @return fields - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "A list of fields, each containing a key-value pair for anti-fraud service decision mapping e.g. for sift `approve_decision` will be in the response.") - - public List getFields() { - return fields; - } - - - public void setFields(List fields) { - this.fields = fields; - } - - - public AntiFraudService createdAt(OffsetDateTime createdAt) { - - this.createdAt = createdAt; - return this; - } - - /** - * The date and time when this anti-fraud service was created in our system. - * @return createdAt - **/ - @javax.annotation.Nullable - @ApiModelProperty(example = "2013-07-16T19:23Z", value = "The date and time when this anti-fraud service was created in our system.") - - public OffsetDateTime getCreatedAt() { - return createdAt; - } - - - public void setCreatedAt(OffsetDateTime createdAt) { - this.createdAt = createdAt; - } - - - public AntiFraudService updatedAt(OffsetDateTime updatedAt) { - - this.updatedAt = updatedAt; - return this; - } - - /** - * The date and time when this anti-fraud service was last updated in our system. - * @return updatedAt - **/ - @javax.annotation.Nullable - @ApiModelProperty(example = "2013-07-16T19:23Z", value = "The date and time when this anti-fraud service was last updated in our system.") - - 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; - } - AntiFraudService antiFraudService = (AntiFraudService) o; - return Objects.equals(this.type, antiFraudService.type) && - Objects.equals(this.id, antiFraudService.id) && - Objects.equals(this.antiFraudServiceDefinitionId, antiFraudService.antiFraudServiceDefinitionId) && - Objects.equals(this.displayName, antiFraudService.displayName) && - Objects.equals(this.active, antiFraudService.active) && - Objects.equals(this.fields, antiFraudService.fields) && - Objects.equals(this.createdAt, antiFraudService.createdAt) && - Objects.equals(this.updatedAt, antiFraudService.updatedAt); - } - - @Override - public int hashCode() { - return Objects.hash(type, id, antiFraudServiceDefinitionId, displayName, active, fields, createdAt, updatedAt); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class AntiFraudService {\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" antiFraudServiceDefinitionId: ").append(toIndentedString(antiFraudServiceDefinitionId)).append("\n"); - sb.append(" displayName: ").append(toIndentedString(displayName)).append("\n"); - sb.append(" active: ").append(toIndentedString(active)).append("\n"); - sb.append(" fields: ").append(toIndentedString(fields)).append("\n"); - sb.append(" createdAt: ").append(toIndentedString(createdAt)).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 "); - } - -} - diff --git a/src/main/java/com/gr4vy/api/model/AntiFraudServiceCreate.java b/src/main/java/com/gr4vy/api/model/AntiFraudServiceCreate.java index 2741be1..1ae7125 100644 --- a/src/main/java/com/gr4vy/api/model/AntiFraudServiceCreate.java +++ b/src/main/java/com/gr4vy/api/model/AntiFraudServiceCreate.java @@ -32,7 +32,7 @@ * A request to create an anti-fraud service. */ @ApiModel(description = "A request to create an anti-fraud service.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-08T13:56:38.178267Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-09-06T16:38:13.632050Z[Etc/UTC]") public class AntiFraudServiceCreate { /** * The name of the Anti-Fraud service provider. During update request, this value is used for validation only but the underlying service can not be changed for an existing service. diff --git a/src/main/java/com/gr4vy/api/model/AntiFraudServiceUpdate.java b/src/main/java/com/gr4vy/api/model/AntiFraudServiceUpdate.java index cbf623e..8b60744 100644 --- a/src/main/java/com/gr4vy/api/model/AntiFraudServiceUpdate.java +++ b/src/main/java/com/gr4vy/api/model/AntiFraudServiceUpdate.java @@ -31,7 +31,7 @@ * A request to update an anti-fraud service. */ @ApiModel(description = "A request to update an anti-fraud service.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-08T13:56:38.178267Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-09-06T16:38:13.632050Z[Etc/UTC]") public class AntiFraudServiceUpdate { /** * The name of the Anti-Fraud service provider. During update request, this value is used for validation only but the underlying service can not be changed for an existing service. diff --git a/src/main/java/com/gr4vy/api/model/AntiFraudServiceUpdateFields.java b/src/main/java/com/gr4vy/api/model/AntiFraudServiceUpdateFields.java index 95a30a4..1ec8c2e 100644 --- a/src/main/java/com/gr4vy/api/model/AntiFraudServiceUpdateFields.java +++ b/src/main/java/com/gr4vy/api/model/AntiFraudServiceUpdateFields.java @@ -28,7 +28,7 @@ * A key-value pair that represents a field defined in the definition for this anti-fraud service. */ @ApiModel(description = "A key-value pair that represents a field defined in the definition for this anti-fraud service.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-08T13:56:38.178267Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-09-06T16:38:13.632050Z[Etc/UTC]") public class AntiFraudServiceUpdateFields { public static final String SERIALIZED_NAME_KEY = "key"; @SerializedName(SERIALIZED_NAME_KEY) diff --git a/src/main/java/com/gr4vy/api/model/AntiFraudWebhookEvent.java b/src/main/java/com/gr4vy/api/model/AntiFraudWebhookEvent.java index 6b0bd66..9ef863d 100644 --- a/src/main/java/com/gr4vy/api/model/AntiFraudWebhookEvent.java +++ b/src/main/java/com/gr4vy/api/model/AntiFraudWebhookEvent.java @@ -25,13 +25,13 @@ import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.UUID; -import org.threeten.bp.OffsetDateTime; + /** * This event logs the webhook received when an anti-fraud decision is updated. */ @ApiModel(description = "This event logs the webhook received when an anti-fraud decision is updated.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-08T13:56:38.178267Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-09-06T16:38:13.632050Z[Etc/UTC]") public class AntiFraudWebhookEvent { /** * The type of this resource. Is always `transaction-event`. @@ -137,7 +137,7 @@ public NameEnum read(final JsonReader jsonReader) throws IOException { public static final String SERIALIZED_NAME_CREATED_AT = "created_at"; @SerializedName(SERIALIZED_NAME_CREATED_AT) - private OffsetDateTime createdAt; + private String createdAt; public static final String SERIALIZED_NAME_CONTEXT = "context"; @SerializedName(SERIALIZED_NAME_CONTEXT) @@ -213,7 +213,7 @@ public void setName(NameEnum name) { } - public AntiFraudWebhookEvent createdAt(OffsetDateTime createdAt) { + public AntiFraudWebhookEvent createdAt(String createdAt) { this.createdAt = createdAt; return this; @@ -226,12 +226,12 @@ public AntiFraudWebhookEvent createdAt(OffsetDateTime createdAt) { @javax.annotation.Nullable @ApiModelProperty(example = "2013-07-16T19:23Z", value = "The date and time when this transaction was created in our system.") - public OffsetDateTime getCreatedAt() { + public String getCreatedAt() { return createdAt; } - public void setCreatedAt(OffsetDateTime createdAt) { + public void setCreatedAt(String createdAt) { this.createdAt = createdAt; } diff --git a/src/main/java/com/gr4vy/api/model/AntiFraudWebhookEventContext.java b/src/main/java/com/gr4vy/api/model/AntiFraudWebhookEventContext.java index af4b4fd..4807c99 100644 --- a/src/main/java/com/gr4vy/api/model/AntiFraudWebhookEventContext.java +++ b/src/main/java/com/gr4vy/api/model/AntiFraudWebhookEventContext.java @@ -29,7 +29,7 @@ * Additional context for this event. */ @ApiModel(description = "Additional context for this event.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-08T13:56:38.178267Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-09-06T16:38:13.632050Z[Etc/UTC]") public class AntiFraudWebhookEventContext { public static final String SERIALIZED_NAME_ANTI_FRAUD_SERVICE_ID = "anti_fraud_service_id"; @SerializedName(SERIALIZED_NAME_ANTI_FRAUD_SERVICE_ID) diff --git a/src/main/java/com/gr4vy/api/model/ApiLog.java b/src/main/java/com/gr4vy/api/model/ApiLog.java index f83b534..868618e 100644 --- a/src/main/java/com/gr4vy/api/model/ApiLog.java +++ b/src/main/java/com/gr4vy/api/model/ApiLog.java @@ -26,13 +26,13 @@ import java.io.IOException; import java.math.BigDecimal; import java.util.UUID; -import org.threeten.bp.OffsetDateTime; + /** * A log of an error that happened in the API call. */ @ApiModel(description = "A log of an error that happened in the API call.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-08T13:56:38.178267Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-09-06T16:38:13.632050Z[Etc/UTC]") public class ApiLog { /** * `api-log`. @@ -97,7 +97,7 @@ public TypeEnum read(final JsonReader jsonReader) throws IOException { public static final String SERIALIZED_NAME_REQUEST_RECEIVED_AT = "request_received_at"; @SerializedName(SERIALIZED_NAME_REQUEST_RECEIVED_AT) - private OffsetDateTime requestReceivedAt; + private String requestReceivedAt; public static final String SERIALIZED_NAME_RESPONSE_STATUS_CODE = "response_status_code"; @SerializedName(SERIALIZED_NAME_RESPONSE_STATUS_CODE) @@ -109,7 +109,7 @@ public TypeEnum read(final JsonReader jsonReader) throws IOException { public static final String SERIALIZED_NAME_RESPONSE_SENT_AT = "response_sent_at"; @SerializedName(SERIALIZED_NAME_RESPONSE_SENT_AT) - private OffsetDateTime responseSentAt; + private String responseSentAt; public ApiLog type(TypeEnum type) { @@ -204,7 +204,7 @@ public void setRequestUrl(String requestUrl) { } - public ApiLog requestReceivedAt(OffsetDateTime requestReceivedAt) { + public ApiLog requestReceivedAt(String requestReceivedAt) { this.requestReceivedAt = requestReceivedAt; return this; @@ -217,12 +217,12 @@ public ApiLog requestReceivedAt(OffsetDateTime requestReceivedAt) { @javax.annotation.Nullable @ApiModelProperty(example = "2022-01-01T00:00Z", value = "The date and time that the request was received.") - public OffsetDateTime getRequestReceivedAt() { + public String getRequestReceivedAt() { return requestReceivedAt; } - public void setRequestReceivedAt(OffsetDateTime requestReceivedAt) { + public void setRequestReceivedAt(String requestReceivedAt) { this.requestReceivedAt = requestReceivedAt; } @@ -273,7 +273,7 @@ public void setResponseBody(ApiLogResponseBody responseBody) { } - public ApiLog responseSentAt(OffsetDateTime responseSentAt) { + public ApiLog responseSentAt(String responseSentAt) { this.responseSentAt = responseSentAt; return this; @@ -286,12 +286,12 @@ public ApiLog responseSentAt(OffsetDateTime responseSentAt) { @javax.annotation.Nullable @ApiModelProperty(example = "2022-01-01T00:00:10Z", value = "date-time of when the response was sent.") - public OffsetDateTime getResponseSentAt() { + public String getResponseSentAt() { return responseSentAt; } - public void setResponseSentAt(OffsetDateTime responseSentAt) { + public void setResponseSentAt(String responseSentAt) { this.responseSentAt = responseSentAt; } diff --git a/src/main/java/com/gr4vy/api/model/ApiLogResponseBody.java b/src/main/java/com/gr4vy/api/model/ApiLogResponseBody.java index ca1658d..a653ac4 100644 --- a/src/main/java/com/gr4vy/api/model/ApiLogResponseBody.java +++ b/src/main/java/com/gr4vy/api/model/ApiLogResponseBody.java @@ -30,7 +30,7 @@ * The JSON response body for the log entry. */ @ApiModel(description = "The JSON response body for the log entry.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-08T13:56:38.178267Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-09-06T16:38:13.632050Z[Etc/UTC]") public class ApiLogResponseBody { public static final String SERIALIZED_NAME_CODE = "code"; @SerializedName(SERIALIZED_NAME_CODE) diff --git a/src/main/java/com/gr4vy/api/model/ApiLogResponseBodyDetails.java b/src/main/java/com/gr4vy/api/model/ApiLogResponseBodyDetails.java index e95d786..7e27f7c 100644 --- a/src/main/java/com/gr4vy/api/model/ApiLogResponseBodyDetails.java +++ b/src/main/java/com/gr4vy/api/model/ApiLogResponseBodyDetails.java @@ -28,7 +28,7 @@ * Details of the log entry, stack trace and endpoint. */ @ApiModel(description = "Details of the log entry, stack trace and endpoint.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-08T13:56:38.178267Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-09-06T16:38:13.632050Z[Etc/UTC]") public class ApiLogResponseBodyDetails { public static final String SERIALIZED_NAME_POINTER = "pointer"; @SerializedName(SERIALIZED_NAME_POINTER) diff --git a/src/main/java/com/gr4vy/api/model/ApiLogs.java b/src/main/java/com/gr4vy/api/model/ApiLogs.java index d5ed128..de38763 100644 --- a/src/main/java/com/gr4vy/api/model/ApiLogs.java +++ b/src/main/java/com/gr4vy/api/model/ApiLogs.java @@ -31,7 +31,7 @@ * A list of API log entries. */ @ApiModel(description = "A list of API log entries.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-08T13:56:38.178267Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-09-06T16:38:13.632050Z[Etc/UTC]") public class ApiLogs { public static final String SERIALIZED_NAME_ITEMS = "items"; @SerializedName(SERIALIZED_NAME_ITEMS) diff --git a/src/main/java/com/gr4vy/api/model/ApplePayRequest.java b/src/main/java/com/gr4vy/api/model/ApplePayRequest.java index d521d95..af68d84 100644 --- a/src/main/java/com/gr4vy/api/model/ApplePayRequest.java +++ b/src/main/java/com/gr4vy/api/model/ApplePayRequest.java @@ -28,7 +28,7 @@ * Details for a Apple Pay payment method. */ @ApiModel(description = "Details for a Apple Pay payment method.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-08T13:56:38.178267Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-09-06T16:38:13.632050Z[Etc/UTC]") public class ApplePayRequest { /** * `applepay`. diff --git a/src/main/java/com/gr4vy/api/model/ApplePaySessionRequest.java b/src/main/java/com/gr4vy/api/model/ApplePaySessionRequest.java index 7e3fc07..b96034c 100644 --- a/src/main/java/com/gr4vy/api/model/ApplePaySessionRequest.java +++ b/src/main/java/com/gr4vy/api/model/ApplePaySessionRequest.java @@ -28,7 +28,7 @@ * Initiates a new session with Apple Pay. */ @ApiModel(description = "Initiates a new session with Apple Pay.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-08T13:56:38.178267Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-09-06T16:38:13.632050Z[Etc/UTC]") public class ApplePaySessionRequest { public static final String SERIALIZED_NAME_VALIDATION_URL = "validation_url"; @SerializedName(SERIALIZED_NAME_VALIDATION_URL) diff --git a/src/main/java/com/gr4vy/api/model/AuditLog.java b/src/main/java/com/gr4vy/api/model/AuditLog.java index a0b481f..a46bb54 100644 --- a/src/main/java/com/gr4vy/api/model/AuditLog.java +++ b/src/main/java/com/gr4vy/api/model/AuditLog.java @@ -26,13 +26,13 @@ import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.UUID; -import org.threeten.bp.OffsetDateTime; + /** * A log of a change that occurred in the Gr4vy instance. */ @ApiModel(description = "A log of a change that occurred in the Gr4vy instance.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-08T13:56:38.178267Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-09-06T16:38:13.632050Z[Etc/UTC]") public class AuditLog { /** * `audit-log`. @@ -89,7 +89,7 @@ public TypeEnum read(final JsonReader jsonReader) throws IOException { public static final String SERIALIZED_NAME_TIMESTAMP = "timestamp"; @SerializedName(SERIALIZED_NAME_TIMESTAMP) - private OffsetDateTime timestamp; + private String timestamp; /** * The action that was performed. @@ -203,7 +203,7 @@ public void setId(UUID id) { } - public AuditLog timestamp(OffsetDateTime timestamp) { + public AuditLog timestamp(String timestamp) { this.timestamp = timestamp; return this; @@ -216,12 +216,12 @@ public AuditLog timestamp(OffsetDateTime timestamp) { @javax.annotation.Nullable @ApiModelProperty(example = "2022-01-01T00:00Z", value = "The date and time that the action was performed.") - public OffsetDateTime getTimestamp() { + public String getTimestamp() { return timestamp; } - public void setTimestamp(OffsetDateTime timestamp) { + public void setTimestamp(String timestamp) { this.timestamp = timestamp; } diff --git a/src/main/java/com/gr4vy/api/model/AuditLogResource.java b/src/main/java/com/gr4vy/api/model/AuditLogResource.java index 2b50163..10610d7 100644 --- a/src/main/java/com/gr4vy/api/model/AuditLogResource.java +++ b/src/main/java/com/gr4vy/api/model/AuditLogResource.java @@ -29,7 +29,7 @@ * The resource that was changed. */ @ApiModel(description = "The resource that was changed.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-08T13:56:38.178267Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-09-06T16:38:13.632050Z[Etc/UTC]") public class AuditLogResource { public static final String SERIALIZED_NAME_TYPE = "type"; @SerializedName(SERIALIZED_NAME_TYPE) diff --git a/src/main/java/com/gr4vy/api/model/AuditLogUser.java b/src/main/java/com/gr4vy/api/model/AuditLogUser.java index 7f5149f..d11b1c4 100644 --- a/src/main/java/com/gr4vy/api/model/AuditLogUser.java +++ b/src/main/java/com/gr4vy/api/model/AuditLogUser.java @@ -29,7 +29,7 @@ * The user who performed the action. */ @ApiModel(description = "The user who performed the action.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-08T13:56:38.178267Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-09-06T16:38:13.632050Z[Etc/UTC]") public class AuditLogUser { public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) diff --git a/src/main/java/com/gr4vy/api/model/AuditLogs.java b/src/main/java/com/gr4vy/api/model/AuditLogs.java index bc1ca1e..912526a 100644 --- a/src/main/java/com/gr4vy/api/model/AuditLogs.java +++ b/src/main/java/com/gr4vy/api/model/AuditLogs.java @@ -31,7 +31,7 @@ * A list of audit log entries. */ @ApiModel(description = "A list of audit log entries.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-08T13:56:38.178267Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-09-06T16:38:13.632050Z[Etc/UTC]") public class AuditLogs { public static final String SERIALIZED_NAME_ITEMS = "items"; @SerializedName(SERIALIZED_NAME_ITEMS) diff --git a/src/main/java/com/gr4vy/api/model/ThreeDSecureSuccessTransactionEvent.java b/src/main/java/com/gr4vy/api/model/BINLookupRequest.java similarity index 76% rename from src/main/java/com/gr4vy/api/model/ThreeDSecureSuccessTransactionEvent.java rename to src/main/java/com/gr4vy/api/model/BINLookupRequest.java index 51d748f..f93536d 100644 --- a/src/main/java/com/gr4vy/api/model/ThreeDSecureSuccessTransactionEvent.java +++ b/src/main/java/com/gr4vy/api/model/BINLookupRequest.java @@ -20,19 +20,19 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.gr4vy.api.model.ThreeDSecureSuccessTransactionEventContext; +import com.gr4vy.api.model.BINLookupRequestContext; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.UUID; -import org.threeten.bp.OffsetDateTime; + /** - * Details related to 3DS processing. + * The result and raw data for a card BIN lookup. */ -@ApiModel(description = "Details related to 3DS processing.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-30T05:21:36.133441Z[Etc/UTC]") -public class ThreeDSecureSuccessTransactionEvent { +@ApiModel(description = "The result and raw data for a card BIN lookup.") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-09-06T16:38:13.632050Z[Etc/UTC]") +public class BINLookupRequest { /** * The type of this resource. Is always `transaction-event`. */ @@ -87,11 +87,11 @@ public TypeEnum read(final JsonReader jsonReader) throws IOException { private UUID id; /** - * The name of this resource. Is always `three-d-secure-success`. + * The name of this resource. Is always `bin-lookup-request`. */ @JsonAdapter(NameEnum.Adapter.class) public enum NameEnum { - THREE_D_SECURE_SUCCESS("three-d-secure-success"); + BIN_LOOKUP_REQUEST("bin-lookup-request"); private String value; @@ -137,14 +137,14 @@ public NameEnum read(final JsonReader jsonReader) throws IOException { public static final String SERIALIZED_NAME_CREATED_AT = "created_at"; @SerializedName(SERIALIZED_NAME_CREATED_AT) - private OffsetDateTime createdAt; + private String createdAt; public static final String SERIALIZED_NAME_CONTEXT = "context"; @SerializedName(SERIALIZED_NAME_CONTEXT) - private ThreeDSecureSuccessTransactionEventContext context; + private BINLookupRequestContext context; - public ThreeDSecureSuccessTransactionEvent type(TypeEnum type) { + public BINLookupRequest type(TypeEnum type) { this.type = type; return this; @@ -167,7 +167,7 @@ public void setType(TypeEnum type) { } - public ThreeDSecureSuccessTransactionEvent id(UUID id) { + public BINLookupRequest id(UUID id) { this.id = id; return this; @@ -190,18 +190,18 @@ public void setId(UUID id) { } - public ThreeDSecureSuccessTransactionEvent name(NameEnum name) { + public BINLookupRequest name(NameEnum name) { this.name = name; return this; } /** - * The name of this resource. Is always `three-d-secure-success`. + * The name of this resource. Is always `bin-lookup-request`. * @return name **/ @javax.annotation.Nullable - @ApiModelProperty(example = "three-d-secure-success", value = "The name of this resource. Is always `three-d-secure-success`.") + @ApiModelProperty(example = "bin-lookup-request", value = "The name of this resource. Is always `bin-lookup-request`.") public NameEnum getName() { return name; @@ -213,7 +213,7 @@ public void setName(NameEnum name) { } - public ThreeDSecureSuccessTransactionEvent createdAt(OffsetDateTime createdAt) { + public BINLookupRequest createdAt(String createdAt) { this.createdAt = createdAt; return this; @@ -226,17 +226,17 @@ public ThreeDSecureSuccessTransactionEvent createdAt(OffsetDateTime createdAt) { @javax.annotation.Nullable @ApiModelProperty(example = "2013-07-16T19:23Z", value = "The date and time when this transaction was created in our system.") - public OffsetDateTime getCreatedAt() { + public String getCreatedAt() { return createdAt; } - public void setCreatedAt(OffsetDateTime createdAt) { + public void setCreatedAt(String createdAt) { this.createdAt = createdAt; } - public ThreeDSecureSuccessTransactionEvent context(ThreeDSecureSuccessTransactionEventContext context) { + public BINLookupRequest context(BINLookupRequestContext context) { this.context = context; return this; @@ -249,12 +249,12 @@ public ThreeDSecureSuccessTransactionEvent context(ThreeDSecureSuccessTransactio @javax.annotation.Nullable @ApiModelProperty(value = "") - public ThreeDSecureSuccessTransactionEventContext getContext() { + public BINLookupRequestContext getContext() { return context; } - public void setContext(ThreeDSecureSuccessTransactionEventContext context) { + public void setContext(BINLookupRequestContext context) { this.context = context; } @@ -267,12 +267,12 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - ThreeDSecureSuccessTransactionEvent threeDSecureSuccessTransactionEvent = (ThreeDSecureSuccessTransactionEvent) o; - return Objects.equals(this.type, threeDSecureSuccessTransactionEvent.type) && - Objects.equals(this.id, threeDSecureSuccessTransactionEvent.id) && - Objects.equals(this.name, threeDSecureSuccessTransactionEvent.name) && - Objects.equals(this.createdAt, threeDSecureSuccessTransactionEvent.createdAt) && - Objects.equals(this.context, threeDSecureSuccessTransactionEvent.context); + BINLookupRequest biNLookupRequest = (BINLookupRequest) o; + return Objects.equals(this.type, biNLookupRequest.type) && + Objects.equals(this.id, biNLookupRequest.id) && + Objects.equals(this.name, biNLookupRequest.name) && + Objects.equals(this.createdAt, biNLookupRequest.createdAt) && + Objects.equals(this.context, biNLookupRequest.context); } @Override @@ -283,7 +283,7 @@ public int hashCode() { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class ThreeDSecureSuccessTransactionEvent {\n"); + sb.append("class BINLookupRequest {\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); diff --git a/src/main/java/com/gr4vy/api/model/BINLookupRequestContext.java b/src/main/java/com/gr4vy/api/model/BINLookupRequestContext.java new file mode 100644 index 0000000..149926a --- /dev/null +++ b/src/main/java/com/gr4vy/api/model/BINLookupRequestContext.java @@ -0,0 +1,273 @@ +/* + * Gr4vy API + * Welcome to the Gr4vy API reference documentation. Our API is still very much a work in product and subject to change. + * + * The version of the OpenAPI document: 1.1.0-beta + * Contact: code@gr4vy.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.gr4vy.api.model; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +/** + * BIN lookup request context. + */ +@ApiModel(description = "BIN lookup request context.") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-09-06T16:38:13.632050Z[Etc/UTC]") +public class BINLookupRequestContext { + public static final String SERIALIZED_NAME_RESPONSE = "response"; + @SerializedName(SERIALIZED_NAME_RESPONSE) + private String response; + + public static final String SERIALIZED_NAME_RESPONSE_STATUS_CODE = "response_status_code"; + @SerializedName(SERIALIZED_NAME_RESPONSE_STATUS_CODE) + private Integer responseStatusCode; + + public static final String SERIALIZED_NAME_SUCCESS = "success"; + @SerializedName(SERIALIZED_NAME_SUCCESS) + private Boolean success; + + public static final String SERIALIZED_NAME_BIN = "bin"; + @SerializedName(SERIALIZED_NAME_BIN) + private String bin; + + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + private String type; + + public static final String SERIALIZED_NAME_SCHEME = "scheme"; + @SerializedName(SERIALIZED_NAME_SCHEME) + private String scheme; + + public static final String SERIALIZED_NAME_COUNTRY_CODE = "country_code"; + @SerializedName(SERIALIZED_NAME_COUNTRY_CODE) + private String countryCode; + + + public BINLookupRequestContext response(String response) { + + this.response = response; + return this; + } + + /** + * The response body received from the `url`. + * @return response + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "{}", value = "The response body received from the `url`.") + + public String getResponse() { + return response; + } + + + public void setResponse(String response) { + this.response = response; + } + + + public BINLookupRequestContext responseStatusCode(Integer responseStatusCode) { + + this.responseStatusCode = responseStatusCode; + return this; + } + + /** + * The response status code received from the `url`. + * @return responseStatusCode + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "200", value = "The response status code received from the `url`.") + + public Integer getResponseStatusCode() { + return responseStatusCode; + } + + + public void setResponseStatusCode(Integer responseStatusCode) { + this.responseStatusCode = responseStatusCode; + } + + + public BINLookupRequestContext success(Boolean success) { + + this.success = success; + return this; + } + + /** + * Whether the BIN lookup was successful or not. + * @return success + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "Whether the BIN lookup was successful or not.") + + public Boolean getSuccess() { + return success; + } + + + public void setSuccess(Boolean success) { + this.success = success; + } + + + public BINLookupRequestContext bin(String bin) { + + this.bin = bin; + return this; + } + + /** + * The value used to lookup BIN details. + * @return bin + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "The value used to lookup BIN details.") + + public String getBin() { + return bin; + } + + + public void setBin(String bin) { + this.bin = bin; + } + + + public BINLookupRequestContext type(String type) { + + this.type = type; + return this; + } + + /** + * The type of card, i.e. credit or debit, from the lookup response. + * @return type + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "The type of card, i.e. credit or debit, from the lookup response.") + + public String getType() { + return type; + } + + + public void setType(String type) { + this.type = type; + } + + + public BINLookupRequestContext scheme(String scheme) { + + this.scheme = scheme; + return this; + } + + /** + * The card scheme result from the lookup response. + * @return scheme + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "The card scheme result from the lookup response.") + + public String getScheme() { + return scheme; + } + + + public void setScheme(String scheme) { + this.scheme = scheme; + } + + + public BINLookupRequestContext countryCode(String countryCode) { + + this.countryCode = countryCode; + return this; + } + + /** + * The card country code result from the lookup response. + * @return countryCode + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "The card country code result from the lookup response.") + + public String getCountryCode() { + return countryCode; + } + + + public void setCountryCode(String countryCode) { + this.countryCode = countryCode; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + BINLookupRequestContext biNLookupRequestContext = (BINLookupRequestContext) o; + return Objects.equals(this.response, biNLookupRequestContext.response) && + Objects.equals(this.responseStatusCode, biNLookupRequestContext.responseStatusCode) && + Objects.equals(this.success, biNLookupRequestContext.success) && + Objects.equals(this.bin, biNLookupRequestContext.bin) && + Objects.equals(this.type, biNLookupRequestContext.type) && + Objects.equals(this.scheme, biNLookupRequestContext.scheme) && + Objects.equals(this.countryCode, biNLookupRequestContext.countryCode); + } + + @Override + public int hashCode() { + return Objects.hash(response, responseStatusCode, success, bin, type, scheme, countryCode); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class BINLookupRequestContext {\n"); + sb.append(" response: ").append(toIndentedString(response)).append("\n"); + sb.append(" responseStatusCode: ").append(toIndentedString(responseStatusCode)).append("\n"); + sb.append(" success: ").append(toIndentedString(success)).append("\n"); + sb.append(" bin: ").append(toIndentedString(bin)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" scheme: ").append(toIndentedString(scheme)).append("\n"); + sb.append(" countryCode: ").append(toIndentedString(countryCode)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/com/gr4vy/api/model/BillingDetails.java b/src/main/java/com/gr4vy/api/model/BillingDetails.java index 08c43fa..285e8fa 100644 --- a/src/main/java/com/gr4vy/api/model/BillingDetails.java +++ b/src/main/java/com/gr4vy/api/model/BillingDetails.java @@ -30,7 +30,7 @@ * Billing details associated to a buyer. */ @ApiModel(description = "Billing details associated to a buyer.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-08T13:56:38.178267Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-09-06T16:38:13.632050Z[Etc/UTC]") public class BillingDetails { /** * The type of this resource. Is always `billing-details`. diff --git a/src/main/java/com/gr4vy/api/model/BillingDetailsRequest.java b/src/main/java/com/gr4vy/api/model/BillingDetailsRequest.java index f89712a..5f7e9bd 100644 --- a/src/main/java/com/gr4vy/api/model/BillingDetailsRequest.java +++ b/src/main/java/com/gr4vy/api/model/BillingDetailsRequest.java @@ -30,7 +30,7 @@ * Billing details to use associated to a buyer. */ @ApiModel(description = "Billing details to use associated to a buyer.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-08T13:56:38.178267Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-09-06T16:38:13.632050Z[Etc/UTC]") public class BillingDetailsRequest { public static final String SERIALIZED_NAME_FIRST_NAME = "first_name"; @SerializedName(SERIALIZED_NAME_FIRST_NAME) diff --git a/src/main/java/com/gr4vy/api/model/BillingDetailsUpdateRequest.java b/src/main/java/com/gr4vy/api/model/BillingDetailsUpdateRequest.java index 445e9ef..ee856d8 100644 --- a/src/main/java/com/gr4vy/api/model/BillingDetailsUpdateRequest.java +++ b/src/main/java/com/gr4vy/api/model/BillingDetailsUpdateRequest.java @@ -29,7 +29,7 @@ /** * BillingDetailsUpdateRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-08T13:56:38.178267Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-09-06T16:38:13.632050Z[Etc/UTC]") public class BillingDetailsUpdateRequest { public static final String SERIALIZED_NAME_FIRST_NAME = "first_name"; @SerializedName(SERIALIZED_NAME_FIRST_NAME) diff --git a/src/main/java/com/gr4vy/api/model/BrowserInfo.java b/src/main/java/com/gr4vy/api/model/BrowserInfo.java index 88ba616..9613f38 100644 --- a/src/main/java/com/gr4vy/api/model/BrowserInfo.java +++ b/src/main/java/com/gr4vy/api/model/BrowserInfo.java @@ -28,7 +28,7 @@ /** * BrowserInfo */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-08T13:56:38.178267Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-09-06T16:38:13.632050Z[Etc/UTC]") public class BrowserInfo { public static final String SERIALIZED_NAME_JAVA_ENABLED = "java_enabled"; @SerializedName(SERIALIZED_NAME_JAVA_ENABLED) diff --git a/src/main/java/com/gr4vy/api/model/Buyer.java b/src/main/java/com/gr4vy/api/model/Buyer.java index da5225c..138d2b9 100644 --- a/src/main/java/com/gr4vy/api/model/Buyer.java +++ b/src/main/java/com/gr4vy/api/model/Buyer.java @@ -25,12 +25,12 @@ import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.UUID; -import org.threeten.bp.OffsetDateTime; + /** * Buyer */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-08T13:56:38.178267Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-09-06T16:38:13.632050Z[Etc/UTC]") public class Buyer { /** * The type of this resource. Is always `buyer`. @@ -103,11 +103,11 @@ public TypeEnum read(final JsonReader jsonReader) throws IOException { public static final String SERIALIZED_NAME_CREATED_AT = "created_at"; @SerializedName(SERIALIZED_NAME_CREATED_AT) - private OffsetDateTime createdAt; + private String createdAt; public static final String SERIALIZED_NAME_UPDATED_AT = "updated_at"; @SerializedName(SERIALIZED_NAME_UPDATED_AT) - private OffsetDateTime updatedAt; + private String updatedAt; public Buyer type(TypeEnum type) { @@ -248,7 +248,7 @@ public void setBillingDetails(BillingDetails billingDetails) { } - public Buyer createdAt(OffsetDateTime createdAt) { + public Buyer createdAt(String createdAt) { this.createdAt = createdAt; return this; @@ -261,17 +261,17 @@ public Buyer createdAt(OffsetDateTime createdAt) { @javax.annotation.Nullable @ApiModelProperty(example = "2013-07-16T19:23Z", value = "The date and time when this buyer was created in our system.") - public OffsetDateTime getCreatedAt() { + public String getCreatedAt() { return createdAt; } - public void setCreatedAt(OffsetDateTime createdAt) { + public void setCreatedAt(String createdAt) { this.createdAt = createdAt; } - public Buyer updatedAt(OffsetDateTime updatedAt) { + public Buyer updatedAt(String updatedAt) { this.updatedAt = updatedAt; return this; @@ -284,12 +284,12 @@ public Buyer updatedAt(OffsetDateTime updatedAt) { @javax.annotation.Nullable @ApiModelProperty(example = "2013-07-16T19:23Z", value = "The date and time when this buyer was last updated in our system.") - public OffsetDateTime getUpdatedAt() { + public String getUpdatedAt() { return updatedAt; } - public void setUpdatedAt(OffsetDateTime updatedAt) { + public void setUpdatedAt(String updatedAt) { this.updatedAt = updatedAt; } diff --git a/src/main/java/com/gr4vy/api/model/BuyerRequest.java b/src/main/java/com/gr4vy/api/model/BuyerRequest.java index 1e32255..4dffa0d 100644 --- a/src/main/java/com/gr4vy/api/model/BuyerRequest.java +++ b/src/main/java/com/gr4vy/api/model/BuyerRequest.java @@ -29,7 +29,7 @@ * A request to create a buyer. */ @ApiModel(description = "A request to create a buyer.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-08T13:56:38.178267Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-09-06T16:38:13.632050Z[Etc/UTC]") public class BuyerRequest { public static final String SERIALIZED_NAME_EXTERNAL_IDENTIFIER = "external_identifier"; @SerializedName(SERIALIZED_NAME_EXTERNAL_IDENTIFIER) diff --git a/src/main/java/com/gr4vy/api/model/BuyerSnapshot.java b/src/main/java/com/gr4vy/api/model/BuyerSnapshot.java index 64ce936..81f7419 100644 --- a/src/main/java/com/gr4vy/api/model/BuyerSnapshot.java +++ b/src/main/java/com/gr4vy/api/model/BuyerSnapshot.java @@ -30,7 +30,7 @@ * Snapshot of a buyer, as used when embedded inside other resources. */ @ApiModel(description = "Snapshot of a buyer, as used when embedded inside other resources.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-08T13:56:38.178267Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-09-06T16:38:13.632050Z[Etc/UTC]") public class BuyerSnapshot { /** * The type of this resource. Is always `buyer`. diff --git a/src/main/java/com/gr4vy/api/model/BuyerUpdate.java b/src/main/java/com/gr4vy/api/model/BuyerUpdate.java index e1a9b36..eb6290e 100644 --- a/src/main/java/com/gr4vy/api/model/BuyerUpdate.java +++ b/src/main/java/com/gr4vy/api/model/BuyerUpdate.java @@ -29,7 +29,7 @@ * A request to update a buyer. */ @ApiModel(description = "A request to update a buyer.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-08T13:56:38.178267Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-09-06T16:38:13.632050Z[Etc/UTC]") public class BuyerUpdate { public static final String SERIALIZED_NAME_EXTERNAL_IDENTIFIER = "external_identifier"; @SerializedName(SERIALIZED_NAME_EXTERNAL_IDENTIFIER) diff --git a/src/main/java/com/gr4vy/api/model/Buyers.java b/src/main/java/com/gr4vy/api/model/Buyers.java index 0de3174..9fffbff 100644 --- a/src/main/java/com/gr4vy/api/model/Buyers.java +++ b/src/main/java/com/gr4vy/api/model/Buyers.java @@ -31,7 +31,7 @@ * A list of buyers. */ @ApiModel(description = "A list of buyers.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-08T13:56:38.178267Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-09-06T16:38:13.632050Z[Etc/UTC]") public class Buyers { public static final String SERIALIZED_NAME_ITEMS = "items"; @SerializedName(SERIALIZED_NAME_ITEMS) diff --git a/src/main/java/com/gr4vy/api/model/CardDetails.java b/src/main/java/com/gr4vy/api/model/CardDetails.java index cb85b62..f2a1f00 100644 --- a/src/main/java/com/gr4vy/api/model/CardDetails.java +++ b/src/main/java/com/gr4vy/api/model/CardDetails.java @@ -29,7 +29,7 @@ * Details about a card. */ @ApiModel(description = "Details about a card.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-08T13:56:38.178267Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-09-06T16:38:13.632050Z[Etc/UTC]") public class CardDetails { /** * `card-detail`. diff --git a/src/main/java/com/gr4vy/api/model/CardRequest.java b/src/main/java/com/gr4vy/api/model/CardRequest.java index a64f51e..bfa9f66 100644 --- a/src/main/java/com/gr4vy/api/model/CardRequest.java +++ b/src/main/java/com/gr4vy/api/model/CardRequest.java @@ -29,7 +29,7 @@ * Details to register a new card payment method. */ @ApiModel(description = "Details to register a new card payment method.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-08T13:56:38.178267Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-09-06T16:38:13.632050Z[Etc/UTC]") public class CardRequest { /** * `card`. diff --git a/src/main/java/com/gr4vy/api/model/CardRequiredFields.java b/src/main/java/com/gr4vy/api/model/CardRequiredFields.java deleted file mode 100644 index 5ee6ddb..0000000 --- a/src/main/java/com/gr4vy/api/model/CardRequiredFields.java +++ /dev/null @@ -1,200 +0,0 @@ -/* - * Gr4vy API - * Welcome to the Gr4vy API reference documentation. Our API is still very much a work in product and subject to change. - * - * The version of the OpenAPI document: 1.1.0-beta - * Contact: code@gr4vy.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.gr4vy.api.model; - -import java.util.Objects; -import java.util.Arrays; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import com.gr4vy.api.model.CardRequiredFieldsAddress; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.io.IOException; - -/** - * The fields that are required to process a transaction for this card. - */ -@ApiModel(description = "The fields that are required to process a transaction for this card.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2022-05-30T12:22:53.235500Z[Etc/UTC]") -public class CardRequiredFields { - public static final String SERIALIZED_NAME_FIRST_NAME = "first_name"; - @SerializedName(SERIALIZED_NAME_FIRST_NAME) - private Boolean firstName; - - public static final String SERIALIZED_NAME_LAST_NAME = "last_name"; - @SerializedName(SERIALIZED_NAME_LAST_NAME) - private Boolean lastName; - - public static final String SERIALIZED_NAME_EMAIL_ADDRESS = "email_address"; - @SerializedName(SERIALIZED_NAME_EMAIL_ADDRESS) - private Boolean emailAddress; - - public static final String SERIALIZED_NAME_PHONE_NUMBER = "phone_number"; - @SerializedName(SERIALIZED_NAME_PHONE_NUMBER) - private Boolean phoneNumber; - - public static final String SERIALIZED_NAME_ADDRESS = "address"; - @SerializedName(SERIALIZED_NAME_ADDRESS) - private CardRequiredFieldsAddress address; - - public static final String SERIALIZED_NAME_TAX_ID = "tax_id"; - @SerializedName(SERIALIZED_NAME_TAX_ID) - private Boolean taxId; - - - /** - * The first (given) name of the buyer. - * @return firstName - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "The first (given) name of the buyer.") - - public Boolean getFirstName() { - return firstName; - } - - - - - /** - * The last (family) name of the buyer. - * @return lastName - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "The last (family) name of the buyer.") - - public Boolean getLastName() { - return lastName; - } - - - - - /** - * The email address of the buyer. - * @return emailAddress - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "The email address of the buyer.") - - public Boolean getEmailAddress() { - return emailAddress; - } - - - - - /** - * The phone number of the buyer. - * @return phoneNumber - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "The phone number of the buyer.") - - public Boolean getPhoneNumber() { - return phoneNumber; - } - - - - - public CardRequiredFields address(CardRequiredFieldsAddress address) { - - this.address = address; - return this; - } - - /** - * Get address - * @return address - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - - public CardRequiredFieldsAddress getAddress() { - return address; - } - - - public void setAddress(CardRequiredFieldsAddress address) { - this.address = address; - } - - - /** - * The tax id code associated with the billing details. - * @return taxId - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "The tax id code associated with the billing details.") - - public Boolean getTaxId() { - return taxId; - } - - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CardRequiredFields cardRequiredFields = (CardRequiredFields) o; - return Objects.equals(this.firstName, cardRequiredFields.firstName) && - Objects.equals(this.lastName, cardRequiredFields.lastName) && - Objects.equals(this.emailAddress, cardRequiredFields.emailAddress) && - Objects.equals(this.phoneNumber, cardRequiredFields.phoneNumber) && - Objects.equals(this.address, cardRequiredFields.address) && - Objects.equals(this.taxId, cardRequiredFields.taxId); - } - - @Override - public int hashCode() { - return Objects.hash(firstName, lastName, emailAddress, phoneNumber, address, taxId); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CardRequiredFields {\n"); - sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n"); - sb.append(" lastName: ").append(toIndentedString(lastName)).append("\n"); - sb.append(" emailAddress: ").append(toIndentedString(emailAddress)).append("\n"); - sb.append(" phoneNumber: ").append(toIndentedString(phoneNumber)).append("\n"); - sb.append(" address: ").append(toIndentedString(address)).append("\n"); - sb.append(" taxId: ").append(toIndentedString(taxId)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/src/main/java/com/gr4vy/api/model/CardRequiredFieldsAddress.java b/src/main/java/com/gr4vy/api/model/CardRequiredFieldsAddress.java deleted file mode 100644 index b163e37..0000000 --- a/src/main/java/com/gr4vy/api/model/CardRequiredFieldsAddress.java +++ /dev/null @@ -1,190 +0,0 @@ -/* - * Gr4vy API - * Welcome to the Gr4vy API reference documentation. Our API is still very much a work in product and subject to change. - * - * The version of the OpenAPI document: 1.1.0-beta - * Contact: code@gr4vy.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.gr4vy.api.model; - -import java.util.Objects; -import java.util.Arrays; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.io.IOException; - -/** - * The billing address of the buyer. - */ -@ApiModel(description = "The billing address of the buyer.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2022-05-30T12:22:53.235500Z[Etc/UTC]") -public class CardRequiredFieldsAddress { - public static final String SERIALIZED_NAME_CITY = "city"; - @SerializedName(SERIALIZED_NAME_CITY) - private Boolean city; - - public static final String SERIALIZED_NAME_COUNTRY = "country"; - @SerializedName(SERIALIZED_NAME_COUNTRY) - private Boolean country; - - public static final String SERIALIZED_NAME_POSTAL_CODE = "postal_code"; - @SerializedName(SERIALIZED_NAME_POSTAL_CODE) - private Boolean postalCode; - - public static final String SERIALIZED_NAME_STATE = "state"; - @SerializedName(SERIALIZED_NAME_STATE) - private Boolean state; - - public static final String SERIALIZED_NAME_HOUSE_NUMBER_OR_NAME = "house_number_or_name"; - @SerializedName(SERIALIZED_NAME_HOUSE_NUMBER_OR_NAME) - private Boolean houseNumberOrName; - - public static final String SERIALIZED_NAME_LINE1 = "line1"; - @SerializedName(SERIALIZED_NAME_LINE1) - private Boolean line1; - - - /** - * The city for the billing address. - * @return city - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "The city for the billing address.") - - public Boolean getCity() { - return city; - } - - - - - /** - * The country for the billing address. - * @return country - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "The country for the billing address.") - - public Boolean getCountry() { - return country; - } - - - - - /** - * The postal code or zip code for the billing address. - * @return postalCode - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "The postal code or zip code for the billing address.") - - public Boolean getPostalCode() { - return postalCode; - } - - - - - /** - * The state, county, or province for the billing address. - * @return state - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "The state, county, or province for the billing address.") - - public Boolean getState() { - return state; - } - - - - - /** - * The house number or name for the billing address. Not all payment services use this field but some do. - * @return houseNumberOrName - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "The house number or name for the billing address. Not all payment services use this field but some do.") - - public Boolean getHouseNumberOrName() { - return houseNumberOrName; - } - - - - - /** - * The first line of the billing address. - * @return line1 - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "The first line of the billing address.") - - public Boolean getLine1() { - return line1; - } - - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CardRequiredFieldsAddress cardRequiredFieldsAddress = (CardRequiredFieldsAddress) o; - return Objects.equals(this.city, cardRequiredFieldsAddress.city) && - Objects.equals(this.country, cardRequiredFieldsAddress.country) && - Objects.equals(this.postalCode, cardRequiredFieldsAddress.postalCode) && - Objects.equals(this.state, cardRequiredFieldsAddress.state) && - Objects.equals(this.houseNumberOrName, cardRequiredFieldsAddress.houseNumberOrName) && - Objects.equals(this.line1, cardRequiredFieldsAddress.line1); - } - - @Override - public int hashCode() { - return Objects.hash(city, country, postalCode, state, houseNumberOrName, line1); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CardRequiredFieldsAddress {\n"); - sb.append(" city: ").append(toIndentedString(city)).append("\n"); - sb.append(" country: ").append(toIndentedString(country)).append("\n"); - sb.append(" postalCode: ").append(toIndentedString(postalCode)).append("\n"); - sb.append(" state: ").append(toIndentedString(state)).append("\n"); - sb.append(" houseNumberOrName: ").append(toIndentedString(houseNumberOrName)).append("\n"); - sb.append(" line1: ").append(toIndentedString(line1)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/src/main/java/com/gr4vy/api/model/CardSchemeDefinition.java b/src/main/java/com/gr4vy/api/model/CardSchemeDefinition.java index d6e7ed8..a8985f5 100644 --- a/src/main/java/com/gr4vy/api/model/CardSchemeDefinition.java +++ b/src/main/java/com/gr4vy/api/model/CardSchemeDefinition.java @@ -28,7 +28,7 @@ * Definitions of a card scheme including icon, label, etc. */ @ApiModel(description = "Definitions of a card scheme including icon, label, etc.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-08T13:56:38.178267Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-09-06T16:38:13.632050Z[Etc/UTC]") public class CardSchemeDefinition { /** * `card-scheme-definition`. diff --git a/src/main/java/com/gr4vy/api/model/CardSchemeDefinitions.java b/src/main/java/com/gr4vy/api/model/CardSchemeDefinitions.java index 0b4d4da..b09fe8a 100644 --- a/src/main/java/com/gr4vy/api/model/CardSchemeDefinitions.java +++ b/src/main/java/com/gr4vy/api/model/CardSchemeDefinitions.java @@ -31,7 +31,7 @@ * A list of available card scheme definitions. */ @ApiModel(description = "A list of available card scheme definitions.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-08T13:56:38.178267Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-09-06T16:38:13.632050Z[Etc/UTC]") public class CardSchemeDefinitions { public static final String SERIALIZED_NAME_ITEMS = "items"; @SerializedName(SERIALIZED_NAME_ITEMS) diff --git a/src/main/java/com/gr4vy/api/model/CartItem.java b/src/main/java/com/gr4vy/api/model/CartItem.java index 6e0a2ee..a80e677 100644 --- a/src/main/java/com/gr4vy/api/model/CartItem.java +++ b/src/main/java/com/gr4vy/api/model/CartItem.java @@ -30,7 +30,7 @@ * A cart item that represents a single cart line item for a transaction. Note that some optional properties are required for certain payment service providers. If no value is set for these properties, we will use their default value. If the total due to be paid for the item is required by the payment service provider, generally referred to as the \"total amount\", the formula below will usually be used to calculate this amount: `(unit_amount * quantity) - discount_amount + tax_amount` It's highly recommended that the total amount to pay for all items should match the transaction's amount to reduce the risk of the transaction being declined by the payment service provider. */ @ApiModel(description = "A cart item that represents a single cart line item for a transaction. Note that some optional properties are required for certain payment service providers. If no value is set for these properties, we will use their default value. If the total due to be paid for the item is required by the payment service provider, generally referred to as the \"total amount\", the formula below will usually be used to calculate this amount: `(unit_amount * quantity) - discount_amount + tax_amount` It's highly recommended that the total amount to pay for all items should match the transaction's amount to reduce the risk of the transaction being declined by the payment service provider.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-08T13:56:38.178267Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-09-06T16:38:13.632050Z[Etc/UTC]") public class CartItem { public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) diff --git a/src/main/java/com/gr4vy/api/model/CheckoutSession.java b/src/main/java/com/gr4vy/api/model/CheckoutSession.java index c4df783..c35e531 100644 --- a/src/main/java/com/gr4vy/api/model/CheckoutSession.java +++ b/src/main/java/com/gr4vy/api/model/CheckoutSession.java @@ -29,13 +29,13 @@ import java.util.List; import java.util.Map; import java.util.UUID; -import org.threeten.bp.OffsetDateTime; + /** * A short-lived checkout session. */ @ApiModel(description = "A short-lived checkout session.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-08T13:56:38.178267Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-09-06T16:38:13.632050Z[Etc/UTC]") public class CheckoutSession { /** * `checkout-session`. @@ -92,7 +92,7 @@ public TypeEnum read(final JsonReader jsonReader) throws IOException { public static final String SERIALIZED_NAME_EXPIRES_AT = "expires_at"; @SerializedName(SERIALIZED_NAME_EXPIRES_AT) - private OffsetDateTime expiresAt; + private String expiresAt; public static final String SERIALIZED_NAME_CART_ITEMS = "cart_items"; @SerializedName(SERIALIZED_NAME_CART_ITEMS) @@ -149,7 +149,7 @@ public void setId(UUID id) { } - public CheckoutSession expiresAt(OffsetDateTime expiresAt) { + public CheckoutSession expiresAt(String expiresAt) { this.expiresAt = expiresAt; return this; @@ -162,12 +162,12 @@ public CheckoutSession expiresAt(OffsetDateTime expiresAt) { @javax.annotation.Nullable @ApiModelProperty(example = "2022-01-01T00:00Z", value = "The date and time when the Checkout Session will expire. By default this will be set to 1 hour from the date of creation.") - public OffsetDateTime getExpiresAt() { + public String getExpiresAt() { return expiresAt; } - public void setExpiresAt(OffsetDateTime expiresAt) { + public void setExpiresAt(String expiresAt) { this.expiresAt = expiresAt; } diff --git a/src/main/java/com/gr4vy/api/model/CheckoutSessionCreateRequest.java b/src/main/java/com/gr4vy/api/model/CheckoutSessionCreateRequest.java index 68d2b3c..6dc4fef 100644 --- a/src/main/java/com/gr4vy/api/model/CheckoutSessionCreateRequest.java +++ b/src/main/java/com/gr4vy/api/model/CheckoutSessionCreateRequest.java @@ -33,7 +33,7 @@ * A request to create a checkout session. */ @ApiModel(description = "A request to create a checkout session.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-08T13:56:38.178267Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-09-06T16:38:13.632050Z[Etc/UTC]") public class CheckoutSessionCreateRequest { public static final String SERIALIZED_NAME_CART_ITEMS = "cart_items"; @SerializedName(SERIALIZED_NAME_CART_ITEMS) diff --git a/src/main/java/com/gr4vy/api/model/CheckoutSessionFieldsPaymentMethod.java b/src/main/java/com/gr4vy/api/model/CheckoutSessionFieldsCardPaymentMethod.java similarity index 84% rename from src/main/java/com/gr4vy/api/model/CheckoutSessionFieldsPaymentMethod.java rename to src/main/java/com/gr4vy/api/model/CheckoutSessionFieldsCardPaymentMethod.java index 69fd38c..b30810d 100644 --- a/src/main/java/com/gr4vy/api/model/CheckoutSessionFieldsPaymentMethod.java +++ b/src/main/java/com/gr4vy/api/model/CheckoutSessionFieldsCardPaymentMethod.java @@ -25,11 +25,11 @@ import java.io.IOException; /** - * Details to store a new payment method. + * Details to store a new card payment method. */ -@ApiModel(description = "Details to store a new payment method.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-08T13:56:38.178267Z[Etc/UTC]") -public class CheckoutSessionFieldsPaymentMethod { +@ApiModel(description = "Details to store a new card payment method.") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-09-06T16:31:27.877088Z[Etc/UTC]") +public class CheckoutSessionFieldsCardPaymentMethod { /** * `card`. */ @@ -92,7 +92,7 @@ public MethodEnum read(final JsonReader jsonReader) throws IOException { private String securityCode; - public CheckoutSessionFieldsPaymentMethod method(MethodEnum method) { + public CheckoutSessionFieldsCardPaymentMethod method(MethodEnum method) { this.method = method; return this; @@ -114,7 +114,7 @@ public void setMethod(MethodEnum method) { } - public CheckoutSessionFieldsPaymentMethod number(String number) { + public CheckoutSessionFieldsCardPaymentMethod number(String number) { this.number = number; return this; @@ -137,7 +137,7 @@ public void setNumber(String number) { } - public CheckoutSessionFieldsPaymentMethod expirationDate(String expirationDate) { + public CheckoutSessionFieldsCardPaymentMethod expirationDate(String expirationDate) { this.expirationDate = expirationDate; return this; @@ -160,7 +160,7 @@ public void setExpirationDate(String expirationDate) { } - public CheckoutSessionFieldsPaymentMethod securityCode(String securityCode) { + public CheckoutSessionFieldsCardPaymentMethod securityCode(String securityCode) { this.securityCode = securityCode; return this; @@ -191,11 +191,11 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - CheckoutSessionFieldsPaymentMethod checkoutSessionFieldsPaymentMethod = (CheckoutSessionFieldsPaymentMethod) o; - return Objects.equals(this.method, checkoutSessionFieldsPaymentMethod.method) && - Objects.equals(this.number, checkoutSessionFieldsPaymentMethod.number) && - Objects.equals(this.expirationDate, checkoutSessionFieldsPaymentMethod.expirationDate) && - Objects.equals(this.securityCode, checkoutSessionFieldsPaymentMethod.securityCode); + CheckoutSessionFieldsCardPaymentMethod checkoutSessionFieldsCardPaymentMethod = (CheckoutSessionFieldsCardPaymentMethod) o; + return Objects.equals(this.method, checkoutSessionFieldsCardPaymentMethod.method) && + Objects.equals(this.number, checkoutSessionFieldsCardPaymentMethod.number) && + Objects.equals(this.expirationDate, checkoutSessionFieldsCardPaymentMethod.expirationDate) && + Objects.equals(this.securityCode, checkoutSessionFieldsCardPaymentMethod.securityCode); } @Override @@ -206,7 +206,7 @@ public int hashCode() { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class CheckoutSessionFieldsPaymentMethod {\n"); + sb.append("class CheckoutSessionFieldsCardPaymentMethod {\n"); sb.append(" method: ").append(toIndentedString(method)).append("\n"); sb.append(" number: ").append(toIndentedString(number)).append("\n"); sb.append(" expirationDate: ").append(toIndentedString(expirationDate)).append("\n"); diff --git a/src/main/java/com/gr4vy/api/model/CheckoutSessionFieldsClickToPayPaymentMethod.java b/src/main/java/com/gr4vy/api/model/CheckoutSessionFieldsClickToPayPaymentMethod.java new file mode 100644 index 0000000..e401eca --- /dev/null +++ b/src/main/java/com/gr4vy/api/model/CheckoutSessionFieldsClickToPayPaymentMethod.java @@ -0,0 +1,199 @@ +/* + * Gr4vy API + * Welcome to the Gr4vy API reference documentation. Our API is still very much a work in product and subject to change. + * + * The version of the OpenAPI document: 1.1.0-beta + * Contact: code@gr4vy.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.gr4vy.api.model; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +/** + * Details to store a new Click to Pay payment method. + */ +@ApiModel(description = "Details to store a new Click to Pay payment method.") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-09-06T16:31:27.877088Z[Etc/UTC]") +public class CheckoutSessionFieldsClickToPayPaymentMethod { + /** + * `click_to_pay`. + */ + @JsonAdapter(MethodEnum.Adapter.class) + public enum MethodEnum { + CLICK_TO_PAY("click_to_pay"); + + private String value; + + MethodEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static MethodEnum fromValue(String value) { + for (MethodEnum b : MethodEnum.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 MethodEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public MethodEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return MethodEnum.fromValue(value); + } + } + } + + public static final String SERIALIZED_NAME_METHOD = "method"; + @SerializedName(SERIALIZED_NAME_METHOD) + private MethodEnum method; + + public static final String SERIALIZED_NAME_MERCHANT_TRANSACTION_ID = "merchant_transaction_id"; + @SerializedName(SERIALIZED_NAME_MERCHANT_TRANSACTION_ID) + private String merchantTransactionId; + + public static final String SERIALIZED_NAME_SRC_CORRELATION_ID = "src_correlation_id"; + @SerializedName(SERIALIZED_NAME_SRC_CORRELATION_ID) + private String srcCorrelationId; + + + public CheckoutSessionFieldsClickToPayPaymentMethod method(MethodEnum method) { + + this.method = method; + return this; + } + + /** + * `click_to_pay`. + * @return method + **/ + @ApiModelProperty(example = "click_to_pay", required = true, value = "`click_to_pay`.") + + public MethodEnum getMethod() { + return method; + } + + + public void setMethod(MethodEnum method) { + this.method = method; + } + + + public CheckoutSessionFieldsClickToPayPaymentMethod merchantTransactionId(String merchantTransactionId) { + + this.merchantTransactionId = merchantTransactionId; + return this; + } + + /** + * Merchant checkout transaction identifier which is returned in the checkout response from Click to Pay JavaScript methods. + * @return merchantTransactionId + **/ + @ApiModelProperty(example = "1a3f0b9.3f334ba9.v094c1c526e0e39c10491a6a947249b5a9200ed6", required = true, value = "Merchant checkout transaction identifier which is returned in the checkout response from Click to Pay JavaScript methods. ") + + public String getMerchantTransactionId() { + return merchantTransactionId; + } + + + public void setMerchantTransactionId(String merchantTransactionId) { + this.merchantTransactionId = merchantTransactionId; + } + + + public CheckoutSessionFieldsClickToPayPaymentMethod srcCorrelationId(String srcCorrelationId) { + + this.srcCorrelationId = srcCorrelationId; + return this; + } + + /** + * Unique identifier generated by an SRC System. + * @return srcCorrelationId + **/ + @ApiModelProperty(example = "34f4a24c.977cf2c2-3cv1-489e-b024-188a11a07491", required = true, value = "Unique identifier generated by an SRC System.") + + public String getSrcCorrelationId() { + return srcCorrelationId; + } + + + public void setSrcCorrelationId(String srcCorrelationId) { + this.srcCorrelationId = srcCorrelationId; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CheckoutSessionFieldsClickToPayPaymentMethod checkoutSessionFieldsClickToPayPaymentMethod = (CheckoutSessionFieldsClickToPayPaymentMethod) o; + return Objects.equals(this.method, checkoutSessionFieldsClickToPayPaymentMethod.method) && + Objects.equals(this.merchantTransactionId, checkoutSessionFieldsClickToPayPaymentMethod.merchantTransactionId) && + Objects.equals(this.srcCorrelationId, checkoutSessionFieldsClickToPayPaymentMethod.srcCorrelationId); + } + + @Override + public int hashCode() { + return Objects.hash(method, merchantTransactionId, srcCorrelationId); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CheckoutSessionFieldsClickToPayPaymentMethod {\n"); + sb.append(" method: ").append(toIndentedString(method)).append("\n"); + sb.append(" merchantTransactionId: ").append(toIndentedString(merchantTransactionId)).append("\n"); + sb.append(" srcCorrelationId: ").append(toIndentedString(srcCorrelationId)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/com/gr4vy/api/model/CheckoutSessionRequest.java b/src/main/java/com/gr4vy/api/model/CheckoutSessionRequest.java index f943729..c788504 100644 --- a/src/main/java/com/gr4vy/api/model/CheckoutSessionRequest.java +++ b/src/main/java/com/gr4vy/api/model/CheckoutSessionRequest.java @@ -29,7 +29,7 @@ * Details to register a new Checkout Session payment method. */ @ApiModel(description = "Details to register a new Checkout Session payment method.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-08T13:56:38.178267Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-09-06T16:38:13.632050Z[Etc/UTC]") public class CheckoutSessionRequest { /** * `checkout-session`. diff --git a/src/main/java/com/gr4vy/api/model/CheckoutSessionSecureFieldsUpdate.java b/src/main/java/com/gr4vy/api/model/CheckoutSessionSecureFieldsUpdate.java deleted file mode 100644 index 0f9cd4f..0000000 --- a/src/main/java/com/gr4vy/api/model/CheckoutSessionSecureFieldsUpdate.java +++ /dev/null @@ -1,100 +0,0 @@ -/* - * Gr4vy API - * Welcome to the Gr4vy API reference documentation. Our API is still very much a work in product and subject to change. - * - * The version of the OpenAPI document: 1.1.0-beta - * Contact: code@gr4vy.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.gr4vy.api.model; - -import java.util.Objects; -import java.util.Arrays; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import com.gr4vy.api.model.CheckoutSessionFieldsPaymentMethod; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.io.IOException; - -/** - * A request to update the secure fields of a checkout session. - */ -@ApiModel(description = "A request to update the secure fields of a checkout session.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-08T13:56:38.178267Z[Etc/UTC]") -public class CheckoutSessionSecureFieldsUpdate { - public static final String SERIALIZED_NAME_PAYMENT_METHOD = "payment_method"; - @SerializedName(SERIALIZED_NAME_PAYMENT_METHOD) - private CheckoutSessionFieldsPaymentMethod paymentMethod; - - - public CheckoutSessionSecureFieldsUpdate paymentMethod(CheckoutSessionFieldsPaymentMethod paymentMethod) { - - this.paymentMethod = paymentMethod; - return this; - } - - /** - * Get paymentMethod - * @return paymentMethod - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - - public CheckoutSessionFieldsPaymentMethod getPaymentMethod() { - return paymentMethod; - } - - - public void setPaymentMethod(CheckoutSessionFieldsPaymentMethod paymentMethod) { - this.paymentMethod = paymentMethod; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CheckoutSessionSecureFieldsUpdate checkoutSessionSecureFieldsUpdate = (CheckoutSessionSecureFieldsUpdate) o; - return Objects.equals(this.paymentMethod, checkoutSessionSecureFieldsUpdate.paymentMethod); - } - - @Override - public int hashCode() { - return Objects.hash(paymentMethod); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CheckoutSessionSecureFieldsUpdate {\n"); - sb.append(" paymentMethod: ").append(toIndentedString(paymentMethod)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/src/main/java/com/gr4vy/api/model/CheckoutSessionUpdateRequest.java b/src/main/java/com/gr4vy/api/model/CheckoutSessionUpdateRequest.java index 7d66abe..0c1d77f 100644 --- a/src/main/java/com/gr4vy/api/model/CheckoutSessionUpdateRequest.java +++ b/src/main/java/com/gr4vy/api/model/CheckoutSessionUpdateRequest.java @@ -33,7 +33,7 @@ * A request to update a checkout session. */ @ApiModel(description = "A request to update a checkout session.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-08T13:56:38.178267Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-09-06T16:38:13.632050Z[Etc/UTC]") public class CheckoutSessionUpdateRequest { public static final String SERIALIZED_NAME_CART_ITEMS = "cart_items"; @SerializedName(SERIALIZED_NAME_CART_ITEMS) diff --git a/src/main/java/com/gr4vy/api/model/Connection.java b/src/main/java/com/gr4vy/api/model/Connection.java index 016449b..21a2681 100644 --- a/src/main/java/com/gr4vy/api/model/Connection.java +++ b/src/main/java/com/gr4vy/api/model/Connection.java @@ -29,7 +29,7 @@ * A configured connection. */ @ApiModel(description = "A configured connection.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-08T13:56:38.178267Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-09-06T16:38:13.632050Z[Etc/UTC]") public class Connection { public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) diff --git a/src/main/java/com/gr4vy/api/model/ConnectionDefinition.java b/src/main/java/com/gr4vy/api/model/ConnectionDefinition.java index e7e2411..085522d 100644 --- a/src/main/java/com/gr4vy/api/model/ConnectionDefinition.java +++ b/src/main/java/com/gr4vy/api/model/ConnectionDefinition.java @@ -29,7 +29,7 @@ * A connection that can be configured. */ @ApiModel(description = "A connection that can be configured.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-08T13:56:38.178267Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-09-06T16:38:13.632050Z[Etc/UTC]") public class ConnectionDefinition { public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) diff --git a/src/main/java/com/gr4vy/api/model/ConnectionDefinitions.java b/src/main/java/com/gr4vy/api/model/ConnectionDefinitions.java index 004afa7..e94849f 100644 --- a/src/main/java/com/gr4vy/api/model/ConnectionDefinitions.java +++ b/src/main/java/com/gr4vy/api/model/ConnectionDefinitions.java @@ -31,7 +31,7 @@ * A list of available connection definitions. */ @ApiModel(description = "A list of available connection definitions.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-08T13:56:38.178267Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-09-06T16:38:13.632050Z[Etc/UTC]") public class ConnectionDefinitions { public static final String SERIALIZED_NAME_ITEMS = "items"; @SerializedName(SERIALIZED_NAME_ITEMS) diff --git a/src/main/java/com/gr4vy/api/model/ConnectionOptions.java b/src/main/java/com/gr4vy/api/model/ConnectionOptions.java index 02f02bd..52ff840 100644 --- a/src/main/java/com/gr4vy/api/model/ConnectionOptions.java +++ b/src/main/java/com/gr4vy/api/model/ConnectionOptions.java @@ -23,6 +23,7 @@ import com.gr4vy.api.model.ConnectionOptionsAdyenCard; import com.gr4vy.api.model.ConnectionOptionsCybersourceAntiFraud; import com.gr4vy.api.model.ConnectionOptionsForterAntiFraud; +import com.gr4vy.api.model.ConnectionOptionsPaypalPaypal; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.io.IOException; @@ -30,7 +31,7 @@ /** * ConnectionOptions */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-08T13:56:38.178267Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-09-06T16:38:13.632050Z[Etc/UTC]") public class ConnectionOptions { public static final String SERIALIZED_NAME_CYBERSOURCE_ANTI_FRAUD = "cybersource-anti-fraud"; @SerializedName(SERIALIZED_NAME_CYBERSOURCE_ANTI_FRAUD) @@ -44,6 +45,14 @@ public class ConnectionOptions { @SerializedName(SERIALIZED_NAME_ADYEN_CARD) private ConnectionOptionsAdyenCard adyenCard; + public static final String SERIALIZED_NAME_PAYPAL_PAYPAL = "paypal-paypal"; + @SerializedName(SERIALIZED_NAME_PAYPAL_PAYPAL) + private ConnectionOptionsPaypalPaypal paypalPaypal; + + public static final String SERIALIZED_NAME_PAYPAL_PAYPALPAYLATER = "paypal-paypalpaylater"; + @SerializedName(SERIALIZED_NAME_PAYPAL_PAYPALPAYLATER) + private ConnectionOptionsPaypalPaypal paypalPaypalpaylater; + public ConnectionOptions cybersourceAntiFraud(ConnectionOptionsCybersourceAntiFraud cybersourceAntiFraud) { @@ -114,6 +123,52 @@ public void setAdyenCard(ConnectionOptionsAdyenCard adyenCard) { } + public ConnectionOptions paypalPaypal(ConnectionOptionsPaypalPaypal paypalPaypal) { + + this.paypalPaypal = paypalPaypal; + return this; + } + + /** + * Get paypalPaypal + * @return paypalPaypal + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + + public ConnectionOptionsPaypalPaypal getPaypalPaypal() { + return paypalPaypal; + } + + + public void setPaypalPaypal(ConnectionOptionsPaypalPaypal paypalPaypal) { + this.paypalPaypal = paypalPaypal; + } + + + public ConnectionOptions paypalPaypalpaylater(ConnectionOptionsPaypalPaypal paypalPaypalpaylater) { + + this.paypalPaypalpaylater = paypalPaypalpaylater; + return this; + } + + /** + * Get paypalPaypalpaylater + * @return paypalPaypalpaylater + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + + public ConnectionOptionsPaypalPaypal getPaypalPaypalpaylater() { + return paypalPaypalpaylater; + } + + + public void setPaypalPaypalpaylater(ConnectionOptionsPaypalPaypal paypalPaypalpaylater) { + this.paypalPaypalpaylater = paypalPaypalpaylater; + } + + @Override public boolean equals(Object o) { if (this == o) { @@ -125,12 +180,14 @@ public boolean equals(Object o) { ConnectionOptions connectionOptions = (ConnectionOptions) o; return Objects.equals(this.cybersourceAntiFraud, connectionOptions.cybersourceAntiFraud) && Objects.equals(this.forterAntiFraud, connectionOptions.forterAntiFraud) && - Objects.equals(this.adyenCard, connectionOptions.adyenCard); + Objects.equals(this.adyenCard, connectionOptions.adyenCard) && + Objects.equals(this.paypalPaypal, connectionOptions.paypalPaypal) && + Objects.equals(this.paypalPaypalpaylater, connectionOptions.paypalPaypalpaylater); } @Override public int hashCode() { - return Objects.hash(cybersourceAntiFraud, forterAntiFraud, adyenCard); + return Objects.hash(cybersourceAntiFraud, forterAntiFraud, adyenCard, paypalPaypal, paypalPaypalpaylater); } @Override @@ -140,6 +197,8 @@ public String toString() { sb.append(" cybersourceAntiFraud: ").append(toIndentedString(cybersourceAntiFraud)).append("\n"); sb.append(" forterAntiFraud: ").append(toIndentedString(forterAntiFraud)).append("\n"); sb.append(" adyenCard: ").append(toIndentedString(adyenCard)).append("\n"); + sb.append(" paypalPaypal: ").append(toIndentedString(paypalPaypal)).append("\n"); + sb.append(" paypalPaypalpaylater: ").append(toIndentedString(paypalPaypalpaylater)).append("\n"); sb.append("}"); return sb.toString(); } diff --git a/src/main/java/com/gr4vy/api/model/ConnectionOptionsAdyenCard.java b/src/main/java/com/gr4vy/api/model/ConnectionOptionsAdyenCard.java index fef7b23..388e501 100644 --- a/src/main/java/com/gr4vy/api/model/ConnectionOptionsAdyenCard.java +++ b/src/main/java/com/gr4vy/api/model/ConnectionOptionsAdyenCard.java @@ -31,7 +31,7 @@ * Additional options to be passed through to Adyen when processing card transactions. */ @ApiModel(description = "Additional options to be passed through to Adyen when processing card transactions.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-08T13:56:38.178267Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-09-06T16:38:13.632050Z[Etc/UTC]") public class ConnectionOptionsAdyenCard { public static final String SERIALIZED_NAME_ADDITIONAL_DATA = "additionalData"; @SerializedName(SERIALIZED_NAME_ADDITIONAL_DATA) diff --git a/src/main/java/com/gr4vy/api/model/ConnectionOptionsCybersourceAntiFraud.java b/src/main/java/com/gr4vy/api/model/ConnectionOptionsCybersourceAntiFraud.java index 6871295..6f0c200 100644 --- a/src/main/java/com/gr4vy/api/model/ConnectionOptionsCybersourceAntiFraud.java +++ b/src/main/java/com/gr4vy/api/model/ConnectionOptionsCybersourceAntiFraud.java @@ -31,7 +31,7 @@ * Additional options for Cybersource Decision Manager (anti-fraud). */ @ApiModel(description = "Additional options for Cybersource Decision Manager (anti-fraud).") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-08T13:56:38.178267Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-09-06T16:38:13.632050Z[Etc/UTC]") public class ConnectionOptionsCybersourceAntiFraud { public static final String SERIALIZED_NAME_MERCHANT_DEFINED_DATA = "merchant_defined_data"; @SerializedName(SERIALIZED_NAME_MERCHANT_DEFINED_DATA) diff --git a/src/main/java/com/gr4vy/api/model/ConnectionOptionsForterAntiFraud.java b/src/main/java/com/gr4vy/api/model/ConnectionOptionsForterAntiFraud.java index 8ffcec2..407d442 100644 --- a/src/main/java/com/gr4vy/api/model/ConnectionOptionsForterAntiFraud.java +++ b/src/main/java/com/gr4vy/api/model/ConnectionOptionsForterAntiFraud.java @@ -28,7 +28,7 @@ * Additional options for Forter (anti-fraud). */ @ApiModel(description = "Additional options for Forter (anti-fraud).") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-08T13:56:38.178267Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-09-06T16:38:13.632050Z[Etc/UTC]") public class ConnectionOptionsForterAntiFraud { public static final String SERIALIZED_NAME_DELIVERY_TYPE = "delivery_type"; @SerializedName(SERIALIZED_NAME_DELIVERY_TYPE) diff --git a/src/main/java/com/gr4vy/api/model/ConnectionOptionsPaypalPaypal.java b/src/main/java/com/gr4vy/api/model/ConnectionOptionsPaypalPaypal.java new file mode 100644 index 0000000..dce91f2 --- /dev/null +++ b/src/main/java/com/gr4vy/api/model/ConnectionOptionsPaypalPaypal.java @@ -0,0 +1,110 @@ +/* + * Gr4vy API + * Welcome to the Gr4vy API reference documentation. Our API is still very much a work in product and subject to change. + * + * The version of the OpenAPI document: 1.1.0-beta + * Contact: code@gr4vy.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.gr4vy.api.model; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.gr4vy.api.model.ConnectionOptionsPaypalPaypalAdditionalData; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; + +/** + * Additional options to be passed through to PayPal when processing transactions. + */ +@ApiModel(description = "Additional options to be passed through to PayPal when processing transactions.") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-09-06T16:38:13.632050Z[Etc/UTC]") +public class ConnectionOptionsPaypalPaypal { + public static final String SERIALIZED_NAME_ADDITIONAL_DATA = "additional_data"; + @SerializedName(SERIALIZED_NAME_ADDITIONAL_DATA) + private List additionalData = null; + + + public ConnectionOptionsPaypalPaypal additionalData(List additionalData) { + + this.additionalData = additionalData; + return this; + } + + public ConnectionOptionsPaypalPaypal addAdditionalDataItem(ConnectionOptionsPaypalPaypalAdditionalData additionalDataItem) { + if (this.additionalData == null) { + this.additionalData = new ArrayList(); + } + this.additionalData.add(additionalDataItem); + return this; + } + + /** + * An array with key-value objects representing additional data to be passed to PayPal. + * @return additionalData + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "[{\"key\":\"test\",\"value\":\"abc\"}]", value = "An array with key-value objects representing additional data to be passed to PayPal.") + + public List getAdditionalData() { + return additionalData; + } + + + public void setAdditionalData(List additionalData) { + this.additionalData = additionalData; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ConnectionOptionsPaypalPaypal connectionOptionsPaypalPaypal = (ConnectionOptionsPaypalPaypal) o; + return Objects.equals(this.additionalData, connectionOptionsPaypalPaypal.additionalData); + } + + @Override + public int hashCode() { + return Objects.hash(additionalData); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ConnectionOptionsPaypalPaypal {\n"); + sb.append(" additionalData: ").append(toIndentedString(additionalData)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/com/gr4vy/api/model/AntiFraudServiceFields.java b/src/main/java/com/gr4vy/api/model/ConnectionOptionsPaypalPaypalAdditionalData.java similarity index 69% rename from src/main/java/com/gr4vy/api/model/AntiFraudServiceFields.java rename to src/main/java/com/gr4vy/api/model/ConnectionOptionsPaypalPaypalAdditionalData.java index 8542b27..e9e83a2 100644 --- a/src/main/java/com/gr4vy/api/model/AntiFraudServiceFields.java +++ b/src/main/java/com/gr4vy/api/model/ConnectionOptionsPaypalPaypalAdditionalData.java @@ -25,11 +25,10 @@ import java.io.IOException; /** - * A key-value pair that represents a field defined in the definition for this anti-fraud service. + * ConnectionOptionsPaypalPaypalAdditionalData */ -@ApiModel(description = "A key-value pair that represents a field defined in the definition for this anti-fraud service.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2022-10-18T22:22:07.544896Z[Etc/UTC]") -public class AntiFraudServiceFields { +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-09-06T16:38:13.632050Z[Etc/UTC]") +public class ConnectionOptionsPaypalPaypalAdditionalData { public static final String SERIALIZED_NAME_KEY = "key"; @SerializedName(SERIALIZED_NAME_KEY) private String key; @@ -39,17 +38,18 @@ public class AntiFraudServiceFields { private String value; - public AntiFraudServiceFields key(String key) { + public ConnectionOptionsPaypalPaypalAdditionalData key(String key) { this.key = key; return this; } /** - * The key of the field to set a value for. + * Get key * @return key **/ - @ApiModelProperty(example = "approve_decision", required = true, value = "The key of the field to set a value for.") + @javax.annotation.Nullable + @ApiModelProperty(value = "") public String getKey() { return key; @@ -61,17 +61,18 @@ public void setKey(String key) { } - public AntiFraudServiceFields value(String value) { + public ConnectionOptionsPaypalPaypalAdditionalData value(String value) { this.value = value; return this; } /** - * The value of a field to set. + * Get value * @return value **/ - @ApiModelProperty(example = "sk_test_26PHem9AhJZvU623DfE1x4sd", required = true, value = "The value of a field to set.") + @javax.annotation.Nullable + @ApiModelProperty(value = "") public String getValue() { return value; @@ -91,9 +92,9 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - AntiFraudServiceFields antiFraudServiceFields = (AntiFraudServiceFields) o; - return Objects.equals(this.key, antiFraudServiceFields.key) && - Objects.equals(this.value, antiFraudServiceFields.value); + ConnectionOptionsPaypalPaypalAdditionalData connectionOptionsPaypalPaypalAdditionalData = (ConnectionOptionsPaypalPaypalAdditionalData) o; + return Objects.equals(this.key, connectionOptionsPaypalPaypalAdditionalData.key) && + Objects.equals(this.value, connectionOptionsPaypalPaypalAdditionalData.value); } @Override @@ -104,7 +105,7 @@ public int hashCode() { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class AntiFraudServiceFields {\n"); + sb.append("class ConnectionOptionsPaypalPaypalAdditionalData {\n"); sb.append(" key: ").append(toIndentedString(key)).append("\n"); sb.append(" value: ").append(toIndentedString(value)).append("\n"); sb.append("}"); diff --git a/src/main/java/com/gr4vy/api/model/Connections.java b/src/main/java/com/gr4vy/api/model/Connections.java index 5adf8a7..1c5ea89 100644 --- a/src/main/java/com/gr4vy/api/model/Connections.java +++ b/src/main/java/com/gr4vy/api/model/Connections.java @@ -31,7 +31,7 @@ * A list of configured connections. */ @ApiModel(description = "A list of configured connections.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-08T13:56:38.178267Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-09-06T16:38:13.632050Z[Etc/UTC]") public class Connections { public static final String SERIALIZED_NAME_ITEMS = "items"; @SerializedName(SERIALIZED_NAME_ITEMS) diff --git a/src/main/java/com/gr4vy/api/model/Cryptogram.java b/src/main/java/com/gr4vy/api/model/Cryptogram.java index c9dcf33..29abc8f 100644 --- a/src/main/java/com/gr4vy/api/model/Cryptogram.java +++ b/src/main/java/com/gr4vy/api/model/Cryptogram.java @@ -28,7 +28,7 @@ * A network token cryptogram. */ @ApiModel(description = "A network token cryptogram.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-08T13:56:38.178267Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-09-06T16:38:13.632050Z[Etc/UTC]") public class Cryptogram { public static final String SERIALIZED_NAME_CRYPTOGRAM = "cryptogram"; @SerializedName(SERIALIZED_NAME_CRYPTOGRAM) diff --git a/src/main/java/com/gr4vy/api/model/DigitalWallet.java b/src/main/java/com/gr4vy/api/model/DigitalWallet.java index 0e53189..4ad2c93 100644 --- a/src/main/java/com/gr4vy/api/model/DigitalWallet.java +++ b/src/main/java/com/gr4vy/api/model/DigitalWallet.java @@ -26,13 +26,13 @@ import java.util.ArrayList; import java.util.List; import java.util.UUID; -import org.threeten.bp.OffsetDateTime; + /** * A digital wallet (e.g. Apple Pay) that has been registered. */ @ApiModel(description = "A digital wallet (e.g. Apple Pay) that has been registered.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-08T13:56:38.178267Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-09-06T16:38:13.632050Z[Etc/UTC]") public class DigitalWallet { /** * `digital-wallet`. @@ -156,11 +156,11 @@ public ProviderEnum read(final JsonReader jsonReader) throws IOException { public static final String SERIALIZED_NAME_CREATED_AT = "created_at"; @SerializedName(SERIALIZED_NAME_CREATED_AT) - private OffsetDateTime createdAt; + private String createdAt; public static final String SERIALIZED_NAME_UPDATED_AT = "updated_at"; @SerializedName(SERIALIZED_NAME_UPDATED_AT) - private OffsetDateTime updatedAt; + private String updatedAt; public static final String SERIALIZED_NAME_ACTIVE_CERTIFICATE_COUNT = "active_certificate_count"; @SerializedName(SERIALIZED_NAME_ACTIVE_CERTIFICATE_COUNT) @@ -344,7 +344,7 @@ public void setDomainNames(List domainNames) { } - public DigitalWallet createdAt(OffsetDateTime createdAt) { + public DigitalWallet createdAt(String createdAt) { this.createdAt = createdAt; return this; @@ -357,17 +357,17 @@ public DigitalWallet createdAt(OffsetDateTime createdAt) { @javax.annotation.Nullable @ApiModelProperty(example = "2012-12-12T10:53:43Z", value = "The date and time when this digital wallet was registered.") - public OffsetDateTime getCreatedAt() { + public String getCreatedAt() { return createdAt; } - public void setCreatedAt(OffsetDateTime createdAt) { + public void setCreatedAt(String createdAt) { this.createdAt = createdAt; } - public DigitalWallet updatedAt(OffsetDateTime updatedAt) { + public DigitalWallet updatedAt(String updatedAt) { this.updatedAt = updatedAt; return this; @@ -380,12 +380,12 @@ public DigitalWallet updatedAt(OffsetDateTime updatedAt) { @javax.annotation.Nullable @ApiModelProperty(example = "2012-12-12T10:53:43Z", value = "The date and time when this digital wallet was last updated.") - public OffsetDateTime getUpdatedAt() { + public String getUpdatedAt() { return updatedAt; } - public void setUpdatedAt(OffsetDateTime updatedAt) { + public void setUpdatedAt(String updatedAt) { this.updatedAt = updatedAt; } diff --git a/src/main/java/com/gr4vy/api/model/DigitalWalletRequest.java b/src/main/java/com/gr4vy/api/model/DigitalWalletRequest.java index 36fdbc1..99a6b62 100644 --- a/src/main/java/com/gr4vy/api/model/DigitalWalletRequest.java +++ b/src/main/java/com/gr4vy/api/model/DigitalWalletRequest.java @@ -30,7 +30,7 @@ * Merchant details used to register with a digital wallet provider. */ @ApiModel(description = "Merchant details used to register with a digital wallet provider.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-08T13:56:38.178267Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-09-06T16:38:13.632050Z[Etc/UTC]") public class DigitalWalletRequest { /** * The name of the digital wallet provider. diff --git a/src/main/java/com/gr4vy/api/model/DigitalWalletUpdate.java b/src/main/java/com/gr4vy/api/model/DigitalWalletUpdate.java index 1b7142a..3b9e379 100644 --- a/src/main/java/com/gr4vy/api/model/DigitalWalletUpdate.java +++ b/src/main/java/com/gr4vy/api/model/DigitalWalletUpdate.java @@ -30,7 +30,7 @@ * Request body to update a registered digital wallet's details. */ @ApiModel(description = "Request body to update a registered digital wallet's details.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-08T13:56:38.178267Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-09-06T16:38:13.632050Z[Etc/UTC]") public class DigitalWalletUpdate { public static final String SERIALIZED_NAME_MERCHANT_NAME = "merchant_name"; @SerializedName(SERIALIZED_NAME_MERCHANT_NAME) diff --git a/src/main/java/com/gr4vy/api/model/DigitalWallets.java b/src/main/java/com/gr4vy/api/model/DigitalWallets.java index 31839e4..1d2e74f 100644 --- a/src/main/java/com/gr4vy/api/model/DigitalWallets.java +++ b/src/main/java/com/gr4vy/api/model/DigitalWallets.java @@ -31,7 +31,7 @@ * A list of registered digital wallets. */ @ApiModel(description = "A list of registered digital wallets.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-08T13:56:38.178267Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-09-06T16:38:13.632050Z[Etc/UTC]") public class DigitalWallets { public static final String SERIALIZED_NAME_ITEMS = "items"; @SerializedName(SERIALIZED_NAME_ITEMS) diff --git a/src/main/java/com/gr4vy/api/model/Error400BadRequest.java b/src/main/java/com/gr4vy/api/model/Error400BadRequest.java index eabed08..de44189 100644 --- a/src/main/java/com/gr4vy/api/model/Error400BadRequest.java +++ b/src/main/java/com/gr4vy/api/model/Error400BadRequest.java @@ -31,7 +31,7 @@ * Bad Request (HTTP 400). */ @ApiModel(description = "Bad Request (HTTP 400).") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-08T13:56:38.178267Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-09-06T16:38:13.632050Z[Etc/UTC]") public class Error400BadRequest { /** * `error`. diff --git a/src/main/java/com/gr4vy/api/model/Error400IncorrectJson.java b/src/main/java/com/gr4vy/api/model/Error400IncorrectJson.java index 8b13e34..3f13b79 100644 --- a/src/main/java/com/gr4vy/api/model/Error400IncorrectJson.java +++ b/src/main/java/com/gr4vy/api/model/Error400IncorrectJson.java @@ -31,7 +31,7 @@ * Incorrect JSON (HTTP 400). */ @ApiModel(description = "Incorrect JSON (HTTP 400).") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-08T13:56:38.178267Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-09-06T16:38:13.632050Z[Etc/UTC]") public class Error400IncorrectJson { /** * `error`. diff --git a/src/main/java/com/gr4vy/api/model/Error400InvalidCredentials.java b/src/main/java/com/gr4vy/api/model/Error400InvalidCredentials.java index 9690a27..6c65021 100644 --- a/src/main/java/com/gr4vy/api/model/Error400InvalidCredentials.java +++ b/src/main/java/com/gr4vy/api/model/Error400InvalidCredentials.java @@ -28,7 +28,7 @@ * Invalid credentials (HTTP 400). */ @ApiModel(description = "Invalid credentials (HTTP 400).") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-08T13:56:38.178267Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-09-06T16:38:13.632050Z[Etc/UTC]") public class Error400InvalidCredentials { /** * `error`. diff --git a/src/main/java/com/gr4vy/api/model/Error401Unauthorized.java b/src/main/java/com/gr4vy/api/model/Error401Unauthorized.java index 3edbc4c..ae6bd84 100644 --- a/src/main/java/com/gr4vy/api/model/Error401Unauthorized.java +++ b/src/main/java/com/gr4vy/api/model/Error401Unauthorized.java @@ -31,7 +31,7 @@ * Unauthorized Error (HTTP 401). */ @ApiModel(description = "Unauthorized Error (HTTP 401).") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-08T13:56:38.178267Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-09-06T16:38:13.632050Z[Etc/UTC]") public class Error401Unauthorized { /** * `error`. diff --git a/src/main/java/com/gr4vy/api/model/Error403Forbidden.java b/src/main/java/com/gr4vy/api/model/Error403Forbidden.java index 39f4eac..e355afb 100644 --- a/src/main/java/com/gr4vy/api/model/Error403Forbidden.java +++ b/src/main/java/com/gr4vy/api/model/Error403Forbidden.java @@ -31,7 +31,7 @@ * Forbidden Error (HTTP 403). */ @ApiModel(description = "Forbidden Error (HTTP 403).") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-08T13:56:38.178267Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-09-06T16:38:13.632050Z[Etc/UTC]") public class Error403Forbidden { /** * `error`. diff --git a/src/main/java/com/gr4vy/api/model/Error404NotFound.java b/src/main/java/com/gr4vy/api/model/Error404NotFound.java index d58f163..28351a2 100644 --- a/src/main/java/com/gr4vy/api/model/Error404NotFound.java +++ b/src/main/java/com/gr4vy/api/model/Error404NotFound.java @@ -31,7 +31,7 @@ * Not Found Error (HTTP 404). */ @ApiModel(description = "Not Found Error (HTTP 404).") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-08T13:56:38.178267Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-09-06T16:38:13.632050Z[Etc/UTC]") public class Error404NotFound { /** * `error`. diff --git a/src/main/java/com/gr4vy/api/model/Error404PendingCreation.java b/src/main/java/com/gr4vy/api/model/Error404PendingCreation.java index 10dd32c..50efa2f 100644 --- a/src/main/java/com/gr4vy/api/model/Error404PendingCreation.java +++ b/src/main/java/com/gr4vy/api/model/Error404PendingCreation.java @@ -31,7 +31,7 @@ * Pending Creation Error (HTTP 404). */ @ApiModel(description = "Pending Creation Error (HTTP 404).") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-08T13:56:38.178267Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-09-06T16:38:13.632050Z[Etc/UTC]") public class Error404PendingCreation { /** * `error`. diff --git a/src/main/java/com/gr4vy/api/model/Error409DuplicateRecord.java b/src/main/java/com/gr4vy/api/model/Error409DuplicateRecord.java index 9e10f8f..2138a1c 100644 --- a/src/main/java/com/gr4vy/api/model/Error409DuplicateRecord.java +++ b/src/main/java/com/gr4vy/api/model/Error409DuplicateRecord.java @@ -31,7 +31,7 @@ * Duplicate Record Error (HTTP 409). */ @ApiModel(description = "Duplicate Record Error (HTTP 409).") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-08T13:56:38.178267Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-09-06T16:38:13.632050Z[Etc/UTC]") public class Error409DuplicateRecord { /** * `error`. diff --git a/src/main/java/com/gr4vy/api/model/ErrorDetail.java b/src/main/java/com/gr4vy/api/model/ErrorDetail.java index 5c199ba..4f20bce 100644 --- a/src/main/java/com/gr4vy/api/model/ErrorDetail.java +++ b/src/main/java/com/gr4vy/api/model/ErrorDetail.java @@ -28,7 +28,7 @@ * Additional detail about the part of a request body that caused an issue. */ @ApiModel(description = "Additional detail about the part of a request body that caused an issue.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-08T13:56:38.178267Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-09-06T16:38:13.632050Z[Etc/UTC]") public class ErrorDetail { /** * The location where the error caused an issue. diff --git a/src/main/java/com/gr4vy/api/model/ErrorGeneric.java b/src/main/java/com/gr4vy/api/model/ErrorGeneric.java index 07ca51d..c23fd99 100644 --- a/src/main/java/com/gr4vy/api/model/ErrorGeneric.java +++ b/src/main/java/com/gr4vy/api/model/ErrorGeneric.java @@ -31,7 +31,7 @@ * A generic client error. */ @ApiModel(description = "A generic client error.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-08T13:56:38.178267Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-09-06T16:38:13.632050Z[Etc/UTC]") public class ErrorGeneric { /** * The type of this object. This is always `error`. diff --git a/src/main/java/com/gr4vy/api/model/GooglePayRequest.java b/src/main/java/com/gr4vy/api/model/GooglePayRequest.java index 9d0665b..a501bec 100644 --- a/src/main/java/com/gr4vy/api/model/GooglePayRequest.java +++ b/src/main/java/com/gr4vy/api/model/GooglePayRequest.java @@ -29,7 +29,7 @@ * Details for a Google Pay payment method. */ @ApiModel(description = "Details for a Google Pay payment method.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-08T13:56:38.178267Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-09-06T16:38:13.632050Z[Etc/UTC]") public class GooglePayRequest { /** * `googlepay`. @@ -82,7 +82,7 @@ public MethodEnum read(final JsonReader jsonReader) throws IOException { public static final String SERIALIZED_NAME_TOKEN = "token"; @SerializedName(SERIALIZED_NAME_TOKEN) - private Object token; + private String token; public static final String SERIALIZED_NAME_ASSURANCE_DETAILS = "assurance_details"; @SerializedName(SERIALIZED_NAME_ASSURANCE_DETAILS) @@ -119,7 +119,7 @@ public void setMethod(MethodEnum method) { } - public GooglePayRequest token(Object token) { + public GooglePayRequest token(String token) { this.token = token; return this; @@ -131,12 +131,12 @@ public GooglePayRequest token(Object token) { **/ @ApiModelProperty(required = true, value = "The encrypted (opaque) token returned by the Google Pay API that represents a payment method.") - public Object getToken() { + public String getToken() { return token; } - public void setToken(Object token) { + public void setToken(String token) { this.token = token; } diff --git a/src/main/java/com/gr4vy/api/model/GooglePayRequestAssuranceDetails.java b/src/main/java/com/gr4vy/api/model/GooglePayRequestAssuranceDetails.java index 49faa16..166cb47 100644 --- a/src/main/java/com/gr4vy/api/model/GooglePayRequestAssuranceDetails.java +++ b/src/main/java/com/gr4vy/api/model/GooglePayRequestAssuranceDetails.java @@ -28,7 +28,7 @@ * Information about the validation performed on the payment data. (See https://developers.google.com/pay/api/web/reference/response-objects#assurance-details-specifications). */ @ApiModel(description = "Information about the validation performed on the payment data. (See https://developers.google.com/pay/api/web/reference/response-objects#assurance-details-specifications).") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-08T13:56:38.178267Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-09-06T16:38:13.632050Z[Etc/UTC]") public class GooglePayRequestAssuranceDetails { public static final String SERIALIZED_NAME_ACCOUNT_VERIFIED = "account_verified"; @SerializedName(SERIALIZED_NAME_ACCOUNT_VERIFIED) diff --git a/src/main/java/com/gr4vy/api/model/GooglePaySessionRequest.java b/src/main/java/com/gr4vy/api/model/GooglePaySessionRequest.java index bbc3076..70149f0 100644 --- a/src/main/java/com/gr4vy/api/model/GooglePaySessionRequest.java +++ b/src/main/java/com/gr4vy/api/model/GooglePaySessionRequest.java @@ -28,7 +28,7 @@ * Initiates a new session with Google Pay. */ @ApiModel(description = "Initiates a new session with Google Pay.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-08T13:56:38.178267Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-09-06T16:38:13.632050Z[Etc/UTC]") public class GooglePaySessionRequest { public static final String SERIALIZED_NAME_ORIGIN_DOMAIN = "origin_domain"; @SerializedName(SERIALIZED_NAME_ORIGIN_DOMAIN) diff --git a/src/main/java/com/gr4vy/api/model/IssueCryptogramRequest.java b/src/main/java/com/gr4vy/api/model/IssueCryptogramRequest.java index 4c61376..9cfe664 100644 --- a/src/main/java/com/gr4vy/api/model/IssueCryptogramRequest.java +++ b/src/main/java/com/gr4vy/api/model/IssueCryptogramRequest.java @@ -28,7 +28,7 @@ * Request body for issue a cryptogram for a network token. */ @ApiModel(description = "Request body for issue a cryptogram for a network token.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-08T13:56:38.178267Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-09-06T16:38:13.632050Z[Etc/UTC]") public class IssueCryptogramRequest { public static final String SERIALIZED_NAME_MERCHANT_INITIATED = "merchant_initiated"; @SerializedName(SERIALIZED_NAME_MERCHANT_INITIATED) diff --git a/src/main/java/com/gr4vy/api/model/MerchantAccount.java b/src/main/java/com/gr4vy/api/model/MerchantAccount.java index 10f0c8a..28aa266 100644 --- a/src/main/java/com/gr4vy/api/model/MerchantAccount.java +++ b/src/main/java/com/gr4vy/api/model/MerchantAccount.java @@ -23,12 +23,12 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.io.IOException; -import org.threeten.bp.OffsetDateTime; + /** * MerchantAccount */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-08T13:56:38.178267Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-09-06T16:38:13.632050Z[Etc/UTC]") public class MerchantAccount { /** * `merchant-account`. @@ -95,6 +95,10 @@ public TypeEnum read(final JsonReader jsonReader) throws IOException { @SerializedName(SERIALIZED_NAME_OUTBOUND_WEBHOOK_USERNAME) private String outboundWebhookUsername; + public static final String SERIALIZED_NAME_OUTBOUND_WEBHOOK_PASSWORD = "outbound_webhook_password"; + @SerializedName(SERIALIZED_NAME_OUTBOUND_WEBHOOK_PASSWORD) + private String outboundWebhookPassword; + public static final String SERIALIZED_NAME_VISA_NETWORK_TOKENS_REQUESTOR_ID = "visa_network_tokens_requestor_id"; @SerializedName(SERIALIZED_NAME_VISA_NETWORK_TOKENS_REQUESTOR_ID) private String visaNetworkTokensRequestorId; @@ -121,11 +125,11 @@ public TypeEnum read(final JsonReader jsonReader) throws IOException { public static final String SERIALIZED_NAME_CREATED_AT = "created_at"; @SerializedName(SERIALIZED_NAME_CREATED_AT) - private OffsetDateTime createdAt; + private String createdAt; public static final String SERIALIZED_NAME_UPDATED_AT = "updated_at"; @SerializedName(SERIALIZED_NAME_UPDATED_AT) - private OffsetDateTime updatedAt; + private String updatedAt; public MerchantAccount type(TypeEnum type) { @@ -243,6 +247,29 @@ public void setOutboundWebhookUsername(String outboundWebhookUsername) { } + public MerchantAccount outboundWebhookPassword(String outboundWebhookPassword) { + + this.outboundWebhookPassword = outboundWebhookPassword; + return this; + } + + /** + * The optional password to use when `outbound_webhook_url` is configured and requires basic authentication. If the field is not `null`, the value is masked to avoid exposing sensitive information. + * @return outboundWebhookPassword + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "********", value = "The optional password to use when `outbound_webhook_url` is configured and requires basic authentication. If the field is not `null`, the value is masked to avoid exposing sensitive information.") + + public String getOutboundWebhookPassword() { + return outboundWebhookPassword; + } + + + public void setOutboundWebhookPassword(String outboundWebhookPassword) { + this.outboundWebhookPassword = outboundWebhookPassword; + } + + public MerchantAccount visaNetworkTokensRequestorId(String visaNetworkTokensRequestorId) { this.visaNetworkTokensRequestorId = visaNetworkTokensRequestorId; @@ -381,7 +408,7 @@ public void setMastercardNetworkTokensAppId(String mastercardNetworkTokensAppId) } - public MerchantAccount createdAt(OffsetDateTime createdAt) { + public MerchantAccount createdAt(String createdAt) { this.createdAt = createdAt; return this; @@ -394,17 +421,17 @@ public MerchantAccount createdAt(OffsetDateTime createdAt) { @javax.annotation.Nullable @ApiModelProperty(example = "2022-02-01T14:20Z", value = "The date and time when this merchant account was created.") - public OffsetDateTime getCreatedAt() { + public String getCreatedAt() { return createdAt; } - public void setCreatedAt(OffsetDateTime createdAt) { + public void setCreatedAt(String createdAt) { this.createdAt = createdAt; } - public MerchantAccount updatedAt(OffsetDateTime updatedAt) { + public MerchantAccount updatedAt(String updatedAt) { this.updatedAt = updatedAt; return this; @@ -417,12 +444,12 @@ public MerchantAccount updatedAt(OffsetDateTime updatedAt) { @javax.annotation.Nullable @ApiModelProperty(example = "2022-02-01T14:20Z", value = "The date and time when this merchant account was updated.") - public OffsetDateTime getUpdatedAt() { + public String getUpdatedAt() { return updatedAt; } - public void setUpdatedAt(OffsetDateTime updatedAt) { + public void setUpdatedAt(String updatedAt) { this.updatedAt = updatedAt; } @@ -441,6 +468,7 @@ public boolean equals(Object o) { Objects.equals(this.displayName, merchantAccount.displayName) && Objects.equals(this.outboundWebhookUrl, merchantAccount.outboundWebhookUrl) && Objects.equals(this.outboundWebhookUsername, merchantAccount.outboundWebhookUsername) && + Objects.equals(this.outboundWebhookPassword, merchantAccount.outboundWebhookPassword) && Objects.equals(this.visaNetworkTokensRequestorId, merchantAccount.visaNetworkTokensRequestorId) && Objects.equals(this.visaNetworkTokensAppId, merchantAccount.visaNetworkTokensAppId) && Objects.equals(this.amexNetworkTokensRequestorId, merchantAccount.amexNetworkTokensRequestorId) && @@ -453,7 +481,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(type, id, displayName, outboundWebhookUrl, outboundWebhookUsername, visaNetworkTokensRequestorId, visaNetworkTokensAppId, amexNetworkTokensRequestorId, amexNetworkTokensAppId, mastercardNetworkTokensRequestorId, mastercardNetworkTokensAppId, createdAt, updatedAt); + return Objects.hash(type, id, displayName, outboundWebhookUrl, outboundWebhookUsername, outboundWebhookPassword, visaNetworkTokensRequestorId, visaNetworkTokensAppId, amexNetworkTokensRequestorId, amexNetworkTokensAppId, mastercardNetworkTokensRequestorId, mastercardNetworkTokensAppId, createdAt, updatedAt); } @Override @@ -465,6 +493,7 @@ public String toString() { sb.append(" displayName: ").append(toIndentedString(displayName)).append("\n"); sb.append(" outboundWebhookUrl: ").append(toIndentedString(outboundWebhookUrl)).append("\n"); sb.append(" outboundWebhookUsername: ").append(toIndentedString(outboundWebhookUsername)).append("\n"); + sb.append(" outboundWebhookPassword: ").append(toIndentedString(outboundWebhookPassword)).append("\n"); sb.append(" visaNetworkTokensRequestorId: ").append(toIndentedString(visaNetworkTokensRequestorId)).append("\n"); sb.append(" visaNetworkTokensAppId: ").append(toIndentedString(visaNetworkTokensAppId)).append("\n"); sb.append(" amexNetworkTokensRequestorId: ").append(toIndentedString(amexNetworkTokensRequestorId)).append("\n"); diff --git a/src/main/java/com/gr4vy/api/model/MerchantAccountCreate.java b/src/main/java/com/gr4vy/api/model/MerchantAccountCreate.java index f17af62..6f33122 100644 --- a/src/main/java/com/gr4vy/api/model/MerchantAccountCreate.java +++ b/src/main/java/com/gr4vy/api/model/MerchantAccountCreate.java @@ -28,7 +28,7 @@ * A request to create a merchant account. */ @ApiModel(description = "A request to create a merchant account.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-08T13:56:38.178267Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-09-06T16:38:13.632050Z[Etc/UTC]") public class MerchantAccountCreate { public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) diff --git a/src/main/java/com/gr4vy/api/model/MerchantAccountUpdate.java b/src/main/java/com/gr4vy/api/model/MerchantAccountUpdate.java index 48b2975..2ce905c 100644 --- a/src/main/java/com/gr4vy/api/model/MerchantAccountUpdate.java +++ b/src/main/java/com/gr4vy/api/model/MerchantAccountUpdate.java @@ -28,7 +28,7 @@ * A request to update a merchant account. */ @ApiModel(description = "A request to update a merchant account.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-08T13:56:38.178267Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-09-06T16:38:13.632050Z[Etc/UTC]") public class MerchantAccountUpdate { public static final String SERIALIZED_NAME_DISPLAY_NAME = "display_name"; @SerializedName(SERIALIZED_NAME_DISPLAY_NAME) diff --git a/src/main/java/com/gr4vy/api/model/MerchantAccounts.java b/src/main/java/com/gr4vy/api/model/MerchantAccounts.java index aefd655..0fac739 100644 --- a/src/main/java/com/gr4vy/api/model/MerchantAccounts.java +++ b/src/main/java/com/gr4vy/api/model/MerchantAccounts.java @@ -30,7 +30,7 @@ /** * MerchantAccounts */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-08T13:56:38.178267Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-09-06T16:38:13.632050Z[Etc/UTC]") public class MerchantAccounts { public static final String SERIALIZED_NAME_ITEMS = "items"; @SerializedName(SERIALIZED_NAME_ITEMS) diff --git a/src/main/java/com/gr4vy/api/model/MerchantProfile.java b/src/main/java/com/gr4vy/api/model/MerchantProfile.java index e6d3b3c..07ffebb 100644 --- a/src/main/java/com/gr4vy/api/model/MerchantProfile.java +++ b/src/main/java/com/gr4vy/api/model/MerchantProfile.java @@ -29,7 +29,7 @@ * Merchant profile for the different card schemes. */ @ApiModel(description = "Merchant profile for the different card schemes.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-08T13:56:38.178267Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-09-06T16:38:13.632050Z[Etc/UTC]") public class MerchantProfile { public static final String SERIALIZED_NAME_AMEX = "amex"; @SerializedName(SERIALIZED_NAME_AMEX) diff --git a/src/main/java/com/gr4vy/api/model/MerchantProfileScheme.java b/src/main/java/com/gr4vy/api/model/MerchantProfileScheme.java index c95e462..19ba53e 100644 --- a/src/main/java/com/gr4vy/api/model/MerchantProfileScheme.java +++ b/src/main/java/com/gr4vy/api/model/MerchantProfileScheme.java @@ -28,7 +28,7 @@ * Merchant profile for a specific scheme. */ @ApiModel(description = "Merchant profile for a specific scheme.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-08T13:56:38.178267Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-09-06T16:38:13.632050Z[Etc/UTC]") public class MerchantProfileScheme { public static final String SERIALIZED_NAME_MERCHANT_ACQUIRER_BIN = "merchant_acquirer_bin"; @SerializedName(SERIALIZED_NAME_MERCHANT_ACQUIRER_BIN) diff --git a/src/main/java/com/gr4vy/api/model/NetworkToken.java b/src/main/java/com/gr4vy/api/model/NetworkToken.java index 75a4e6c..501eed9 100644 --- a/src/main/java/com/gr4vy/api/model/NetworkToken.java +++ b/src/main/java/com/gr4vy/api/model/NetworkToken.java @@ -24,13 +24,13 @@ import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.UUID; -import org.threeten.bp.OffsetDateTime; + /** * A network token generated by an open-loop PSP. */ @ApiModel(description = "A network token generated by an open-loop PSP.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-08T13:56:38.178267Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-09-06T16:38:13.632050Z[Etc/UTC]") public class NetworkToken { public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) @@ -105,11 +105,11 @@ public StatusEnum read(final JsonReader jsonReader) throws IOException { public static final String SERIALIZED_NAME_CREATED_AT = "created_at"; @SerializedName(SERIALIZED_NAME_CREATED_AT) - private OffsetDateTime createdAt; + private String createdAt; public static final String SERIALIZED_NAME_UPDATED_AT = "updated_at"; @SerializedName(SERIALIZED_NAME_UPDATED_AT) - private OffsetDateTime updatedAt; + private String updatedAt; public NetworkToken id(UUID id) { @@ -227,7 +227,7 @@ public void setExpirationDate(String expirationDate) { } - public NetworkToken createdAt(OffsetDateTime createdAt) { + public NetworkToken createdAt(String createdAt) { this.createdAt = createdAt; return this; @@ -240,17 +240,17 @@ public NetworkToken createdAt(OffsetDateTime createdAt) { @javax.annotation.Nullable @ApiModelProperty(example = "2021-01-01T12:34Z", value = "The date and time when this network token was first created in our system.") - public OffsetDateTime getCreatedAt() { + public String getCreatedAt() { return createdAt; } - public void setCreatedAt(OffsetDateTime createdAt) { + public void setCreatedAt(String createdAt) { this.createdAt = createdAt; } - public NetworkToken updatedAt(OffsetDateTime updatedAt) { + public NetworkToken updatedAt(String updatedAt) { this.updatedAt = updatedAt; return this; @@ -263,12 +263,12 @@ public NetworkToken updatedAt(OffsetDateTime updatedAt) { @javax.annotation.Nullable @ApiModelProperty(example = "2021-01-01T12:34Z", value = "The date and time when this network token was last updated in our system.") - public OffsetDateTime getUpdatedAt() { + public String getUpdatedAt() { return updatedAt; } - public void setUpdatedAt(OffsetDateTime updatedAt) { + public void setUpdatedAt(String updatedAt) { this.updatedAt = updatedAt; } diff --git a/src/main/java/com/gr4vy/api/model/NetworkTokenRequest.java b/src/main/java/com/gr4vy/api/model/NetworkTokenRequest.java index 3b7880a..b0a5e7d 100644 --- a/src/main/java/com/gr4vy/api/model/NetworkTokenRequest.java +++ b/src/main/java/com/gr4vy/api/model/NetworkTokenRequest.java @@ -28,7 +28,7 @@ * Request body for provision a network token. */ @ApiModel(description = "Request body for provision a network token.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-08T13:56:38.178267Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-09-06T16:38:13.632050Z[Etc/UTC]") public class NetworkTokenRequest { public static final String SERIALIZED_NAME_SECURITY_CODE = "security_code"; @SerializedName(SERIALIZED_NAME_SECURITY_CODE) diff --git a/src/main/java/com/gr4vy/api/model/NetworkTokens.java b/src/main/java/com/gr4vy/api/model/NetworkTokens.java index 7756175..c4f42c5 100644 --- a/src/main/java/com/gr4vy/api/model/NetworkTokens.java +++ b/src/main/java/com/gr4vy/api/model/NetworkTokens.java @@ -31,7 +31,7 @@ * A list of network tokens. */ @ApiModel(description = "A list of network tokens.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-08T13:56:38.178267Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-09-06T16:38:13.632050Z[Etc/UTC]") public class NetworkTokens { public static final String SERIALIZED_NAME_ITEMS = "items"; @SerializedName(SERIALIZED_NAME_ITEMS) diff --git a/src/main/java/com/gr4vy/api/model/PaymentConnectorResponseTransactionAuthorizationFailedEvent.java b/src/main/java/com/gr4vy/api/model/PaymentConnectorResponseTransactionAuthorizationFailedEvent.java index df2fb7b..79dda72 100644 --- a/src/main/java/com/gr4vy/api/model/PaymentConnectorResponseTransactionAuthorizationFailedEvent.java +++ b/src/main/java/com/gr4vy/api/model/PaymentConnectorResponseTransactionAuthorizationFailedEvent.java @@ -25,13 +25,13 @@ import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.UUID; -import org.threeten.bp.OffsetDateTime; + /** * This event logs the exact details parsed details for a failed authorization as reported by our connector. */ @ApiModel(description = "This event logs the exact details parsed details for a failed authorization as reported by our connector.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-08T13:56:38.178267Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-09-06T16:38:13.632050Z[Etc/UTC]") public class PaymentConnectorResponseTransactionAuthorizationFailedEvent { /** * The type of this resource. Is always `transaction-event`. @@ -137,7 +137,7 @@ public NameEnum read(final JsonReader jsonReader) throws IOException { public static final String SERIALIZED_NAME_CREATED_AT = "created_at"; @SerializedName(SERIALIZED_NAME_CREATED_AT) - private OffsetDateTime createdAt; + private String createdAt; public static final String SERIALIZED_NAME_CONTEXT = "context"; @SerializedName(SERIALIZED_NAME_CONTEXT) @@ -213,7 +213,7 @@ public void setName(NameEnum name) { } - public PaymentConnectorResponseTransactionAuthorizationFailedEvent createdAt(OffsetDateTime createdAt) { + public PaymentConnectorResponseTransactionAuthorizationFailedEvent createdAt(String createdAt) { this.createdAt = createdAt; return this; @@ -226,12 +226,12 @@ public PaymentConnectorResponseTransactionAuthorizationFailedEvent createdAt(Off @javax.annotation.Nullable @ApiModelProperty(example = "2013-07-16T19:23Z", value = "The date and time when this transaction was created in our system.") - public OffsetDateTime getCreatedAt() { + public String getCreatedAt() { return createdAt; } - public void setCreatedAt(OffsetDateTime createdAt) { + public void setCreatedAt(String createdAt) { this.createdAt = createdAt; } diff --git a/src/main/java/com/gr4vy/api/model/PaymentConnectorResponseTransactionAuthorizationFailedEventContext.java b/src/main/java/com/gr4vy/api/model/PaymentConnectorResponseTransactionAuthorizationFailedEventContext.java index dd9d289..ef3b96a 100644 --- a/src/main/java/com/gr4vy/api/model/PaymentConnectorResponseTransactionAuthorizationFailedEventContext.java +++ b/src/main/java/com/gr4vy/api/model/PaymentConnectorResponseTransactionAuthorizationFailedEventContext.java @@ -29,7 +29,7 @@ * Additional context for this event. */ @ApiModel(description = "Additional context for this event.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-08T13:56:38.178267Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-09-06T16:38:13.632050Z[Etc/UTC]") public class PaymentConnectorResponseTransactionAuthorizationFailedEventContext { public static final String SERIALIZED_NAME_PAYMENT_SERVICE_ID = "payment_service_id"; @SerializedName(SERIALIZED_NAME_PAYMENT_SERVICE_ID) diff --git a/src/main/java/com/gr4vy/api/model/PaymentConnectorResponseTransactionAuthorizationSucceededEvent.java b/src/main/java/com/gr4vy/api/model/PaymentConnectorResponseTransactionAuthorizationSucceededEvent.java index 0c8aced..6747ba5 100644 --- a/src/main/java/com/gr4vy/api/model/PaymentConnectorResponseTransactionAuthorizationSucceededEvent.java +++ b/src/main/java/com/gr4vy/api/model/PaymentConnectorResponseTransactionAuthorizationSucceededEvent.java @@ -25,13 +25,13 @@ import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.UUID; -import org.threeten.bp.OffsetDateTime; + /** * This event logs the exact details parsed details for a succeeded authorization as reported by our connector. */ @ApiModel(description = "This event logs the exact details parsed details for a succeeded authorization as reported by our connector.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-08T13:56:38.178267Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-09-06T16:38:13.632050Z[Etc/UTC]") public class PaymentConnectorResponseTransactionAuthorizationSucceededEvent { /** * The type of this resource. Is always `transaction-event`. @@ -137,7 +137,7 @@ public NameEnum read(final JsonReader jsonReader) throws IOException { public static final String SERIALIZED_NAME_CREATED_AT = "created_at"; @SerializedName(SERIALIZED_NAME_CREATED_AT) - private OffsetDateTime createdAt; + private String createdAt; public static final String SERIALIZED_NAME_CONTEXT = "context"; @SerializedName(SERIALIZED_NAME_CONTEXT) @@ -213,7 +213,7 @@ public void setName(NameEnum name) { } - public PaymentConnectorResponseTransactionAuthorizationSucceededEvent createdAt(OffsetDateTime createdAt) { + public PaymentConnectorResponseTransactionAuthorizationSucceededEvent createdAt(String createdAt) { this.createdAt = createdAt; return this; @@ -226,12 +226,12 @@ public PaymentConnectorResponseTransactionAuthorizationSucceededEvent createdAt( @javax.annotation.Nullable @ApiModelProperty(example = "2013-07-16T19:23Z", value = "The date and time when this transaction was created in our system.") - public OffsetDateTime getCreatedAt() { + public String getCreatedAt() { return createdAt; } - public void setCreatedAt(OffsetDateTime createdAt) { + public void setCreatedAt(String createdAt) { this.createdAt = createdAt; } diff --git a/src/main/java/com/gr4vy/api/model/PaymentConnectorResponseTransactionAuthorizationSucceededEventContext.java b/src/main/java/com/gr4vy/api/model/PaymentConnectorResponseTransactionAuthorizationSucceededEventContext.java index f87188e..9f69c0e 100644 --- a/src/main/java/com/gr4vy/api/model/PaymentConnectorResponseTransactionAuthorizationSucceededEventContext.java +++ b/src/main/java/com/gr4vy/api/model/PaymentConnectorResponseTransactionAuthorizationSucceededEventContext.java @@ -29,7 +29,7 @@ * Additional context for this event. */ @ApiModel(description = "Additional context for this event.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-08T13:56:38.178267Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-09-06T16:38:13.632050Z[Etc/UTC]") public class PaymentConnectorResponseTransactionAuthorizationSucceededEventContext { public static final String SERIALIZED_NAME_PAYMENT_SERVICE_ID = "payment_service_id"; @SerializedName(SERIALIZED_NAME_PAYMENT_SERVICE_ID) diff --git a/src/main/java/com/gr4vy/api/model/PaymentConnectorResponseTransactionCaptureDeclinedEvent.java b/src/main/java/com/gr4vy/api/model/PaymentConnectorResponseTransactionCaptureDeclinedEvent.java index cd1576f..7e1851f 100644 --- a/src/main/java/com/gr4vy/api/model/PaymentConnectorResponseTransactionCaptureDeclinedEvent.java +++ b/src/main/java/com/gr4vy/api/model/PaymentConnectorResponseTransactionCaptureDeclinedEvent.java @@ -25,13 +25,13 @@ import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.UUID; -import org.threeten.bp.OffsetDateTime; + /** * This event logs the exact details parsed details for a declined capture as reported by our connector. */ @ApiModel(description = "This event logs the exact details parsed details for a declined capture as reported by our connector.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-08T13:56:38.178267Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-09-06T16:38:13.632050Z[Etc/UTC]") public class PaymentConnectorResponseTransactionCaptureDeclinedEvent { /** * The type of this resource. Is always `transaction-event`. @@ -137,7 +137,7 @@ public NameEnum read(final JsonReader jsonReader) throws IOException { public static final String SERIALIZED_NAME_CREATED_AT = "created_at"; @SerializedName(SERIALIZED_NAME_CREATED_AT) - private OffsetDateTime createdAt; + private String createdAt; public static final String SERIALIZED_NAME_CONTEXT = "context"; @SerializedName(SERIALIZED_NAME_CONTEXT) @@ -213,7 +213,7 @@ public void setName(NameEnum name) { } - public PaymentConnectorResponseTransactionCaptureDeclinedEvent createdAt(OffsetDateTime createdAt) { + public PaymentConnectorResponseTransactionCaptureDeclinedEvent createdAt(String createdAt) { this.createdAt = createdAt; return this; @@ -226,12 +226,12 @@ public PaymentConnectorResponseTransactionCaptureDeclinedEvent createdAt(OffsetD @javax.annotation.Nullable @ApiModelProperty(example = "2013-07-16T19:23Z", value = "The date and time when this transaction was created in our system.") - public OffsetDateTime getCreatedAt() { + public String getCreatedAt() { return createdAt; } - public void setCreatedAt(OffsetDateTime createdAt) { + public void setCreatedAt(String createdAt) { this.createdAt = createdAt; } diff --git a/src/main/java/com/gr4vy/api/model/PaymentConnectorResponseTransactionCaptureDeclinedEventContext.java b/src/main/java/com/gr4vy/api/model/PaymentConnectorResponseTransactionCaptureDeclinedEventContext.java index 2046bc2..284b374 100644 --- a/src/main/java/com/gr4vy/api/model/PaymentConnectorResponseTransactionCaptureDeclinedEventContext.java +++ b/src/main/java/com/gr4vy/api/model/PaymentConnectorResponseTransactionCaptureDeclinedEventContext.java @@ -29,7 +29,7 @@ * Additional context for this event. */ @ApiModel(description = "Additional context for this event.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-08T13:56:38.178267Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-09-06T16:38:13.632050Z[Etc/UTC]") public class PaymentConnectorResponseTransactionCaptureDeclinedEventContext { public static final String SERIALIZED_NAME_PAYMENT_SERVICE_ID = "payment_service_id"; @SerializedName(SERIALIZED_NAME_PAYMENT_SERVICE_ID) diff --git a/src/main/java/com/gr4vy/api/model/PaymentConnectorResponseTransactionCaptureFailedEvent.java b/src/main/java/com/gr4vy/api/model/PaymentConnectorResponseTransactionCaptureFailedEvent.java index db2aa54..2902d20 100644 --- a/src/main/java/com/gr4vy/api/model/PaymentConnectorResponseTransactionCaptureFailedEvent.java +++ b/src/main/java/com/gr4vy/api/model/PaymentConnectorResponseTransactionCaptureFailedEvent.java @@ -25,13 +25,13 @@ import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.UUID; -import org.threeten.bp.OffsetDateTime; + /** * This event logs the exact details parsed details for a failed capture as reported by our connector. */ @ApiModel(description = "This event logs the exact details parsed details for a failed capture as reported by our connector.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-08T13:56:38.178267Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-09-06T16:38:13.632050Z[Etc/UTC]") public class PaymentConnectorResponseTransactionCaptureFailedEvent { /** * The type of this resource. Is always `transaction-event`. @@ -137,7 +137,7 @@ public NameEnum read(final JsonReader jsonReader) throws IOException { public static final String SERIALIZED_NAME_CREATED_AT = "created_at"; @SerializedName(SERIALIZED_NAME_CREATED_AT) - private OffsetDateTime createdAt; + private String createdAt; public static final String SERIALIZED_NAME_CONTEXT = "context"; @SerializedName(SERIALIZED_NAME_CONTEXT) @@ -213,7 +213,7 @@ public void setName(NameEnum name) { } - public PaymentConnectorResponseTransactionCaptureFailedEvent createdAt(OffsetDateTime createdAt) { + public PaymentConnectorResponseTransactionCaptureFailedEvent createdAt(String createdAt) { this.createdAt = createdAt; return this; @@ -226,12 +226,12 @@ public PaymentConnectorResponseTransactionCaptureFailedEvent createdAt(OffsetDat @javax.annotation.Nullable @ApiModelProperty(example = "2013-07-16T19:23Z", value = "The date and time when this transaction was created in our system.") - public OffsetDateTime getCreatedAt() { + public String getCreatedAt() { return createdAt; } - public void setCreatedAt(OffsetDateTime createdAt) { + public void setCreatedAt(String createdAt) { this.createdAt = createdAt; } diff --git a/src/main/java/com/gr4vy/api/model/PaymentConnectorResponseTransactionCaptureSucceededEvent.java b/src/main/java/com/gr4vy/api/model/PaymentConnectorResponseTransactionCaptureSucceededEvent.java index cbbd5f1..f868c8d 100644 --- a/src/main/java/com/gr4vy/api/model/PaymentConnectorResponseTransactionCaptureSucceededEvent.java +++ b/src/main/java/com/gr4vy/api/model/PaymentConnectorResponseTransactionCaptureSucceededEvent.java @@ -25,13 +25,13 @@ import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.UUID; -import org.threeten.bp.OffsetDateTime; + /** * This event logs the exact details parsed details for a succeeded capture as reported by our connector. */ @ApiModel(description = "This event logs the exact details parsed details for a succeeded capture as reported by our connector.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-08T13:56:38.178267Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-09-06T16:38:13.632050Z[Etc/UTC]") public class PaymentConnectorResponseTransactionCaptureSucceededEvent { /** * The type of this resource. Is always `transaction-event`. @@ -137,7 +137,7 @@ public NameEnum read(final JsonReader jsonReader) throws IOException { public static final String SERIALIZED_NAME_CREATED_AT = "created_at"; @SerializedName(SERIALIZED_NAME_CREATED_AT) - private OffsetDateTime createdAt; + private String createdAt; public static final String SERIALIZED_NAME_CONTEXT = "context"; @SerializedName(SERIALIZED_NAME_CONTEXT) @@ -213,7 +213,7 @@ public void setName(NameEnum name) { } - public PaymentConnectorResponseTransactionCaptureSucceededEvent createdAt(OffsetDateTime createdAt) { + public PaymentConnectorResponseTransactionCaptureSucceededEvent createdAt(String createdAt) { this.createdAt = createdAt; return this; @@ -226,12 +226,12 @@ public PaymentConnectorResponseTransactionCaptureSucceededEvent createdAt(Offset @javax.annotation.Nullable @ApiModelProperty(example = "2013-07-16T19:23Z", value = "The date and time when this transaction was created in our system.") - public OffsetDateTime getCreatedAt() { + public String getCreatedAt() { return createdAt; } - public void setCreatedAt(OffsetDateTime createdAt) { + public void setCreatedAt(String createdAt) { this.createdAt = createdAt; } diff --git a/src/main/java/com/gr4vy/api/model/PaymentConnectorResponseTransactionCaptureSucceededEventContext.java b/src/main/java/com/gr4vy/api/model/PaymentConnectorResponseTransactionCaptureSucceededEventContext.java index 13e39ff..781831f 100644 --- a/src/main/java/com/gr4vy/api/model/PaymentConnectorResponseTransactionCaptureSucceededEventContext.java +++ b/src/main/java/com/gr4vy/api/model/PaymentConnectorResponseTransactionCaptureSucceededEventContext.java @@ -29,7 +29,7 @@ * Additional context for this event. */ @ApiModel(description = "Additional context for this event.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-08T13:56:38.178267Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-09-06T16:38:13.632050Z[Etc/UTC]") public class PaymentConnectorResponseTransactionCaptureSucceededEventContext { public static final String SERIALIZED_NAME_PAYMENT_SERVICE_ID = "payment_service_id"; @SerializedName(SERIALIZED_NAME_PAYMENT_SERVICE_ID) diff --git a/src/main/java/com/gr4vy/api/model/PaymentConnectorResponseTransactionDeclinedEvent.java b/src/main/java/com/gr4vy/api/model/PaymentConnectorResponseTransactionDeclinedEvent.java index a939424..afc77ee 100644 --- a/src/main/java/com/gr4vy/api/model/PaymentConnectorResponseTransactionDeclinedEvent.java +++ b/src/main/java/com/gr4vy/api/model/PaymentConnectorResponseTransactionDeclinedEvent.java @@ -25,13 +25,13 @@ import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.UUID; -import org.threeten.bp.OffsetDateTime; + /** * This event logs the exact details parsed details for a transaction as reported by our connector when the capture is declined. */ @ApiModel(description = "This event logs the exact details parsed details for a transaction as reported by our connector when the capture is declined.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-08T13:56:38.178267Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-09-06T16:38:13.632050Z[Etc/UTC]") public class PaymentConnectorResponseTransactionDeclinedEvent { /** * The type of this resource. Is always `transaction-event`. @@ -137,7 +137,7 @@ public NameEnum read(final JsonReader jsonReader) throws IOException { public static final String SERIALIZED_NAME_CREATED_AT = "created_at"; @SerializedName(SERIALIZED_NAME_CREATED_AT) - private OffsetDateTime createdAt; + private String createdAt; public static final String SERIALIZED_NAME_CONTEXT = "context"; @SerializedName(SERIALIZED_NAME_CONTEXT) @@ -213,7 +213,7 @@ public void setName(NameEnum name) { } - public PaymentConnectorResponseTransactionDeclinedEvent createdAt(OffsetDateTime createdAt) { + public PaymentConnectorResponseTransactionDeclinedEvent createdAt(String createdAt) { this.createdAt = createdAt; return this; @@ -226,12 +226,12 @@ public PaymentConnectorResponseTransactionDeclinedEvent createdAt(OffsetDateTime @javax.annotation.Nullable @ApiModelProperty(example = "2013-07-16T19:23Z", value = "The date and time when this transaction was created in our system.") - public OffsetDateTime getCreatedAt() { + public String getCreatedAt() { return createdAt; } - public void setCreatedAt(OffsetDateTime createdAt) { + public void setCreatedAt(String createdAt) { this.createdAt = createdAt; } diff --git a/src/main/java/com/gr4vy/api/model/PaymentConnectorResponseTransactionDeclinedEventContext.java b/src/main/java/com/gr4vy/api/model/PaymentConnectorResponseTransactionDeclinedEventContext.java index 0156ff3..1f72556 100644 --- a/src/main/java/com/gr4vy/api/model/PaymentConnectorResponseTransactionDeclinedEventContext.java +++ b/src/main/java/com/gr4vy/api/model/PaymentConnectorResponseTransactionDeclinedEventContext.java @@ -29,7 +29,7 @@ * Additional context for this event. */ @ApiModel(description = "Additional context for this event.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-08T13:56:38.178267Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-09-06T16:38:13.632050Z[Etc/UTC]") public class PaymentConnectorResponseTransactionDeclinedEventContext { public static final String SERIALIZED_NAME_PAYMENT_SERVICE_ID = "payment_service_id"; @SerializedName(SERIALIZED_NAME_PAYMENT_SERVICE_ID) diff --git a/src/main/java/com/gr4vy/api/model/PaymentConnectorResponseTransactionVoidDeclinedEvent.java b/src/main/java/com/gr4vy/api/model/PaymentConnectorResponseTransactionVoidDeclinedEvent.java index 34c4102..871a363 100644 --- a/src/main/java/com/gr4vy/api/model/PaymentConnectorResponseTransactionVoidDeclinedEvent.java +++ b/src/main/java/com/gr4vy/api/model/PaymentConnectorResponseTransactionVoidDeclinedEvent.java @@ -25,13 +25,13 @@ import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.UUID; -import org.threeten.bp.OffsetDateTime; + /** * This event logs the exact details parsed details for a declined void as reported by our connector. */ @ApiModel(description = "This event logs the exact details parsed details for a declined void as reported by our connector.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-08T13:56:38.178267Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-09-06T16:38:13.632050Z[Etc/UTC]") public class PaymentConnectorResponseTransactionVoidDeclinedEvent { /** * The type of this resource. Is always `transaction-event`. @@ -137,7 +137,7 @@ public NameEnum read(final JsonReader jsonReader) throws IOException { public static final String SERIALIZED_NAME_CREATED_AT = "created_at"; @SerializedName(SERIALIZED_NAME_CREATED_AT) - private OffsetDateTime createdAt; + private String createdAt; public static final String SERIALIZED_NAME_CONTEXT = "context"; @SerializedName(SERIALIZED_NAME_CONTEXT) @@ -213,7 +213,7 @@ public void setName(NameEnum name) { } - public PaymentConnectorResponseTransactionVoidDeclinedEvent createdAt(OffsetDateTime createdAt) { + public PaymentConnectorResponseTransactionVoidDeclinedEvent createdAt(String createdAt) { this.createdAt = createdAt; return this; @@ -226,12 +226,12 @@ public PaymentConnectorResponseTransactionVoidDeclinedEvent createdAt(OffsetDate @javax.annotation.Nullable @ApiModelProperty(example = "2013-07-16T19:23Z", value = "The date and time when this transaction was created in our system.") - public OffsetDateTime getCreatedAt() { + public String getCreatedAt() { return createdAt; } - public void setCreatedAt(OffsetDateTime createdAt) { + public void setCreatedAt(String createdAt) { this.createdAt = createdAt; } diff --git a/src/main/java/com/gr4vy/api/model/PaymentConnectorResponseTransactionVoidDeclinedEventContext.java b/src/main/java/com/gr4vy/api/model/PaymentConnectorResponseTransactionVoidDeclinedEventContext.java index 2ea30ea..706096b 100644 --- a/src/main/java/com/gr4vy/api/model/PaymentConnectorResponseTransactionVoidDeclinedEventContext.java +++ b/src/main/java/com/gr4vy/api/model/PaymentConnectorResponseTransactionVoidDeclinedEventContext.java @@ -29,7 +29,7 @@ * Additional context for this event. */ @ApiModel(description = "Additional context for this event.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-08T13:56:38.178267Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-09-06T16:38:13.632050Z[Etc/UTC]") public class PaymentConnectorResponseTransactionVoidDeclinedEventContext { public static final String SERIALIZED_NAME_PAYMENT_SERVICE_ID = "payment_service_id"; @SerializedName(SERIALIZED_NAME_PAYMENT_SERVICE_ID) diff --git a/src/main/java/com/gr4vy/api/model/PaymentConnectorResponseTransactionVoidFailedEvent.java b/src/main/java/com/gr4vy/api/model/PaymentConnectorResponseTransactionVoidFailedEvent.java index fc061c3..98d95d2 100644 --- a/src/main/java/com/gr4vy/api/model/PaymentConnectorResponseTransactionVoidFailedEvent.java +++ b/src/main/java/com/gr4vy/api/model/PaymentConnectorResponseTransactionVoidFailedEvent.java @@ -25,13 +25,13 @@ import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.UUID; -import org.threeten.bp.OffsetDateTime; + /** * This event logs the exact details parsed details for a failed void as reported by our connector. */ @ApiModel(description = "This event logs the exact details parsed details for a failed void as reported by our connector.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-08T13:56:38.178267Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-09-06T16:38:13.632050Z[Etc/UTC]") public class PaymentConnectorResponseTransactionVoidFailedEvent { /** * The type of this resource. Is always `transaction-event`. @@ -137,7 +137,7 @@ public NameEnum read(final JsonReader jsonReader) throws IOException { public static final String SERIALIZED_NAME_CREATED_AT = "created_at"; @SerializedName(SERIALIZED_NAME_CREATED_AT) - private OffsetDateTime createdAt; + private String createdAt; public static final String SERIALIZED_NAME_CONTEXT = "context"; @SerializedName(SERIALIZED_NAME_CONTEXT) @@ -213,7 +213,7 @@ public void setName(NameEnum name) { } - public PaymentConnectorResponseTransactionVoidFailedEvent createdAt(OffsetDateTime createdAt) { + public PaymentConnectorResponseTransactionVoidFailedEvent createdAt(String createdAt) { this.createdAt = createdAt; return this; @@ -226,12 +226,12 @@ public PaymentConnectorResponseTransactionVoidFailedEvent createdAt(OffsetDateTi @javax.annotation.Nullable @ApiModelProperty(example = "2013-07-16T19:23Z", value = "The date and time when this event was created in our system.") - public OffsetDateTime getCreatedAt() { + public String getCreatedAt() { return createdAt; } - public void setCreatedAt(OffsetDateTime createdAt) { + public void setCreatedAt(String createdAt) { this.createdAt = createdAt; } diff --git a/src/main/java/com/gr4vy/api/model/PaymentConnectorResponseTransactionVoidFailedEventContext.java b/src/main/java/com/gr4vy/api/model/PaymentConnectorResponseTransactionVoidFailedEventContext.java index bad9195..4d61042 100644 --- a/src/main/java/com/gr4vy/api/model/PaymentConnectorResponseTransactionVoidFailedEventContext.java +++ b/src/main/java/com/gr4vy/api/model/PaymentConnectorResponseTransactionVoidFailedEventContext.java @@ -29,7 +29,7 @@ * Additional context for this event. */ @ApiModel(description = "Additional context for this event.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-08T13:56:38.178267Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-09-06T16:38:13.632050Z[Etc/UTC]") public class PaymentConnectorResponseTransactionVoidFailedEventContext { public static final String SERIALIZED_NAME_PAYMENT_SERVICE_ID = "payment_service_id"; @SerializedName(SERIALIZED_NAME_PAYMENT_SERVICE_ID) diff --git a/src/main/java/com/gr4vy/api/model/PaymentConnectorResponseTransactionVoidSucceededEvent.java b/src/main/java/com/gr4vy/api/model/PaymentConnectorResponseTransactionVoidSucceededEvent.java index 944a517..379d797 100644 --- a/src/main/java/com/gr4vy/api/model/PaymentConnectorResponseTransactionVoidSucceededEvent.java +++ b/src/main/java/com/gr4vy/api/model/PaymentConnectorResponseTransactionVoidSucceededEvent.java @@ -25,13 +25,13 @@ import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.UUID; -import org.threeten.bp.OffsetDateTime; + /** * This event logs the exact details parsed details for a succeeded void as reported by our connector. */ @ApiModel(description = "This event logs the exact details parsed details for a succeeded void as reported by our connector.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-08T13:56:38.178267Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-09-06T16:38:13.632050Z[Etc/UTC]") public class PaymentConnectorResponseTransactionVoidSucceededEvent { /** * The type of this resource. Is always `transaction-event`. @@ -137,7 +137,7 @@ public NameEnum read(final JsonReader jsonReader) throws IOException { public static final String SERIALIZED_NAME_CREATED_AT = "created_at"; @SerializedName(SERIALIZED_NAME_CREATED_AT) - private OffsetDateTime createdAt; + private String createdAt; public static final String SERIALIZED_NAME_CONTEXT = "context"; @SerializedName(SERIALIZED_NAME_CONTEXT) @@ -213,7 +213,7 @@ public void setName(NameEnum name) { } - public PaymentConnectorResponseTransactionVoidSucceededEvent createdAt(OffsetDateTime createdAt) { + public PaymentConnectorResponseTransactionVoidSucceededEvent createdAt(String createdAt) { this.createdAt = createdAt; return this; @@ -226,12 +226,12 @@ public PaymentConnectorResponseTransactionVoidSucceededEvent createdAt(OffsetDat @javax.annotation.Nullable @ApiModelProperty(example = "2013-07-16T19:23Z", value = "The date and time when this event was created in our system.") - public OffsetDateTime getCreatedAt() { + public String getCreatedAt() { return createdAt; } - public void setCreatedAt(OffsetDateTime createdAt) { + public void setCreatedAt(String createdAt) { this.createdAt = createdAt; } diff --git a/src/main/java/com/gr4vy/api/model/PaymentConnectorResponseTransactionVoidSucceededEventContext.java b/src/main/java/com/gr4vy/api/model/PaymentConnectorResponseTransactionVoidSucceededEventContext.java index ab7e0b9..d136500 100644 --- a/src/main/java/com/gr4vy/api/model/PaymentConnectorResponseTransactionVoidSucceededEventContext.java +++ b/src/main/java/com/gr4vy/api/model/PaymentConnectorResponseTransactionVoidSucceededEventContext.java @@ -24,13 +24,13 @@ import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.UUID; -import org.threeten.bp.OffsetDateTime; + /** * Additional context for this event. */ @ApiModel(description = "Additional context for this event.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-08T13:56:38.178267Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-09-06T16:38:13.632050Z[Etc/UTC]") public class PaymentConnectorResponseTransactionVoidSucceededEventContext { public static final String SERIALIZED_NAME_PAYMENT_SERVICE_ID = "payment_service_id"; @SerializedName(SERIALIZED_NAME_PAYMENT_SERVICE_ID) @@ -50,7 +50,7 @@ public class PaymentConnectorResponseTransactionVoidSucceededEventContext { public static final String SERIALIZED_NAME_VOIDED_AT = "voided_at"; @SerializedName(SERIALIZED_NAME_VOIDED_AT) - private OffsetDateTime voidedAt; + private String voidedAt; public PaymentConnectorResponseTransactionVoidSucceededEventContext paymentServiceId(UUID paymentServiceId) { @@ -145,7 +145,7 @@ public void setPaymentServiceTransactionId(String paymentServiceTransactionId) { } - public PaymentConnectorResponseTransactionVoidSucceededEventContext voidedAt(OffsetDateTime voidedAt) { + public PaymentConnectorResponseTransactionVoidSucceededEventContext voidedAt(String voidedAt) { this.voidedAt = voidedAt; return this; @@ -158,12 +158,12 @@ public PaymentConnectorResponseTransactionVoidSucceededEventContext voidedAt(Off @javax.annotation.Nullable @ApiModelProperty(example = "2013-07-16T19:23Z", value = "The date and time when this transaction was voided.") - public OffsetDateTime getVoidedAt() { + public String getVoidedAt() { return voidedAt; } - public void setVoidedAt(OffsetDateTime voidedAt) { + public void setVoidedAt(String voidedAt) { this.voidedAt = voidedAt; } diff --git a/src/main/java/com/gr4vy/api/model/PaymentMethod.java b/src/main/java/com/gr4vy/api/model/PaymentMethod.java index 0fb3de3..a353638 100644 --- a/src/main/java/com/gr4vy/api/model/PaymentMethod.java +++ b/src/main/java/com/gr4vy/api/model/PaymentMethod.java @@ -26,13 +26,13 @@ import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.UUID; -import org.threeten.bp.OffsetDateTime; + /** * A generic payment method. */ @ApiModel(description = "A generic payment method.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-08T13:56:38.178267Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-09-06T16:38:13.632050Z[Etc/UTC]") public class PaymentMethod { /** * `payment-method`. @@ -153,52 +153,122 @@ public StatusEnum read(final JsonReader jsonReader) throws IOException { public enum MethodEnum { AFTERPAY("afterpay"), + ALIPAY("alipay"), + + ALIPAYHK("alipayhk"), + APPLEPAY("applepay"), + BACS("bacs"), + + BANCONTACT("bancontact"), + BANKED("banked"), + BECS("becs"), + BITPAY("bitpay"), BOLETO("boleto"), + BOOST("boost"), + CARD("card"), + CHECKOUT_SESSION("checkout-session"), + CLEARPAY("clearpay"), DANA("dana"), + DCB("dcb"), + + EPS("eps"), + FORTUMO("fortumo"), GCASH("gcash"), + GIROPAY("giropay"), + GOCARDLESS("gocardless"), GOOGLEPAY("googlepay"), + GOPAY("gopay"), + GRABPAY("grabpay"), + IDEAL("ideal"), + + ID("id"), + + KAKAOPAY("kakaopay"), + KLARNA("klarna"), + LAYBUY("laybuy"), + + LINEPAY("linepay"), + + LINKAJA("linkaja"), + + MAYBANKQRPAY("maybankqrpay"), + + MULTIBANCO("multibanco"), + + ONEY_3X("oney_3x"), + + ONEY_4X("oney_4x"), + + ONEY_6X("oney_6x"), + + ONEY_10X("oney_10x"), + + ONEY_12X("oney_12x"), + OVO("ovo"), + OXXO("oxxo"), + PAYMAYA("paymaya"), PAYPAL("paypal"), + PAYPALPAYLATER("paypalpaylater"), + PIX("pix"), RABBITLINEPAY("rabbitlinepay"), + RAZORPAY("razorpay"), + SCALAPAY("scalapay"), + SEPA("sepa"), + SHOPEEPAY("shopeepay"), + SINGTELDASH("singteldash"), + + SOFORT("sofort"), + STRIPEDD("stripedd"), + THAIQR("thaiqr"), + + TOUCHNGO("touchngo"), + TRUEMONEY("truemoney"), TRUSTLY("trustly"), + VENMO("venmo"), + + WAAVE("waave"), + + WECHAT("wechat"), + ZIPPAY("zippay"); private String value; @@ -300,11 +370,11 @@ public ModeEnum read(final JsonReader jsonReader) throws IOException { public static final String SERIALIZED_NAME_CREATED_AT = "created_at"; @SerializedName(SERIALIZED_NAME_CREATED_AT) - private OffsetDateTime createdAt; + private String createdAt; public static final String SERIALIZED_NAME_UPDATED_AT = "updated_at"; @SerializedName(SERIALIZED_NAME_UPDATED_AT) - private OffsetDateTime updatedAt; + private String updatedAt; public static final String SERIALIZED_NAME_EXTERNAL_IDENTIFIER = "external_identifier"; @SerializedName(SERIALIZED_NAME_EXTERNAL_IDENTIFIER) @@ -395,7 +465,7 @@ public ApprovalTargetEnum read(final JsonReader jsonReader) throws IOException { public static final String SERIALIZED_NAME_LAST_REPLACED_AT = "last_replaced_at"; @SerializedName(SERIALIZED_NAME_LAST_REPLACED_AT) - private OffsetDateTime lastReplacedAt; + private String lastReplacedAt; public static final String SERIALIZED_NAME_HAS_REPLACEMENT = "has_replacement"; @SerializedName(SERIALIZED_NAME_HAS_REPLACEMENT) @@ -540,7 +610,7 @@ public void setMode(ModeEnum mode) { } - public PaymentMethod createdAt(OffsetDateTime createdAt) { + public PaymentMethod createdAt(String createdAt) { this.createdAt = createdAt; return this; @@ -553,17 +623,17 @@ public PaymentMethod createdAt(OffsetDateTime createdAt) { @javax.annotation.Nullable @ApiModelProperty(example = "2013-07-16T19:23Z", value = "The date and time when this payment method was first created in our system.") - public OffsetDateTime getCreatedAt() { + public String getCreatedAt() { return createdAt; } - public void setCreatedAt(OffsetDateTime createdAt) { + public void setCreatedAt(String createdAt) { this.createdAt = createdAt; } - public PaymentMethod updatedAt(OffsetDateTime updatedAt) { + public PaymentMethod updatedAt(String updatedAt) { this.updatedAt = updatedAt; return this; @@ -576,12 +646,12 @@ public PaymentMethod updatedAt(OffsetDateTime updatedAt) { @javax.annotation.Nullable @ApiModelProperty(example = "2013-07-16T19:23Z", value = "The date and time when this payment method was last updated in our system.") - public OffsetDateTime getUpdatedAt() { + public String getUpdatedAt() { return updatedAt; } - public void setUpdatedAt(OffsetDateTime updatedAt) { + public void setUpdatedAt(String updatedAt) { this.updatedAt = updatedAt; } @@ -816,7 +886,7 @@ public void setDetails(PaymentMethodDetailsCard details) { } - public PaymentMethod lastReplacedAt(OffsetDateTime lastReplacedAt) { + public PaymentMethod lastReplacedAt(String lastReplacedAt) { this.lastReplacedAt = lastReplacedAt; return this; @@ -829,12 +899,12 @@ public PaymentMethod lastReplacedAt(OffsetDateTime lastReplacedAt) { @javax.annotation.Nullable @ApiModelProperty(example = "2023-07-26T19:23Z", value = "The date and time when this card was last replaced. When the Account Updater determines that new card details are available (e.g. when it's about to expire), existing details are not changed immediately. The actual replacement occurs when a transaction using this payment method is declined with any of the following codes: * `canceled_payment_method` * `expired_payment_method` * `unavailable_payment_method` * `unknown_payment_method` When the replacement is applied, this field is updated. For non-card payment methods, the value of this field is always set to `null`.") - public OffsetDateTime getLastReplacedAt() { + public String getLastReplacedAt() { return lastReplacedAt; } - public void setLastReplacedAt(OffsetDateTime lastReplacedAt) { + public void setLastReplacedAt(String lastReplacedAt) { this.lastReplacedAt = lastReplacedAt; } diff --git a/src/main/java/com/gr4vy/api/model/PaymentMethodDefinition.java b/src/main/java/com/gr4vy/api/model/PaymentMethodDefinition.java index 26ed413..f6199ee 100644 --- a/src/main/java/com/gr4vy/api/model/PaymentMethodDefinition.java +++ b/src/main/java/com/gr4vy/api/model/PaymentMethodDefinition.java @@ -28,7 +28,7 @@ * Definitions of a payment method including icon, label, etc. */ @ApiModel(description = "Definitions of a payment method including icon, label, etc.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-08T13:56:38.178267Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-09-06T16:38:13.632050Z[Etc/UTC]") public class PaymentMethodDefinition { public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) diff --git a/src/main/java/com/gr4vy/api/model/PaymentMethodDefinitions.java b/src/main/java/com/gr4vy/api/model/PaymentMethodDefinitions.java index 93b2d9e..14effc3 100644 --- a/src/main/java/com/gr4vy/api/model/PaymentMethodDefinitions.java +++ b/src/main/java/com/gr4vy/api/model/PaymentMethodDefinitions.java @@ -31,7 +31,7 @@ * A list of available payment method definitions. */ @ApiModel(description = "A list of available payment method definitions.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-08T13:56:38.178267Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-09-06T16:38:13.632050Z[Etc/UTC]") public class PaymentMethodDefinitions { public static final String SERIALIZED_NAME_ITEMS = "items"; @SerializedName(SERIALIZED_NAME_ITEMS) diff --git a/src/main/java/com/gr4vy/api/model/PaymentMethodDetailsCard.java b/src/main/java/com/gr4vy/api/model/PaymentMethodDetailsCard.java index 546265b..078fb7a 100644 --- a/src/main/java/com/gr4vy/api/model/PaymentMethodDetailsCard.java +++ b/src/main/java/com/gr4vy/api/model/PaymentMethodDetailsCard.java @@ -28,7 +28,7 @@ * A credit or debit card payment method. */ @ApiModel(description = "A credit or debit card payment method.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-08T13:56:38.178267Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-09-06T16:38:13.632050Z[Etc/UTC]") public class PaymentMethodDetailsCard { /** * The type of card, one of `credit`, `debit` or `prepaid`. diff --git a/src/main/java/com/gr4vy/api/model/PaymentMethodRequest.java b/src/main/java/com/gr4vy/api/model/PaymentMethodRequest.java index 85797f3..6ba627b 100644 --- a/src/main/java/com/gr4vy/api/model/PaymentMethodRequest.java +++ b/src/main/java/com/gr4vy/api/model/PaymentMethodRequest.java @@ -29,7 +29,7 @@ * Payment method details used to register a new payment method. */ @ApiModel(description = "Payment method details used to register a new payment method.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-08T13:56:38.178267Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-09-06T16:38:13.632050Z[Etc/UTC]") public class PaymentMethodRequest { public static final String SERIALIZED_NAME_METHOD = "method"; @SerializedName(SERIALIZED_NAME_METHOD) diff --git a/src/main/java/com/gr4vy/api/model/PaymentMethodSnapshot.java b/src/main/java/com/gr4vy/api/model/PaymentMethodSnapshot.java index f8f84d2..fa3cdd4 100644 --- a/src/main/java/com/gr4vy/api/model/PaymentMethodSnapshot.java +++ b/src/main/java/com/gr4vy/api/model/PaymentMethodSnapshot.java @@ -30,7 +30,7 @@ * Snapshot of a payment method, as used when embedded inside other resources. */ @ApiModel(description = "Snapshot of a payment method, as used when embedded inside other resources.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-08T13:56:38.178267Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-09-06T16:38:13.632050Z[Etc/UTC]") public class PaymentMethodSnapshot { /** * `payment-method`. @@ -92,52 +92,122 @@ public TypeEnum read(final JsonReader jsonReader) throws IOException { public enum MethodEnum { AFTERPAY("afterpay"), + ALIPAY("alipay"), + + ALIPAYHK("alipayhk"), + APPLEPAY("applepay"), + BACS("bacs"), + + BANCONTACT("bancontact"), + BANKED("banked"), + BECS("becs"), + BITPAY("bitpay"), BOLETO("boleto"), + BOOST("boost"), + CARD("card"), + CHECKOUT_SESSION("checkout-session"), + CLEARPAY("clearpay"), DANA("dana"), + DCB("dcb"), + + EPS("eps"), + FORTUMO("fortumo"), GCASH("gcash"), + GIROPAY("giropay"), + GOCARDLESS("gocardless"), GOOGLEPAY("googlepay"), + GOPAY("gopay"), + GRABPAY("grabpay"), + IDEAL("ideal"), + + ID("id"), + + KAKAOPAY("kakaopay"), + KLARNA("klarna"), + LAYBUY("laybuy"), + + LINEPAY("linepay"), + + LINKAJA("linkaja"), + + MAYBANKQRPAY("maybankqrpay"), + + MULTIBANCO("multibanco"), + + ONEY_3X("oney_3x"), + + ONEY_4X("oney_4x"), + + ONEY_6X("oney_6x"), + + ONEY_10X("oney_10x"), + + ONEY_12X("oney_12x"), + OVO("ovo"), + OXXO("oxxo"), + PAYMAYA("paymaya"), PAYPAL("paypal"), + PAYPALPAYLATER("paypalpaylater"), + PIX("pix"), RABBITLINEPAY("rabbitlinepay"), + RAZORPAY("razorpay"), + SCALAPAY("scalapay"), + SEPA("sepa"), + SHOPEEPAY("shopeepay"), + SINGTELDASH("singteldash"), + + SOFORT("sofort"), + STRIPEDD("stripedd"), + THAIQR("thaiqr"), + + TOUCHNGO("touchngo"), + TRUEMONEY("truemoney"), TRUSTLY("trustly"), + VENMO("venmo"), + + WAAVE("waave"), + + WECHAT("wechat"), + ZIPPAY("zippay"); private String value; diff --git a/src/main/java/com/gr4vy/api/model/PaymentMethodToken.java b/src/main/java/com/gr4vy/api/model/PaymentMethodToken.java deleted file mode 100644 index 16b4e93..0000000 --- a/src/main/java/com/gr4vy/api/model/PaymentMethodToken.java +++ /dev/null @@ -1,312 +0,0 @@ -/* - * Gr4vy API - * Welcome to the Gr4vy API reference documentation. Our API is still very much a work in product and subject to change. - * - * The version of the OpenAPI document: 1.1.0-beta - * Contact: code@gr4vy.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.gr4vy.api.model; - -import java.util.Objects; -import java.util.Arrays; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import com.gr4vy.api.model.PaymentServiceSnapshot; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.io.IOException; - -/** - * A token for a payment method. - */ -@ApiModel(description = "A token for a payment method.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2022-12-22T14:21:56.132305Z[Etc/UTC]") -public class PaymentMethodToken { - /** - * `payment-method-token`. - */ - @JsonAdapter(TypeEnum.Adapter.class) - public enum TypeEnum { - PAYMENT_METHOD_TOKEN("payment-method-token"); - - 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_TOKEN = "token"; - @SerializedName(SERIALIZED_NAME_TOKEN) - private String token; - - /** - * The state of the payment method. - `processing` - The payment method is still being stored. - `buyer_approval_required` - The buyer still needs to provide approval before the payment method can be stored. - `succeeded` - The payment method is approved and stored with all relevant payment services. - `failed` - Storing the payment method did not succeed. - */ - @JsonAdapter(StatusEnum.Adapter.class) - public enum StatusEnum { - PROCESSING("processing"), - - BUYER_APPROVAL_REQUIRED("buyer_approval_required"), - - SUCCEEDED("succeeded"), - - FAILED("failed"); - - 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_PAYMENT_SERVICE = "payment_service"; - @SerializedName(SERIALIZED_NAME_PAYMENT_SERVICE) - private PaymentServiceSnapshot paymentService; - - - public PaymentMethodToken type(TypeEnum type) { - - this.type = type; - return this; - } - - /** - * `payment-method-token`. - * @return type - **/ - @javax.annotation.Nullable - @ApiModelProperty(example = "payment-method-token", value = "`payment-method-token`.") - - public TypeEnum getType() { - return type; - } - - - public void setType(TypeEnum type) { - this.type = type; - } - - - public PaymentMethodToken id(String id) { - - this.id = id; - return this; - } - - /** - * The external ID of this payment method as it has been registered with the payment service, which can be used directly in combination with the `token` without the need to go through Gr4vy for a transaction. In some cases this is a different value to the `token` while in others this value is identical. Please see the documentation for the payment service for more details. - * @return id - **/ - @javax.annotation.Nullable - @ApiModelProperty(example = "cus_4QEiU0VT5E3Whi", value = "The external ID of this payment method as it has been registered with the payment service, which can be used directly in combination with the `token` without the need to go through Gr4vy for a transaction. In some cases this is a different value to the `token` while in others this value is identical. Please see the documentation for the payment service for more details.") - - public String getId() { - return id; - } - - - public void setId(String id) { - this.id = id; - } - - - public PaymentMethodToken token(String token) { - - this.token = token; - return this; - } - - /** - * The token of this payment method as it has been registered with the payment service, which can be used directly in combination with the `id` without the need to go through Gr4vy for a transaction. In some cases this is a different value to the `id` while in others this value is identical. Please see the documentation for the payment service for more details. - * @return token - **/ - @javax.annotation.Nullable - @ApiModelProperty(example = "tok_1JCNiQ2eZvKYlo2CpvA4ODiD", value = "The token of this payment method as it has been registered with the payment service, which can be used directly in combination with the `id` without the need to go through Gr4vy for a transaction. In some cases this is a different value to the `id` while in others this value is identical. Please see the documentation for the payment service for more details.") - - public String getToken() { - return token; - } - - - public void setToken(String token) { - this.token = token; - } - - - public PaymentMethodToken status(StatusEnum status) { - - this.status = status; - return this; - } - - /** - * The state of the payment method. - `processing` - The payment method is still being stored. - `buyer_approval_required` - The buyer still needs to provide approval before the payment method can be stored. - `succeeded` - The payment method is approved and stored with all relevant payment services. - `failed` - Storing the payment method did not succeed. - * @return status - **/ - @javax.annotation.Nullable - @ApiModelProperty(example = "succeeded", value = "The state of the payment method. - `processing` - The payment method is still being stored. - `buyer_approval_required` - The buyer still needs to provide approval before the payment method can be stored. - `succeeded` - The payment method is approved and stored with all relevant payment services. - `failed` - Storing the payment method did not succeed.") - - public StatusEnum getStatus() { - return status; - } - - - public void setStatus(StatusEnum status) { - this.status = status; - } - - - public PaymentMethodToken paymentService(PaymentServiceSnapshot paymentService) { - - this.paymentService = paymentService; - return this; - } - - /** - * Get paymentService - * @return paymentService - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - - public PaymentServiceSnapshot getPaymentService() { - return paymentService; - } - - - public void setPaymentService(PaymentServiceSnapshot paymentService) { - this.paymentService = paymentService; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - PaymentMethodToken paymentMethodToken = (PaymentMethodToken) o; - return Objects.equals(this.type, paymentMethodToken.type) && - Objects.equals(this.id, paymentMethodToken.id) && - Objects.equals(this.token, paymentMethodToken.token) && - Objects.equals(this.status, paymentMethodToken.status) && - Objects.equals(this.paymentService, paymentMethodToken.paymentService); - } - - @Override - public int hashCode() { - return Objects.hash(type, id, token, status, paymentService); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class PaymentMethodToken {\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" token: ").append(toIndentedString(token)).append("\n"); - sb.append(" status: ").append(toIndentedString(status)).append("\n"); - sb.append(" paymentService: ").append(toIndentedString(paymentService)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/src/main/java/com/gr4vy/api/model/PaymentMethodTokenized.java b/src/main/java/com/gr4vy/api/model/PaymentMethodTokenized.java index 96b7f90..f3439fa 100644 --- a/src/main/java/com/gr4vy/api/model/PaymentMethodTokenized.java +++ b/src/main/java/com/gr4vy/api/model/PaymentMethodTokenized.java @@ -24,13 +24,13 @@ import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.UUID; -import org.threeten.bp.OffsetDateTime; + /** * A mini format version of a payment method. */ @ApiModel(description = "A mini format version of a payment method.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-08T13:56:38.178267Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-09-06T16:38:13.632050Z[Etc/UTC]") public class PaymentMethodTokenized { /** * `payment-method`. @@ -96,52 +96,122 @@ public TypeEnum read(final JsonReader jsonReader) throws IOException { public enum MethodEnum { AFTERPAY("afterpay"), + ALIPAY("alipay"), + + ALIPAYHK("alipayhk"), + APPLEPAY("applepay"), + BACS("bacs"), + + BANCONTACT("bancontact"), + BANKED("banked"), + BECS("becs"), + BITPAY("bitpay"), BOLETO("boleto"), + BOOST("boost"), + CARD("card"), + CHECKOUT_SESSION("checkout-session"), + CLEARPAY("clearpay"), DANA("dana"), + DCB("dcb"), + + EPS("eps"), + FORTUMO("fortumo"), GCASH("gcash"), + GIROPAY("giropay"), + GOCARDLESS("gocardless"), GOOGLEPAY("googlepay"), + GOPAY("gopay"), + GRABPAY("grabpay"), + IDEAL("ideal"), + + ID("id"), + + KAKAOPAY("kakaopay"), + KLARNA("klarna"), + LAYBUY("laybuy"), + + LINEPAY("linepay"), + + LINKAJA("linkaja"), + + MAYBANKQRPAY("maybankqrpay"), + + MULTIBANCO("multibanco"), + + ONEY_3X("oney_3x"), + + ONEY_4X("oney_4x"), + + ONEY_6X("oney_6x"), + + ONEY_10X("oney_10x"), + + ONEY_12X("oney_12x"), + OVO("ovo"), + OXXO("oxxo"), + PAYMAYA("paymaya"), PAYPAL("paypal"), + PAYPALPAYLATER("paypalpaylater"), + PIX("pix"), RABBITLINEPAY("rabbitlinepay"), + RAZORPAY("razorpay"), + SCALAPAY("scalapay"), + SEPA("sepa"), + SHOPEEPAY("shopeepay"), + SINGTELDASH("singteldash"), + + SOFORT("sofort"), + STRIPEDD("stripedd"), + THAIQR("thaiqr"), + + TOUCHNGO("touchngo"), + TRUEMONEY("truemoney"), TRUSTLY("trustly"), + VENMO("venmo"), + + WAAVE("waave"), + + WECHAT("wechat"), + ZIPPAY("zippay"); private String value; @@ -332,7 +402,7 @@ public ApprovalTargetEnum read(final JsonReader jsonReader) throws IOException { public static final String SERIALIZED_NAME_LAST_REPLACED_AT = "last_replaced_at"; @SerializedName(SERIALIZED_NAME_LAST_REPLACED_AT) - private OffsetDateTime lastReplacedAt; + private String lastReplacedAt; public static final String SERIALIZED_NAME_HAS_REPLACEMENT = "has_replacement"; @SerializedName(SERIALIZED_NAME_HAS_REPLACEMENT) @@ -592,7 +662,7 @@ public void setCountry(String country) { } - public PaymentMethodTokenized lastReplacedAt(OffsetDateTime lastReplacedAt) { + public PaymentMethodTokenized lastReplacedAt(String lastReplacedAt) { this.lastReplacedAt = lastReplacedAt; return this; @@ -605,12 +675,12 @@ public PaymentMethodTokenized lastReplacedAt(OffsetDateTime lastReplacedAt) { @javax.annotation.Nullable @ApiModelProperty(example = "2023-07-26T19:23Z", value = "The date and time when this card was last replaced. When the Account Updater determines that new card details are available (e.g. when it's about to expire), existing details are not changed immediately. The actual replacement occurs when a transaction using this payment method is declined with any of the following codes: * `canceled_payment_method` * `expired_payment_method` * `unavailable_payment_method` * `unknown_payment_method` When the replacement is applied, this field is updated. For non-card payment methods, the value of this field is always set to `null`.") - public OffsetDateTime getLastReplacedAt() { + public String getLastReplacedAt() { return lastReplacedAt; } - public void setLastReplacedAt(OffsetDateTime lastReplacedAt) { + public void setLastReplacedAt(String lastReplacedAt) { this.lastReplacedAt = lastReplacedAt; } diff --git a/src/main/java/com/gr4vy/api/model/PaymentMethodTokens.java b/src/main/java/com/gr4vy/api/model/PaymentMethodTokens.java deleted file mode 100644 index 360068f..0000000 --- a/src/main/java/com/gr4vy/api/model/PaymentMethodTokens.java +++ /dev/null @@ -1,110 +0,0 @@ -/* - * Gr4vy API - * Welcome to the Gr4vy API reference documentation. Our API is still very much a work in product and subject to change. - * - * The version of the OpenAPI document: 1.1.0-beta - * Contact: code@gr4vy.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.gr4vy.api.model; - -import java.util.Objects; -import java.util.Arrays; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import com.gr4vy.api.model.PaymentMethodToken; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.io.IOException; -import java.util.ArrayList; -import java.util.List; - -/** - * A list of tokens for a payment method. - */ -@ApiModel(description = "A list of tokens for a payment method.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2022-12-22T14:21:56.132305Z[Etc/UTC]") -public class PaymentMethodTokens { - public static final String SERIALIZED_NAME_ITEMS = "items"; - @SerializedName(SERIALIZED_NAME_ITEMS) - private List items = null; - - - public PaymentMethodTokens items(List items) { - - this.items = items; - return this; - } - - public PaymentMethodTokens addItemsItem(PaymentMethodToken itemsItem) { - if (this.items == null) { - this.items = new ArrayList(); - } - this.items.add(itemsItem); - return this; - } - - /** - * A list of stored tokens for payment methods. - * @return items - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "A list of stored tokens for payment methods.") - - public List getItems() { - return items; - } - - - public void setItems(List items) { - this.items = items; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - PaymentMethodTokens paymentMethodTokens = (PaymentMethodTokens) o; - return Objects.equals(this.items, paymentMethodTokens.items); - } - - @Override - public int hashCode() { - return Objects.hash(items); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class PaymentMethodTokens {\n"); - sb.append(" items: ").append(toIndentedString(items)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/src/main/java/com/gr4vy/api/model/PaymentMethods.java b/src/main/java/com/gr4vy/api/model/PaymentMethods.java index 0cab6c4..ca1c20b 100644 --- a/src/main/java/com/gr4vy/api/model/PaymentMethods.java +++ b/src/main/java/com/gr4vy/api/model/PaymentMethods.java @@ -31,7 +31,7 @@ * A list of stored payment methods. */ @ApiModel(description = "A list of stored payment methods.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-08T13:56:38.178267Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-09-06T16:38:13.632050Z[Etc/UTC]") public class PaymentMethods { public static final String SERIALIZED_NAME_ITEMS = "items"; @SerializedName(SERIALIZED_NAME_ITEMS) diff --git a/src/main/java/com/gr4vy/api/model/PaymentMethodsTokenized.java b/src/main/java/com/gr4vy/api/model/PaymentMethodsTokenized.java index 4790de6..92e05d8 100644 --- a/src/main/java/com/gr4vy/api/model/PaymentMethodsTokenized.java +++ b/src/main/java/com/gr4vy/api/model/PaymentMethodsTokenized.java @@ -31,7 +31,7 @@ * A list of stored payment methods in summarized format. */ @ApiModel(description = "A list of stored payment methods in summarized format.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-08T13:56:38.178267Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-09-06T16:38:13.632050Z[Etc/UTC]") public class PaymentMethodsTokenized { public static final String SERIALIZED_NAME_ITEMS = "items"; @SerializedName(SERIALIZED_NAME_ITEMS) diff --git a/src/main/java/com/gr4vy/api/model/PaymentOption.java b/src/main/java/com/gr4vy/api/model/PaymentOption.java index 4ea3b93..73b2256 100644 --- a/src/main/java/com/gr4vy/api/model/PaymentOption.java +++ b/src/main/java/com/gr4vy/api/model/PaymentOption.java @@ -29,7 +29,7 @@ * An available payment option for a locale. */ @ApiModel(description = "An available payment option for a locale.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-08T13:56:38.178267Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-09-06T16:38:13.632050Z[Etc/UTC]") public class PaymentOption { /** * `payment-option`. @@ -87,52 +87,122 @@ public TypeEnum read(final JsonReader jsonReader) throws IOException { public enum MethodEnum { AFTERPAY("afterpay"), + ALIPAY("alipay"), + + ALIPAYHK("alipayhk"), + APPLEPAY("applepay"), + BACS("bacs"), + + BANCONTACT("bancontact"), + BANKED("banked"), + BECS("becs"), + BITPAY("bitpay"), BOLETO("boleto"), + BOOST("boost"), + CARD("card"), + CHECKOUT_SESSION("checkout-session"), + CLEARPAY("clearpay"), DANA("dana"), + DCB("dcb"), + + EPS("eps"), + FORTUMO("fortumo"), GCASH("gcash"), + GIROPAY("giropay"), + GOCARDLESS("gocardless"), GOOGLEPAY("googlepay"), + GOPAY("gopay"), + GRABPAY("grabpay"), + IDEAL("ideal"), + + ID("id"), + + KAKAOPAY("kakaopay"), + KLARNA("klarna"), + LAYBUY("laybuy"), + + LINEPAY("linepay"), + + LINKAJA("linkaja"), + + MAYBANKQRPAY("maybankqrpay"), + + MULTIBANCO("multibanco"), + + ONEY_3X("oney_3x"), + + ONEY_4X("oney_4x"), + + ONEY_6X("oney_6x"), + + ONEY_10X("oney_10x"), + + ONEY_12X("oney_12x"), + OVO("ovo"), + OXXO("oxxo"), + PAYMAYA("paymaya"), PAYPAL("paypal"), + PAYPALPAYLATER("paypalpaylater"), + PIX("pix"), RABBITLINEPAY("rabbitlinepay"), + RAZORPAY("razorpay"), + SCALAPAY("scalapay"), + SEPA("sepa"), + SHOPEEPAY("shopeepay"), + SINGTELDASH("singteldash"), + + SOFORT("sofort"), + STRIPEDD("stripedd"), + THAIQR("thaiqr"), + + TOUCHNGO("touchngo"), + TRUEMONEY("truemoney"), TRUSTLY("trustly"), + VENMO("venmo"), + + WAAVE("waave"), + + WECHAT("wechat"), + ZIPPAY("zippay"); private String value; diff --git a/src/main/java/com/gr4vy/api/model/PaymentOptionApprovalUI.java b/src/main/java/com/gr4vy/api/model/PaymentOptionApprovalUI.java index 1f7640f..f9b11c6 100644 --- a/src/main/java/com/gr4vy/api/model/PaymentOptionApprovalUI.java +++ b/src/main/java/com/gr4vy/api/model/PaymentOptionApprovalUI.java @@ -28,7 +28,7 @@ * Configuration for the approval interface that should be shown to the buyer. */ @ApiModel(description = "Configuration for the approval interface that should be shown to the buyer.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-08T13:56:38.178267Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-09-06T16:38:13.632050Z[Etc/UTC]") public class PaymentOptionApprovalUI { public static final String SERIALIZED_NAME_HEIGHT = "height"; @SerializedName(SERIALIZED_NAME_HEIGHT) diff --git a/src/main/java/com/gr4vy/api/model/PaymentOptionContext.java b/src/main/java/com/gr4vy/api/model/PaymentOptionContext.java index bde1b78..b7ddebe 100644 --- a/src/main/java/com/gr4vy/api/model/PaymentOptionContext.java +++ b/src/main/java/com/gr4vy/api/model/PaymentOptionContext.java @@ -32,7 +32,7 @@ * Additional context specific to the payment option. This is currently only returned for Apple Pay and Google Pay. */ @ApiModel(description = "Additional context specific to the payment option. This is currently only returned for Apple Pay and Google Pay.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-08T13:56:38.178267Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-09-06T16:38:13.632050Z[Etc/UTC]") public class PaymentOptionContext { public static final String SERIALIZED_NAME_GATEWAY = "gateway"; @SerializedName(SERIALIZED_NAME_GATEWAY) diff --git a/src/main/java/com/gr4vy/api/model/PaymentOptions.java b/src/main/java/com/gr4vy/api/model/PaymentOptions.java index fd51428..5602056 100644 --- a/src/main/java/com/gr4vy/api/model/PaymentOptions.java +++ b/src/main/java/com/gr4vy/api/model/PaymentOptions.java @@ -31,7 +31,7 @@ * A list of payment options. */ @ApiModel(description = "A list of payment options.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-08T13:56:38.178267Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-09-06T16:38:13.632050Z[Etc/UTC]") public class PaymentOptions { public static final String SERIALIZED_NAME_ITEMS = "items"; @SerializedName(SERIALIZED_NAME_ITEMS) diff --git a/src/main/java/com/gr4vy/api/model/PaymentOptionsRequest.java b/src/main/java/com/gr4vy/api/model/PaymentOptionsRequest.java index dadb62d..c6ae558 100644 --- a/src/main/java/com/gr4vy/api/model/PaymentOptionsRequest.java +++ b/src/main/java/com/gr4vy/api/model/PaymentOptionsRequest.java @@ -33,7 +33,7 @@ * A request to get list of payment options. */ @ApiModel(description = "A request to get list of payment options.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-08T13:56:38.178267Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-09-06T16:38:13.632050Z[Etc/UTC]") public class PaymentOptionsRequest { public static final String SERIALIZED_NAME_AMOUNT = "amount"; @SerializedName(SERIALIZED_NAME_AMOUNT) diff --git a/src/main/java/com/gr4vy/api/model/PaymentService.java b/src/main/java/com/gr4vy/api/model/PaymentService.java index 0ffe232..4bfc9cb 100644 --- a/src/main/java/com/gr4vy/api/model/PaymentService.java +++ b/src/main/java/com/gr4vy/api/model/PaymentService.java @@ -28,13 +28,13 @@ import java.util.ArrayList; import java.util.List; import java.util.UUID; -import org.threeten.bp.OffsetDateTime; + /** * An active, configured payment service. */ @ApiModel(description = "An active, configured payment service.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-08T13:56:38.178267Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-09-06T16:38:13.632050Z[Etc/UTC]") public class PaymentService { /** * The type of this resource. @@ -104,52 +104,122 @@ public TypeEnum read(final JsonReader jsonReader) throws IOException { public enum MethodEnum { AFTERPAY("afterpay"), + ALIPAY("alipay"), + + ALIPAYHK("alipayhk"), + APPLEPAY("applepay"), + BACS("bacs"), + + BANCONTACT("bancontact"), + BANKED("banked"), + BECS("becs"), + BITPAY("bitpay"), BOLETO("boleto"), + BOOST("boost"), + CARD("card"), + CHECKOUT_SESSION("checkout-session"), + CLEARPAY("clearpay"), DANA("dana"), + DCB("dcb"), + + EPS("eps"), + FORTUMO("fortumo"), GCASH("gcash"), + GIROPAY("giropay"), + GOCARDLESS("gocardless"), GOOGLEPAY("googlepay"), + GOPAY("gopay"), + GRABPAY("grabpay"), + IDEAL("ideal"), + + ID("id"), + + KAKAOPAY("kakaopay"), + KLARNA("klarna"), + LAYBUY("laybuy"), + + LINEPAY("linepay"), + + LINKAJA("linkaja"), + + MAYBANKQRPAY("maybankqrpay"), + + MULTIBANCO("multibanco"), + + ONEY_3X("oney_3x"), + + ONEY_4X("oney_4x"), + + ONEY_6X("oney_6x"), + + ONEY_10X("oney_10x"), + + ONEY_12X("oney_12x"), + OVO("ovo"), + OXXO("oxxo"), + PAYMAYA("paymaya"), PAYPAL("paypal"), + PAYPALPAYLATER("paypalpaylater"), + PIX("pix"), RABBITLINEPAY("rabbitlinepay"), + RAZORPAY("razorpay"), + SCALAPAY("scalapay"), + SEPA("sepa"), + SHOPEEPAY("shopeepay"), + SINGTELDASH("singteldash"), + + SOFORT("sofort"), + STRIPEDD("stripedd"), + THAIQR("thaiqr"), + + TOUCHNGO("touchngo"), + TRUEMONEY("truemoney"), TRUSTLY("trustly"), + VENMO("venmo"), + + WAAVE("waave"), + + WECHAT("wechat"), + ZIPPAY("zippay"); private String value; @@ -285,11 +355,11 @@ public StatusEnum read(final JsonReader jsonReader) throws IOException { public static final String SERIALIZED_NAME_CREATED_AT = "created_at"; @SerializedName(SERIALIZED_NAME_CREATED_AT) - private OffsetDateTime createdAt; + private String createdAt; public static final String SERIALIZED_NAME_UPDATED_AT = "updated_at"; @SerializedName(SERIALIZED_NAME_UPDATED_AT) - private OffsetDateTime updatedAt; + private String updatedAt; public static final String SERIALIZED_NAME_WEBHOOK_URL = "webhook_url"; @SerializedName(SERIALIZED_NAME_WEBHOOK_URL) @@ -661,7 +731,7 @@ public void setActive(Boolean active) { } - public PaymentService createdAt(OffsetDateTime createdAt) { + public PaymentService createdAt(String createdAt) { this.createdAt = createdAt; return this; @@ -674,17 +744,17 @@ public PaymentService createdAt(OffsetDateTime createdAt) { @javax.annotation.Nullable @ApiModelProperty(example = "2012-12-12T10:53:43Z", value = "The date and time when this service was created.") - public OffsetDateTime getCreatedAt() { + public String getCreatedAt() { return createdAt; } - public void setCreatedAt(OffsetDateTime createdAt) { + public void setCreatedAt(String createdAt) { this.createdAt = createdAt; } - public PaymentService updatedAt(OffsetDateTime updatedAt) { + public PaymentService updatedAt(String updatedAt) { this.updatedAt = updatedAt; return this; @@ -697,12 +767,12 @@ public PaymentService updatedAt(OffsetDateTime updatedAt) { @javax.annotation.Nullable @ApiModelProperty(example = "2012-12-12T10:53:43Z", value = "The date and time when this service was last updated.") - public OffsetDateTime getUpdatedAt() { + public String getUpdatedAt() { return updatedAt; } - public void setUpdatedAt(OffsetDateTime updatedAt) { + public void setUpdatedAt(String updatedAt) { this.updatedAt = updatedAt; } diff --git a/src/main/java/com/gr4vy/api/model/PaymentServiceDefinition.java b/src/main/java/com/gr4vy/api/model/PaymentServiceDefinition.java index c8b0590..077220f 100644 --- a/src/main/java/com/gr4vy/api/model/PaymentServiceDefinition.java +++ b/src/main/java/com/gr4vy/api/model/PaymentServiceDefinition.java @@ -33,7 +33,7 @@ * An available payment service that can be configured. */ @ApiModel(description = "An available payment service that can be configured.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-08T13:56:38.178267Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-09-06T16:38:13.632050Z[Etc/UTC]") public class PaymentServiceDefinition { public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) @@ -54,52 +54,122 @@ public class PaymentServiceDefinition { public enum MethodEnum { AFTERPAY("afterpay"), + ALIPAY("alipay"), + + ALIPAYHK("alipayhk"), + APPLEPAY("applepay"), + BACS("bacs"), + + BANCONTACT("bancontact"), + BANKED("banked"), + BECS("becs"), + BITPAY("bitpay"), BOLETO("boleto"), + BOOST("boost"), + CARD("card"), + CHECKOUT_SESSION("checkout-session"), + CLEARPAY("clearpay"), DANA("dana"), + DCB("dcb"), + + EPS("eps"), + FORTUMO("fortumo"), GCASH("gcash"), + GIROPAY("giropay"), + GOCARDLESS("gocardless"), GOOGLEPAY("googlepay"), + GOPAY("gopay"), + GRABPAY("grabpay"), + IDEAL("ideal"), + + ID("id"), + + KAKAOPAY("kakaopay"), + KLARNA("klarna"), + LAYBUY("laybuy"), + + LINEPAY("linepay"), + + LINKAJA("linkaja"), + + MAYBANKQRPAY("maybankqrpay"), + + MULTIBANCO("multibanco"), + + ONEY_3X("oney_3x"), + + ONEY_4X("oney_4x"), + + ONEY_6X("oney_6x"), + + ONEY_10X("oney_10x"), + + ONEY_12X("oney_12x"), + OVO("ovo"), + OXXO("oxxo"), + PAYMAYA("paymaya"), PAYPAL("paypal"), + PAYPALPAYLATER("paypalpaylater"), + PIX("pix"), RABBITLINEPAY("rabbitlinepay"), + RAZORPAY("razorpay"), + SCALAPAY("scalapay"), + SEPA("sepa"), + SHOPEEPAY("shopeepay"), + SINGTELDASH("singteldash"), + + SOFORT("sofort"), + STRIPEDD("stripedd"), + THAIQR("thaiqr"), + + TOUCHNGO("touchngo"), + TRUEMONEY("truemoney"), TRUSTLY("trustly"), + VENMO("venmo"), + + WAAVE("waave"), + + WECHAT("wechat"), + ZIPPAY("zippay"); private String value; diff --git a/src/main/java/com/gr4vy/api/model/PaymentServiceDefinitionConfiguration.java b/src/main/java/com/gr4vy/api/model/PaymentServiceDefinitionConfiguration.java index 26addd0..b0f72c3 100644 --- a/src/main/java/com/gr4vy/api/model/PaymentServiceDefinitionConfiguration.java +++ b/src/main/java/com/gr4vy/api/model/PaymentServiceDefinitionConfiguration.java @@ -28,7 +28,7 @@ * Configuration items for the payment service. */ @ApiModel(description = "Configuration items for the payment service.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-08T13:56:38.178267Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-09-06T16:38:13.632050Z[Etc/UTC]") public class PaymentServiceDefinitionConfiguration { public static final String SERIALIZED_NAME_APPROVAL_UI_HEIGHT = "approval_ui_height"; @SerializedName(SERIALIZED_NAME_APPROVAL_UI_HEIGHT) diff --git a/src/main/java/com/gr4vy/api/model/PaymentServiceDefinitionFields.java b/src/main/java/com/gr4vy/api/model/PaymentServiceDefinitionFields.java index a1f9791..cd29108 100644 --- a/src/main/java/com/gr4vy/api/model/PaymentServiceDefinitionFields.java +++ b/src/main/java/com/gr4vy/api/model/PaymentServiceDefinitionFields.java @@ -28,7 +28,7 @@ * A single field that needs to be submitted for a payment service when it is created. */ @ApiModel(description = "A single field that needs to be submitted for a payment service when it is created.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-08T13:56:38.178267Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-09-06T16:38:13.632050Z[Etc/UTC]") public class PaymentServiceDefinitionFields { public static final String SERIALIZED_NAME_KEY = "key"; @SerializedName(SERIALIZED_NAME_KEY) diff --git a/src/main/java/com/gr4vy/api/model/PaymentServiceDefinitionSupportedFeatures.java b/src/main/java/com/gr4vy/api/model/PaymentServiceDefinitionSupportedFeatures.java index c53a2dc..3af885d 100644 --- a/src/main/java/com/gr4vy/api/model/PaymentServiceDefinitionSupportedFeatures.java +++ b/src/main/java/com/gr4vy/api/model/PaymentServiceDefinitionSupportedFeatures.java @@ -28,7 +28,7 @@ * Features supported by the payment definition. */ @ApiModel(description = "Features supported by the payment definition.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-08T13:56:38.178267Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-09-06T16:38:13.632050Z[Etc/UTC]") public class PaymentServiceDefinitionSupportedFeatures { public static final String SERIALIZED_NAME_DELAYED_CAPTURE = "delayed_capture"; @SerializedName(SERIALIZED_NAME_DELAYED_CAPTURE) diff --git a/src/main/java/com/gr4vy/api/model/PaymentServiceDefinitions.java b/src/main/java/com/gr4vy/api/model/PaymentServiceDefinitions.java index 4312f46..8a7fcee 100644 --- a/src/main/java/com/gr4vy/api/model/PaymentServiceDefinitions.java +++ b/src/main/java/com/gr4vy/api/model/PaymentServiceDefinitions.java @@ -31,7 +31,7 @@ * A list of available payment services definitions. */ @ApiModel(description = "A list of available payment services definitions.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-08T13:56:38.178267Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-09-06T16:38:13.632050Z[Etc/UTC]") public class PaymentServiceDefinitions { public static final String SERIALIZED_NAME_ITEMS = "items"; @SerializedName(SERIALIZED_NAME_ITEMS) diff --git a/src/main/java/com/gr4vy/api/model/PaymentServiceFields.java b/src/main/java/com/gr4vy/api/model/PaymentServiceFields.java index 9a811fb..28c2e84 100644 --- a/src/main/java/com/gr4vy/api/model/PaymentServiceFields.java +++ b/src/main/java/com/gr4vy/api/model/PaymentServiceFields.java @@ -27,7 +27,7 @@ /** * PaymentServiceFields */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-08T13:56:38.178267Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-09-06T16:38:13.632050Z[Etc/UTC]") public class PaymentServiceFields { public static final String SERIALIZED_NAME_KEY = "key"; @SerializedName(SERIALIZED_NAME_KEY) diff --git a/src/main/java/com/gr4vy/api/model/PaymentServiceRequest.java b/src/main/java/com/gr4vy/api/model/PaymentServiceRequest.java index 9080b56..3fa25aa 100644 --- a/src/main/java/com/gr4vy/api/model/PaymentServiceRequest.java +++ b/src/main/java/com/gr4vy/api/model/PaymentServiceRequest.java @@ -32,7 +32,7 @@ * Request body for activating a payment service. */ @ApiModel(description = "Request body for activating a payment service.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-08T13:56:38.178267Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-09-06T16:38:13.632050Z[Etc/UTC]") public class PaymentServiceRequest { public static final String SERIALIZED_NAME_PAYMENT_SERVICE_DEFINITION_ID = "payment_service_definition_id"; @SerializedName(SERIALIZED_NAME_PAYMENT_SERVICE_DEFINITION_ID) diff --git a/src/main/java/com/gr4vy/api/model/PaymentServiceRequestAllOf.java b/src/main/java/com/gr4vy/api/model/PaymentServiceRequestAllOf.java deleted file mode 100644 index ceb5d85..0000000 --- a/src/main/java/com/gr4vy/api/model/PaymentServiceRequestAllOf.java +++ /dev/null @@ -1,98 +0,0 @@ -/* - * Gr4vy API - * Welcome to the Gr4vy API reference documentation. Our API is still very much a work in product and subject to change. - * - * The version of the OpenAPI document: 1.1.0-beta - * Contact: code@gr4vy.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.gr4vy.api.model; - -import java.util.Objects; -import java.util.Arrays; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.io.IOException; - -/** - * PaymentServiceRequestAllOf - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2022-12-22T14:21:56.132305Z[Etc/UTC]") -public class PaymentServiceRequestAllOf { - public static final String SERIALIZED_NAME_PAYMENT_SERVICE_DEFINITION_ID = "payment_service_definition_id"; - @SerializedName(SERIALIZED_NAME_PAYMENT_SERVICE_DEFINITION_ID) - private String paymentServiceDefinitionId; - - - public PaymentServiceRequestAllOf paymentServiceDefinitionId(String paymentServiceDefinitionId) { - - this.paymentServiceDefinitionId = paymentServiceDefinitionId; - return this; - } - - /** - * The ID of the payment service to use. - * @return paymentServiceDefinitionId - **/ - @javax.annotation.Nullable - @ApiModelProperty(example = "stripe-card", value = "The ID of the payment service to use.") - - public String getPaymentServiceDefinitionId() { - return paymentServiceDefinitionId; - } - - - public void setPaymentServiceDefinitionId(String paymentServiceDefinitionId) { - this.paymentServiceDefinitionId = paymentServiceDefinitionId; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - PaymentServiceRequestAllOf paymentServiceRequestAllOf = (PaymentServiceRequestAllOf) o; - return Objects.equals(this.paymentServiceDefinitionId, paymentServiceRequestAllOf.paymentServiceDefinitionId); - } - - @Override - public int hashCode() { - return Objects.hash(paymentServiceDefinitionId); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class PaymentServiceRequestAllOf {\n"); - sb.append(" paymentServiceDefinitionId: ").append(toIndentedString(paymentServiceDefinitionId)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/src/main/java/com/gr4vy/api/model/PaymentServiceRequestFields.java b/src/main/java/com/gr4vy/api/model/PaymentServiceRequestFields.java index a77a112..7a4005e 100644 --- a/src/main/java/com/gr4vy/api/model/PaymentServiceRequestFields.java +++ b/src/main/java/com/gr4vy/api/model/PaymentServiceRequestFields.java @@ -28,7 +28,7 @@ * A key-value pair that represents a field defined in the definition for this payment service. */ @ApiModel(description = "A key-value pair that represents a field defined in the definition for this payment service.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-08T13:56:38.178267Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-09-06T16:38:13.632050Z[Etc/UTC]") public class PaymentServiceRequestFields { public static final String SERIALIZED_NAME_KEY = "key"; @SerializedName(SERIALIZED_NAME_KEY) diff --git a/src/main/java/com/gr4vy/api/model/PaymentServiceSnapshot.java b/src/main/java/com/gr4vy/api/model/PaymentServiceSnapshot.java index 380cbda..adc3f88 100644 --- a/src/main/java/com/gr4vy/api/model/PaymentServiceSnapshot.java +++ b/src/main/java/com/gr4vy/api/model/PaymentServiceSnapshot.java @@ -28,7 +28,7 @@ * An active, configured payment service. */ @ApiModel(description = "An active, configured payment service.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-08T13:56:38.178267Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-09-06T16:38:13.632050Z[Etc/UTC]") public class PaymentServiceSnapshot { /** * The type of this resource. @@ -94,52 +94,122 @@ public TypeEnum read(final JsonReader jsonReader) throws IOException { public enum MethodEnum { AFTERPAY("afterpay"), + ALIPAY("alipay"), + + ALIPAYHK("alipayhk"), + APPLEPAY("applepay"), + BACS("bacs"), + + BANCONTACT("bancontact"), + BANKED("banked"), + BECS("becs"), + BITPAY("bitpay"), BOLETO("boleto"), + BOOST("boost"), + CARD("card"), + CHECKOUT_SESSION("checkout-session"), + CLEARPAY("clearpay"), DANA("dana"), + DCB("dcb"), + + EPS("eps"), + FORTUMO("fortumo"), GCASH("gcash"), + GIROPAY("giropay"), + GOCARDLESS("gocardless"), GOOGLEPAY("googlepay"), + GOPAY("gopay"), + GRABPAY("grabpay"), + IDEAL("ideal"), + + ID("id"), + + KAKAOPAY("kakaopay"), + KLARNA("klarna"), + LAYBUY("laybuy"), + + LINEPAY("linepay"), + + LINKAJA("linkaja"), + + MAYBANKQRPAY("maybankqrpay"), + + MULTIBANCO("multibanco"), + + ONEY_3X("oney_3x"), + + ONEY_4X("oney_4x"), + + ONEY_6X("oney_6x"), + + ONEY_10X("oney_10x"), + + ONEY_12X("oney_12x"), + OVO("ovo"), + OXXO("oxxo"), + PAYMAYA("paymaya"), PAYPAL("paypal"), + PAYPALPAYLATER("paypalpaylater"), + PIX("pix"), RABBITLINEPAY("rabbitlinepay"), + RAZORPAY("razorpay"), + SCALAPAY("scalapay"), + SEPA("sepa"), + SHOPEEPAY("shopeepay"), + SINGTELDASH("singteldash"), + + SOFORT("sofort"), + STRIPEDD("stripedd"), + THAIQR("thaiqr"), + + TOUCHNGO("touchngo"), + TRUEMONEY("truemoney"), TRUSTLY("trustly"), + VENMO("venmo"), + + WAAVE("waave"), + + WECHAT("wechat"), + ZIPPAY("zippay"); private String value; diff --git a/src/main/java/com/gr4vy/api/model/PaymentServiceToken.java b/src/main/java/com/gr4vy/api/model/PaymentServiceToken.java index 3ba0462..660a7b9 100644 --- a/src/main/java/com/gr4vy/api/model/PaymentServiceToken.java +++ b/src/main/java/com/gr4vy/api/model/PaymentServiceToken.java @@ -24,13 +24,13 @@ import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.UUID; -import org.threeten.bp.OffsetDateTime; + /** * A payment service token. */ @ApiModel(description = "A payment service token.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-08T13:56:38.178267Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-09-06T16:38:13.632050Z[Etc/UTC]") public class PaymentServiceToken { public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) @@ -109,11 +109,11 @@ public StatusEnum read(final JsonReader jsonReader) throws IOException { public static final String SERIALIZED_NAME_CREATED_AT = "created_at"; @SerializedName(SERIALIZED_NAME_CREATED_AT) - private OffsetDateTime createdAt; + private String createdAt; public static final String SERIALIZED_NAME_UPDATED_AT = "updated_at"; @SerializedName(SERIALIZED_NAME_UPDATED_AT) - private OffsetDateTime updatedAt; + private String updatedAt; public PaymentServiceToken id(UUID id) { @@ -254,7 +254,7 @@ public void setToken(String token) { } - public PaymentServiceToken createdAt(OffsetDateTime createdAt) { + public PaymentServiceToken createdAt(String createdAt) { this.createdAt = createdAt; return this; @@ -267,17 +267,17 @@ public PaymentServiceToken createdAt(OffsetDateTime createdAt) { @javax.annotation.Nullable @ApiModelProperty(example = "2021-01-01T12:34Z", value = "The date and time when this token was first created in our system.") - public OffsetDateTime getCreatedAt() { + public String getCreatedAt() { return createdAt; } - public void setCreatedAt(OffsetDateTime createdAt) { + public void setCreatedAt(String createdAt) { this.createdAt = createdAt; } - public PaymentServiceToken updatedAt(OffsetDateTime updatedAt) { + public PaymentServiceToken updatedAt(String updatedAt) { this.updatedAt = updatedAt; return this; @@ -290,12 +290,12 @@ public PaymentServiceToken updatedAt(OffsetDateTime updatedAt) { @javax.annotation.Nullable @ApiModelProperty(example = "2021-01-01T12:34Z", value = "The date and time when this token was last updated in our system.") - public OffsetDateTime getUpdatedAt() { + public String getUpdatedAt() { return updatedAt; } - public void setUpdatedAt(OffsetDateTime updatedAt) { + public void setUpdatedAt(String updatedAt) { this.updatedAt = updatedAt; } diff --git a/src/main/java/com/gr4vy/api/model/PaymentServiceTokenRequest.java b/src/main/java/com/gr4vy/api/model/PaymentServiceTokenRequest.java index 8eaa295..ea07e8f 100644 --- a/src/main/java/com/gr4vy/api/model/PaymentServiceTokenRequest.java +++ b/src/main/java/com/gr4vy/api/model/PaymentServiceTokenRequest.java @@ -29,7 +29,7 @@ * Request body for provision a payment service token. */ @ApiModel(description = "Request body for provision a payment service token.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-08T13:56:38.178267Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-09-06T16:38:13.632050Z[Etc/UTC]") public class PaymentServiceTokenRequest { public static final String SERIALIZED_NAME_SECURITY_CODE = "security_code"; @SerializedName(SERIALIZED_NAME_SECURITY_CODE) diff --git a/src/main/java/com/gr4vy/api/model/PaymentServiceTokens.java b/src/main/java/com/gr4vy/api/model/PaymentServiceTokens.java index 58e3e24..4bc3f2f 100644 --- a/src/main/java/com/gr4vy/api/model/PaymentServiceTokens.java +++ b/src/main/java/com/gr4vy/api/model/PaymentServiceTokens.java @@ -31,7 +31,7 @@ * A list of payment service tokens. */ @ApiModel(description = "A list of payment service tokens.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-08T13:56:38.178267Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-09-06T16:38:13.632050Z[Etc/UTC]") public class PaymentServiceTokens { public static final String SERIALIZED_NAME_ITEMS = "items"; @SerializedName(SERIALIZED_NAME_ITEMS) diff --git a/src/main/java/com/gr4vy/api/model/PaymentServiceUpdate.java b/src/main/java/com/gr4vy/api/model/PaymentServiceUpdate.java index 015cce7..bd503cf 100644 --- a/src/main/java/com/gr4vy/api/model/PaymentServiceUpdate.java +++ b/src/main/java/com/gr4vy/api/model/PaymentServiceUpdate.java @@ -32,7 +32,7 @@ * Request body for updating an active payment service. */ @ApiModel(description = "Request body for updating an active payment service.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-08T13:56:38.178267Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-09-06T16:38:13.632050Z[Etc/UTC]") public class PaymentServiceUpdate { public static final String SERIALIZED_NAME_DISPLAY_NAME = "display_name"; @SerializedName(SERIALIZED_NAME_DISPLAY_NAME) diff --git a/src/main/java/com/gr4vy/api/model/PaymentServiceUpdateFields.java b/src/main/java/com/gr4vy/api/model/PaymentServiceUpdateFields.java deleted file mode 100644 index 697f329..0000000 --- a/src/main/java/com/gr4vy/api/model/PaymentServiceUpdateFields.java +++ /dev/null @@ -1,126 +0,0 @@ -/* - * Gr4vy API - * Welcome to the Gr4vy API reference documentation. Our API is still very much a work in product and subject to change. - * - * The version of the OpenAPI document: 1.1.0-beta - * Contact: code@gr4vy.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.gr4vy.api.model; - -import java.util.Objects; -import java.util.Arrays; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.io.IOException; - -/** - * A key-value pair that represents a field defined in the definition for this payment service. - */ -@ApiModel(description = "A key-value pair that represents a field defined in the definition for this payment service.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2022-12-22T14:21:56.132305Z[Etc/UTC]") -public class PaymentServiceUpdateFields { - public static final String SERIALIZED_NAME_KEY = "key"; - @SerializedName(SERIALIZED_NAME_KEY) - private String key; - - public static final String SERIALIZED_NAME_VALUE = "value"; - @SerializedName(SERIALIZED_NAME_VALUE) - private String value; - - - public PaymentServiceUpdateFields key(String key) { - - this.key = key; - return this; - } - - /** - * The key of the field to set a value for. - * @return key - **/ - @ApiModelProperty(example = "private_key", required = true, value = "The key of the field to set a value for.") - - public String getKey() { - return key; - } - - - public void setKey(String key) { - this.key = key; - } - - - public PaymentServiceUpdateFields value(String value) { - - this.value = value; - return this; - } - - /** - * The value of a field to set. - * @return value - **/ - @ApiModelProperty(example = "sk_test_26PHem9AhJZvU623DfE1x4sd", required = true, value = "The value of a field to set.") - - 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; - } - PaymentServiceUpdateFields paymentServiceUpdateFields = (PaymentServiceUpdateFields) o; - return Objects.equals(this.key, paymentServiceUpdateFields.key) && - Objects.equals(this.value, paymentServiceUpdateFields.value); - } - - @Override - public int hashCode() { - return Objects.hash(key, value); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class PaymentServiceUpdateFields {\n"); - sb.append(" key: ").append(toIndentedString(key)).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 "); - } - -} - diff --git a/src/main/java/com/gr4vy/api/model/PaymentServices.java b/src/main/java/com/gr4vy/api/model/PaymentServices.java index f72c0bb..4935863 100644 --- a/src/main/java/com/gr4vy/api/model/PaymentServices.java +++ b/src/main/java/com/gr4vy/api/model/PaymentServices.java @@ -31,7 +31,7 @@ * A list of active, configured payment services. */ @ApiModel(description = "A list of active, configured payment services.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-08T13:56:38.178267Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-09-06T16:38:13.632050Z[Etc/UTC]") public class PaymentServices { public static final String SERIALIZED_NAME_ITEMS = "items"; @SerializedName(SERIALIZED_NAME_ITEMS) diff --git a/src/main/java/com/gr4vy/api/model/RedirectRequest.java b/src/main/java/com/gr4vy/api/model/RedirectRequest.java index 42a763d..f05dd6d 100644 --- a/src/main/java/com/gr4vy/api/model/RedirectRequest.java +++ b/src/main/java/com/gr4vy/api/model/RedirectRequest.java @@ -29,7 +29,7 @@ * Details to register a new redirect payment method. */ @ApiModel(description = "Details to register a new redirect payment method.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-08T13:56:38.178267Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-09-06T16:38:13.632050Z[Etc/UTC]") public class RedirectRequest { /** * The method to use, this can be any of the methods that support redirect requests. When storing a new payment method, only `gocardless` and `stripedd` are currently supported. diff --git a/src/main/java/com/gr4vy/api/model/Refund.java b/src/main/java/com/gr4vy/api/model/Refund.java index 1a7b844..5032638 100644 --- a/src/main/java/com/gr4vy/api/model/Refund.java +++ b/src/main/java/com/gr4vy/api/model/Refund.java @@ -24,13 +24,13 @@ import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.UUID; -import org.threeten.bp.OffsetDateTime; + /** * A refund record. A refund is always associated with a single transaction, while a transaction can potentially have several refunds. */ @ApiModel(description = "A refund record. A refund is always associated with a single transaction, while a transaction can potentially have several refunds.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-08T13:56:38.178267Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-09-06T16:38:13.632050Z[Etc/UTC]") public class Refund { /** * The type of this resource. Is always `refund`. @@ -156,11 +156,11 @@ public StatusEnum read(final JsonReader jsonReader) throws IOException { public static final String SERIALIZED_NAME_CREATED_AT = "created_at"; @SerializedName(SERIALIZED_NAME_CREATED_AT) - private OffsetDateTime createdAt; + private String createdAt; public static final String SERIALIZED_NAME_UPDATED_AT = "updated_at"; @SerializedName(SERIALIZED_NAME_UPDATED_AT) - private OffsetDateTime updatedAt; + private String updatedAt; public Refund type(TypeEnum type) { @@ -303,7 +303,7 @@ public void setAmount(Integer amount) { } - public Refund createdAt(OffsetDateTime createdAt) { + public Refund createdAt(String createdAt) { this.createdAt = createdAt; return this; @@ -316,17 +316,17 @@ public Refund createdAt(OffsetDateTime createdAt) { @javax.annotation.Nullable @ApiModelProperty(example = "2013-07-16T19:23Z", value = "The date and time when this refund was created.") - public OffsetDateTime getCreatedAt() { + public String getCreatedAt() { return createdAt; } - public void setCreatedAt(OffsetDateTime createdAt) { + public void setCreatedAt(String createdAt) { this.createdAt = createdAt; } - public Refund updatedAt(OffsetDateTime updatedAt) { + public Refund updatedAt(String updatedAt) { this.updatedAt = updatedAt; return this; @@ -339,12 +339,12 @@ public Refund updatedAt(OffsetDateTime updatedAt) { @javax.annotation.Nullable @ApiModelProperty(example = "2013-07-16T19:23Z", value = "The date and time when this refund was last updated.") - public OffsetDateTime getUpdatedAt() { + public String getUpdatedAt() { return updatedAt; } - public void setUpdatedAt(OffsetDateTime updatedAt) { + public void setUpdatedAt(String updatedAt) { this.updatedAt = updatedAt; } diff --git a/src/main/java/com/gr4vy/api/model/Refunds.java b/src/main/java/com/gr4vy/api/model/Refunds.java index f7d1335..9d1f931 100644 --- a/src/main/java/com/gr4vy/api/model/Refunds.java +++ b/src/main/java/com/gr4vy/api/model/Refunds.java @@ -31,7 +31,7 @@ * A list of refunds. */ @ApiModel(description = "A list of refunds.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-08T13:56:38.178267Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-09-06T16:38:13.632050Z[Etc/UTC]") public class Refunds { public static final String SERIALIZED_NAME_ITEMS = "items"; @SerializedName(SERIALIZED_NAME_ITEMS) diff --git a/src/main/java/com/gr4vy/api/model/Report.java b/src/main/java/com/gr4vy/api/model/Report.java index eb808c9..3b96e31 100644 --- a/src/main/java/com/gr4vy/api/model/Report.java +++ b/src/main/java/com/gr4vy/api/model/Report.java @@ -27,25 +27,25 @@ import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.UUID; -import org.threeten.bp.OffsetDateTime; + /** * A report record. */ @ApiModel(description = "A report record.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-08T13:56:38.178267Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-09-06T16:38:13.632050Z[Etc/UTC]") public class Report { public static final String SERIALIZED_NAME_CREATED_AT = "created_at"; @SerializedName(SERIALIZED_NAME_CREATED_AT) - private OffsetDateTime createdAt; + private String createdAt; public static final String SERIALIZED_NAME_UPDATED_AT = "updated_at"; @SerializedName(SERIALIZED_NAME_UPDATED_AT) - private OffsetDateTime updatedAt; + private String updatedAt; public static final String SERIALIZED_NAME_NEXT_EXECUTION_AT = "next_execution_at"; @SerializedName(SERIALIZED_NAME_NEXT_EXECUTION_AT) - private OffsetDateTime nextExecutionAt; + private String nextExecutionAt; public static final String SERIALIZED_NAME_DESCRIPTION = "description"; @SerializedName(SERIALIZED_NAME_DESCRIPTION) @@ -243,7 +243,7 @@ public CreatorTypeEnum read(final JsonReader jsonReader) throws IOException { private CreatorTypeEnum creatorType; - public Report createdAt(OffsetDateTime createdAt) { + public Report createdAt(String createdAt) { this.createdAt = createdAt; return this; @@ -256,17 +256,17 @@ public Report createdAt(OffsetDateTime createdAt) { @javax.annotation.Nullable @ApiModelProperty(example = "2013-07-16T19:23Z", value = "The date and time this report was created in our system.") - public OffsetDateTime getCreatedAt() { + public String getCreatedAt() { return createdAt; } - public void setCreatedAt(OffsetDateTime createdAt) { + public void setCreatedAt(String createdAt) { this.createdAt = createdAt; } - public Report updatedAt(OffsetDateTime updatedAt) { + public Report updatedAt(String updatedAt) { this.updatedAt = updatedAt; return this; @@ -279,17 +279,17 @@ public Report updatedAt(OffsetDateTime updatedAt) { @javax.annotation.Nullable @ApiModelProperty(example = "2013-07-16T19:23Z", value = "The date and time this report was last updated.") - public OffsetDateTime getUpdatedAt() { + public String getUpdatedAt() { return updatedAt; } - public void setUpdatedAt(OffsetDateTime updatedAt) { + public void setUpdatedAt(String updatedAt) { this.updatedAt = updatedAt; } - public Report nextExecutionAt(OffsetDateTime nextExecutionAt) { + public Report nextExecutionAt(String nextExecutionAt) { this.nextExecutionAt = nextExecutionAt; return this; @@ -302,12 +302,12 @@ public Report nextExecutionAt(OffsetDateTime nextExecutionAt) { @javax.annotation.Nullable @ApiModelProperty(example = "2023-01-01T00:00Z", value = "The date and time this report will next be executed, provided that `schedule_enabled` is `true`. This value is null if this is a one-off report.") - public OffsetDateTime getNextExecutionAt() { + public String getNextExecutionAt() { return nextExecutionAt; } - public void setNextExecutionAt(OffsetDateTime nextExecutionAt) { + public void setNextExecutionAt(String nextExecutionAt) { this.nextExecutionAt = nextExecutionAt; } diff --git a/src/main/java/com/gr4vy/api/model/ReportCreate.java b/src/main/java/com/gr4vy/api/model/ReportCreate.java index 939db7b..54b97f1 100644 --- a/src/main/java/com/gr4vy/api/model/ReportCreate.java +++ b/src/main/java/com/gr4vy/api/model/ReportCreate.java @@ -29,7 +29,7 @@ * A request to create a report. */ @ApiModel(description = "A request to create a report.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-08T13:56:38.178267Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-09-06T16:38:13.632050Z[Etc/UTC]") public class ReportCreate { public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) diff --git a/src/main/java/com/gr4vy/api/model/ReportExecution.java b/src/main/java/com/gr4vy/api/model/ReportExecution.java index aa1f78c..739294a 100644 --- a/src/main/java/com/gr4vy/api/model/ReportExecution.java +++ b/src/main/java/com/gr4vy/api/model/ReportExecution.java @@ -27,13 +27,13 @@ import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.UUID; -import org.threeten.bp.OffsetDateTime; + /** * A report execution. */ @ApiModel(description = "A report execution.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-08T13:56:38.178267Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-09-06T16:38:13.632050Z[Etc/UTC]") public class ReportExecution { public static final String SERIALIZED_NAME_REPORT = "report"; @SerializedName(SERIALIZED_NAME_REPORT) @@ -94,11 +94,11 @@ public TypeEnum read(final JsonReader jsonReader) throws IOException { public static final String SERIALIZED_NAME_CREATED_AT = "created_at"; @SerializedName(SERIALIZED_NAME_CREATED_AT) - private OffsetDateTime createdAt; + private String createdAt; public static final String SERIALIZED_NAME_UPDATED_AT = "updated_at"; @SerializedName(SERIALIZED_NAME_UPDATED_AT) - private OffsetDateTime updatedAt; + private String updatedAt; /** * The status of this report execution. @@ -231,7 +231,7 @@ public void setId(UUID id) { } - public ReportExecution createdAt(OffsetDateTime createdAt) { + public ReportExecution createdAt(String createdAt) { this.createdAt = createdAt; return this; @@ -244,17 +244,17 @@ public ReportExecution createdAt(OffsetDateTime createdAt) { @javax.annotation.Nullable @ApiModelProperty(example = "2013-07-16T19:23Z", value = "The date and time this report execution was created in our system.") - public OffsetDateTime getCreatedAt() { + public String getCreatedAt() { return createdAt; } - public void setCreatedAt(OffsetDateTime createdAt) { + public void setCreatedAt(String createdAt) { this.createdAt = createdAt; } - public ReportExecution updatedAt(OffsetDateTime updatedAt) { + public ReportExecution updatedAt(String updatedAt) { this.updatedAt = updatedAt; return this; @@ -267,12 +267,12 @@ public ReportExecution updatedAt(OffsetDateTime updatedAt) { @javax.annotation.Nullable @ApiModelProperty(example = "2013-07-16T19:23Z", value = "The date and time this report execution was last updated.") - public OffsetDateTime getUpdatedAt() { + public String getUpdatedAt() { return updatedAt; } - public void setUpdatedAt(OffsetDateTime updatedAt) { + public void setUpdatedAt(String updatedAt) { this.updatedAt = updatedAt; } diff --git a/src/main/java/com/gr4vy/api/model/ReportExecutionSummary.java b/src/main/java/com/gr4vy/api/model/ReportExecutionSummary.java index 0413fbc..2621ba7 100644 --- a/src/main/java/com/gr4vy/api/model/ReportExecutionSummary.java +++ b/src/main/java/com/gr4vy/api/model/ReportExecutionSummary.java @@ -25,13 +25,13 @@ import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.UUID; -import org.threeten.bp.OffsetDateTime; + /** * A report execution summary. */ @ApiModel(description = "A report execution summary.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-08T13:56:38.178267Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-09-06T16:38:13.632050Z[Etc/UTC]") public class ReportExecutionSummary { /** * The type of this resource. Is always `report-execution`. @@ -88,11 +88,11 @@ public TypeEnum read(final JsonReader jsonReader) throws IOException { public static final String SERIALIZED_NAME_CREATED_AT = "created_at"; @SerializedName(SERIALIZED_NAME_CREATED_AT) - private OffsetDateTime createdAt; + private String createdAt; public static final String SERIALIZED_NAME_UPDATED_AT = "updated_at"; @SerializedName(SERIALIZED_NAME_UPDATED_AT) - private OffsetDateTime updatedAt; + private String updatedAt; /** * The status of this report execution. @@ -202,7 +202,7 @@ public void setId(UUID id) { } - public ReportExecutionSummary createdAt(OffsetDateTime createdAt) { + public ReportExecutionSummary createdAt(String createdAt) { this.createdAt = createdAt; return this; @@ -215,17 +215,17 @@ public ReportExecutionSummary createdAt(OffsetDateTime createdAt) { @javax.annotation.Nullable @ApiModelProperty(example = "2013-07-16T19:23Z", value = "The date and time this report execution was created in our system.") - public OffsetDateTime getCreatedAt() { + public String getCreatedAt() { return createdAt; } - public void setCreatedAt(OffsetDateTime createdAt) { + public void setCreatedAt(String createdAt) { this.createdAt = createdAt; } - public ReportExecutionSummary updatedAt(OffsetDateTime updatedAt) { + public ReportExecutionSummary updatedAt(String updatedAt) { this.updatedAt = updatedAt; return this; @@ -238,12 +238,12 @@ public ReportExecutionSummary updatedAt(OffsetDateTime updatedAt) { @javax.annotation.Nullable @ApiModelProperty(example = "2013-07-16T19:23Z", value = "The date and time this report execution was last updated.") - public OffsetDateTime getUpdatedAt() { + public String getUpdatedAt() { return updatedAt; } - public void setUpdatedAt(OffsetDateTime updatedAt) { + public void setUpdatedAt(String updatedAt) { this.updatedAt = updatedAt; } diff --git a/src/main/java/com/gr4vy/api/model/ReportExecutionSummaryContext.java b/src/main/java/com/gr4vy/api/model/ReportExecutionSummaryContext.java index 87cd47c..73bd962 100644 --- a/src/main/java/com/gr4vy/api/model/ReportExecutionSummaryContext.java +++ b/src/main/java/com/gr4vy/api/model/ReportExecutionSummaryContext.java @@ -23,24 +23,24 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.io.IOException; -import org.threeten.bp.OffsetDateTime; + /** * Contains the context values used to compute the value of date-time placeholders such as `month_start` and `month_end` if present in the report's specification. Date-time placeholders are dynamic timestamps that change with every report execution. */ @ApiModel(description = "Contains the context values used to compute the value of date-time placeholders such as `month_start` and `month_end` if present in the report's specification. Date-time placeholders are dynamic timestamps that change with every report execution.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-08T13:56:38.178267Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-09-06T16:38:13.632050Z[Etc/UTC]") public class ReportExecutionSummaryContext { public static final String SERIALIZED_NAME_REFERENCE_TIMESTAMP = "reference_timestamp"; @SerializedName(SERIALIZED_NAME_REFERENCE_TIMESTAMP) - private OffsetDateTime referenceTimestamp; + private String referenceTimestamp; public static final String SERIALIZED_NAME_REFERENCE_TIMEZONE = "reference_timezone"; @SerializedName(SERIALIZED_NAME_REFERENCE_TIMEZONE) private String referenceTimezone; - public ReportExecutionSummaryContext referenceTimestamp(OffsetDateTime referenceTimestamp) { + public ReportExecutionSummaryContext referenceTimestamp(String referenceTimestamp) { this.referenceTimestamp = referenceTimestamp; return this; @@ -53,12 +53,12 @@ public ReportExecutionSummaryContext referenceTimestamp(OffsetDateTime reference @javax.annotation.Nullable @ApiModelProperty(example = "2013-07-16T19:23Z", value = "The date and time used by the system as a reference point to compute date-time placeholders.") - public OffsetDateTime getReferenceTimestamp() { + public String getReferenceTimestamp() { return referenceTimestamp; } - public void setReferenceTimestamp(OffsetDateTime referenceTimestamp) { + public void setReferenceTimestamp(String referenceTimestamp) { this.referenceTimestamp = referenceTimestamp; } diff --git a/src/main/java/com/gr4vy/api/model/ReportExecutionUrl.java b/src/main/java/com/gr4vy/api/model/ReportExecutionUrl.java index 10a9947..d64e7d2 100644 --- a/src/main/java/com/gr4vy/api/model/ReportExecutionUrl.java +++ b/src/main/java/com/gr4vy/api/model/ReportExecutionUrl.java @@ -23,13 +23,13 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.io.IOException; -import org.threeten.bp.OffsetDateTime; + /** * The temporary signed URL to download the result of a report execution and its expiration date and time. */ @ApiModel(description = "The temporary signed URL to download the result of a report execution and its expiration date and time.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-08T13:56:38.178267Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-09-06T16:38:13.632050Z[Etc/UTC]") public class ReportExecutionUrl { public static final String SERIALIZED_NAME_URL = "url"; @SerializedName(SERIALIZED_NAME_URL) @@ -37,7 +37,7 @@ public class ReportExecutionUrl { public static final String SERIALIZED_NAME_EXPIRES_AT = "expires_at"; @SerializedName(SERIALIZED_NAME_EXPIRES_AT) - private OffsetDateTime expiresAt; + private String expiresAt; public ReportExecutionUrl url(String url) { @@ -63,7 +63,7 @@ public void setUrl(String url) { } - public ReportExecutionUrl expiresAt(OffsetDateTime expiresAt) { + public ReportExecutionUrl expiresAt(String expiresAt) { this.expiresAt = expiresAt; return this; @@ -76,12 +76,12 @@ public ReportExecutionUrl expiresAt(OffsetDateTime expiresAt) { @javax.annotation.Nullable @ApiModelProperty(example = "2013-07-16T19:23Z", value = "The date and time when the download URL expires.") - public OffsetDateTime getExpiresAt() { + public String getExpiresAt() { return expiresAt; } - public void setExpiresAt(OffsetDateTime expiresAt) { + public void setExpiresAt(String expiresAt) { this.expiresAt = expiresAt; } diff --git a/src/main/java/com/gr4vy/api/model/ReportExecutions.java b/src/main/java/com/gr4vy/api/model/ReportExecutions.java index 3ad6f27..9dd020b 100644 --- a/src/main/java/com/gr4vy/api/model/ReportExecutions.java +++ b/src/main/java/com/gr4vy/api/model/ReportExecutions.java @@ -31,7 +31,7 @@ * A list of report executions. */ @ApiModel(description = "A list of report executions.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-08T13:56:38.178267Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-09-06T16:38:13.632050Z[Etc/UTC]") public class ReportExecutions { public static final String SERIALIZED_NAME_ITEMS = "items"; @SerializedName(SERIALIZED_NAME_ITEMS) diff --git a/src/main/java/com/gr4vy/api/model/ReportSpec.java b/src/main/java/com/gr4vy/api/model/ReportSpec.java index 846df51..25f471b 100644 --- a/src/main/java/com/gr4vy/api/model/ReportSpec.java +++ b/src/main/java/com/gr4vy/api/model/ReportSpec.java @@ -31,7 +31,7 @@ * The specification of a report. */ @ApiModel(description = "The specification of a report.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-08T13:56:38.178267Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-09-06T16:38:13.632050Z[Etc/UTC]") public class ReportSpec { /** * The model (dataset) that the data used for the report is retrieved from. diff --git a/src/main/java/com/gr4vy/api/model/ReportSummary.java b/src/main/java/com/gr4vy/api/model/ReportSummary.java index ab77dd0..4550c75 100644 --- a/src/main/java/com/gr4vy/api/model/ReportSummary.java +++ b/src/main/java/com/gr4vy/api/model/ReportSummary.java @@ -29,7 +29,7 @@ * A report record summary. */ @ApiModel(description = "A report record summary.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-08T13:56:38.178267Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-09-06T16:38:13.632050Z[Etc/UTC]") public class ReportSummary { /** * The type of this resource. Is always `report`. diff --git a/src/main/java/com/gr4vy/api/model/ReportUpdate.java b/src/main/java/com/gr4vy/api/model/ReportUpdate.java index 85388bd..1f357fb 100644 --- a/src/main/java/com/gr4vy/api/model/ReportUpdate.java +++ b/src/main/java/com/gr4vy/api/model/ReportUpdate.java @@ -28,7 +28,7 @@ * Request body to update a report. */ @ApiModel(description = "Request body to update a report.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-08T13:56:38.178267Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-09-06T16:38:13.632050Z[Etc/UTC]") public class ReportUpdate { public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) diff --git a/src/main/java/com/gr4vy/api/model/Reports.java b/src/main/java/com/gr4vy/api/model/Reports.java index d8a70ea..a383a5f 100644 --- a/src/main/java/com/gr4vy/api/model/Reports.java +++ b/src/main/java/com/gr4vy/api/model/Reports.java @@ -31,7 +31,7 @@ * A list of reports. */ @ApiModel(description = "A list of reports.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-08T13:56:38.178267Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-09-06T16:38:13.632050Z[Etc/UTC]") public class Reports { public static final String SERIALIZED_NAME_ITEMS = "items"; @SerializedName(SERIALIZED_NAME_ITEMS) diff --git a/src/main/java/com/gr4vy/api/model/RequiredFields.java b/src/main/java/com/gr4vy/api/model/RequiredFields.java index c4af780..13172d5 100644 --- a/src/main/java/com/gr4vy/api/model/RequiredFields.java +++ b/src/main/java/com/gr4vy/api/model/RequiredFields.java @@ -29,7 +29,7 @@ * The fields that are required to process a transaction for this payment option. */ @ApiModel(description = "The fields that are required to process a transaction for this payment option.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-08T13:56:38.178267Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-09-06T16:38:13.632050Z[Etc/UTC]") public class RequiredFields { public static final String SERIALIZED_NAME_FIRST_NAME = "first_name"; @SerializedName(SERIALIZED_NAME_FIRST_NAME) diff --git a/src/main/java/com/gr4vy/api/model/RequiredFieldsAddress.java b/src/main/java/com/gr4vy/api/model/RequiredFieldsAddress.java index 6254c79..52ff41e 100644 --- a/src/main/java/com/gr4vy/api/model/RequiredFieldsAddress.java +++ b/src/main/java/com/gr4vy/api/model/RequiredFieldsAddress.java @@ -28,7 +28,7 @@ * The billing address of the buyer. */ @ApiModel(description = "The billing address of the buyer.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-08T13:56:38.178267Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-09-06T16:38:13.632050Z[Etc/UTC]") public class RequiredFieldsAddress { public static final String SERIALIZED_NAME_CITY = "city"; @SerializedName(SERIALIZED_NAME_CITY) diff --git a/src/main/java/com/gr4vy/api/model/ResetPasswordRequest.java b/src/main/java/com/gr4vy/api/model/ResetPasswordRequest.java index 0a52b1c..9ce1775 100644 --- a/src/main/java/com/gr4vy/api/model/ResetPasswordRequest.java +++ b/src/main/java/com/gr4vy/api/model/ResetPasswordRequest.java @@ -28,7 +28,7 @@ * A request to reset a password for a user. */ @ApiModel(description = "A request to reset a password for a user.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-08T13:56:38.178267Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-09-06T16:38:13.632050Z[Etc/UTC]") public class ResetPasswordRequest { public static final String SERIALIZED_NAME_EMAIL_ADDRESS = "email_address"; @SerializedName(SERIALIZED_NAME_EMAIL_ADDRESS) diff --git a/src/main/java/com/gr4vy/api/model/Role.java b/src/main/java/com/gr4vy/api/model/Role.java index d9450ca..c2bb460 100644 --- a/src/main/java/com/gr4vy/api/model/Role.java +++ b/src/main/java/com/gr4vy/api/model/Role.java @@ -29,7 +29,7 @@ /** * Role */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-08T13:56:38.178267Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-09-06T16:38:13.632050Z[Etc/UTC]") public class Role { /** * The type of this resource. Always `role`. diff --git a/src/main/java/com/gr4vy/api/model/RoleAssignment.java b/src/main/java/com/gr4vy/api/model/RoleAssignment.java index 165ba48..f7699bf 100644 --- a/src/main/java/com/gr4vy/api/model/RoleAssignment.java +++ b/src/main/java/com/gr4vy/api/model/RoleAssignment.java @@ -30,7 +30,7 @@ /** * RoleAssignment */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-08T13:56:38.178267Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-09-06T16:38:13.632050Z[Etc/UTC]") public class RoleAssignment { /** * The type of this resource. Always `role-assignment`. diff --git a/src/main/java/com/gr4vy/api/model/RoleAssignmentAssignee.java b/src/main/java/com/gr4vy/api/model/RoleAssignmentAssignee.java index 12c9cc4..d37d421 100644 --- a/src/main/java/com/gr4vy/api/model/RoleAssignmentAssignee.java +++ b/src/main/java/com/gr4vy/api/model/RoleAssignmentAssignee.java @@ -29,7 +29,7 @@ * The assignee for this role assignment. */ @ApiModel(description = "The assignee for this role assignment.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-08T13:56:38.178267Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-09-06T16:38:13.632050Z[Etc/UTC]") public class RoleAssignmentAssignee { /** * The type of the assignee. diff --git a/src/main/java/com/gr4vy/api/model/RoleAssignmentRequest.java b/src/main/java/com/gr4vy/api/model/RoleAssignmentRequest.java index 1eb0c61..899f052 100644 --- a/src/main/java/com/gr4vy/api/model/RoleAssignmentRequest.java +++ b/src/main/java/com/gr4vy/api/model/RoleAssignmentRequest.java @@ -30,7 +30,7 @@ * A request to create a role assignment. */ @ApiModel(description = "A request to create a role assignment.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-08T13:56:38.178267Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-09-06T16:38:13.632050Z[Etc/UTC]") public class RoleAssignmentRequest { public static final String SERIALIZED_NAME_ROLE = "role"; @SerializedName(SERIALIZED_NAME_ROLE) diff --git a/src/main/java/com/gr4vy/api/model/RoleAssignmentRequestAssignee.java b/src/main/java/com/gr4vy/api/model/RoleAssignmentRequestAssignee.java index 79b0f0d..6daa38f 100644 --- a/src/main/java/com/gr4vy/api/model/RoleAssignmentRequestAssignee.java +++ b/src/main/java/com/gr4vy/api/model/RoleAssignmentRequestAssignee.java @@ -29,7 +29,7 @@ * The assignee to associate with the role assignment. */ @ApiModel(description = "The assignee to associate with the role assignment.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-08T13:56:38.178267Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-09-06T16:38:13.632050Z[Etc/UTC]") public class RoleAssignmentRequestAssignee { /** * The type of the assignee to associate with the role assignment. diff --git a/src/main/java/com/gr4vy/api/model/RoleAssignmentRequestRole.java b/src/main/java/com/gr4vy/api/model/RoleAssignmentRequestRole.java index 872887f..f33e578 100644 --- a/src/main/java/com/gr4vy/api/model/RoleAssignmentRequestRole.java +++ b/src/main/java/com/gr4vy/api/model/RoleAssignmentRequestRole.java @@ -29,7 +29,7 @@ * The role to associate with the role assignment. */ @ApiModel(description = "The role to associate with the role assignment.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-08T13:56:38.178267Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-09-06T16:38:13.632050Z[Etc/UTC]") public class RoleAssignmentRequestRole { public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) diff --git a/src/main/java/com/gr4vy/api/model/RoleAssignments.java b/src/main/java/com/gr4vy/api/model/RoleAssignments.java index 994ea3c..e9a2cc1 100644 --- a/src/main/java/com/gr4vy/api/model/RoleAssignments.java +++ b/src/main/java/com/gr4vy/api/model/RoleAssignments.java @@ -31,7 +31,7 @@ * A list of role assignments. */ @ApiModel(description = "A list of role assignments.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-08T13:56:38.178267Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-09-06T16:38:13.632050Z[Etc/UTC]") public class RoleAssignments { public static final String SERIALIZED_NAME_ITEMS = "items"; @SerializedName(SERIALIZED_NAME_ITEMS) diff --git a/src/main/java/com/gr4vy/api/model/RolePermissions.java b/src/main/java/com/gr4vy/api/model/RolePermissions.java index e2e96e7..e0b3e7f 100644 --- a/src/main/java/com/gr4vy/api/model/RolePermissions.java +++ b/src/main/java/com/gr4vy/api/model/RolePermissions.java @@ -30,7 +30,7 @@ * The permissions associated with a role. */ @ApiModel(description = "The permissions associated with a role.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-08T13:56:38.178267Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-09-06T16:38:13.632050Z[Etc/UTC]") public class RolePermissions { public static final String SERIALIZED_NAME_ALLOW = "allow"; @SerializedName(SERIALIZED_NAME_ALLOW) diff --git a/src/main/java/com/gr4vy/api/model/Roles.java b/src/main/java/com/gr4vy/api/model/Roles.java index 9f06db2..b545dd0 100644 --- a/src/main/java/com/gr4vy/api/model/Roles.java +++ b/src/main/java/com/gr4vy/api/model/Roles.java @@ -31,7 +31,7 @@ * A list of roles. */ @ApiModel(description = "A list of roles.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-08T13:56:38.178267Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-09-06T16:38:13.632050Z[Etc/UTC]") public class Roles { public static final String SERIALIZED_NAME_ITEMS = "items"; @SerializedName(SERIALIZED_NAME_ITEMS) diff --git a/src/main/java/com/gr4vy/api/model/SetPasswordRequest.java b/src/main/java/com/gr4vy/api/model/SetPasswordRequest.java index c717aec..b8889d5 100644 --- a/src/main/java/com/gr4vy/api/model/SetPasswordRequest.java +++ b/src/main/java/com/gr4vy/api/model/SetPasswordRequest.java @@ -28,7 +28,7 @@ * A request to set a password for a user. */ @ApiModel(description = "A request to set a password for a user.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-08T13:56:38.178267Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-09-06T16:38:13.632050Z[Etc/UTC]") public class SetPasswordRequest { public static final String SERIALIZED_NAME_RESET_TOKEN = "reset_token"; @SerializedName(SERIALIZED_NAME_RESET_TOKEN) diff --git a/src/main/java/com/gr4vy/api/model/ShippingDetail.java b/src/main/java/com/gr4vy/api/model/ShippingDetail.java index a31e0e4..50be7e9 100644 --- a/src/main/java/com/gr4vy/api/model/ShippingDetail.java +++ b/src/main/java/com/gr4vy/api/model/ShippingDetail.java @@ -30,7 +30,7 @@ * Shipping detail for a buyer. */ @ApiModel(description = "Shipping detail for a buyer.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-08T13:56:38.178267Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-09-06T16:38:13.632050Z[Etc/UTC]") public class ShippingDetail { /** * The type of this resource. Is always `shipping-details`. diff --git a/src/main/java/com/gr4vy/api/model/ShippingDetailRequest.java b/src/main/java/com/gr4vy/api/model/ShippingDetailRequest.java index 87ccdd6..18704f3 100644 --- a/src/main/java/com/gr4vy/api/model/ShippingDetailRequest.java +++ b/src/main/java/com/gr4vy/api/model/ShippingDetailRequest.java @@ -29,7 +29,7 @@ * Shipping detail associated to a buyer. */ @ApiModel(description = "Shipping detail associated to a buyer.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-08T13:56:38.178267Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-09-06T16:38:13.632050Z[Etc/UTC]") public class ShippingDetailRequest { public static final String SERIALIZED_NAME_FIRST_NAME = "first_name"; @SerializedName(SERIALIZED_NAME_FIRST_NAME) diff --git a/src/main/java/com/gr4vy/api/model/ShippingDetailUpdateRequest.java b/src/main/java/com/gr4vy/api/model/ShippingDetailUpdateRequest.java index d9deb95..3e3767a 100644 --- a/src/main/java/com/gr4vy/api/model/ShippingDetailUpdateRequest.java +++ b/src/main/java/com/gr4vy/api/model/ShippingDetailUpdateRequest.java @@ -28,7 +28,7 @@ /** * ShippingDetailUpdateRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-08T13:56:38.178267Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-09-06T16:38:13.632050Z[Etc/UTC]") public class ShippingDetailUpdateRequest { public static final String SERIALIZED_NAME_FIRST_NAME = "first_name"; @SerializedName(SERIALIZED_NAME_FIRST_NAME) diff --git a/src/main/java/com/gr4vy/api/model/ShippingDetails.java b/src/main/java/com/gr4vy/api/model/ShippingDetails.java index caad605..44d39f3 100644 --- a/src/main/java/com/gr4vy/api/model/ShippingDetails.java +++ b/src/main/java/com/gr4vy/api/model/ShippingDetails.java @@ -31,7 +31,7 @@ * A list of shipping details. */ @ApiModel(description = "A list of shipping details.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-08T13:56:38.178267Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-09-06T16:38:13.632050Z[Etc/UTC]") public class ShippingDetails { public static final String SERIALIZED_NAME_ITEMS = "items"; @SerializedName(SERIALIZED_NAME_ITEMS) diff --git a/src/main/java/com/gr4vy/api/model/StatementDescriptor.java b/src/main/java/com/gr4vy/api/model/StatementDescriptor.java index c35fa48..0937406 100644 --- a/src/main/java/com/gr4vy/api/model/StatementDescriptor.java +++ b/src/main/java/com/gr4vy/api/model/StatementDescriptor.java @@ -28,7 +28,7 @@ * The statement descriptor is the text to be shown on the buyer's statements. The specific usage of these fields will depend on the capabilities of the underlying PSP and bank. As a typical example, 'name' and 'description' could be concatenated using '* ' as a separator, and then the resulting descriptor would be truncated to 22 characters by the issuing bank. */ @ApiModel(description = "The statement descriptor is the text to be shown on the buyer's statements. The specific usage of these fields will depend on the capabilities of the underlying PSP and bank. As a typical example, 'name' and 'description' could be concatenated using '* ' as a separator, and then the resulting descriptor would be truncated to 22 characters by the issuing bank.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-08T13:56:38.178267Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-09-06T16:38:13.632050Z[Etc/UTC]") public class StatementDescriptor { public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) diff --git a/src/main/java/com/gr4vy/api/model/TaxId.java b/src/main/java/com/gr4vy/api/model/TaxId.java index 4b4411f..7ea3455 100644 --- a/src/main/java/com/gr4vy/api/model/TaxId.java +++ b/src/main/java/com/gr4vy/api/model/TaxId.java @@ -28,7 +28,7 @@ * The tax ID information associated to a buyer. */ @ApiModel(description = "The tax ID information associated to a buyer.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-08T13:56:38.178267Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-09-06T16:38:13.632050Z[Etc/UTC]") public class TaxId { public static final String SERIALIZED_NAME_VALUE = "value"; @SerializedName(SERIALIZED_NAME_VALUE) diff --git a/src/main/java/com/gr4vy/api/model/ThreeDSecureAuthenticationRequestEvent.java b/src/main/java/com/gr4vy/api/model/ThreeDSecureAuthenticationRequestEvent.java index 1c58513..18b8474 100644 --- a/src/main/java/com/gr4vy/api/model/ThreeDSecureAuthenticationRequestEvent.java +++ b/src/main/java/com/gr4vy/api/model/ThreeDSecureAuthenticationRequestEvent.java @@ -25,13 +25,13 @@ import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.UUID; -import org.threeten.bp.OffsetDateTime; + /** * The result and raw data for a 3DS authorization call. */ @ApiModel(description = "The result and raw data for a 3DS authorization call.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-08T13:56:38.178267Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-09-06T16:38:13.632050Z[Etc/UTC]") public class ThreeDSecureAuthenticationRequestEvent { /** * The type of this resource. Is always `transaction-event`. @@ -137,7 +137,7 @@ public NameEnum read(final JsonReader jsonReader) throws IOException { public static final String SERIALIZED_NAME_CREATED_AT = "created_at"; @SerializedName(SERIALIZED_NAME_CREATED_AT) - private OffsetDateTime createdAt; + private String createdAt; public static final String SERIALIZED_NAME_CONTEXT = "context"; @SerializedName(SERIALIZED_NAME_CONTEXT) @@ -213,7 +213,7 @@ public void setName(NameEnum name) { } - public ThreeDSecureAuthenticationRequestEvent createdAt(OffsetDateTime createdAt) { + public ThreeDSecureAuthenticationRequestEvent createdAt(String createdAt) { this.createdAt = createdAt; return this; @@ -226,12 +226,12 @@ public ThreeDSecureAuthenticationRequestEvent createdAt(OffsetDateTime createdAt @javax.annotation.Nullable @ApiModelProperty(example = "2013-07-16T19:23Z", value = "The date and time when this transaction was created in our system.") - public OffsetDateTime getCreatedAt() { + public String getCreatedAt() { return createdAt; } - public void setCreatedAt(OffsetDateTime createdAt) { + public void setCreatedAt(String createdAt) { this.createdAt = createdAt; } diff --git a/src/main/java/com/gr4vy/api/model/ThreeDSecureAuthenticationRequestEventContext.java b/src/main/java/com/gr4vy/api/model/ThreeDSecureAuthenticationRequestEventContext.java index d2bec72..1df2b42 100644 --- a/src/main/java/com/gr4vy/api/model/ThreeDSecureAuthenticationRequestEventContext.java +++ b/src/main/java/com/gr4vy/api/model/ThreeDSecureAuthenticationRequestEventContext.java @@ -28,7 +28,7 @@ * 3DS authentication context. */ @ApiModel(description = "3DS authentication context.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-08T13:56:38.178267Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-09-06T16:38:13.632050Z[Etc/UTC]") public class ThreeDSecureAuthenticationRequestEventContext { public static final String SERIALIZED_NAME_URL = "url"; @SerializedName(SERIALIZED_NAME_URL) diff --git a/src/main/java/com/gr4vy/api/model/ThreeDSecureData.java b/src/main/java/com/gr4vy/api/model/ThreeDSecureData.java index 8a6e57e..c747565 100644 --- a/src/main/java/com/gr4vy/api/model/ThreeDSecureData.java +++ b/src/main/java/com/gr4vy/api/model/ThreeDSecureData.java @@ -27,7 +27,7 @@ /** * ThreeDSecureData */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-08T13:56:38.178267Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-09-06T16:38:13.632050Z[Etc/UTC]") public class ThreeDSecureData { public static final String SERIALIZED_NAME_CAVV = "cavv"; @SerializedName(SERIALIZED_NAME_CAVV) diff --git a/src/main/java/com/gr4vy/api/model/ThreeDSecureDataV1.java b/src/main/java/com/gr4vy/api/model/ThreeDSecureDataV1.java index 0dda503..0af3dcd 100644 --- a/src/main/java/com/gr4vy/api/model/ThreeDSecureDataV1.java +++ b/src/main/java/com/gr4vy/api/model/ThreeDSecureDataV1.java @@ -29,7 +29,7 @@ /** * ThreeDSecureDataV1 */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-08T13:56:38.178267Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-09-06T16:38:13.632050Z[Etc/UTC]") public class ThreeDSecureDataV1 { public static final String SERIALIZED_NAME_CAVV = "cavv"; @SerializedName(SERIALIZED_NAME_CAVV) diff --git a/src/main/java/com/gr4vy/api/model/ThreeDSecureDataV1AllOf.java b/src/main/java/com/gr4vy/api/model/ThreeDSecureDataV1AllOf.java index 181b5db..193538e 100644 --- a/src/main/java/com/gr4vy/api/model/ThreeDSecureDataV1AllOf.java +++ b/src/main/java/com/gr4vy/api/model/ThreeDSecureDataV1AllOf.java @@ -27,7 +27,7 @@ /** * ThreeDSecureDataV1AllOf */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-08T13:56:38.178267Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-09-06T16:38:13.632050Z[Etc/UTC]") public class ThreeDSecureDataV1AllOf { public static final String SERIALIZED_NAME_AUTHENTICATION_RESPONSE = "authentication_response"; @SerializedName(SERIALIZED_NAME_AUTHENTICATION_RESPONSE) diff --git a/src/main/java/com/gr4vy/api/model/ThreeDSecureDataV1V2.java b/src/main/java/com/gr4vy/api/model/ThreeDSecureDataV1V2.java index b4083ca..217cb97 100644 --- a/src/main/java/com/gr4vy/api/model/ThreeDSecureDataV1V2.java +++ b/src/main/java/com/gr4vy/api/model/ThreeDSecureDataV1V2.java @@ -29,7 +29,7 @@ /** * ThreeDSecureDataV1V2 */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-08T13:56:38.178267Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-09-06T16:38:13.632050Z[Etc/UTC]") public class ThreeDSecureDataV1V2 { public static final String SERIALIZED_NAME_CAVV = "cavv"; @SerializedName(SERIALIZED_NAME_CAVV) diff --git a/src/main/java/com/gr4vy/api/model/ThreeDSecureDataV2.java b/src/main/java/com/gr4vy/api/model/ThreeDSecureDataV2.java index 6683972..7f2d0b4 100644 --- a/src/main/java/com/gr4vy/api/model/ThreeDSecureDataV2.java +++ b/src/main/java/com/gr4vy/api/model/ThreeDSecureDataV2.java @@ -29,7 +29,7 @@ /** * ThreeDSecureDataV2 */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-08T13:56:38.178267Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-09-06T16:38:13.632050Z[Etc/UTC]") public class ThreeDSecureDataV2 { public static final String SERIALIZED_NAME_CAVV = "cavv"; @SerializedName(SERIALIZED_NAME_CAVV) diff --git a/src/main/java/com/gr4vy/api/model/ThreeDSecureDataV2AllOf.java b/src/main/java/com/gr4vy/api/model/ThreeDSecureDataV2AllOf.java index 2e656e5..d6844b8 100644 --- a/src/main/java/com/gr4vy/api/model/ThreeDSecureDataV2AllOf.java +++ b/src/main/java/com/gr4vy/api/model/ThreeDSecureDataV2AllOf.java @@ -27,7 +27,7 @@ /** * ThreeDSecureDataV2AllOf */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-08T13:56:38.178267Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-09-06T16:38:13.632050Z[Etc/UTC]") public class ThreeDSecureDataV2AllOf { /** * The transaction status after a the 3DS challenge. This will be null in case of a frictionless 3DS flow. diff --git a/src/main/java/com/gr4vy/api/model/ThreeDSecureError.java b/src/main/java/com/gr4vy/api/model/ThreeDSecureError.java index d7abecf..b8a846c 100644 --- a/src/main/java/com/gr4vy/api/model/ThreeDSecureError.java +++ b/src/main/java/com/gr4vy/api/model/ThreeDSecureError.java @@ -28,7 +28,7 @@ * Details about the error resulting from 3DS processing a Transaction. */ @ApiModel(description = "Details about the error resulting from 3DS processing a Transaction.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-08T13:56:38.178267Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-09-06T16:38:13.632050Z[Etc/UTC]") public class ThreeDSecureError { public static final String SERIALIZED_NAME_DESCRIPTION = "description"; @SerializedName(SERIALIZED_NAME_DESCRIPTION) diff --git a/src/main/java/com/gr4vy/api/model/ThreeDSecurePreparationRequestEvent.java b/src/main/java/com/gr4vy/api/model/ThreeDSecurePreparationRequestEvent.java index 62e7899..43e9e1b 100644 --- a/src/main/java/com/gr4vy/api/model/ThreeDSecurePreparationRequestEvent.java +++ b/src/main/java/com/gr4vy/api/model/ThreeDSecurePreparationRequestEvent.java @@ -25,13 +25,13 @@ import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.UUID; -import org.threeten.bp.OffsetDateTime; + /** * The result and raw data for a 3DS pre-authorization call. */ @ApiModel(description = "The result and raw data for a 3DS pre-authorization call.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-08T13:56:38.178267Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-09-06T16:38:13.632050Z[Etc/UTC]") public class ThreeDSecurePreparationRequestEvent { /** * The type of this resource. Is always `transaction-event`. @@ -137,7 +137,7 @@ public NameEnum read(final JsonReader jsonReader) throws IOException { public static final String SERIALIZED_NAME_CREATED_AT = "created_at"; @SerializedName(SERIALIZED_NAME_CREATED_AT) - private OffsetDateTime createdAt; + private String createdAt; public static final String SERIALIZED_NAME_CONTEXT = "context"; @SerializedName(SERIALIZED_NAME_CONTEXT) @@ -213,7 +213,7 @@ public void setName(NameEnum name) { } - public ThreeDSecurePreparationRequestEvent createdAt(OffsetDateTime createdAt) { + public ThreeDSecurePreparationRequestEvent createdAt(String createdAt) { this.createdAt = createdAt; return this; @@ -226,12 +226,12 @@ public ThreeDSecurePreparationRequestEvent createdAt(OffsetDateTime createdAt) { @javax.annotation.Nullable @ApiModelProperty(example = "2013-07-16T19:23Z", value = "The date and time when this transaction was created in our system.") - public OffsetDateTime getCreatedAt() { + public String getCreatedAt() { return createdAt; } - public void setCreatedAt(OffsetDateTime createdAt) { + public void setCreatedAt(String createdAt) { this.createdAt = createdAt; } diff --git a/src/main/java/com/gr4vy/api/model/ThreeDSecurePreparationRequestEventContext.java b/src/main/java/com/gr4vy/api/model/ThreeDSecurePreparationRequestEventContext.java index b69a9ab..cbad978 100644 --- a/src/main/java/com/gr4vy/api/model/ThreeDSecurePreparationRequestEventContext.java +++ b/src/main/java/com/gr4vy/api/model/ThreeDSecurePreparationRequestEventContext.java @@ -28,7 +28,7 @@ * 3DS pre-authentication context. */ @ApiModel(description = "3DS pre-authentication context.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-08T13:56:38.178267Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-09-06T16:38:13.632050Z[Etc/UTC]") public class ThreeDSecurePreparationRequestEventContext { public static final String SERIALIZED_NAME_URL = "url"; @SerializedName(SERIALIZED_NAME_URL) diff --git a/src/main/java/com/gr4vy/api/model/ThreeDSecureRequestErrorEvent.java b/src/main/java/com/gr4vy/api/model/ThreeDSecureRequestErrorEvent.java index edb668b..3c2f729 100644 --- a/src/main/java/com/gr4vy/api/model/ThreeDSecureRequestErrorEvent.java +++ b/src/main/java/com/gr4vy/api/model/ThreeDSecureRequestErrorEvent.java @@ -25,13 +25,13 @@ import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.UUID; -import org.threeten.bp.OffsetDateTime; + /** * Error details for a failed 3DS call. */ @ApiModel(description = "Error details for a failed 3DS call.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-08T13:56:38.178267Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-09-06T16:38:13.632050Z[Etc/UTC]") public class ThreeDSecureRequestErrorEvent { /** * The type of this resource. Is always `transaction-event`. @@ -137,7 +137,7 @@ public NameEnum read(final JsonReader jsonReader) throws IOException { public static final String SERIALIZED_NAME_CREATED_AT = "created_at"; @SerializedName(SERIALIZED_NAME_CREATED_AT) - private OffsetDateTime createdAt; + private String createdAt; public static final String SERIALIZED_NAME_CONTEXT = "context"; @SerializedName(SERIALIZED_NAME_CONTEXT) @@ -213,7 +213,7 @@ public void setName(NameEnum name) { } - public ThreeDSecureRequestErrorEvent createdAt(OffsetDateTime createdAt) { + public ThreeDSecureRequestErrorEvent createdAt(String createdAt) { this.createdAt = createdAt; return this; @@ -226,12 +226,12 @@ public ThreeDSecureRequestErrorEvent createdAt(OffsetDateTime createdAt) { @javax.annotation.Nullable @ApiModelProperty(example = "2013-07-16T19:23Z", value = "The date and time when this transaction was created in our system.") - public OffsetDateTime getCreatedAt() { + public String getCreatedAt() { return createdAt; } - public void setCreatedAt(OffsetDateTime createdAt) { + public void setCreatedAt(String createdAt) { this.createdAt = createdAt; } diff --git a/src/main/java/com/gr4vy/api/model/ThreeDSecureRequestErrorEventContext.java b/src/main/java/com/gr4vy/api/model/ThreeDSecureRequestErrorEventContext.java index 104d889..4a6fb73 100644 --- a/src/main/java/com/gr4vy/api/model/ThreeDSecureRequestErrorEventContext.java +++ b/src/main/java/com/gr4vy/api/model/ThreeDSecureRequestErrorEventContext.java @@ -28,7 +28,7 @@ * 3DS post-authentication context. */ @ApiModel(description = "3DS post-authentication context.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-08T13:56:38.178267Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-09-06T16:38:13.632050Z[Etc/UTC]") public class ThreeDSecureRequestErrorEventContext { public static final String SERIALIZED_NAME_URL = "url"; @SerializedName(SERIALIZED_NAME_URL) diff --git a/src/main/java/com/gr4vy/api/model/ThreeDSecureResultRequestEvent.java b/src/main/java/com/gr4vy/api/model/ThreeDSecureResultRequestEvent.java index f79ac43..0f19ab4 100644 --- a/src/main/java/com/gr4vy/api/model/ThreeDSecureResultRequestEvent.java +++ b/src/main/java/com/gr4vy/api/model/ThreeDSecureResultRequestEvent.java @@ -25,13 +25,13 @@ import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.UUID; -import org.threeten.bp.OffsetDateTime; + /** * The result and raw data for a 3DS post-authorization call. */ @ApiModel(description = "The result and raw data for a 3DS post-authorization call.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-08T13:56:38.178267Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-09-06T16:38:13.632050Z[Etc/UTC]") public class ThreeDSecureResultRequestEvent { /** * The type of this resource. Is always `transaction-event`. @@ -137,7 +137,7 @@ public NameEnum read(final JsonReader jsonReader) throws IOException { public static final String SERIALIZED_NAME_CREATED_AT = "created_at"; @SerializedName(SERIALIZED_NAME_CREATED_AT) - private OffsetDateTime createdAt; + private String createdAt; public static final String SERIALIZED_NAME_CONTEXT = "context"; @SerializedName(SERIALIZED_NAME_CONTEXT) @@ -213,7 +213,7 @@ public void setName(NameEnum name) { } - public ThreeDSecureResultRequestEvent createdAt(OffsetDateTime createdAt) { + public ThreeDSecureResultRequestEvent createdAt(String createdAt) { this.createdAt = createdAt; return this; @@ -226,12 +226,12 @@ public ThreeDSecureResultRequestEvent createdAt(OffsetDateTime createdAt) { @javax.annotation.Nullable @ApiModelProperty(example = "2013-07-16T19:23Z", value = "The date and time when this transaction was created in our system.") - public OffsetDateTime getCreatedAt() { + public String getCreatedAt() { return createdAt; } - public void setCreatedAt(OffsetDateTime createdAt) { + public void setCreatedAt(String createdAt) { this.createdAt = createdAt; } diff --git a/src/main/java/com/gr4vy/api/model/ThreeDSecureResultRequestEventContext.java b/src/main/java/com/gr4vy/api/model/ThreeDSecureResultRequestEventContext.java index f692ed4..8c1266f 100644 --- a/src/main/java/com/gr4vy/api/model/ThreeDSecureResultRequestEventContext.java +++ b/src/main/java/com/gr4vy/api/model/ThreeDSecureResultRequestEventContext.java @@ -28,7 +28,7 @@ * 3DS post-authentication context. */ @ApiModel(description = "3DS post-authentication context.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-08T13:56:38.178267Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-09-06T16:38:13.632050Z[Etc/UTC]") public class ThreeDSecureResultRequestEventContext { public static final String SERIALIZED_NAME_URL = "url"; @SerializedName(SERIALIZED_NAME_URL) diff --git a/src/main/java/com/gr4vy/api/model/ThreeDSecureSuccessEvent.java b/src/main/java/com/gr4vy/api/model/ThreeDSecureSuccessEvent.java index 87c404b..3fe3402 100644 --- a/src/main/java/com/gr4vy/api/model/ThreeDSecureSuccessEvent.java +++ b/src/main/java/com/gr4vy/api/model/ThreeDSecureSuccessEvent.java @@ -25,13 +25,13 @@ import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.UUID; -import org.threeten.bp.OffsetDateTime; + /** * Details related to 3DS processing. */ @ApiModel(description = "Details related to 3DS processing.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-08T13:56:38.178267Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-09-06T16:38:13.632050Z[Etc/UTC]") public class ThreeDSecureSuccessEvent { /** * The type of this resource. Is always `transaction-event`. @@ -137,7 +137,7 @@ public NameEnum read(final JsonReader jsonReader) throws IOException { public static final String SERIALIZED_NAME_CREATED_AT = "created_at"; @SerializedName(SERIALIZED_NAME_CREATED_AT) - private OffsetDateTime createdAt; + private String createdAt; public static final String SERIALIZED_NAME_CONTEXT = "context"; @SerializedName(SERIALIZED_NAME_CONTEXT) @@ -213,7 +213,7 @@ public void setName(NameEnum name) { } - public ThreeDSecureSuccessEvent createdAt(OffsetDateTime createdAt) { + public ThreeDSecureSuccessEvent createdAt(String createdAt) { this.createdAt = createdAt; return this; @@ -226,12 +226,12 @@ public ThreeDSecureSuccessEvent createdAt(OffsetDateTime createdAt) { @javax.annotation.Nullable @ApiModelProperty(example = "2013-07-16T19:23Z", value = "The date and time when this transaction was created in our system.") - public OffsetDateTime getCreatedAt() { + public String getCreatedAt() { return createdAt; } - public void setCreatedAt(OffsetDateTime createdAt) { + public void setCreatedAt(String createdAt) { this.createdAt = createdAt; } diff --git a/src/main/java/com/gr4vy/api/model/ThreeDSecureSuccessEventContext.java b/src/main/java/com/gr4vy/api/model/ThreeDSecureSuccessEventContext.java index d7281dd..e7107ff 100644 --- a/src/main/java/com/gr4vy/api/model/ThreeDSecureSuccessEventContext.java +++ b/src/main/java/com/gr4vy/api/model/ThreeDSecureSuccessEventContext.java @@ -28,7 +28,7 @@ * 3DS context. */ @ApiModel(description = "3DS context.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-08T13:56:38.178267Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-09-06T16:38:13.632050Z[Etc/UTC]") public class ThreeDSecureSuccessEventContext { public static final String SERIALIZED_NAME_ECI = "eci"; @SerializedName(SERIALIZED_NAME_ECI) diff --git a/src/main/java/com/gr4vy/api/model/ThreeDSecureSummary.java b/src/main/java/com/gr4vy/api/model/ThreeDSecureSummary.java index a7c44b8..a4a8dc9 100644 --- a/src/main/java/com/gr4vy/api/model/ThreeDSecureSummary.java +++ b/src/main/java/com/gr4vy/api/model/ThreeDSecureSummary.java @@ -30,7 +30,7 @@ * The 3-D Secure data that was sent to the payment service for the transaction. */ @ApiModel(description = "The 3-D Secure data that was sent to the payment service for the transaction.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-08T13:56:38.178267Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-09-06T16:38:13.632050Z[Etc/UTC]") public class ThreeDSecureSummary { public static final String SERIALIZED_NAME_VERSION = "version"; @SerializedName(SERIALIZED_NAME_VERSION) diff --git a/src/main/java/com/gr4vy/api/model/ThreeDSecureSuccessTransactionEventContext.java b/src/main/java/com/gr4vy/api/model/ThreeDSecureV2.java similarity index 55% rename from src/main/java/com/gr4vy/api/model/ThreeDSecureSuccessTransactionEventContext.java rename to src/main/java/com/gr4vy/api/model/ThreeDSecureV2.java index a68c1ee..abbe8ee 100644 --- a/src/main/java/com/gr4vy/api/model/ThreeDSecureSuccessTransactionEventContext.java +++ b/src/main/java/com/gr4vy/api/model/ThreeDSecureV2.java @@ -25,51 +25,99 @@ import java.io.IOException; /** - * 3DS context. + * ThreeDSecureV2 */ -@ApiModel(description = "3DS context.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-30T05:21:36.133441Z[Etc/UTC]") -public class ThreeDSecureSuccessTransactionEventContext { - public static final String SERIALIZED_NAME_ECI = "eci"; - @SerializedName(SERIALIZED_NAME_ECI) - private String eci; - +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-09-06T16:38:13.632050Z[Etc/UTC]") +public class ThreeDSecureV2 { public static final String SERIALIZED_NAME_CAVV = "cavv"; @SerializedName(SERIALIZED_NAME_CAVV) private String cavv; + public static final String SERIALIZED_NAME_ECI = "eci"; + @SerializedName(SERIALIZED_NAME_ECI) + private String eci; + public static final String SERIALIZED_NAME_VERSION = "version"; @SerializedName(SERIALIZED_NAME_VERSION) private String version; - public static final String SERIALIZED_NAME_DIRECTORY_RESPONSE = "directory_response"; - @SerializedName(SERIALIZED_NAME_DIRECTORY_RESPONSE) - private String directoryResponse; + /** + * The transaction status after a the 3DS challenge. This will be null in case of a frictionless 3DS flow. + */ + @JsonAdapter(AuthenticationResponseEnum.Adapter.class) + public enum AuthenticationResponseEnum { + Y("Y"), + + A("A"), + + N("N"), + + R("R"), + + U("U"); - public static final String SERIALIZED_NAME_AUTHENTICATION_RESPONSE = "authentication_response"; - @SerializedName(SERIALIZED_NAME_AUTHENTICATION_RESPONSE) - private String authenticationResponse; + private String value; - public static final String SERIALIZED_NAME_DIRECTORY_TRANSACTION_ID = "directory_transaction_id"; - @SerializedName(SERIALIZED_NAME_DIRECTORY_TRANSACTION_ID) - private String directoryTransactionId; + AuthenticationResponseEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } - public static final String SERIALIZED_NAME_CAVV_ALGORITHM = "cavv_algorithm"; - @SerializedName(SERIALIZED_NAME_CAVV_ALGORITHM) - private String cavvAlgorithm; + @Override + public String toString() { + return String.valueOf(value); + } + + public static AuthenticationResponseEnum fromValue(String value) { + for (AuthenticationResponseEnum b : AuthenticationResponseEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final AuthenticationResponseEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public AuthenticationResponseEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return AuthenticationResponseEnum.fromValue(value); + } + } + } + + public static final String SERIALIZED_NAME_AUTHENTICATION_RESPONSE = "authentication_response"; + @SerializedName(SERIALIZED_NAME_AUTHENTICATION_RESPONSE) + private AuthenticationResponseEnum authenticationResponse; /** - * The method used for 3DS authentication for this transaction. + * The transaction status received as part of the authentication request. */ - @JsonAdapter(MethodEnum.Adapter.class) - public enum MethodEnum { - CHALLENGE("challenge"), + @JsonAdapter(DirectoryResponseEnum.Adapter.class) + public enum DirectoryResponseEnum { + C("C"), + + Y("Y"), - FRICTIONLESS("frictionless"); + A("A"), + + N("N"), + + R("R"), + + U("U"); private String value; - MethodEnum(String value) { + DirectoryResponseEnum(String value) { this.value = value; } @@ -82,8 +130,8 @@ public String toString() { return String.valueOf(value); } - public static MethodEnum fromValue(String value) { - for (MethodEnum b : MethodEnum.values()) { + public static DirectoryResponseEnum fromValue(String value) { + for (DirectoryResponseEnum b : DirectoryResponseEnum.values()) { if (b.value.equals(value)) { return b; } @@ -91,72 +139,80 @@ public static MethodEnum fromValue(String value) { return null; } - public static class Adapter extends TypeAdapter { + public static class Adapter extends TypeAdapter { @Override - public void write(final JsonWriter jsonWriter, final MethodEnum enumeration) throws IOException { + public void write(final JsonWriter jsonWriter, final DirectoryResponseEnum enumeration) throws IOException { jsonWriter.value(enumeration.getValue()); } @Override - public MethodEnum read(final JsonReader jsonReader) throws IOException { + public DirectoryResponseEnum read(final JsonReader jsonReader) throws IOException { String value = jsonReader.nextString(); - return MethodEnum.fromValue(value); + return DirectoryResponseEnum.fromValue(value); } } } - public static final String SERIALIZED_NAME_METHOD = "method"; - @SerializedName(SERIALIZED_NAME_METHOD) - private MethodEnum method; + public static final String SERIALIZED_NAME_DIRECTORY_RESPONSE = "directory_response"; + @SerializedName(SERIALIZED_NAME_DIRECTORY_RESPONSE) + private DirectoryResponseEnum directoryResponse; + + public static final String SERIALIZED_NAME_DIRECTORY_TRANSACTION_ID = "directory_transaction_id"; + @SerializedName(SERIALIZED_NAME_DIRECTORY_TRANSACTION_ID) + private String directoryTransactionId; + + public static final String SERIALIZED_NAME_TRANSACTION_REASON = "transaction_reason"; + @SerializedName(SERIALIZED_NAME_TRANSACTION_REASON) + private String transactionReason; - public ThreeDSecureSuccessTransactionEventContext eci(String eci) { + public ThreeDSecureV2 cavv(String cavv) { - this.eci = eci; + this.cavv = cavv; return this; } /** - * The electronic commerce indicator for the 3DS transaction. - * @return eci + * The cardholder authentication value or AAV. + * @return cavv **/ @javax.annotation.Nullable - @ApiModelProperty(example = "05", value = "The electronic commerce indicator for the 3DS transaction.") + @ApiModelProperty(example = "3q2+78r+ur7erb7vyv66vv8=", value = "The cardholder authentication value or AAV.") - public String getEci() { - return eci; + public String getCavv() { + return cavv; } - public void setEci(String eci) { - this.eci = eci; + public void setCavv(String cavv) { + this.cavv = cavv; } - public ThreeDSecureSuccessTransactionEventContext cavv(String cavv) { + public ThreeDSecureV2 eci(String eci) { - this.cavv = cavv; + this.eci = eci; return this; } /** - * The cardholder authentication value or AAV. - * @return cavv + * The electronic commerce indicator for the 3DS transaction. + * @return eci **/ @javax.annotation.Nullable - @ApiModelProperty(example = "3q2+78r+ur7erb7vyv66vv8=", value = "The cardholder authentication value or AAV.") + @ApiModelProperty(example = "05", value = "The electronic commerce indicator for the 3DS transaction.") - public String getCavv() { - return cavv; + public String getEci() { + return eci; } - public void setCavv(String cavv) { - this.cavv = cavv; + public void setEci(String eci) { + this.eci = eci; } - public ThreeDSecureSuccessTransactionEventContext version(String version) { + public ThreeDSecureV2 version(String version) { this.version = version; return this; @@ -179,53 +235,53 @@ public void setVersion(String version) { } - public ThreeDSecureSuccessTransactionEventContext directoryResponse(String directoryResponse) { + public ThreeDSecureV2 authenticationResponse(AuthenticationResponseEnum authenticationResponse) { - this.directoryResponse = directoryResponse; + this.authenticationResponse = authenticationResponse; return this; } /** - * For 3-D Secure version 1, the enrolment response. For 3-D Secure version , the transaction status from the `ARes`. - * @return directoryResponse + * The transaction status after a the 3DS challenge. This will be null in case of a frictionless 3DS flow. + * @return authenticationResponse **/ @javax.annotation.Nullable - @ApiModelProperty(example = "C", value = "For 3-D Secure version 1, the enrolment response. For 3-D Secure version , the transaction status from the `ARes`.") + @ApiModelProperty(example = "Y", value = "The transaction status after a the 3DS challenge. This will be null in case of a frictionless 3DS flow.") - public String getDirectoryResponse() { - return directoryResponse; + public AuthenticationResponseEnum getAuthenticationResponse() { + return authenticationResponse; } - public void setDirectoryResponse(String directoryResponse) { - this.directoryResponse = directoryResponse; + public void setAuthenticationResponse(AuthenticationResponseEnum authenticationResponse) { + this.authenticationResponse = authenticationResponse; } - public ThreeDSecureSuccessTransactionEventContext authenticationResponse(String authenticationResponse) { + public ThreeDSecureV2 directoryResponse(DirectoryResponseEnum directoryResponse) { - this.authenticationResponse = authenticationResponse; + this.directoryResponse = directoryResponse; return this; } /** - * The transaction status from the challenge result (not required for frictionless). - * @return authenticationResponse + * The transaction status received as part of the authentication request. + * @return directoryResponse **/ @javax.annotation.Nullable - @ApiModelProperty(example = "Y", value = "The transaction status from the challenge result (not required for frictionless).") + @ApiModelProperty(example = "C", value = "The transaction status received as part of the authentication request.") - public String getAuthenticationResponse() { - return authenticationResponse; + public DirectoryResponseEnum getDirectoryResponse() { + return directoryResponse; } - public void setAuthenticationResponse(String authenticationResponse) { - this.authenticationResponse = authenticationResponse; + public void setDirectoryResponse(DirectoryResponseEnum directoryResponse) { + this.directoryResponse = directoryResponse; } - public ThreeDSecureSuccessTransactionEventContext directoryTransactionId(String directoryTransactionId) { + public ThreeDSecureV2 directoryTransactionId(String directoryTransactionId) { this.directoryTransactionId = directoryTransactionId; return this; @@ -248,49 +304,26 @@ public void setDirectoryTransactionId(String directoryTransactionId) { } - public ThreeDSecureSuccessTransactionEventContext cavvAlgorithm(String cavvAlgorithm) { - - this.cavvAlgorithm = cavvAlgorithm; - return this; - } - - /** - * The CAVV Algorithm used. - * @return cavvAlgorithm - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "The CAVV Algorithm used.") - - public String getCavvAlgorithm() { - return cavvAlgorithm; - } - - - public void setCavvAlgorithm(String cavvAlgorithm) { - this.cavvAlgorithm = cavvAlgorithm; - } - - - public ThreeDSecureSuccessTransactionEventContext method(MethodEnum method) { + public ThreeDSecureV2 transactionReason(String transactionReason) { - this.method = method; + this.transactionReason = transactionReason; return this; } /** - * The method used for 3DS authentication for this transaction. - * @return method + * The reason identifier for a declined transaction. + * @return transactionReason **/ @javax.annotation.Nullable - @ApiModelProperty(value = "The method used for 3DS authentication for this transaction.") + @ApiModelProperty(example = "05", value = "The reason identifier for a declined transaction.") - public MethodEnum getMethod() { - return method; + public String getTransactionReason() { + return transactionReason; } - public void setMethod(MethodEnum method) { - this.method = method; + public void setTransactionReason(String transactionReason) { + this.transactionReason = transactionReason; } @@ -302,34 +335,32 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - ThreeDSecureSuccessTransactionEventContext threeDSecureSuccessTransactionEventContext = (ThreeDSecureSuccessTransactionEventContext) o; - return Objects.equals(this.eci, threeDSecureSuccessTransactionEventContext.eci) && - Objects.equals(this.cavv, threeDSecureSuccessTransactionEventContext.cavv) && - Objects.equals(this.version, threeDSecureSuccessTransactionEventContext.version) && - Objects.equals(this.directoryResponse, threeDSecureSuccessTransactionEventContext.directoryResponse) && - Objects.equals(this.authenticationResponse, threeDSecureSuccessTransactionEventContext.authenticationResponse) && - Objects.equals(this.directoryTransactionId, threeDSecureSuccessTransactionEventContext.directoryTransactionId) && - Objects.equals(this.cavvAlgorithm, threeDSecureSuccessTransactionEventContext.cavvAlgorithm) && - Objects.equals(this.method, threeDSecureSuccessTransactionEventContext.method); + ThreeDSecureV2 threeDSecureV2 = (ThreeDSecureV2) o; + return Objects.equals(this.cavv, threeDSecureV2.cavv) && + Objects.equals(this.eci, threeDSecureV2.eci) && + Objects.equals(this.version, threeDSecureV2.version) && + Objects.equals(this.authenticationResponse, threeDSecureV2.authenticationResponse) && + Objects.equals(this.directoryResponse, threeDSecureV2.directoryResponse) && + Objects.equals(this.directoryTransactionId, threeDSecureV2.directoryTransactionId) && + Objects.equals(this.transactionReason, threeDSecureV2.transactionReason); } @Override public int hashCode() { - return Objects.hash(eci, cavv, version, directoryResponse, authenticationResponse, directoryTransactionId, cavvAlgorithm, method); + return Objects.hash(cavv, eci, version, authenticationResponse, directoryResponse, directoryTransactionId, transactionReason); } @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class ThreeDSecureSuccessTransactionEventContext {\n"); - sb.append(" eci: ").append(toIndentedString(eci)).append("\n"); + sb.append("class ThreeDSecureV2 {\n"); sb.append(" cavv: ").append(toIndentedString(cavv)).append("\n"); + sb.append(" eci: ").append(toIndentedString(eci)).append("\n"); sb.append(" version: ").append(toIndentedString(version)).append("\n"); - sb.append(" directoryResponse: ").append(toIndentedString(directoryResponse)).append("\n"); sb.append(" authenticationResponse: ").append(toIndentedString(authenticationResponse)).append("\n"); + sb.append(" directoryResponse: ").append(toIndentedString(directoryResponse)).append("\n"); sb.append(" directoryTransactionId: ").append(toIndentedString(directoryTransactionId)).append("\n"); - sb.append(" cavvAlgorithm: ").append(toIndentedString(cavvAlgorithm)).append("\n"); - sb.append(" method: ").append(toIndentedString(method)).append("\n"); + sb.append(" transactionReason: ").append(toIndentedString(transactionReason)).append("\n"); sb.append("}"); return sb.toString(); } diff --git a/src/main/java/com/gr4vy/api/model/TokenizedRequest.java b/src/main/java/com/gr4vy/api/model/TokenizedRequest.java index ef634e4..ac89dc1 100644 --- a/src/main/java/com/gr4vy/api/model/TokenizedRequest.java +++ b/src/main/java/com/gr4vy/api/model/TokenizedRequest.java @@ -28,7 +28,7 @@ * Details for a previously stored payment method. */ @ApiModel(description = "Details for a previously stored payment method.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-08T13:56:38.178267Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-09-06T16:38:13.632050Z[Etc/UTC]") public class TokenizedRequest { /** * `id`. diff --git a/src/main/java/com/gr4vy/api/model/Transaction.java b/src/main/java/com/gr4vy/api/model/Transaction.java index 35d801e..004b185 100644 --- a/src/main/java/com/gr4vy/api/model/Transaction.java +++ b/src/main/java/com/gr4vy/api/model/Transaction.java @@ -35,13 +35,13 @@ import java.util.List; import java.util.Map; import java.util.UUID; -import org.threeten.bp.OffsetDateTime; + /** * A transaction record. */ @ApiModel(description = "A transaction record.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-08T13:56:38.178267Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-09-06T16:38:13.632050Z[Etc/UTC]") public class Transaction { /** * The type of this resource. Is always `transaction`. @@ -96,6 +96,10 @@ public TypeEnum read(final JsonReader jsonReader) throws IOException { @SerializedName(SERIALIZED_NAME_ID) private UUID id; + public static final String SERIALIZED_NAME_RECONCILIATION_ID = "reconciliation_id"; + @SerializedName(SERIALIZED_NAME_RECONCILIATION_ID) + private String reconciliationId; + public static final String SERIALIZED_NAME_MERCHANT_ACCOUNT_ID = "merchant_account_id"; @SerializedName(SERIALIZED_NAME_MERCHANT_ACCOUNT_ID) private String merchantAccountId; @@ -246,7 +250,7 @@ public IntentEnum read(final JsonReader jsonReader) throws IOException { public static final String SERIALIZED_NAME_CREATED_AT = "created_at"; @SerializedName(SERIALIZED_NAME_CREATED_AT) - private OffsetDateTime createdAt; + private String createdAt; public static final String SERIALIZED_NAME_EXTERNAL_IDENTIFIER = "external_identifier"; @SerializedName(SERIALIZED_NAME_EXTERNAL_IDENTIFIER) @@ -254,7 +258,7 @@ public IntentEnum read(final JsonReader jsonReader) throws IOException { public static final String SERIALIZED_NAME_UPDATED_AT = "updated_at"; @SerializedName(SERIALIZED_NAME_UPDATED_AT) - private OffsetDateTime updatedAt; + private String updatedAt; public static final String SERIALIZED_NAME_PAYMENT_SERVICE = "payment_service"; @SerializedName(SERIALIZED_NAME_PAYMENT_SERVICE) @@ -472,52 +476,122 @@ public CvvResponseCodeEnum read(final JsonReader jsonReader) throws IOException public enum MethodEnum { AFTERPAY("afterpay"), + ALIPAY("alipay"), + + ALIPAYHK("alipayhk"), + APPLEPAY("applepay"), + BACS("bacs"), + + BANCONTACT("bancontact"), + BANKED("banked"), + BECS("becs"), + BITPAY("bitpay"), BOLETO("boleto"), + BOOST("boost"), + CARD("card"), + CHECKOUT_SESSION("checkout-session"), + CLEARPAY("clearpay"), DANA("dana"), + DCB("dcb"), + + EPS("eps"), + FORTUMO("fortumo"), GCASH("gcash"), + GIROPAY("giropay"), + GOCARDLESS("gocardless"), GOOGLEPAY("googlepay"), + GOPAY("gopay"), + GRABPAY("grabpay"), + IDEAL("ideal"), + + ID("id"), + + KAKAOPAY("kakaopay"), + KLARNA("klarna"), + LAYBUY("laybuy"), + + LINEPAY("linepay"), + + LINKAJA("linkaja"), + + MAYBANKQRPAY("maybankqrpay"), + + MULTIBANCO("multibanco"), + + ONEY_3X("oney_3x"), + + ONEY_4X("oney_4x"), + + ONEY_6X("oney_6x"), + + ONEY_10X("oney_10x"), + + ONEY_12X("oney_12x"), + OVO("ovo"), + OXXO("oxxo"), + PAYMAYA("paymaya"), PAYPAL("paypal"), + PAYPALPAYLATER("paypalpaylater"), + PIX("pix"), RABBITLINEPAY("rabbitlinepay"), + RAZORPAY("razorpay"), + SCALAPAY("scalapay"), + SEPA("sepa"), + SHOPEEPAY("shopeepay"), + SINGTELDASH("singteldash"), + + SOFORT("sofort"), + STRIPEDD("stripedd"), + THAIQR("thaiqr"), + + TOUCHNGO("touchngo"), + TRUEMONEY("truemoney"), TRUSTLY("trustly"), + VENMO("venmo"), + + WAAVE("waave"), + + WECHAT("wechat"), + ZIPPAY("zippay"); private String value; @@ -580,15 +654,15 @@ public MethodEnum read(final JsonReader jsonReader) throws IOException { public static final String SERIALIZED_NAME_AUTHORIZED_AT = "authorized_at"; @SerializedName(SERIALIZED_NAME_AUTHORIZED_AT) - private OffsetDateTime authorizedAt; + private String authorizedAt; public static final String SERIALIZED_NAME_CAPTURED_AT = "captured_at"; @SerializedName(SERIALIZED_NAME_CAPTURED_AT) - private OffsetDateTime capturedAt; + private String capturedAt; public static final String SERIALIZED_NAME_VOIDED_AT = "voided_at"; @SerializedName(SERIALIZED_NAME_VOIDED_AT) - private OffsetDateTime voidedAt; + private String voidedAt; public static final String SERIALIZED_NAME_CHECKOUT_SESSION_ID = "checkout_session_id"; @SerializedName(SERIALIZED_NAME_CHECKOUT_SESSION_ID) @@ -641,6 +715,29 @@ public void setId(UUID id) { } + public Transaction reconciliationId(String reconciliationId) { + + this.reconciliationId = reconciliationId; + return this; + } + + /** + * The base62 encoded transaction ID. This represents a shorter version of this transaction's `id` which is sent to payment services, anti-fraud services, and other connectors. You can use this ID to reconcile a payment service's transaction against our system. This ID is sent instead of the transaction ID because not all services support 36 digit identifiers. + * @return reconciliationId + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "7jZXl4gBUNl0CnaLEnfXbt", value = "The base62 encoded transaction ID. This represents a shorter version of this transaction's `id` which is sent to payment services, anti-fraud services, and other connectors. You can use this ID to reconcile a payment service's transaction against our system. This ID is sent instead of the transaction ID because not all services support 36 digit identifiers.") + + public String getReconciliationId() { + return reconciliationId; + } + + + public void setReconciliationId(String reconciliationId) { + this.reconciliationId = reconciliationId; + } + + public Transaction merchantAccountId(String merchantAccountId) { this.merchantAccountId = merchantAccountId; @@ -877,7 +974,7 @@ public void setBuyer(BuyerSnapshot buyer) { } - public Transaction createdAt(OffsetDateTime createdAt) { + public Transaction createdAt(String createdAt) { this.createdAt = createdAt; return this; @@ -890,12 +987,12 @@ public Transaction createdAt(OffsetDateTime createdAt) { @javax.annotation.Nullable @ApiModelProperty(example = "2013-07-16T19:23Z", value = "The date and time when this transaction was created in our system.") - public OffsetDateTime getCreatedAt() { + public String getCreatedAt() { return createdAt; } - public void setCreatedAt(OffsetDateTime createdAt) { + public void setCreatedAt(String createdAt) { this.createdAt = createdAt; } @@ -923,7 +1020,7 @@ public void setExternalIdentifier(String externalIdentifier) { } - public Transaction updatedAt(OffsetDateTime updatedAt) { + public Transaction updatedAt(String updatedAt) { this.updatedAt = updatedAt; return this; @@ -936,12 +1033,12 @@ public Transaction updatedAt(OffsetDateTime updatedAt) { @javax.annotation.Nullable @ApiModelProperty(value = "Defines when the transaction was last updated.") - public OffsetDateTime getUpdatedAt() { + public String getUpdatedAt() { return updatedAt; } - public void setUpdatedAt(OffsetDateTime updatedAt) { + public void setUpdatedAt(String updatedAt) { this.updatedAt = updatedAt; } @@ -1376,7 +1473,7 @@ public void setThreeDSecure(ThreeDSecureSummary threeDSecure) { } - public Transaction authorizedAt(OffsetDateTime authorizedAt) { + public Transaction authorizedAt(String authorizedAt) { this.authorizedAt = authorizedAt; return this; @@ -1389,17 +1486,17 @@ public Transaction authorizedAt(OffsetDateTime authorizedAt) { @javax.annotation.Nullable @ApiModelProperty(example = "2013-07-16T19:23Z", value = "The date and time when this transaction was authorized in the payment service. Don't use this field to determine whether the transaction was authorized. A `null` value doesn't necessarily imply that the transaction wasn't authorized, it can mean that the payment service doesn't provide this value, that it didn't provide it at the time the transaction was authorized or that the transaction was authorized before the introduction of this field.") - public OffsetDateTime getAuthorizedAt() { + public String getAuthorizedAt() { return authorizedAt; } - public void setAuthorizedAt(OffsetDateTime authorizedAt) { + public void setAuthorizedAt(String authorizedAt) { this.authorizedAt = authorizedAt; } - public Transaction capturedAt(OffsetDateTime capturedAt) { + public Transaction capturedAt(String capturedAt) { this.capturedAt = capturedAt; return this; @@ -1412,17 +1509,17 @@ public Transaction capturedAt(OffsetDateTime capturedAt) { @javax.annotation.Nullable @ApiModelProperty(example = "2013-07-16T19:23Z", value = "The date and time when this transaction was captured in the payment service. Don't use this field to determine whether the transaction was captured. A `null` value doesn't necessarily imply that the transaction wasn't captured, it can mean that the payment service doesn't provide this value, that it didn't provide it at the time the transaction was captured or that the transaction was captured before the introduction of this field.") - public OffsetDateTime getCapturedAt() { + public String getCapturedAt() { return capturedAt; } - public void setCapturedAt(OffsetDateTime capturedAt) { + public void setCapturedAt(String capturedAt) { this.capturedAt = capturedAt; } - public Transaction voidedAt(OffsetDateTime voidedAt) { + public Transaction voidedAt(String voidedAt) { this.voidedAt = voidedAt; return this; @@ -1435,12 +1532,12 @@ public Transaction voidedAt(OffsetDateTime voidedAt) { @javax.annotation.Nullable @ApiModelProperty(example = "2013-07-16T19:23Z", value = "The date and time when this transaction was voided in the payment service. Don't use this field to determine whether the transaction was voided. A `null` value doesn't necessarily imply that the transaction wasn't voided, it can mean that the payment service doesn't provide this value, that it didn't provide it at the time the transaction was voided or that the transaction was voided before the introduction of this field.") - public OffsetDateTime getVoidedAt() { + public String getVoidedAt() { return voidedAt; } - public void setVoidedAt(OffsetDateTime voidedAt) { + public void setVoidedAt(String voidedAt) { this.voidedAt = voidedAt; } @@ -1479,6 +1576,7 @@ public boolean equals(Object o) { Transaction transaction = (Transaction) o; return Objects.equals(this.type, transaction.type) && Objects.equals(this.id, transaction.id) && + Objects.equals(this.reconciliationId, transaction.reconciliationId) && Objects.equals(this.merchantAccountId, transaction.merchantAccountId) && Objects.equals(this.status, transaction.status) && Objects.equals(this.intent, transaction.intent) && @@ -1518,7 +1616,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(type, id, merchantAccountId, status, intent, amount, capturedAmount, refundedAmount, currency, country, paymentMethod, buyer, createdAt, externalIdentifier, updatedAt, paymentService, pendingReview, merchantInitiated, paymentSource, isSubsequentPayment, statementDescriptor, cartItems, schemeTransactionId, rawResponseCode, rawResponseDescription, authResponseCode, avsResponseCode, cvvResponseCode, method, paymentServiceTransactionId, metadata, shippingDetails, threeDSecure, authorizedAt, capturedAt, voidedAt, checkoutSessionId); + return Objects.hash(type, id, reconciliationId, merchantAccountId, status, intent, amount, capturedAmount, refundedAmount, currency, country, paymentMethod, buyer, createdAt, externalIdentifier, updatedAt, paymentService, pendingReview, merchantInitiated, paymentSource, isSubsequentPayment, statementDescriptor, cartItems, schemeTransactionId, rawResponseCode, rawResponseDescription, authResponseCode, avsResponseCode, cvvResponseCode, method, paymentServiceTransactionId, metadata, shippingDetails, threeDSecure, authorizedAt, capturedAt, voidedAt, checkoutSessionId); } @Override @@ -1527,6 +1625,7 @@ public String toString() { sb.append("class Transaction {\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" reconciliationId: ").append(toIndentedString(reconciliationId)).append("\n"); sb.append(" merchantAccountId: ").append(toIndentedString(merchantAccountId)).append("\n"); sb.append(" status: ").append(toIndentedString(status)).append("\n"); sb.append(" intent: ").append(toIndentedString(intent)).append("\n"); diff --git a/src/main/java/com/gr4vy/api/model/TransactionCaptureRequest.java b/src/main/java/com/gr4vy/api/model/TransactionCaptureRequest.java index deacb29..0945be7 100644 --- a/src/main/java/com/gr4vy/api/model/TransactionCaptureRequest.java +++ b/src/main/java/com/gr4vy/api/model/TransactionCaptureRequest.java @@ -28,7 +28,7 @@ * A request to capture a transaction. */ @ApiModel(description = "A request to capture a transaction.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-08T13:56:38.178267Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-09-06T16:38:13.632050Z[Etc/UTC]") public class TransactionCaptureRequest { public static final String SERIALIZED_NAME_AMOUNT = "amount"; @SerializedName(SERIALIZED_NAME_AMOUNT) diff --git a/src/main/java/com/gr4vy/api/model/TransactionCardRequest.java b/src/main/java/com/gr4vy/api/model/TransactionCardRequest.java index d13bc72..38d20a5 100644 --- a/src/main/java/com/gr4vy/api/model/TransactionCardRequest.java +++ b/src/main/java/com/gr4vy/api/model/TransactionCardRequest.java @@ -29,7 +29,7 @@ * Card payment method details to use in a transaction. */ @ApiModel(description = "Card payment method details to use in a transaction.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-08T13:56:38.178267Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-09-06T16:38:13.632050Z[Etc/UTC]") public class TransactionCardRequest { /** * `card`. diff --git a/src/main/java/com/gr4vy/api/model/TransactionCheckoutSessionRequest.java b/src/main/java/com/gr4vy/api/model/TransactionCheckoutSessionRequest.java index a36e588..f669666 100644 --- a/src/main/java/com/gr4vy/api/model/TransactionCheckoutSessionRequest.java +++ b/src/main/java/com/gr4vy/api/model/TransactionCheckoutSessionRequest.java @@ -29,7 +29,7 @@ * Checkout Session payment method details to use in a transaction. */ @ApiModel(description = "Checkout Session payment method details to use in a transaction.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-08T13:56:38.178267Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-09-06T16:38:13.632050Z[Etc/UTC]") public class TransactionCheckoutSessionRequest { /** * `checkout-session`. diff --git a/src/main/java/com/gr4vy/api/model/TransactionHistoryEvent.java b/src/main/java/com/gr4vy/api/model/TransactionHistoryEvent.java index 2dfe883..c372f78 100644 --- a/src/main/java/com/gr4vy/api/model/TransactionHistoryEvent.java +++ b/src/main/java/com/gr4vy/api/model/TransactionHistoryEvent.java @@ -27,13 +27,13 @@ import java.util.List; import java.util.Map; import java.util.UUID; -import org.threeten.bp.OffsetDateTime; + /** * A generic transaction history event. */ @ApiModel(description = "A generic transaction history event.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-08T13:56:38.178267Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-09-06T16:38:13.632050Z[Etc/UTC]") public class TransactionHistoryEvent { /** * The type of this resource. Is always `transaction-event`. @@ -145,7 +145,7 @@ public NameEnum read(final JsonReader jsonReader) throws IOException { public static final String SERIALIZED_NAME_CREATED_AT = "created_at"; @SerializedName(SERIALIZED_NAME_CREATED_AT) - private OffsetDateTime createdAt; + private String createdAt; public static final String SERIALIZED_NAME_CONTEXT = "context"; @SerializedName(SERIALIZED_NAME_CONTEXT) @@ -221,7 +221,7 @@ public void setName(NameEnum name) { } - public TransactionHistoryEvent createdAt(OffsetDateTime createdAt) { + public TransactionHistoryEvent createdAt(String createdAt) { this.createdAt = createdAt; return this; @@ -234,12 +234,12 @@ public TransactionHistoryEvent createdAt(OffsetDateTime createdAt) { @javax.annotation.Nullable @ApiModelProperty(example = "2013-07-16T19:23Z", value = "The date and time when this transaction was created in our system.") - public OffsetDateTime getCreatedAt() { + public String getCreatedAt() { return createdAt; } - public void setCreatedAt(OffsetDateTime createdAt) { + public void setCreatedAt(String createdAt) { this.createdAt = createdAt; } diff --git a/src/main/java/com/gr4vy/api/model/TransactionPaymentMethodRequest.java b/src/main/java/com/gr4vy/api/model/TransactionPaymentMethodRequest.java index 1598df4..e6a2553 100644 --- a/src/main/java/com/gr4vy/api/model/TransactionPaymentMethodRequest.java +++ b/src/main/java/com/gr4vy/api/model/TransactionPaymentMethodRequest.java @@ -20,6 +20,7 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; +import com.gr4vy.api.model.GooglePayRequestAssuranceDetails; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.io.IOException; @@ -29,7 +30,7 @@ * Payment method details to use in a transaction or to register a new payment method. */ @ApiModel(description = "Payment method details to use in a transaction or to register a new payment method.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-08T13:56:38.178267Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-09-06T16:38:13.632050Z[Etc/UTC]") public class TransactionPaymentMethodRequest { /** * The method to use for this request. @@ -38,52 +39,122 @@ public class TransactionPaymentMethodRequest { public enum MethodEnum { AFTERPAY("afterpay"), + ALIPAY("alipay"), + + ALIPAYHK("alipayhk"), + APPLEPAY("applepay"), + BACS("bacs"), + + BANCONTACT("bancontact"), + BANKED("banked"), + BECS("becs"), + BITPAY("bitpay"), BOLETO("boleto"), + BOOST("boost"), + CARD("card"), + CHECKOUT_SESSION("checkout-session"), + CLEARPAY("clearpay"), DANA("dana"), + DCB("dcb"), + + EPS("eps"), + FORTUMO("fortumo"), GCASH("gcash"), + GIROPAY("giropay"), + GOCARDLESS("gocardless"), GOOGLEPAY("googlepay"), + GOPAY("gopay"), + GRABPAY("grabpay"), + IDEAL("ideal"), + + ID("id"), + + KAKAOPAY("kakaopay"), + KLARNA("klarna"), + LAYBUY("laybuy"), + + LINEPAY("linepay"), + + LINKAJA("linkaja"), + + MAYBANKQRPAY("maybankqrpay"), + + MULTIBANCO("multibanco"), + + ONEY_3X("oney_3x"), + + ONEY_4X("oney_4x"), + + ONEY_6X("oney_6x"), + + ONEY_10X("oney_10x"), + + ONEY_12X("oney_12x"), + OVO("ovo"), + OXXO("oxxo"), + PAYMAYA("paymaya"), PAYPAL("paypal"), + PAYPALPAYLATER("paypalpaylater"), + PIX("pix"), RABBITLINEPAY("rabbitlinepay"), + RAZORPAY("razorpay"), + SCALAPAY("scalapay"), + SEPA("sepa"), + SHOPEEPAY("shopeepay"), + SINGTELDASH("singteldash"), + + SOFORT("sofort"), + STRIPEDD("stripedd"), + THAIQR("thaiqr"), + + TOUCHNGO("touchngo"), + TRUEMONEY("truemoney"), TRUSTLY("trustly"), + VENMO("venmo"), + + WAAVE("waave"), + + WECHAT("wechat"), + ZIPPAY("zippay"); private String value; @@ -168,6 +239,18 @@ public MethodEnum read(final JsonReader jsonReader) throws IOException { @SerializedName(SERIALIZED_NAME_COUNTRY) private String country; + public static final String SERIALIZED_NAME_TOKEN = "token"; + @SerializedName(SERIALIZED_NAME_TOKEN) + private Object token; + + public static final String SERIALIZED_NAME_ASSURANCE_DETAILS = "assurance_details"; + @SerializedName(SERIALIZED_NAME_ASSURANCE_DETAILS) + private GooglePayRequestAssuranceDetails assuranceDetails; + + public static final String SERIALIZED_NAME_CARD_HOLDER_NAME = "card_holder_name"; + @SerializedName(SERIALIZED_NAME_CARD_HOLDER_NAME) + private String cardHolderName; + public TransactionPaymentMethodRequest method(MethodEnum method) { @@ -359,11 +442,11 @@ public TransactionPaymentMethodRequest id(String id) { } /** - * An identifier for a previously vaulted payment method. This id can represent any type of payment method. + * An identifier for a previously tokenized payment method or checkout-session. This id can represent any type of payment method or checkout-session. * @return id **/ @javax.annotation.Nullable - @ApiModelProperty(example = "77a76f7e-d2de-4bbc-ada9-d6a0015e6bd5", value = "An identifier for a previously vaulted payment method. This id can represent any type of payment method.") + @ApiModelProperty(example = "77a76f7e-d2de-4bbc-ada9-d6a0015e6bd5", value = "An identifier for a previously tokenized payment method or checkout-session. This id can represent any type of payment method or checkout-session.") public String getId() { return id; @@ -382,11 +465,11 @@ public TransactionPaymentMethodRequest currency(String currency) { } /** - * The ISO-4217 currency code to store this payment method for. This is used to select the payment service to use. This only applies to `redirect` mode payment methods like `gocardless`. + * The ISO-4217 currency code to use this payment method for. This is used to select the payment service to use. * @return currency **/ @javax.annotation.Nullable - @ApiModelProperty(example = "USD", value = "The ISO-4217 currency code to store this payment method for. This is used to select the payment service to use. This only applies to `redirect` mode payment methods like `gocardless`.") + @ApiModelProperty(example = "USD", value = "The ISO-4217 currency code to use this payment method for. This is used to select the payment service to use.") public String getCurrency() { return currency; @@ -405,11 +488,11 @@ public TransactionPaymentMethodRequest country(String country) { } /** - * The 2-letter ISO code of the country to store this payment method for. This is used to select the payment service to use. This only applies to `redirect` mode payment methods like `gocardless`. + * The 2-letter ISO code of the country to use this payment method for. This is used to select the payment service to use. * @return country **/ @javax.annotation.Nullable - @ApiModelProperty(example = "US", value = "The 2-letter ISO code of the country to store this payment method for. This is used to select the payment service to use. This only applies to `redirect` mode payment methods like `gocardless`.") + @ApiModelProperty(example = "US", value = "The 2-letter ISO code of the country to use this payment method for. This is used to select the payment service to use.") public String getCountry() { return country; @@ -421,6 +504,75 @@ public void setCountry(String country) { } + public TransactionPaymentMethodRequest token(Object token) { + + this.token = token; + return this; + } + + /** + * The encrypted (opaque) token that was passed to the `onpaymentauthorized` callback by the Apple Pay integration. + * @return token + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "The encrypted (opaque) token that was passed to the `onpaymentauthorized` callback by the Apple Pay integration.") + + public Object getToken() { + return token; + } + + + public void setToken(Object token) { + this.token = token; + } + + + public TransactionPaymentMethodRequest assuranceDetails(GooglePayRequestAssuranceDetails assuranceDetails) { + + this.assuranceDetails = assuranceDetails; + return this; + } + + /** + * Get assuranceDetails + * @return assuranceDetails + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + + public GooglePayRequestAssuranceDetails getAssuranceDetails() { + return assuranceDetails; + } + + + public void setAssuranceDetails(GooglePayRequestAssuranceDetails assuranceDetails) { + this.assuranceDetails = assuranceDetails; + } + + + public TransactionPaymentMethodRequest cardHolderName(String cardHolderName) { + + this.cardHolderName = cardHolderName; + return this; + } + + /** + * Name of the card holder. + * @return cardHolderName + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "Name of the card holder.") + + public String getCardHolderName() { + return cardHolderName; + } + + + public void setCardHolderName(String cardHolderName) { + this.cardHolderName = cardHolderName; + } + + @Override public boolean equals(Object o) { if (this == o) { @@ -440,12 +592,15 @@ public boolean equals(Object o) { Objects.equals(this.redirectUrl, transactionPaymentMethodRequest.redirectUrl) && Objects.equals(this.id, transactionPaymentMethodRequest.id) && Objects.equals(this.currency, transactionPaymentMethodRequest.currency) && - Objects.equals(this.country, transactionPaymentMethodRequest.country); + Objects.equals(this.country, transactionPaymentMethodRequest.country) && + Objects.equals(this.token, transactionPaymentMethodRequest.token) && + Objects.equals(this.assuranceDetails, transactionPaymentMethodRequest.assuranceDetails) && + Objects.equals(this.cardHolderName, transactionPaymentMethodRequest.cardHolderName); } @Override public int hashCode() { - return Objects.hash(method, number, expirationDate, securityCode, externalIdentifier, buyerId, buyerExternalIdentifier, redirectUrl, id, currency, country); + return Objects.hash(method, number, expirationDate, securityCode, externalIdentifier, buyerId, buyerExternalIdentifier, redirectUrl, id, currency, country, token, assuranceDetails, cardHolderName); } @Override @@ -463,6 +618,9 @@ public String toString() { sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" currency: ").append(toIndentedString(currency)).append("\n"); sb.append(" country: ").append(toIndentedString(country)).append("\n"); + sb.append(" token: ").append(toIndentedString(token)).append("\n"); + sb.append(" assuranceDetails: ").append(toIndentedString(assuranceDetails)).append("\n"); + sb.append(" cardHolderName: ").append(toIndentedString(cardHolderName)).append("\n"); sb.append("}"); return sb.toString(); } diff --git a/src/main/java/com/gr4vy/api/model/TransactionRedirectRequest.java b/src/main/java/com/gr4vy/api/model/TransactionRedirectRequest.java index ff70f93..48c4965 100644 --- a/src/main/java/com/gr4vy/api/model/TransactionRedirectRequest.java +++ b/src/main/java/com/gr4vy/api/model/TransactionRedirectRequest.java @@ -29,7 +29,7 @@ * Redirect payment method details to use in a transaction. */ @ApiModel(description = "Redirect payment method details to use in a transaction.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-08T13:56:38.178267Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-09-06T16:38:13.632050Z[Etc/UTC]") public class TransactionRedirectRequest { /** * The method to use, this can be any of the methods that support redirect requests. When storing a new payment method, only `gocardless` and `stripedd` are currently supported. diff --git a/src/main/java/com/gr4vy/api/model/TransactionRefundRequest.java b/src/main/java/com/gr4vy/api/model/TransactionRefundRequest.java index e47e0ca..3a48f38 100644 --- a/src/main/java/com/gr4vy/api/model/TransactionRefundRequest.java +++ b/src/main/java/com/gr4vy/api/model/TransactionRefundRequest.java @@ -28,7 +28,7 @@ * A request to refund a transaction. */ @ApiModel(description = "A request to refund a transaction.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-08T13:56:38.178267Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-09-06T16:38:13.632050Z[Etc/UTC]") public class TransactionRefundRequest { public static final String SERIALIZED_NAME_AMOUNT = "amount"; @SerializedName(SERIALIZED_NAME_AMOUNT) diff --git a/src/main/java/com/gr4vy/api/model/TransactionRefundRequestDeprecated.java b/src/main/java/com/gr4vy/api/model/TransactionRefundRequestDeprecated.java deleted file mode 100644 index 851a471..0000000 --- a/src/main/java/com/gr4vy/api/model/TransactionRefundRequestDeprecated.java +++ /dev/null @@ -1,101 +0,0 @@ -/* - * Gr4vy API - * Welcome to the Gr4vy API reference documentation. Our API is still very much a work in product and subject to change. - * - * The version of the OpenAPI document: 1.1.0-beta - * Contact: code@gr4vy.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.gr4vy.api.model; - -import java.util.Objects; -import java.util.Arrays; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.io.IOException; - -/** - * A request to refund a transaction. - */ -@ApiModel(description = "A request to refund a transaction.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2022-03-29T11:53:32.457004Z[Etc/UTC]") -public class TransactionRefundRequestDeprecated { - public static final String SERIALIZED_NAME_AMOUNT = "amount"; - @SerializedName(SERIALIZED_NAME_AMOUNT) - private Integer amount; - - - public TransactionRefundRequestDeprecated amount(Integer amount) { - - this.amount = amount; - return this; - } - - /** - * The (partial) amount to refund. When omitted blank, this will refund the entire amount. - * minimum: 0 - * maximum: 99999999 - * @return amount - **/ - @javax.annotation.Nullable - @ApiModelProperty(example = "1299", value = "The (partial) amount to refund. When omitted blank, this will refund the entire amount.") - - public Integer getAmount() { - return amount; - } - - - public void setAmount(Integer amount) { - this.amount = amount; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - TransactionRefundRequestDeprecated transactionRefundRequestDeprecated = (TransactionRefundRequestDeprecated) o; - return Objects.equals(this.amount, transactionRefundRequestDeprecated.amount); - } - - @Override - public int hashCode() { - return Objects.hash(amount); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class TransactionRefundRequestDeprecated {\n"); - sb.append(" amount: ").append(toIndentedString(amount)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/src/main/java/com/gr4vy/api/model/TransactionRequest.java b/src/main/java/com/gr4vy/api/model/TransactionRequest.java index 2e6cce6..31590a8 100644 --- a/src/main/java/com/gr4vy/api/model/TransactionRequest.java +++ b/src/main/java/com/gr4vy/api/model/TransactionRequest.java @@ -39,7 +39,7 @@ * A request to create a transaction. */ @ApiModel(description = "A request to create a transaction.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-08T13:56:38.178267Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-09-06T16:38:13.632050Z[Etc/UTC]") public class TransactionRequest { public static final String SERIALIZED_NAME_AMOUNT = "amount"; @SerializedName(SERIALIZED_NAME_AMOUNT) @@ -199,7 +199,7 @@ public PaymentSourceEnum read(final JsonReader jsonReader) throws IOException { public static final String SERIALIZED_NAME_PREVIOUS_SCHEME_TRANSACTION_ID = "previous_scheme_transaction_id"; @SerializedName(SERIALIZED_NAME_PREVIOUS_SCHEME_TRANSACTION_ID) - private String previousSchemeTransactionId = "null"; + private String previousSchemeTransactionId = null; public static final String SERIALIZED_NAME_BROWSER_INFO = "browser_info"; @SerializedName(SERIALIZED_NAME_BROWSER_INFO) diff --git a/src/main/java/com/gr4vy/api/model/TransactionStatusSummary.java b/src/main/java/com/gr4vy/api/model/TransactionStatusSummary.java index baa61b0..d3d2913 100644 --- a/src/main/java/com/gr4vy/api/model/TransactionStatusSummary.java +++ b/src/main/java/com/gr4vy/api/model/TransactionStatusSummary.java @@ -29,7 +29,7 @@ * A transaction record. */ @ApiModel(description = "A transaction record.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-08T13:56:38.178267Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-09-06T16:38:13.632050Z[Etc/UTC]") public class TransactionStatusSummary { /** * The type of this resource. Is always `transaction`. diff --git a/src/main/java/com/gr4vy/api/model/TransactionSummary.java b/src/main/java/com/gr4vy/api/model/TransactionSummary.java index dcfc8dd..ab6ef99 100644 --- a/src/main/java/com/gr4vy/api/model/TransactionSummary.java +++ b/src/main/java/com/gr4vy/api/model/TransactionSummary.java @@ -27,13 +27,13 @@ import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.UUID; -import org.threeten.bp.OffsetDateTime; + /** * A transaction record. */ @ApiModel(description = "A transaction record.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-08T13:56:38.178267Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-09-06T16:38:13.632050Z[Etc/UTC]") public class TransactionSummary { /** * The type of this resource. Is always `transaction`. @@ -88,6 +88,10 @@ public TypeEnum read(final JsonReader jsonReader) throws IOException { @SerializedName(SERIALIZED_NAME_ID) private UUID id; + public static final String SERIALIZED_NAME_RECONCILIATION_ID = "reconciliation_id"; + @SerializedName(SERIALIZED_NAME_RECONCILIATION_ID) + private String reconciliationId; + public static final String SERIALIZED_NAME_MERCHANT_ACCOUNT_ID = "merchant_account_id"; @SerializedName(SERIALIZED_NAME_MERCHANT_ACCOUNT_ID) private String merchantAccountId; @@ -238,7 +242,7 @@ public IntentEnum read(final JsonReader jsonReader) throws IOException { public static final String SERIALIZED_NAME_CREATED_AT = "created_at"; @SerializedName(SERIALIZED_NAME_CREATED_AT) - private OffsetDateTime createdAt; + private String createdAt; public static final String SERIALIZED_NAME_EXTERNAL_IDENTIFIER = "external_identifier"; @SerializedName(SERIALIZED_NAME_EXTERNAL_IDENTIFIER) @@ -246,7 +250,7 @@ public IntentEnum read(final JsonReader jsonReader) throws IOException { public static final String SERIALIZED_NAME_UPDATED_AT = "updated_at"; @SerializedName(SERIALIZED_NAME_UPDATED_AT) - private OffsetDateTime updatedAt; + private String updatedAt; public static final String SERIALIZED_NAME_PAYMENT_SERVICE = "payment_service"; @SerializedName(SERIALIZED_NAME_PAYMENT_SERVICE) @@ -263,52 +267,122 @@ public IntentEnum read(final JsonReader jsonReader) throws IOException { public enum MethodEnum { AFTERPAY("afterpay"), + ALIPAY("alipay"), + + ALIPAYHK("alipayhk"), + APPLEPAY("applepay"), + BACS("bacs"), + + BANCONTACT("bancontact"), + BANKED("banked"), + BECS("becs"), + BITPAY("bitpay"), BOLETO("boleto"), + BOOST("boost"), + CARD("card"), + CHECKOUT_SESSION("checkout-session"), + CLEARPAY("clearpay"), DANA("dana"), + DCB("dcb"), + + EPS("eps"), + FORTUMO("fortumo"), GCASH("gcash"), + GIROPAY("giropay"), + GOCARDLESS("gocardless"), GOOGLEPAY("googlepay"), + GOPAY("gopay"), + GRABPAY("grabpay"), + IDEAL("ideal"), + + ID("id"), + + KAKAOPAY("kakaopay"), + KLARNA("klarna"), + LAYBUY("laybuy"), + + LINEPAY("linepay"), + + LINKAJA("linkaja"), + + MAYBANKQRPAY("maybankqrpay"), + + MULTIBANCO("multibanco"), + + ONEY_3X("oney_3x"), + + ONEY_4X("oney_4x"), + + ONEY_6X("oney_6x"), + + ONEY_10X("oney_10x"), + + ONEY_12X("oney_12x"), + OVO("ovo"), + OXXO("oxxo"), + PAYMAYA("paymaya"), PAYPAL("paypal"), + PAYPALPAYLATER("paypalpaylater"), + PIX("pix"), RABBITLINEPAY("rabbitlinepay"), + RAZORPAY("razorpay"), + SCALAPAY("scalapay"), + SEPA("sepa"), + SHOPEEPAY("shopeepay"), + SINGTELDASH("singteldash"), + + SOFORT("sofort"), + STRIPEDD("stripedd"), + THAIQR("thaiqr"), + + TOUCHNGO("touchngo"), + TRUEMONEY("truemoney"), TRUSTLY("trustly"), + VENMO("venmo"), + + WAAVE("waave"), + + WECHAT("wechat"), + ZIPPAY("zippay"); private String value; @@ -412,6 +486,29 @@ public void setId(UUID id) { } + public TransactionSummary reconciliationId(String reconciliationId) { + + this.reconciliationId = reconciliationId; + return this; + } + + /** + * The base62 encoded transaction ID. This represents a shorter version of this transaction's `id` which is sent to payment services, anti-fraud services, and other connectors. You can use this ID to reconcile a payment service's transaction against our system. This ID is sent instead of the transaction ID because not all services support 36 digit identifiers. + * @return reconciliationId + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "7jZXl4gBUNl0CnaLEnfXbt", value = "The base62 encoded transaction ID. This represents a shorter version of this transaction's `id` which is sent to payment services, anti-fraud services, and other connectors. You can use this ID to reconcile a payment service's transaction against our system. This ID is sent instead of the transaction ID because not all services support 36 digit identifiers.") + + public String getReconciliationId() { + return reconciliationId; + } + + + public void setReconciliationId(String reconciliationId) { + this.reconciliationId = reconciliationId; + } + + public TransactionSummary merchantAccountId(String merchantAccountId) { this.merchantAccountId = merchantAccountId; @@ -648,7 +745,7 @@ public void setBuyer(BuyerSnapshot buyer) { } - public TransactionSummary createdAt(OffsetDateTime createdAt) { + public TransactionSummary createdAt(String createdAt) { this.createdAt = createdAt; return this; @@ -661,12 +758,12 @@ public TransactionSummary createdAt(OffsetDateTime createdAt) { @javax.annotation.Nullable @ApiModelProperty(example = "2013-07-16T19:23Z", value = "The date and time when this transaction was created in our system.") - public OffsetDateTime getCreatedAt() { + public String getCreatedAt() { return createdAt; } - public void setCreatedAt(OffsetDateTime createdAt) { + public void setCreatedAt(String createdAt) { this.createdAt = createdAt; } @@ -694,7 +791,7 @@ public void setExternalIdentifier(String externalIdentifier) { } - public TransactionSummary updatedAt(OffsetDateTime updatedAt) { + public TransactionSummary updatedAt(String updatedAt) { this.updatedAt = updatedAt; return this; @@ -707,12 +804,12 @@ public TransactionSummary updatedAt(OffsetDateTime updatedAt) { @javax.annotation.Nullable @ApiModelProperty(value = "Defines when the transaction was last updated.") - public OffsetDateTime getUpdatedAt() { + public String getUpdatedAt() { return updatedAt; } - public void setUpdatedAt(OffsetDateTime updatedAt) { + public void setUpdatedAt(String updatedAt) { this.updatedAt = updatedAt; } @@ -866,6 +963,7 @@ public boolean equals(Object o) { TransactionSummary transactionSummary = (TransactionSummary) o; return Objects.equals(this.type, transactionSummary.type) && Objects.equals(this.id, transactionSummary.id) && + Objects.equals(this.reconciliationId, transactionSummary.reconciliationId) && Objects.equals(this.merchantAccountId, transactionSummary.merchantAccountId) && Objects.equals(this.status, transactionSummary.status) && Objects.equals(this.intent, transactionSummary.intent) && @@ -889,7 +987,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(type, id, merchantAccountId, status, intent, amount, capturedAmount, refundedAmount, currency, country, paymentMethod, buyer, createdAt, externalIdentifier, updatedAt, paymentService, pendingReview, method, rawResponseCode, rawResponseDescription, checkoutSessionId); + return Objects.hash(type, id, reconciliationId, merchantAccountId, status, intent, amount, capturedAmount, refundedAmount, currency, country, paymentMethod, buyer, createdAt, externalIdentifier, updatedAt, paymentService, pendingReview, method, rawResponseCode, rawResponseDescription, checkoutSessionId); } @Override @@ -898,6 +996,7 @@ public String toString() { sb.append("class TransactionSummary {\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" reconciliationId: ").append(toIndentedString(reconciliationId)).append("\n"); sb.append(" merchantAccountId: ").append(toIndentedString(merchantAccountId)).append("\n"); sb.append(" status: ").append(toIndentedString(status)).append("\n"); sb.append(" intent: ").append(toIndentedString(intent)).append("\n"); diff --git a/src/main/java/com/gr4vy/api/model/Transactions.java b/src/main/java/com/gr4vy/api/model/Transactions.java index 617d915..d20ffc5 100644 --- a/src/main/java/com/gr4vy/api/model/Transactions.java +++ b/src/main/java/com/gr4vy/api/model/Transactions.java @@ -31,7 +31,7 @@ * A list of transactions. */ @ApiModel(description = "A list of transactions.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-08T13:56:38.178267Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-09-06T16:38:13.632050Z[Etc/UTC]") public class Transactions { public static final String SERIALIZED_NAME_ITEMS = "items"; @SerializedName(SERIALIZED_NAME_ITEMS) diff --git a/src/main/java/com/gr4vy/api/model/TransactionsBatchCaptureRequest.java b/src/main/java/com/gr4vy/api/model/TransactionsBatchCaptureRequest.java index daa843e..48eafe9 100644 --- a/src/main/java/com/gr4vy/api/model/TransactionsBatchCaptureRequest.java +++ b/src/main/java/com/gr4vy/api/model/TransactionsBatchCaptureRequest.java @@ -28,7 +28,7 @@ * A request to capture multiple previously authorized transactions. */ @ApiModel(description = "A request to capture multiple previously authorized transactions.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-08T13:56:38.178267Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-09-06T16:38:13.632050Z[Etc/UTC]") public class TransactionsBatchCaptureRequest { public static final String SERIALIZED_NAME_AMOUNT = "amount"; @SerializedName(SERIALIZED_NAME_AMOUNT) diff --git a/src/main/java/com/gr4vy/api/model/UserCurrentUpdate.java b/src/main/java/com/gr4vy/api/model/UserCurrentUpdate.java index e73fa6d..18acec5 100644 --- a/src/main/java/com/gr4vy/api/model/UserCurrentUpdate.java +++ b/src/main/java/com/gr4vy/api/model/UserCurrentUpdate.java @@ -28,7 +28,7 @@ * A request to update the current user. */ @ApiModel(description = "A request to update the current user.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-08T13:56:38.178267Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-09-06T16:38:13.632050Z[Etc/UTC]") public class UserCurrentUpdate { public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) diff --git a/src/main/java/com/gr4vy/api/model/UserRequest.java b/src/main/java/com/gr4vy/api/model/UserRequest.java index f2a2e0f..d1a1fdb 100644 --- a/src/main/java/com/gr4vy/api/model/UserRequest.java +++ b/src/main/java/com/gr4vy/api/model/UserRequest.java @@ -31,7 +31,7 @@ * A request to create a user. */ @ApiModel(description = "A request to create a user.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-08T13:56:38.178267Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-09-06T16:38:13.632050Z[Etc/UTC]") public class UserRequest { public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) diff --git a/src/main/java/com/gr4vy/api/model/UserRole.java b/src/main/java/com/gr4vy/api/model/UserRole.java index aaf5814..9a9c1ea 100644 --- a/src/main/java/com/gr4vy/api/model/UserRole.java +++ b/src/main/java/com/gr4vy/api/model/UserRole.java @@ -30,7 +30,7 @@ /** * UserRole */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-08T13:56:38.178267Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-09-06T16:38:13.632050Z[Etc/UTC]") public class UserRole { /** * The type of this resource. Always `role`. diff --git a/src/main/java/com/gr4vy/api/model/UserUpdate.java b/src/main/java/com/gr4vy/api/model/UserUpdate.java index 89d1fb2..0d20302 100644 --- a/src/main/java/com/gr4vy/api/model/UserUpdate.java +++ b/src/main/java/com/gr4vy/api/model/UserUpdate.java @@ -31,7 +31,7 @@ * A request to update a user. */ @ApiModel(description = "A request to update a user.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-08-08T13:56:38.178267Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-09-06T16:38:13.632050Z[Etc/UTC]") public class UserUpdate { public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) diff --git a/src/main/java/com/gr4vy/api/openapi/AntiFraudServicesApi.java b/src/main/java/com/gr4vy/api/openapi/AntiFraudServicesApi.java deleted file mode 100644 index 328a239..0000000 --- a/src/main/java/com/gr4vy/api/openapi/AntiFraudServicesApi.java +++ /dev/null @@ -1,546 +0,0 @@ -/* - * Gr4vy API - * Welcome to the Gr4vy API reference documentation. Our API is still very much a work in product and subject to change. - * - * The version of the OpenAPI document: 1.1.0-beta - * Contact: code@gr4vy.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.gr4vy.api.openapi; - -import com.gr4vy.api.ApiCallback; -import com.gr4vy.api.ApiClient; -import com.gr4vy.api.ApiException; -import com.gr4vy.api.ApiResponse; -import com.gr4vy.api.Configuration; -import com.gr4vy.api.Pair; -import com.gr4vy.api.ProgressRequestBody; -import com.gr4vy.api.ProgressResponseBody; - -import com.google.gson.reflect.TypeToken; - -import java.io.IOException; - - -import com.gr4vy.api.model.AntiFraudService; -import com.gr4vy.api.model.AntiFraudServiceCreate; -import com.gr4vy.api.model.AntiFraudServiceUpdate; -import com.gr4vy.api.model.Error401Unauthorized; -import com.gr4vy.api.model.Error404NotFound; -import com.gr4vy.api.model.Error409DuplicateRecord; -import com.gr4vy.api.model.ErrorGeneric; -import java.util.UUID; - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class AntiFraudServicesApi { - private ApiClient localVarApiClient; - - public AntiFraudServicesApi() { - this(Configuration.getDefaultApiClient()); - } - - public AntiFraudServicesApi(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public ApiClient getApiClient() { - return localVarApiClient; - } - - public void setApiClient(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - /** - * Build call for addAntiFraudService - * @param antiFraudServiceCreate (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
201 Returns the anti-fraud service that was added. -
400 Returns an error if the request was badly formatted or missing required fields. -
401 Returns an error if no valid authentication was provided. -
409 Returns an error if duplicate resource has been found. -
- */ - public okhttp3.Call addAntiFraudServiceCall(AntiFraudServiceCreate antiFraudServiceCreate, final ApiCallback _callback) throws ApiException { - Object localVarPostBody = antiFraudServiceCreate; - - // create path and map variables - String localVarPath = "/anti-fraud-services"; - - 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); - localVarHeaderParams.put("Content-Type", localVarContentType); - - String[] localVarAuthNames = new String[] { "BearerAuth" }; - return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call addAntiFraudServiceValidateBeforeCall(AntiFraudServiceCreate antiFraudServiceCreate, final ApiCallback _callback) throws ApiException { - - - okhttp3.Call localVarCall = addAntiFraudServiceCall(antiFraudServiceCreate, _callback); - return localVarCall; - - } - - /** - * New anti-fraud service - * Adds an anti-fraud service, enabling merchants to determine risky transactions and prevent chargebacks. - * @param antiFraudServiceCreate (optional) - * @return AntiFraudService - * @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 Returns the anti-fraud service that was added. -
400 Returns an error if the request was badly formatted or missing required fields. -
401 Returns an error if no valid authentication was provided. -
409 Returns an error if duplicate resource has been found. -
- */ - public AntiFraudService addAntiFraudService(AntiFraudServiceCreate antiFraudServiceCreate) throws ApiException { - ApiResponse localVarResp = addAntiFraudServiceWithHttpInfo(antiFraudServiceCreate); - return localVarResp.getData(); - } - - /** - * New anti-fraud service - * Adds an anti-fraud service, enabling merchants to determine risky transactions and prevent chargebacks. - * @param antiFraudServiceCreate (optional) - * @return ApiResponse<AntiFraudService> - * @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 Returns the anti-fraud service that was added. -
400 Returns an error if the request was badly formatted or missing required fields. -
401 Returns an error if no valid authentication was provided. -
409 Returns an error if duplicate resource has been found. -
- */ - public ApiResponse addAntiFraudServiceWithHttpInfo(AntiFraudServiceCreate antiFraudServiceCreate) throws ApiException { - okhttp3.Call localVarCall = addAntiFraudServiceValidateBeforeCall(antiFraudServiceCreate, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * New anti-fraud service (asynchronously) - * Adds an anti-fraud service, enabling merchants to determine risky transactions and prevent chargebacks. - * @param antiFraudServiceCreate (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
201 Returns the anti-fraud service that was added. -
400 Returns an error if the request was badly formatted or missing required fields. -
401 Returns an error if no valid authentication was provided. -
409 Returns an error if duplicate resource has been found. -
- */ - public okhttp3.Call addAntiFraudServiceAsync(AntiFraudServiceCreate antiFraudServiceCreate, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = addAntiFraudServiceValidateBeforeCall(antiFraudServiceCreate, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for deleteAntiFraudService - * @param antiFraudServiceId The unique ID for an anti-fraud service. (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 Returns an empty response. -
401 Returns an error if no valid authentication was provided. -
404 Returns an error if the resource can not be found. -
- */ - public okhttp3.Call deleteAntiFraudServiceCall(UUID antiFraudServiceId, final ApiCallback _callback) throws ApiException { - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/anti-fraud-services/{anti_fraud_service_id}" - .replaceAll("\\{" + "anti_fraud_service_id" + "\\}", localVarApiClient.escapeString(antiFraudServiceId.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); - localVarHeaderParams.put("Content-Type", localVarContentType); - - String[] localVarAuthNames = new String[] { "BearerAuth" }; - return localVarApiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call deleteAntiFraudServiceValidateBeforeCall(UUID antiFraudServiceId, final ApiCallback _callback) throws ApiException { - - // verify the required parameter 'antiFraudServiceId' is set - if (antiFraudServiceId == null) { - throw new ApiException("Missing the required parameter 'antiFraudServiceId' when calling deleteAntiFraudService(Async)"); - } - - - okhttp3.Call localVarCall = deleteAntiFraudServiceCall(antiFraudServiceId, _callback); - return localVarCall; - - } - - /** - * Delete anti-fraud service - * Deletes an anti-fraud service record. Any associated credentials will also be deleted. - * @param antiFraudServiceId The unique ID for an anti-fraud service. (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 Returns an empty response. -
401 Returns an error if no valid authentication was provided. -
404 Returns an error if the resource can not be found. -
- */ - public void deleteAntiFraudService(UUID antiFraudServiceId) throws ApiException { - deleteAntiFraudServiceWithHttpInfo(antiFraudServiceId); - } - - /** - * Delete anti-fraud service - * Deletes an anti-fraud service record. Any associated credentials will also be deleted. - * @param antiFraudServiceId The unique ID for an anti-fraud service. (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 Returns an empty response. -
401 Returns an error if no valid authentication was provided. -
404 Returns an error if the resource can not be found. -
- */ - public ApiResponse deleteAntiFraudServiceWithHttpInfo(UUID antiFraudServiceId) throws ApiException { - okhttp3.Call localVarCall = deleteAntiFraudServiceValidateBeforeCall(antiFraudServiceId, null); - return localVarApiClient.execute(localVarCall); - } - - /** - * Delete anti-fraud service (asynchronously) - * Deletes an anti-fraud service record. Any associated credentials will also be deleted. - * @param antiFraudServiceId The unique ID for an anti-fraud service. (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 Returns an empty response. -
401 Returns an error if no valid authentication was provided. -
404 Returns an error if the resource can not be found. -
- */ - public okhttp3.Call deleteAntiFraudServiceAsync(UUID antiFraudServiceId, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = deleteAntiFraudServiceValidateBeforeCall(antiFraudServiceId, _callback); - localVarApiClient.executeAsync(localVarCall, _callback); - return localVarCall; - } - /** - * Build call for getAntiFraudService - * @param antiFraudServiceId The unique ID for an anti-fraud service. (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 Returns the information about a anti-fraud service. -
401 Returns an error if no valid authentication was provided. -
404 Returns an error if the resource can not be found. -
0 Returns a generic error. -
- */ - public okhttp3.Call getAntiFraudServiceCall(UUID antiFraudServiceId, final ApiCallback _callback) throws ApiException { - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/anti-fraud-services/{anti_fraud_service_id}" - .replaceAll("\\{" + "anti_fraud_service_id" + "\\}", localVarApiClient.escapeString(antiFraudServiceId.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); - localVarHeaderParams.put("Content-Type", localVarContentType); - - String[] localVarAuthNames = new String[] { "BearerAuth" }; - return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call getAntiFraudServiceValidateBeforeCall(UUID antiFraudServiceId, final ApiCallback _callback) throws ApiException { - - // verify the required parameter 'antiFraudServiceId' is set - if (antiFraudServiceId == null) { - throw new ApiException("Missing the required parameter 'antiFraudServiceId' when calling getAntiFraudService(Async)"); - } - - - okhttp3.Call localVarCall = getAntiFraudServiceCall(antiFraudServiceId, _callback); - return localVarCall; - - } - - /** - * Get anti-fraud service - * Gets the information about an anti-fraud service. - * @param antiFraudServiceId The unique ID for an anti-fraud service. (required) - * @return AntiFraudService - * @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 Returns the information about a anti-fraud service. -
401 Returns an error if no valid authentication was provided. -
404 Returns an error if the resource can not be found. -
0 Returns a generic error. -
- */ - public AntiFraudService getAntiFraudService(UUID antiFraudServiceId) throws ApiException { - ApiResponse localVarResp = getAntiFraudServiceWithHttpInfo(antiFraudServiceId); - return localVarResp.getData(); - } - - /** - * Get anti-fraud service - * Gets the information about an anti-fraud service. - * @param antiFraudServiceId The unique ID for an anti-fraud service. (required) - * @return ApiResponse<AntiFraudService> - * @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 Returns the information about a anti-fraud service. -
401 Returns an error if no valid authentication was provided. -
404 Returns an error if the resource can not be found. -
0 Returns a generic error. -
- */ - public ApiResponse getAntiFraudServiceWithHttpInfo(UUID antiFraudServiceId) throws ApiException { - okhttp3.Call localVarCall = getAntiFraudServiceValidateBeforeCall(antiFraudServiceId, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Get anti-fraud service (asynchronously) - * Gets the information about an anti-fraud service. - * @param antiFraudServiceId The unique ID for an anti-fraud service. (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 Returns the information about a anti-fraud service. -
401 Returns an error if no valid authentication was provided. -
404 Returns an error if the resource can not be found. -
0 Returns a generic error. -
- */ - public okhttp3.Call getAntiFraudServiceAsync(UUID antiFraudServiceId, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = getAntiFraudServiceValidateBeforeCall(antiFraudServiceId, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for updateAntiFraudService - * @param antiFraudServiceId The unique ID for an anti-fraud service. (required) - * @param antiFraudServiceUpdate (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 Returns the anti-fraud service that was updated. -
400 Returns an error if the request was badly formatted or missing required fields. -
401 Returns an error if no valid authentication was provided. -
- */ - public okhttp3.Call updateAntiFraudServiceCall(UUID antiFraudServiceId, AntiFraudServiceUpdate antiFraudServiceUpdate, final ApiCallback _callback) throws ApiException { - Object localVarPostBody = antiFraudServiceUpdate; - - // create path and map variables - String localVarPath = "/anti-fraud-services/{anti_fraud_service_id}" - .replaceAll("\\{" + "anti_fraud_service_id" + "\\}", localVarApiClient.escapeString(antiFraudServiceId.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 = { - "application/json" - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - localVarHeaderParams.put("Content-Type", localVarContentType); - - String[] localVarAuthNames = new String[] { "BearerAuth" }; - return localVarApiClient.buildCall(localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call updateAntiFraudServiceValidateBeforeCall(UUID antiFraudServiceId, AntiFraudServiceUpdate antiFraudServiceUpdate, final ApiCallback _callback) throws ApiException { - - // verify the required parameter 'antiFraudServiceId' is set - if (antiFraudServiceId == null) { - throw new ApiException("Missing the required parameter 'antiFraudServiceId' when calling updateAntiFraudService(Async)"); - } - - - okhttp3.Call localVarCall = updateAntiFraudServiceCall(antiFraudServiceId, antiFraudServiceUpdate, _callback); - return localVarCall; - - } - - /** - * Update anti-fraud service - * Update an anti-fraud service, enabling merchants to determine risky transactions and prevent chargebacks. - * @param antiFraudServiceId The unique ID for an anti-fraud service. (required) - * @param antiFraudServiceUpdate (optional) - * @return AntiFraudService - * @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 Returns the anti-fraud service that was updated. -
400 Returns an error if the request was badly formatted or missing required fields. -
401 Returns an error if no valid authentication was provided. -
- */ - public AntiFraudService updateAntiFraudService(UUID antiFraudServiceId, AntiFraudServiceUpdate antiFraudServiceUpdate) throws ApiException { - ApiResponse localVarResp = updateAntiFraudServiceWithHttpInfo(antiFraudServiceId, antiFraudServiceUpdate); - return localVarResp.getData(); - } - - /** - * Update anti-fraud service - * Update an anti-fraud service, enabling merchants to determine risky transactions and prevent chargebacks. - * @param antiFraudServiceId The unique ID for an anti-fraud service. (required) - * @param antiFraudServiceUpdate (optional) - * @return ApiResponse<AntiFraudService> - * @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 Returns the anti-fraud service that was updated. -
400 Returns an error if the request was badly formatted or missing required fields. -
401 Returns an error if no valid authentication was provided. -
- */ - public ApiResponse updateAntiFraudServiceWithHttpInfo(UUID antiFraudServiceId, AntiFraudServiceUpdate antiFraudServiceUpdate) throws ApiException { - okhttp3.Call localVarCall = updateAntiFraudServiceValidateBeforeCall(antiFraudServiceId, antiFraudServiceUpdate, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Update anti-fraud service (asynchronously) - * Update an anti-fraud service, enabling merchants to determine risky transactions and prevent chargebacks. - * @param antiFraudServiceId The unique ID for an anti-fraud service. (required) - * @param antiFraudServiceUpdate (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 Returns the anti-fraud service that was updated. -
400 Returns an error if the request was badly formatted or missing required fields. -
401 Returns an error if no valid authentication was provided. -
- */ - public okhttp3.Call updateAntiFraudServiceAsync(UUID antiFraudServiceId, AntiFraudServiceUpdate antiFraudServiceUpdate, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = updateAntiFraudServiceValidateBeforeCall(antiFraudServiceId, antiFraudServiceUpdate, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/src/main/java/com/gr4vy/api/openapi/ApiLogsApi.java b/src/main/java/com/gr4vy/api/openapi/ApiLogsApi.java deleted file mode 100644 index cdb6e82..0000000 --- a/src/main/java/com/gr4vy/api/openapi/ApiLogsApi.java +++ /dev/null @@ -1,164 +0,0 @@ -/* - * Gr4vy API - * Welcome to the Gr4vy API reference documentation. Our API is still very much a work in product and subject to change. - * - * The version of the OpenAPI document: 1.1.0-beta - * Contact: code@gr4vy.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.gr4vy.api.openapi; - -import com.gr4vy.api.ApiCallback; -import com.gr4vy.api.ApiClient; -import com.gr4vy.api.ApiException; -import com.gr4vy.api.ApiResponse; -import com.gr4vy.api.Configuration; -import com.gr4vy.api.Pair; -import com.gr4vy.api.ProgressRequestBody; -import com.gr4vy.api.ProgressResponseBody; - -import com.google.gson.reflect.TypeToken; - -import java.io.IOException; - - -import com.gr4vy.api.model.ApiLogs; -import com.gr4vy.api.model.Error401Unauthorized; - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class ApiLogsApi { - private ApiClient localVarApiClient; - - public ApiLogsApi() { - this(Configuration.getDefaultApiClient()); - } - - public ApiLogsApi(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public ApiClient getApiClient() { - return localVarApiClient; - } - - public void setApiClient(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - /** - * Build call for listApiLogs - * @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 Returns a list of API logs. -
401 Returns an error if no valid authentication was provided. -
- */ - public okhttp3.Call listApiLogsCall(final ApiCallback _callback) throws ApiException { - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/api-logs"; - - 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); - localVarHeaderParams.put("Content-Type", localVarContentType); - - String[] localVarAuthNames = new String[] { "BearerAuth" }; - return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call listApiLogsValidateBeforeCall(final ApiCallback _callback) throws ApiException { - - - okhttp3.Call localVarCall = listApiLogsCall(_callback); - return localVarCall; - - } - - /** - * List API error logs - * Returns a list of API 4XX and 5XX logs. - * @return ApiLogs - * @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 Returns a list of API logs. -
401 Returns an error if no valid authentication was provided. -
- */ - public ApiLogs listApiLogs() throws ApiException { - ApiResponse localVarResp = listApiLogsWithHttpInfo(); - return localVarResp.getData(); - } - - /** - * List API error logs - * Returns a list of API 4XX and 5XX logs. - * @return ApiResponse<ApiLogs> - * @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 Returns a list of API logs. -
401 Returns an error if no valid authentication was provided. -
- */ - public ApiResponse listApiLogsWithHttpInfo() throws ApiException { - okhttp3.Call localVarCall = listApiLogsValidateBeforeCall(null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * List API error logs (asynchronously) - * Returns a list of API 4XX and 5XX logs. - * @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 Returns a list of API logs. -
401 Returns an error if no valid authentication was provided. -
- */ - public okhttp3.Call listApiLogsAsync(final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = listApiLogsValidateBeforeCall(_callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/src/main/java/com/gr4vy/api/openapi/AuditLogsApi.java b/src/main/java/com/gr4vy/api/openapi/AuditLogsApi.java deleted file mode 100644 index 6e6c87c..0000000 --- a/src/main/java/com/gr4vy/api/openapi/AuditLogsApi.java +++ /dev/null @@ -1,204 +0,0 @@ -/* - * Gr4vy API - * Welcome to the Gr4vy API reference documentation. Our API is still very much a work in product and subject to change. - * - * The version of the OpenAPI document: 1.1.0-beta - * Contact: code@gr4vy.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.gr4vy.api.openapi; - -import com.gr4vy.api.ApiCallback; -import com.gr4vy.api.ApiClient; -import com.gr4vy.api.ApiException; -import com.gr4vy.api.ApiResponse; -import com.gr4vy.api.Configuration; -import com.gr4vy.api.Pair; -import com.gr4vy.api.ProgressRequestBody; -import com.gr4vy.api.ProgressResponseBody; - -import com.google.gson.reflect.TypeToken; - -import java.io.IOException; - - -import com.gr4vy.api.model.AuditLogs; -import com.gr4vy.api.model.Error401Unauthorized; - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class AuditLogsApi { - private ApiClient localVarApiClient; - - public AuditLogsApi() { - this(Configuration.getDefaultApiClient()); - } - - public AuditLogsApi(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public ApiClient getApiClient() { - return localVarApiClient; - } - - public void setApiClient(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - /** - * Build call for listAuditLogs - * @param limit Defines the maximum number of items to return for this request. (optional, default to 20) - * @param cursor A cursor that identifies the page of results to return. This is used to paginate the results of this API. For the first page of results, this parameter can be left out. For additional pages, use the value returned by the API in the `next_cursor` field. Similarly the `previous_cursor` can be used to reverse backwards in the list. (optional) - * @param userId Filters the results to only the items for which the `user` has an `id` that matches this value. (optional) - * @param action Filters the results to only the items for which the `audit-log` has an `action` that matches this value. (optional) - * @param resourceType Filters the results to only the items for which the `audit-log` has a `resource` that matches this type value. (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 Returns a list of audit logs. -
401 Returns an error if no valid authentication was provided. -
- */ - public okhttp3.Call listAuditLogsCall(Integer limit, String cursor, String userId, String action, String resourceType, final ApiCallback _callback) throws ApiException { - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/audit-logs"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (limit != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("limit", limit)); - } - - if (cursor != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("cursor", cursor)); - } - - if (userId != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("user_id", userId)); - } - - if (action != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("action", action)); - } - - if (resourceType != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("resource_type", resourceType)); - } - - 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); - localVarHeaderParams.put("Content-Type", localVarContentType); - - String[] localVarAuthNames = new String[] { "BearerAuth" }; - return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call listAuditLogsValidateBeforeCall(Integer limit, String cursor, String userId, String action, String resourceType, final ApiCallback _callback) throws ApiException { - - - okhttp3.Call localVarCall = listAuditLogsCall(limit, cursor, userId, action, resourceType, _callback); - return localVarCall; - - } - - /** - * List audit logs - * Returns a list of audit logs. - * @param limit Defines the maximum number of items to return for this request. (optional, default to 20) - * @param cursor A cursor that identifies the page of results to return. This is used to paginate the results of this API. For the first page of results, this parameter can be left out. For additional pages, use the value returned by the API in the `next_cursor` field. Similarly the `previous_cursor` can be used to reverse backwards in the list. (optional) - * @param userId Filters the results to only the items for which the `user` has an `id` that matches this value. (optional) - * @param action Filters the results to only the items for which the `audit-log` has an `action` that matches this value. (optional) - * @param resourceType Filters the results to only the items for which the `audit-log` has a `resource` that matches this type value. (optional) - * @return AuditLogs - * @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 Returns a list of audit logs. -
401 Returns an error if no valid authentication was provided. -
- */ - public AuditLogs listAuditLogs(Integer limit, String cursor, String userId, String action, String resourceType) throws ApiException { - ApiResponse localVarResp = listAuditLogsWithHttpInfo(limit, cursor, userId, action, resourceType); - return localVarResp.getData(); - } - - /** - * List audit logs - * Returns a list of audit logs. - * @param limit Defines the maximum number of items to return for this request. (optional, default to 20) - * @param cursor A cursor that identifies the page of results to return. This is used to paginate the results of this API. For the first page of results, this parameter can be left out. For additional pages, use the value returned by the API in the `next_cursor` field. Similarly the `previous_cursor` can be used to reverse backwards in the list. (optional) - * @param userId Filters the results to only the items for which the `user` has an `id` that matches this value. (optional) - * @param action Filters the results to only the items for which the `audit-log` has an `action` that matches this value. (optional) - * @param resourceType Filters the results to only the items for which the `audit-log` has a `resource` that matches this type value. (optional) - * @return ApiResponse<AuditLogs> - * @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 Returns a list of audit logs. -
401 Returns an error if no valid authentication was provided. -
- */ - public ApiResponse listAuditLogsWithHttpInfo(Integer limit, String cursor, String userId, String action, String resourceType) throws ApiException { - okhttp3.Call localVarCall = listAuditLogsValidateBeforeCall(limit, cursor, userId, action, resourceType, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * List audit logs (asynchronously) - * Returns a list of audit logs. - * @param limit Defines the maximum number of items to return for this request. (optional, default to 20) - * @param cursor A cursor that identifies the page of results to return. This is used to paginate the results of this API. For the first page of results, this parameter can be left out. For additional pages, use the value returned by the API in the `next_cursor` field. Similarly the `previous_cursor` can be used to reverse backwards in the list. (optional) - * @param userId Filters the results to only the items for which the `user` has an `id` that matches this value. (optional) - * @param action Filters the results to only the items for which the `audit-log` has an `action` that matches this value. (optional) - * @param resourceType Filters the results to only the items for which the `audit-log` has a `resource` that matches this type value. (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 Returns a list of audit logs. -
401 Returns an error if no valid authentication was provided. -
- */ - public okhttp3.Call listAuditLogsAsync(Integer limit, String cursor, String userId, String action, String resourceType, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = listAuditLogsValidateBeforeCall(limit, cursor, userId, action, resourceType, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/src/main/java/com/gr4vy/api/openapi/BuyersApi.java b/src/main/java/com/gr4vy/api/openapi/BuyersApi.java deleted file mode 100644 index dfb6f76..0000000 --- a/src/main/java/com/gr4vy/api/openapi/BuyersApi.java +++ /dev/null @@ -1,1197 +0,0 @@ -/* - * Gr4vy API - * Welcome to the Gr4vy API reference documentation. Our API is still very much a work in product and subject to change. - * - * The version of the OpenAPI document: 1.1.0-beta - * Contact: code@gr4vy.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.gr4vy.api.openapi; - -import com.gr4vy.api.ApiCallback; -import com.gr4vy.api.ApiClient; -import com.gr4vy.api.ApiException; -import com.gr4vy.api.ApiResponse; -import com.gr4vy.api.Configuration; -import com.gr4vy.api.Pair; -import com.gr4vy.api.ProgressRequestBody; -import com.gr4vy.api.ProgressResponseBody; - -import com.google.gson.reflect.TypeToken; - -import java.io.IOException; - - -import com.gr4vy.api.model.Buyer; -import com.gr4vy.api.model.BuyerRequest; -import com.gr4vy.api.model.BuyerUpdate; -import com.gr4vy.api.model.Buyers; -import com.gr4vy.api.model.Error401Unauthorized; -import com.gr4vy.api.model.Error404NotFound; -import com.gr4vy.api.model.Error409DuplicateRecord; -import com.gr4vy.api.model.ErrorGeneric; -import com.gr4vy.api.model.ShippingDetail; -import com.gr4vy.api.model.ShippingDetailRequest; -import com.gr4vy.api.model.ShippingDetailUpdateRequest; -import com.gr4vy.api.model.ShippingDetails; -import java.util.UUID; - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class BuyersApi { - private ApiClient localVarApiClient; - - public BuyersApi() { - this(Configuration.getDefaultApiClient()); - } - - public BuyersApi(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public ApiClient getApiClient() { - return localVarApiClient; - } - - public void setApiClient(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - /** - * Build call for deleteBuyer - * @param buyerId The unique ID for a buyer. (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 Returns an empty response. -
401 Returns an error if no valid authentication was provided. -
404 Returns an error if the resource can not be found. -
- */ - public okhttp3.Call deleteBuyerCall(UUID buyerId, final ApiCallback _callback) throws ApiException { - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/buyers/{buyer_id}" - .replaceAll("\\{" + "buyer_id" + "\\}", localVarApiClient.escapeString(buyerId.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); - localVarHeaderParams.put("Content-Type", localVarContentType); - - String[] localVarAuthNames = new String[] { "BearerAuth" }; - return localVarApiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call deleteBuyerValidateBeforeCall(UUID buyerId, final ApiCallback _callback) throws ApiException { - - // verify the required parameter 'buyerId' is set - if (buyerId == null) { - throw new ApiException("Missing the required parameter 'buyerId' when calling deleteBuyer(Async)"); - } - - - okhttp3.Call localVarCall = deleteBuyerCall(buyerId, _callback); - return localVarCall; - - } - - /** - * Delete buyer - * Deletes a buyer record. Any associated stored payment methods will remain in the system but no longer associated to the buyer. - * @param buyerId The unique ID for a buyer. (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 Returns an empty response. -
401 Returns an error if no valid authentication was provided. -
404 Returns an error if the resource can not be found. -
- */ - public void deleteBuyer(UUID buyerId) throws ApiException { - deleteBuyerWithHttpInfo(buyerId); - } - - /** - * Delete buyer - * Deletes a buyer record. Any associated stored payment methods will remain in the system but no longer associated to the buyer. - * @param buyerId The unique ID for a buyer. (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 Returns an empty response. -
401 Returns an error if no valid authentication was provided. -
404 Returns an error if the resource can not be found. -
- */ - public ApiResponse deleteBuyerWithHttpInfo(UUID buyerId) throws ApiException { - okhttp3.Call localVarCall = deleteBuyerValidateBeforeCall(buyerId, null); - return localVarApiClient.execute(localVarCall); - } - - /** - * Delete buyer (asynchronously) - * Deletes a buyer record. Any associated stored payment methods will remain in the system but no longer associated to the buyer. - * @param buyerId The unique ID for a buyer. (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 Returns an empty response. -
401 Returns an error if no valid authentication was provided. -
404 Returns an error if the resource can not be found. -
- */ - public okhttp3.Call deleteBuyerAsync(UUID buyerId, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = deleteBuyerValidateBeforeCall(buyerId, _callback); - localVarApiClient.executeAsync(localVarCall, _callback); - return localVarCall; - } - /** - * Build call for deleteBuyerShippingDetail - * @param buyerId The unique ID for a buyer. (required) - * @param shippingDetailId The unique ID for a buyer's shipping detail. (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 Returns an empty response. -
401 Returns an error if no valid authentication was provided. -
404 Returns an error if the resource can not be found. -
- */ - public okhttp3.Call deleteBuyerShippingDetailCall(UUID buyerId, UUID shippingDetailId, final ApiCallback _callback) throws ApiException { - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/buyers/{buyer_id}/shipping-details/{shipping_detail_id}" - .replaceAll("\\{" + "buyer_id" + "\\}", localVarApiClient.escapeString(buyerId.toString())) - .replaceAll("\\{" + "shipping_detail_id" + "\\}", localVarApiClient.escapeString(shippingDetailId.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); - localVarHeaderParams.put("Content-Type", localVarContentType); - - String[] localVarAuthNames = new String[] { "BearerAuth" }; - return localVarApiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call deleteBuyerShippingDetailValidateBeforeCall(UUID buyerId, UUID shippingDetailId, final ApiCallback _callback) throws ApiException { - - // verify the required parameter 'buyerId' is set - if (buyerId == null) { - throw new ApiException("Missing the required parameter 'buyerId' when calling deleteBuyerShippingDetail(Async)"); - } - - // verify the required parameter 'shippingDetailId' is set - if (shippingDetailId == null) { - throw new ApiException("Missing the required parameter 'shippingDetailId' when calling deleteBuyerShippingDetail(Async)"); - } - - - okhttp3.Call localVarCall = deleteBuyerShippingDetailCall(buyerId, shippingDetailId, _callback); - return localVarCall; - - } - - /** - * Delete buyer shipping detail - * Deletes a buyer shipping detail. - * @param buyerId The unique ID for a buyer. (required) - * @param shippingDetailId The unique ID for a buyer's shipping detail. (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 Returns an empty response. -
401 Returns an error if no valid authentication was provided. -
404 Returns an error if the resource can not be found. -
- */ - public void deleteBuyerShippingDetail(UUID buyerId, UUID shippingDetailId) throws ApiException { - deleteBuyerShippingDetailWithHttpInfo(buyerId, shippingDetailId); - } - - /** - * Delete buyer shipping detail - * Deletes a buyer shipping detail. - * @param buyerId The unique ID for a buyer. (required) - * @param shippingDetailId The unique ID for a buyer's shipping detail. (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 Returns an empty response. -
401 Returns an error if no valid authentication was provided. -
404 Returns an error if the resource can not be found. -
- */ - public ApiResponse deleteBuyerShippingDetailWithHttpInfo(UUID buyerId, UUID shippingDetailId) throws ApiException { - okhttp3.Call localVarCall = deleteBuyerShippingDetailValidateBeforeCall(buyerId, shippingDetailId, null); - return localVarApiClient.execute(localVarCall); - } - - /** - * Delete buyer shipping detail (asynchronously) - * Deletes a buyer shipping detail. - * @param buyerId The unique ID for a buyer. (required) - * @param shippingDetailId The unique ID for a buyer's shipping detail. (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 Returns an empty response. -
401 Returns an error if no valid authentication was provided. -
404 Returns an error if the resource can not be found. -
- */ - public okhttp3.Call deleteBuyerShippingDetailAsync(UUID buyerId, UUID shippingDetailId, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = deleteBuyerShippingDetailValidateBeforeCall(buyerId, shippingDetailId, _callback); - localVarApiClient.executeAsync(localVarCall, _callback); - return localVarCall; - } - /** - * Build call for getBuyer - * @param buyerId The unique ID for a buyer. (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 Returns the information about a buyer. -
401 Returns an error if no valid authentication was provided. -
404 Returns an error if the resource can not be found. -
0 Returns a generic error. -
- */ - public okhttp3.Call getBuyerCall(UUID buyerId, final ApiCallback _callback) throws ApiException { - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/buyers/{buyer_id}" - .replaceAll("\\{" + "buyer_id" + "\\}", localVarApiClient.escapeString(buyerId.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); - localVarHeaderParams.put("Content-Type", localVarContentType); - - String[] localVarAuthNames = new String[] { "BearerAuth" }; - return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call getBuyerValidateBeforeCall(UUID buyerId, final ApiCallback _callback) throws ApiException { - - // verify the required parameter 'buyerId' is set - if (buyerId == null) { - throw new ApiException("Missing the required parameter 'buyerId' when calling getBuyer(Async)"); - } - - - okhttp3.Call localVarCall = getBuyerCall(buyerId, _callback); - return localVarCall; - - } - - /** - * Get buyer - * Gets the information about a buyer. - * @param buyerId The unique ID for a buyer. (required) - * @return Buyer - * @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 Returns the information about a buyer. -
401 Returns an error if no valid authentication was provided. -
404 Returns an error if the resource can not be found. -
0 Returns a generic error. -
- */ - public Buyer getBuyer(UUID buyerId) throws ApiException { - ApiResponse localVarResp = getBuyerWithHttpInfo(buyerId); - return localVarResp.getData(); - } - - /** - * Get buyer - * Gets the information about a buyer. - * @param buyerId The unique ID for a buyer. (required) - * @return ApiResponse<Buyer> - * @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 Returns the information about a buyer. -
401 Returns an error if no valid authentication was provided. -
404 Returns an error if the resource can not be found. -
0 Returns a generic error. -
- */ - public ApiResponse getBuyerWithHttpInfo(UUID buyerId) throws ApiException { - okhttp3.Call localVarCall = getBuyerValidateBeforeCall(buyerId, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Get buyer (asynchronously) - * Gets the information about a buyer. - * @param buyerId The unique ID for a buyer. (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 Returns the information about a buyer. -
401 Returns an error if no valid authentication was provided. -
404 Returns an error if the resource can not be found. -
0 Returns a generic error. -
- */ - public okhttp3.Call getBuyerAsync(UUID buyerId, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = getBuyerValidateBeforeCall(buyerId, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for listBuyerShippingDetails - * @param buyerId The unique ID for a buyer. (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 Returns all associated shipping details. -
401 Returns an error if no valid authentication was provided. -
0 Returns a generic error. -
- */ - public okhttp3.Call listBuyerShippingDetailsCall(UUID buyerId, final ApiCallback _callback) throws ApiException { - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/buyers/{buyer_id}/shipping-details" - .replaceAll("\\{" + "buyer_id" + "\\}", localVarApiClient.escapeString(buyerId.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); - localVarHeaderParams.put("Content-Type", localVarContentType); - - String[] localVarAuthNames = new String[] { "BearerAuth" }; - return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call listBuyerShippingDetailsValidateBeforeCall(UUID buyerId, final ApiCallback _callback) throws ApiException { - - // verify the required parameter 'buyerId' is set - if (buyerId == null) { - throw new ApiException("Missing the required parameter 'buyerId' when calling listBuyerShippingDetails(Async)"); - } - - - okhttp3.Call localVarCall = listBuyerShippingDetailsCall(buyerId, _callback); - return localVarCall; - - } - - /** - * List buyer shipping details - * Retrieve all shipping details for a buyer. - * @param buyerId The unique ID for a buyer. (required) - * @return ShippingDetails - * @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 Returns all associated shipping details. -
401 Returns an error if no valid authentication was provided. -
0 Returns a generic error. -
- */ - public ShippingDetails listBuyerShippingDetails(UUID buyerId) throws ApiException { - ApiResponse localVarResp = listBuyerShippingDetailsWithHttpInfo(buyerId); - return localVarResp.getData(); - } - - /** - * List buyer shipping details - * Retrieve all shipping details for a buyer. - * @param buyerId The unique ID for a buyer. (required) - * @return ApiResponse<ShippingDetails> - * @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 Returns all associated shipping details. -
401 Returns an error if no valid authentication was provided. -
0 Returns a generic error. -
- */ - public ApiResponse listBuyerShippingDetailsWithHttpInfo(UUID buyerId) throws ApiException { - okhttp3.Call localVarCall = listBuyerShippingDetailsValidateBeforeCall(buyerId, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * List buyer shipping details (asynchronously) - * Retrieve all shipping details for a buyer. - * @param buyerId The unique ID for a buyer. (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 Returns all associated shipping details. -
401 Returns an error if no valid authentication was provided. -
0 Returns a generic error. -
- */ - public okhttp3.Call listBuyerShippingDetailsAsync(UUID buyerId, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = listBuyerShippingDetailsValidateBeforeCall(buyerId, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for listBuyers - * @param search Filters the results to only the buyers for which the `display_name` or `external_identifier` matches this value. This field allows for a partial match, matching any buyer for which either of the fields partially or completely matches. (optional) - * @param limit Defines the maximum number of items to return for this request. (optional, default to 20) - * @param cursor A cursor that identifies the page of results to return. This is used to paginate the results of this API. For the first page of results, this parameter can be left out. For additional pages, use the value returned by the API in the `next_cursor` field. Similarly the `previous_cursor` can be used to reverse backwards in the list. (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 Returns a list of buyers. -
401 Returns an error if no valid authentication was provided. -
- */ - public okhttp3.Call listBuyersCall(String search, Integer limit, String cursor, final ApiCallback _callback) throws ApiException { - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/buyers"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (search != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("search", search)); - } - - if (limit != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("limit", limit)); - } - - if (cursor != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("cursor", cursor)); - } - - 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); - localVarHeaderParams.put("Content-Type", localVarContentType); - - String[] localVarAuthNames = new String[] { "BearerAuth" }; - return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call listBuyersValidateBeforeCall(String search, Integer limit, String cursor, final ApiCallback _callback) throws ApiException { - - - okhttp3.Call localVarCall = listBuyersCall(search, limit, cursor, _callback); - return localVarCall; - - } - - /** - * List buyers - * Returns a list of buyers. - * @param search Filters the results to only the buyers for which the `display_name` or `external_identifier` matches this value. This field allows for a partial match, matching any buyer for which either of the fields partially or completely matches. (optional) - * @param limit Defines the maximum number of items to return for this request. (optional, default to 20) - * @param cursor A cursor that identifies the page of results to return. This is used to paginate the results of this API. For the first page of results, this parameter can be left out. For additional pages, use the value returned by the API in the `next_cursor` field. Similarly the `previous_cursor` can be used to reverse backwards in the list. (optional) - * @return Buyers - * @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 Returns a list of buyers. -
401 Returns an error if no valid authentication was provided. -
- */ - public Buyers listBuyers(String search, Integer limit, String cursor) throws ApiException { - ApiResponse localVarResp = listBuyersWithHttpInfo(search, limit, cursor); - return localVarResp.getData(); - } - - /** - * List buyers - * Returns a list of buyers. - * @param search Filters the results to only the buyers for which the `display_name` or `external_identifier` matches this value. This field allows for a partial match, matching any buyer for which either of the fields partially or completely matches. (optional) - * @param limit Defines the maximum number of items to return for this request. (optional, default to 20) - * @param cursor A cursor that identifies the page of results to return. This is used to paginate the results of this API. For the first page of results, this parameter can be left out. For additional pages, use the value returned by the API in the `next_cursor` field. Similarly the `previous_cursor` can be used to reverse backwards in the list. (optional) - * @return ApiResponse<Buyers> - * @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 Returns a list of buyers. -
401 Returns an error if no valid authentication was provided. -
- */ - public ApiResponse listBuyersWithHttpInfo(String search, Integer limit, String cursor) throws ApiException { - okhttp3.Call localVarCall = listBuyersValidateBeforeCall(search, limit, cursor, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * List buyers (asynchronously) - * Returns a list of buyers. - * @param search Filters the results to only the buyers for which the `display_name` or `external_identifier` matches this value. This field allows for a partial match, matching any buyer for which either of the fields partially or completely matches. (optional) - * @param limit Defines the maximum number of items to return for this request. (optional, default to 20) - * @param cursor A cursor that identifies the page of results to return. This is used to paginate the results of this API. For the first page of results, this parameter can be left out. For additional pages, use the value returned by the API in the `next_cursor` field. Similarly the `previous_cursor` can be used to reverse backwards in the list. (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 Returns a list of buyers. -
401 Returns an error if no valid authentication was provided. -
- */ - public okhttp3.Call listBuyersAsync(String search, Integer limit, String cursor, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = listBuyersValidateBeforeCall(search, limit, cursor, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for newBuyer - * @param buyerRequest (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
201 Returns the buyer that was added. -
400 Returns an error if the request was badly formatted or missing required fields. -
401 Returns an error if no valid authentication was provided. -
409 Returns an error if duplicate resource has been found. -
- */ - public okhttp3.Call newBuyerCall(BuyerRequest buyerRequest, final ApiCallback _callback) throws ApiException { - Object localVarPostBody = buyerRequest; - - // create path and map variables - String localVarPath = "/buyers"; - - 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); - localVarHeaderParams.put("Content-Type", localVarContentType); - - String[] localVarAuthNames = new String[] { "BearerAuth" }; - return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call newBuyerValidateBeforeCall(BuyerRequest buyerRequest, final ApiCallback _callback) throws ApiException { - - - okhttp3.Call localVarCall = newBuyerCall(buyerRequest, _callback); - return localVarCall; - - } - - /** - * New buyer - * Adds a buyer, allowing for payment methods and transactions to be associated to this buyer. - * @param buyerRequest (optional) - * @return Buyer - * @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 Returns the buyer that was added. -
400 Returns an error if the request was badly formatted or missing required fields. -
401 Returns an error if no valid authentication was provided. -
409 Returns an error if duplicate resource has been found. -
- */ - public Buyer newBuyer(BuyerRequest buyerRequest) throws ApiException { - ApiResponse localVarResp = newBuyerWithHttpInfo(buyerRequest); - return localVarResp.getData(); - } - - /** - * New buyer - * Adds a buyer, allowing for payment methods and transactions to be associated to this buyer. - * @param buyerRequest (optional) - * @return ApiResponse<Buyer> - * @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 Returns the buyer that was added. -
400 Returns an error if the request was badly formatted or missing required fields. -
401 Returns an error if no valid authentication was provided. -
409 Returns an error if duplicate resource has been found. -
- */ - public ApiResponse newBuyerWithHttpInfo(BuyerRequest buyerRequest) throws ApiException { - okhttp3.Call localVarCall = newBuyerValidateBeforeCall(buyerRequest, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * New buyer (asynchronously) - * Adds a buyer, allowing for payment methods and transactions to be associated to this buyer. - * @param buyerRequest (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
201 Returns the buyer that was added. -
400 Returns an error if the request was badly formatted or missing required fields. -
401 Returns an error if no valid authentication was provided. -
409 Returns an error if duplicate resource has been found. -
- */ - public okhttp3.Call newBuyerAsync(BuyerRequest buyerRequest, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = newBuyerValidateBeforeCall(buyerRequest, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for newBuyerShippingDetail - * @param buyerId The unique ID for a buyer. (required) - * @param shippingDetailRequest (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
201 Returns the shipping detail that was added. -
400 Returns an error if the request was badly formatted or missing required fields. -
401 Returns an error if no valid authentication was provided. -
- */ - public okhttp3.Call newBuyerShippingDetailCall(UUID buyerId, ShippingDetailRequest shippingDetailRequest, final ApiCallback _callback) throws ApiException { - Object localVarPostBody = shippingDetailRequest; - - // create path and map variables - String localVarPath = "/buyers/{buyer_id}/shipping-details" - .replaceAll("\\{" + "buyer_id" + "\\}", localVarApiClient.escapeString(buyerId.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 = { - "application/json" - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - localVarHeaderParams.put("Content-Type", localVarContentType); - - String[] localVarAuthNames = new String[] { "BearerAuth" }; - return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call newBuyerShippingDetailValidateBeforeCall(UUID buyerId, ShippingDetailRequest shippingDetailRequest, final ApiCallback _callback) throws ApiException { - - // verify the required parameter 'buyerId' is set - if (buyerId == null) { - throw new ApiException("Missing the required parameter 'buyerId' when calling newBuyerShippingDetail(Async)"); - } - - - okhttp3.Call localVarCall = newBuyerShippingDetailCall(buyerId, shippingDetailRequest, _callback); - return localVarCall; - - } - - /** - * New buyer shipping detail - * Adds a buyer shipping detail. - * @param buyerId The unique ID for a buyer. (required) - * @param shippingDetailRequest (optional) - * @return ShippingDetail - * @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 Returns the shipping detail that was added. -
400 Returns an error if the request was badly formatted or missing required fields. -
401 Returns an error if no valid authentication was provided. -
- */ - public ShippingDetail newBuyerShippingDetail(UUID buyerId, ShippingDetailRequest shippingDetailRequest) throws ApiException { - ApiResponse localVarResp = newBuyerShippingDetailWithHttpInfo(buyerId, shippingDetailRequest); - return localVarResp.getData(); - } - - /** - * New buyer shipping detail - * Adds a buyer shipping detail. - * @param buyerId The unique ID for a buyer. (required) - * @param shippingDetailRequest (optional) - * @return ApiResponse<ShippingDetail> - * @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 Returns the shipping detail that was added. -
400 Returns an error if the request was badly formatted or missing required fields. -
401 Returns an error if no valid authentication was provided. -
- */ - public ApiResponse newBuyerShippingDetailWithHttpInfo(UUID buyerId, ShippingDetailRequest shippingDetailRequest) throws ApiException { - okhttp3.Call localVarCall = newBuyerShippingDetailValidateBeforeCall(buyerId, shippingDetailRequest, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * New buyer shipping detail (asynchronously) - * Adds a buyer shipping detail. - * @param buyerId The unique ID for a buyer. (required) - * @param shippingDetailRequest (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
201 Returns the shipping detail that was added. -
400 Returns an error if the request was badly formatted or missing required fields. -
401 Returns an error if no valid authentication was provided. -
- */ - public okhttp3.Call newBuyerShippingDetailAsync(UUID buyerId, ShippingDetailRequest shippingDetailRequest, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = newBuyerShippingDetailValidateBeforeCall(buyerId, shippingDetailRequest, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for updateBuyer - * @param buyerId The unique ID for a buyer. (required) - * @param buyerUpdate (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 Returns the updated buyer record. -
400 Returns an error if the request was badly formatted or missing required fields. -
401 Returns an error if no valid authentication was provided. -
404 Returns an error if the resource can not be found. -
409 Returns an error if duplicate resource has been found. -
- */ - public okhttp3.Call updateBuyerCall(UUID buyerId, BuyerUpdate buyerUpdate, final ApiCallback _callback) throws ApiException { - Object localVarPostBody = buyerUpdate; - - // create path and map variables - String localVarPath = "/buyers/{buyer_id}" - .replaceAll("\\{" + "buyer_id" + "\\}", localVarApiClient.escapeString(buyerId.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 = { - "application/json" - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - localVarHeaderParams.put("Content-Type", localVarContentType); - - String[] localVarAuthNames = new String[] { "BearerAuth" }; - return localVarApiClient.buildCall(localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call updateBuyerValidateBeforeCall(UUID buyerId, BuyerUpdate buyerUpdate, final ApiCallback _callback) throws ApiException { - - // verify the required parameter 'buyerId' is set - if (buyerId == null) { - throw new ApiException("Missing the required parameter 'buyerId' when calling updateBuyer(Async)"); - } - - - okhttp3.Call localVarCall = updateBuyerCall(buyerId, buyerUpdate, _callback); - return localVarCall; - - } - - /** - * Update buyer - * Updates a buyer's details. - * @param buyerId The unique ID for a buyer. (required) - * @param buyerUpdate (optional) - * @return Buyer - * @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 Returns the updated buyer record. -
400 Returns an error if the request was badly formatted or missing required fields. -
401 Returns an error if no valid authentication was provided. -
404 Returns an error if the resource can not be found. -
409 Returns an error if duplicate resource has been found. -
- */ - public Buyer updateBuyer(UUID buyerId, BuyerUpdate buyerUpdate) throws ApiException { - ApiResponse localVarResp = updateBuyerWithHttpInfo(buyerId, buyerUpdate); - return localVarResp.getData(); - } - - /** - * Update buyer - * Updates a buyer's details. - * @param buyerId The unique ID for a buyer. (required) - * @param buyerUpdate (optional) - * @return ApiResponse<Buyer> - * @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 Returns the updated buyer record. -
400 Returns an error if the request was badly formatted or missing required fields. -
401 Returns an error if no valid authentication was provided. -
404 Returns an error if the resource can not be found. -
409 Returns an error if duplicate resource has been found. -
- */ - public ApiResponse updateBuyerWithHttpInfo(UUID buyerId, BuyerUpdate buyerUpdate) throws ApiException { - okhttp3.Call localVarCall = updateBuyerValidateBeforeCall(buyerId, buyerUpdate, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Update buyer (asynchronously) - * Updates a buyer's details. - * @param buyerId The unique ID for a buyer. (required) - * @param buyerUpdate (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 Returns the updated buyer record. -
400 Returns an error if the request was badly formatted or missing required fields. -
401 Returns an error if no valid authentication was provided. -
404 Returns an error if the resource can not be found. -
409 Returns an error if duplicate resource has been found. -
- */ - public okhttp3.Call updateBuyerAsync(UUID buyerId, BuyerUpdate buyerUpdate, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = updateBuyerValidateBeforeCall(buyerId, buyerUpdate, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for updateBuyerShippingDetail - * @param buyerId The unique ID for a buyer. (required) - * @param shippingDetailId The unique ID for a buyer's shipping detail. (required) - * @param shippingDetailUpdateRequest (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 Returns the updated shipping detail. -
400 Returns an error if the request was badly formatted or missing required fields. -
401 Returns an error if no valid authentication was provided. -
404 Returns an error if the resource can not be found. -
- */ - public okhttp3.Call updateBuyerShippingDetailCall(UUID buyerId, UUID shippingDetailId, ShippingDetailUpdateRequest shippingDetailUpdateRequest, final ApiCallback _callback) throws ApiException { - Object localVarPostBody = shippingDetailUpdateRequest; - - // create path and map variables - String localVarPath = "/buyers/{buyer_id}/shipping-details/{shipping_detail_id}" - .replaceAll("\\{" + "buyer_id" + "\\}", localVarApiClient.escapeString(buyerId.toString())) - .replaceAll("\\{" + "shipping_detail_id" + "\\}", localVarApiClient.escapeString(shippingDetailId.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 = { - "application/json" - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - localVarHeaderParams.put("Content-Type", localVarContentType); - - String[] localVarAuthNames = new String[] { "BearerAuth" }; - return localVarApiClient.buildCall(localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call updateBuyerShippingDetailValidateBeforeCall(UUID buyerId, UUID shippingDetailId, ShippingDetailUpdateRequest shippingDetailUpdateRequest, final ApiCallback _callback) throws ApiException { - - // verify the required parameter 'buyerId' is set - if (buyerId == null) { - throw new ApiException("Missing the required parameter 'buyerId' when calling updateBuyerShippingDetail(Async)"); - } - - // verify the required parameter 'shippingDetailId' is set - if (shippingDetailId == null) { - throw new ApiException("Missing the required parameter 'shippingDetailId' when calling updateBuyerShippingDetail(Async)"); - } - - - okhttp3.Call localVarCall = updateBuyerShippingDetailCall(buyerId, shippingDetailId, shippingDetailUpdateRequest, _callback); - return localVarCall; - - } - - /** - * Update buyer shipping details - * Updates shipping detail for a buyer. - * @param buyerId The unique ID for a buyer. (required) - * @param shippingDetailId The unique ID for a buyer's shipping detail. (required) - * @param shippingDetailUpdateRequest (optional) - * @return ShippingDetail - * @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 Returns the updated shipping detail. -
400 Returns an error if the request was badly formatted or missing required fields. -
401 Returns an error if no valid authentication was provided. -
404 Returns an error if the resource can not be found. -
- */ - public ShippingDetail updateBuyerShippingDetail(UUID buyerId, UUID shippingDetailId, ShippingDetailUpdateRequest shippingDetailUpdateRequest) throws ApiException { - ApiResponse localVarResp = updateBuyerShippingDetailWithHttpInfo(buyerId, shippingDetailId, shippingDetailUpdateRequest); - return localVarResp.getData(); - } - - /** - * Update buyer shipping details - * Updates shipping detail for a buyer. - * @param buyerId The unique ID for a buyer. (required) - * @param shippingDetailId The unique ID for a buyer's shipping detail. (required) - * @param shippingDetailUpdateRequest (optional) - * @return ApiResponse<ShippingDetail> - * @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 Returns the updated shipping detail. -
400 Returns an error if the request was badly formatted or missing required fields. -
401 Returns an error if no valid authentication was provided. -
404 Returns an error if the resource can not be found. -
- */ - public ApiResponse updateBuyerShippingDetailWithHttpInfo(UUID buyerId, UUID shippingDetailId, ShippingDetailUpdateRequest shippingDetailUpdateRequest) throws ApiException { - okhttp3.Call localVarCall = updateBuyerShippingDetailValidateBeforeCall(buyerId, shippingDetailId, shippingDetailUpdateRequest, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Update buyer shipping details (asynchronously) - * Updates shipping detail for a buyer. - * @param buyerId The unique ID for a buyer. (required) - * @param shippingDetailId The unique ID for a buyer's shipping detail. (required) - * @param shippingDetailUpdateRequest (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 Returns the updated shipping detail. -
400 Returns an error if the request was badly formatted or missing required fields. -
401 Returns an error if no valid authentication was provided. -
404 Returns an error if the resource can not be found. -
- */ - public okhttp3.Call updateBuyerShippingDetailAsync(UUID buyerId, UUID shippingDetailId, ShippingDetailUpdateRequest shippingDetailUpdateRequest, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = updateBuyerShippingDetailValidateBeforeCall(buyerId, shippingDetailId, shippingDetailUpdateRequest, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/src/main/java/com/gr4vy/api/openapi/CardSchemeDefinitionsApi.java b/src/main/java/com/gr4vy/api/openapi/CardSchemeDefinitionsApi.java deleted file mode 100644 index 49a498b..0000000 --- a/src/main/java/com/gr4vy/api/openapi/CardSchemeDefinitionsApi.java +++ /dev/null @@ -1,164 +0,0 @@ -/* - * Gr4vy API - * Welcome to the Gr4vy API reference documentation. Our API is still very much a work in product and subject to change. - * - * The version of the OpenAPI document: 1.1.0-beta - * Contact: code@gr4vy.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.gr4vy.api.openapi; - -import com.gr4vy.api.ApiCallback; -import com.gr4vy.api.ApiClient; -import com.gr4vy.api.ApiException; -import com.gr4vy.api.ApiResponse; -import com.gr4vy.api.Configuration; -import com.gr4vy.api.Pair; -import com.gr4vy.api.ProgressRequestBody; -import com.gr4vy.api.ProgressResponseBody; - -import com.google.gson.reflect.TypeToken; - -import java.io.IOException; - - -import com.gr4vy.api.model.CardSchemeDefinitions; -import com.gr4vy.api.model.Error401Unauthorized; - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class CardSchemeDefinitionsApi { - private ApiClient localVarApiClient; - - public CardSchemeDefinitionsApi() { - this(Configuration.getDefaultApiClient()); - } - - public CardSchemeDefinitionsApi(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public ApiClient getApiClient() { - return localVarApiClient; - } - - public void setApiClient(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - /** - * Build call for listCardSchemeDefinitions - * @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 Returns a list of card scheme definitions. -
401 Returns an error if no valid authentication was provided. -
- */ - public okhttp3.Call listCardSchemeDefinitionsCall(final ApiCallback _callback) throws ApiException { - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/card-scheme-definitions"; - - 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); - localVarHeaderParams.put("Content-Type", localVarContentType); - - String[] localVarAuthNames = new String[] { "BearerAuth" }; - return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call listCardSchemeDefinitionsValidateBeforeCall(final ApiCallback _callback) throws ApiException { - - - okhttp3.Call localVarCall = listCardSchemeDefinitionsCall(_callback); - return localVarCall; - - } - - /** - * List card scheme definitions - * Returns a list of all available card scheme definitions. - * @return CardSchemeDefinitions - * @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 Returns a list of card scheme definitions. -
401 Returns an error if no valid authentication was provided. -
- */ - public CardSchemeDefinitions listCardSchemeDefinitions() throws ApiException { - ApiResponse localVarResp = listCardSchemeDefinitionsWithHttpInfo(); - return localVarResp.getData(); - } - - /** - * List card scheme definitions - * Returns a list of all available card scheme definitions. - * @return ApiResponse<CardSchemeDefinitions> - * @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 Returns a list of card scheme definitions. -
401 Returns an error if no valid authentication was provided. -
- */ - public ApiResponse listCardSchemeDefinitionsWithHttpInfo() throws ApiException { - okhttp3.Call localVarCall = listCardSchemeDefinitionsValidateBeforeCall(null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * List card scheme definitions (asynchronously) - * Returns a list of all available card scheme definitions. - * @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 Returns a list of card scheme definitions. -
401 Returns an error if no valid authentication was provided. -
- */ - public okhttp3.Call listCardSchemeDefinitionsAsync(final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = listCardSchemeDefinitionsValidateBeforeCall(_callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/src/main/java/com/gr4vy/api/openapi/CheckoutSessionsApi.java b/src/main/java/com/gr4vy/api/openapi/CheckoutSessionsApi.java deleted file mode 100644 index 6830822d..0000000 --- a/src/main/java/com/gr4vy/api/openapi/CheckoutSessionsApi.java +++ /dev/null @@ -1,687 +0,0 @@ -/* - * Gr4vy API - * Welcome to the Gr4vy API reference documentation. Our API is still very much a work in product and subject to change. - * - * The version of the OpenAPI document: 1.1.0-beta - * Contact: code@gr4vy.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.gr4vy.api.openapi; - -import com.gr4vy.api.ApiCallback; -import com.gr4vy.api.ApiClient; -import com.gr4vy.api.ApiException; -import com.gr4vy.api.ApiResponse; -import com.gr4vy.api.Configuration; -import com.gr4vy.api.Pair; -import com.gr4vy.api.ProgressRequestBody; -import com.gr4vy.api.ProgressResponseBody; - -import com.google.gson.reflect.TypeToken; - -import java.io.IOException; - - -import com.gr4vy.api.model.CheckoutSession; -import com.gr4vy.api.model.CheckoutSessionCreateRequest; -import com.gr4vy.api.model.CheckoutSessionSecureFieldsUpdate; -import com.gr4vy.api.model.CheckoutSessionUpdateRequest; -import com.gr4vy.api.model.Error401Unauthorized; -import com.gr4vy.api.model.Error404NotFound; -import com.gr4vy.api.model.Error409DuplicateRecord; -import com.gr4vy.api.model.ErrorGeneric; -import java.util.UUID; - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class CheckoutSessionsApi { - private ApiClient localVarApiClient; - - public CheckoutSessionsApi() { - this(Configuration.getDefaultApiClient()); - } - - public CheckoutSessionsApi(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public ApiClient getApiClient() { - return localVarApiClient; - } - - public void setApiClient(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - /** - * Build call for deleteCheckoutSession - * @param checkoutSessionId The unique ID for a Checkout Session. (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 Returns an empty response. -
401 Returns an error if no valid authentication was provided. -
404 Returns an error if the Checkout Session can not be found or has expired. -
0 Returns a generic error. -
- */ - public okhttp3.Call deleteCheckoutSessionCall(UUID checkoutSessionId, final ApiCallback _callback) throws ApiException { - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/checkout/sessions/{checkout_session_id}" - .replaceAll("\\{" + "checkout_session_id" + "\\}", localVarApiClient.escapeString(checkoutSessionId.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); - localVarHeaderParams.put("Content-Type", localVarContentType); - - String[] localVarAuthNames = new String[] { "BearerAuth" }; - return localVarApiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call deleteCheckoutSessionValidateBeforeCall(UUID checkoutSessionId, final ApiCallback _callback) throws ApiException { - - // verify the required parameter 'checkoutSessionId' is set - if (checkoutSessionId == null) { - throw new ApiException("Missing the required parameter 'checkoutSessionId' when calling deleteCheckoutSession(Async)"); - } - - - okhttp3.Call localVarCall = deleteCheckoutSessionCall(checkoutSessionId, _callback); - return localVarCall; - - } - - /** - * Delete checkout session - * Deletes a Checkout Session. - * @param checkoutSessionId The unique ID for a Checkout Session. (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 Returns an empty response. -
401 Returns an error if no valid authentication was provided. -
404 Returns an error if the Checkout Session can not be found or has expired. -
0 Returns a generic error. -
- */ - public void deleteCheckoutSession(UUID checkoutSessionId) throws ApiException { - deleteCheckoutSessionWithHttpInfo(checkoutSessionId); - } - - /** - * Delete checkout session - * Deletes a Checkout Session. - * @param checkoutSessionId The unique ID for a Checkout Session. (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 Returns an empty response. -
401 Returns an error if no valid authentication was provided. -
404 Returns an error if the Checkout Session can not be found or has expired. -
0 Returns a generic error. -
- */ - public ApiResponse deleteCheckoutSessionWithHttpInfo(UUID checkoutSessionId) throws ApiException { - okhttp3.Call localVarCall = deleteCheckoutSessionValidateBeforeCall(checkoutSessionId, null); - return localVarApiClient.execute(localVarCall); - } - - /** - * Delete checkout session (asynchronously) - * Deletes a Checkout Session. - * @param checkoutSessionId The unique ID for a Checkout Session. (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 Returns an empty response. -
401 Returns an error if no valid authentication was provided. -
404 Returns an error if the Checkout Session can not be found or has expired. -
0 Returns a generic error. -
- */ - public okhttp3.Call deleteCheckoutSessionAsync(UUID checkoutSessionId, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = deleteCheckoutSessionValidateBeforeCall(checkoutSessionId, _callback); - localVarApiClient.executeAsync(localVarCall, _callback); - return localVarCall; - } - /** - * Build call for getCheckoutSession - * @param checkoutSessionId The unique ID for a Checkout Session. (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 Returns details about a current Checkout Session. -
401 Returns an error if no valid authentication was provided. -
404 Returns an error if the Checkout Session can not be found or has expired. -
0 Returns a generic error. -
- */ - public okhttp3.Call getCheckoutSessionCall(UUID checkoutSessionId, final ApiCallback _callback) throws ApiException { - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/checkout/sessions/{checkout_session_id}" - .replaceAll("\\{" + "checkout_session_id" + "\\}", localVarApiClient.escapeString(checkoutSessionId.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); - localVarHeaderParams.put("Content-Type", localVarContentType); - - String[] localVarAuthNames = new String[] { "BearerAuth" }; - return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call getCheckoutSessionValidateBeforeCall(UUID checkoutSessionId, final ApiCallback _callback) throws ApiException { - - // verify the required parameter 'checkoutSessionId' is set - if (checkoutSessionId == null) { - throw new ApiException("Missing the required parameter 'checkoutSessionId' when calling getCheckoutSession(Async)"); - } - - - okhttp3.Call localVarCall = getCheckoutSessionCall(checkoutSessionId, _callback); - return localVarCall; - - } - - /** - * Get checkout session - * Gets details about a current Checkout Session. - * @param checkoutSessionId The unique ID for a Checkout Session. (required) - * @return CheckoutSession - * @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 Returns details about a current Checkout Session. -
401 Returns an error if no valid authentication was provided. -
404 Returns an error if the Checkout Session can not be found or has expired. -
0 Returns a generic error. -
- */ - public CheckoutSession getCheckoutSession(UUID checkoutSessionId) throws ApiException { - ApiResponse localVarResp = getCheckoutSessionWithHttpInfo(checkoutSessionId); - return localVarResp.getData(); - } - - /** - * Get checkout session - * Gets details about a current Checkout Session. - * @param checkoutSessionId The unique ID for a Checkout Session. (required) - * @return ApiResponse<CheckoutSession> - * @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 Returns details about a current Checkout Session. -
401 Returns an error if no valid authentication was provided. -
404 Returns an error if the Checkout Session can not be found or has expired. -
0 Returns a generic error. -
- */ - public ApiResponse getCheckoutSessionWithHttpInfo(UUID checkoutSessionId) throws ApiException { - okhttp3.Call localVarCall = getCheckoutSessionValidateBeforeCall(checkoutSessionId, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Get checkout session (asynchronously) - * Gets details about a current Checkout Session. - * @param checkoutSessionId The unique ID for a Checkout Session. (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 Returns details about a current Checkout Session. -
401 Returns an error if no valid authentication was provided. -
404 Returns an error if the Checkout Session can not be found or has expired. -
0 Returns a generic error. -
- */ - public okhttp3.Call getCheckoutSessionAsync(UUID checkoutSessionId, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = getCheckoutSessionValidateBeforeCall(checkoutSessionId, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for newCheckoutSession - * @param checkoutSessionCreateRequest (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
201 Returns the new Checkout Session. -
401 Returns an error if no valid authentication was provided. -
409 Returns an error if duplicate resource has been found. -
0 Returns a generic error. -
- */ - public okhttp3.Call newCheckoutSessionCall(CheckoutSessionCreateRequest checkoutSessionCreateRequest, final ApiCallback _callback) throws ApiException { - Object localVarPostBody = checkoutSessionCreateRequest; - - // create path and map variables - String localVarPath = "/checkout/sessions"; - - 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); - localVarHeaderParams.put("Content-Type", localVarContentType); - - String[] localVarAuthNames = new String[] { "BearerAuth" }; - return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call newCheckoutSessionValidateBeforeCall(CheckoutSessionCreateRequest checkoutSessionCreateRequest, final ApiCallback _callback) throws ApiException { - - - okhttp3.Call localVarCall = newCheckoutSessionCall(checkoutSessionCreateRequest, _callback); - return localVarCall; - - } - - /** - * New checkout session - * Creates a new Checkout Session. - * @param checkoutSessionCreateRequest (optional) - * @return CheckoutSession - * @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 Returns the new Checkout Session. -
401 Returns an error if no valid authentication was provided. -
409 Returns an error if duplicate resource has been found. -
0 Returns a generic error. -
- */ - public CheckoutSession newCheckoutSession(CheckoutSessionCreateRequest checkoutSessionCreateRequest) throws ApiException { - ApiResponse localVarResp = newCheckoutSessionWithHttpInfo(checkoutSessionCreateRequest); - return localVarResp.getData(); - } - - /** - * New checkout session - * Creates a new Checkout Session. - * @param checkoutSessionCreateRequest (optional) - * @return ApiResponse<CheckoutSession> - * @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 Returns the new Checkout Session. -
401 Returns an error if no valid authentication was provided. -
409 Returns an error if duplicate resource has been found. -
0 Returns a generic error. -
- */ - public ApiResponse newCheckoutSessionWithHttpInfo(CheckoutSessionCreateRequest checkoutSessionCreateRequest) throws ApiException { - okhttp3.Call localVarCall = newCheckoutSessionValidateBeforeCall(checkoutSessionCreateRequest, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * New checkout session (asynchronously) - * Creates a new Checkout Session. - * @param checkoutSessionCreateRequest (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
201 Returns the new Checkout Session. -
401 Returns an error if no valid authentication was provided. -
409 Returns an error if duplicate resource has been found. -
0 Returns a generic error. -
- */ - public okhttp3.Call newCheckoutSessionAsync(CheckoutSessionCreateRequest checkoutSessionCreateRequest, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = newCheckoutSessionValidateBeforeCall(checkoutSessionCreateRequest, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for updateCheckoutSession - * @param checkoutSessionId The unique ID for a Checkout Session. (required) - * @param checkoutSessionUpdateRequest (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 Returns the updated Checkout Session. -
400 Returns an error if the request was badly formatted or missing required fields. -
401 Returns an error if no valid authentication was provided. -
404 Returns an error if the resource can not be found. -
409 Returns an error if duplicate resource has been found. -
0 Returns a generic error. -
- */ - public okhttp3.Call updateCheckoutSessionCall(UUID checkoutSessionId, CheckoutSessionUpdateRequest checkoutSessionUpdateRequest, final ApiCallback _callback) throws ApiException { - Object localVarPostBody = checkoutSessionUpdateRequest; - - // create path and map variables - String localVarPath = "/checkout/sessions/{checkout_session_id}" - .replaceAll("\\{" + "checkout_session_id" + "\\}", localVarApiClient.escapeString(checkoutSessionId.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 = { - "application/json" - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - localVarHeaderParams.put("Content-Type", localVarContentType); - - String[] localVarAuthNames = new String[] { "BearerAuth" }; - return localVarApiClient.buildCall(localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call updateCheckoutSessionValidateBeforeCall(UUID checkoutSessionId, CheckoutSessionUpdateRequest checkoutSessionUpdateRequest, final ApiCallback _callback) throws ApiException { - - // verify the required parameter 'checkoutSessionId' is set - if (checkoutSessionId == null) { - throw new ApiException("Missing the required parameter 'checkoutSessionId' when calling updateCheckoutSession(Async)"); - } - - - okhttp3.Call localVarCall = updateCheckoutSessionCall(checkoutSessionId, checkoutSessionUpdateRequest, _callback); - return localVarCall; - - } - - /** - * Update checkout session - * Updates a Checkout Session. - * @param checkoutSessionId The unique ID for a Checkout Session. (required) - * @param checkoutSessionUpdateRequest (optional) - * @return CheckoutSession - * @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 Returns the updated Checkout Session. -
400 Returns an error if the request was badly formatted or missing required fields. -
401 Returns an error if no valid authentication was provided. -
404 Returns an error if the resource can not be found. -
409 Returns an error if duplicate resource has been found. -
0 Returns a generic error. -
- */ - public CheckoutSession updateCheckoutSession(UUID checkoutSessionId, CheckoutSessionUpdateRequest checkoutSessionUpdateRequest) throws ApiException { - ApiResponse localVarResp = updateCheckoutSessionWithHttpInfo(checkoutSessionId, checkoutSessionUpdateRequest); - return localVarResp.getData(); - } - - /** - * Update checkout session - * Updates a Checkout Session. - * @param checkoutSessionId The unique ID for a Checkout Session. (required) - * @param checkoutSessionUpdateRequest (optional) - * @return ApiResponse<CheckoutSession> - * @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 Returns the updated Checkout Session. -
400 Returns an error if the request was badly formatted or missing required fields. -
401 Returns an error if no valid authentication was provided. -
404 Returns an error if the resource can not be found. -
409 Returns an error if duplicate resource has been found. -
0 Returns a generic error. -
- */ - public ApiResponse updateCheckoutSessionWithHttpInfo(UUID checkoutSessionId, CheckoutSessionUpdateRequest checkoutSessionUpdateRequest) throws ApiException { - okhttp3.Call localVarCall = updateCheckoutSessionValidateBeforeCall(checkoutSessionId, checkoutSessionUpdateRequest, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Update checkout session (asynchronously) - * Updates a Checkout Session. - * @param checkoutSessionId The unique ID for a Checkout Session. (required) - * @param checkoutSessionUpdateRequest (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 Returns the updated Checkout Session. -
400 Returns an error if the request was badly formatted or missing required fields. -
401 Returns an error if no valid authentication was provided. -
404 Returns an error if the resource can not be found. -
409 Returns an error if duplicate resource has been found. -
0 Returns a generic error. -
- */ - public okhttp3.Call updateCheckoutSessionAsync(UUID checkoutSessionId, CheckoutSessionUpdateRequest checkoutSessionUpdateRequest, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = updateCheckoutSessionValidateBeforeCall(checkoutSessionId, checkoutSessionUpdateRequest, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for updateCheckoutSessionFields - * @param checkoutSessionId The unique ID for a Checkout Session. (required) - * @param checkoutSessionSecureFieldsUpdate (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
204 Returns when the Checkout Session was updated. -
401 Returns an error if no valid authentication was provided. -
404 Returns an error if the Checkout Session can not be found or has expired. -
0 Returns a generic error. -
- */ - public okhttp3.Call updateCheckoutSessionFieldsCall(UUID checkoutSessionId, CheckoutSessionSecureFieldsUpdate checkoutSessionSecureFieldsUpdate, final ApiCallback _callback) throws ApiException { - Object localVarPostBody = checkoutSessionSecureFieldsUpdate; - - // create path and map variables - String localVarPath = "/checkout/sessions/{checkout_session_id}/fields" - .replaceAll("\\{" + "checkout_session_id" + "\\}", localVarApiClient.escapeString(checkoutSessionId.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 = { - "application/json" - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - localVarHeaderParams.put("Content-Type", localVarContentType); - - String[] localVarAuthNames = new String[] { "BearerAuth" }; - return localVarApiClient.buildCall(localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call updateCheckoutSessionFieldsValidateBeforeCall(UUID checkoutSessionId, CheckoutSessionSecureFieldsUpdate checkoutSessionSecureFieldsUpdate, final ApiCallback _callback) throws ApiException { - - // verify the required parameter 'checkoutSessionId' is set - if (checkoutSessionId == null) { - throw new ApiException("Missing the required parameter 'checkoutSessionId' when calling updateCheckoutSessionFields(Async)"); - } - - - okhttp3.Call localVarCall = updateCheckoutSessionFieldsCall(checkoutSessionId, checkoutSessionSecureFieldsUpdate, _callback); - return localVarCall; - - } - - /** - * Update fields for checkout session - * Updates the Secure Fields of the Checkout Session. Once the fields have been received the expiration will be updated to 5 minutes from the time of receipt. - * @param checkoutSessionId The unique ID for a Checkout Session. (required) - * @param checkoutSessionSecureFieldsUpdate (optional) - * @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 Returns when the Checkout Session was updated. -
401 Returns an error if no valid authentication was provided. -
404 Returns an error if the Checkout Session can not be found or has expired. -
0 Returns a generic error. -
- */ - public void updateCheckoutSessionFields(UUID checkoutSessionId, CheckoutSessionSecureFieldsUpdate checkoutSessionSecureFieldsUpdate) throws ApiException { - updateCheckoutSessionFieldsWithHttpInfo(checkoutSessionId, checkoutSessionSecureFieldsUpdate); - } - - /** - * Update fields for checkout session - * Updates the Secure Fields of the Checkout Session. Once the fields have been received the expiration will be updated to 5 minutes from the time of receipt. - * @param checkoutSessionId The unique ID for a Checkout Session. (required) - * @param checkoutSessionSecureFieldsUpdate (optional) - * @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 Returns when the Checkout Session was updated. -
401 Returns an error if no valid authentication was provided. -
404 Returns an error if the Checkout Session can not be found or has expired. -
0 Returns a generic error. -
- */ - public ApiResponse updateCheckoutSessionFieldsWithHttpInfo(UUID checkoutSessionId, CheckoutSessionSecureFieldsUpdate checkoutSessionSecureFieldsUpdate) throws ApiException { - okhttp3.Call localVarCall = updateCheckoutSessionFieldsValidateBeforeCall(checkoutSessionId, checkoutSessionSecureFieldsUpdate, null); - return localVarApiClient.execute(localVarCall); - } - - /** - * Update fields for checkout session (asynchronously) - * Updates the Secure Fields of the Checkout Session. Once the fields have been received the expiration will be updated to 5 minutes from the time of receipt. - * @param checkoutSessionId The unique ID for a Checkout Session. (required) - * @param checkoutSessionSecureFieldsUpdate (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
204 Returns when the Checkout Session was updated. -
401 Returns an error if no valid authentication was provided. -
404 Returns an error if the Checkout Session can not be found or has expired. -
0 Returns a generic error. -
- */ - public okhttp3.Call updateCheckoutSessionFieldsAsync(UUID checkoutSessionId, CheckoutSessionSecureFieldsUpdate checkoutSessionSecureFieldsUpdate, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = updateCheckoutSessionFieldsValidateBeforeCall(checkoutSessionId, checkoutSessionSecureFieldsUpdate, _callback); - localVarApiClient.executeAsync(localVarCall, _callback); - return localVarCall; - } -} diff --git a/src/main/java/com/gr4vy/api/openapi/DigitalWalletsApi.java b/src/main/java/com/gr4vy/api/openapi/DigitalWalletsApi.java deleted file mode 100644 index 891ddb1..0000000 --- a/src/main/java/com/gr4vy/api/openapi/DigitalWalletsApi.java +++ /dev/null @@ -1,652 +0,0 @@ -/* - * Gr4vy API - * Welcome to the Gr4vy API reference documentation. Our API is still very much a work in product and subject to change. - * - * The version of the OpenAPI document: 1.1.0-beta - * Contact: code@gr4vy.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.gr4vy.api.openapi; - -import com.gr4vy.api.ApiCallback; -import com.gr4vy.api.ApiClient; -import com.gr4vy.api.ApiException; -import com.gr4vy.api.ApiResponse; -import com.gr4vy.api.Configuration; -import com.gr4vy.api.Pair; -import com.gr4vy.api.ProgressRequestBody; -import com.gr4vy.api.ProgressResponseBody; - -import com.google.gson.reflect.TypeToken; - -import java.io.IOException; - - -import com.gr4vy.api.model.DigitalWallet; -import com.gr4vy.api.model.DigitalWalletRequest; -import com.gr4vy.api.model.DigitalWalletUpdate; -import com.gr4vy.api.model.DigitalWallets; -import com.gr4vy.api.model.Error401Unauthorized; -import com.gr4vy.api.model.Error404NotFound; -import com.gr4vy.api.model.Error409DuplicateRecord; -import com.gr4vy.api.model.ErrorGeneric; - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class DigitalWalletsApi { - private ApiClient localVarApiClient; - - public DigitalWalletsApi() { - this(Configuration.getDefaultApiClient()); - } - - public DigitalWalletsApi(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public ApiClient getApiClient() { - return localVarApiClient; - } - - public void setApiClient(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - /** - * Build call for deleteDigitalWallet - * @param digitalWalletId The ID of the registered digital wallet. (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 Returns an empty response. -
401 Returns an error if no valid authentication was provided. -
404 Returns an error if the resource can not be found. -
- */ - public okhttp3.Call deleteDigitalWalletCall(String digitalWalletId, final ApiCallback _callback) throws ApiException { - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/digital-wallets/{digital_wallet_id}" - .replaceAll("\\{" + "digital_wallet_id" + "\\}", localVarApiClient.escapeString(digitalWalletId.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); - localVarHeaderParams.put("Content-Type", localVarContentType); - - String[] localVarAuthNames = new String[] { "BearerAuth" }; - return localVarApiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call deleteDigitalWalletValidateBeforeCall(String digitalWalletId, final ApiCallback _callback) throws ApiException { - - // verify the required parameter 'digitalWalletId' is set - if (digitalWalletId == null) { - throw new ApiException("Missing the required parameter 'digitalWalletId' when calling deleteDigitalWallet(Async)"); - } - - - okhttp3.Call localVarCall = deleteDigitalWalletCall(digitalWalletId, _callback); - return localVarCall; - - } - - /** - * De-register digital wallet - * De-registers a digital wallet with a provider. Upon successful de-registration, the digital wallet's record is deleted and will no longer be available. A digital wallet of the Apple provider may only be de-registered if there are no active Apple Pay certificates. When there are only incomplete or expired Apple Pay certificates, these certificates are deleted alongside the Apple digital wallet's record. - * @param digitalWalletId The ID of the registered digital wallet. (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 Returns an empty response. -
401 Returns an error if no valid authentication was provided. -
404 Returns an error if the resource can not be found. -
- */ - public void deleteDigitalWallet(String digitalWalletId) throws ApiException { - deleteDigitalWalletWithHttpInfo(digitalWalletId); - } - - /** - * De-register digital wallet - * De-registers a digital wallet with a provider. Upon successful de-registration, the digital wallet's record is deleted and will no longer be available. A digital wallet of the Apple provider may only be de-registered if there are no active Apple Pay certificates. When there are only incomplete or expired Apple Pay certificates, these certificates are deleted alongside the Apple digital wallet's record. - * @param digitalWalletId The ID of the registered digital wallet. (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 Returns an empty response. -
401 Returns an error if no valid authentication was provided. -
404 Returns an error if the resource can not be found. -
- */ - public ApiResponse deleteDigitalWalletWithHttpInfo(String digitalWalletId) throws ApiException { - okhttp3.Call localVarCall = deleteDigitalWalletValidateBeforeCall(digitalWalletId, null); - return localVarApiClient.execute(localVarCall); - } - - /** - * De-register digital wallet (asynchronously) - * De-registers a digital wallet with a provider. Upon successful de-registration, the digital wallet's record is deleted and will no longer be available. A digital wallet of the Apple provider may only be de-registered if there are no active Apple Pay certificates. When there are only incomplete or expired Apple Pay certificates, these certificates are deleted alongside the Apple digital wallet's record. - * @param digitalWalletId The ID of the registered digital wallet. (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 Returns an empty response. -
401 Returns an error if no valid authentication was provided. -
404 Returns an error if the resource can not be found. -
- */ - public okhttp3.Call deleteDigitalWalletAsync(String digitalWalletId, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = deleteDigitalWalletValidateBeforeCall(digitalWalletId, _callback); - localVarApiClient.executeAsync(localVarCall, _callback); - return localVarCall; - } - /** - * Build call for getDigitalWallet - * @param digitalWalletId The ID of the registered digital wallet. (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 Returns a registered digital wallet. -
401 Returns an error if no valid authentication was provided. -
404 Returns an error if the resource can not be found. -
- */ - public okhttp3.Call getDigitalWalletCall(String digitalWalletId, final ApiCallback _callback) throws ApiException { - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/digital-wallets/{digital_wallet_id}" - .replaceAll("\\{" + "digital_wallet_id" + "\\}", localVarApiClient.escapeString(digitalWalletId.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); - localVarHeaderParams.put("Content-Type", localVarContentType); - - String[] localVarAuthNames = new String[] { "BearerAuth" }; - return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call getDigitalWalletValidateBeforeCall(String digitalWalletId, final ApiCallback _callback) throws ApiException { - - // verify the required parameter 'digitalWalletId' is set - if (digitalWalletId == null) { - throw new ApiException("Missing the required parameter 'digitalWalletId' when calling getDigitalWallet(Async)"); - } - - - okhttp3.Call localVarCall = getDigitalWalletCall(digitalWalletId, _callback); - return localVarCall; - - } - - /** - * Get digital wallet - * Returns a registered digital wallet. - * @param digitalWalletId The ID of the registered digital wallet. (required) - * @return DigitalWallet - * @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 Returns a registered digital wallet. -
401 Returns an error if no valid authentication was provided. -
404 Returns an error if the resource can not be found. -
- */ - public DigitalWallet getDigitalWallet(String digitalWalletId) throws ApiException { - ApiResponse localVarResp = getDigitalWalletWithHttpInfo(digitalWalletId); - return localVarResp.getData(); - } - - /** - * Get digital wallet - * Returns a registered digital wallet. - * @param digitalWalletId The ID of the registered digital wallet. (required) - * @return ApiResponse<DigitalWallet> - * @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 Returns a registered digital wallet. -
401 Returns an error if no valid authentication was provided. -
404 Returns an error if the resource can not be found. -
- */ - public ApiResponse getDigitalWalletWithHttpInfo(String digitalWalletId) throws ApiException { - okhttp3.Call localVarCall = getDigitalWalletValidateBeforeCall(digitalWalletId, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Get digital wallet (asynchronously) - * Returns a registered digital wallet. - * @param digitalWalletId The ID of the registered digital wallet. (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 Returns a registered digital wallet. -
401 Returns an error if no valid authentication was provided. -
404 Returns an error if the resource can not be found. -
- */ - public okhttp3.Call getDigitalWalletAsync(String digitalWalletId, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = getDigitalWalletValidateBeforeCall(digitalWalletId, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for listDigitalWallets - * @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 Returns a list of registered digital wallets. -
401 Returns an error if no valid authentication was provided. -
- */ - public okhttp3.Call listDigitalWalletsCall(final ApiCallback _callback) throws ApiException { - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/digital-wallets"; - - 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); - localVarHeaderParams.put("Content-Type", localVarContentType); - - String[] localVarAuthNames = new String[] { "BearerAuth" }; - return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call listDigitalWalletsValidateBeforeCall(final ApiCallback _callback) throws ApiException { - - - okhttp3.Call localVarCall = listDigitalWalletsCall(_callback); - return localVarCall; - - } - - /** - * List digital wallets - * Returns a list of all registered digital wallets. - * @return DigitalWallets - * @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 Returns a list of registered digital wallets. -
401 Returns an error if no valid authentication was provided. -
- */ - public DigitalWallets listDigitalWallets() throws ApiException { - ApiResponse localVarResp = listDigitalWalletsWithHttpInfo(); - return localVarResp.getData(); - } - - /** - * List digital wallets - * Returns a list of all registered digital wallets. - * @return ApiResponse<DigitalWallets> - * @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 Returns a list of registered digital wallets. -
401 Returns an error if no valid authentication was provided. -
- */ - public ApiResponse listDigitalWalletsWithHttpInfo() throws ApiException { - okhttp3.Call localVarCall = listDigitalWalletsValidateBeforeCall(null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * List digital wallets (asynchronously) - * Returns a list of all registered digital wallets. - * @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 Returns a list of registered digital wallets. -
401 Returns an error if no valid authentication was provided. -
- */ - public okhttp3.Call listDigitalWalletsAsync(final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = listDigitalWalletsValidateBeforeCall(_callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for newDigitalWallet - * @param digitalWalletRequest (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
201 Returns the newly registered digital wallet. -
400 Returns an error if the request was badly formatted or missing required fields. -
401 Returns an error if no valid authentication was provided. -
409 Returns an error if duplicate resource has been found. -
- */ - public okhttp3.Call newDigitalWalletCall(DigitalWalletRequest digitalWalletRequest, final ApiCallback _callback) throws ApiException { - Object localVarPostBody = digitalWalletRequest; - - // create path and map variables - String localVarPath = "/digital-wallets"; - - 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); - localVarHeaderParams.put("Content-Type", localVarContentType); - - String[] localVarAuthNames = new String[] { "BearerAuth" }; - return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call newDigitalWalletValidateBeforeCall(DigitalWalletRequest digitalWalletRequest, final ApiCallback _callback) throws ApiException { - - - okhttp3.Call localVarCall = newDigitalWalletCall(digitalWalletRequest, _callback); - return localVarCall; - - } - - /** - * Register digital wallet - * Register with a digital wallet provider. - * @param digitalWalletRequest (optional) - * @return DigitalWallet - * @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 Returns the newly registered digital wallet. -
400 Returns an error if the request was badly formatted or missing required fields. -
401 Returns an error if no valid authentication was provided. -
409 Returns an error if duplicate resource has been found. -
- */ - public DigitalWallet newDigitalWallet(DigitalWalletRequest digitalWalletRequest) throws ApiException { - ApiResponse localVarResp = newDigitalWalletWithHttpInfo(digitalWalletRequest); - return localVarResp.getData(); - } - - /** - * Register digital wallet - * Register with a digital wallet provider. - * @param digitalWalletRequest (optional) - * @return ApiResponse<DigitalWallet> - * @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 Returns the newly registered digital wallet. -
400 Returns an error if the request was badly formatted or missing required fields. -
401 Returns an error if no valid authentication was provided. -
409 Returns an error if duplicate resource has been found. -
- */ - public ApiResponse newDigitalWalletWithHttpInfo(DigitalWalletRequest digitalWalletRequest) throws ApiException { - okhttp3.Call localVarCall = newDigitalWalletValidateBeforeCall(digitalWalletRequest, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Register digital wallet (asynchronously) - * Register with a digital wallet provider. - * @param digitalWalletRequest (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
201 Returns the newly registered digital wallet. -
400 Returns an error if the request was badly formatted or missing required fields. -
401 Returns an error if no valid authentication was provided. -
409 Returns an error if duplicate resource has been found. -
- */ - public okhttp3.Call newDigitalWalletAsync(DigitalWalletRequest digitalWalletRequest, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = newDigitalWalletValidateBeforeCall(digitalWalletRequest, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for updateDigitalWallet - * @param digitalWalletId The ID of the registered digital wallet. (required) - * @param digitalWalletUpdate (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 Returns the updated digital wallet. -
400 Returns an error if the request was badly formatted or missing required fields. -
401 Returns an error if no valid authentication was provided. -
404 Returns an error if the resource can not be found. -
- */ - public okhttp3.Call updateDigitalWalletCall(String digitalWalletId, DigitalWalletUpdate digitalWalletUpdate, final ApiCallback _callback) throws ApiException { - Object localVarPostBody = digitalWalletUpdate; - - // create path and map variables - String localVarPath = "/digital-wallets/{digital_wallet_id}" - .replaceAll("\\{" + "digital_wallet_id" + "\\}", localVarApiClient.escapeString(digitalWalletId.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 = { - "application/json" - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - localVarHeaderParams.put("Content-Type", localVarContentType); - - String[] localVarAuthNames = new String[] { "BearerAuth" }; - return localVarApiClient.buildCall(localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call updateDigitalWalletValidateBeforeCall(String digitalWalletId, DigitalWalletUpdate digitalWalletUpdate, final ApiCallback _callback) throws ApiException { - - // verify the required parameter 'digitalWalletId' is set - if (digitalWalletId == null) { - throw new ApiException("Missing the required parameter 'digitalWalletId' when calling updateDigitalWallet(Async)"); - } - - - okhttp3.Call localVarCall = updateDigitalWalletCall(digitalWalletId, digitalWalletUpdate, _callback); - return localVarCall; - - } - - /** - * Update digital wallet - * Updates the values a digital wallet was registered with. - * @param digitalWalletId The ID of the registered digital wallet. (required) - * @param digitalWalletUpdate (optional) - * @return DigitalWallet - * @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 Returns the updated digital wallet. -
400 Returns an error if the request was badly formatted or missing required fields. -
401 Returns an error if no valid authentication was provided. -
404 Returns an error if the resource can not be found. -
- */ - public DigitalWallet updateDigitalWallet(String digitalWalletId, DigitalWalletUpdate digitalWalletUpdate) throws ApiException { - ApiResponse localVarResp = updateDigitalWalletWithHttpInfo(digitalWalletId, digitalWalletUpdate); - return localVarResp.getData(); - } - - /** - * Update digital wallet - * Updates the values a digital wallet was registered with. - * @param digitalWalletId The ID of the registered digital wallet. (required) - * @param digitalWalletUpdate (optional) - * @return ApiResponse<DigitalWallet> - * @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 Returns the updated digital wallet. -
400 Returns an error if the request was badly formatted or missing required fields. -
401 Returns an error if no valid authentication was provided. -
404 Returns an error if the resource can not be found. -
- */ - public ApiResponse updateDigitalWalletWithHttpInfo(String digitalWalletId, DigitalWalletUpdate digitalWalletUpdate) throws ApiException { - okhttp3.Call localVarCall = updateDigitalWalletValidateBeforeCall(digitalWalletId, digitalWalletUpdate, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Update digital wallet (asynchronously) - * Updates the values a digital wallet was registered with. - * @param digitalWalletId The ID of the registered digital wallet. (required) - * @param digitalWalletUpdate (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 Returns the updated digital wallet. -
400 Returns an error if the request was badly formatted or missing required fields. -
401 Returns an error if no valid authentication was provided. -
404 Returns an error if the resource can not be found. -
- */ - public okhttp3.Call updateDigitalWalletAsync(String digitalWalletId, DigitalWalletUpdate digitalWalletUpdate, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = updateDigitalWalletValidateBeforeCall(digitalWalletId, digitalWalletUpdate, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/src/main/java/com/gr4vy/api/openapi/MerchantAccountsApi.java b/src/main/java/com/gr4vy/api/openapi/MerchantAccountsApi.java deleted file mode 100644 index bc828c2..0000000 --- a/src/main/java/com/gr4vy/api/openapi/MerchantAccountsApi.java +++ /dev/null @@ -1,532 +0,0 @@ -/* - * Gr4vy API - * Welcome to the Gr4vy API reference documentation. Our API is still very much a work in product and subject to change. - * - * The version of the OpenAPI document: 1.1.0-beta - * Contact: code@gr4vy.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.gr4vy.api.openapi; - -import com.gr4vy.api.ApiCallback; -import com.gr4vy.api.ApiClient; -import com.gr4vy.api.ApiException; -import com.gr4vy.api.ApiResponse; -import com.gr4vy.api.Configuration; -import com.gr4vy.api.Pair; -import com.gr4vy.api.ProgressRequestBody; -import com.gr4vy.api.ProgressResponseBody; - -import com.google.gson.reflect.TypeToken; - -import java.io.IOException; - - -import com.gr4vy.api.model.Error401Unauthorized; -import com.gr4vy.api.model.Error404NotFound; -import com.gr4vy.api.model.Error409DuplicateRecord; -import com.gr4vy.api.model.ErrorGeneric; -import com.gr4vy.api.model.MerchantAccount; -import com.gr4vy.api.model.MerchantAccountCreate; -import com.gr4vy.api.model.MerchantAccountUpdate; -import com.gr4vy.api.model.MerchantAccounts; - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class MerchantAccountsApi { - private ApiClient localVarApiClient; - - public MerchantAccountsApi() { - this(Configuration.getDefaultApiClient()); - } - - public MerchantAccountsApi(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public ApiClient getApiClient() { - return localVarApiClient; - } - - public void setApiClient(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - /** - * Build call for deleteMerchantAccuont - * @param merchantAccountId The unique ID for a merchant 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
204 Returns an empty response. -
401 Returns an error if no valid authentication was provided. -
404 Returns an error if the resource can not be found. -
- */ - public okhttp3.Call deleteMerchantAccuontCall(String merchantAccountId, final ApiCallback _callback) throws ApiException { - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/merchant-accounts/{merchant_account_id}" - .replaceAll("\\{" + "merchant_account_id" + "\\}", localVarApiClient.escapeString(merchantAccountId.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); - localVarHeaderParams.put("Content-Type", localVarContentType); - - String[] localVarAuthNames = new String[] { "BearerAuth" }; - return localVarApiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call deleteMerchantAccuontValidateBeforeCall(String merchantAccountId, final ApiCallback _callback) throws ApiException { - - // verify the required parameter 'merchantAccountId' is set - if (merchantAccountId == null) { - throw new ApiException("Missing the required parameter 'merchantAccountId' when calling deleteMerchantAccuont(Async)"); - } - - - okhttp3.Call localVarCall = deleteMerchantAccuontCall(merchantAccountId, _callback); - return localVarCall; - - } - - /** - * Delete merchant account - * Deletes a specific merchant account. - * @param merchantAccountId The unique ID for a merchant account. (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 Returns an empty response. -
401 Returns an error if no valid authentication was provided. -
404 Returns an error if the resource can not be found. -
- */ - public void deleteMerchantAccuont(String merchantAccountId) throws ApiException { - deleteMerchantAccuontWithHttpInfo(merchantAccountId); - } - - /** - * Delete merchant account - * Deletes a specific merchant account. - * @param merchantAccountId The unique ID for a merchant account. (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 Returns an empty response. -
401 Returns an error if no valid authentication was provided. -
404 Returns an error if the resource can not be found. -
- */ - public ApiResponse deleteMerchantAccuontWithHttpInfo(String merchantAccountId) throws ApiException { - okhttp3.Call localVarCall = deleteMerchantAccuontValidateBeforeCall(merchantAccountId, null); - return localVarApiClient.execute(localVarCall); - } - - /** - * Delete merchant account (asynchronously) - * Deletes a specific merchant account. - * @param merchantAccountId The unique ID for a merchant 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
204 Returns an empty response. -
401 Returns an error if no valid authentication was provided. -
404 Returns an error if the resource can not be found. -
- */ - public okhttp3.Call deleteMerchantAccuontAsync(String merchantAccountId, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = deleteMerchantAccuontValidateBeforeCall(merchantAccountId, _callback); - localVarApiClient.executeAsync(localVarCall, _callback); - return localVarCall; - } - /** - * Build call for listMerchantAccounts - * @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 Returns a paginated list of merchant accounts. -
401 Returns an error if no valid authentication was provided. -
- */ - public okhttp3.Call listMerchantAccountsCall(final ApiCallback _callback) throws ApiException { - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/merchant-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/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - localVarHeaderParams.put("Content-Type", localVarContentType); - - String[] localVarAuthNames = new String[] { "BearerAuth" }; - return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call listMerchantAccountsValidateBeforeCall(final ApiCallback _callback) throws ApiException { - - - okhttp3.Call localVarCall = listMerchantAccountsCall(_callback); - return localVarCall; - - } - - /** - * List merchant accounts - * Lists all merchant accounts in an instance. - * @return MerchantAccounts - * @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 Returns a paginated list of merchant accounts. -
401 Returns an error if no valid authentication was provided. -
- */ - public MerchantAccounts listMerchantAccounts() throws ApiException { - ApiResponse localVarResp = listMerchantAccountsWithHttpInfo(); - return localVarResp.getData(); - } - - /** - * List merchant accounts - * Lists all merchant accounts in an instance. - * @return ApiResponse<MerchantAccounts> - * @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 Returns a paginated list of merchant accounts. -
401 Returns an error if no valid authentication was provided. -
- */ - public ApiResponse listMerchantAccountsWithHttpInfo() throws ApiException { - okhttp3.Call localVarCall = listMerchantAccountsValidateBeforeCall(null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * List merchant accounts (asynchronously) - * Lists all merchant accounts in an instance. - * @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 Returns a paginated list of merchant accounts. -
401 Returns an error if no valid authentication was provided. -
- */ - public okhttp3.Call listMerchantAccountsAsync(final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = listMerchantAccountsValidateBeforeCall(_callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for newMerchantAccount - * @param merchantAccountCreate (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
201 Returns the created merchant account. -
400 Returns an error if the request was badly formatted, missing required fields or configuration doesn't meet uniqueness conditions. -
401 Returns an error if no valid authentication was provided. -
409 Returns an error if duplicate resource has been found. -
- */ - public okhttp3.Call newMerchantAccountCall(MerchantAccountCreate merchantAccountCreate, final ApiCallback _callback) throws ApiException { - Object localVarPostBody = merchantAccountCreate; - - // create path and map variables - String localVarPath = "/merchant-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/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); - localVarHeaderParams.put("Content-Type", localVarContentType); - - String[] localVarAuthNames = new String[] { "BearerAuth" }; - return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call newMerchantAccountValidateBeforeCall(MerchantAccountCreate merchantAccountCreate, final ApiCallback _callback) throws ApiException { - - - okhttp3.Call localVarCall = newMerchantAccountCall(merchantAccountCreate, _callback); - return localVarCall; - - } - - /** - * New merchant account - * Create a merchant account. Optionally, provide an `outbound_webhook_url`, and if HTTP Basic Authentication is required, provide the `outbound_webhook_username` and `outbound_webhook_password`. When retrieving a Merchant Account the `outbound_webhook_password` will be omitted. Optionally provide Network Tokens configuration per scheme. If done, all parameters for the same scheme must be provided. - * @param merchantAccountCreate (optional) - * @return MerchantAccount - * @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 Returns the created merchant account. -
400 Returns an error if the request was badly formatted, missing required fields or configuration doesn't meet uniqueness conditions. -
401 Returns an error if no valid authentication was provided. -
409 Returns an error if duplicate resource has been found. -
- */ - public MerchantAccount newMerchantAccount(MerchantAccountCreate merchantAccountCreate) throws ApiException { - ApiResponse localVarResp = newMerchantAccountWithHttpInfo(merchantAccountCreate); - return localVarResp.getData(); - } - - /** - * New merchant account - * Create a merchant account. Optionally, provide an `outbound_webhook_url`, and if HTTP Basic Authentication is required, provide the `outbound_webhook_username` and `outbound_webhook_password`. When retrieving a Merchant Account the `outbound_webhook_password` will be omitted. Optionally provide Network Tokens configuration per scheme. If done, all parameters for the same scheme must be provided. - * @param merchantAccountCreate (optional) - * @return ApiResponse<MerchantAccount> - * @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 Returns the created merchant account. -
400 Returns an error if the request was badly formatted, missing required fields or configuration doesn't meet uniqueness conditions. -
401 Returns an error if no valid authentication was provided. -
409 Returns an error if duplicate resource has been found. -
- */ - public ApiResponse newMerchantAccountWithHttpInfo(MerchantAccountCreate merchantAccountCreate) throws ApiException { - okhttp3.Call localVarCall = newMerchantAccountValidateBeforeCall(merchantAccountCreate, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * New merchant account (asynchronously) - * Create a merchant account. Optionally, provide an `outbound_webhook_url`, and if HTTP Basic Authentication is required, provide the `outbound_webhook_username` and `outbound_webhook_password`. When retrieving a Merchant Account the `outbound_webhook_password` will be omitted. Optionally provide Network Tokens configuration per scheme. If done, all parameters for the same scheme must be provided. - * @param merchantAccountCreate (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
201 Returns the created merchant account. -
400 Returns an error if the request was badly formatted, missing required fields or configuration doesn't meet uniqueness conditions. -
401 Returns an error if no valid authentication was provided. -
409 Returns an error if duplicate resource has been found. -
- */ - public okhttp3.Call newMerchantAccountAsync(MerchantAccountCreate merchantAccountCreate, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = newMerchantAccountValidateBeforeCall(merchantAccountCreate, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for updateMerchantAccount - * @param merchantAccountId The unique ID for a merchant account. (required) - * @param merchantAccountUpdate (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 Returns the updated merchant account. -
400 Returns an error if the request was badly formatted, missing required fields or configuration doesn't meet uniqueness conditions. -
401 Returns an error if no valid authentication was provided. -
404 Returns an error if the resource can not be found. -
- */ - public okhttp3.Call updateMerchantAccountCall(String merchantAccountId, MerchantAccountUpdate merchantAccountUpdate, final ApiCallback _callback) throws ApiException { - Object localVarPostBody = merchantAccountUpdate; - - // create path and map variables - String localVarPath = "/merchant-accounts/{merchant_account_id}" - .replaceAll("\\{" + "merchant_account_id" + "\\}", localVarApiClient.escapeString(merchantAccountId.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 = { - "application/json" - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - localVarHeaderParams.put("Content-Type", localVarContentType); - - String[] localVarAuthNames = new String[] { "BearerAuth" }; - return localVarApiClient.buildCall(localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call updateMerchantAccountValidateBeforeCall(String merchantAccountId, MerchantAccountUpdate merchantAccountUpdate, final ApiCallback _callback) throws ApiException { - - // verify the required parameter 'merchantAccountId' is set - if (merchantAccountId == null) { - throw new ApiException("Missing the required parameter 'merchantAccountId' when calling updateMerchantAccount(Async)"); - } - - - okhttp3.Call localVarCall = updateMerchantAccountCall(merchantAccountId, merchantAccountUpdate, _callback); - return localVarCall; - - } - - /** - * Update merchant account - * Update an existing merchant account. Optionally, provide an `outbound_webhook_url`, and if HTTP Basic Authentication is required, provide the `outbound_webhook_username` and `outbound_webhook_password`. When retrieving a Merchant Account the `outbound_webhook_password` will be omitted. Optionally provide Network Tokens configuration per scheme. If done, all parameters for the same scheme must be provided. - * @param merchantAccountId The unique ID for a merchant account. (required) - * @param merchantAccountUpdate (optional) - * @return MerchantAccount - * @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 Returns the updated merchant account. -
400 Returns an error if the request was badly formatted, missing required fields or configuration doesn't meet uniqueness conditions. -
401 Returns an error if no valid authentication was provided. -
404 Returns an error if the resource can not be found. -
- */ - public MerchantAccount updateMerchantAccount(String merchantAccountId, MerchantAccountUpdate merchantAccountUpdate) throws ApiException { - ApiResponse localVarResp = updateMerchantAccountWithHttpInfo(merchantAccountId, merchantAccountUpdate); - return localVarResp.getData(); - } - - /** - * Update merchant account - * Update an existing merchant account. Optionally, provide an `outbound_webhook_url`, and if HTTP Basic Authentication is required, provide the `outbound_webhook_username` and `outbound_webhook_password`. When retrieving a Merchant Account the `outbound_webhook_password` will be omitted. Optionally provide Network Tokens configuration per scheme. If done, all parameters for the same scheme must be provided. - * @param merchantAccountId The unique ID for a merchant account. (required) - * @param merchantAccountUpdate (optional) - * @return ApiResponse<MerchantAccount> - * @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 Returns the updated merchant account. -
400 Returns an error if the request was badly formatted, missing required fields or configuration doesn't meet uniqueness conditions. -
401 Returns an error if no valid authentication was provided. -
404 Returns an error if the resource can not be found. -
- */ - public ApiResponse updateMerchantAccountWithHttpInfo(String merchantAccountId, MerchantAccountUpdate merchantAccountUpdate) throws ApiException { - okhttp3.Call localVarCall = updateMerchantAccountValidateBeforeCall(merchantAccountId, merchantAccountUpdate, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Update merchant account (asynchronously) - * Update an existing merchant account. Optionally, provide an `outbound_webhook_url`, and if HTTP Basic Authentication is required, provide the `outbound_webhook_username` and `outbound_webhook_password`. When retrieving a Merchant Account the `outbound_webhook_password` will be omitted. Optionally provide Network Tokens configuration per scheme. If done, all parameters for the same scheme must be provided. - * @param merchantAccountId The unique ID for a merchant account. (required) - * @param merchantAccountUpdate (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 Returns the updated merchant account. -
400 Returns an error if the request was badly formatted, missing required fields or configuration doesn't meet uniqueness conditions. -
401 Returns an error if no valid authentication was provided. -
404 Returns an error if the resource can not be found. -
- */ - public okhttp3.Call updateMerchantAccountAsync(String merchantAccountId, MerchantAccountUpdate merchantAccountUpdate, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = updateMerchantAccountValidateBeforeCall(merchantAccountId, merchantAccountUpdate, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/src/main/java/com/gr4vy/api/openapi/PaymentMethodDefinitionsApi.java b/src/main/java/com/gr4vy/api/openapi/PaymentMethodDefinitionsApi.java deleted file mode 100644 index 189d6f3..0000000 --- a/src/main/java/com/gr4vy/api/openapi/PaymentMethodDefinitionsApi.java +++ /dev/null @@ -1,164 +0,0 @@ -/* - * Gr4vy API - * Welcome to the Gr4vy API reference documentation. Our API is still very much a work in product and subject to change. - * - * The version of the OpenAPI document: 1.1.0-beta - * Contact: code@gr4vy.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.gr4vy.api.openapi; - -import com.gr4vy.api.ApiCallback; -import com.gr4vy.api.ApiClient; -import com.gr4vy.api.ApiException; -import com.gr4vy.api.ApiResponse; -import com.gr4vy.api.Configuration; -import com.gr4vy.api.Pair; -import com.gr4vy.api.ProgressRequestBody; -import com.gr4vy.api.ProgressResponseBody; - -import com.google.gson.reflect.TypeToken; - -import java.io.IOException; - - -import com.gr4vy.api.model.Error401Unauthorized; -import com.gr4vy.api.model.PaymentMethodDefinitions; - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class PaymentMethodDefinitionsApi { - private ApiClient localVarApiClient; - - public PaymentMethodDefinitionsApi() { - this(Configuration.getDefaultApiClient()); - } - - public PaymentMethodDefinitionsApi(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public ApiClient getApiClient() { - return localVarApiClient; - } - - public void setApiClient(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - /** - * Build call for listPaymentMethodDefinitions - * @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 Returns a list of payment method definitions. -
401 Returns an error if no valid authentication was provided. -
- */ - public okhttp3.Call listPaymentMethodDefinitionsCall(final ApiCallback _callback) throws ApiException { - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/payment-method-definitions"; - - 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); - localVarHeaderParams.put("Content-Type", localVarContentType); - - String[] localVarAuthNames = new String[] { "BearerAuth" }; - return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call listPaymentMethodDefinitionsValidateBeforeCall(final ApiCallback _callback) throws ApiException { - - - okhttp3.Call localVarCall = listPaymentMethodDefinitionsCall(_callback); - return localVarCall; - - } - - /** - * List payment method definitions - * Returns a list of all available payment method definitions. - * @return PaymentMethodDefinitions - * @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 Returns a list of payment method definitions. -
401 Returns an error if no valid authentication was provided. -
- */ - public PaymentMethodDefinitions listPaymentMethodDefinitions() throws ApiException { - ApiResponse localVarResp = listPaymentMethodDefinitionsWithHttpInfo(); - return localVarResp.getData(); - } - - /** - * List payment method definitions - * Returns a list of all available payment method definitions. - * @return ApiResponse<PaymentMethodDefinitions> - * @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 Returns a list of payment method definitions. -
401 Returns an error if no valid authentication was provided. -
- */ - public ApiResponse listPaymentMethodDefinitionsWithHttpInfo() throws ApiException { - okhttp3.Call localVarCall = listPaymentMethodDefinitionsValidateBeforeCall(null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * List payment method definitions (asynchronously) - * Returns a list of all available payment method definitions. - * @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 Returns a list of payment method definitions. -
401 Returns an error if no valid authentication was provided. -
- */ - public okhttp3.Call listPaymentMethodDefinitionsAsync(final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = listPaymentMethodDefinitionsValidateBeforeCall(_callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/src/main/java/com/gr4vy/api/openapi/PaymentMethodTokensApi.java b/src/main/java/com/gr4vy/api/openapi/PaymentMethodTokensApi.java deleted file mode 100644 index e047c99..0000000 --- a/src/main/java/com/gr4vy/api/openapi/PaymentMethodTokensApi.java +++ /dev/null @@ -1,180 +0,0 @@ -/* - * Gr4vy API - * Welcome to the Gr4vy API reference documentation. Our API is still very much a work in product and subject to change. - * - * The version of the OpenAPI document: 1.1.0-beta - * Contact: code@gr4vy.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.gr4vy.api.openapi; - -import com.gr4vy.api.ApiCallback; -import com.gr4vy.api.ApiClient; -import com.gr4vy.api.ApiException; -import com.gr4vy.api.ApiResponse; -import com.gr4vy.api.Configuration; -import com.gr4vy.api.Pair; -import com.gr4vy.api.ProgressRequestBody; -import com.gr4vy.api.ProgressResponseBody; - -import com.google.gson.reflect.TypeToken; - -import java.io.IOException; - - -import com.gr4vy.api.model.Error401Unauthorized; -import com.gr4vy.api.model.Error404NotFound; -import com.gr4vy.api.model.PaymentMethodTokens; -import java.util.UUID; - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class PaymentMethodTokensApi { - private ApiClient localVarApiClient; - - public PaymentMethodTokensApi() { - this(Configuration.getDefaultApiClient()); - } - - public PaymentMethodTokensApi(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public ApiClient getApiClient() { - return localVarApiClient; - } - - public void setApiClient(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - /** - * Build call for listPaymentMethodTokens - * @param paymentMethodId The ID of the payment method. (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 Returns a list of payment method tokens. -
401 Returns an error if no valid authentication was provided. -
404 Returns an error if the resource can not be found. -
- */ - public okhttp3.Call listPaymentMethodTokensCall(UUID paymentMethodId, final ApiCallback _callback) throws ApiException { - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/payment-methods/{payment_method_id}/tokens" - .replaceAll("\\{" + "payment_method_id" + "\\}", localVarApiClient.escapeString(paymentMethodId.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); - localVarHeaderParams.put("Content-Type", localVarContentType); - - String[] localVarAuthNames = new String[] { "BearerAuth" }; - return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call listPaymentMethodTokensValidateBeforeCall(UUID paymentMethodId, final ApiCallback _callback) throws ApiException { - - // verify the required parameter 'paymentMethodId' is set - if (paymentMethodId == null) { - throw new ApiException("Missing the required parameter 'paymentMethodId' when calling listPaymentMethodTokens(Async)"); - } - - - okhttp3.Call localVarCall = listPaymentMethodTokensCall(paymentMethodId, _callback); - return localVarCall; - - } - - /** - * List payment method tokens - * Returns a list of PSP tokens for a given payment method. - * @param paymentMethodId The ID of the payment method. (required) - * @return PaymentMethodTokens - * @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 Returns a list of payment method tokens. -
401 Returns an error if no valid authentication was provided. -
404 Returns an error if the resource can not be found. -
- */ - public PaymentMethodTokens listPaymentMethodTokens(UUID paymentMethodId) throws ApiException { - ApiResponse localVarResp = listPaymentMethodTokensWithHttpInfo(paymentMethodId); - return localVarResp.getData(); - } - - /** - * List payment method tokens - * Returns a list of PSP tokens for a given payment method. - * @param paymentMethodId The ID of the payment method. (required) - * @return ApiResponse<PaymentMethodTokens> - * @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 Returns a list of payment method tokens. -
401 Returns an error if no valid authentication was provided. -
404 Returns an error if the resource can not be found. -
- */ - public ApiResponse listPaymentMethodTokensWithHttpInfo(UUID paymentMethodId) throws ApiException { - okhttp3.Call localVarCall = listPaymentMethodTokensValidateBeforeCall(paymentMethodId, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * List payment method tokens (asynchronously) - * Returns a list of PSP tokens for a given payment method. - * @param paymentMethodId The ID of the payment method. (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 Returns a list of payment method tokens. -
401 Returns an error if no valid authentication was provided. -
404 Returns an error if the resource can not be found. -
- */ - public okhttp3.Call listPaymentMethodTokensAsync(UUID paymentMethodId, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = listPaymentMethodTokensValidateBeforeCall(paymentMethodId, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/src/main/java/com/gr4vy/api/openapi/PaymentMethodsApi.java b/src/main/java/com/gr4vy/api/openapi/PaymentMethodsApi.java deleted file mode 100644 index 2ed5d48..0000000 --- a/src/main/java/com/gr4vy/api/openapi/PaymentMethodsApi.java +++ /dev/null @@ -1,707 +0,0 @@ -/* - * Gr4vy API - * Welcome to the Gr4vy API reference documentation. Our API is still very much a work in product and subject to change. - * - * The version of the OpenAPI document: 1.1.0-beta - * Contact: code@gr4vy.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.gr4vy.api.openapi; - -import com.gr4vy.api.ApiCallback; -import com.gr4vy.api.ApiClient; -import com.gr4vy.api.ApiException; -import com.gr4vy.api.ApiResponse; -import com.gr4vy.api.Configuration; -import com.gr4vy.api.Pair; -import com.gr4vy.api.ProgressRequestBody; -import com.gr4vy.api.ProgressResponseBody; - -import com.google.gson.reflect.TypeToken; - -import java.io.IOException; - - -import com.gr4vy.api.model.Error401Unauthorized; -import com.gr4vy.api.model.Error404NotFound; -import com.gr4vy.api.model.Error409DuplicateRecord; -import com.gr4vy.api.model.ErrorGeneric; -import com.gr4vy.api.model.PaymentMethod; -import com.gr4vy.api.model.PaymentMethodRequest; -import com.gr4vy.api.model.PaymentMethods; -import com.gr4vy.api.model.PaymentMethodsTokenized; -import java.util.UUID; - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class PaymentMethodsApi { - private ApiClient localVarApiClient; - - public PaymentMethodsApi() { - this(Configuration.getDefaultApiClient()); - } - - public PaymentMethodsApi(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public ApiClient getApiClient() { - return localVarApiClient; - } - - public void setApiClient(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - /** - * Build call for deletePaymentMethod - * @param paymentMethodId The ID of the payment method. (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 Returns an empty response. -
401 Returns an error if no valid authentication was provided. -
404 Returns an error if the resource can not be found. -
- */ - public okhttp3.Call deletePaymentMethodCall(UUID paymentMethodId, final ApiCallback _callback) throws ApiException { - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/payment-methods/{payment_method_id}" - .replaceAll("\\{" + "payment_method_id" + "\\}", localVarApiClient.escapeString(paymentMethodId.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); - localVarHeaderParams.put("Content-Type", localVarContentType); - - String[] localVarAuthNames = new String[] { "BearerAuth" }; - return localVarApiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call deletePaymentMethodValidateBeforeCall(UUID paymentMethodId, final ApiCallback _callback) throws ApiException { - - // verify the required parameter 'paymentMethodId' is set - if (paymentMethodId == null) { - throw new ApiException("Missing the required parameter 'paymentMethodId' when calling deletePaymentMethod(Async)"); - } - - - okhttp3.Call localVarCall = deletePaymentMethodCall(paymentMethodId, _callback); - return localVarCall; - - } - - /** - * Delete payment method - * Removes a stored payment method. - * @param paymentMethodId The ID of the payment method. (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 Returns an empty response. -
401 Returns an error if no valid authentication was provided. -
404 Returns an error if the resource can not be found. -
- */ - public void deletePaymentMethod(UUID paymentMethodId) throws ApiException { - deletePaymentMethodWithHttpInfo(paymentMethodId); - } - - /** - * Delete payment method - * Removes a stored payment method. - * @param paymentMethodId The ID of the payment method. (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 Returns an empty response. -
401 Returns an error if no valid authentication was provided. -
404 Returns an error if the resource can not be found. -
- */ - public ApiResponse deletePaymentMethodWithHttpInfo(UUID paymentMethodId) throws ApiException { - okhttp3.Call localVarCall = deletePaymentMethodValidateBeforeCall(paymentMethodId, null); - return localVarApiClient.execute(localVarCall); - } - - /** - * Delete payment method (asynchronously) - * Removes a stored payment method. - * @param paymentMethodId The ID of the payment method. (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 Returns an empty response. -
401 Returns an error if no valid authentication was provided. -
404 Returns an error if the resource can not be found. -
- */ - public okhttp3.Call deletePaymentMethodAsync(UUID paymentMethodId, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = deletePaymentMethodValidateBeforeCall(paymentMethodId, _callback); - localVarApiClient.executeAsync(localVarCall, _callback); - return localVarCall; - } - /** - * Build call for getPaymentMethod - * @param paymentMethodId The ID of the payment method. (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 Returns a payment method. -
401 Returns an error if no valid authentication was provided. -
404 Returns an error if the resource can not be found. -
- */ - public okhttp3.Call getPaymentMethodCall(UUID paymentMethodId, final ApiCallback _callback) throws ApiException { - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/payment-methods/{payment_method_id}" - .replaceAll("\\{" + "payment_method_id" + "\\}", localVarApiClient.escapeString(paymentMethodId.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); - localVarHeaderParams.put("Content-Type", localVarContentType); - - String[] localVarAuthNames = new String[] { "BearerAuth" }; - return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call getPaymentMethodValidateBeforeCall(UUID paymentMethodId, final ApiCallback _callback) throws ApiException { - - // verify the required parameter 'paymentMethodId' is set - if (paymentMethodId == null) { - throw new ApiException("Missing the required parameter 'paymentMethodId' when calling getPaymentMethod(Async)"); - } - - - okhttp3.Call localVarCall = getPaymentMethodCall(paymentMethodId, _callback); - return localVarCall; - - } - - /** - * Get payment method - * Gets the details for a stored payment method. - * @param paymentMethodId The ID of the payment method. (required) - * @return PaymentMethod - * @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 Returns a payment method. -
401 Returns an error if no valid authentication was provided. -
404 Returns an error if the resource can not be found. -
- */ - public PaymentMethod getPaymentMethod(UUID paymentMethodId) throws ApiException { - ApiResponse localVarResp = getPaymentMethodWithHttpInfo(paymentMethodId); - return localVarResp.getData(); - } - - /** - * Get payment method - * Gets the details for a stored payment method. - * @param paymentMethodId The ID of the payment method. (required) - * @return ApiResponse<PaymentMethod> - * @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 Returns a payment method. -
401 Returns an error if no valid authentication was provided. -
404 Returns an error if the resource can not be found. -
- */ - public ApiResponse getPaymentMethodWithHttpInfo(UUID paymentMethodId) throws ApiException { - okhttp3.Call localVarCall = getPaymentMethodValidateBeforeCall(paymentMethodId, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Get payment method (asynchronously) - * Gets the details for a stored payment method. - * @param paymentMethodId The ID of the payment method. (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 Returns a payment method. -
401 Returns an error if no valid authentication was provided. -
404 Returns an error if the resource can not be found. -
- */ - public okhttp3.Call getPaymentMethodAsync(UUID paymentMethodId, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = getPaymentMethodValidateBeforeCall(paymentMethodId, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for listBuyerPaymentMethods - * @param buyerId Filters the results to only the items for which the `buyer` has an `id` that matches this value. (optional) - * @param buyerExternalIdentifier Filters the results to only the items for which the `buyer` has an `external_identifier` that matches this value. (optional) - * @param country Filters the results to only the items which support this country code. A country is formatted as 2-letter ISO country code. (optional) - * @param currency Filters the results to only the items which support this currency code. A currency is formatted as 3-letter ISO currency code. (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 Returns a list of available payment methods for a buyer, filtered by the given currency and country code. -
401 Returns an error if no valid authentication was provided. -
404 Returns an error if the resource can not be found. -
- */ - public okhttp3.Call listBuyerPaymentMethodsCall(String buyerId, String buyerExternalIdentifier, String country, String currency, final ApiCallback _callback) throws ApiException { - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/buyers/payment-methods"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (buyerId != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("buyer_id", buyerId)); - } - - if (buyerExternalIdentifier != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("buyer_external_identifier", buyerExternalIdentifier)); - } - - if (country != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("country", country)); - } - - if (currency != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("currency", currency)); - } - - 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); - localVarHeaderParams.put("Content-Type", localVarContentType); - - String[] localVarAuthNames = new String[] { "BearerAuth" }; - return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call listBuyerPaymentMethodsValidateBeforeCall(String buyerId, String buyerExternalIdentifier, String country, String currency, final ApiCallback _callback) throws ApiException { - - - okhttp3.Call localVarCall = listBuyerPaymentMethodsCall(buyerId, buyerExternalIdentifier, country, currency, _callback); - return localVarCall; - - } - - /** - * List payment methods for buyer - * Returns a list of stored payment methods for a buyer in a summarized format. Only payment methods that are compatible with at least one active payment service in that region are shown. - * @param buyerId Filters the results to only the items for which the `buyer` has an `id` that matches this value. (optional) - * @param buyerExternalIdentifier Filters the results to only the items for which the `buyer` has an `external_identifier` that matches this value. (optional) - * @param country Filters the results to only the items which support this country code. A country is formatted as 2-letter ISO country code. (optional) - * @param currency Filters the results to only the items which support this currency code. A currency is formatted as 3-letter ISO currency code. (optional) - * @return PaymentMethodsTokenized - * @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 Returns a list of available payment methods for a buyer, filtered by the given currency and country code. -
401 Returns an error if no valid authentication was provided. -
404 Returns an error if the resource can not be found. -
- */ - public PaymentMethodsTokenized listBuyerPaymentMethods(String buyerId, String buyerExternalIdentifier, String country, String currency) throws ApiException { - ApiResponse localVarResp = listBuyerPaymentMethodsWithHttpInfo(buyerId, buyerExternalIdentifier, country, currency); - return localVarResp.getData(); - } - - /** - * List payment methods for buyer - * Returns a list of stored payment methods for a buyer in a summarized format. Only payment methods that are compatible with at least one active payment service in that region are shown. - * @param buyerId Filters the results to only the items for which the `buyer` has an `id` that matches this value. (optional) - * @param buyerExternalIdentifier Filters the results to only the items for which the `buyer` has an `external_identifier` that matches this value. (optional) - * @param country Filters the results to only the items which support this country code. A country is formatted as 2-letter ISO country code. (optional) - * @param currency Filters the results to only the items which support this currency code. A currency is formatted as 3-letter ISO currency code. (optional) - * @return ApiResponse<PaymentMethodsTokenized> - * @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 Returns a list of available payment methods for a buyer, filtered by the given currency and country code. -
401 Returns an error if no valid authentication was provided. -
404 Returns an error if the resource can not be found. -
- */ - public ApiResponse listBuyerPaymentMethodsWithHttpInfo(String buyerId, String buyerExternalIdentifier, String country, String currency) throws ApiException { - okhttp3.Call localVarCall = listBuyerPaymentMethodsValidateBeforeCall(buyerId, buyerExternalIdentifier, country, currency, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * List payment methods for buyer (asynchronously) - * Returns a list of stored payment methods for a buyer in a summarized format. Only payment methods that are compatible with at least one active payment service in that region are shown. - * @param buyerId Filters the results to only the items for which the `buyer` has an `id` that matches this value. (optional) - * @param buyerExternalIdentifier Filters the results to only the items for which the `buyer` has an `external_identifier` that matches this value. (optional) - * @param country Filters the results to only the items which support this country code. A country is formatted as 2-letter ISO country code. (optional) - * @param currency Filters the results to only the items which support this currency code. A currency is formatted as 3-letter ISO currency code. (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 Returns a list of available payment methods for a buyer, filtered by the given currency and country code. -
401 Returns an error if no valid authentication was provided. -
404 Returns an error if the resource can not be found. -
- */ - public okhttp3.Call listBuyerPaymentMethodsAsync(String buyerId, String buyerExternalIdentifier, String country, String currency, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = listBuyerPaymentMethodsValidateBeforeCall(buyerId, buyerExternalIdentifier, country, currency, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for listPaymentMethods - * @param buyerId Filters the results to only the items for which the `buyer` has an `id` that matches this value. (optional) - * @param buyerExternalIdentifier Filters the results to only the items for which the `buyer` has an `external_identifier` that matches this value. (optional) - * @param status Filters the results to only the payment methods for which the `status` matches this value. (optional) - * @param limit Defines the maximum number of items to return for this request. (optional, default to 20) - * @param cursor A cursor that identifies the page of results to return. This is used to paginate the results of this API. For the first page of results, this parameter can be left out. For additional pages, use the value returned by the API in the `next_cursor` field. Similarly the `previous_cursor` can be used to reverse backwards in the list. (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 Returns a list of payment methods. -
401 Returns an error if no valid authentication was provided. -
- */ - public okhttp3.Call listPaymentMethodsCall(String buyerId, String buyerExternalIdentifier, String status, Integer limit, String cursor, final ApiCallback _callback) throws ApiException { - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/payment-methods"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (buyerId != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("buyer_id", buyerId)); - } - - if (buyerExternalIdentifier != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("buyer_external_identifier", buyerExternalIdentifier)); - } - - if (status != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("status", status)); - } - - if (limit != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("limit", limit)); - } - - if (cursor != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("cursor", cursor)); - } - - 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); - localVarHeaderParams.put("Content-Type", localVarContentType); - - String[] localVarAuthNames = new String[] { "BearerAuth" }; - return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call listPaymentMethodsValidateBeforeCall(String buyerId, String buyerExternalIdentifier, String status, Integer limit, String cursor, final ApiCallback _callback) throws ApiException { - - - okhttp3.Call localVarCall = listPaymentMethodsCall(buyerId, buyerExternalIdentifier, status, limit, cursor, _callback); - return localVarCall; - - } - - /** - * List payment methods - * Returns a list of stored payment methods. - * @param buyerId Filters the results to only the items for which the `buyer` has an `id` that matches this value. (optional) - * @param buyerExternalIdentifier Filters the results to only the items for which the `buyer` has an `external_identifier` that matches this value. (optional) - * @param status Filters the results to only the payment methods for which the `status` matches this value. (optional) - * @param limit Defines the maximum number of items to return for this request. (optional, default to 20) - * @param cursor A cursor that identifies the page of results to return. This is used to paginate the results of this API. For the first page of results, this parameter can be left out. For additional pages, use the value returned by the API in the `next_cursor` field. Similarly the `previous_cursor` can be used to reverse backwards in the list. (optional) - * @return PaymentMethods - * @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 Returns a list of payment methods. -
401 Returns an error if no valid authentication was provided. -
- */ - public PaymentMethods listPaymentMethods(String buyerId, String buyerExternalIdentifier, String status, Integer limit, String cursor) throws ApiException { - ApiResponse localVarResp = listPaymentMethodsWithHttpInfo(buyerId, buyerExternalIdentifier, status, limit, cursor); - return localVarResp.getData(); - } - - /** - * List payment methods - * Returns a list of stored payment methods. - * @param buyerId Filters the results to only the items for which the `buyer` has an `id` that matches this value. (optional) - * @param buyerExternalIdentifier Filters the results to only the items for which the `buyer` has an `external_identifier` that matches this value. (optional) - * @param status Filters the results to only the payment methods for which the `status` matches this value. (optional) - * @param limit Defines the maximum number of items to return for this request. (optional, default to 20) - * @param cursor A cursor that identifies the page of results to return. This is used to paginate the results of this API. For the first page of results, this parameter can be left out. For additional pages, use the value returned by the API in the `next_cursor` field. Similarly the `previous_cursor` can be used to reverse backwards in the list. (optional) - * @return ApiResponse<PaymentMethods> - * @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 Returns a list of payment methods. -
401 Returns an error if no valid authentication was provided. -
- */ - public ApiResponse listPaymentMethodsWithHttpInfo(String buyerId, String buyerExternalIdentifier, String status, Integer limit, String cursor) throws ApiException { - okhttp3.Call localVarCall = listPaymentMethodsValidateBeforeCall(buyerId, buyerExternalIdentifier, status, limit, cursor, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * List payment methods (asynchronously) - * Returns a list of stored payment methods. - * @param buyerId Filters the results to only the items for which the `buyer` has an `id` that matches this value. (optional) - * @param buyerExternalIdentifier Filters the results to only the items for which the `buyer` has an `external_identifier` that matches this value. (optional) - * @param status Filters the results to only the payment methods for which the `status` matches this value. (optional) - * @param limit Defines the maximum number of items to return for this request. (optional, default to 20) - * @param cursor A cursor that identifies the page of results to return. This is used to paginate the results of this API. For the first page of results, this parameter can be left out. For additional pages, use the value returned by the API in the `next_cursor` field. Similarly the `previous_cursor` can be used to reverse backwards in the list. (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 Returns a list of payment methods. -
401 Returns an error if no valid authentication was provided. -
- */ - public okhttp3.Call listPaymentMethodsAsync(String buyerId, String buyerExternalIdentifier, String status, Integer limit, String cursor, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = listPaymentMethodsValidateBeforeCall(buyerId, buyerExternalIdentifier, status, limit, cursor, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for newPaymentMethod - * @param paymentMethodRequest (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
201 Returns the created payment method. -
400 Returns an error if the request was badly formatted or missing required fields. -
401 Returns an error if no valid authentication was provided. -
409 Returns an error if duplicate resource has been found. -
- */ - public okhttp3.Call newPaymentMethodCall(PaymentMethodRequest paymentMethodRequest, final ApiCallback _callback) throws ApiException { - Object localVarPostBody = paymentMethodRequest; - - // create path and map variables - String localVarPath = "/payment-methods"; - - 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); - localVarHeaderParams.put("Content-Type", localVarContentType); - - String[] localVarAuthNames = new String[] { "BearerAuth" }; - return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call newPaymentMethodValidateBeforeCall(PaymentMethodRequest paymentMethodRequest, final ApiCallback _callback) throws ApiException { - - - okhttp3.Call localVarCall = newPaymentMethodCall(paymentMethodRequest, _callback); - return localVarCall; - - } - - /** - * New payment method - * Stores and vaults a new payment method. Vaulting a card only stores its information but doesn't validate it against any PSP, so ephemeral data like the security code, often referred to as the CVV or CVD, won't be used. In order to validate the card data, a CIT (Customer Initiated Transaction) must be done, even if it's a zero-value one. - * @param paymentMethodRequest (optional) - * @return PaymentMethod - * @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 Returns the created payment method. -
400 Returns an error if the request was badly formatted or missing required fields. -
401 Returns an error if no valid authentication was provided. -
409 Returns an error if duplicate resource has been found. -
- */ - public PaymentMethod newPaymentMethod(PaymentMethodRequest paymentMethodRequest) throws ApiException { - ApiResponse localVarResp = newPaymentMethodWithHttpInfo(paymentMethodRequest); - return localVarResp.getData(); - } - - /** - * New payment method - * Stores and vaults a new payment method. Vaulting a card only stores its information but doesn't validate it against any PSP, so ephemeral data like the security code, often referred to as the CVV or CVD, won't be used. In order to validate the card data, a CIT (Customer Initiated Transaction) must be done, even if it's a zero-value one. - * @param paymentMethodRequest (optional) - * @return ApiResponse<PaymentMethod> - * @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 Returns the created payment method. -
400 Returns an error if the request was badly formatted or missing required fields. -
401 Returns an error if no valid authentication was provided. -
409 Returns an error if duplicate resource has been found. -
- */ - public ApiResponse newPaymentMethodWithHttpInfo(PaymentMethodRequest paymentMethodRequest) throws ApiException { - okhttp3.Call localVarCall = newPaymentMethodValidateBeforeCall(paymentMethodRequest, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * New payment method (asynchronously) - * Stores and vaults a new payment method. Vaulting a card only stores its information but doesn't validate it against any PSP, so ephemeral data like the security code, often referred to as the CVV or CVD, won't be used. In order to validate the card data, a CIT (Customer Initiated Transaction) must be done, even if it's a zero-value one. - * @param paymentMethodRequest (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
201 Returns the created payment method. -
400 Returns an error if the request was badly formatted or missing required fields. -
401 Returns an error if no valid authentication was provided. -
409 Returns an error if duplicate resource has been found. -
- */ - public okhttp3.Call newPaymentMethodAsync(PaymentMethodRequest paymentMethodRequest, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = newPaymentMethodValidateBeforeCall(paymentMethodRequest, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/src/main/java/com/gr4vy/api/openapi/PaymentOptionsApi.java b/src/main/java/com/gr4vy/api/openapi/PaymentOptionsApi.java deleted file mode 100644 index aa94740..0000000 --- a/src/main/java/com/gr4vy/api/openapi/PaymentOptionsApi.java +++ /dev/null @@ -1,324 +0,0 @@ -/* - * Gr4vy API - * Welcome to the Gr4vy API reference documentation. Our API is still very much a work in product and subject to change. - * - * The version of the OpenAPI document: 1.1.0-beta - * Contact: code@gr4vy.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.gr4vy.api.openapi; - -import com.gr4vy.api.ApiCallback; -import com.gr4vy.api.ApiClient; -import com.gr4vy.api.ApiException; -import com.gr4vy.api.ApiResponse; -import com.gr4vy.api.Configuration; -import com.gr4vy.api.Pair; -import com.gr4vy.api.ProgressRequestBody; -import com.gr4vy.api.ProgressResponseBody; - -import com.google.gson.reflect.TypeToken; - -import java.io.IOException; - - -import com.gr4vy.api.model.Error400BadRequest; -import com.gr4vy.api.model.Error401Unauthorized; -import com.gr4vy.api.model.PaymentOptions; -import com.gr4vy.api.model.PaymentOptionsRequest; - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class PaymentOptionsApi { - private ApiClient localVarApiClient; - - public PaymentOptionsApi() { - this(Configuration.getDefaultApiClient()); - } - - public PaymentOptionsApi(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public ApiClient getApiClient() { - return localVarApiClient; - } - - public void setApiClient(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - /** - * Build call for listPaymentOptions - * @param country Filters the results to only the items which support this country code. A country is formatted as 2-letter ISO country code. (optional) - * @param currency Filters the results to only the items which support this currency code. A currency is formatted as 3-letter ISO currency code. (optional) - * @param amount Used by the Flow engine to filter the results based on the transaction amount. (optional) - * @param metadata Used by the Flow engine to filter available options based on various client-defined parameters. If present, this must be a string representing a valid JSON dictionary. (optional) - * @param locale An ISO 639-1 Language Code and optional ISO 3166 Country Code. This locale determines the language for the labels returned for every payment option. (optional, default to en) - * @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 Returns a list of available payment options for the given query parameters. -
400 Returns an error if any of the query parameters are not recognized. -
401 Returns an error if no valid authentication was provided. -
- */ - public okhttp3.Call listPaymentOptionsCall(String country, String currency, Integer amount, String metadata, String locale, final ApiCallback _callback) throws ApiException { - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/payment-options"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (country != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("country", country)); - } - - if (currency != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("currency", currency)); - } - - if (amount != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("amount", amount)); - } - - if (metadata != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("metadata", metadata)); - } - - if (locale != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("locale", locale)); - } - - 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); - localVarHeaderParams.put("Content-Type", localVarContentType); - - String[] localVarAuthNames = new String[] { "BearerAuth" }; - return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call listPaymentOptionsValidateBeforeCall(String country, String currency, Integer amount, String metadata, String locale, final ApiCallback _callback) throws ApiException { - - - okhttp3.Call localVarCall = listPaymentOptionsCall(country, currency, amount, metadata, locale, _callback); - return localVarCall; - - } - - /** - * List payment options - * Returns a list of available payment method options for the combination of amount, currency, country and metadata. If the amount is zero, payment options which do not support zero amounts, will be omitted in the response. Checkout flow rules are used to limit these result. - * @param country Filters the results to only the items which support this country code. A country is formatted as 2-letter ISO country code. (optional) - * @param currency Filters the results to only the items which support this currency code. A currency is formatted as 3-letter ISO currency code. (optional) - * @param amount Used by the Flow engine to filter the results based on the transaction amount. (optional) - * @param metadata Used by the Flow engine to filter available options based on various client-defined parameters. If present, this must be a string representing a valid JSON dictionary. (optional) - * @param locale An ISO 639-1 Language Code and optional ISO 3166 Country Code. This locale determines the language for the labels returned for every payment option. (optional, default to en) - * @return PaymentOptions - * @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 Returns a list of available payment options for the given query parameters. -
400 Returns an error if any of the query parameters are not recognized. -
401 Returns an error if no valid authentication was provided. -
- */ - public PaymentOptions listPaymentOptions(String country, String currency, Integer amount, String metadata, String locale) throws ApiException { - ApiResponse localVarResp = listPaymentOptionsWithHttpInfo(country, currency, amount, metadata, locale); - return localVarResp.getData(); - } - - /** - * List payment options - * Returns a list of available payment method options for the combination of amount, currency, country and metadata. If the amount is zero, payment options which do not support zero amounts, will be omitted in the response. Checkout flow rules are used to limit these result. - * @param country Filters the results to only the items which support this country code. A country is formatted as 2-letter ISO country code. (optional) - * @param currency Filters the results to only the items which support this currency code. A currency is formatted as 3-letter ISO currency code. (optional) - * @param amount Used by the Flow engine to filter the results based on the transaction amount. (optional) - * @param metadata Used by the Flow engine to filter available options based on various client-defined parameters. If present, this must be a string representing a valid JSON dictionary. (optional) - * @param locale An ISO 639-1 Language Code and optional ISO 3166 Country Code. This locale determines the language for the labels returned for every payment option. (optional, default to en) - * @return ApiResponse<PaymentOptions> - * @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 Returns a list of available payment options for the given query parameters. -
400 Returns an error if any of the query parameters are not recognized. -
401 Returns an error if no valid authentication was provided. -
- */ - public ApiResponse listPaymentOptionsWithHttpInfo(String country, String currency, Integer amount, String metadata, String locale) throws ApiException { - okhttp3.Call localVarCall = listPaymentOptionsValidateBeforeCall(country, currency, amount, metadata, locale, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * List payment options (asynchronously) - * Returns a list of available payment method options for the combination of amount, currency, country and metadata. If the amount is zero, payment options which do not support zero amounts, will be omitted in the response. Checkout flow rules are used to limit these result. - * @param country Filters the results to only the items which support this country code. A country is formatted as 2-letter ISO country code. (optional) - * @param currency Filters the results to only the items which support this currency code. A currency is formatted as 3-letter ISO currency code. (optional) - * @param amount Used by the Flow engine to filter the results based on the transaction amount. (optional) - * @param metadata Used by the Flow engine to filter available options based on various client-defined parameters. If present, this must be a string representing a valid JSON dictionary. (optional) - * @param locale An ISO 639-1 Language Code and optional ISO 3166 Country Code. This locale determines the language for the labels returned for every payment option. (optional, default to en) - * @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 Returns a list of available payment options for the given query parameters. -
400 Returns an error if any of the query parameters are not recognized. -
401 Returns an error if no valid authentication was provided. -
- */ - public okhttp3.Call listPaymentOptionsAsync(String country, String currency, Integer amount, String metadata, String locale, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = listPaymentOptionsValidateBeforeCall(country, currency, amount, metadata, locale, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for postListPaymentOptions - * @param paymentOptionsRequest (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 Returns a list of available payment options for the given query parameters. -
400 Returns an error if the request was badly formatted or missing required fields. -
401 Returns an error if no valid authentication was provided. -
- */ - public okhttp3.Call postListPaymentOptionsCall(PaymentOptionsRequest paymentOptionsRequest, final ApiCallback _callback) throws ApiException { - Object localVarPostBody = paymentOptionsRequest; - - // create path and map variables - String localVarPath = "/payment-options"; - - 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); - localVarHeaderParams.put("Content-Type", localVarContentType); - - String[] localVarAuthNames = new String[] { "BearerAuth" }; - return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call postListPaymentOptionsValidateBeforeCall(PaymentOptionsRequest paymentOptionsRequest, final ApiCallback _callback) throws ApiException { - - - okhttp3.Call localVarCall = postListPaymentOptionsCall(paymentOptionsRequest, _callback); - return localVarCall; - - } - - /** - * List payment options with POST - * Returns a list of available payment method options for the combination of amount, currency, country, metadata and list of cart items. If the amount is zero, payment options which do not support zero amounts, will be omitted in the response. Checkout flow rules are used to limit these result. - * @param paymentOptionsRequest (optional) - * @return PaymentOptions - * @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 Returns a list of available payment options for the given query parameters. -
400 Returns an error if the request was badly formatted or missing required fields. -
401 Returns an error if no valid authentication was provided. -
- */ - public PaymentOptions postListPaymentOptions(PaymentOptionsRequest paymentOptionsRequest) throws ApiException { - ApiResponse localVarResp = postListPaymentOptionsWithHttpInfo(paymentOptionsRequest); - return localVarResp.getData(); - } - - /** - * List payment options with POST - * Returns a list of available payment method options for the combination of amount, currency, country, metadata and list of cart items. If the amount is zero, payment options which do not support zero amounts, will be omitted in the response. Checkout flow rules are used to limit these result. - * @param paymentOptionsRequest (optional) - * @return ApiResponse<PaymentOptions> - * @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 Returns a list of available payment options for the given query parameters. -
400 Returns an error if the request was badly formatted or missing required fields. -
401 Returns an error if no valid authentication was provided. -
- */ - public ApiResponse postListPaymentOptionsWithHttpInfo(PaymentOptionsRequest paymentOptionsRequest) throws ApiException { - okhttp3.Call localVarCall = postListPaymentOptionsValidateBeforeCall(paymentOptionsRequest, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * List payment options with POST (asynchronously) - * Returns a list of available payment method options for the combination of amount, currency, country, metadata and list of cart items. If the amount is zero, payment options which do not support zero amounts, will be omitted in the response. Checkout flow rules are used to limit these result. - * @param paymentOptionsRequest (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 Returns a list of available payment options for the given query parameters. -
400 Returns an error if the request was badly formatted or missing required fields. -
401 Returns an error if no valid authentication was provided. -
- */ - public okhttp3.Call postListPaymentOptionsAsync(PaymentOptionsRequest paymentOptionsRequest, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = postListPaymentOptionsValidateBeforeCall(paymentOptionsRequest, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/src/main/java/com/gr4vy/api/openapi/PaymentServiceDefinitionsApi.java b/src/main/java/com/gr4vy/api/openapi/PaymentServiceDefinitionsApi.java deleted file mode 100644 index 99a80a5..0000000 --- a/src/main/java/com/gr4vy/api/openapi/PaymentServiceDefinitionsApi.java +++ /dev/null @@ -1,302 +0,0 @@ -/* - * Gr4vy API - * Welcome to the Gr4vy API reference documentation. Our API is still very much a work in product and subject to change. - * - * The version of the OpenAPI document: 1.1.0-beta - * Contact: code@gr4vy.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.gr4vy.api.openapi; - -import com.gr4vy.api.ApiCallback; -import com.gr4vy.api.ApiClient; -import com.gr4vy.api.ApiException; -import com.gr4vy.api.ApiResponse; -import com.gr4vy.api.Configuration; -import com.gr4vy.api.Pair; -import com.gr4vy.api.ProgressRequestBody; -import com.gr4vy.api.ProgressResponseBody; - -import com.google.gson.reflect.TypeToken; - -import java.io.IOException; - - -import com.gr4vy.api.model.Error401Unauthorized; -import com.gr4vy.api.model.Error404NotFound; -import com.gr4vy.api.model.PaymentServiceDefinition; -import com.gr4vy.api.model.PaymentServiceDefinitions; - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class PaymentServiceDefinitionsApi { - private ApiClient localVarApiClient; - - public PaymentServiceDefinitionsApi() { - this(Configuration.getDefaultApiClient()); - } - - public PaymentServiceDefinitionsApi(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public ApiClient getApiClient() { - return localVarApiClient; - } - - public void setApiClient(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - /** - * Build call for getPaymentServiceDefinition - * @param paymentServiceDefinitionId The unique ID of the payment service definition. (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 Returns a payment service definition. -
401 Returns an error if no valid authentication was provided. -
404 Returns an error if the resource can not be found. -
- */ - public okhttp3.Call getPaymentServiceDefinitionCall(String paymentServiceDefinitionId, final ApiCallback _callback) throws ApiException { - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/payment-service-definitions/{payment_service_definition_id}" - .replaceAll("\\{" + "payment_service_definition_id" + "\\}", localVarApiClient.escapeString(paymentServiceDefinitionId.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); - localVarHeaderParams.put("Content-Type", localVarContentType); - - String[] localVarAuthNames = new String[] { "BearerAuth" }; - return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call getPaymentServiceDefinitionValidateBeforeCall(String paymentServiceDefinitionId, final ApiCallback _callback) throws ApiException { - - // verify the required parameter 'paymentServiceDefinitionId' is set - if (paymentServiceDefinitionId == null) { - throw new ApiException("Missing the required parameter 'paymentServiceDefinitionId' when calling getPaymentServiceDefinition(Async)"); - } - - - okhttp3.Call localVarCall = getPaymentServiceDefinitionCall(paymentServiceDefinitionId, _callback); - return localVarCall; - - } - - /** - * Get payment service definition - * Gets the definition for a payment service. - * @param paymentServiceDefinitionId The unique ID of the payment service definition. (required) - * @return PaymentServiceDefinition - * @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 Returns a payment service definition. -
401 Returns an error if no valid authentication was provided. -
404 Returns an error if the resource can not be found. -
- */ - public PaymentServiceDefinition getPaymentServiceDefinition(String paymentServiceDefinitionId) throws ApiException { - ApiResponse localVarResp = getPaymentServiceDefinitionWithHttpInfo(paymentServiceDefinitionId); - return localVarResp.getData(); - } - - /** - * Get payment service definition - * Gets the definition for a payment service. - * @param paymentServiceDefinitionId The unique ID of the payment service definition. (required) - * @return ApiResponse<PaymentServiceDefinition> - * @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 Returns a payment service definition. -
401 Returns an error if no valid authentication was provided. -
404 Returns an error if the resource can not be found. -
- */ - public ApiResponse getPaymentServiceDefinitionWithHttpInfo(String paymentServiceDefinitionId) throws ApiException { - okhttp3.Call localVarCall = getPaymentServiceDefinitionValidateBeforeCall(paymentServiceDefinitionId, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Get payment service definition (asynchronously) - * Gets the definition for a payment service. - * @param paymentServiceDefinitionId The unique ID of the payment service definition. (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 Returns a payment service definition. -
401 Returns an error if no valid authentication was provided. -
404 Returns an error if the resource can not be found. -
- */ - public okhttp3.Call getPaymentServiceDefinitionAsync(String paymentServiceDefinitionId, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = getPaymentServiceDefinitionValidateBeforeCall(paymentServiceDefinitionId, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for listPaymentServiceDefinitions - * @param limit Defines the maximum number of items to return for this request. (optional, default to 20) - * @param cursor A cursor that identifies the page of results to return. This is used to paginate the results of this API. For the first page of results, this parameter can be left out. For additional pages, use the value returned by the API in the `next_cursor` field. Similarly the `previous_cursor` can be used to reverse backwards in the list. (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 Returns a list of payment service definitions. -
401 Returns an error if no valid authentication was provided. -
- */ - public okhttp3.Call listPaymentServiceDefinitionsCall(Integer limit, String cursor, final ApiCallback _callback) throws ApiException { - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/payment-service-definitions"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (limit != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("limit", limit)); - } - - if (cursor != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("cursor", cursor)); - } - - 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); - localVarHeaderParams.put("Content-Type", localVarContentType); - - String[] localVarAuthNames = new String[] { "BearerAuth" }; - return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call listPaymentServiceDefinitionsValidateBeforeCall(Integer limit, String cursor, final ApiCallback _callback) throws ApiException { - - - okhttp3.Call localVarCall = listPaymentServiceDefinitionsCall(limit, cursor, _callback); - return localVarCall; - - } - - /** - * List payment service definitions - * Returns a list of all available payment service definitions. - * @param limit Defines the maximum number of items to return for this request. (optional, default to 20) - * @param cursor A cursor that identifies the page of results to return. This is used to paginate the results of this API. For the first page of results, this parameter can be left out. For additional pages, use the value returned by the API in the `next_cursor` field. Similarly the `previous_cursor` can be used to reverse backwards in the list. (optional) - * @return PaymentServiceDefinitions - * @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 Returns a list of payment service definitions. -
401 Returns an error if no valid authentication was provided. -
- */ - public PaymentServiceDefinitions listPaymentServiceDefinitions(Integer limit, String cursor) throws ApiException { - ApiResponse localVarResp = listPaymentServiceDefinitionsWithHttpInfo(limit, cursor); - return localVarResp.getData(); - } - - /** - * List payment service definitions - * Returns a list of all available payment service definitions. - * @param limit Defines the maximum number of items to return for this request. (optional, default to 20) - * @param cursor A cursor that identifies the page of results to return. This is used to paginate the results of this API. For the first page of results, this parameter can be left out. For additional pages, use the value returned by the API in the `next_cursor` field. Similarly the `previous_cursor` can be used to reverse backwards in the list. (optional) - * @return ApiResponse<PaymentServiceDefinitions> - * @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 Returns a list of payment service definitions. -
401 Returns an error if no valid authentication was provided. -
- */ - public ApiResponse listPaymentServiceDefinitionsWithHttpInfo(Integer limit, String cursor) throws ApiException { - okhttp3.Call localVarCall = listPaymentServiceDefinitionsValidateBeforeCall(limit, cursor, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * List payment service definitions (asynchronously) - * Returns a list of all available payment service definitions. - * @param limit Defines the maximum number of items to return for this request. (optional, default to 20) - * @param cursor A cursor that identifies the page of results to return. This is used to paginate the results of this API. For the first page of results, this parameter can be left out. For additional pages, use the value returned by the API in the `next_cursor` field. Similarly the `previous_cursor` can be used to reverse backwards in the list. (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 Returns a list of payment service definitions. -
401 Returns an error if no valid authentication was provided. -
- */ - public okhttp3.Call listPaymentServiceDefinitionsAsync(Integer limit, String cursor, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = listPaymentServiceDefinitionsValidateBeforeCall(limit, cursor, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/src/main/java/com/gr4vy/api/openapi/PaymentServicesApi.java b/src/main/java/com/gr4vy/api/openapi/PaymentServicesApi.java deleted file mode 100644 index 2ea6342..0000000 --- a/src/main/java/com/gr4vy/api/openapi/PaymentServicesApi.java +++ /dev/null @@ -1,679 +0,0 @@ -/* - * Gr4vy API - * Welcome to the Gr4vy API reference documentation. Our API is still very much a work in product and subject to change. - * - * The version of the OpenAPI document: 1.1.0-beta - * Contact: code@gr4vy.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.gr4vy.api.openapi; - -import com.gr4vy.api.ApiCallback; -import com.gr4vy.api.ApiClient; -import com.gr4vy.api.ApiException; -import com.gr4vy.api.ApiResponse; -import com.gr4vy.api.Configuration; -import com.gr4vy.api.Pair; -import com.gr4vy.api.ProgressRequestBody; -import com.gr4vy.api.ProgressResponseBody; - -import com.google.gson.reflect.TypeToken; - -import java.io.IOException; - - -import com.gr4vy.api.model.Error401Unauthorized; -import com.gr4vy.api.model.Error404NotFound; -import com.gr4vy.api.model.ErrorGeneric; -import com.gr4vy.api.model.PaymentService; -import com.gr4vy.api.model.PaymentServiceRequest; -import com.gr4vy.api.model.PaymentServiceUpdate; -import com.gr4vy.api.model.PaymentServices; - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class PaymentServicesApi { - private ApiClient localVarApiClient; - - public PaymentServicesApi() { - this(Configuration.getDefaultApiClient()); - } - - public PaymentServicesApi(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public ApiClient getApiClient() { - return localVarApiClient; - } - - public void setApiClient(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - /** - * Build call for deletePaymentService - * @param paymentServiceId The ID of the payment service. (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 Returns an empty response. -
401 Returns an error if no valid authentication was provided. -
404 Returns an error if the resource can not be found. -
- */ - public okhttp3.Call deletePaymentServiceCall(String paymentServiceId, final ApiCallback _callback) throws ApiException { - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/payment-services/{payment_service_id}" - .replaceAll("\\{" + "payment_service_id" + "\\}", localVarApiClient.escapeString(paymentServiceId.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); - localVarHeaderParams.put("Content-Type", localVarContentType); - - String[] localVarAuthNames = new String[] { "BearerAuth" }; - return localVarApiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call deletePaymentServiceValidateBeforeCall(String paymentServiceId, final ApiCallback _callback) throws ApiException { - - // verify the required parameter 'paymentServiceId' is set - if (paymentServiceId == null) { - throw new ApiException("Missing the required parameter 'paymentServiceId' when calling deletePaymentService(Async)"); - } - - - okhttp3.Call localVarCall = deletePaymentServiceCall(paymentServiceId, _callback); - return localVarCall; - - } - - /** - * Delete payment service - * Deletes a specific active payment service. - * @param paymentServiceId The ID of the payment service. (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 Returns an empty response. -
401 Returns an error if no valid authentication was provided. -
404 Returns an error if the resource can not be found. -
- */ - public void deletePaymentService(String paymentServiceId) throws ApiException { - deletePaymentServiceWithHttpInfo(paymentServiceId); - } - - /** - * Delete payment service - * Deletes a specific active payment service. - * @param paymentServiceId The ID of the payment service. (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 Returns an empty response. -
401 Returns an error if no valid authentication was provided. -
404 Returns an error if the resource can not be found. -
- */ - public ApiResponse deletePaymentServiceWithHttpInfo(String paymentServiceId) throws ApiException { - okhttp3.Call localVarCall = deletePaymentServiceValidateBeforeCall(paymentServiceId, null); - return localVarApiClient.execute(localVarCall); - } - - /** - * Delete payment service (asynchronously) - * Deletes a specific active payment service. - * @param paymentServiceId The ID of the payment service. (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 Returns an empty response. -
401 Returns an error if no valid authentication was provided. -
404 Returns an error if the resource can not be found. -
- */ - public okhttp3.Call deletePaymentServiceAsync(String paymentServiceId, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = deletePaymentServiceValidateBeforeCall(paymentServiceId, _callback); - localVarApiClient.executeAsync(localVarCall, _callback); - return localVarCall; - } - /** - * Build call for getPaymentService - * @param paymentServiceId The ID of the payment service. (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 Returns a payment service. -
401 Returns an error if no valid authentication was provided. -
404 Returns an error if the resource can not be found. -
- */ - public okhttp3.Call getPaymentServiceCall(String paymentServiceId, final ApiCallback _callback) throws ApiException { - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/payment-services/{payment_service_id}" - .replaceAll("\\{" + "payment_service_id" + "\\}", localVarApiClient.escapeString(paymentServiceId.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); - localVarHeaderParams.put("Content-Type", localVarContentType); - - String[] localVarAuthNames = new String[] { "BearerAuth" }; - return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call getPaymentServiceValidateBeforeCall(String paymentServiceId, final ApiCallback _callback) throws ApiException { - - // verify the required parameter 'paymentServiceId' is set - if (paymentServiceId == null) { - throw new ApiException("Missing the required parameter 'paymentServiceId' when calling getPaymentService(Async)"); - } - - - okhttp3.Call localVarCall = getPaymentServiceCall(paymentServiceId, _callback); - return localVarCall; - - } - - /** - * Get payment service - * Retrieves the details of a single configured payment service. - * @param paymentServiceId The ID of the payment service. (required) - * @return PaymentService - * @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 Returns a payment service. -
401 Returns an error if no valid authentication was provided. -
404 Returns an error if the resource can not be found. -
- */ - public PaymentService getPaymentService(String paymentServiceId) throws ApiException { - ApiResponse localVarResp = getPaymentServiceWithHttpInfo(paymentServiceId); - return localVarResp.getData(); - } - - /** - * Get payment service - * Retrieves the details of a single configured payment service. - * @param paymentServiceId The ID of the payment service. (required) - * @return ApiResponse<PaymentService> - * @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 Returns a payment service. -
401 Returns an error if no valid authentication was provided. -
404 Returns an error if the resource can not be found. -
- */ - public ApiResponse getPaymentServiceWithHttpInfo(String paymentServiceId) throws ApiException { - okhttp3.Call localVarCall = getPaymentServiceValidateBeforeCall(paymentServiceId, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Get payment service (asynchronously) - * Retrieves the details of a single configured payment service. - * @param paymentServiceId The ID of the payment service. (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 Returns a payment service. -
401 Returns an error if no valid authentication was provided. -
404 Returns an error if the resource can not be found. -
- */ - public okhttp3.Call getPaymentServiceAsync(String paymentServiceId, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = getPaymentServiceValidateBeforeCall(paymentServiceId, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for listPaymentServices - * @param limit Defines the maximum number of items to return for this request. (optional, default to 20) - * @param cursor A cursor that identifies the page of results to return. This is used to paginate the results of this API. For the first page of results, this parameter can be left out. For additional pages, use the value returned by the API in the `next_cursor` field. Similarly the `previous_cursor` can be used to reverse backwards in the list. (optional) - * @param method Filters the results to only the items for which the `method` has been set to this value. For example `card`. (optional) - * @param deleted Filters the results to only show items which have been deleted. By default, deleted items will not be returned. (optional, default to false) - * @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 Returns a list of payment services. -
401 Returns an error if no valid authentication was provided. -
- */ - public okhttp3.Call listPaymentServicesCall(Integer limit, String cursor, String method, Boolean deleted, final ApiCallback _callback) throws ApiException { - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/payment-services"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (limit != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("limit", limit)); - } - - if (cursor != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("cursor", cursor)); - } - - if (method != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("method", method)); - } - - if (deleted != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("deleted", deleted)); - } - - 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); - localVarHeaderParams.put("Content-Type", localVarContentType); - - String[] localVarAuthNames = new String[] { "BearerAuth" }; - return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call listPaymentServicesValidateBeforeCall(Integer limit, String cursor, String method, Boolean deleted, final ApiCallback _callback) throws ApiException { - - - okhttp3.Call localVarCall = listPaymentServicesCall(limit, cursor, method, deleted, _callback); - return localVarCall; - - } - - /** - * List payment services - * Lists the currently configured and activated payment services. - * @param limit Defines the maximum number of items to return for this request. (optional, default to 20) - * @param cursor A cursor that identifies the page of results to return. This is used to paginate the results of this API. For the first page of results, this parameter can be left out. For additional pages, use the value returned by the API in the `next_cursor` field. Similarly the `previous_cursor` can be used to reverse backwards in the list. (optional) - * @param method Filters the results to only the items for which the `method` has been set to this value. For example `card`. (optional) - * @param deleted Filters the results to only show items which have been deleted. By default, deleted items will not be returned. (optional, default to false) - * @return PaymentServices - * @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 Returns a list of payment services. -
401 Returns an error if no valid authentication was provided. -
- */ - public PaymentServices listPaymentServices(Integer limit, String cursor, String method, Boolean deleted) throws ApiException { - ApiResponse localVarResp = listPaymentServicesWithHttpInfo(limit, cursor, method, deleted); - return localVarResp.getData(); - } - - /** - * List payment services - * Lists the currently configured and activated payment services. - * @param limit Defines the maximum number of items to return for this request. (optional, default to 20) - * @param cursor A cursor that identifies the page of results to return. This is used to paginate the results of this API. For the first page of results, this parameter can be left out. For additional pages, use the value returned by the API in the `next_cursor` field. Similarly the `previous_cursor` can be used to reverse backwards in the list. (optional) - * @param method Filters the results to only the items for which the `method` has been set to this value. For example `card`. (optional) - * @param deleted Filters the results to only show items which have been deleted. By default, deleted items will not be returned. (optional, default to false) - * @return ApiResponse<PaymentServices> - * @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 Returns a list of payment services. -
401 Returns an error if no valid authentication was provided. -
- */ - public ApiResponse listPaymentServicesWithHttpInfo(Integer limit, String cursor, String method, Boolean deleted) throws ApiException { - okhttp3.Call localVarCall = listPaymentServicesValidateBeforeCall(limit, cursor, method, deleted, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * List payment services (asynchronously) - * Lists the currently configured and activated payment services. - * @param limit Defines the maximum number of items to return for this request. (optional, default to 20) - * @param cursor A cursor that identifies the page of results to return. This is used to paginate the results of this API. For the first page of results, this parameter can be left out. For additional pages, use the value returned by the API in the `next_cursor` field. Similarly the `previous_cursor` can be used to reverse backwards in the list. (optional) - * @param method Filters the results to only the items for which the `method` has been set to this value. For example `card`. (optional) - * @param deleted Filters the results to only show items which have been deleted. By default, deleted items will not be returned. (optional, default to false) - * @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 Returns a list of payment services. -
401 Returns an error if no valid authentication was provided. -
- */ - public okhttp3.Call listPaymentServicesAsync(Integer limit, String cursor, String method, Boolean deleted, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = listPaymentServicesValidateBeforeCall(limit, cursor, method, deleted, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for newPaymentService - * @param paymentServiceRequest (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
201 Returns the created payment service. -
400 Returns an error if the request was badly formatted or missing required fields. -
401 Returns an error if no valid authentication was provided. -
- */ - public okhttp3.Call newPaymentServiceCall(PaymentServiceRequest paymentServiceRequest, final ApiCallback _callback) throws ApiException { - Object localVarPostBody = paymentServiceRequest; - - // create path and map variables - String localVarPath = "/payment-services"; - - 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); - localVarHeaderParams.put("Content-Type", localVarContentType); - - String[] localVarAuthNames = new String[] { "BearerAuth" }; - return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call newPaymentServiceValidateBeforeCall(PaymentServiceRequest paymentServiceRequest, final ApiCallback _callback) throws ApiException { - - - okhttp3.Call localVarCall = newPaymentServiceCall(paymentServiceRequest, _callback); - return localVarCall; - - } - - /** - * New payment service - * Adds a new payment service by providing a custom name and a value for each of the required fields. - * @param paymentServiceRequest (optional) - * @return PaymentService - * @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 Returns the created payment service. -
400 Returns an error if the request was badly formatted or missing required fields. -
401 Returns an error if no valid authentication was provided. -
- */ - public PaymentService newPaymentService(PaymentServiceRequest paymentServiceRequest) throws ApiException { - ApiResponse localVarResp = newPaymentServiceWithHttpInfo(paymentServiceRequest); - return localVarResp.getData(); - } - - /** - * New payment service - * Adds a new payment service by providing a custom name and a value for each of the required fields. - * @param paymentServiceRequest (optional) - * @return ApiResponse<PaymentService> - * @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 Returns the created payment service. -
400 Returns an error if the request was badly formatted or missing required fields. -
401 Returns an error if no valid authentication was provided. -
- */ - public ApiResponse newPaymentServiceWithHttpInfo(PaymentServiceRequest paymentServiceRequest) throws ApiException { - okhttp3.Call localVarCall = newPaymentServiceValidateBeforeCall(paymentServiceRequest, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * New payment service (asynchronously) - * Adds a new payment service by providing a custom name and a value for each of the required fields. - * @param paymentServiceRequest (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
201 Returns the created payment service. -
400 Returns an error if the request was badly formatted or missing required fields. -
401 Returns an error if no valid authentication was provided. -
- */ - public okhttp3.Call newPaymentServiceAsync(PaymentServiceRequest paymentServiceRequest, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = newPaymentServiceValidateBeforeCall(paymentServiceRequest, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for updatePaymentService - * @param paymentServiceId The ID of the payment service. (required) - * @param paymentServiceUpdate (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
201 Returns the updated payment service. -
400 Returns an error if the request was badly formatted or missing required fields. -
401 Returns an error if no valid authentication was provided. -
404 Returns an error if the resource can not be found. -
- */ - public okhttp3.Call updatePaymentServiceCall(String paymentServiceId, PaymentServiceUpdate paymentServiceUpdate, final ApiCallback _callback) throws ApiException { - Object localVarPostBody = paymentServiceUpdate; - - // create path and map variables - String localVarPath = "/payment-services/{payment_service_id}" - .replaceAll("\\{" + "payment_service_id" + "\\}", localVarApiClient.escapeString(paymentServiceId.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 = { - "application/json" - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - localVarHeaderParams.put("Content-Type", localVarContentType); - - String[] localVarAuthNames = new String[] { "BearerAuth" }; - return localVarApiClient.buildCall(localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call updatePaymentServiceValidateBeforeCall(String paymentServiceId, PaymentServiceUpdate paymentServiceUpdate, final ApiCallback _callback) throws ApiException { - - // verify the required parameter 'paymentServiceId' is set - if (paymentServiceId == null) { - throw new ApiException("Missing the required parameter 'paymentServiceId' when calling updatePaymentService(Async)"); - } - - - okhttp3.Call localVarCall = updatePaymentServiceCall(paymentServiceId, paymentServiceUpdate, _callback); - return localVarCall; - - } - - /** - * Update payment service - * Updates an existing payment service. Allows all fields to be changed except for the service ID. - * @param paymentServiceId The ID of the payment service. (required) - * @param paymentServiceUpdate (optional) - * @return PaymentService - * @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 Returns the updated payment service. -
400 Returns an error if the request was badly formatted or missing required fields. -
401 Returns an error if no valid authentication was provided. -
404 Returns an error if the resource can not be found. -
- */ - public PaymentService updatePaymentService(String paymentServiceId, PaymentServiceUpdate paymentServiceUpdate) throws ApiException { - ApiResponse localVarResp = updatePaymentServiceWithHttpInfo(paymentServiceId, paymentServiceUpdate); - return localVarResp.getData(); - } - - /** - * Update payment service - * Updates an existing payment service. Allows all fields to be changed except for the service ID. - * @param paymentServiceId The ID of the payment service. (required) - * @param paymentServiceUpdate (optional) - * @return ApiResponse<PaymentService> - * @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 Returns the updated payment service. -
400 Returns an error if the request was badly formatted or missing required fields. -
401 Returns an error if no valid authentication was provided. -
404 Returns an error if the resource can not be found. -
- */ - public ApiResponse updatePaymentServiceWithHttpInfo(String paymentServiceId, PaymentServiceUpdate paymentServiceUpdate) throws ApiException { - okhttp3.Call localVarCall = updatePaymentServiceValidateBeforeCall(paymentServiceId, paymentServiceUpdate, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Update payment service (asynchronously) - * Updates an existing payment service. Allows all fields to be changed except for the service ID. - * @param paymentServiceId The ID of the payment service. (required) - * @param paymentServiceUpdate (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
201 Returns the updated payment service. -
400 Returns an error if the request was badly formatted or missing required fields. -
401 Returns an error if no valid authentication was provided. -
404 Returns an error if the resource can not be found. -
- */ - public okhttp3.Call updatePaymentServiceAsync(String paymentServiceId, PaymentServiceUpdate paymentServiceUpdate, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = updatePaymentServiceValidateBeforeCall(paymentServiceId, paymentServiceUpdate, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/src/main/java/com/gr4vy/api/openapi/ReportsApi.java b/src/main/java/com/gr4vy/api/openapi/ReportsApi.java deleted file mode 100644 index b9d3e2c..0000000 --- a/src/main/java/com/gr4vy/api/openapi/ReportsApi.java +++ /dev/null @@ -1,1120 +0,0 @@ -/* - * Gr4vy API - * Welcome to the Gr4vy API reference documentation. Our API is still very much a work in product and subject to change. - * - * The version of the OpenAPI document: 1.1.0-beta - * Contact: code@gr4vy.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.gr4vy.api.openapi; - -import com.gr4vy.api.ApiCallback; -import com.gr4vy.api.ApiClient; -import com.gr4vy.api.ApiException; -import com.gr4vy.api.ApiResponse; -import com.gr4vy.api.Configuration; -import com.gr4vy.api.Pair; -import com.gr4vy.api.ProgressRequestBody; -import com.gr4vy.api.ProgressResponseBody; - -import com.google.gson.reflect.TypeToken; - -import java.io.IOException; - - -import com.gr4vy.api.model.Error401Unauthorized; -import com.gr4vy.api.model.Error404NotFound; -import com.gr4vy.api.model.ErrorGeneric; -import org.threeten.bp.OffsetDateTime; -import com.gr4vy.api.model.Report; -import com.gr4vy.api.model.ReportCreate; -import com.gr4vy.api.model.ReportExecution; -import com.gr4vy.api.model.ReportExecutionUrl; -import com.gr4vy.api.model.ReportExecutions; -import com.gr4vy.api.model.ReportUpdate; -import com.gr4vy.api.model.Reports; -import java.util.UUID; - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class ReportsApi { - private ApiClient localVarApiClient; - - public ReportsApi() { - this(Configuration.getDefaultApiClient()); - } - - public ReportsApi(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public ApiClient getApiClient() { - return localVarApiClient; - } - - public void setApiClient(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - /** - * Build call for generateDownloadUrl - * @param reportId The unique ID for a report. (required) - * @param reportExecutionId The unique ID for a report execution. (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 Returns the signed download URL of a report execution result and its expiration date and time. -
401 Returns an error if no valid authentication was provided. -
404 Returns an error if the resource can not be found. -
- */ - public okhttp3.Call generateDownloadUrlCall(UUID reportId, UUID reportExecutionId, final ApiCallback _callback) throws ApiException { - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/reports/{report_id}/executions/{report_execution_id}/url" - .replaceAll("\\{" + "report_id" + "\\}", localVarApiClient.escapeString(reportId.toString())) - .replaceAll("\\{" + "report_execution_id" + "\\}", localVarApiClient.escapeString(reportExecutionId.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); - localVarHeaderParams.put("Content-Type", localVarContentType); - - String[] localVarAuthNames = new String[] { "BearerAuth" }; - return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call generateDownloadUrlValidateBeforeCall(UUID reportId, UUID reportExecutionId, final ApiCallback _callback) throws ApiException { - - // verify the required parameter 'reportId' is set - if (reportId == null) { - throw new ApiException("Missing the required parameter 'reportId' when calling generateDownloadUrl(Async)"); - } - - // verify the required parameter 'reportExecutionId' is set - if (reportExecutionId == null) { - throw new ApiException("Missing the required parameter 'reportExecutionId' when calling generateDownloadUrl(Async)"); - } - - - okhttp3.Call localVarCall = generateDownloadUrlCall(reportId, reportExecutionId, _callback); - return localVarCall; - - } - - /** - * Generate report download URL - * Generates a temporary signed URL to download the result of a report execution. - * @param reportId The unique ID for a report. (required) - * @param reportExecutionId The unique ID for a report execution. (required) - * @return ReportExecutionUrl - * @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 Returns the signed download URL of a report execution result and its expiration date and time. -
401 Returns an error if no valid authentication was provided. -
404 Returns an error if the resource can not be found. -
- */ - public ReportExecutionUrl generateDownloadUrl(UUID reportId, UUID reportExecutionId) throws ApiException { - ApiResponse localVarResp = generateDownloadUrlWithHttpInfo(reportId, reportExecutionId); - return localVarResp.getData(); - } - - /** - * Generate report download URL - * Generates a temporary signed URL to download the result of a report execution. - * @param reportId The unique ID for a report. (required) - * @param reportExecutionId The unique ID for a report execution. (required) - * @return ApiResponse<ReportExecutionUrl> - * @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 Returns the signed download URL of a report execution result and its expiration date and time. -
401 Returns an error if no valid authentication was provided. -
404 Returns an error if the resource can not be found. -
- */ - public ApiResponse generateDownloadUrlWithHttpInfo(UUID reportId, UUID reportExecutionId) throws ApiException { - okhttp3.Call localVarCall = generateDownloadUrlValidateBeforeCall(reportId, reportExecutionId, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Generate report download URL (asynchronously) - * Generates a temporary signed URL to download the result of a report execution. - * @param reportId The unique ID for a report. (required) - * @param reportExecutionId The unique ID for a report execution. (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 Returns the signed download URL of a report execution result and its expiration date and time. -
401 Returns an error if no valid authentication was provided. -
404 Returns an error if the resource can not be found. -
- */ - public okhttp3.Call generateDownloadUrlAsync(UUID reportId, UUID reportExecutionId, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = generateDownloadUrlValidateBeforeCall(reportId, reportExecutionId, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for getReport - * @param reportId The unique ID for a report. (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 Returns a report. -
401 Returns an error if no valid authentication was provided. -
404 Returns an error if the resource can not be found. -
- */ - public okhttp3.Call getReportCall(UUID reportId, final ApiCallback _callback) throws ApiException { - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/reports/{report_id}" - .replaceAll("\\{" + "report_id" + "\\}", localVarApiClient.escapeString(reportId.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); - localVarHeaderParams.put("Content-Type", localVarContentType); - - String[] localVarAuthNames = new String[] { "BearerAuth" }; - return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call getReportValidateBeforeCall(UUID reportId, final ApiCallback _callback) throws ApiException { - - // verify the required parameter 'reportId' is set - if (reportId == null) { - throw new ApiException("Missing the required parameter 'reportId' when calling getReport(Async)"); - } - - - okhttp3.Call localVarCall = getReportCall(reportId, _callback); - return localVarCall; - - } - - /** - * Get report - * Retrieves the details of a single report. - * @param reportId The unique ID for a report. (required) - * @return Report - * @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 Returns a report. -
401 Returns an error if no valid authentication was provided. -
404 Returns an error if the resource can not be found. -
- */ - public Report getReport(UUID reportId) throws ApiException { - ApiResponse localVarResp = getReportWithHttpInfo(reportId); - return localVarResp.getData(); - } - - /** - * Get report - * Retrieves the details of a single report. - * @param reportId The unique ID for a report. (required) - * @return ApiResponse<Report> - * @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 Returns a report. -
401 Returns an error if no valid authentication was provided. -
404 Returns an error if the resource can not be found. -
- */ - public ApiResponse getReportWithHttpInfo(UUID reportId) throws ApiException { - okhttp3.Call localVarCall = getReportValidateBeforeCall(reportId, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Get report (asynchronously) - * Retrieves the details of a single report. - * @param reportId The unique ID for a report. (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 Returns a report. -
401 Returns an error if no valid authentication was provided. -
404 Returns an error if the resource can not be found. -
- */ - public okhttp3.Call getReportAsync(UUID reportId, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = getReportValidateBeforeCall(reportId, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for getReportExecution - * @param reportExecutionId The unique ID for a report execution. (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 Returns a report execution. -
401 Returns an error if no valid authentication was provided. -
404 Returns an error if the resource can not be found. -
- */ - public okhttp3.Call getReportExecutionCall(UUID reportExecutionId, final ApiCallback _callback) throws ApiException { - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/report-executions/{report_execution_id}" - .replaceAll("\\{" + "report_execution_id" + "\\}", localVarApiClient.escapeString(reportExecutionId.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); - localVarHeaderParams.put("Content-Type", localVarContentType); - - String[] localVarAuthNames = new String[] { "BearerAuth" }; - return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call getReportExecutionValidateBeforeCall(UUID reportExecutionId, final ApiCallback _callback) throws ApiException { - - // verify the required parameter 'reportExecutionId' is set - if (reportExecutionId == null) { - throw new ApiException("Missing the required parameter 'reportExecutionId' when calling getReportExecution(Async)"); - } - - - okhttp3.Call localVarCall = getReportExecutionCall(reportExecutionId, _callback); - return localVarCall; - - } - - /** - * Get report execution - * Retrieves the details of a single report execution. - * @param reportExecutionId The unique ID for a report execution. (required) - * @return ReportExecution - * @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 Returns a report execution. -
401 Returns an error if no valid authentication was provided. -
404 Returns an error if the resource can not be found. -
- */ - public ReportExecution getReportExecution(UUID reportExecutionId) throws ApiException { - ApiResponse localVarResp = getReportExecutionWithHttpInfo(reportExecutionId); - return localVarResp.getData(); - } - - /** - * Get report execution - * Retrieves the details of a single report execution. - * @param reportExecutionId The unique ID for a report execution. (required) - * @return ApiResponse<ReportExecution> - * @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 Returns a report execution. -
401 Returns an error if no valid authentication was provided. -
404 Returns an error if the resource can not be found. -
- */ - public ApiResponse getReportExecutionWithHttpInfo(UUID reportExecutionId) throws ApiException { - okhttp3.Call localVarCall = getReportExecutionValidateBeforeCall(reportExecutionId, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Get report execution (asynchronously) - * Retrieves the details of a single report execution. - * @param reportExecutionId The unique ID for a report execution. (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 Returns a report execution. -
401 Returns an error if no valid authentication was provided. -
404 Returns an error if the resource can not be found. -
- */ - public okhttp3.Call getReportExecutionAsync(UUID reportExecutionId, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = getReportExecutionValidateBeforeCall(reportExecutionId, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for listAllReportExecutions - * @param cursor A cursor that identifies the page of results to return. This is used to paginate the results of this API. For the first page of results, this parameter can be left out. For additional pages, use the value returned by the API in the `next_cursor` field. Similarly the `previous_cursor` can be used to reverse backwards in the list. (optional) - * @param limit Defines the maximum number of items to return for this request. (optional, default to 20) - * @param createdAtGte Filters the results to report executions created after this ISO date-time string. The time zone must be included. Ensure that the date-time string is URL encoded, e.g. `2022-01-01T12:00:00+08:00` must be encoded as `2022-01-01T12%3A00%3A00%2B08%3A00`. (optional) - * @param createdAtLte Filters the results to report executions created before this ISO date-time string. The time zone must be included. Ensure that the date-time string is URL encoded, e.g. `2022-01-01T12:00:00+08:00` must be encoded as `2022-01-01T12%3A00%3A00%2B08%3A00`. (optional) - * @param reportName Filters for executions of reports that have a matching `name` value. This filter is case-insensitive. Ensure that when necessary, the value you pass for this filter is URL encoded. (optional) - * @param status Filters for report executions that have a matching `status` value. This filter accepts multiple values. (optional) - * @param creatorId Filters the results to only match the reports that their `creator_id` matches with any of the provided creator IDs. (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 Returns a list of report executions. -
401 Returns an error if no valid authentication was provided. -
- */ - public okhttp3.Call listAllReportExecutionsCall(String cursor, Integer limit, OffsetDateTime createdAtGte, OffsetDateTime createdAtLte, String reportName, List status, List creatorId, final ApiCallback _callback) throws ApiException { - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/report-executions"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (cursor != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("cursor", cursor)); - } - - if (limit != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("limit", limit)); - } - - if (createdAtGte != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("created_at_gte", createdAtGte)); - } - - if (createdAtLte != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("created_at_lte", createdAtLte)); - } - - if (reportName != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("report_name", reportName)); - } - - if (status != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "status", status)); - } - - if (creatorId != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "creator_id", creatorId)); - } - - 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); - localVarHeaderParams.put("Content-Type", localVarContentType); - - String[] localVarAuthNames = new String[] { "BearerAuth" }; - return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call listAllReportExecutionsValidateBeforeCall(String cursor, Integer limit, OffsetDateTime createdAtGte, OffsetDateTime createdAtLte, String reportName, List status, List creatorId, final ApiCallback _callback) throws ApiException { - - - okhttp3.Call localVarCall = listAllReportExecutionsCall(cursor, limit, createdAtGte, createdAtLte, reportName, status, creatorId, _callback); - return localVarCall; - - } - - /** - * List all report executions - * Returns a list of executions belonging to any report. - * @param cursor A cursor that identifies the page of results to return. This is used to paginate the results of this API. For the first page of results, this parameter can be left out. For additional pages, use the value returned by the API in the `next_cursor` field. Similarly the `previous_cursor` can be used to reverse backwards in the list. (optional) - * @param limit Defines the maximum number of items to return for this request. (optional, default to 20) - * @param createdAtGte Filters the results to report executions created after this ISO date-time string. The time zone must be included. Ensure that the date-time string is URL encoded, e.g. `2022-01-01T12:00:00+08:00` must be encoded as `2022-01-01T12%3A00%3A00%2B08%3A00`. (optional) - * @param createdAtLte Filters the results to report executions created before this ISO date-time string. The time zone must be included. Ensure that the date-time string is URL encoded, e.g. `2022-01-01T12:00:00+08:00` must be encoded as `2022-01-01T12%3A00%3A00%2B08%3A00`. (optional) - * @param reportName Filters for executions of reports that have a matching `name` value. This filter is case-insensitive. Ensure that when necessary, the value you pass for this filter is URL encoded. (optional) - * @param status Filters for report executions that have a matching `status` value. This filter accepts multiple values. (optional) - * @param creatorId Filters the results to only match the reports that their `creator_id` matches with any of the provided creator IDs. (optional) - * @return ReportExecutions - * @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 Returns a list of report executions. -
401 Returns an error if no valid authentication was provided. -
- */ - public ReportExecutions listAllReportExecutions(String cursor, Integer limit, OffsetDateTime createdAtGte, OffsetDateTime createdAtLte, String reportName, List status, List creatorId) throws ApiException { - ApiResponse localVarResp = listAllReportExecutionsWithHttpInfo(cursor, limit, createdAtGte, createdAtLte, reportName, status, creatorId); - return localVarResp.getData(); - } - - /** - * List all report executions - * Returns a list of executions belonging to any report. - * @param cursor A cursor that identifies the page of results to return. This is used to paginate the results of this API. For the first page of results, this parameter can be left out. For additional pages, use the value returned by the API in the `next_cursor` field. Similarly the `previous_cursor` can be used to reverse backwards in the list. (optional) - * @param limit Defines the maximum number of items to return for this request. (optional, default to 20) - * @param createdAtGte Filters the results to report executions created after this ISO date-time string. The time zone must be included. Ensure that the date-time string is URL encoded, e.g. `2022-01-01T12:00:00+08:00` must be encoded as `2022-01-01T12%3A00%3A00%2B08%3A00`. (optional) - * @param createdAtLte Filters the results to report executions created before this ISO date-time string. The time zone must be included. Ensure that the date-time string is URL encoded, e.g. `2022-01-01T12:00:00+08:00` must be encoded as `2022-01-01T12%3A00%3A00%2B08%3A00`. (optional) - * @param reportName Filters for executions of reports that have a matching `name` value. This filter is case-insensitive. Ensure that when necessary, the value you pass for this filter is URL encoded. (optional) - * @param status Filters for report executions that have a matching `status` value. This filter accepts multiple values. (optional) - * @param creatorId Filters the results to only match the reports that their `creator_id` matches with any of the provided creator IDs. (optional) - * @return ApiResponse<ReportExecutions> - * @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 Returns a list of report executions. -
401 Returns an error if no valid authentication was provided. -
- */ - public ApiResponse listAllReportExecutionsWithHttpInfo(String cursor, Integer limit, OffsetDateTime createdAtGte, OffsetDateTime createdAtLte, String reportName, List status, List creatorId) throws ApiException { - okhttp3.Call localVarCall = listAllReportExecutionsValidateBeforeCall(cursor, limit, createdAtGte, createdAtLte, reportName, status, creatorId, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * List all report executions (asynchronously) - * Returns a list of executions belonging to any report. - * @param cursor A cursor that identifies the page of results to return. This is used to paginate the results of this API. For the first page of results, this parameter can be left out. For additional pages, use the value returned by the API in the `next_cursor` field. Similarly the `previous_cursor` can be used to reverse backwards in the list. (optional) - * @param limit Defines the maximum number of items to return for this request. (optional, default to 20) - * @param createdAtGte Filters the results to report executions created after this ISO date-time string. The time zone must be included. Ensure that the date-time string is URL encoded, e.g. `2022-01-01T12:00:00+08:00` must be encoded as `2022-01-01T12%3A00%3A00%2B08%3A00`. (optional) - * @param createdAtLte Filters the results to report executions created before this ISO date-time string. The time zone must be included. Ensure that the date-time string is URL encoded, e.g. `2022-01-01T12:00:00+08:00` must be encoded as `2022-01-01T12%3A00%3A00%2B08%3A00`. (optional) - * @param reportName Filters for executions of reports that have a matching `name` value. This filter is case-insensitive. Ensure that when necessary, the value you pass for this filter is URL encoded. (optional) - * @param status Filters for report executions that have a matching `status` value. This filter accepts multiple values. (optional) - * @param creatorId Filters the results to only match the reports that their `creator_id` matches with any of the provided creator IDs. (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 Returns a list of report executions. -
401 Returns an error if no valid authentication was provided. -
- */ - public okhttp3.Call listAllReportExecutionsAsync(String cursor, Integer limit, OffsetDateTime createdAtGte, OffsetDateTime createdAtLte, String reportName, List status, List creatorId, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = listAllReportExecutionsValidateBeforeCall(cursor, limit, createdAtGte, createdAtLte, reportName, status, creatorId, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for listReportExecutions - * @param reportId The unique ID for a report. (required) - * @param cursor A cursor that identifies the page of results to return. This is used to paginate the results of this API. For the first page of results, this parameter can be left out. For additional pages, use the value returned by the API in the `next_cursor` field. Similarly the `previous_cursor` can be used to reverse backwards in the list. (optional) - * @param limit Defines the maximum number of items to return for this request. (optional, default to 20) - * @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 Returns a list of executions for a report. -
401 Returns an error if no valid authentication was provided. -
- */ - public okhttp3.Call listReportExecutionsCall(UUID reportId, String cursor, Integer limit, final ApiCallback _callback) throws ApiException { - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/reports/{report_id}/executions" - .replaceAll("\\{" + "report_id" + "\\}", localVarApiClient.escapeString(reportId.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (cursor != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("cursor", cursor)); - } - - if (limit != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("limit", limit)); - } - - 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); - localVarHeaderParams.put("Content-Type", localVarContentType); - - String[] localVarAuthNames = new String[] { "BearerAuth" }; - return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call listReportExecutionsValidateBeforeCall(UUID reportId, String cursor, Integer limit, final ApiCallback _callback) throws ApiException { - - // verify the required parameter 'reportId' is set - if (reportId == null) { - throw new ApiException("Missing the required parameter 'reportId' when calling listReportExecutions(Async)"); - } - - - okhttp3.Call localVarCall = listReportExecutionsCall(reportId, cursor, limit, _callback); - return localVarCall; - - } - - /** - * List executions for report - * Returns a list of executions for a report. For a one-off report there will only be one, where for scheduled ones there may be more. - * @param reportId The unique ID for a report. (required) - * @param cursor A cursor that identifies the page of results to return. This is used to paginate the results of this API. For the first page of results, this parameter can be left out. For additional pages, use the value returned by the API in the `next_cursor` field. Similarly the `previous_cursor` can be used to reverse backwards in the list. (optional) - * @param limit Defines the maximum number of items to return for this request. (optional, default to 20) - * @return ReportExecutions - * @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 Returns a list of executions for a report. -
401 Returns an error if no valid authentication was provided. -
- */ - public ReportExecutions listReportExecutions(UUID reportId, String cursor, Integer limit) throws ApiException { - ApiResponse localVarResp = listReportExecutionsWithHttpInfo(reportId, cursor, limit); - return localVarResp.getData(); - } - - /** - * List executions for report - * Returns a list of executions for a report. For a one-off report there will only be one, where for scheduled ones there may be more. - * @param reportId The unique ID for a report. (required) - * @param cursor A cursor that identifies the page of results to return. This is used to paginate the results of this API. For the first page of results, this parameter can be left out. For additional pages, use the value returned by the API in the `next_cursor` field. Similarly the `previous_cursor` can be used to reverse backwards in the list. (optional) - * @param limit Defines the maximum number of items to return for this request. (optional, default to 20) - * @return ApiResponse<ReportExecutions> - * @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 Returns a list of executions for a report. -
401 Returns an error if no valid authentication was provided. -
- */ - public ApiResponse listReportExecutionsWithHttpInfo(UUID reportId, String cursor, Integer limit) throws ApiException { - okhttp3.Call localVarCall = listReportExecutionsValidateBeforeCall(reportId, cursor, limit, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * List executions for report (asynchronously) - * Returns a list of executions for a report. For a one-off report there will only be one, where for scheduled ones there may be more. - * @param reportId The unique ID for a report. (required) - * @param cursor A cursor that identifies the page of results to return. This is used to paginate the results of this API. For the first page of results, this parameter can be left out. For additional pages, use the value returned by the API in the `next_cursor` field. Similarly the `previous_cursor` can be used to reverse backwards in the list. (optional) - * @param limit Defines the maximum number of items to return for this request. (optional, default to 20) - * @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 Returns a list of executions for a report. -
401 Returns an error if no valid authentication was provided. -
- */ - public okhttp3.Call listReportExecutionsAsync(UUID reportId, String cursor, Integer limit, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = listReportExecutionsValidateBeforeCall(reportId, cursor, limit, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for listReports - * @param cursor A cursor that identifies the page of results to return. This is used to paginate the results of this API. For the first page of results, this parameter can be left out. For additional pages, use the value returned by the API in the `next_cursor` field. Similarly the `previous_cursor` can be used to reverse backwards in the list. (optional) - * @param limit Defines the maximum number of items to return for this request. (optional, default to 20) - * @param name Filters for reports that have a matching `name` value. This filter is case-insensitive. Ensure that when necessary, the value you pass for this filter is URL encoded. (optional) - * @param schedule Filters for reports that have matching `schedule` values. (optional) - * @param scheduleEnabled Filters for reports that have a matching `schedule_enabled` value. (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 Returns a list of reports. -
401 Returns an error if no valid authentication was provided. -
- */ - public okhttp3.Call listReportsCall(String cursor, Integer limit, String name, List schedule, Boolean scheduleEnabled, final ApiCallback _callback) throws ApiException { - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/reports"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (cursor != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("cursor", cursor)); - } - - if (limit != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("limit", limit)); - } - - if (name != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("name", name)); - } - - if (schedule != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "schedule", schedule)); - } - - if (scheduleEnabled != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("schedule_enabled", scheduleEnabled)); - } - - 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); - localVarHeaderParams.put("Content-Type", localVarContentType); - - String[] localVarAuthNames = new String[] { "BearerAuth" }; - return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call listReportsValidateBeforeCall(String cursor, Integer limit, String name, List schedule, Boolean scheduleEnabled, final ApiCallback _callback) throws ApiException { - - - okhttp3.Call localVarCall = listReportsCall(cursor, limit, name, schedule, scheduleEnabled, _callback); - return localVarCall; - - } - - /** - * List reports - * Returns a list of reports. - * @param cursor A cursor that identifies the page of results to return. This is used to paginate the results of this API. For the first page of results, this parameter can be left out. For additional pages, use the value returned by the API in the `next_cursor` field. Similarly the `previous_cursor` can be used to reverse backwards in the list. (optional) - * @param limit Defines the maximum number of items to return for this request. (optional, default to 20) - * @param name Filters for reports that have a matching `name` value. This filter is case-insensitive. Ensure that when necessary, the value you pass for this filter is URL encoded. (optional) - * @param schedule Filters for reports that have matching `schedule` values. (optional) - * @param scheduleEnabled Filters for reports that have a matching `schedule_enabled` value. (optional) - * @return Reports - * @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 Returns a list of reports. -
401 Returns an error if no valid authentication was provided. -
- */ - public Reports listReports(String cursor, Integer limit, String name, List schedule, Boolean scheduleEnabled) throws ApiException { - ApiResponse localVarResp = listReportsWithHttpInfo(cursor, limit, name, schedule, scheduleEnabled); - return localVarResp.getData(); - } - - /** - * List reports - * Returns a list of reports. - * @param cursor A cursor that identifies the page of results to return. This is used to paginate the results of this API. For the first page of results, this parameter can be left out. For additional pages, use the value returned by the API in the `next_cursor` field. Similarly the `previous_cursor` can be used to reverse backwards in the list. (optional) - * @param limit Defines the maximum number of items to return for this request. (optional, default to 20) - * @param name Filters for reports that have a matching `name` value. This filter is case-insensitive. Ensure that when necessary, the value you pass for this filter is URL encoded. (optional) - * @param schedule Filters for reports that have matching `schedule` values. (optional) - * @param scheduleEnabled Filters for reports that have a matching `schedule_enabled` value. (optional) - * @return ApiResponse<Reports> - * @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 Returns a list of reports. -
401 Returns an error if no valid authentication was provided. -
- */ - public ApiResponse listReportsWithHttpInfo(String cursor, Integer limit, String name, List schedule, Boolean scheduleEnabled) throws ApiException { - okhttp3.Call localVarCall = listReportsValidateBeforeCall(cursor, limit, name, schedule, scheduleEnabled, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * List reports (asynchronously) - * Returns a list of reports. - * @param cursor A cursor that identifies the page of results to return. This is used to paginate the results of this API. For the first page of results, this parameter can be left out. For additional pages, use the value returned by the API in the `next_cursor` field. Similarly the `previous_cursor` can be used to reverse backwards in the list. (optional) - * @param limit Defines the maximum number of items to return for this request. (optional, default to 20) - * @param name Filters for reports that have a matching `name` value. This filter is case-insensitive. Ensure that when necessary, the value you pass for this filter is URL encoded. (optional) - * @param schedule Filters for reports that have matching `schedule` values. (optional) - * @param scheduleEnabled Filters for reports that have a matching `schedule_enabled` value. (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 Returns a list of reports. -
401 Returns an error if no valid authentication was provided. -
- */ - public okhttp3.Call listReportsAsync(String cursor, Integer limit, String name, List schedule, Boolean scheduleEnabled, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = listReportsValidateBeforeCall(cursor, limit, name, schedule, scheduleEnabled, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for newReport - * @param reportCreate (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
201 Returns the report that was added. -
400 Returns an error if the request was badly formatted or missing required fields. -
401 Returns an error if no valid authentication was provided. -
- */ - public okhttp3.Call newReportCall(ReportCreate reportCreate, final ApiCallback _callback) throws ApiException { - Object localVarPostBody = reportCreate; - - // create path and map variables - String localVarPath = "/reports"; - - 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); - localVarHeaderParams.put("Content-Type", localVarContentType); - - String[] localVarAuthNames = new String[] { "BearerAuth" }; - return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call newReportValidateBeforeCall(ReportCreate reportCreate, final ApiCallback _callback) throws ApiException { - - - okhttp3.Call localVarCall = newReportCall(reportCreate, _callback); - return localVarCall; - - } - - /** - * New report - * Creates a new report. - * @param reportCreate (optional) - * @return Report - * @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 Returns the report that was added. -
400 Returns an error if the request was badly formatted or missing required fields. -
401 Returns an error if no valid authentication was provided. -
- */ - public Report newReport(ReportCreate reportCreate) throws ApiException { - ApiResponse localVarResp = newReportWithHttpInfo(reportCreate); - return localVarResp.getData(); - } - - /** - * New report - * Creates a new report. - * @param reportCreate (optional) - * @return ApiResponse<Report> - * @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 Returns the report that was added. -
400 Returns an error if the request was badly formatted or missing required fields. -
401 Returns an error if no valid authentication was provided. -
- */ - public ApiResponse newReportWithHttpInfo(ReportCreate reportCreate) throws ApiException { - okhttp3.Call localVarCall = newReportValidateBeforeCall(reportCreate, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * New report (asynchronously) - * Creates a new report. - * @param reportCreate (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
201 Returns the report that was added. -
400 Returns an error if the request was badly formatted or missing required fields. -
401 Returns an error if no valid authentication was provided. -
- */ - public okhttp3.Call newReportAsync(ReportCreate reportCreate, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = newReportValidateBeforeCall(reportCreate, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for updateReport - * @param reportId The unique ID for a report. (required) - * @param reportUpdate (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 Returns the updated report. -
400 Returns an error if the request was badly formatted or missing required fields. -
401 Returns an error if no valid authentication was provided. -
404 Returns an error if the resource can not be found. -
- */ - public okhttp3.Call updateReportCall(UUID reportId, ReportUpdate reportUpdate, final ApiCallback _callback) throws ApiException { - Object localVarPostBody = reportUpdate; - - // create path and map variables - String localVarPath = "/reports/{report_id}" - .replaceAll("\\{" + "report_id" + "\\}", localVarApiClient.escapeString(reportId.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 = { - "application/json" - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - localVarHeaderParams.put("Content-Type", localVarContentType); - - String[] localVarAuthNames = new String[] { "BearerAuth" }; - return localVarApiClient.buildCall(localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call updateReportValidateBeforeCall(UUID reportId, ReportUpdate reportUpdate, final ApiCallback _callback) throws ApiException { - - // verify the required parameter 'reportId' is set - if (reportId == null) { - throw new ApiException("Missing the required parameter 'reportId' when calling updateReport(Async)"); - } - - - okhttp3.Call localVarCall = updateReportCall(reportId, reportUpdate, _callback); - return localVarCall; - - } - - /** - * Update report - * Updates a report. This is mostly used with scheduled reports. - * @param reportId The unique ID for a report. (required) - * @param reportUpdate (optional) - * @return Report - * @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 Returns the updated report. -
400 Returns an error if the request was badly formatted or missing required fields. -
401 Returns an error if no valid authentication was provided. -
404 Returns an error if the resource can not be found. -
- */ - public Report updateReport(UUID reportId, ReportUpdate reportUpdate) throws ApiException { - ApiResponse localVarResp = updateReportWithHttpInfo(reportId, reportUpdate); - return localVarResp.getData(); - } - - /** - * Update report - * Updates a report. This is mostly used with scheduled reports. - * @param reportId The unique ID for a report. (required) - * @param reportUpdate (optional) - * @return ApiResponse<Report> - * @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 Returns the updated report. -
400 Returns an error if the request was badly formatted or missing required fields. -
401 Returns an error if no valid authentication was provided. -
404 Returns an error if the resource can not be found. -
- */ - public ApiResponse updateReportWithHttpInfo(UUID reportId, ReportUpdate reportUpdate) throws ApiException { - okhttp3.Call localVarCall = updateReportValidateBeforeCall(reportId, reportUpdate, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Update report (asynchronously) - * Updates a report. This is mostly used with scheduled reports. - * @param reportId The unique ID for a report. (required) - * @param reportUpdate (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 Returns the updated report. -
400 Returns an error if the request was badly formatted or missing required fields. -
401 Returns an error if no valid authentication was provided. -
404 Returns an error if the resource can not be found. -
- */ - public okhttp3.Call updateReportAsync(UUID reportId, ReportUpdate reportUpdate, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = updateReportValidateBeforeCall(reportId, reportUpdate, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/src/main/java/com/gr4vy/api/openapi/RolesApi.java b/src/main/java/com/gr4vy/api/openapi/RolesApi.java deleted file mode 100644 index 1c58765..0000000 --- a/src/main/java/com/gr4vy/api/openapi/RolesApi.java +++ /dev/null @@ -1,567 +0,0 @@ -/* - * Gr4vy API - * Welcome to the Gr4vy API reference documentation. Our API is still very much a work in product and subject to change. - * - * The version of the OpenAPI document: 1.1.0-beta - * Contact: code@gr4vy.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.gr4vy.api.openapi; - -import com.gr4vy.api.ApiCallback; -import com.gr4vy.api.ApiClient; -import com.gr4vy.api.ApiException; -import com.gr4vy.api.ApiResponse; -import com.gr4vy.api.Configuration; -import com.gr4vy.api.Pair; -import com.gr4vy.api.ProgressRequestBody; -import com.gr4vy.api.ProgressResponseBody; - -import com.google.gson.reflect.TypeToken; - -import java.io.IOException; - - -import com.gr4vy.api.model.Error401Unauthorized; -import com.gr4vy.api.model.Error404NotFound; -import com.gr4vy.api.model.Error409DuplicateRecord; -import com.gr4vy.api.model.ErrorGeneric; -import com.gr4vy.api.model.RoleAssignment; -import com.gr4vy.api.model.RoleAssignmentRequest; -import com.gr4vy.api.model.RoleAssignments; -import com.gr4vy.api.model.Roles; -import java.util.UUID; - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class RolesApi { - private ApiClient localVarApiClient; - - public RolesApi() { - this(Configuration.getDefaultApiClient()); - } - - public RolesApi(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public ApiClient getApiClient() { - return localVarApiClient; - } - - public void setApiClient(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - /** - * Build call for deleteRoleAssignment - * @param roleAssignmentId The unique ID for the role assignment. (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 Returns an empty response. -
401 Returns an error if no valid authentication was provided. -
404 Returns an error if the resource can not be found. -
- */ - public okhttp3.Call deleteRoleAssignmentCall(UUID roleAssignmentId, final ApiCallback _callback) throws ApiException { - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/roles/assignments/{role_assignment_id}" - .replaceAll("\\{" + "role_assignment_id" + "\\}", localVarApiClient.escapeString(roleAssignmentId.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); - localVarHeaderParams.put("Content-Type", localVarContentType); - - String[] localVarAuthNames = new String[] { "BearerAuth" }; - return localVarApiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call deleteRoleAssignmentValidateBeforeCall(UUID roleAssignmentId, final ApiCallback _callback) throws ApiException { - - // verify the required parameter 'roleAssignmentId' is set - if (roleAssignmentId == null) { - throw new ApiException("Missing the required parameter 'roleAssignmentId' when calling deleteRoleAssignment(Async)"); - } - - - okhttp3.Call localVarCall = deleteRoleAssignmentCall(roleAssignmentId, _callback); - return localVarCall; - - } - - /** - * Delete role assignment - * Deletes a role assignment. The associated assignee will no longer be assigned the role. - * @param roleAssignmentId The unique ID for the role assignment. (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 Returns an empty response. -
401 Returns an error if no valid authentication was provided. -
404 Returns an error if the resource can not be found. -
- */ - public void deleteRoleAssignment(UUID roleAssignmentId) throws ApiException { - deleteRoleAssignmentWithHttpInfo(roleAssignmentId); - } - - /** - * Delete role assignment - * Deletes a role assignment. The associated assignee will no longer be assigned the role. - * @param roleAssignmentId The unique ID for the role assignment. (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 Returns an empty response. -
401 Returns an error if no valid authentication was provided. -
404 Returns an error if the resource can not be found. -
- */ - public ApiResponse deleteRoleAssignmentWithHttpInfo(UUID roleAssignmentId) throws ApiException { - okhttp3.Call localVarCall = deleteRoleAssignmentValidateBeforeCall(roleAssignmentId, null); - return localVarApiClient.execute(localVarCall); - } - - /** - * Delete role assignment (asynchronously) - * Deletes a role assignment. The associated assignee will no longer be assigned the role. - * @param roleAssignmentId The unique ID for the role assignment. (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 Returns an empty response. -
401 Returns an error if no valid authentication was provided. -
404 Returns an error if the resource can not be found. -
- */ - public okhttp3.Call deleteRoleAssignmentAsync(UUID roleAssignmentId, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = deleteRoleAssignmentValidateBeforeCall(roleAssignmentId, _callback); - localVarApiClient.executeAsync(localVarCall, _callback); - return localVarCall; - } - /** - * Build call for listRoleAssignments - * @param roleId Filters for role assignments for the role that has a matching `id` value. (optional) - * @param assigneeType Filters for role assignments for the assignee of the given type. (optional) - * @param assigneeId Filters for role assignments for the assignee that has a matching `id` value. The `assignee_type` must also be specified. (optional) - * @param limit Defines the maximum number of items to return for this request. (optional, default to 20) - * @param cursor A cursor that identifies the page of results to return. This is used to paginate the results of this API. For the first page of results, this parameter can be left out. For additional pages, use the value returned by the API in the `next_cursor` field. Similarly the `previous_cursor` can be used to reverse backwards in the list. (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 Returns a list of role assignments. -
401 Returns an error if no valid authentication was provided. -
- */ - public okhttp3.Call listRoleAssignmentsCall(UUID roleId, String assigneeType, UUID assigneeId, Integer limit, String cursor, final ApiCallback _callback) throws ApiException { - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/roles/assignments"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (roleId != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("role_id", roleId)); - } - - if (assigneeType != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("assignee_type", assigneeType)); - } - - if (assigneeId != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("assignee_id", assigneeId)); - } - - if (limit != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("limit", limit)); - } - - if (cursor != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("cursor", cursor)); - } - - 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); - localVarHeaderParams.put("Content-Type", localVarContentType); - - String[] localVarAuthNames = new String[] { "BearerAuth" }; - return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call listRoleAssignmentsValidateBeforeCall(UUID roleId, String assigneeType, UUID assigneeId, Integer limit, String cursor, final ApiCallback _callback) throws ApiException { - - - okhttp3.Call localVarCall = listRoleAssignmentsCall(roleId, assigneeType, assigneeId, limit, cursor, _callback); - return localVarCall; - - } - - /** - * List role assignments - * Returns a list of role assignments. Role assignments can be filtered for a given role by providing the `role_id` search parameter, or for a given assignee by providing both the `assignee_type` and `assignee_id` parameters. - * @param roleId Filters for role assignments for the role that has a matching `id` value. (optional) - * @param assigneeType Filters for role assignments for the assignee of the given type. (optional) - * @param assigneeId Filters for role assignments for the assignee that has a matching `id` value. The `assignee_type` must also be specified. (optional) - * @param limit Defines the maximum number of items to return for this request. (optional, default to 20) - * @param cursor A cursor that identifies the page of results to return. This is used to paginate the results of this API. For the first page of results, this parameter can be left out. For additional pages, use the value returned by the API in the `next_cursor` field. Similarly the `previous_cursor` can be used to reverse backwards in the list. (optional) - * @return RoleAssignments - * @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 Returns a list of role assignments. -
401 Returns an error if no valid authentication was provided. -
- */ - public RoleAssignments listRoleAssignments(UUID roleId, String assigneeType, UUID assigneeId, Integer limit, String cursor) throws ApiException { - ApiResponse localVarResp = listRoleAssignmentsWithHttpInfo(roleId, assigneeType, assigneeId, limit, cursor); - return localVarResp.getData(); - } - - /** - * List role assignments - * Returns a list of role assignments. Role assignments can be filtered for a given role by providing the `role_id` search parameter, or for a given assignee by providing both the `assignee_type` and `assignee_id` parameters. - * @param roleId Filters for role assignments for the role that has a matching `id` value. (optional) - * @param assigneeType Filters for role assignments for the assignee of the given type. (optional) - * @param assigneeId Filters for role assignments for the assignee that has a matching `id` value. The `assignee_type` must also be specified. (optional) - * @param limit Defines the maximum number of items to return for this request. (optional, default to 20) - * @param cursor A cursor that identifies the page of results to return. This is used to paginate the results of this API. For the first page of results, this parameter can be left out. For additional pages, use the value returned by the API in the `next_cursor` field. Similarly the `previous_cursor` can be used to reverse backwards in the list. (optional) - * @return ApiResponse<RoleAssignments> - * @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 Returns a list of role assignments. -
401 Returns an error if no valid authentication was provided. -
- */ - public ApiResponse listRoleAssignmentsWithHttpInfo(UUID roleId, String assigneeType, UUID assigneeId, Integer limit, String cursor) throws ApiException { - okhttp3.Call localVarCall = listRoleAssignmentsValidateBeforeCall(roleId, assigneeType, assigneeId, limit, cursor, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * List role assignments (asynchronously) - * Returns a list of role assignments. Role assignments can be filtered for a given role by providing the `role_id` search parameter, or for a given assignee by providing both the `assignee_type` and `assignee_id` parameters. - * @param roleId Filters for role assignments for the role that has a matching `id` value. (optional) - * @param assigneeType Filters for role assignments for the assignee of the given type. (optional) - * @param assigneeId Filters for role assignments for the assignee that has a matching `id` value. The `assignee_type` must also be specified. (optional) - * @param limit Defines the maximum number of items to return for this request. (optional, default to 20) - * @param cursor A cursor that identifies the page of results to return. This is used to paginate the results of this API. For the first page of results, this parameter can be left out. For additional pages, use the value returned by the API in the `next_cursor` field. Similarly the `previous_cursor` can be used to reverse backwards in the list. (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 Returns a list of role assignments. -
401 Returns an error if no valid authentication was provided. -
- */ - public okhttp3.Call listRoleAssignmentsAsync(UUID roleId, String assigneeType, UUID assigneeId, Integer limit, String cursor, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = listRoleAssignmentsValidateBeforeCall(roleId, assigneeType, assigneeId, limit, cursor, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for listRoles - * @param limit Defines the maximum number of items to return for this request. (optional, default to 20) - * @param cursor A cursor that identifies the page of results to return. This is used to paginate the results of this API. For the first page of results, this parameter can be left out. For additional pages, use the value returned by the API in the `next_cursor` field. Similarly the `previous_cursor` can be used to reverse backwards in the list. (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 Returns a list of roles. -
401 Returns an error if no valid authentication was provided. -
- */ - public okhttp3.Call listRolesCall(Integer limit, String cursor, final ApiCallback _callback) throws ApiException { - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/roles"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (limit != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("limit", limit)); - } - - if (cursor != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("cursor", cursor)); - } - - 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); - localVarHeaderParams.put("Content-Type", localVarContentType); - - String[] localVarAuthNames = new String[] { "BearerAuth" }; - return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call listRolesValidateBeforeCall(Integer limit, String cursor, final ApiCallback _callback) throws ApiException { - - - okhttp3.Call localVarCall = listRolesCall(limit, cursor, _callback); - return localVarCall; - - } - - /** - * List roles - * Returns a list of roles. - * @param limit Defines the maximum number of items to return for this request. (optional, default to 20) - * @param cursor A cursor that identifies the page of results to return. This is used to paginate the results of this API. For the first page of results, this parameter can be left out. For additional pages, use the value returned by the API in the `next_cursor` field. Similarly the `previous_cursor` can be used to reverse backwards in the list. (optional) - * @return Roles - * @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 Returns a list of roles. -
401 Returns an error if no valid authentication was provided. -
- */ - public Roles listRoles(Integer limit, String cursor) throws ApiException { - ApiResponse localVarResp = listRolesWithHttpInfo(limit, cursor); - return localVarResp.getData(); - } - - /** - * List roles - * Returns a list of roles. - * @param limit Defines the maximum number of items to return for this request. (optional, default to 20) - * @param cursor A cursor that identifies the page of results to return. This is used to paginate the results of this API. For the first page of results, this parameter can be left out. For additional pages, use the value returned by the API in the `next_cursor` field. Similarly the `previous_cursor` can be used to reverse backwards in the list. (optional) - * @return ApiResponse<Roles> - * @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 Returns a list of roles. -
401 Returns an error if no valid authentication was provided. -
- */ - public ApiResponse listRolesWithHttpInfo(Integer limit, String cursor) throws ApiException { - okhttp3.Call localVarCall = listRolesValidateBeforeCall(limit, cursor, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * List roles (asynchronously) - * Returns a list of roles. - * @param limit Defines the maximum number of items to return for this request. (optional, default to 20) - * @param cursor A cursor that identifies the page of results to return. This is used to paginate the results of this API. For the first page of results, this parameter can be left out. For additional pages, use the value returned by the API in the `next_cursor` field. Similarly the `previous_cursor` can be used to reverse backwards in the list. (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 Returns a list of roles. -
401 Returns an error if no valid authentication was provided. -
- */ - public okhttp3.Call listRolesAsync(Integer limit, String cursor, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = listRolesValidateBeforeCall(limit, cursor, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for newRoleAssignment - * @param roleAssignmentRequest (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
201 Returns the role assignment that was added. -
400 Returns an error if the request was badly formatted or missing required fields. -
401 Returns an error if no valid authentication was provided. -
409 Returns an error if duplicate resource has been found. -
- */ - public okhttp3.Call newRoleAssignmentCall(RoleAssignmentRequest roleAssignmentRequest, final ApiCallback _callback) throws ApiException { - Object localVarPostBody = roleAssignmentRequest; - - // create path and map variables - String localVarPath = "/roles/assignments"; - - 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); - localVarHeaderParams.put("Content-Type", localVarContentType); - - String[] localVarAuthNames = new String[] { "BearerAuth" }; - return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call newRoleAssignmentValidateBeforeCall(RoleAssignmentRequest roleAssignmentRequest, final ApiCallback _callback) throws ApiException { - - - okhttp3.Call localVarCall = newRoleAssignmentCall(roleAssignmentRequest, _callback); - return localVarCall; - - } - - /** - * New role assignment - * Adds a role assignment, in effect applying a role to the given assignee. - * @param roleAssignmentRequest (optional) - * @return RoleAssignment - * @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 Returns the role assignment that was added. -
400 Returns an error if the request was badly formatted or missing required fields. -
401 Returns an error if no valid authentication was provided. -
409 Returns an error if duplicate resource has been found. -
- */ - public RoleAssignment newRoleAssignment(RoleAssignmentRequest roleAssignmentRequest) throws ApiException { - ApiResponse localVarResp = newRoleAssignmentWithHttpInfo(roleAssignmentRequest); - return localVarResp.getData(); - } - - /** - * New role assignment - * Adds a role assignment, in effect applying a role to the given assignee. - * @param roleAssignmentRequest (optional) - * @return ApiResponse<RoleAssignment> - * @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 Returns the role assignment that was added. -
400 Returns an error if the request was badly formatted or missing required fields. -
401 Returns an error if no valid authentication was provided. -
409 Returns an error if duplicate resource has been found. -
- */ - public ApiResponse newRoleAssignmentWithHttpInfo(RoleAssignmentRequest roleAssignmentRequest) throws ApiException { - okhttp3.Call localVarCall = newRoleAssignmentValidateBeforeCall(roleAssignmentRequest, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * New role assignment (asynchronously) - * Adds a role assignment, in effect applying a role to the given assignee. - * @param roleAssignmentRequest (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
201 Returns the role assignment that was added. -
400 Returns an error if the request was badly formatted or missing required fields. -
401 Returns an error if no valid authentication was provided. -
409 Returns an error if duplicate resource has been found. -
- */ - public okhttp3.Call newRoleAssignmentAsync(RoleAssignmentRequest roleAssignmentRequest, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = newRoleAssignmentValidateBeforeCall(roleAssignmentRequest, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/src/main/java/com/gr4vy/api/openapi/TokensApi.java b/src/main/java/com/gr4vy/api/openapi/TokensApi.java deleted file mode 100644 index c8a1c4f..0000000 --- a/src/main/java/com/gr4vy/api/openapi/TokensApi.java +++ /dev/null @@ -1,1239 +0,0 @@ -/* - * Gr4vy API - * Welcome to the Gr4vy API reference documentation. Our API is still very much a work in product and subject to change. - * - * The version of the OpenAPI document: 1.1.0-beta - * Contact: code@gr4vy.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.gr4vy.api.openapi; - -import com.gr4vy.api.ApiCallback; -import com.gr4vy.api.ApiClient; -import com.gr4vy.api.ApiException; -import com.gr4vy.api.ApiResponse; -import com.gr4vy.api.Configuration; -import com.gr4vy.api.Pair; -import com.gr4vy.api.ProgressRequestBody; -import com.gr4vy.api.ProgressResponseBody; - -import com.google.gson.reflect.TypeToken; - -import java.io.IOException; - - -import com.gr4vy.api.model.Cryptogram; -import com.gr4vy.api.model.Error400BadRequest; -import com.gr4vy.api.model.Error401Unauthorized; -import com.gr4vy.api.model.Error404NotFound; -import com.gr4vy.api.model.ErrorGeneric; -import com.gr4vy.api.model.IssueCryptogramRequest; -import com.gr4vy.api.model.NetworkToken; -import com.gr4vy.api.model.NetworkTokenRequest; -import com.gr4vy.api.model.NetworkTokens; -import com.gr4vy.api.model.PaymentServiceToken; -import com.gr4vy.api.model.PaymentServiceTokenRequest; -import com.gr4vy.api.model.PaymentServiceTokens; -import java.util.UUID; - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class TokensApi { - private ApiClient localVarApiClient; - - public TokensApi() { - this(Configuration.getDefaultApiClient()); - } - - public TokensApi(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public ApiClient getApiClient() { - return localVarApiClient; - } - - public void setApiClient(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - /** - * Build call for deleteNetworkToken - * @param paymentMethodId The ID of the payment method. (required) - * @param networkTokenId The ID of the network 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
204 Returns an empty response. -
401 Returns an error if no valid authentication was provided. -
404 Returns an error if the resource can not be found. -
- */ - public okhttp3.Call deleteNetworkTokenCall(UUID paymentMethodId, UUID networkTokenId, final ApiCallback _callback) throws ApiException { - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/payment-methods/{payment_method_id}/network-tokens/{network_token_id}" - .replaceAll("\\{" + "payment_method_id" + "\\}", localVarApiClient.escapeString(paymentMethodId.toString())) - .replaceAll("\\{" + "network_token_id" + "\\}", localVarApiClient.escapeString(networkTokenId.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); - localVarHeaderParams.put("Content-Type", localVarContentType); - - String[] localVarAuthNames = new String[] { "BearerAuth" }; - return localVarApiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call deleteNetworkTokenValidateBeforeCall(UUID paymentMethodId, UUID networkTokenId, final ApiCallback _callback) throws ApiException { - - // verify the required parameter 'paymentMethodId' is set - if (paymentMethodId == null) { - throw new ApiException("Missing the required parameter 'paymentMethodId' when calling deleteNetworkToken(Async)"); - } - - // verify the required parameter 'networkTokenId' is set - if (networkTokenId == null) { - throw new ApiException("Missing the required parameter 'networkTokenId' when calling deleteNetworkToken(Async)"); - } - - - okhttp3.Call localVarCall = deleteNetworkTokenCall(paymentMethodId, networkTokenId, _callback); - return localVarCall; - - } - - /** - * Delete network token - * Deletes a specific network token. - * @param paymentMethodId The ID of the payment method. (required) - * @param networkTokenId The ID of the network token. (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 Returns an empty response. -
401 Returns an error if no valid authentication was provided. -
404 Returns an error if the resource can not be found. -
- */ - public void deleteNetworkToken(UUID paymentMethodId, UUID networkTokenId) throws ApiException { - deleteNetworkTokenWithHttpInfo(paymentMethodId, networkTokenId); - } - - /** - * Delete network token - * Deletes a specific network token. - * @param paymentMethodId The ID of the payment method. (required) - * @param networkTokenId The ID of the network token. (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 Returns an empty response. -
401 Returns an error if no valid authentication was provided. -
404 Returns an error if the resource can not be found. -
- */ - public ApiResponse deleteNetworkTokenWithHttpInfo(UUID paymentMethodId, UUID networkTokenId) throws ApiException { - okhttp3.Call localVarCall = deleteNetworkTokenValidateBeforeCall(paymentMethodId, networkTokenId, null); - return localVarApiClient.execute(localVarCall); - } - - /** - * Delete network token (asynchronously) - * Deletes a specific network token. - * @param paymentMethodId The ID of the payment method. (required) - * @param networkTokenId The ID of the network 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
204 Returns an empty response. -
401 Returns an error if no valid authentication was provided. -
404 Returns an error if the resource can not be found. -
- */ - public okhttp3.Call deleteNetworkTokenAsync(UUID paymentMethodId, UUID networkTokenId, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = deleteNetworkTokenValidateBeforeCall(paymentMethodId, networkTokenId, _callback); - localVarApiClient.executeAsync(localVarCall, _callback); - return localVarCall; - } - /** - * Build call for deletePaymentServiceToken - * @param paymentMethodId The ID of the payment method. (required) - * @param paymentServiceTokenId The ID of the payment service 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
204 Returns an empty response. -
401 Returns an error if no valid authentication was provided. -
404 Returns an error if the resource can not be found. -
- */ - public okhttp3.Call deletePaymentServiceTokenCall(UUID paymentMethodId, UUID paymentServiceTokenId, final ApiCallback _callback) throws ApiException { - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/payment-methods/{payment_method_id}/payment-service-tokens/{payment_service_token_id}" - .replaceAll("\\{" + "payment_method_id" + "\\}", localVarApiClient.escapeString(paymentMethodId.toString())) - .replaceAll("\\{" + "payment_service_token_id" + "\\}", localVarApiClient.escapeString(paymentServiceTokenId.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); - localVarHeaderParams.put("Content-Type", localVarContentType); - - String[] localVarAuthNames = new String[] { "BearerAuth" }; - return localVarApiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call deletePaymentServiceTokenValidateBeforeCall(UUID paymentMethodId, UUID paymentServiceTokenId, final ApiCallback _callback) throws ApiException { - - // verify the required parameter 'paymentMethodId' is set - if (paymentMethodId == null) { - throw new ApiException("Missing the required parameter 'paymentMethodId' when calling deletePaymentServiceToken(Async)"); - } - - // verify the required parameter 'paymentServiceTokenId' is set - if (paymentServiceTokenId == null) { - throw new ApiException("Missing the required parameter 'paymentServiceTokenId' when calling deletePaymentServiceToken(Async)"); - } - - - okhttp3.Call localVarCall = deletePaymentServiceTokenCall(paymentMethodId, paymentServiceTokenId, _callback); - return localVarCall; - - } - - /** - * Delete payment service token - * Deletes a specific payment service token. - * @param paymentMethodId The ID of the payment method. (required) - * @param paymentServiceTokenId The ID of the payment service token. (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 Returns an empty response. -
401 Returns an error if no valid authentication was provided. -
404 Returns an error if the resource can not be found. -
- */ - public void deletePaymentServiceToken(UUID paymentMethodId, UUID paymentServiceTokenId) throws ApiException { - deletePaymentServiceTokenWithHttpInfo(paymentMethodId, paymentServiceTokenId); - } - - /** - * Delete payment service token - * Deletes a specific payment service token. - * @param paymentMethodId The ID of the payment method. (required) - * @param paymentServiceTokenId The ID of the payment service token. (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 Returns an empty response. -
401 Returns an error if no valid authentication was provided. -
404 Returns an error if the resource can not be found. -
- */ - public ApiResponse deletePaymentServiceTokenWithHttpInfo(UUID paymentMethodId, UUID paymentServiceTokenId) throws ApiException { - okhttp3.Call localVarCall = deletePaymentServiceTokenValidateBeforeCall(paymentMethodId, paymentServiceTokenId, null); - return localVarApiClient.execute(localVarCall); - } - - /** - * Delete payment service token (asynchronously) - * Deletes a specific payment service token. - * @param paymentMethodId The ID of the payment method. (required) - * @param paymentServiceTokenId The ID of the payment service 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
204 Returns an empty response. -
401 Returns an error if no valid authentication was provided. -
404 Returns an error if the resource can not be found. -
- */ - public okhttp3.Call deletePaymentServiceTokenAsync(UUID paymentMethodId, UUID paymentServiceTokenId, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = deletePaymentServiceTokenValidateBeforeCall(paymentMethodId, paymentServiceTokenId, _callback); - localVarApiClient.executeAsync(localVarCall, _callback); - return localVarCall; - } - /** - * Build call for getNetworkTokens - * @param paymentMethodId The ID of the payment method. (required) - * @param paymentMethodId2 Filters for transactions that have a payment method with an ID that matches exactly with the provided value. (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 Returns a list of network tokens (empty list if there aren't any). -
401 Returns an error if no valid authentication was provided. -
404 Returns an error if the resource can not be found. -
- */ - public okhttp3.Call getNetworkTokensCall(UUID paymentMethodId, UUID paymentMethodId2, final ApiCallback _callback) throws ApiException { - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/payment-methods/{payment_method_id}/network-tokens" - .replaceAll("\\{" + "payment_method_id" + "\\}", localVarApiClient.escapeString(paymentMethodId.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (paymentMethodId2 != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("payment_method_id", paymentMethodId2)); - } - - 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); - localVarHeaderParams.put("Content-Type", localVarContentType); - - String[] localVarAuthNames = new String[] { "BearerAuth" }; - return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call getNetworkTokensValidateBeforeCall(UUID paymentMethodId, UUID paymentMethodId2, final ApiCallback _callback) throws ApiException { - - // verify the required parameter 'paymentMethodId' is set - if (paymentMethodId == null) { - throw new ApiException("Missing the required parameter 'paymentMethodId' when calling getNetworkTokens(Async)"); - } - - - okhttp3.Call localVarCall = getNetworkTokensCall(paymentMethodId, paymentMethodId2, _callback); - return localVarCall; - - } - - /** - * Get network tokens - * Get stored network tokens for the given payment method. - * @param paymentMethodId The ID of the payment method. (required) - * @param paymentMethodId2 Filters for transactions that have a payment method with an ID that matches exactly with the provided value. (optional) - * @return NetworkTokens - * @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 Returns a list of network tokens (empty list if there aren't any). -
401 Returns an error if no valid authentication was provided. -
404 Returns an error if the resource can not be found. -
- */ - public NetworkTokens getNetworkTokens(UUID paymentMethodId, UUID paymentMethodId2) throws ApiException { - ApiResponse localVarResp = getNetworkTokensWithHttpInfo(paymentMethodId, paymentMethodId2); - return localVarResp.getData(); - } - - /** - * Get network tokens - * Get stored network tokens for the given payment method. - * @param paymentMethodId The ID of the payment method. (required) - * @param paymentMethodId2 Filters for transactions that have a payment method with an ID that matches exactly with the provided value. (optional) - * @return ApiResponse<NetworkTokens> - * @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 Returns a list of network tokens (empty list if there aren't any). -
401 Returns an error if no valid authentication was provided. -
404 Returns an error if the resource can not be found. -
- */ - public ApiResponse getNetworkTokensWithHttpInfo(UUID paymentMethodId, UUID paymentMethodId2) throws ApiException { - okhttp3.Call localVarCall = getNetworkTokensValidateBeforeCall(paymentMethodId, paymentMethodId2, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Get network tokens (asynchronously) - * Get stored network tokens for the given payment method. - * @param paymentMethodId The ID of the payment method. (required) - * @param paymentMethodId2 Filters for transactions that have a payment method with an ID that matches exactly with the provided value. (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 Returns a list of network tokens (empty list if there aren't any). -
401 Returns an error if no valid authentication was provided. -
404 Returns an error if the resource can not be found. -
- */ - public okhttp3.Call getNetworkTokensAsync(UUID paymentMethodId, UUID paymentMethodId2, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = getNetworkTokensValidateBeforeCall(paymentMethodId, paymentMethodId2, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for getPaymentServiceTokens - * @param paymentMethodId The ID of the payment method. (required) - * @param paymentMethodId2 Filters for transactions that have a payment method with an ID that matches exactly with the provided value. (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 Returns a list payment service tokens of the specified payment method and payment service. -
401 Returns an error if no valid authentication was provided. -
404 Returns an error if the resource can not be found. -
- */ - public okhttp3.Call getPaymentServiceTokensCall(UUID paymentMethodId, UUID paymentMethodId2, final ApiCallback _callback) throws ApiException { - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/payment-methods/{payment_method_id}/payment-service-tokens" - .replaceAll("\\{" + "payment_method_id" + "\\}", localVarApiClient.escapeString(paymentMethodId.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (paymentMethodId2 != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("payment_method_id", paymentMethodId2)); - } - - 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); - localVarHeaderParams.put("Content-Type", localVarContentType); - - String[] localVarAuthNames = new String[] { "BearerAuth" }; - return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call getPaymentServiceTokensValidateBeforeCall(UUID paymentMethodId, UUID paymentMethodId2, final ApiCallback _callback) throws ApiException { - - // verify the required parameter 'paymentMethodId' is set - if (paymentMethodId == null) { - throw new ApiException("Missing the required parameter 'paymentMethodId' when calling getPaymentServiceTokens(Async)"); - } - - - okhttp3.Call localVarCall = getPaymentServiceTokensCall(paymentMethodId, paymentMethodId2, _callback); - return localVarCall; - - } - - /** - * Get payment service tokens - * Get all payment service tokens for a given payment method and payment service. - * @param paymentMethodId The ID of the payment method. (required) - * @param paymentMethodId2 Filters for transactions that have a payment method with an ID that matches exactly with the provided value. (optional) - * @return PaymentServiceTokens - * @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 Returns a list payment service tokens of the specified payment method and payment service. -
401 Returns an error if no valid authentication was provided. -
404 Returns an error if the resource can not be found. -
- */ - public PaymentServiceTokens getPaymentServiceTokens(UUID paymentMethodId, UUID paymentMethodId2) throws ApiException { - ApiResponse localVarResp = getPaymentServiceTokensWithHttpInfo(paymentMethodId, paymentMethodId2); - return localVarResp.getData(); - } - - /** - * Get payment service tokens - * Get all payment service tokens for a given payment method and payment service. - * @param paymentMethodId The ID of the payment method. (required) - * @param paymentMethodId2 Filters for transactions that have a payment method with an ID that matches exactly with the provided value. (optional) - * @return ApiResponse<PaymentServiceTokens> - * @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 Returns a list payment service tokens of the specified payment method and payment service. -
401 Returns an error if no valid authentication was provided. -
404 Returns an error if the resource can not be found. -
- */ - public ApiResponse getPaymentServiceTokensWithHttpInfo(UUID paymentMethodId, UUID paymentMethodId2) throws ApiException { - okhttp3.Call localVarCall = getPaymentServiceTokensValidateBeforeCall(paymentMethodId, paymentMethodId2, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Get payment service tokens (asynchronously) - * Get all payment service tokens for a given payment method and payment service. - * @param paymentMethodId The ID of the payment method. (required) - * @param paymentMethodId2 Filters for transactions that have a payment method with an ID that matches exactly with the provided value. (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 Returns a list payment service tokens of the specified payment method and payment service. -
401 Returns an error if no valid authentication was provided. -
404 Returns an error if the resource can not be found. -
- */ - public okhttp3.Call getPaymentServiceTokensAsync(UUID paymentMethodId, UUID paymentMethodId2, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = getPaymentServiceTokensValidateBeforeCall(paymentMethodId, paymentMethodId2, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for issueCryptogram - * @param paymentMethodId The ID of the payment method. (required) - * @param networkTokenId The ID of the network token. (required) - * @param issueCryptogramRequest (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
201 Returns the created network token. -
400 Returns an error if the request was badly formatted or missing required fields. It also returns an error if the requested network token has a status other than `active`. -
401 Returns an error if no valid authentication was provided. -
404 Returns an error if the resource can not be found. -
- */ - public okhttp3.Call issueCryptogramCall(UUID paymentMethodId, UUID networkTokenId, IssueCryptogramRequest issueCryptogramRequest, final ApiCallback _callback) throws ApiException { - Object localVarPostBody = issueCryptogramRequest; - - // create path and map variables - String localVarPath = "/payment-methods/{payment_method_id}/network-tokens/{network_token_id}/cryptogram" - .replaceAll("\\{" + "payment_method_id" + "\\}", localVarApiClient.escapeString(paymentMethodId.toString())) - .replaceAll("\\{" + "network_token_id" + "\\}", localVarApiClient.escapeString(networkTokenId.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 = { - "application/json" - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - localVarHeaderParams.put("Content-Type", localVarContentType); - - String[] localVarAuthNames = new String[] { "BearerAuth" }; - return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call issueCryptogramValidateBeforeCall(UUID paymentMethodId, UUID networkTokenId, IssueCryptogramRequest issueCryptogramRequest, final ApiCallback _callback) throws ApiException { - - // verify the required parameter 'paymentMethodId' is set - if (paymentMethodId == null) { - throw new ApiException("Missing the required parameter 'paymentMethodId' when calling issueCryptogram(Async)"); - } - - // verify the required parameter 'networkTokenId' is set - if (networkTokenId == null) { - throw new ApiException("Missing the required parameter 'networkTokenId' when calling issueCryptogram(Async)"); - } - - - okhttp3.Call localVarCall = issueCryptogramCall(paymentMethodId, networkTokenId, issueCryptogramRequest, _callback); - return localVarCall; - - } - - /** - * Issue cryptogram - * Issue a cryptogram for a stored network token of a stored card. - * @param paymentMethodId The ID of the payment method. (required) - * @param networkTokenId The ID of the network token. (required) - * @param issueCryptogramRequest (optional) - * @return Cryptogram - * @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 Returns the created network token. -
400 Returns an error if the request was badly formatted or missing required fields. It also returns an error if the requested network token has a status other than `active`. -
401 Returns an error if no valid authentication was provided. -
404 Returns an error if the resource can not be found. -
- */ - public Cryptogram issueCryptogram(UUID paymentMethodId, UUID networkTokenId, IssueCryptogramRequest issueCryptogramRequest) throws ApiException { - ApiResponse localVarResp = issueCryptogramWithHttpInfo(paymentMethodId, networkTokenId, issueCryptogramRequest); - return localVarResp.getData(); - } - - /** - * Issue cryptogram - * Issue a cryptogram for a stored network token of a stored card. - * @param paymentMethodId The ID of the payment method. (required) - * @param networkTokenId The ID of the network token. (required) - * @param issueCryptogramRequest (optional) - * @return ApiResponse<Cryptogram> - * @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 Returns the created network token. -
400 Returns an error if the request was badly formatted or missing required fields. It also returns an error if the requested network token has a status other than `active`. -
401 Returns an error if no valid authentication was provided. -
404 Returns an error if the resource can not be found. -
- */ - public ApiResponse issueCryptogramWithHttpInfo(UUID paymentMethodId, UUID networkTokenId, IssueCryptogramRequest issueCryptogramRequest) throws ApiException { - okhttp3.Call localVarCall = issueCryptogramValidateBeforeCall(paymentMethodId, networkTokenId, issueCryptogramRequest, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Issue cryptogram (asynchronously) - * Issue a cryptogram for a stored network token of a stored card. - * @param paymentMethodId The ID of the payment method. (required) - * @param networkTokenId The ID of the network token. (required) - * @param issueCryptogramRequest (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
201 Returns the created network token. -
400 Returns an error if the request was badly formatted or missing required fields. It also returns an error if the requested network token has a status other than `active`. -
401 Returns an error if no valid authentication was provided. -
404 Returns an error if the resource can not be found. -
- */ - public okhttp3.Call issueCryptogramAsync(UUID paymentMethodId, UUID networkTokenId, IssueCryptogramRequest issueCryptogramRequest, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = issueCryptogramValidateBeforeCall(paymentMethodId, networkTokenId, issueCryptogramRequest, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for provisionNetworkToken - * @param paymentMethodId The ID of the payment method. (required) - * @param networkTokenRequest (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
201 Returns the created network token. -
400 Returns if any of the validations below fails: - network token already exists for the `payment_method_id`. - `security_code` or `merchant_initiated` or `is_subsequent_payment` is not provided. - `merchant_initiated` is set to `false` but `security_code` is not provided. - `merchant_initiated` is set to `true` but `is_subsequent_payment` is set to `false`. - payment method is not a card. - Network token provider responds with an error. -
401 Returns an error if no valid authentication was provided. -
404 Returns an error if the resource can not be found. -
- */ - public okhttp3.Call provisionNetworkTokenCall(UUID paymentMethodId, NetworkTokenRequest networkTokenRequest, final ApiCallback _callback) throws ApiException { - Object localVarPostBody = networkTokenRequest; - - // create path and map variables - String localVarPath = "/payment-methods/{payment_method_id}/network-tokens" - .replaceAll("\\{" + "payment_method_id" + "\\}", localVarApiClient.escapeString(paymentMethodId.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 = { - "application/json" - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - localVarHeaderParams.put("Content-Type", localVarContentType); - - String[] localVarAuthNames = new String[] { "BearerAuth" }; - return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call provisionNetworkTokenValidateBeforeCall(UUID paymentMethodId, NetworkTokenRequest networkTokenRequest, final ApiCallback _callback) throws ApiException { - - // verify the required parameter 'paymentMethodId' is set - if (paymentMethodId == null) { - throw new ApiException("Missing the required parameter 'paymentMethodId' when calling provisionNetworkToken(Async)"); - } - - - okhttp3.Call localVarCall = provisionNetworkTokenCall(paymentMethodId, networkTokenRequest, _callback); - return localVarCall; - - } - - /** - * Provision network token - * Provision a network token for a stored card. - * @param paymentMethodId The ID of the payment method. (required) - * @param networkTokenRequest (optional) - * @return NetworkToken - * @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 Returns the created network token. -
400 Returns if any of the validations below fails: - network token already exists for the `payment_method_id`. - `security_code` or `merchant_initiated` or `is_subsequent_payment` is not provided. - `merchant_initiated` is set to `false` but `security_code` is not provided. - `merchant_initiated` is set to `true` but `is_subsequent_payment` is set to `false`. - payment method is not a card. - Network token provider responds with an error. -
401 Returns an error if no valid authentication was provided. -
404 Returns an error if the resource can not be found. -
- */ - public NetworkToken provisionNetworkToken(UUID paymentMethodId, NetworkTokenRequest networkTokenRequest) throws ApiException { - ApiResponse localVarResp = provisionNetworkTokenWithHttpInfo(paymentMethodId, networkTokenRequest); - return localVarResp.getData(); - } - - /** - * Provision network token - * Provision a network token for a stored card. - * @param paymentMethodId The ID of the payment method. (required) - * @param networkTokenRequest (optional) - * @return ApiResponse<NetworkToken> - * @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 Returns the created network token. -
400 Returns if any of the validations below fails: - network token already exists for the `payment_method_id`. - `security_code` or `merchant_initiated` or `is_subsequent_payment` is not provided. - `merchant_initiated` is set to `false` but `security_code` is not provided. - `merchant_initiated` is set to `true` but `is_subsequent_payment` is set to `false`. - payment method is not a card. - Network token provider responds with an error. -
401 Returns an error if no valid authentication was provided. -
404 Returns an error if the resource can not be found. -
- */ - public ApiResponse provisionNetworkTokenWithHttpInfo(UUID paymentMethodId, NetworkTokenRequest networkTokenRequest) throws ApiException { - okhttp3.Call localVarCall = provisionNetworkTokenValidateBeforeCall(paymentMethodId, networkTokenRequest, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Provision network token (asynchronously) - * Provision a network token for a stored card. - * @param paymentMethodId The ID of the payment method. (required) - * @param networkTokenRequest (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
201 Returns the created network token. -
400 Returns if any of the validations below fails: - network token already exists for the `payment_method_id`. - `security_code` or `merchant_initiated` or `is_subsequent_payment` is not provided. - `merchant_initiated` is set to `false` but `security_code` is not provided. - `merchant_initiated` is set to `true` but `is_subsequent_payment` is set to `false`. - payment method is not a card. - Network token provider responds with an error. -
401 Returns an error if no valid authentication was provided. -
404 Returns an error if the resource can not be found. -
- */ - public okhttp3.Call provisionNetworkTokenAsync(UUID paymentMethodId, NetworkTokenRequest networkTokenRequest, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = provisionNetworkTokenValidateBeforeCall(paymentMethodId, networkTokenRequest, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for provisionPaymentServiceToken - * @param paymentMethodId The ID of the payment method. (required) - * @param paymentServiceTokenRequest (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
201 Returns the created payment service token. -
400 Returns if any of the validations below fails: - payment method is not card. - payment service doesn't support `payment_method_tokenization`. - active token already exists for the `payment_service_id`. - invalid request payload. - `payment_service_id` is not a `uuid` or is not set. - `security_code` is not set. - `redirect_url` is not set. -
401 Returns an error if no valid authentication was provided. -
404 Returns an error if the resource can not be found. -
- */ - public okhttp3.Call provisionPaymentServiceTokenCall(UUID paymentMethodId, PaymentServiceTokenRequest paymentServiceTokenRequest, final ApiCallback _callback) throws ApiException { - Object localVarPostBody = paymentServiceTokenRequest; - - // create path and map variables - String localVarPath = "/payment-methods/{payment_method_id}/payment-service-tokens" - .replaceAll("\\{" + "payment_method_id" + "\\}", localVarApiClient.escapeString(paymentMethodId.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 = { - "application/json" - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - localVarHeaderParams.put("Content-Type", localVarContentType); - - String[] localVarAuthNames = new String[] { "BearerAuth" }; - return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call provisionPaymentServiceTokenValidateBeforeCall(UUID paymentMethodId, PaymentServiceTokenRequest paymentServiceTokenRequest, final ApiCallback _callback) throws ApiException { - - // verify the required parameter 'paymentMethodId' is set - if (paymentMethodId == null) { - throw new ApiException("Missing the required parameter 'paymentMethodId' when calling provisionPaymentServiceToken(Async)"); - } - - - okhttp3.Call localVarCall = provisionPaymentServiceTokenCall(paymentMethodId, paymentServiceTokenRequest, _callback); - return localVarCall; - - } - - /** - * Provision payment service token - * Tokenize stored card against a payment service. - * @param paymentMethodId The ID of the payment method. (required) - * @param paymentServiceTokenRequest (optional) - * @return PaymentServiceToken - * @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 Returns the created payment service token. -
400 Returns if any of the validations below fails: - payment method is not card. - payment service doesn't support `payment_method_tokenization`. - active token already exists for the `payment_service_id`. - invalid request payload. - `payment_service_id` is not a `uuid` or is not set. - `security_code` is not set. - `redirect_url` is not set. -
401 Returns an error if no valid authentication was provided. -
404 Returns an error if the resource can not be found. -
- */ - public PaymentServiceToken provisionPaymentServiceToken(UUID paymentMethodId, PaymentServiceTokenRequest paymentServiceTokenRequest) throws ApiException { - ApiResponse localVarResp = provisionPaymentServiceTokenWithHttpInfo(paymentMethodId, paymentServiceTokenRequest); - return localVarResp.getData(); - } - - /** - * Provision payment service token - * Tokenize stored card against a payment service. - * @param paymentMethodId The ID of the payment method. (required) - * @param paymentServiceTokenRequest (optional) - * @return ApiResponse<PaymentServiceToken> - * @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 Returns the created payment service token. -
400 Returns if any of the validations below fails: - payment method is not card. - payment service doesn't support `payment_method_tokenization`. - active token already exists for the `payment_service_id`. - invalid request payload. - `payment_service_id` is not a `uuid` or is not set. - `security_code` is not set. - `redirect_url` is not set. -
401 Returns an error if no valid authentication was provided. -
404 Returns an error if the resource can not be found. -
- */ - public ApiResponse provisionPaymentServiceTokenWithHttpInfo(UUID paymentMethodId, PaymentServiceTokenRequest paymentServiceTokenRequest) throws ApiException { - okhttp3.Call localVarCall = provisionPaymentServiceTokenValidateBeforeCall(paymentMethodId, paymentServiceTokenRequest, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Provision payment service token (asynchronously) - * Tokenize stored card against a payment service. - * @param paymentMethodId The ID of the payment method. (required) - * @param paymentServiceTokenRequest (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
201 Returns the created payment service token. -
400 Returns if any of the validations below fails: - payment method is not card. - payment service doesn't support `payment_method_tokenization`. - active token already exists for the `payment_service_id`. - invalid request payload. - `payment_service_id` is not a `uuid` or is not set. - `security_code` is not set. - `redirect_url` is not set. -
401 Returns an error if no valid authentication was provided. -
404 Returns an error if the resource can not be found. -
- */ - public okhttp3.Call provisionPaymentServiceTokenAsync(UUID paymentMethodId, PaymentServiceTokenRequest paymentServiceTokenRequest, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = provisionPaymentServiceTokenValidateBeforeCall(paymentMethodId, paymentServiceTokenRequest, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for resumeNetworkToken - * @param paymentMethodId The ID of the payment method. (required) - * @param networkTokenId The ID of the network 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 Returns resumed network token. -
400 Returns an error if: - network token's status is not `suspended`. - network tokens feature is not enabled. - if payment method's scheme is not `Visa`. -
401 Returns an error if no valid authentication was provided. -
404 Returns an error if the resource can not be found. -
- */ - public okhttp3.Call resumeNetworkTokenCall(UUID paymentMethodId, UUID networkTokenId, final ApiCallback _callback) throws ApiException { - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/payment-methods/{payment_method_id}/network-tokens/{network_token_id}/resume" - .replaceAll("\\{" + "payment_method_id" + "\\}", localVarApiClient.escapeString(paymentMethodId.toString())) - .replaceAll("\\{" + "network_token_id" + "\\}", localVarApiClient.escapeString(networkTokenId.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); - localVarHeaderParams.put("Content-Type", localVarContentType); - - String[] localVarAuthNames = new String[] { "BearerAuth" }; - return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call resumeNetworkTokenValidateBeforeCall(UUID paymentMethodId, UUID networkTokenId, final ApiCallback _callback) throws ApiException { - - // verify the required parameter 'paymentMethodId' is set - if (paymentMethodId == null) { - throw new ApiException("Missing the required parameter 'paymentMethodId' when calling resumeNetworkToken(Async)"); - } - - // verify the required parameter 'networkTokenId' is set - if (networkTokenId == null) { - throw new ApiException("Missing the required parameter 'networkTokenId' when calling resumeNetworkToken(Async)"); - } - - - okhttp3.Call localVarCall = resumeNetworkTokenCall(paymentMethodId, networkTokenId, _callback); - return localVarCall; - - } - - /** - * Resume network token - * Resumes a specific network token. - * @param paymentMethodId The ID of the payment method. (required) - * @param networkTokenId The ID of the network token. (required) - * @return NetworkToken - * @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 Returns resumed network token. -
400 Returns an error if: - network token's status is not `suspended`. - network tokens feature is not enabled. - if payment method's scheme is not `Visa`. -
401 Returns an error if no valid authentication was provided. -
404 Returns an error if the resource can not be found. -
- */ - public NetworkToken resumeNetworkToken(UUID paymentMethodId, UUID networkTokenId) throws ApiException { - ApiResponse localVarResp = resumeNetworkTokenWithHttpInfo(paymentMethodId, networkTokenId); - return localVarResp.getData(); - } - - /** - * Resume network token - * Resumes a specific network token. - * @param paymentMethodId The ID of the payment method. (required) - * @param networkTokenId The ID of the network token. (required) - * @return ApiResponse<NetworkToken> - * @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 Returns resumed network token. -
400 Returns an error if: - network token's status is not `suspended`. - network tokens feature is not enabled. - if payment method's scheme is not `Visa`. -
401 Returns an error if no valid authentication was provided. -
404 Returns an error if the resource can not be found. -
- */ - public ApiResponse resumeNetworkTokenWithHttpInfo(UUID paymentMethodId, UUID networkTokenId) throws ApiException { - okhttp3.Call localVarCall = resumeNetworkTokenValidateBeforeCall(paymentMethodId, networkTokenId, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Resume network token (asynchronously) - * Resumes a specific network token. - * @param paymentMethodId The ID of the payment method. (required) - * @param networkTokenId The ID of the network 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 Returns resumed network token. -
400 Returns an error if: - network token's status is not `suspended`. - network tokens feature is not enabled. - if payment method's scheme is not `Visa`. -
401 Returns an error if no valid authentication was provided. -
404 Returns an error if the resource can not be found. -
- */ - public okhttp3.Call resumeNetworkTokenAsync(UUID paymentMethodId, UUID networkTokenId, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = resumeNetworkTokenValidateBeforeCall(paymentMethodId, networkTokenId, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for suspendNetworkToken - * @param paymentMethodId The ID of the payment method. (required) - * @param networkTokenId The ID of the network 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 Returns suspended network token. -
400 Returns an error if: - network token's status is not `active`. - network tokens feature is not enabled. - if payment method's scheme is not `Visa`. -
401 Returns an error if no valid authentication was provided. -
404 Returns an error if the resource can not be found. -
- */ - public okhttp3.Call suspendNetworkTokenCall(UUID paymentMethodId, UUID networkTokenId, final ApiCallback _callback) throws ApiException { - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/payment-methods/{payment_method_id}/network-tokens/{network_token_id}/suspend" - .replaceAll("\\{" + "payment_method_id" + "\\}", localVarApiClient.escapeString(paymentMethodId.toString())) - .replaceAll("\\{" + "network_token_id" + "\\}", localVarApiClient.escapeString(networkTokenId.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); - localVarHeaderParams.put("Content-Type", localVarContentType); - - String[] localVarAuthNames = new String[] { "BearerAuth" }; - return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call suspendNetworkTokenValidateBeforeCall(UUID paymentMethodId, UUID networkTokenId, final ApiCallback _callback) throws ApiException { - - // verify the required parameter 'paymentMethodId' is set - if (paymentMethodId == null) { - throw new ApiException("Missing the required parameter 'paymentMethodId' when calling suspendNetworkToken(Async)"); - } - - // verify the required parameter 'networkTokenId' is set - if (networkTokenId == null) { - throw new ApiException("Missing the required parameter 'networkTokenId' when calling suspendNetworkToken(Async)"); - } - - - okhttp3.Call localVarCall = suspendNetworkTokenCall(paymentMethodId, networkTokenId, _callback); - return localVarCall; - - } - - /** - * Suspend network token - * Suspends a specific network token. - * @param paymentMethodId The ID of the payment method. (required) - * @param networkTokenId The ID of the network token. (required) - * @return NetworkToken - * @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 Returns suspended network token. -
400 Returns an error if: - network token's status is not `active`. - network tokens feature is not enabled. - if payment method's scheme is not `Visa`. -
401 Returns an error if no valid authentication was provided. -
404 Returns an error if the resource can not be found. -
- */ - public NetworkToken suspendNetworkToken(UUID paymentMethodId, UUID networkTokenId) throws ApiException { - ApiResponse localVarResp = suspendNetworkTokenWithHttpInfo(paymentMethodId, networkTokenId); - return localVarResp.getData(); - } - - /** - * Suspend network token - * Suspends a specific network token. - * @param paymentMethodId The ID of the payment method. (required) - * @param networkTokenId The ID of the network token. (required) - * @return ApiResponse<NetworkToken> - * @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 Returns suspended network token. -
400 Returns an error if: - network token's status is not `active`. - network tokens feature is not enabled. - if payment method's scheme is not `Visa`. -
401 Returns an error if no valid authentication was provided. -
404 Returns an error if the resource can not be found. -
- */ - public ApiResponse suspendNetworkTokenWithHttpInfo(UUID paymentMethodId, UUID networkTokenId) throws ApiException { - okhttp3.Call localVarCall = suspendNetworkTokenValidateBeforeCall(paymentMethodId, networkTokenId, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Suspend network token (asynchronously) - * Suspends a specific network token. - * @param paymentMethodId The ID of the payment method. (required) - * @param networkTokenId The ID of the network 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 Returns suspended network token. -
400 Returns an error if: - network token's status is not `active`. - network tokens feature is not enabled. - if payment method's scheme is not `Visa`. -
401 Returns an error if no valid authentication was provided. -
404 Returns an error if the resource can not be found. -
- */ - public okhttp3.Call suspendNetworkTokenAsync(UUID paymentMethodId, UUID networkTokenId, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = suspendNetworkTokenValidateBeforeCall(paymentMethodId, networkTokenId, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/src/main/java/com/gr4vy/api/openapi/TransactionsApi.java b/src/main/java/com/gr4vy/api/openapi/TransactionsApi.java deleted file mode 100644 index cb01e58..0000000 --- a/src/main/java/com/gr4vy/api/openapi/TransactionsApi.java +++ /dev/null @@ -1,1267 +0,0 @@ -/* - * Gr4vy API - * Welcome to the Gr4vy API reference documentation. Our API is still very much a work in product and subject to change. - * - * The version of the OpenAPI document: 1.1.0-beta - * Contact: code@gr4vy.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.gr4vy.api.openapi; - -import com.gr4vy.api.ApiCallback; -import com.gr4vy.api.ApiClient; -import com.gr4vy.api.ApiException; -import com.gr4vy.api.ApiResponse; -import com.gr4vy.api.Configuration; -import com.gr4vy.api.Pair; -import com.gr4vy.api.ProgressRequestBody; -import com.gr4vy.api.ProgressResponseBody; - -import com.google.gson.reflect.TypeToken; - -import java.io.IOException; - - -import com.gr4vy.api.model.Error401Unauthorized; -import com.gr4vy.api.model.Error404NotFound; -import com.gr4vy.api.model.Error409DuplicateRecord; -import com.gr4vy.api.model.ErrorGeneric; -import org.threeten.bp.OffsetDateTime; -import com.gr4vy.api.model.Refund; -import com.gr4vy.api.model.Refunds; -import com.gr4vy.api.model.Transaction; -import com.gr4vy.api.model.TransactionCaptureRequest; -import com.gr4vy.api.model.TransactionRefundRequest; -import com.gr4vy.api.model.TransactionRequest; -import com.gr4vy.api.model.Transactions; -import java.util.UUID; - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class TransactionsApi { - private ApiClient localVarApiClient; - - public TransactionsApi() { - this(Configuration.getDefaultApiClient()); - } - - public TransactionsApi(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public ApiClient getApiClient() { - return localVarApiClient; - } - - public void setApiClient(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - /** - * Build call for captureTransaction - * @param transactionId The ID for the transaction to get the information for. (required) - * @param transactionCaptureRequest (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 Returns the captured transaction. -
400 Returns an error if the request was badly formatted or missing required fields. -
401 Returns an error if no valid authentication was provided. -
404 Returns an error if the resource can not be found or has not yet been created. -
- */ - public okhttp3.Call captureTransactionCall(String transactionId, TransactionCaptureRequest transactionCaptureRequest, final ApiCallback _callback) throws ApiException { - Object localVarPostBody = transactionCaptureRequest; - - // create path and map variables - String localVarPath = "/transactions/{transaction_id}/capture" - .replaceAll("\\{" + "transaction_id" + "\\}", 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/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); - localVarHeaderParams.put("Content-Type", localVarContentType); - - String[] localVarAuthNames = new String[] { "BearerAuth" }; - return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call captureTransactionValidateBeforeCall(String transactionId, TransactionCaptureRequest transactionCaptureRequest, final ApiCallback _callback) throws ApiException { - - // verify the required parameter 'transactionId' is set - if (transactionId == null) { - throw new ApiException("Missing the required parameter 'transactionId' when calling captureTransaction(Async)"); - } - - - okhttp3.Call localVarCall = captureTransactionCall(transactionId, transactionCaptureRequest, _callback); - return localVarCall; - - } - - /** - * Capture transaction - * Captures a previously authorized transaction. - * @param transactionId The ID for the transaction to get the information for. (required) - * @param transactionCaptureRequest (optional) - * @return Transaction - * @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 Returns the captured transaction. -
400 Returns an error if the request was badly formatted or missing required fields. -
401 Returns an error if no valid authentication was provided. -
404 Returns an error if the resource can not be found or has not yet been created. -
- */ - public Transaction captureTransaction(String transactionId, TransactionCaptureRequest transactionCaptureRequest) throws ApiException { - ApiResponse localVarResp = captureTransactionWithHttpInfo(transactionId, transactionCaptureRequest); - return localVarResp.getData(); - } - - /** - * Capture transaction - * Captures a previously authorized transaction. - * @param transactionId The ID for the transaction to get the information for. (required) - * @param transactionCaptureRequest (optional) - * @return ApiResponse<Transaction> - * @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 Returns the captured transaction. -
400 Returns an error if the request was badly formatted or missing required fields. -
401 Returns an error if no valid authentication was provided. -
404 Returns an error if the resource can not be found or has not yet been created. -
- */ - public ApiResponse captureTransactionWithHttpInfo(String transactionId, TransactionCaptureRequest transactionCaptureRequest) throws ApiException { - okhttp3.Call localVarCall = captureTransactionValidateBeforeCall(transactionId, transactionCaptureRequest, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Capture transaction (asynchronously) - * Captures a previously authorized transaction. - * @param transactionId The ID for the transaction to get the information for. (required) - * @param transactionCaptureRequest (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 Returns the captured transaction. -
400 Returns an error if the request was badly formatted or missing required fields. -
401 Returns an error if no valid authentication was provided. -
404 Returns an error if the resource can not be found or has not yet been created. -
- */ - public okhttp3.Call captureTransactionAsync(String transactionId, TransactionCaptureRequest transactionCaptureRequest, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = captureTransactionValidateBeforeCall(transactionId, transactionCaptureRequest, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for getRefund - * @param transactionId The ID for the transaction to get the information for. (required) - * @param refundId The unique ID of the refund. (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 Returns a refund. -
401 Returns an error if no valid authentication was provided. -
404 Returns an error if the resource can not be found. -
- */ - public okhttp3.Call getRefundCall(String transactionId, String refundId, final ApiCallback _callback) throws ApiException { - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/transactions/{transaction_id}/refunds/{refund_id}" - .replaceAll("\\{" + "transaction_id" + "\\}", localVarApiClient.escapeString(transactionId.toString())) - .replaceAll("\\{" + "refund_id" + "\\}", localVarApiClient.escapeString(refundId.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); - localVarHeaderParams.put("Content-Type", localVarContentType); - - String[] localVarAuthNames = new String[] { "BearerAuth" }; - return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call getRefundValidateBeforeCall(String transactionId, String refundId, final ApiCallback _callback) throws ApiException { - - // verify the required parameter 'transactionId' is set - if (transactionId == null) { - throw new ApiException("Missing the required parameter 'transactionId' when calling getRefund(Async)"); - } - - // verify the required parameter 'refundId' is set - if (refundId == null) { - throw new ApiException("Missing the required parameter 'refundId' when calling getRefund(Async)"); - } - - - okhttp3.Call localVarCall = getRefundCall(transactionId, refundId, _callback); - return localVarCall; - - } - - /** - * Get refund - * Gets information about a refund associated with a certain transaction. - * @param transactionId The ID for the transaction to get the information for. (required) - * @param refundId The unique ID of the refund. (required) - * @return Refund - * @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 Returns a refund. -
401 Returns an error if no valid authentication was provided. -
404 Returns an error if the resource can not be found. -
- */ - public Refund getRefund(String transactionId, String refundId) throws ApiException { - ApiResponse localVarResp = getRefundWithHttpInfo(transactionId, refundId); - return localVarResp.getData(); - } - - /** - * Get refund - * Gets information about a refund associated with a certain transaction. - * @param transactionId The ID for the transaction to get the information for. (required) - * @param refundId The unique ID of the refund. (required) - * @return ApiResponse<Refund> - * @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 Returns a refund. -
401 Returns an error if no valid authentication was provided. -
404 Returns an error if the resource can not be found. -
- */ - public ApiResponse getRefundWithHttpInfo(String transactionId, String refundId) throws ApiException { - okhttp3.Call localVarCall = getRefundValidateBeforeCall(transactionId, refundId, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Get refund (asynchronously) - * Gets information about a refund associated with a certain transaction. - * @param transactionId The ID for the transaction to get the information for. (required) - * @param refundId The unique ID of the refund. (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 Returns a refund. -
401 Returns an error if no valid authentication was provided. -
404 Returns an error if the resource can not be found. -
- */ - public okhttp3.Call getRefundAsync(String transactionId, String refundId, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = getRefundValidateBeforeCall(transactionId, refundId, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for getTransaction - * @param transactionId The ID for the transaction to get the information 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 Returns a transaction resource. -
401 Returns an error if no valid authentication was provided. -
404 Returns an error if the resource can not be found or has not yet been created. -
- */ - public okhttp3.Call getTransactionCall(String transactionId, final ApiCallback _callback) throws ApiException { - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/transactions/{transaction_id}" - .replaceAll("\\{" + "transaction_id" + "\\}", 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/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - localVarHeaderParams.put("Content-Type", localVarContentType); - - String[] localVarAuthNames = new String[] { "BearerAuth" }; - return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call getTransactionValidateBeforeCall(String transactionId, final ApiCallback _callback) throws ApiException { - - // verify the required parameter 'transactionId' is set - if (transactionId == null) { - throw new ApiException("Missing the required parameter 'transactionId' when calling getTransaction(Async)"); - } - - - okhttp3.Call localVarCall = getTransactionCall(transactionId, _callback); - return localVarCall; - - } - - /** - * Get transaction - * Get information about a transaction. - * @param transactionId The ID for the transaction to get the information for. (required) - * @return Transaction - * @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 Returns a transaction resource. -
401 Returns an error if no valid authentication was provided. -
404 Returns an error if the resource can not be found or has not yet been created. -
- */ - public Transaction getTransaction(String transactionId) throws ApiException { - ApiResponse localVarResp = getTransactionWithHttpInfo(transactionId); - return localVarResp.getData(); - } - - /** - * Get transaction - * Get information about a transaction. - * @param transactionId The ID for the transaction to get the information for. (required) - * @return ApiResponse<Transaction> - * @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 Returns a transaction resource. -
401 Returns an error if no valid authentication was provided. -
404 Returns an error if the resource can not be found or has not yet been created. -
- */ - public ApiResponse getTransactionWithHttpInfo(String transactionId) throws ApiException { - okhttp3.Call localVarCall = getTransactionValidateBeforeCall(transactionId, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Get transaction (asynchronously) - * Get information about a transaction. - * @param transactionId The ID for the transaction to get the information 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 Returns a transaction resource. -
401 Returns an error if no valid authentication was provided. -
404 Returns an error if the resource can not be found or has not yet been created. -
- */ - public okhttp3.Call getTransactionAsync(String transactionId, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = getTransactionValidateBeforeCall(transactionId, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for listTransactionRefunds - * @param transactionId The ID for the transaction to get the information for. (required) - * @param limit Defines the maximum number of items to return for this request. (optional, default to 20) - * @param cursor A cursor that identifies the page of results to return. This is used to paginate the results of this API. For the first page of results, this parameter can be left out. For additional pages, use the value returned by the API in the `next_cursor` field. Similarly the `previous_cursor` can be used to reverse backwards in the list. (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 Returns a list of refunds. -
401 Returns an error if no valid authentication was provided. -
404 Returns an error if the resource can not be found. -
- */ - public okhttp3.Call listTransactionRefundsCall(String transactionId, Integer limit, String cursor, final ApiCallback _callback) throws ApiException { - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/transactions/{transaction_id}/refunds" - .replaceAll("\\{" + "transaction_id" + "\\}", localVarApiClient.escapeString(transactionId.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (limit != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("limit", limit)); - } - - if (cursor != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("cursor", cursor)); - } - - 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); - localVarHeaderParams.put("Content-Type", localVarContentType); - - String[] localVarAuthNames = new String[] { "BearerAuth" }; - return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call listTransactionRefundsValidateBeforeCall(String transactionId, Integer limit, String cursor, final ApiCallback _callback) throws ApiException { - - // verify the required parameter 'transactionId' is set - if (transactionId == null) { - throw new ApiException("Missing the required parameter 'transactionId' when calling listTransactionRefunds(Async)"); - } - - - okhttp3.Call localVarCall = listTransactionRefundsCall(transactionId, limit, cursor, _callback); - return localVarCall; - - } - - /** - * List refunds - * Lists all refunds associated with a certain transaction. - * @param transactionId The ID for the transaction to get the information for. (required) - * @param limit Defines the maximum number of items to return for this request. (optional, default to 20) - * @param cursor A cursor that identifies the page of results to return. This is used to paginate the results of this API. For the first page of results, this parameter can be left out. For additional pages, use the value returned by the API in the `next_cursor` field. Similarly the `previous_cursor` can be used to reverse backwards in the list. (optional) - * @return Refunds - * @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 Returns a list of refunds. -
401 Returns an error if no valid authentication was provided. -
404 Returns an error if the resource can not be found. -
- */ - public Refunds listTransactionRefunds(String transactionId, Integer limit, String cursor) throws ApiException { - ApiResponse localVarResp = listTransactionRefundsWithHttpInfo(transactionId, limit, cursor); - return localVarResp.getData(); - } - - /** - * List refunds - * Lists all refunds associated with a certain transaction. - * @param transactionId The ID for the transaction to get the information for. (required) - * @param limit Defines the maximum number of items to return for this request. (optional, default to 20) - * @param cursor A cursor that identifies the page of results to return. This is used to paginate the results of this API. For the first page of results, this parameter can be left out. For additional pages, use the value returned by the API in the `next_cursor` field. Similarly the `previous_cursor` can be used to reverse backwards in the list. (optional) - * @return ApiResponse<Refunds> - * @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 Returns a list of refunds. -
401 Returns an error if no valid authentication was provided. -
404 Returns an error if the resource can not be found. -
- */ - public ApiResponse listTransactionRefundsWithHttpInfo(String transactionId, Integer limit, String cursor) throws ApiException { - okhttp3.Call localVarCall = listTransactionRefundsValidateBeforeCall(transactionId, limit, cursor, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * List refunds (asynchronously) - * Lists all refunds associated with a certain transaction. - * @param transactionId The ID for the transaction to get the information for. (required) - * @param limit Defines the maximum number of items to return for this request. (optional, default to 20) - * @param cursor A cursor that identifies the page of results to return. This is used to paginate the results of this API. For the first page of results, this parameter can be left out. For additional pages, use the value returned by the API in the `next_cursor` field. Similarly the `previous_cursor` can be used to reverse backwards in the list. (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 Returns a list of refunds. -
401 Returns an error if no valid authentication was provided. -
404 Returns an error if the resource can not be found. -
- */ - public okhttp3.Call listTransactionRefundsAsync(String transactionId, Integer limit, String cursor, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = listTransactionRefundsValidateBeforeCall(transactionId, limit, cursor, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for listTransactions - * @param buyerExternalIdentifier Filters the results to only the items for which the `buyer` has an `external_identifier` that matches this value. (optional) - * @param buyerId Filters the results to only the items for which the `buyer` has an `id` that matches this value. (optional) - * @param cursor A cursor that identifies the page of results to return. This is used to paginate the results of this API. For the first page of results, this parameter can be left out. For additional pages, use the value returned by the API in the `next_cursor` field. Similarly the `previous_cursor` can be used to reverse backwards in the list. (optional) - * @param limit Defines the maximum number of items to return for this request. (optional, default to 20) - * @param amountEq Filters for transactions that have an `amount` that is equal to the provided `amount_eq` value. (optional) - * @param amountGte Filters for transactions that have an `amount` that is greater than or equal to the `amount_gte` value. (optional) - * @param amountLte Filters for transactions that have an `amount` that is less than or equal to the `amount_lte` value. (optional) - * @param checkoutSessionId Filters for transactions that are linked to the unique ID for a Checkout Session. (optional) - * @param createdAtGte Filters the results to only transactions created after this ISO date-time string. The time zone must be included. Ensure that the date-time string is URL encoded, e.g. `2022-01-01T12:00:00+08:00` must be encoded as `2022-01-01T12%3A00%3A00%2B08%3A00`. (optional) - * @param createdAtLte Filters the results to only transactions created before this ISO date-time string. The time zone must be included. Ensure that the date-time string is URL encoded, e.g. `2022-01-01T12:00:00+08:00` must be encoded as `2022-01-01T12%3A00%3A00%2B08%3A00`. (optional) - * @param currency Filters for transactions that have matching `currency` values. The `currency` values provided must be formatted as 3-letter ISO currency code. (optional) - * @param externalIdentifier Filters the results to only the items for which the `external_identifier` matches this value. (optional) - * @param hasRefunds When set to `true`, filter for transactions that have at least one completed refund associated with it. When set to `false`, filter for transactions that have no completed refunds. (optional) - * @param pendingReview When set to `true`, filter for transactions that have a manual review pending. When set to `false`, filter for transactions that don't have a manual review pending. (optional) - * @param id Filters for the transaction that has a matching `id` value. (optional) - * @param metadata Filters for transactions where their `metadata` values contain all of the provided `metadata` keys. The value sent for `metadata` must be formatted as a JSON string, and all keys and values must be strings. This value should also be URL encoded. Duplicate keys are not supported. If a key is duplicated, only the last appearing value will be used. (optional) - * @param method Filters the results to only the items for which the `method` has been set to this value. (optional) - * @param paymentMethodId Filters for transactions that have a payment method with an ID that matches exactly with the provided value. (optional) - * @param paymentMethodLabel Filters for transactions that have a payment method with a label that matches exactly with the provided value. (optional) - * @param paymentServiceId Filters for transactions that were processed by the provided `payment_service_id` values. (optional) - * @param paymentServiceTransactionId Filters for transactions that have a matching `payment_service_transaction_id` value. The `payment_service_transaction_id` is the identifier of the transaction given by the payment service. (optional) - * @param search Filters for transactions that have one of the following fields match exactly with the provided `search` value: * `buyer_external_identifier` * `buyer_id` * `external_identifier` * `id` * `payment_service_transaction_id` (optional) - * @param status Filters the results to only the transactions that have a `status` that matches with any of the provided status values. (optional) - * @param updatedAtGte Filters the results to only transactions last updated after this ISO date-time string. The time zone must be included. Ensure that the date-time string is URL encoded, e.g. `2022-01-01T12:00:00+08:00` must be encoded as `2022-01-01T12%3A00%3A00%2B08%3A00`. (optional) - * @param updatedAtLte Filters the results to only transactions last updated before this ISO date-time string. The time zone must be included. Ensure that the date-time string is URL encoded, e.g. `2022-01-01T12:00:00+08:00` must be encoded as `2022-01-01T12%3A00%3A00%2B08%3A00`. (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 Returns a paginated list of transactions for an account. -
401 Returns an error if no valid authentication was provided. -
- */ - public okhttp3.Call listTransactionsCall(String buyerExternalIdentifier, String buyerId, String cursor, Integer limit, Integer amountEq, Integer amountGte, Integer amountLte, UUID checkoutSessionId, OffsetDateTime createdAtGte, OffsetDateTime createdAtLte, List currency, String externalIdentifier, Boolean hasRefunds, Boolean pendingReview, UUID id, List metadata, List method, UUID paymentMethodId, String paymentMethodLabel, List paymentServiceId, String paymentServiceTransactionId, String search, List status, OffsetDateTime updatedAtGte, OffsetDateTime updatedAtLte, final ApiCallback _callback) throws ApiException { - 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 (buyerExternalIdentifier != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("buyer_external_identifier", buyerExternalIdentifier)); - } - - if (buyerId != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("buyer_id", buyerId)); - } - - if (cursor != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("cursor", cursor)); - } - - if (limit != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("limit", limit)); - } - - if (amountEq != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("amount_eq", amountEq)); - } - - if (amountGte != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("amount_gte", amountGte)); - } - - if (amountLte != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("amount_lte", amountLte)); - } - - if (checkoutSessionId != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("checkout_session_id", checkoutSessionId)); - } - - if (createdAtGte != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("created_at_gte", createdAtGte)); - } - - if (createdAtLte != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("created_at_lte", createdAtLte)); - } - - if (currency != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "currency", currency)); - } - - if (externalIdentifier != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("external_identifier", externalIdentifier)); - } - - if (hasRefunds != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("has_refunds", hasRefunds)); - } - - if (pendingReview != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("pending_review", pendingReview)); - } - - if (id != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("id", id)); - } - - if (metadata != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "metadata", metadata)); - } - - if (method != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "method", method)); - } - - if (paymentMethodId != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("payment_method_id", paymentMethodId)); - } - - if (paymentMethodLabel != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("payment_method_label", paymentMethodLabel)); - } - - if (paymentServiceId != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "payment_service_id", paymentServiceId)); - } - - if (paymentServiceTransactionId != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("payment_service_transaction_id", paymentServiceTransactionId)); - } - - if (search != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("search", search)); - } - - if (status != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "status", status)); - } - - if (updatedAtGte != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("updated_at_gte", updatedAtGte)); - } - - if (updatedAtLte != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("updated_at_lte", updatedAtLte)); - } - - 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); - localVarHeaderParams.put("Content-Type", localVarContentType); - - String[] localVarAuthNames = new String[] { "BearerAuth" }; - return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call listTransactionsValidateBeforeCall(String buyerExternalIdentifier, String buyerId, String cursor, Integer limit, Integer amountEq, Integer amountGte, Integer amountLte, UUID checkoutSessionId, OffsetDateTime createdAtGte, OffsetDateTime createdAtLte, List currency, String externalIdentifier, Boolean hasRefunds, Boolean pendingReview, UUID id, List metadata, List method, UUID paymentMethodId, String paymentMethodLabel, List paymentServiceId, String paymentServiceTransactionId, String search, List status, OffsetDateTime updatedAtGte, OffsetDateTime updatedAtLte, final ApiCallback _callback) throws ApiException { - - - okhttp3.Call localVarCall = listTransactionsCall(buyerExternalIdentifier, buyerId, cursor, limit, amountEq, amountGte, amountLte, checkoutSessionId, createdAtGte, createdAtLte, currency, externalIdentifier, hasRefunds, pendingReview, id, metadata, method, paymentMethodId, paymentMethodLabel, paymentServiceId, paymentServiceTransactionId, search, status, updatedAtGte, updatedAtLte, _callback); - return localVarCall; - - } - - /** - * List transactions - * Lists all transactions for an account. Sorted by last updated at. - * @param buyerExternalIdentifier Filters the results to only the items for which the `buyer` has an `external_identifier` that matches this value. (optional) - * @param buyerId Filters the results to only the items for which the `buyer` has an `id` that matches this value. (optional) - * @param cursor A cursor that identifies the page of results to return. This is used to paginate the results of this API. For the first page of results, this parameter can be left out. For additional pages, use the value returned by the API in the `next_cursor` field. Similarly the `previous_cursor` can be used to reverse backwards in the list. (optional) - * @param limit Defines the maximum number of items to return for this request. (optional, default to 20) - * @param amountEq Filters for transactions that have an `amount` that is equal to the provided `amount_eq` value. (optional) - * @param amountGte Filters for transactions that have an `amount` that is greater than or equal to the `amount_gte` value. (optional) - * @param amountLte Filters for transactions that have an `amount` that is less than or equal to the `amount_lte` value. (optional) - * @param checkoutSessionId Filters for transactions that are linked to the unique ID for a Checkout Session. (optional) - * @param createdAtGte Filters the results to only transactions created after this ISO date-time string. The time zone must be included. Ensure that the date-time string is URL encoded, e.g. `2022-01-01T12:00:00+08:00` must be encoded as `2022-01-01T12%3A00%3A00%2B08%3A00`. (optional) - * @param createdAtLte Filters the results to only transactions created before this ISO date-time string. The time zone must be included. Ensure that the date-time string is URL encoded, e.g. `2022-01-01T12:00:00+08:00` must be encoded as `2022-01-01T12%3A00%3A00%2B08%3A00`. (optional) - * @param currency Filters for transactions that have matching `currency` values. The `currency` values provided must be formatted as 3-letter ISO currency code. (optional) - * @param externalIdentifier Filters the results to only the items for which the `external_identifier` matches this value. (optional) - * @param hasRefunds When set to `true`, filter for transactions that have at least one completed refund associated with it. When set to `false`, filter for transactions that have no completed refunds. (optional) - * @param pendingReview When set to `true`, filter for transactions that have a manual review pending. When set to `false`, filter for transactions that don't have a manual review pending. (optional) - * @param id Filters for the transaction that has a matching `id` value. (optional) - * @param metadata Filters for transactions where their `metadata` values contain all of the provided `metadata` keys. The value sent for `metadata` must be formatted as a JSON string, and all keys and values must be strings. This value should also be URL encoded. Duplicate keys are not supported. If a key is duplicated, only the last appearing value will be used. (optional) - * @param method Filters the results to only the items for which the `method` has been set to this value. (optional) - * @param paymentMethodId Filters for transactions that have a payment method with an ID that matches exactly with the provided value. (optional) - * @param paymentMethodLabel Filters for transactions that have a payment method with a label that matches exactly with the provided value. (optional) - * @param paymentServiceId Filters for transactions that were processed by the provided `payment_service_id` values. (optional) - * @param paymentServiceTransactionId Filters for transactions that have a matching `payment_service_transaction_id` value. The `payment_service_transaction_id` is the identifier of the transaction given by the payment service. (optional) - * @param search Filters for transactions that have one of the following fields match exactly with the provided `search` value: * `buyer_external_identifier` * `buyer_id` * `external_identifier` * `id` * `payment_service_transaction_id` (optional) - * @param status Filters the results to only the transactions that have a `status` that matches with any of the provided status values. (optional) - * @param updatedAtGte Filters the results to only transactions last updated after this ISO date-time string. The time zone must be included. Ensure that the date-time string is URL encoded, e.g. `2022-01-01T12:00:00+08:00` must be encoded as `2022-01-01T12%3A00%3A00%2B08%3A00`. (optional) - * @param updatedAtLte Filters the results to only transactions last updated before this ISO date-time string. The time zone must be included. Ensure that the date-time string is URL encoded, e.g. `2022-01-01T12:00:00+08:00` must be encoded as `2022-01-01T12%3A00%3A00%2B08%3A00`. (optional) - * @return Transactions - * @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 Returns a paginated list of transactions for an account. -
401 Returns an error if no valid authentication was provided. -
- */ - public Transactions listTransactions(String buyerExternalIdentifier, String buyerId, String cursor, Integer limit, Integer amountEq, Integer amountGte, Integer amountLte, UUID checkoutSessionId, OffsetDateTime createdAtGte, OffsetDateTime createdAtLte, List currency, String externalIdentifier, Boolean hasRefunds, Boolean pendingReview, UUID id, List metadata, List method, UUID paymentMethodId, String paymentMethodLabel, List paymentServiceId, String paymentServiceTransactionId, String search, List status, OffsetDateTime updatedAtGte, OffsetDateTime updatedAtLte) throws ApiException { - ApiResponse localVarResp = listTransactionsWithHttpInfo(buyerExternalIdentifier, buyerId, cursor, limit, amountEq, amountGte, amountLte, checkoutSessionId, createdAtGte, createdAtLte, currency, externalIdentifier, hasRefunds, pendingReview, id, metadata, method, paymentMethodId, paymentMethodLabel, paymentServiceId, paymentServiceTransactionId, search, status, updatedAtGte, updatedAtLte); - return localVarResp.getData(); - } - - /** - * List transactions - * Lists all transactions for an account. Sorted by last updated at. - * @param buyerExternalIdentifier Filters the results to only the items for which the `buyer` has an `external_identifier` that matches this value. (optional) - * @param buyerId Filters the results to only the items for which the `buyer` has an `id` that matches this value. (optional) - * @param cursor A cursor that identifies the page of results to return. This is used to paginate the results of this API. For the first page of results, this parameter can be left out. For additional pages, use the value returned by the API in the `next_cursor` field. Similarly the `previous_cursor` can be used to reverse backwards in the list. (optional) - * @param limit Defines the maximum number of items to return for this request. (optional, default to 20) - * @param amountEq Filters for transactions that have an `amount` that is equal to the provided `amount_eq` value. (optional) - * @param amountGte Filters for transactions that have an `amount` that is greater than or equal to the `amount_gte` value. (optional) - * @param amountLte Filters for transactions that have an `amount` that is less than or equal to the `amount_lte` value. (optional) - * @param checkoutSessionId Filters for transactions that are linked to the unique ID for a Checkout Session. (optional) - * @param createdAtGte Filters the results to only transactions created after this ISO date-time string. The time zone must be included. Ensure that the date-time string is URL encoded, e.g. `2022-01-01T12:00:00+08:00` must be encoded as `2022-01-01T12%3A00%3A00%2B08%3A00`. (optional) - * @param createdAtLte Filters the results to only transactions created before this ISO date-time string. The time zone must be included. Ensure that the date-time string is URL encoded, e.g. `2022-01-01T12:00:00+08:00` must be encoded as `2022-01-01T12%3A00%3A00%2B08%3A00`. (optional) - * @param currency Filters for transactions that have matching `currency` values. The `currency` values provided must be formatted as 3-letter ISO currency code. (optional) - * @param externalIdentifier Filters the results to only the items for which the `external_identifier` matches this value. (optional) - * @param hasRefunds When set to `true`, filter for transactions that have at least one completed refund associated with it. When set to `false`, filter for transactions that have no completed refunds. (optional) - * @param pendingReview When set to `true`, filter for transactions that have a manual review pending. When set to `false`, filter for transactions that don't have a manual review pending. (optional) - * @param id Filters for the transaction that has a matching `id` value. (optional) - * @param metadata Filters for transactions where their `metadata` values contain all of the provided `metadata` keys. The value sent for `metadata` must be formatted as a JSON string, and all keys and values must be strings. This value should also be URL encoded. Duplicate keys are not supported. If a key is duplicated, only the last appearing value will be used. (optional) - * @param method Filters the results to only the items for which the `method` has been set to this value. (optional) - * @param paymentMethodId Filters for transactions that have a payment method with an ID that matches exactly with the provided value. (optional) - * @param paymentMethodLabel Filters for transactions that have a payment method with a label that matches exactly with the provided value. (optional) - * @param paymentServiceId Filters for transactions that were processed by the provided `payment_service_id` values. (optional) - * @param paymentServiceTransactionId Filters for transactions that have a matching `payment_service_transaction_id` value. The `payment_service_transaction_id` is the identifier of the transaction given by the payment service. (optional) - * @param search Filters for transactions that have one of the following fields match exactly with the provided `search` value: * `buyer_external_identifier` * `buyer_id` * `external_identifier` * `id` * `payment_service_transaction_id` (optional) - * @param status Filters the results to only the transactions that have a `status` that matches with any of the provided status values. (optional) - * @param updatedAtGte Filters the results to only transactions last updated after this ISO date-time string. The time zone must be included. Ensure that the date-time string is URL encoded, e.g. `2022-01-01T12:00:00+08:00` must be encoded as `2022-01-01T12%3A00%3A00%2B08%3A00`. (optional) - * @param updatedAtLte Filters the results to only transactions last updated before this ISO date-time string. The time zone must be included. Ensure that the date-time string is URL encoded, e.g. `2022-01-01T12:00:00+08:00` must be encoded as `2022-01-01T12%3A00%3A00%2B08%3A00`. (optional) - * @return ApiResponse<Transactions> - * @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 Returns a paginated list of transactions for an account. -
401 Returns an error if no valid authentication was provided. -
- */ - public ApiResponse listTransactionsWithHttpInfo(String buyerExternalIdentifier, String buyerId, String cursor, Integer limit, Integer amountEq, Integer amountGte, Integer amountLte, UUID checkoutSessionId, OffsetDateTime createdAtGte, OffsetDateTime createdAtLte, List currency, String externalIdentifier, Boolean hasRefunds, Boolean pendingReview, UUID id, List metadata, List method, UUID paymentMethodId, String paymentMethodLabel, List paymentServiceId, String paymentServiceTransactionId, String search, List status, OffsetDateTime updatedAtGte, OffsetDateTime updatedAtLte) throws ApiException { - okhttp3.Call localVarCall = listTransactionsValidateBeforeCall(buyerExternalIdentifier, buyerId, cursor, limit, amountEq, amountGte, amountLte, checkoutSessionId, createdAtGte, createdAtLte, currency, externalIdentifier, hasRefunds, pendingReview, id, metadata, method, paymentMethodId, paymentMethodLabel, paymentServiceId, paymentServiceTransactionId, search, status, updatedAtGte, updatedAtLte, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * List transactions (asynchronously) - * Lists all transactions for an account. Sorted by last updated at. - * @param buyerExternalIdentifier Filters the results to only the items for which the `buyer` has an `external_identifier` that matches this value. (optional) - * @param buyerId Filters the results to only the items for which the `buyer` has an `id` that matches this value. (optional) - * @param cursor A cursor that identifies the page of results to return. This is used to paginate the results of this API. For the first page of results, this parameter can be left out. For additional pages, use the value returned by the API in the `next_cursor` field. Similarly the `previous_cursor` can be used to reverse backwards in the list. (optional) - * @param limit Defines the maximum number of items to return for this request. (optional, default to 20) - * @param amountEq Filters for transactions that have an `amount` that is equal to the provided `amount_eq` value. (optional) - * @param amountGte Filters for transactions that have an `amount` that is greater than or equal to the `amount_gte` value. (optional) - * @param amountLte Filters for transactions that have an `amount` that is less than or equal to the `amount_lte` value. (optional) - * @param checkoutSessionId Filters for transactions that are linked to the unique ID for a Checkout Session. (optional) - * @param createdAtGte Filters the results to only transactions created after this ISO date-time string. The time zone must be included. Ensure that the date-time string is URL encoded, e.g. `2022-01-01T12:00:00+08:00` must be encoded as `2022-01-01T12%3A00%3A00%2B08%3A00`. (optional) - * @param createdAtLte Filters the results to only transactions created before this ISO date-time string. The time zone must be included. Ensure that the date-time string is URL encoded, e.g. `2022-01-01T12:00:00+08:00` must be encoded as `2022-01-01T12%3A00%3A00%2B08%3A00`. (optional) - * @param currency Filters for transactions that have matching `currency` values. The `currency` values provided must be formatted as 3-letter ISO currency code. (optional) - * @param externalIdentifier Filters the results to only the items for which the `external_identifier` matches this value. (optional) - * @param hasRefunds When set to `true`, filter for transactions that have at least one completed refund associated with it. When set to `false`, filter for transactions that have no completed refunds. (optional) - * @param pendingReview When set to `true`, filter for transactions that have a manual review pending. When set to `false`, filter for transactions that don't have a manual review pending. (optional) - * @param id Filters for the transaction that has a matching `id` value. (optional) - * @param metadata Filters for transactions where their `metadata` values contain all of the provided `metadata` keys. The value sent for `metadata` must be formatted as a JSON string, and all keys and values must be strings. This value should also be URL encoded. Duplicate keys are not supported. If a key is duplicated, only the last appearing value will be used. (optional) - * @param method Filters the results to only the items for which the `method` has been set to this value. (optional) - * @param paymentMethodId Filters for transactions that have a payment method with an ID that matches exactly with the provided value. (optional) - * @param paymentMethodLabel Filters for transactions that have a payment method with a label that matches exactly with the provided value. (optional) - * @param paymentServiceId Filters for transactions that were processed by the provided `payment_service_id` values. (optional) - * @param paymentServiceTransactionId Filters for transactions that have a matching `payment_service_transaction_id` value. The `payment_service_transaction_id` is the identifier of the transaction given by the payment service. (optional) - * @param search Filters for transactions that have one of the following fields match exactly with the provided `search` value: * `buyer_external_identifier` * `buyer_id` * `external_identifier` * `id` * `payment_service_transaction_id` (optional) - * @param status Filters the results to only the transactions that have a `status` that matches with any of the provided status values. (optional) - * @param updatedAtGte Filters the results to only transactions last updated after this ISO date-time string. The time zone must be included. Ensure that the date-time string is URL encoded, e.g. `2022-01-01T12:00:00+08:00` must be encoded as `2022-01-01T12%3A00%3A00%2B08%3A00`. (optional) - * @param updatedAtLte Filters the results to only transactions last updated before this ISO date-time string. The time zone must be included. Ensure that the date-time string is URL encoded, e.g. `2022-01-01T12:00:00+08:00` must be encoded as `2022-01-01T12%3A00%3A00%2B08%3A00`. (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 Returns a paginated list of transactions for an account. -
401 Returns an error if no valid authentication was provided. -
- */ - public okhttp3.Call listTransactionsAsync(String buyerExternalIdentifier, String buyerId, String cursor, Integer limit, Integer amountEq, Integer amountGte, Integer amountLte, UUID checkoutSessionId, OffsetDateTime createdAtGte, OffsetDateTime createdAtLte, List currency, String externalIdentifier, Boolean hasRefunds, Boolean pendingReview, UUID id, List metadata, List method, UUID paymentMethodId, String paymentMethodLabel, List paymentServiceId, String paymentServiceTransactionId, String search, List status, OffsetDateTime updatedAtGte, OffsetDateTime updatedAtLte, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = listTransactionsValidateBeforeCall(buyerExternalIdentifier, buyerId, cursor, limit, amountEq, amountGte, amountLte, checkoutSessionId, createdAtGte, createdAtLte, currency, externalIdentifier, hasRefunds, pendingReview, id, metadata, method, paymentMethodId, paymentMethodLabel, paymentServiceId, paymentServiceTransactionId, search, status, updatedAtGte, updatedAtLte, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for newRefund - * @param transactionId The ID for the transaction to get the information for. (required) - * @param transactionRefundRequest (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
201 Returns the created refund. -
400 Returns an error if the request was badly formatted or missing required fields. -
401 Returns an error if no valid authentication was provided. -
404 Returns an error if the resource can not be found. -
- */ - public okhttp3.Call newRefundCall(String transactionId, TransactionRefundRequest transactionRefundRequest, final ApiCallback _callback) throws ApiException { - Object localVarPostBody = transactionRefundRequest; - - // create path and map variables - String localVarPath = "/transactions/{transaction_id}/refunds" - .replaceAll("\\{" + "transaction_id" + "\\}", 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/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); - localVarHeaderParams.put("Content-Type", localVarContentType); - - String[] localVarAuthNames = new String[] { "BearerAuth" }; - return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call newRefundValidateBeforeCall(String transactionId, TransactionRefundRequest transactionRefundRequest, final ApiCallback _callback) throws ApiException { - - // verify the required parameter 'transactionId' is set - if (transactionId == null) { - throw new ApiException("Missing the required parameter 'transactionId' when calling newRefund(Async)"); - } - - - okhttp3.Call localVarCall = newRefundCall(transactionId, transactionRefundRequest, _callback); - return localVarCall; - - } - - /** - * Refund transaction - * Refunds a transaction, fully or partially. If the transaction was not yet successfully captured, the refund will not be processed. Authorized transactions can be voided instead. - * @param transactionId The ID for the transaction to get the information for. (required) - * @param transactionRefundRequest (optional) - * @return Refund - * @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 Returns the created refund. -
400 Returns an error if the request was badly formatted or missing required fields. -
401 Returns an error if no valid authentication was provided. -
404 Returns an error if the resource can not be found. -
- */ - public Refund newRefund(String transactionId, TransactionRefundRequest transactionRefundRequest) throws ApiException { - ApiResponse localVarResp = newRefundWithHttpInfo(transactionId, transactionRefundRequest); - return localVarResp.getData(); - } - - /** - * Refund transaction - * Refunds a transaction, fully or partially. If the transaction was not yet successfully captured, the refund will not be processed. Authorized transactions can be voided instead. - * @param transactionId The ID for the transaction to get the information for. (required) - * @param transactionRefundRequest (optional) - * @return ApiResponse<Refund> - * @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 Returns the created refund. -
400 Returns an error if the request was badly formatted or missing required fields. -
401 Returns an error if no valid authentication was provided. -
404 Returns an error if the resource can not be found. -
- */ - public ApiResponse newRefundWithHttpInfo(String transactionId, TransactionRefundRequest transactionRefundRequest) throws ApiException { - okhttp3.Call localVarCall = newRefundValidateBeforeCall(transactionId, transactionRefundRequest, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Refund transaction (asynchronously) - * Refunds a transaction, fully or partially. If the transaction was not yet successfully captured, the refund will not be processed. Authorized transactions can be voided instead. - * @param transactionId The ID for the transaction to get the information for. (required) - * @param transactionRefundRequest (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
201 Returns the created refund. -
400 Returns an error if the request was badly formatted or missing required fields. -
401 Returns an error if no valid authentication was provided. -
404 Returns an error if the resource can not be found. -
- */ - public okhttp3.Call newRefundAsync(String transactionId, TransactionRefundRequest transactionRefundRequest, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = newRefundValidateBeforeCall(transactionId, transactionRefundRequest, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for newTransaction - * @param idempotencyKey A unique key that identifies this request. Providing this header will make this an idempotent request. We recommend using V4 UUIDs, or another random string with enough entropy to avoid collisions. (optional) - * @param transactionRequest (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
201 Returns the created transaction. -
400 Returns an error if the request was badly formatted or missing required fields. -
401 Returns an error if no valid authentication was provided. -
409 Returns an error if duplicate resource has been found. -
- */ - public okhttp3.Call newTransactionCall(String idempotencyKey, TransactionRequest transactionRequest, final ApiCallback _callback) throws ApiException { - Object localVarPostBody = transactionRequest; - - // 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 (idempotencyKey != null) { - localVarHeaderParams.put("Idempotency-Key", localVarApiClient.parameterToString(idempotencyKey)); - } - - 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); - localVarHeaderParams.put("Content-Type", localVarContentType); - - String[] localVarAuthNames = new String[] { "BearerAuth" }; - return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call newTransactionValidateBeforeCall(String idempotencyKey, TransactionRequest transactionRequest, final ApiCallback _callback) throws ApiException { - - - okhttp3.Call localVarCall = newTransactionCall(idempotencyKey, transactionRequest, _callback); - return localVarCall; - - } - - /** - * New transaction - * Attempts to create an authorization for a payment method. In some cases it is not possible to create the authorization without redirecting the user for their authorization. In these cases the status is set to indicate buyer approval is pending and an approval URL is returned. - * @param idempotencyKey A unique key that identifies this request. Providing this header will make this an idempotent request. We recommend using V4 UUIDs, or another random string with enough entropy to avoid collisions. (optional) - * @param transactionRequest (optional) - * @return Transaction - * @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 Returns the created transaction. -
400 Returns an error if the request was badly formatted or missing required fields. -
401 Returns an error if no valid authentication was provided. -
409 Returns an error if duplicate resource has been found. -
- */ - public Transaction newTransaction(String idempotencyKey, TransactionRequest transactionRequest) throws ApiException { - ApiResponse localVarResp = newTransactionWithHttpInfo(idempotencyKey, transactionRequest); - return localVarResp.getData(); - } - - /** - * New transaction - * Attempts to create an authorization for a payment method. In some cases it is not possible to create the authorization without redirecting the user for their authorization. In these cases the status is set to indicate buyer approval is pending and an approval URL is returned. - * @param idempotencyKey A unique key that identifies this request. Providing this header will make this an idempotent request. We recommend using V4 UUIDs, or another random string with enough entropy to avoid collisions. (optional) - * @param transactionRequest (optional) - * @return ApiResponse<Transaction> - * @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 Returns the created transaction. -
400 Returns an error if the request was badly formatted or missing required fields. -
401 Returns an error if no valid authentication was provided. -
409 Returns an error if duplicate resource has been found. -
- */ - public ApiResponse newTransactionWithHttpInfo(String idempotencyKey, TransactionRequest transactionRequest) throws ApiException { - okhttp3.Call localVarCall = newTransactionValidateBeforeCall(idempotencyKey, transactionRequest, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * New transaction (asynchronously) - * Attempts to create an authorization for a payment method. In some cases it is not possible to create the authorization without redirecting the user for their authorization. In these cases the status is set to indicate buyer approval is pending and an approval URL is returned. - * @param idempotencyKey A unique key that identifies this request. Providing this header will make this an idempotent request. We recommend using V4 UUIDs, or another random string with enough entropy to avoid collisions. (optional) - * @param transactionRequest (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
201 Returns the created transaction. -
400 Returns an error if the request was badly formatted or missing required fields. -
401 Returns an error if no valid authentication was provided. -
409 Returns an error if duplicate resource has been found. -
- */ - public okhttp3.Call newTransactionAsync(String idempotencyKey, TransactionRequest transactionRequest, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = newTransactionValidateBeforeCall(idempotencyKey, transactionRequest, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for voidTransaction - * @param transactionId The ID for the transaction to get the information 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 Returns the voided transaction. -
400 Returns an error if the request was badly formatted or missing required fields. -
401 Returns an error if no valid authentication was provided. -
404 Returns an error if the resource can not be found. -
- */ - public okhttp3.Call voidTransactionCall(String transactionId, final ApiCallback _callback) throws ApiException { - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/transactions/{transaction_id}/void" - .replaceAll("\\{" + "transaction_id" + "\\}", 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/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - localVarHeaderParams.put("Content-Type", localVarContentType); - - String[] localVarAuthNames = new String[] { "BearerAuth" }; - return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call voidTransactionValidateBeforeCall(String transactionId, final ApiCallback _callback) throws ApiException { - - // verify the required parameter 'transactionId' is set - if (transactionId == null) { - throw new ApiException("Missing the required parameter 'transactionId' when calling voidTransaction(Async)"); - } - - - okhttp3.Call localVarCall = voidTransactionCall(transactionId, _callback); - return localVarCall; - - } - - /** - * Void transaction - * Voids a transaction. If the transaction was not yet successfully authorized, or was already captured, the void will not be processed. Captured transactions can be refunded instead. Voiding zero-amount authorized transactions is not supported. Once voided, the status of the transaction will be either `authorization_voided`, `authorization_void_pending`, or if the void fails the original status will remain. - * @param transactionId The ID for the transaction to get the information for. (required) - * @return Transaction - * @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 Returns the voided transaction. -
400 Returns an error if the request was badly formatted or missing required fields. -
401 Returns an error if no valid authentication was provided. -
404 Returns an error if the resource can not be found. -
- */ - public Transaction voidTransaction(String transactionId) throws ApiException { - ApiResponse localVarResp = voidTransactionWithHttpInfo(transactionId); - return localVarResp.getData(); - } - - /** - * Void transaction - * Voids a transaction. If the transaction was not yet successfully authorized, or was already captured, the void will not be processed. Captured transactions can be refunded instead. Voiding zero-amount authorized transactions is not supported. Once voided, the status of the transaction will be either `authorization_voided`, `authorization_void_pending`, or if the void fails the original status will remain. - * @param transactionId The ID for the transaction to get the information for. (required) - * @return ApiResponse<Transaction> - * @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 Returns the voided transaction. -
400 Returns an error if the request was badly formatted or missing required fields. -
401 Returns an error if no valid authentication was provided. -
404 Returns an error if the resource can not be found. -
- */ - public ApiResponse voidTransactionWithHttpInfo(String transactionId) throws ApiException { - okhttp3.Call localVarCall = voidTransactionValidateBeforeCall(transactionId, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Void transaction (asynchronously) - * Voids a transaction. If the transaction was not yet successfully authorized, or was already captured, the void will not be processed. Captured transactions can be refunded instead. Voiding zero-amount authorized transactions is not supported. Once voided, the status of the transaction will be either `authorization_voided`, `authorization_void_pending`, or if the void fails the original status will remain. - * @param transactionId The ID for the transaction to get the information 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 Returns the voided transaction. -
400 Returns an error if the request was badly formatted or missing required fields. -
401 Returns an error if no valid authentication was provided. -
404 Returns an error if the resource can not be found. -
- */ - public okhttp3.Call voidTransactionAsync(String transactionId, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = voidTransactionValidateBeforeCall(transactionId, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/src/main/java/com/gr4vy/api/openapi/VaultForwardApi.java b/src/main/java/com/gr4vy/api/openapi/VaultForwardApi.java deleted file mode 100644 index 1a4cd70..0000000 --- a/src/main/java/com/gr4vy/api/openapi/VaultForwardApi.java +++ /dev/null @@ -1,227 +0,0 @@ -/* - * Gr4vy API - * Welcome to the Gr4vy API reference documentation. Our API is still very much a work in product and subject to change. - * - * The version of the OpenAPI document: 1.1.0-beta - * Contact: code@gr4vy.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.gr4vy.api.openapi; - -import com.gr4vy.api.ApiCallback; -import com.gr4vy.api.ApiClient; -import com.gr4vy.api.ApiException; -import com.gr4vy.api.ApiResponse; -import com.gr4vy.api.Configuration; -import com.gr4vy.api.Pair; -import com.gr4vy.api.ProgressRequestBody; -import com.gr4vy.api.ProgressResponseBody; - -import com.google.gson.reflect.TypeToken; - -import java.io.IOException; - - -import com.gr4vy.api.model.Error401Unauthorized; -import com.gr4vy.api.model.ErrorGeneric; - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class VaultForwardApi { - private ApiClient localVarApiClient; - - public VaultForwardApi() { - this(Configuration.getDefaultApiClient()); - } - - public VaultForwardApi(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public ApiClient getApiClient() { - return localVarApiClient; - } - - public void setApiClient(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - /** - * Build call for makeVaultForward - * @param xVaultForwardPaymentMethods A comma-separated list of Payment Method IDs that can be used to fill in the request template. At least 1 must be given, and a maximum of 100 are accepted. (required) - * @param xVaultForwardUrl The URL to forward card data to. (required) - * @param xVaultForwardHttpMethod The HTTP method that is used when forwarding the request to the `x-vault-forward-url`. (required) - * @param xVaultForwardHeaderLeftCurlyBracketHEADERNAMERightCurlyBracket A header that is forwarded to the `x-vault-forward-url`. The header will be forwarded without the `x-vault-forward-header` part. For example, `x-vault-forward-header-x-frame-options: SAMEORIGIN` is forwarded as `x-frame-options: SAMEORIGIN`. (optional) - * @param xVaultForwardTimeout The number of seconds to wait before timing out when forwarding the request. (optional, default to 30) - * @param body Payload to forward in the request. (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 Returns the payload received from the forwarded request. If the request timed out or there was a network error, the payload will be empty instead. -
400 Returns an error if the request was badly formatted or missing required fields. -
401 Returns an error if no valid authentication was provided. -
- */ - public okhttp3.Call makeVaultForwardCall(String xVaultForwardPaymentMethods, String xVaultForwardUrl, String xVaultForwardHttpMethod, String xVaultForwardHeaderLeftCurlyBracketHEADERNAMERightCurlyBracket, Integer xVaultForwardTimeout, String body, final ApiCallback _callback) throws ApiException { - Object localVarPostBody = body; - - // create path and map variables - String localVarPath = "/vault-forward"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (xVaultForwardPaymentMethods != null) { - localVarHeaderParams.put("x-vault-forward-payment-methods", localVarApiClient.parameterToString(xVaultForwardPaymentMethods)); - } - - if (xVaultForwardUrl != null) { - localVarHeaderParams.put("x-vault-forward-url", localVarApiClient.parameterToString(xVaultForwardUrl)); - } - - if (xVaultForwardHttpMethod != null) { - localVarHeaderParams.put("x-vault-forward-http-method", localVarApiClient.parameterToString(xVaultForwardHttpMethod)); - } - - if (xVaultForwardHeaderLeftCurlyBracketHEADERNAMERightCurlyBracket != null) { - localVarHeaderParams.put("x-vault-forward-header-{HEADER_NAME}", localVarApiClient.parameterToString(xVaultForwardHeaderLeftCurlyBracketHEADERNAMERightCurlyBracket)); - } - - if (xVaultForwardTimeout != null) { - localVarHeaderParams.put("x-vault-forward-timeout", localVarApiClient.parameterToString(xVaultForwardTimeout)); - } - - 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); - localVarHeaderParams.put("Content-Type", localVarContentType); - - String[] localVarAuthNames = new String[] { "BearerAuth" }; - return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call makeVaultForwardValidateBeforeCall(String xVaultForwardPaymentMethods, String xVaultForwardUrl, String xVaultForwardHttpMethod, String xVaultForwardHeaderLeftCurlyBracketHEADERNAMERightCurlyBracket, Integer xVaultForwardTimeout, String body, final ApiCallback _callback) throws ApiException { - - // verify the required parameter 'xVaultForwardPaymentMethods' is set - if (xVaultForwardPaymentMethods == null) { - throw new ApiException("Missing the required parameter 'xVaultForwardPaymentMethods' when calling makeVaultForward(Async)"); - } - - // verify the required parameter 'xVaultForwardUrl' is set - if (xVaultForwardUrl == null) { - throw new ApiException("Missing the required parameter 'xVaultForwardUrl' when calling makeVaultForward(Async)"); - } - - // verify the required parameter 'xVaultForwardHttpMethod' is set - if (xVaultForwardHttpMethod == null) { - throw new ApiException("Missing the required parameter 'xVaultForwardHttpMethod' when calling makeVaultForward(Async)"); - } - - - okhttp3.Call localVarCall = makeVaultForwardCall(xVaultForwardPaymentMethods, xVaultForwardUrl, xVaultForwardHttpMethod, xVaultForwardHeaderLeftCurlyBracketHEADERNAMERightCurlyBracket, xVaultForwardTimeout, body, _callback); - return localVarCall; - - } - - /** - * Forward PCI data - * Forward an API call to a PCI endpoint. The request body is evaluated and any template fields are replaced by the card data before the request is sent to the given destination. - * @param xVaultForwardPaymentMethods A comma-separated list of Payment Method IDs that can be used to fill in the request template. At least 1 must be given, and a maximum of 100 are accepted. (required) - * @param xVaultForwardUrl The URL to forward card data to. (required) - * @param xVaultForwardHttpMethod The HTTP method that is used when forwarding the request to the `x-vault-forward-url`. (required) - * @param xVaultForwardHeaderLeftCurlyBracketHEADERNAMERightCurlyBracket A header that is forwarded to the `x-vault-forward-url`. The header will be forwarded without the `x-vault-forward-header` part. For example, `x-vault-forward-header-x-frame-options: SAMEORIGIN` is forwarded as `x-frame-options: SAMEORIGIN`. (optional) - * @param xVaultForwardTimeout The number of seconds to wait before timing out when forwarding the request. (optional, default to 30) - * @param body Payload to forward in the request. (optional) - * @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 Returns the payload received from the forwarded request. If the request timed out or there was a network error, the payload will be empty instead. -
400 Returns an error if the request was badly formatted or missing required fields. -
401 Returns an error if no valid authentication was provided. -
- */ - public String makeVaultForward(String xVaultForwardPaymentMethods, String xVaultForwardUrl, String xVaultForwardHttpMethod, String xVaultForwardHeaderLeftCurlyBracketHEADERNAMERightCurlyBracket, Integer xVaultForwardTimeout, String body) throws ApiException { - ApiResponse localVarResp = makeVaultForwardWithHttpInfo(xVaultForwardPaymentMethods, xVaultForwardUrl, xVaultForwardHttpMethod, xVaultForwardHeaderLeftCurlyBracketHEADERNAMERightCurlyBracket, xVaultForwardTimeout, body); - return localVarResp.getData(); - } - - /** - * Forward PCI data - * Forward an API call to a PCI endpoint. The request body is evaluated and any template fields are replaced by the card data before the request is sent to the given destination. - * @param xVaultForwardPaymentMethods A comma-separated list of Payment Method IDs that can be used to fill in the request template. At least 1 must be given, and a maximum of 100 are accepted. (required) - * @param xVaultForwardUrl The URL to forward card data to. (required) - * @param xVaultForwardHttpMethod The HTTP method that is used when forwarding the request to the `x-vault-forward-url`. (required) - * @param xVaultForwardHeaderLeftCurlyBracketHEADERNAMERightCurlyBracket A header that is forwarded to the `x-vault-forward-url`. The header will be forwarded without the `x-vault-forward-header` part. For example, `x-vault-forward-header-x-frame-options: SAMEORIGIN` is forwarded as `x-frame-options: SAMEORIGIN`. (optional) - * @param xVaultForwardTimeout The number of seconds to wait before timing out when forwarding the request. (optional, default to 30) - * @param body Payload to forward in the request. (optional) - * @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 Returns the payload received from the forwarded request. If the request timed out or there was a network error, the payload will be empty instead. -
400 Returns an error if the request was badly formatted or missing required fields. -
401 Returns an error if no valid authentication was provided. -
- */ - public ApiResponse makeVaultForwardWithHttpInfo(String xVaultForwardPaymentMethods, String xVaultForwardUrl, String xVaultForwardHttpMethod, String xVaultForwardHeaderLeftCurlyBracketHEADERNAMERightCurlyBracket, Integer xVaultForwardTimeout, String body) throws ApiException { - okhttp3.Call localVarCall = makeVaultForwardValidateBeforeCall(xVaultForwardPaymentMethods, xVaultForwardUrl, xVaultForwardHttpMethod, xVaultForwardHeaderLeftCurlyBracketHEADERNAMERightCurlyBracket, xVaultForwardTimeout, body, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Forward PCI data (asynchronously) - * Forward an API call to a PCI endpoint. The request body is evaluated and any template fields are replaced by the card data before the request is sent to the given destination. - * @param xVaultForwardPaymentMethods A comma-separated list of Payment Method IDs that can be used to fill in the request template. At least 1 must be given, and a maximum of 100 are accepted. (required) - * @param xVaultForwardUrl The URL to forward card data to. (required) - * @param xVaultForwardHttpMethod The HTTP method that is used when forwarding the request to the `x-vault-forward-url`. (required) - * @param xVaultForwardHeaderLeftCurlyBracketHEADERNAMERightCurlyBracket A header that is forwarded to the `x-vault-forward-url`. The header will be forwarded without the `x-vault-forward-header` part. For example, `x-vault-forward-header-x-frame-options: SAMEORIGIN` is forwarded as `x-frame-options: SAMEORIGIN`. (optional) - * @param xVaultForwardTimeout The number of seconds to wait before timing out when forwarding the request. (optional, default to 30) - * @param body Payload to forward in the request. (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 Returns the payload received from the forwarded request. If the request timed out or there was a network error, the payload will be empty instead. -
400 Returns an error if the request was badly formatted or missing required fields. -
401 Returns an error if no valid authentication was provided. -
- */ - public okhttp3.Call makeVaultForwardAsync(String xVaultForwardPaymentMethods, String xVaultForwardUrl, String xVaultForwardHttpMethod, String xVaultForwardHeaderLeftCurlyBracketHEADERNAMERightCurlyBracket, Integer xVaultForwardTimeout, String body, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = makeVaultForwardValidateBeforeCall(xVaultForwardPaymentMethods, xVaultForwardUrl, xVaultForwardHttpMethod, xVaultForwardHeaderLeftCurlyBracketHEADERNAMERightCurlyBracket, xVaultForwardTimeout, body, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/src/main/java/com/gr4vy/sdk/Gr4vyClient.java b/src/main/java/com/gr4vy/sdk/Gr4vyClient.java index 188ee5e..6cfe2e8 100644 --- a/src/main/java/com/gr4vy/sdk/Gr4vyClient.java +++ b/src/main/java/com/gr4vy/sdk/Gr4vyClient.java @@ -27,9 +27,8 @@ import org.bouncycastle.openssl.PEMParser; import org.bouncycastle.openssl.jcajce.JcaPEMKeyConverter; -import com.gr4vy.api.ApiClient; -import com.gr4vy.api.Configuration; -import com.gr4vy.api.auth.*; +import com.google.gson.Gson; +import com.gr4vy.api.model.*; import com.nimbusds.jose.JOSEException; import com.nimbusds.jose.JWSAlgorithm; import com.nimbusds.jose.JWSHeader; @@ -40,6 +39,13 @@ import com.nimbusds.jwt.JWTClaimsSet; import com.nimbusds.jwt.SignedJWT; +import okhttp3.Call; +import okhttp3.MediaType; +import okhttp3.OkHttpClient; +import okhttp3.Request; +import okhttp3.RequestBody; +import okhttp3.Response; + public class Gr4vyClient { private String gr4vyId; private String privateKeyLocation; @@ -48,7 +54,11 @@ public class Gr4vyClient { private Boolean debug = false; private String merchantAccountId = "default"; private UUID checkoutSessionId; - + private final Gson gson = new Gson(); + + public static final MediaType JSON + = MediaType.parse("application/json; charset=utf-8"); + /** * Constructor */ @@ -87,26 +97,6 @@ public void setMerchantAccountId(String merchantAccountId) { public void setHost(String host) { this.host = host; } - public ApiClient getClient() throws Gr4vyException { - try { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath(this.host); - defaultClient.addDefaultHeader("X-GR4VY-MERCHANT-ACCOUNT-ID", this.merchantAccountId); - - String key = getKey(); - - String[] scopes = {"*.read", "*.write"}; - - String token = getToken(key, scopes, null, null); - - HttpBearerAuth BearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("BearerAuth"); - BearerAuth.setBearerToken(token); - - return defaultClient; - } catch (Exception e) { - throw new Gr4vyException("Error while generating token, please make sure your private key is valid."); - } - } public String getEmbedToken(Map embed) throws Gr4vyException { return getEmbedToken(embed, null); @@ -200,4 +190,249 @@ public String getKey() { } } } + + private String get(String endpoint) throws Gr4vyException { + String[] scopes = {"*.read", "*.write"}; + String accessToken = null; + try { + accessToken = this.getToken(this.getKey(), scopes, null); + } catch (Exception e2) { + throw new Gr4vyException("Unable to generate token: " + e2.getMessage()); + } + + OkHttpClient client = new OkHttpClient.Builder().build(); + + Request request = new Request.Builder() + .url(this.host + endpoint) + .addHeader("Authorization", "Bearer " + accessToken) + .addHeader("X-GR4VY-MERCHANT-ACCOUNT-ID", this.merchantAccountId) + .addHeader("Content-Type", "application/json") + .build(); + + Call call = client.newCall(request); + Response response = null; + try { + response = call.execute(); + } catch (IOException e1) { + e1.printStackTrace(); + } + + if (response == null) throw new Gr4vyException("response was null"); + + String responseData = null; + try { + responseData = response.body().string(); + } catch (IOException e1) { } + + if (!response.isSuccessful()) throw new Gr4vyException("response was not successful: " + responseData); + + return responseData; + } + + private String post(String endpoint, String jsonBody) throws Gr4vyException { + String[] scopes = {"*.read", "*.write"}; + String accessToken = null; + try { + accessToken = this.getToken(this.getKey(), scopes, null); + } catch (Exception e2) { + throw new Gr4vyException("Unable to generate token: " + e2.getMessage()); + } + + OkHttpClient client = new OkHttpClient.Builder().build(); + + Request.Builder requestBuilder = new Request.Builder() + .url(this.host + endpoint) + .addHeader("Authorization", "Bearer " + accessToken) + .addHeader("X-GR4VY-MERCHANT-ACCOUNT-ID", this.merchantAccountId) + .addHeader("Content-Type", "application/json"); + + if (jsonBody != null) { + RequestBody body = RequestBody.create(jsonBody, JSON); + requestBuilder.post(body); + } + else { + RequestBody body = RequestBody.create(new byte[0], null); + requestBuilder.post(body); + } + + Request request = requestBuilder.build(); + + + Call call = client.newCall(request); + Response response = null; + try { + response = call.execute(); + } catch (IOException e1) { + e1.printStackTrace(); + } + + if (response == null) throw new Gr4vyException("response was null"); + + String responseData = null; + try { + responseData = response.body().string(); + } catch (IOException e1) { } + + if (!response.isSuccessful()) throw new Gr4vyException("response was not successful: " + responseData); + + return responseData; + } + + private String put(String endpoint, String jsonBody) throws Gr4vyException { + String[] scopes = {"*.read", "*.write"}; + String accessToken = null; + try { + accessToken = this.getToken(this.getKey(), scopes, null); + } catch (Exception e2) { + throw new Gr4vyException("Unable to generate token: " + e2.getMessage()); + } + + OkHttpClient client = new OkHttpClient.Builder().build(); + + Request.Builder requestBuilder = new Request.Builder() + .url(this.host + endpoint) + .addHeader("Authorization", "Bearer " + accessToken) + .addHeader("X-GR4VY-MERCHANT-ACCOUNT-ID", this.merchantAccountId) + .addHeader("Content-Type", "application/json"); + + if (jsonBody != null) { + RequestBody body = RequestBody.create(jsonBody, JSON); + requestBuilder.put(body); + } + else { + RequestBody body = RequestBody.create(new byte[0], null); + requestBuilder.put(body); + } + + Request request = requestBuilder.build(); + + + Call call = client.newCall(request); + Response response = null; + try { + response = call.execute(); + } catch (IOException e1) { + e1.printStackTrace(); + } + + if (response == null) throw new Gr4vyException("response was null"); + + String responseData = null; + try { + responseData = response.body().string(); + } catch (IOException e1) { } + + if (!response.isSuccessful()) throw new Gr4vyException("response was not successful: " + responseData); + + return responseData; + } + + private boolean delete(String endpoint) throws Gr4vyException { + String[] scopes = {"*.read", "*.write"}; + String accessToken = null; + try { + accessToken = this.getToken(this.getKey(), scopes, null); + } catch (Exception e2) { + throw new Gr4vyException("Unable to generate token: " + e2.getMessage()); + } + + OkHttpClient client = new OkHttpClient.Builder().build(); + + Request.Builder requestBuilder = new Request.Builder() + .url(this.host + endpoint) + .addHeader("Authorization", "Bearer " + accessToken) + .addHeader("X-GR4VY-MERCHANT-ACCOUNT-ID", this.merchantAccountId) + .addHeader("Content-Type", "application/json") + .delete(); + + + Request request = requestBuilder.build(); + + Call call = client.newCall(request); + Response response = null; + try { + response = call.execute(); + } catch (IOException e1) { + e1.printStackTrace(); + } + + if (response == null) throw new Gr4vyException("response was null"); + + if (!response.isSuccessful()) { + String responseData = null; + try { + responseData = response.body().string(); + } catch (IOException e1) { } + + throw new Gr4vyException("response was not successful: " + responseData); + + } + + return true; + } + + public Buyer newBuyer(BuyerRequest request) { + String response = this.post("/buyers", this.gson.toJson(request)); + return this.gson.fromJson(response,Buyer.class); + } + public Buyer getBuyer(String buyerId) { + String response = this.get("/buyers/" + buyerId); + return this.gson.fromJson(response,Buyer.class); + } + public Buyer updateBuyer(String buyerId, BuyerUpdate request) { + String response = this.put("/buyers/" + buyerId, this.gson.toJson(request)); + return this.gson.fromJson(response,Buyer.class); + } + public Buyers listBuyers() { + String response = this.get("/buyers"); + return this.gson.fromJson(response,Buyers.class); + } + public boolean deleteBuyer(String buyerId) { + return this.delete("/buyers/" + buyerId); + } + + public PaymentMethod storePaymentMethod(PaymentMethodRequest request) { + String response = this.post("/payment-methods", this.gson.toJson(request)); + return this.gson.fromJson(response,PaymentMethod.class); + } + public PaymentMethod getPaymentMethod(String paymentMethodId) { + String response = this.get("/payment-methods/" + paymentMethodId); + return this.gson.fromJson(response,PaymentMethod.class); + } + public PaymentMethods listPaymentMethods() { + String response = this.get("/payment-methods"); + return this.gson.fromJson(response,PaymentMethods.class); + } + public PaymentMethods listBuyerPaymentMethods(String buyerId) { + String response = this.get("/buyers/payment-methods?buyer_id=" + buyerId); + return this.gson.fromJson(response,PaymentMethods.class); + } + public boolean deletePaymentMethod(String paymentMethodId) { + return this.delete("/payment-methods/" + paymentMethodId); + } + + public Transaction newTransaction(TransactionRequest request) { + String response = this.post("/transactions", this.gson.toJson(request)); + return this.gson.fromJson(response,Transaction.class); + } + public Transaction getTransaction(String transactionId) { + String response = this.get("/transactions/" + transactionId); + return this.gson.fromJson(response,Transaction.class); + } + public Transaction captureTransaction(String transactionId, TransactionCaptureRequest request) { + String response = this.post("/transactions/" + transactionId + "/capture", this.gson.toJson(request)); + return this.gson.fromJson(response,Transaction.class); + } + public Transactions listTransactions() { + String response = this.get("/transactions"); + return this.gson.fromJson(response,Transactions.class); + } + public Transaction refundTransaction(String transactionId, TransactionRefundRequest request) { + String response = this.post("/transactions/" + transactionId + "/refund", this.gson.toJson(request)); + return this.gson.fromJson(response,Transaction.class); + } + public CheckoutSession newCheckoutSession(CheckoutSessionRequest request) { + String response = this.post("/checkout/sessions", this.gson.toJson(request)); + return this.gson.fromJson(response,CheckoutSession.class); + } } diff --git a/src/test/java/com/gr4vy/sdk/Gr4vyClientTest.java b/src/test/java/com/gr4vy/sdk/Gr4vyClientTest.java index 480a243..25c02b7 100644 --- a/src/test/java/com/gr4vy/sdk/Gr4vyClientTest.java +++ b/src/test/java/com/gr4vy/sdk/Gr4vyClientTest.java @@ -10,16 +10,15 @@ import org.junit.Test; -import com.gr4vy.api.ApiException; import com.gr4vy.api.model.*; -import com.gr4vy.api.openapi.BuyersApi; -import com.gr4vy.api.openapi.CheckoutSessionsApi; +import com.gr4vy.api.model.TransactionPaymentMethodRequest.MethodEnum; +import com.gr4vy.api.model.TransactionRequest.IntentEnum; import com.nimbusds.jose.JOSEException; public class Gr4vyClientTest { @Test - public void getEmbedTokenTest() throws Gr4vyException, ApiException { + public void getEmbedTokenTest() throws Gr4vyException { Gr4vyClient client = new Gr4vyClient("spider", "private_key.pem"); Map embed = new HashMap(); @@ -31,54 +30,231 @@ public void getEmbedTokenTest() throws Gr4vyException, ApiException { } @Test - public void getEmbedTokenTestWithCheckoutSessionPassedIn() throws Gr4vyException, ApiException { - Gr4vyClient client = new Gr4vyClient("spider", "private_key.pem"); + public void getEmbedTokenTestWithCheckoutSessionPassedIn() throws Gr4vyException { + Gr4vyClient client = new Gr4vyClient("spider", "private_key.pem"); + + CheckoutSession checkoutSession = client.newCheckoutSession(null); Map embed = new HashMap(); embed.put("amount", 1299); embed.put("currency", "USD"); - - CheckoutSessionsApi checkoutSessionsApi = new CheckoutSessionsApi(client.getClient()); - CheckoutSession checkoutSession = checkoutSessionsApi.newCheckoutSession(new CheckoutSessionCreateRequest()); - - String token = client.getEmbedToken(embed, checkoutSession.getId()); - assert token != null; - } + + String token = client.getEmbedToken(embed, checkoutSession.getId()); + assert token != null; + } @Test - public void getTokenTest() throws Gr4vyException, ApiException, NoSuchAlgorithmException, NoSuchProviderException, InvalidKeySpecException, IOException, JOSEException, ParseException { + public void getTokenTest() throws Gr4vyException, NoSuchAlgorithmException, NoSuchProviderException, InvalidKeySpecException, IOException, JOSEException, ParseException { Gr4vyClient client = new Gr4vyClient("spider", "private_key.pem", "sandbox"); String key = client.getKey(); String[] scopes = {"*.read", "*.write"}; String token = client.getToken(key, scopes, null); - System.out.println(token); +// System.out.println(token); assert token != null; } @Test - public void addBuyersTest() throws Gr4vyException, ApiException { + public void addBuyersTest() throws Gr4vyException { + Gr4vyClient client = new Gr4vyClient("spider", "private_key.pem", "sandbox"); + BuyerRequest buyer = new BuyerRequest(); + buyer.setDisplayName("newJava Test"); + Buyer response = client.newBuyer(buyer); + assert response.getId() != null; + } + + @Test + public void updateBuyersTest() throws Gr4vyException { + Gr4vyClient client = new Gr4vyClient("spider", "private_key.pem", "sandbox"); + BuyerRequest buyer = new BuyerRequest(); + buyer.setDisplayName("newJava Test"); + Buyer response = client.newBuyer(buyer); + + BuyerUpdate update = new BuyerUpdate(); + update.setDisplayName("NewJava Test2"); + response = client.updateBuyer(response.getId().toString(), update); + + System.out.println(response); + assert response.getId() != null; + assert response.getDisplayName().equals("NewJava Test2"); + + assert client.deleteBuyer(response.getId().toString()); + + } + + @Test + public void listBuyersTest() throws Gr4vyException { Gr4vyClient client = new Gr4vyClient("spider", "private_key.pem", "sandbox"); - BuyersApi api = new BuyersApi(client.getClient()); - BuyerRequest buyer = new BuyerRequest(); - buyer.setDisplayName("Java Test"); - Buyer response = api.newBuyer(buyer); - + +// String search = null; +// Integer limit = null; +// String cursor = null; + Buyers response = client.listBuyers(); + + System.out.println(response); assert response != null; } +// @Test +// public void newCheckoutSessionTransactionTest() throws Gr4vyException { +// //Test cannot be run because checkout session is empty +// Gr4vyClient client = new Gr4vyClient("spider", "private_key.pem", "sandbox"); +// +// CheckoutSession checkoutSession = client.newCheckoutSession(null); +// +// TransactionPaymentMethodRequest pm = new TransactionPaymentMethodRequest() +// .method(MethodEnum.CHECKOUT_SESSION) +// .id(checkoutSession.getId().toString()); +// +// TransactionRequest request = new TransactionRequest() +// .amount(100) +// .currency("GBP") +// .paymentMethod(pm); +// +// Transaction response = client.newTransaction(request); +// System.out.println(response); +// assert response != null; +// } + +// @Test +// public void newTransactionTest() throws Gr4vyException { +// Gr4vyClient client = new Gr4vyClient("spider", "private_key.pem", "sandbox"); +// +// TransactionPaymentMethodRequest pm = new TransactionPaymentMethodRequest() +// .method(MethodEnum.CARD) +// .number("4111111111111111") +// .securityCode("123") +// .expirationDate("12/23"); +// +// TransactionRequest request = new TransactionRequest() +// .amount(100) +// .currency("GBP") +// .paymentMethod(pm); +// +// Transaction response = client.newTransaction(request); +// System.out.println(response); +// assert response != null; +// } + +// @Test +// public void captureTransactionTest() throws Gr4vyException { +// Gr4vyClient client = new Gr4vyClient("spider", "private_key.pem", "sandbox"); +// +// TransactionPaymentMethodRequest pm = new TransactionPaymentMethodRequest() +// .method(MethodEnum.CARD) +// .number("4111111111111111") +// .securityCode("123") +// .expirationDate("12/23"); +// +// TransactionRequest request = new TransactionRequest() +// .amount(100) +// .currency("USD") +// .paymentMethod(pm) +// .intent(IntentEnum.AUTHORIZE); +// +// Transaction response = client.newTransaction(request); +// System.out.println(response); +// assert response != null; +// +// TransactionCaptureRequest capture = new TransactionCaptureRequest() +// .amount(100); +// Transaction captureResponse = client.captureTransaction(response.getId().toString(), capture); +// System.out.println(captureResponse); +// assert captureResponse != null; +// } + + @Test + public void newRedirectTransactionTest() throws Gr4vyException { + //Test cannot be run because checkout session is empty + Gr4vyClient client = new Gr4vyClient("spider", "private_key.pem", "sandbox"); + + TransactionPaymentMethodRequest pm = new TransactionPaymentMethodRequest() + .method(MethodEnum.PAYPAL) + .redirectUrl("https://gr4vy.com") + .currency("GBP") + .country("GB"); + + TransactionRequest request = new TransactionRequest() + .amount(100) + .currency("GBP") + .paymentMethod(pm); + + Transaction response = client.newTransaction(request); + System.out.println(response); + assert response != null; + } + +// @Test +// public void newStoredTransactionTest() throws Gr4vyException { +// //Test cannot be run because checkout session is empty +// Gr4vyClient client = new Gr4vyClient("spider", "private_key.pem", "sandbox"); +// +// TransactionPaymentMethodRequest pm = new TransactionPaymentMethodRequest() +// .id("my_stored_uuid"); +// +// TransactionRequest request = new TransactionRequest() +// .amount(100) +// .currency("GBP") +// .paymentMethod(pm); +// +// Transaction response = client.newTransaction(request); +// System.out.println(response); +// assert response != null; +// } + @Test - public void listBuyersTest() throws Gr4vyException, ApiException { + public void listTransactionsTest() throws Gr4vyException { Gr4vyClient client = new Gr4vyClient("spider", "private_key.pem", "sandbox"); - BuyersApi api = new BuyersApi(client.getClient()); - String search = null; - Integer limit = null; - String cursor = null; - Buyers response = api.listBuyers(search, limit, cursor); - - // System.out.println(response); +// String search = null; +// Integer limit = null; +// String cursor = null; + Transactions response = client.listTransactions(); + + System.out.println(response); assert response != null; } + + @Test + public void storePaymentMethodTest() throws Gr4vyException { + Gr4vyClient client = new Gr4vyClient("spider", "private_key.pem", "sandbox"); + PaymentMethodRequest pm = new PaymentMethodRequest() + .method("card") + .number("4111111111111111") + .expirationDate("12/24"); + + PaymentMethod response = client.storePaymentMethod(pm); + System.out.println(response); + assert response.getId() != null; + } + + @Test + public void getPaymentMethodTest() throws Gr4vyException { + Gr4vyClient client = new Gr4vyClient("spider", "private_key.pem", "sandbox"); + + PaymentMethod response = client.getPaymentMethod("eeefe91c-9449-4730-81a4-85cd59e8d72a"); + System.out.println(response); + assert response.getId() != null; + } + + @Test + public void listPaymentMethodsTest() throws Gr4vyException { + Gr4vyClient client = new Gr4vyClient("spider", "private_key.pem", "sandbox"); + + PaymentMethods response = client.listPaymentMethods(); + System.out.println(response); + assert response != null; + } + +// @Test +// public void listBuyerPaymentMethodsTest() throws Gr4vyException { +// Gr4vyClient client = new Gr4vyClient("spider", "private_key.pem", "sandbox"); +// +// PaymentMethods response = client.listBuyerPaymentMethods(""); +// System.out.println(response); +// assert response != null; +// } + + } \ No newline at end of file