diff --git a/Makefile b/Makefile index be081157d..7978a40e5 100644 --- a/Makefile +++ b/Makefile @@ -28,9 +28,9 @@ payment: smallServiceName=PaymentApi recurring: spec=RecurringService-v68 recurring: smallServiceName=RecurringApi payout: spec=PayoutService-v68 -management: spec=ManagementService-v1 +management: spec=ManagementService-v3 balanceplatform: spec=BalancePlatformService-v2 -transfers: spec=TransferService-v3 +transfers: spec=TransferService-v4 legalentitymanagement: spec=LegalEntityService-v3 # Classic Platforms marketpayaccount: spec=AccountService-v6 @@ -46,9 +46,9 @@ marketpaywebhooks: spec=MarketPayNotificationService-v6 acswebhooks: spec=BalancePlatformAcsNotification-v1 configurationwebhooks: spec=BalancePlatformConfigurationNotification-v1 reportwebhooks: spec=BalancePlatformReportNotification-v1 -transferwebhooks: spec=BalancePlatformTransferNotification-v3 +transferwebhooks: spec=BalancePlatformTransferNotification-v4 # Management Webhooks -managementwebhooks: spec=ManagementNotificationService-v1 +managementwebhooks: spec=ManagementNotificationService-v3 # Disputes disputes: spec=DisputeService-v30 disputes: smallServiceName=DisputesApi @@ -67,7 +67,8 @@ $(modelGen): target/spec $(openapi-generator-jar) --library $(library) \ --global-property modelDocs=false \ --global-property modelTests=false \ - --inline-schema-name-mappings DonationPaymentRequest_paymentMethod=CheckoutPaymentMethod \ + --inline-schema-name-mappings PaymentRequest_paymentMethod=CheckoutPaymentMethod \ + --inline-schema-name-mappings DonationPaymentRequest_paymentMethod=DonationPaymentMethod \ --additional-properties=dateLibrary=java8 \ --additional-properties=openApiNullable=false \ --additional-properties=resourceClass=$(resourceClass)Resource @@ -97,7 +98,8 @@ $(bigServices): target/spec $(openapi-generator-jar) --api-name-suffix Api \ --global-property modelDocs=false \ --global-property modelTests=false \ - --inline-schema-name-mappings DonationPaymentRequest_paymentMethod=CheckoutPaymentMethod \ + --inline-schema-name-mappings PaymentRequest_paymentMethod=CheckoutPaymentMethod \ + --inline-schema-name-mappings DonationPaymentRequest_paymentMethod=DonationPaymentMethod \ --additional-properties=dateLibrary=java8 \ --additional-properties=openApiNullable=false mv $(output)/$(models)/$@ $(models)/$@ @@ -124,7 +126,8 @@ $(singleFileServices): target/spec $(openapi-generator-jar) --api-name-suffix Api \ --global-property modelDocs=false \ --global-property modelTests=false \ - --inline-schema-name-mappings DonationPaymentRequest_paymentMethod=CheckoutPaymentMethod \ + --inline-schema-name-mappings PaymentRequest_paymentMethod=CheckoutPaymentMethod \ + --inline-schema-name-mappings DonationPaymentRequest_paymentMethod=DonationPaymentMethod \ --additional-properties=dateLibrary=java8 \ --additional-properties=openApiNullable=false \ --additional-properties=smallServiceName=$(smallServiceName) diff --git a/README.md b/README.md index 6a7ac346b..cdce65bab 100644 --- a/README.md +++ b/README.md @@ -19,13 +19,13 @@ The Library supports all APIs under the following services: | [DataProtection API](https://docs.adyen.com/development-resources/data-protection-api) | Adyen Data Protection API provides a way for you to process [Subject Erasure Requests](https://gdpr-info.eu/art-17-gdpr/) as mandated in GDPR. Use our API to submit a request to delete shopper's data, including payment details and other related information (for example, delivery address or shopper email) | DataProtection | **v1** | | [Legal Entity Management API](https://docs.adyen.com/api-explorer/legalentity/3/overview) | Manage legal entities that contain information required for verification. | legalentitymanagement package subclasses | **v3** | | [Local/Cloud-based Terminal API](https://docs.adyen.com/point-of-sale/terminal-api-reference) | Our point-of-sale integration. | TerminalLocalAPI or TerminalCloudAPI | - | -| [Management API](https://docs.adyen.com/api-explorer/Management/1/overview) | Configure and manage your Adyen company and merchant accounts, stores, and payment terminals. | management package subclasses | **v1** | +| [Management API](https://docs.adyen.com/api-explorer/Management/3/overview) | Configure and manage your Adyen company and merchant accounts, stores, and payment terminals. | management package subclasses | **v3** | | [Payments API](https://docs.adyen.com/api-explorer/Payment/68/overview) | Our classic integration for online payments. | Payment | **v68** | | [Payouts API](https://docs.adyen.com/api-explorer/Payout/68/overview) | Endpoints for sending funds to your customers. | Payout | **v68** | | [POS Terminal Management API](https://docs.adyen.com/api-explorer/postfmapi/1/overview) | Endpoints for managing your point-of-sale payment terminals. | TerminalManagement | **v1** | | [Recurring API](https://docs.adyen.com/api-explorer/Recurring/68/overview) | Endpoints for managing saved payment details. | Recurring | **v68** | | [Stored Value API](https://docs.adyen.com/payment-methods/gift-cards/stored-value-api) | Manage both online and point-of-sale gift cards and other stored-value cards. | StoredValue | **v46** | -| [Transfers API](https://docs.adyen.com/api-explorer/transfers/3/overview) | The Transfers API provides endpoints that can be used to get information about all your transactions, move funds within your balance platform or send funds from your balance platform to a transfer instrument. | Transfers | **v3** | +| [Transfers API](https://docs.adyen.com/api-explorer/transfers/4/overview) | The Transfers API provides endpoints that can be used to get information about all your transactions, move funds within your balance platform or send funds from your balance platform to a transfer instrument. | Transfers | **v4** | | [Webhooks](https://docs.adyen.com/api-explorer/Webhooks/1/overview) | Adyen uses webhooks to send notifications about payment status updates, newly available reports, and other events that can be subscribed to. For more information, refer to our [documentation](https://docs.adyen.com/development-resources/webhooks). | *Models only* | **v1** | | [Classic Platforms Account API](https://docs.adyen.com/api-explorer/Account/6/overview) | This API is used for the classic integration. If you are just starting your implementation, refer to our new integration guide instead. | ClassicPlatformAccountApi | **v6** | | [Classic Platforms Fund API](https://docs.adyen.com/api-explorer/Fund/6/overview) | This API is used for the classic integration. If you are just starting your implementation, refer to our new integration guide instead. | ClassicPlatformFundApi | **v6** | @@ -40,10 +40,10 @@ The library supports all webhooks under the following model directories: |---------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------|-------------------| | [Authentication Webhooks](https://docs.adyen.com/api-explorer/acs-webhook/1/overview) | Adyen sends this webhook when the process of cardholder authentication is finalized, whether it is completed successfully, fails, or expires. | [acswebhooks](src/main/java/com/adyen/model/acswebhooks) | **v1** | | [Configuration Webhooks](https://docs.adyen.com/api-explorer/balanceplatform-webhooks/1/overview) | You can use these webhooks to build your implementation. For example, you can use this information to update internal statuses when the status of a capability is changed. | [configurationwebhooks](src/main/java/com/adyen/model/configurationwebhooks) | **v1** | -| [Transfer Webhooks](https://docs.adyen.com/api-explorer/transfer-webhooks/3/overview) | You can use these webhooks to build your implementation. For example, you can use this information to update balances in your own dashboards or to keep track of incoming funds. | [transferwebhooks](src/main/java/com/adyen/model/transferwebhooks) | **v3** | +| [Transfer Webhooks](https://docs.adyen.com/api-explorer/transfer-webhooks/4/overview) | You can use these webhooks to build your implementation. For example, you can use this information to update balances in your own dashboards or to keep track of incoming funds. | [transferwebhooks](src/main/java/com/adyen/model/transferwebhooks) | **v4** | | [Report Webhooks](https://docs.adyen.com/api-explorer/report-webhooks/1/overview) | You can download reports programmatically by making an HTTP GET request, or manually from your Balance Platform Customer Area | [reportwebhooks](src/main/java/com/adyen/model/reportwebhooks) | **v1** | | [Notification Webhooks](https://docs.adyen.com/api-explorer/Webhooks/1/overview) | We use webhooks to send you updates about payment status updates, newly available reports, and other events that you can subscribe to. For more information, refer to our documentation | [notification](src/main/java/com/adyen/model/notification) | **v1** | -| [Management Webhooks](https://docs.adyen.com/api-explorer/ManagementNotification/1/overview) | Adyen uses webhooks to inform your system about events that happen with your Adyen company and merchant accounts, stores, payment terminals, and payment methods when using Management API | [managementwebhooks](src/main/java/com/adyen/model/managementwebhooks) | **v1** | +| [Management Webhooks](https://docs.adyen.com/api-explorer/ManagementNotification/3/overview) | Adyen uses webhooks to inform your system about events that happen with your Adyen company and merchant accounts, stores, payment terminals, and payment methods when using Management API | [managementwebhooks](src/main/java/com/adyen/model/managementwebhooks) | **v3** | | [Classic Platform Webhooks](https://docs.adyen.com/api-explorer/Notification/6/overview#retry) | The Notification API sends notifications to the endpoints specified in a given subscription. Subscriptions are managed through the Notification Configuration API. The API specifications listed here detail the format of each notification. | [marketpaywebhooks](src/main/java/com/adyen/model/marketpaywebhooks) | **v6** | For more information, refer to our [documentation](https://docs.adyen.com/) or @@ -65,7 +65,7 @@ You can use Maven and add this dependency to your project's POM: com.adyen adyen-java-api-library - 21.6.0 + 22.0.0-beta ``` @@ -231,6 +231,31 @@ System.setProperty("https.proxyUser", "squid"); System.setProperty("https.proxyPassword", "ward"); ~~~~ +### Client certificate authentication +~~~~ java +// Import the required classes +import com.adyen.Client; +import javax.net.ssl.KeyManagerFactory; +import javax.net.ssl.SSLContext; +import javax.net.ssl.TrustManagerFactory; +import java.security.KeyStore; + +// Initialize a KeyManagerFactory with the client KeyStore and password +KeyManagerFactory keyManagerFactory = KeyManagerFactory.getInstance(KeyManagerFactory.getDefaultAlgorithm()); +keyManagerFactory.init(clientKeyStore, clientKeyStorePassword); + +// Create a TrustManagerFactory that trusts the CAs in our Trust KeyStore +TrustManagerFactory trustManagerFactory = TrustManagerFactory.getInstance(TrustManagerFactory.getDefaultAlgorithm()); +trustManagerFactory.init(trustStore); + +// Create an SSLContext with the desired protocol that uses our KeyManagers and TrustManagers +SSLContext sslContext = SSLContext.getInstance("TLSv1.2"); +sslContext.init(keyManagerFactory.getKeyManagers(), trustManagerFactory.getTrustManagers(), null); + +Client client = new Client(sslContext, apiKey); +// Use the client +~~~~ + ## Using the Cloud Terminal API Integration In order to submit In-Person requests with [Terminal API over Cloud](https://docs.adyen.com/point-of-sale/design-your-integration/choose-your-architecture/cloud/) you need to initialize the client in a similar way as the steps listed above for Ecommerce transactions, but make sure to include `TerminalCloudAPI`: ``` java @@ -373,34 +398,53 @@ TerminalAPIResponse terminalAPIResponse = terminalCloudApi.sync(terminalAPIReque ## Using the Local Terminal API Integration The request and response payloads are identical to the Cloud Terminal API, however, additional encryption details are required to perform the requests. -```java -// Step 1: Import the required classes +### Local terminal API Using Keystore +~~~~ java +// Import the required classes +import com.adyen.Client; +import com.adyen.Config; +import com.adyen.enums.Environment; +import com.adyen.httpclient.TerminalLocalAPIHostnameVerifier; import com.adyen.service.TerminalLocalAPI; -import com.adyen.model.nexo.*; +import com.adyen.model.terminal.security.*; import com.adyen.model.terminal.*; - -// Step 2: Add your Certificate Path and Local Endpoint to the config path. Install the certificate from [here](https://docs.adyen.com/point-of-sale/choose-your-architecture/local#protect-communications). -Client client = new Client(); -client.getConfig().setTerminalApiLocalEndpoint("The IP of your terminal (eg https://192.168.47.169)"); -client.getConfig().setEnvironment(Environment.TEST); -client.getConfig().setTerminalCertificate("YOUR_CERTIFICATE_PATH"); - -// Step 3: Setup a security password for you terminal in CA, and import the security key object: +import javax.net.ssl.SSLContext; +import javax.net.ssl.TrustManagerFactory; +import java.security.KeyStore; +import java.security.SecureRandom; + +// Create a KeyStore for the terminal certificate +KeyStore keyStore = KeyStore.getInstance(KeyStore.getDefaultType()); +keyStore.load(null, null); +keyStore.setCertificateEntry("adyenRootCertificate", adyenRootCertificate); + +// Create a TrustManagerFactory that trusts the CAs in our KeyStore +TrustManagerFactory trustManagerFactory = TrustManagerFactory.getInstance(TrustManagerFactory.getDefaultAlgorithm()); +trustManagerFactory.init(keyStore); + +// Create an SSLContext with the desired protocol that uses our TrustManagers +SSLContext sslContext = SSLContext.getInstance("SSL"); +sslContext.init(null, trustManagerFactory.getTrustManagers(), new SecureRandom()); + +// Configure a client for TerminalLocalAPI +Config config = new Config(); +config.setEnvironment(environment); +config.setTerminalApiLocalEndpoint("https://" + terminalIpAddress); +config.setSSLContext(sslContext); +config.setHostnameVerifier(new TerminalLocalAPIHostnameVerifier(environment)); +Client client = new Client(config); + +// Create your SecurityKey object used for encrypting the payload (keyIdentifier/passphrase you set up beforehand in CA) SecurityKey securityKey = new SecurityKey(); securityKey.setKeyVersion(1); securityKey.setAdyenCryptoVersion(1); securityKey.setKeyIdentifier("keyIdentifier"); securityKey.setPassphrase("passphrase"); -// Step 4 Initialize the API object +// Use TerminalLocalAPI TerminalLocalAPI terminalLocalAPI = new TerminalLocalAPI(client, securityKey); - -// Step 5: Create the request object -TerminalAPIRequest terminalAPIRequest = ///....same as the one used for Cloud API ; - -// Step 6: Make the request TerminalAPIResponse terminalAPIResponse = terminalLocalApi.request(terminalAPIRequest); -``` +~~~~ ## Using the Local Terminal API Integration without Encryption (Only on TEST) If you wish to develop the Local Terminal API integration parallel to your encryption implementation, you can opt for the unencrypted version. Be sure to remove any encryption details from the CA terminal config page. @@ -414,7 +458,6 @@ import com.adyen.model.terminal.*; Client client = new Client(); client.getConfig().setTerminalApiLocalEndpoint("The IP of your terminal (eg https://192.168.47.169)"); client.getConfig().setEnvironment(Environment.TEST); -client.getConfig().setTerminalCertificate("YOUR_CERTIFICATE_PATH"); // Step 3 Initialize the client and the API objects; TerminalLocalAPIUnencrypted terminalLocalAPIUnencrypted = new TerminalLocalAPIUnencrypted(client); diff --git a/pom.xml b/pom.xml index ccb9f231e..11756fd68 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ com.adyen adyen-java-api-library jar - 21.6.0 + 22.0.0-beta Adyen Java API Library Adyen API Client Library for Java https://github.com/adyen/adyen-java-api-library diff --git a/src/main/java/com/adyen/Client.java b/src/main/java/com/adyen/Client.java index 7556e079b..0d90ccf1a 100644 --- a/src/main/java/com/adyen/Client.java +++ b/src/main/java/com/adyen/Client.java @@ -1,17 +1,16 @@ package com.adyen; import com.adyen.enums.Environment; -import com.adyen.enums.Region; import com.adyen.httpclient.AdyenHttpClient; import com.adyen.httpclient.ClientInterface; -import java.security.KeyStore; +import javax.net.ssl.SSLContext; public class Client { private ClientInterface httpClient; private Config config; public static final String LIB_NAME = "adyen-java-api-library"; - public static final String LIB_VERSION = "21.6.0"; + public static final String LIB_VERSION = "22.0.0-beta"; public static final String TERMINAL_API_ENDPOINT_TEST = "https://terminal-api-test.adyen.com"; public static final String TERMINAL_API_ENDPOINT_LIVE = "https://terminal-api-live.adyen.com"; @@ -32,17 +31,12 @@ public Client(String username, String password, Environment environment, String * Use this constructor to create client for client certificate authentication along with API key. * Note: Client certificate authentication is only applicable for PAL and Checkout services in LIVE, * Other services will just use API key for authentication. - * @param trustStore Trust store containing server certificate - * @param clientKeyStore Client Key store containing client certificate and key - * @param clientKeyStorePassword Password for client key store + * @param sslContext {@link SSLContext} for client certificate authentication * @param apiKey Adyen API Key - * @param region Data center region (EU/US/AU), default EU if not provided */ - public Client(KeyStore trustStore, KeyStore clientKeyStore, String clientKeyStorePassword, String apiKey, Region region) { + public Client(SSLContext sslContext, String apiKey) { this(apiKey, Environment.LIVE); - this.config.setClientKeyStorePassword(clientKeyStorePassword); - this.config.setClientKeyStore(clientKeyStore); - this.config.setTrustKeyStore(trustStore); + this.config.setSSLContext(sslContext); } public Client(String username, String password, Environment environment, String liveEndpointUrlPrefix, String applicationName) { diff --git a/src/main/java/com/adyen/Config.java b/src/main/java/com/adyen/Config.java index e7411b23f..dae821953 100644 --- a/src/main/java/com/adyen/Config.java +++ b/src/main/java/com/adyen/Config.java @@ -1,16 +1,9 @@ package com.adyen; import com.adyen.enums.Environment; -import com.adyen.util.CertificateUtil; -import java.io.FileNotFoundException; -import java.io.IOException; -import java.io.InputStream; -import java.security.KeyStore; -import java.security.KeyStoreException; -import java.security.NoSuchAlgorithmException; -import java.security.cert.Certificate; -import java.security.cert.CertificateException; +import javax.net.ssl.HostnameVerifier; +import javax.net.ssl.SSLContext; public class Config { protected String username; @@ -28,13 +21,9 @@ public class Config { //Terminal API Specific protected String terminalApiCloudEndpoint; protected String terminalApiLocalEndpoint; - protected Certificate terminalCertificate; - - // Client certificate authentication - protected KeyStore trustKeyStore; - protected KeyStore clientKeyStore; - protected String clientKeyStorePassword; protected String liveEndpointUrlPrefix; + protected SSLContext sslContext; + protected HostnameVerifier hostnameVerifier; public Config() { // do nothing @@ -112,59 +101,37 @@ public void setReadTimeoutMillis(int readTimeoutMillis) { this.readTimeoutMillis = readTimeoutMillis; } - public Certificate getTerminalCertificate() { - return terminalCertificate; - } - - public void setTerminalCertificate(Certificate terminalCertificate) { - this.terminalCertificate = terminalCertificate; - } - - public void setTerminalCertificate(String terminalCertificatePath) throws FileNotFoundException, CertificateException { - this.terminalCertificate = CertificateUtil.loadCertificate(terminalCertificatePath); - } - - public void setTerminalCertificate(InputStream terminalCertificateStream) throws CertificateException { - this.terminalCertificate = CertificateUtil.loadCertificate(terminalCertificateStream); - } - - public KeyStore getTrustKeyStore() { - return trustKeyStore; - } - - public void setTrustKeyStore(KeyStore trustKeyStore) { - this.trustKeyStore = trustKeyStore; - } - - public void setTrustKeyStore(String trustKeyStorePath, String keyStoreType, String password) throws CertificateException, NoSuchAlgorithmException, KeyStoreException, IOException { - this.trustKeyStore = CertificateUtil.loadKeyStore(trustKeyStorePath, keyStoreType, password); - } - - public KeyStore getClientKeyStore() { - return clientKeyStore; + public String getLiveEndpointUrlPrefix() { + return this.liveEndpointUrlPrefix; } - - public void setClientKeyStore(KeyStore clientKeyStore) { - this.clientKeyStore = clientKeyStore; + public void setLiveEndpointUrlPrefix(String liveEndpointUrlPrefix) { + this.liveEndpointUrlPrefix = liveEndpointUrlPrefix; } - public void setClientKeyStore(String clientKeyStorePath, String keyStoreType, String clientKeyStorePassword) throws CertificateException, NoSuchAlgorithmException, KeyStoreException, IOException { - this.clientKeyStorePassword = clientKeyStorePassword; - this.clientKeyStore = CertificateUtil.loadKeyStore(clientKeyStorePath, keyStoreType, clientKeyStorePassword); + public SSLContext getSSLContext() { + return sslContext; } - public String getClientKeyStorePassword() { - return clientKeyStorePassword; + /** + * Sets the {@link SSLContext} for the {@link com.adyen.httpclient.AdyenHttpClient}. + * + * @param sslContext The {@link SSLContext} + */ + public void setSSLContext(SSLContext sslContext) { + this.sslContext = sslContext; } - public void setClientKeyStorePassword(String clientKeyStorePassword) { - this.clientKeyStorePassword = clientKeyStorePassword; + public HostnameVerifier getHostnameVerifier() { + return hostnameVerifier; } - public String getLiveEndpointUrlPrefix() { - return this.liveEndpointUrlPrefix; - } - public void setLiveEndpointUrlPrefix(String liveEndpointUrlPrefix) { - this.liveEndpointUrlPrefix = liveEndpointUrlPrefix; + /** + * Sets the {@link HostnameVerifier} for the {@link com.adyen.httpclient.AdyenHttpClient}. + * + * @param hostnameVerifier The {@link HostnameVerifier} + * @see com.adyen.httpclient.TerminalLocalAPIHostnameVerifier + */ + public void setHostnameVerifier(HostnameVerifier hostnameVerifier) { + this.hostnameVerifier = hostnameVerifier; } } diff --git a/src/main/java/com/adyen/httpclient/AdyenHttpClient.java b/src/main/java/com/adyen/httpclient/AdyenHttpClient.java index 71d2147f2..10dbb44b8 100644 --- a/src/main/java/com/adyen/httpclient/AdyenHttpClient.java +++ b/src/main/java/com/adyen/httpclient/AdyenHttpClient.java @@ -23,9 +23,7 @@ import com.adyen.Client; import com.adyen.Config; import com.adyen.constants.ApiConstants; -import com.adyen.enums.Environment; import com.adyen.model.RequestOptions; -import com.adyen.terminal.security.TerminalCommonNameValidator; import org.apache.commons.codec.binary.Base64; import org.apache.hc.client5.http.classic.methods.HttpDelete; import org.apache.hc.client5.http.classic.methods.HttpGet; @@ -41,22 +39,16 @@ import org.apache.hc.core5.http.HttpHost; import org.apache.hc.core5.http.io.entity.StringEntity; import org.apache.hc.core5.net.URIBuilder; +import org.apache.hc.core5.ssl.SSLContexts; import javax.net.ssl.HostnameVerifier; -import javax.net.ssl.KeyManagerFactory; import javax.net.ssl.SSLContext; -import javax.net.ssl.SSLPeerUnverifiedException; -import javax.net.ssl.TrustManager; -import javax.net.ssl.TrustManagerFactory; import java.io.IOException; import java.net.InetSocketAddress; import java.net.Proxy; import java.net.URI; import java.net.URISyntaxException; import java.nio.charset.Charset; -import java.security.GeneralSecurityException; -import java.security.KeyStore; -import java.security.cert.X509Certificate; import java.util.Map; import java.util.concurrent.TimeUnit; @@ -74,9 +66,6 @@ public class AdyenHttpClient implements ClientInterface { private static final String CHARSET = "UTF-8"; - private static final String TERMINAL_CERTIFICATE_ALIAS = "TerminalCertificate"; - private static final String SSL = "SSL"; - private static final String TLSV1_2 = "TLSv1.2"; private Proxy proxy; public Proxy getProxy() { @@ -203,14 +192,13 @@ private URI createUri(String endpoint, Map params) throws HTTPCl } } - private CloseableHttpClient createCloseableHttpClient(Config config) throws HTTPClientException { - if (config.getClientKeyStore() != null && config.getTrustKeyStore() != null) { - return createHttpClientWithSocketFactory(getClientCertificateAuthSSLContext(config)); + private CloseableHttpClient createCloseableHttpClient(Config config) { + SSLContext sslContext = config.getSSLContext(); + if (sslContext == null) { + sslContext = SSLContexts.createDefault(); } - if (config.getTerminalCertificate() != null) { - return createHttpClientWithSocketFactory(getTerminalCertificateSocketFactory(config)); - } - return HttpClients.createSystem(); + HostnameVerifier hostnameVerifier = config.getHostnameVerifier(); + return createHttpClientWithSocketFactory(new SSLConnectionSocketFactory(sslContext, hostnameVerifier)); } private CloseableHttpClient createHttpClientWithSocketFactory(SSLConnectionSocketFactory socketFactory) { @@ -221,68 +209,6 @@ private CloseableHttpClient createHttpClientWithSocketFactory(SSLConnectionSocke .build(); } - private SSLConnectionSocketFactory getTerminalCertificateSocketFactory(Config config) throws HTTPClientException { - try { - // Create new KeyStore for the terminal certificate - KeyStore keyStore = KeyStore.getInstance(KeyStore.getDefaultType()); - keyStore.load(null, null); - keyStore.setCertificateEntry(TERMINAL_CERTIFICATE_ALIAS, config.getTerminalCertificate()); - - TrustManagerFactory trustFactory = - TrustManagerFactory.getInstance(TrustManagerFactory.getDefaultAlgorithm()); - trustFactory.init(keyStore); - TrustManager[] trustManagers = trustFactory.getTrustManagers(); - - // Install the terminal certificate trust manager - SSLContext sc = SSLContext.getInstance(SSL); - sc.init(null, trustManagers, new java.security.SecureRandom()); - - return new SSLConnectionSocketFactory(sc, createHostnameVerifier(config.getEnvironment())); - } catch (GeneralSecurityException | IOException e) { - throw new HTTPClientException("Error loading certificate from path", e); - } - } - - private SSLConnectionSocketFactory getClientCertificateAuthSSLContext(Config config) throws HTTPClientException { - try { - char[] password = null; - if (config.getClientKeyStorePassword() != null && !config.getClientKeyStorePassword().isEmpty()) { - password = config.getClientKeyStorePassword().toCharArray(); - } - - // Create a TrustManager that trusts the CAs in our Trust KeyStore - TrustManagerFactory tmf = TrustManagerFactory.getInstance(TrustManagerFactory.getDefaultAlgorithm()); - tmf.init(config.getTrustKeyStore()); - - KeyManagerFactory keyManagerFactory = KeyManagerFactory.getInstance(KeyManagerFactory.getDefaultAlgorithm()); - keyManagerFactory.init(config.getClientKeyStore(), password); - - // Create an SSLContext that uses our TrustManager - SSLContext context = SSLContext.getInstance(TLSV1_2); - context.init(keyManagerFactory.getKeyManagers(), tmf.getTrustManagers(), null); - return new SSLConnectionSocketFactory(context); - } catch (Exception e) { - throw new HTTPClientException("Error creating SSL Context", e); - } - } - - private HostnameVerifier createHostnameVerifier(final Environment environment) { - return (host, session) -> { - try { - if (session.getPeerCertificates() != null && session.getPeerCertificates().length > 0) { - // Assume the first certificate is the leaf, since chain will be ordered, according to Java documentation: - // https://docs.oracle.com/javase/7/docs/api/javax/net/ssl/SSLSession.html#getPeerCertificates() - X509Certificate certificate = (X509Certificate) session.getPeerCertificates()[0]; - return TerminalCommonNameValidator.validateCertificate(certificate, environment); - } - return false; - } catch (SSLPeerUnverifiedException e) { - e.printStackTrace(); - return false; - } - }; - } - /** * Sets content type */ diff --git a/src/main/java/com/adyen/httpclient/TerminalLocalAPIHostnameVerifier.java b/src/main/java/com/adyen/httpclient/TerminalLocalAPIHostnameVerifier.java new file mode 100644 index 000000000..14134d80f --- /dev/null +++ b/src/main/java/com/adyen/httpclient/TerminalLocalAPIHostnameVerifier.java @@ -0,0 +1,33 @@ +package com.adyen.httpclient; + +import com.adyen.enums.Environment; +import com.adyen.terminal.security.TerminalCommonNameValidator; + +import javax.net.ssl.HostnameVerifier; +import javax.net.ssl.SSLPeerUnverifiedException; +import javax.net.ssl.SSLSession; +import java.security.cert.X509Certificate; + +public final class TerminalLocalAPIHostnameVerifier implements HostnameVerifier { + private final Environment environment; + + public TerminalLocalAPIHostnameVerifier(Environment environment) { + this.environment = environment; + } + + @Override + public boolean verify(String hostname, SSLSession session) { + try { + if (session.getPeerCertificates() != null && session.getPeerCertificates().length > 0) { + // Assume the first certificate is the leaf, since chain will be ordered, according to Java documentation: + // https://docs.oracle.com/javase/7/docs/api/javax/net/ssl/SSLSession.html#getPeerCertificates() + X509Certificate certificate = (X509Certificate) session.getPeerCertificates()[0]; + return TerminalCommonNameValidator.validateCertificate(certificate, environment); + } + return false; + } catch (SSLPeerUnverifiedException e) { + e.printStackTrace(); + return false; + } + } +} diff --git a/src/main/java/com/adyen/model/balanceplatform/BalanceAccount.java b/src/main/java/com/adyen/model/balanceplatform/BalanceAccount.java index 5a0b13a6b..3fc0b50e0 100644 --- a/src/main/java/com/adyen/model/balanceplatform/BalanceAccount.java +++ b/src/main/java/com/adyen/model/balanceplatform/BalanceAccount.java @@ -190,10 +190,10 @@ public BalanceAccount defaultCurrencyCode(String defaultCurrencyCode) { } /** - * The default three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes) of the balance account. The default value is **EUR**. + * The default three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes) of the balance account. The default value is **EUR**. > After a balance account is created, you cannot change its default currency. * @return defaultCurrencyCode **/ - @ApiModelProperty(value = "The default three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes) of the balance account. The default value is **EUR**.") + @ApiModelProperty(value = "The default three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes) of the balance account. The default value is **EUR**. > After a balance account is created, you cannot change its default currency.") @JsonProperty(JSON_PROPERTY_DEFAULT_CURRENCY_CODE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) diff --git a/src/main/java/com/adyen/model/balanceplatform/BalanceAccountBase.java b/src/main/java/com/adyen/model/balanceplatform/BalanceAccountBase.java index 1ac86df7b..fee989743 100644 --- a/src/main/java/com/adyen/model/balanceplatform/BalanceAccountBase.java +++ b/src/main/java/com/adyen/model/balanceplatform/BalanceAccountBase.java @@ -151,10 +151,10 @@ public BalanceAccountBase defaultCurrencyCode(String defaultCurrencyCode) { } /** - * The default three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes) of the balance account. The default value is **EUR**. + * The default three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes) of the balance account. The default value is **EUR**. > After a balance account is created, you cannot change its default currency. * @return defaultCurrencyCode **/ - @ApiModelProperty(value = "The default three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes) of the balance account. The default value is **EUR**.") + @ApiModelProperty(value = "The default three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes) of the balance account. The default value is **EUR**. > After a balance account is created, you cannot change its default currency.") @JsonProperty(JSON_PROPERTY_DEFAULT_CURRENCY_CODE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) diff --git a/src/main/java/com/adyen/model/balanceplatform/BalanceAccountInfo.java b/src/main/java/com/adyen/model/balanceplatform/BalanceAccountInfo.java index b1c559549..021d7f8ad 100644 --- a/src/main/java/com/adyen/model/balanceplatform/BalanceAccountInfo.java +++ b/src/main/java/com/adyen/model/balanceplatform/BalanceAccountInfo.java @@ -104,10 +104,10 @@ public BalanceAccountInfo defaultCurrencyCode(String defaultCurrencyCode) { } /** - * The default three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes) of the balance account. The default value is **EUR**. + * The default three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes) of the balance account. The default value is **EUR**. > After a balance account is created, you cannot change its default currency. * @return defaultCurrencyCode **/ - @ApiModelProperty(value = "The default three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes) of the balance account. The default value is **EUR**.") + @ApiModelProperty(value = "The default three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes) of the balance account. The default value is **EUR**. > After a balance account is created, you cannot change its default currency.") @JsonProperty(JSON_PROPERTY_DEFAULT_CURRENCY_CODE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) diff --git a/src/main/java/com/adyen/model/balanceplatform/BalanceAccountUpdateRequest.java b/src/main/java/com/adyen/model/balanceplatform/BalanceAccountUpdateRequest.java index abf49eb61..cfb4ae376 100644 --- a/src/main/java/com/adyen/model/balanceplatform/BalanceAccountUpdateRequest.java +++ b/src/main/java/com/adyen/model/balanceplatform/BalanceAccountUpdateRequest.java @@ -36,7 +36,6 @@ */ @JsonPropertyOrder({ BalanceAccountUpdateRequest.JSON_PROPERTY_ACCOUNT_HOLDER_ID, - BalanceAccountUpdateRequest.JSON_PROPERTY_DEFAULT_CURRENCY_CODE, BalanceAccountUpdateRequest.JSON_PROPERTY_DESCRIPTION, BalanceAccountUpdateRequest.JSON_PROPERTY_METADATA, BalanceAccountUpdateRequest.JSON_PROPERTY_PLATFORM_PAYMENT_CONFIGURATION, @@ -49,9 +48,6 @@ public class BalanceAccountUpdateRequest { public static final String JSON_PROPERTY_ACCOUNT_HOLDER_ID = "accountHolderId"; private String accountHolderId; - public static final String JSON_PROPERTY_DEFAULT_CURRENCY_CODE = "defaultCurrencyCode"; - private String defaultCurrencyCode; - public static final String JSON_PROPERTY_DESCRIPTION = "description"; private String description; @@ -137,31 +133,6 @@ public void setAccountHolderId(String accountHolderId) { } - public BalanceAccountUpdateRequest defaultCurrencyCode(String defaultCurrencyCode) { - this.defaultCurrencyCode = defaultCurrencyCode; - return this; - } - - /** - * The default currency code of this balance account, in three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes) format. The default value is **EUR**. - * @return defaultCurrencyCode - **/ - @ApiModelProperty(value = "The default currency code of this balance account, in three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes) format. The default value is **EUR**.") - @JsonProperty(JSON_PROPERTY_DEFAULT_CURRENCY_CODE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getDefaultCurrencyCode() { - return defaultCurrencyCode; - } - - - @JsonProperty(JSON_PROPERTY_DEFAULT_CURRENCY_CODE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setDefaultCurrencyCode(String defaultCurrencyCode) { - this.defaultCurrencyCode = defaultCurrencyCode; - } - - public BalanceAccountUpdateRequest description(String description) { this.description = description; return this; @@ -333,7 +304,6 @@ public boolean equals(Object o) { } BalanceAccountUpdateRequest balanceAccountUpdateRequest = (BalanceAccountUpdateRequest) o; return Objects.equals(this.accountHolderId, balanceAccountUpdateRequest.accountHolderId) && - Objects.equals(this.defaultCurrencyCode, balanceAccountUpdateRequest.defaultCurrencyCode) && Objects.equals(this.description, balanceAccountUpdateRequest.description) && Objects.equals(this.metadata, balanceAccountUpdateRequest.metadata) && Objects.equals(this.platformPaymentConfiguration, balanceAccountUpdateRequest.platformPaymentConfiguration) && @@ -344,7 +314,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(accountHolderId, defaultCurrencyCode, description, metadata, platformPaymentConfiguration, reference, status, timeZone); + return Objects.hash(accountHolderId, description, metadata, platformPaymentConfiguration, reference, status, timeZone); } @Override @@ -352,7 +322,6 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class BalanceAccountUpdateRequest {\n"); sb.append(" accountHolderId: ").append(toIndentedString(accountHolderId)).append("\n"); - sb.append(" defaultCurrencyCode: ").append(toIndentedString(defaultCurrencyCode)).append("\n"); sb.append(" description: ").append(toIndentedString(description)).append("\n"); sb.append(" metadata: ").append(toIndentedString(metadata)).append("\n"); sb.append(" platformPaymentConfiguration: ").append(toIndentedString(platformPaymentConfiguration)).append("\n"); diff --git a/src/main/java/com/adyen/model/balanceplatform/BankIdentification.java b/src/main/java/com/adyen/model/balanceplatform/BankIdentification.java new file mode 100644 index 000000000..bb3af4fc6 --- /dev/null +++ b/src/main/java/com/adyen/model/balanceplatform/BankIdentification.java @@ -0,0 +1,225 @@ +/* + * Configuration API + * + * The version of the OpenAPI document: 2 + * + * + * 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.adyen.model.balanceplatform; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.core.JsonProcessingException; + + +/** + * BankIdentification + */ +@JsonPropertyOrder({ + BankIdentification.JSON_PROPERTY_COUNTRY, + BankIdentification.JSON_PROPERTY_IDENTIFICATION, + BankIdentification.JSON_PROPERTY_IDENTIFICATION_TYPE +}) + +public class BankIdentification { + public static final String JSON_PROPERTY_COUNTRY = "country"; + private String country; + + public static final String JSON_PROPERTY_IDENTIFICATION = "identification"; + private String identification; + + /** + * Gets or Sets identificationType + */ + public enum IdentificationTypeEnum { + IBAN("iban"), + + ROUTINGNUMBER("routingNumber"); + + private String value; + + IdentificationTypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static IdentificationTypeEnum fromValue(String value) { + for (IdentificationTypeEnum b : IdentificationTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_IDENTIFICATION_TYPE = "identificationType"; + private IdentificationTypeEnum identificationType; + + public BankIdentification() { + } + + public BankIdentification country(String country) { + this.country = country; + return this; + } + + /** + * Get country + * @return country + **/ + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_COUNTRY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getCountry() { + return country; + } + + + @JsonProperty(JSON_PROPERTY_COUNTRY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCountry(String country) { + this.country = country; + } + + + public BankIdentification identification(String identification) { + this.identification = identification; + return this; + } + + /** + * Get identification + * @return identification + **/ + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_IDENTIFICATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getIdentification() { + return identification; + } + + + @JsonProperty(JSON_PROPERTY_IDENTIFICATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setIdentification(String identification) { + this.identification = identification; + } + + + public BankIdentification identificationType(IdentificationTypeEnum identificationType) { + this.identificationType = identificationType; + return this; + } + + /** + * Get identificationType + * @return identificationType + **/ + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_IDENTIFICATION_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public IdentificationTypeEnum getIdentificationType() { + return identificationType; + } + + + @JsonProperty(JSON_PROPERTY_IDENTIFICATION_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setIdentificationType(IdentificationTypeEnum identificationType) { + this.identificationType = identificationType; + } + + + /** + * Return true if this BankIdentification object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + BankIdentification bankIdentification = (BankIdentification) o; + return Objects.equals(this.country, bankIdentification.country) && + Objects.equals(this.identification, bankIdentification.identification) && + Objects.equals(this.identificationType, bankIdentification.identificationType); + } + + @Override + public int hashCode() { + return Objects.hash(country, identification, identificationType); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class BankIdentification {\n"); + sb.append(" country: ").append(toIndentedString(country)).append("\n"); + sb.append(" identification: ").append(toIndentedString(identification)).append("\n"); + sb.append(" identificationType: ").append(toIndentedString(identificationType)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +/** + * Create an instance of BankIdentification given an JSON string + * + * @param jsonString JSON string + * @return An instance of BankIdentification + * @throws JsonProcessingException if the JSON string is invalid with respect to BankIdentification + */ + public static BankIdentification fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, BankIdentification.class); + } +/** + * Convert an instance of BankIdentification to an JSON string + * + * @return JSON string + */ + public String toJson() throws JsonProcessingException { + return JSON.getMapper().writeValueAsString(this); + } +} + diff --git a/src/main/java/com/adyen/model/balanceplatform/CounterpartyBankRestriction.java b/src/main/java/com/adyen/model/balanceplatform/CounterpartyBankRestriction.java new file mode 100644 index 000000000..2b014896e --- /dev/null +++ b/src/main/java/com/adyen/model/balanceplatform/CounterpartyBankRestriction.java @@ -0,0 +1,170 @@ +/* + * Configuration API + * + * The version of the OpenAPI document: 2 + * + * + * 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.adyen.model.balanceplatform; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.adyen.model.balanceplatform.BankIdentification; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.ArrayList; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.core.JsonProcessingException; + + +/** + * CounterpartyBankRestriction + */ +@JsonPropertyOrder({ + CounterpartyBankRestriction.JSON_PROPERTY_OPERATION, + CounterpartyBankRestriction.JSON_PROPERTY_VALUE +}) + +public class CounterpartyBankRestriction { + public static final String JSON_PROPERTY_OPERATION = "operation"; + private String operation; + + public static final String JSON_PROPERTY_VALUE = "value"; + private List value = null; + + public CounterpartyBankRestriction() { + } + + public CounterpartyBankRestriction operation(String operation) { + this.operation = operation; + return this; + } + + /** + * Defines how the condition must be evaluated. + * @return operation + **/ + @ApiModelProperty(required = true, value = "Defines how the condition must be evaluated.") + @JsonProperty(JSON_PROPERTY_OPERATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getOperation() { + return operation; + } + + + @JsonProperty(JSON_PROPERTY_OPERATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setOperation(String operation) { + this.operation = operation; + } + + + public CounterpartyBankRestriction value(List value) { + this.value = value; + return this; + } + + public CounterpartyBankRestriction addValueItem(BankIdentification valueItem) { + if (this.value == null) { + this.value = new ArrayList<>(); + } + this.value.add(valueItem); + return this; + } + + /** + * List of counterparty Bank Institutions and the operation. + * @return value + **/ + @ApiModelProperty(value = "List of counterparty Bank Institutions and the operation.") + @JsonProperty(JSON_PROPERTY_VALUE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getValue() { + return value; + } + + + @JsonProperty(JSON_PROPERTY_VALUE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setValue(List value) { + this.value = value; + } + + + /** + * Return true if this CounterpartyBankRestriction object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CounterpartyBankRestriction counterpartyBankRestriction = (CounterpartyBankRestriction) o; + return Objects.equals(this.operation, counterpartyBankRestriction.operation) && + Objects.equals(this.value, counterpartyBankRestriction.value); + } + + @Override + public int hashCode() { + return Objects.hash(operation, value); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CounterpartyBankRestriction {\n"); + sb.append(" operation: ").append(toIndentedString(operation)).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 "); + } + +/** + * Create an instance of CounterpartyBankRestriction given an JSON string + * + * @param jsonString JSON string + * @return An instance of CounterpartyBankRestriction + * @throws JsonProcessingException if the JSON string is invalid with respect to CounterpartyBankRestriction + */ + public static CounterpartyBankRestriction fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, CounterpartyBankRestriction.class); + } +/** + * Convert an instance of CounterpartyBankRestriction to an JSON string + * + * @return JSON string + */ + public String toJson() throws JsonProcessingException { + return JSON.getMapper().writeValueAsString(this); + } +} + diff --git a/src/main/java/com/adyen/model/balanceplatform/CreateSweepConfigurationV2.java b/src/main/java/com/adyen/model/balanceplatform/CreateSweepConfigurationV2.java index b7a2cce1c..e278b2373 100644 --- a/src/main/java/com/adyen/model/balanceplatform/CreateSweepConfigurationV2.java +++ b/src/main/java/com/adyen/model/balanceplatform/CreateSweepConfigurationV2.java @@ -106,8 +106,6 @@ public static CategoryEnum fromValue(String value) { public enum PrioritiesEnum { CROSSBORDER("crossBorder"), - DIRECTDEBIT("directDebit"), - FAST("fast"), INSTANT("instant"), @@ -156,6 +154,8 @@ public enum ReasonEnum { APPROVED("approved"), + BALANCEACCOUNTTEMPORARILYBLOCKEDBYTRANSACTIONRULE("balanceAccountTemporarilyBlockedByTransactionRule"), + COUNTERPARTYACCOUNTBLOCKED("counterpartyAccountBlocked"), COUNTERPARTYACCOUNTCLOSED("counterpartyAccountClosed"), @@ -168,6 +168,8 @@ public enum ReasonEnum { COUNTERPARTYBANKUNAVAILABLE("counterpartyBankUnavailable"), + DECLINEDBYTRANSACTIONRULE("declinedByTransactionRule"), + ERROR("error"), NOTENOUGHBALANCE("notEnoughBalance"), @@ -176,6 +178,8 @@ public enum ReasonEnum { ROUTENOTFOUND("routeNotFound"), + SCAFAILED("scaFailed"), + UNKNOWN("unknown"); private String value; diff --git a/src/main/java/com/adyen/model/balanceplatform/GetTaxFormResponse.java b/src/main/java/com/adyen/model/balanceplatform/GetTaxFormResponse.java new file mode 100644 index 000000000..04ab6f15f --- /dev/null +++ b/src/main/java/com/adyen/model/balanceplatform/GetTaxFormResponse.java @@ -0,0 +1,192 @@ +/* + * Configuration API + * + * The version of the OpenAPI document: 2 + * + * + * 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.adyen.model.balanceplatform; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.core.JsonProcessingException; + + +/** + * GetTaxFormResponse + */ +@JsonPropertyOrder({ + GetTaxFormResponse.JSON_PROPERTY_CONTENT, + GetTaxFormResponse.JSON_PROPERTY_CONTENT_TYPE +}) + +public class GetTaxFormResponse { + public static final String JSON_PROPERTY_CONTENT = "content"; + private byte[] content; + + /** + * The content type of the tax form. Possible values: * **application/pdf** + */ + public enum ContentTypeEnum { + APPLICATION_PDF("application/pdf"); + + private String value; + + ContentTypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static ContentTypeEnum fromValue(String value) { + for (ContentTypeEnum b : ContentTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_CONTENT_TYPE = "contentType"; + private ContentTypeEnum contentType; + + public GetTaxFormResponse() { + } + + public GetTaxFormResponse content(byte[] content) { + this.content = content; + return this; + } + + /** + * The content of the tax form in Base64 format. + * @return content + **/ + @ApiModelProperty(required = true, value = "The content of the tax form in Base64 format.") + @JsonProperty(JSON_PROPERTY_CONTENT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public byte[] getContent() { + return content; + } + + + @JsonProperty(JSON_PROPERTY_CONTENT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setContent(byte[] content) { + this.content = content; + } + + + public GetTaxFormResponse contentType(ContentTypeEnum contentType) { + this.contentType = contentType; + return this; + } + + /** + * The content type of the tax form. Possible values: * **application/pdf** + * @return contentType + **/ + @ApiModelProperty(value = "The content type of the tax form. Possible values: * **application/pdf** ") + @JsonProperty(JSON_PROPERTY_CONTENT_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public ContentTypeEnum getContentType() { + return contentType; + } + + + @JsonProperty(JSON_PROPERTY_CONTENT_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setContentType(ContentTypeEnum contentType) { + this.contentType = contentType; + } + + + /** + * Return true if this GetTaxFormResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetTaxFormResponse getTaxFormResponse = (GetTaxFormResponse) o; + return Arrays.equals(this.content, getTaxFormResponse.content) && + Objects.equals(this.contentType, getTaxFormResponse.contentType); + } + + @Override + public int hashCode() { + return Objects.hash(Arrays.hashCode(content), contentType); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetTaxFormResponse {\n"); + sb.append(" content: ").append(toIndentedString(content)).append("\n"); + sb.append(" contentType: ").append(toIndentedString(contentType)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +/** + * Create an instance of GetTaxFormResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of GetTaxFormResponse + * @throws JsonProcessingException if the JSON string is invalid with respect to GetTaxFormResponse + */ + public static GetTaxFormResponse fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, GetTaxFormResponse.class); + } +/** + * Convert an instance of GetTaxFormResponse to an JSON string + * + * @return JSON string + */ + public String toJson() throws JsonProcessingException { + return JSON.getMapper().writeValueAsString(this); + } +} + diff --git a/src/main/java/com/adyen/model/balanceplatform/HKLocalAccountIdentification.java b/src/main/java/com/adyen/model/balanceplatform/HKLocalAccountIdentification.java index d10b48b93..205b790cb 100644 --- a/src/main/java/com/adyen/model/balanceplatform/HKLocalAccountIdentification.java +++ b/src/main/java/com/adyen/model/balanceplatform/HKLocalAccountIdentification.java @@ -88,10 +88,10 @@ public HKLocalAccountIdentification accountNumber(String accountNumber) { } /** - * The 9- to 12-character bank account number (alphanumeric), without separators or whitespace. Starts with the 3-digit branch code. + * The 9- to 15-character bank account number (alphanumeric), without separators or whitespace. Starts with the 3-digit branch code. * @return accountNumber **/ - @ApiModelProperty(required = true, value = "The 9- to 12-character bank account number (alphanumeric), without separators or whitespace. Starts with the 3-digit branch code.") + @ApiModelProperty(required = true, value = "The 9- to 15-character bank account number (alphanumeric), without separators or whitespace. Starts with the 3-digit branch code.") @JsonProperty(JSON_PROPERTY_ACCOUNT_NUMBER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) diff --git a/src/main/java/com/adyen/model/balanceplatform/NZLocalAccountIdentification.java b/src/main/java/com/adyen/model/balanceplatform/NZLocalAccountIdentification.java index 3f558732a..56a226ca4 100644 --- a/src/main/java/com/adyen/model/balanceplatform/NZLocalAccountIdentification.java +++ b/src/main/java/com/adyen/model/balanceplatform/NZLocalAccountIdentification.java @@ -32,8 +32,6 @@ */ @JsonPropertyOrder({ NZLocalAccountIdentification.JSON_PROPERTY_ACCOUNT_NUMBER, - NZLocalAccountIdentification.JSON_PROPERTY_ACCOUNT_SUFFIX, - NZLocalAccountIdentification.JSON_PROPERTY_BANK_CODE, NZLocalAccountIdentification.JSON_PROPERTY_TYPE }) @@ -41,12 +39,6 @@ public class NZLocalAccountIdentification { public static final String JSON_PROPERTY_ACCOUNT_NUMBER = "accountNumber"; private String accountNumber; - public static final String JSON_PROPERTY_ACCOUNT_SUFFIX = "accountSuffix"; - private String accountSuffix; - - public static final String JSON_PROPERTY_BANK_CODE = "bankCode"; - private String bankCode; - /** * **nzLocal** */ @@ -92,10 +84,10 @@ public NZLocalAccountIdentification accountNumber(String accountNumber) { } /** - * The 7-digit bank account number, without separators or whitespace. + * The 15-16 digit bank account number. The first 2 digits are the bank number, the next 4 digits are the branch number, the next 7 digits are the account number, and the final 2-3 digits are the suffix. * @return accountNumber **/ - @ApiModelProperty(required = true, value = "The 7-digit bank account number, without separators or whitespace.") + @ApiModelProperty(required = true, value = "The 15-16 digit bank account number. The first 2 digits are the bank number, the next 4 digits are the branch number, the next 7 digits are the account number, and the final 2-3 digits are the suffix.") @JsonProperty(JSON_PROPERTY_ACCOUNT_NUMBER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -111,56 +103,6 @@ public void setAccountNumber(String accountNumber) { } - public NZLocalAccountIdentification accountSuffix(String accountSuffix) { - this.accountSuffix = accountSuffix; - return this; - } - - /** - * The 2- to 3-digit account suffix, without separators or whitespace. - * @return accountSuffix - **/ - @ApiModelProperty(required = true, value = "The 2- to 3-digit account suffix, without separators or whitespace.") - @JsonProperty(JSON_PROPERTY_ACCOUNT_SUFFIX) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getAccountSuffix() { - return accountSuffix; - } - - - @JsonProperty(JSON_PROPERTY_ACCOUNT_SUFFIX) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAccountSuffix(String accountSuffix) { - this.accountSuffix = accountSuffix; - } - - - public NZLocalAccountIdentification bankCode(String bankCode) { - this.bankCode = bankCode; - return this; - } - - /** - * The 6-digit bank code including the 2-digit bank code and 4-digit branch code, without separators or whitespace. - * @return bankCode - **/ - @ApiModelProperty(required = true, value = "The 6-digit bank code including the 2-digit bank code and 4-digit branch code, without separators or whitespace.") - @JsonProperty(JSON_PROPERTY_BANK_CODE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getBankCode() { - return bankCode; - } - - - @JsonProperty(JSON_PROPERTY_BANK_CODE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setBankCode(String bankCode) { - this.bankCode = bankCode; - } - - public NZLocalAccountIdentification type(TypeEnum type) { this.type = type; return this; @@ -199,14 +141,12 @@ public boolean equals(Object o) { } NZLocalAccountIdentification nzLocalAccountIdentification = (NZLocalAccountIdentification) o; return Objects.equals(this.accountNumber, nzLocalAccountIdentification.accountNumber) && - Objects.equals(this.accountSuffix, nzLocalAccountIdentification.accountSuffix) && - Objects.equals(this.bankCode, nzLocalAccountIdentification.bankCode) && Objects.equals(this.type, nzLocalAccountIdentification.type); } @Override public int hashCode() { - return Objects.hash(accountNumber, accountSuffix, bankCode, type); + return Objects.hash(accountNumber, type); } @Override @@ -214,8 +154,6 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class NZLocalAccountIdentification {\n"); sb.append(" accountNumber: ").append(toIndentedString(accountNumber)).append("\n"); - sb.append(" accountSuffix: ").append(toIndentedString(accountSuffix)).append("\n"); - sb.append(" bankCode: ").append(toIndentedString(bankCode)).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/src/main/java/com/adyen/model/balanceplatform/PaymentInstrumentRequirement.java b/src/main/java/com/adyen/model/balanceplatform/PaymentInstrumentRequirement.java index c37f47c7a..5c7b98167 100644 --- a/src/main/java/com/adyen/model/balanceplatform/PaymentInstrumentRequirement.java +++ b/src/main/java/com/adyen/model/balanceplatform/PaymentInstrumentRequirement.java @@ -33,6 +33,7 @@ @JsonPropertyOrder({ PaymentInstrumentRequirement.JSON_PROPERTY_DESCRIPTION, PaymentInstrumentRequirement.JSON_PROPERTY_ISSUING_COUNTRY_CODE, + PaymentInstrumentRequirement.JSON_PROPERTY_ONLY_FOR_CROSS_BALANCE_PLATFORM, PaymentInstrumentRequirement.JSON_PROPERTY_PAYMENT_INSTRUMENT_TYPE, PaymentInstrumentRequirement.JSON_PROPERTY_TYPE }) @@ -44,6 +45,9 @@ public class PaymentInstrumentRequirement { public static final String JSON_PROPERTY_ISSUING_COUNTRY_CODE = "issuingCountryCode"; private String issuingCountryCode; + public static final String JSON_PROPERTY_ONLY_FOR_CROSS_BALANCE_PLATFORM = "onlyForCrossBalancePlatform"; + private Boolean onlyForCrossBalancePlatform; + /** * The type of the payment instrument. For example, \"BankAccount\" or \"Card\". */ @@ -171,6 +175,31 @@ public void setIssuingCountryCode(String issuingCountryCode) { } + public PaymentInstrumentRequirement onlyForCrossBalancePlatform(Boolean onlyForCrossBalancePlatform) { + this.onlyForCrossBalancePlatform = onlyForCrossBalancePlatform; + return this; + } + + /** + * Specifies if the requirement only applies to transfers to another balance platform. + * @return onlyForCrossBalancePlatform + **/ + @ApiModelProperty(value = "Specifies if the requirement only applies to transfers to another balance platform.") + @JsonProperty(JSON_PROPERTY_ONLY_FOR_CROSS_BALANCE_PLATFORM) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getOnlyForCrossBalancePlatform() { + return onlyForCrossBalancePlatform; + } + + + @JsonProperty(JSON_PROPERTY_ONLY_FOR_CROSS_BALANCE_PLATFORM) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setOnlyForCrossBalancePlatform(Boolean onlyForCrossBalancePlatform) { + this.onlyForCrossBalancePlatform = onlyForCrossBalancePlatform; + } + + public PaymentInstrumentRequirement paymentInstrumentType(PaymentInstrumentTypeEnum paymentInstrumentType) { this.paymentInstrumentType = paymentInstrumentType; return this; @@ -235,13 +264,14 @@ public boolean equals(Object o) { PaymentInstrumentRequirement paymentInstrumentRequirement = (PaymentInstrumentRequirement) o; return Objects.equals(this.description, paymentInstrumentRequirement.description) && Objects.equals(this.issuingCountryCode, paymentInstrumentRequirement.issuingCountryCode) && + Objects.equals(this.onlyForCrossBalancePlatform, paymentInstrumentRequirement.onlyForCrossBalancePlatform) && Objects.equals(this.paymentInstrumentType, paymentInstrumentRequirement.paymentInstrumentType) && Objects.equals(this.type, paymentInstrumentRequirement.type); } @Override public int hashCode() { - return Objects.hash(description, issuingCountryCode, paymentInstrumentType, type); + return Objects.hash(description, issuingCountryCode, onlyForCrossBalancePlatform, paymentInstrumentType, type); } @Override @@ -250,6 +280,7 @@ public String toString() { sb.append("class PaymentInstrumentRequirement {\n"); sb.append(" description: ").append(toIndentedString(description)).append("\n"); sb.append(" issuingCountryCode: ").append(toIndentedString(issuingCountryCode)).append("\n"); + sb.append(" onlyForCrossBalancePlatform: ").append(toIndentedString(onlyForCrossBalancePlatform)).append("\n"); sb.append(" paymentInstrumentType: ").append(toIndentedString(paymentInstrumentType)).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append("}"); diff --git a/src/main/java/com/adyen/model/balanceplatform/PlatformPaymentConfiguration.java b/src/main/java/com/adyen/model/balanceplatform/PlatformPaymentConfiguration.java index b76d6314d..130537724 100644 --- a/src/main/java/com/adyen/model/balanceplatform/PlatformPaymentConfiguration.java +++ b/src/main/java/com/adyen/model/balanceplatform/PlatformPaymentConfiguration.java @@ -51,10 +51,10 @@ public PlatformPaymentConfiguration salesDayClosingTime(String salesDayClosingTi } /** - * Specifies at what time a [sales day](https://docs.adyen.com/marketplaces-and-platforms/receive-funds/sales-day-settlement#sales-day) ends. Possible values: Time in **\"HH:MM\"** format. **HH** ranges from **00** to **07**. **MM** must be **00**. Default value: **\"00:00\"**. + * Specifies at what time a [sales day](https://docs.adyen.com/marketplaces-and-platforms/settle-funds/sales-day-settlement#sales-day) ends. Possible values: Time in **\"HH:MM\"** format. **HH** ranges from **00** to **07**. **MM** must be **00**. Default value: **\"00:00\"**. * @return salesDayClosingTime **/ - @ApiModelProperty(value = "Specifies at what time a [sales day](https://docs.adyen.com/marketplaces-and-platforms/receive-funds/sales-day-settlement#sales-day) ends. Possible values: Time in **\"HH:MM\"** format. **HH** ranges from **00** to **07**. **MM** must be **00**. Default value: **\"00:00\"**.") + @ApiModelProperty(value = "Specifies at what time a [sales day](https://docs.adyen.com/marketplaces-and-platforms/settle-funds/sales-day-settlement#sales-day) ends. Possible values: Time in **\"HH:MM\"** format. **HH** ranges from **00** to **07**. **MM** must be **00**. Default value: **\"00:00\"**.") @JsonProperty(JSON_PROPERTY_SALES_DAY_CLOSING_TIME) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -76,10 +76,10 @@ public PlatformPaymentConfiguration settlementDelayDays(Integer settlementDelayD } /** - * Specifies after how many business days the funds in a [settlement batch](https://docs.adyen.com/marketplaces-and-platforms/receive-funds/sales-day-settlement#settlement-batch) are made available. Possible values: **0** to **10**, or **null**. * Setting this value to an integer enables [Sales day settlement](https://docs.adyen.com/marketplaces-and-platforms/receive-funds/sales-day-settlement). * Setting this value to **null** enables [Pass-through settlement](https://docs.adyen.com/marketplaces-and-platforms/receive-funds/pass-through-settlement). Default value: **null**. + * Specifies after how many business days the funds in a [settlement batch](https://docs.adyen.com/marketplaces-and-platforms/settle-funds/sales-day-settlement#settlement-batch) are made available. Possible values: **0** to **10**, or **null**. * Setting this value to an integer enables [Sales day settlement](https://docs.adyen.com/marketplaces-and-platforms/settle-funds/sales-day-settlement). * Setting this value to **null** enables [Pass-through settlement](https://docs.adyen.com/marketplaces-and-platforms/settle-funds/pass-through-settlement). Default value: **null**. * @return settlementDelayDays **/ - @ApiModelProperty(value = "Specifies after how many business days the funds in a [settlement batch](https://docs.adyen.com/marketplaces-and-platforms/receive-funds/sales-day-settlement#settlement-batch) are made available. Possible values: **0** to **10**, or **null**. * Setting this value to an integer enables [Sales day settlement](https://docs.adyen.com/marketplaces-and-platforms/receive-funds/sales-day-settlement). * Setting this value to **null** enables [Pass-through settlement](https://docs.adyen.com/marketplaces-and-platforms/receive-funds/pass-through-settlement). Default value: **null**.") + @ApiModelProperty(value = "Specifies after how many business days the funds in a [settlement batch](https://docs.adyen.com/marketplaces-and-platforms/settle-funds/sales-day-settlement#settlement-batch) are made available. Possible values: **0** to **10**, or **null**. * Setting this value to an integer enables [Sales day settlement](https://docs.adyen.com/marketplaces-and-platforms/settle-funds/sales-day-settlement). * Setting this value to **null** enables [Pass-through settlement](https://docs.adyen.com/marketplaces-and-platforms/settle-funds/pass-through-settlement). Default value: **null**.") @JsonProperty(JSON_PROPERTY_SETTLEMENT_DELAY_DAYS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) diff --git a/src/main/java/com/adyen/model/balanceplatform/SweepConfigurationV2.java b/src/main/java/com/adyen/model/balanceplatform/SweepConfigurationV2.java index f823b6f08..9577448f2 100644 --- a/src/main/java/com/adyen/model/balanceplatform/SweepConfigurationV2.java +++ b/src/main/java/com/adyen/model/balanceplatform/SweepConfigurationV2.java @@ -110,8 +110,6 @@ public static CategoryEnum fromValue(String value) { public enum PrioritiesEnum { CROSSBORDER("crossBorder"), - DIRECTDEBIT("directDebit"), - FAST("fast"), INSTANT("instant"), @@ -160,6 +158,8 @@ public enum ReasonEnum { APPROVED("approved"), + BALANCEACCOUNTTEMPORARILYBLOCKEDBYTRANSACTIONRULE("balanceAccountTemporarilyBlockedByTransactionRule"), + COUNTERPARTYACCOUNTBLOCKED("counterpartyAccountBlocked"), COUNTERPARTYACCOUNTCLOSED("counterpartyAccountClosed"), @@ -172,6 +172,8 @@ public enum ReasonEnum { COUNTERPARTYBANKUNAVAILABLE("counterpartyBankUnavailable"), + DECLINEDBYTRANSACTIONRULE("declinedByTransactionRule"), + ERROR("error"), NOTENOUGHBALANCE("notEnoughBalance"), @@ -180,6 +182,8 @@ public enum ReasonEnum { ROUTENOTFOUND("routeNotFound"), + SCAFAILED("scaFailed"), + UNKNOWN("unknown"); private String value; diff --git a/src/main/java/com/adyen/model/balanceplatform/TransactionRuleRestrictions.java b/src/main/java/com/adyen/model/balanceplatform/TransactionRuleRestrictions.java index d9efcb8a2..26e08f129 100644 --- a/src/main/java/com/adyen/model/balanceplatform/TransactionRuleRestrictions.java +++ b/src/main/java/com/adyen/model/balanceplatform/TransactionRuleRestrictions.java @@ -18,6 +18,7 @@ import java.util.HashMap; import com.adyen.model.balanceplatform.ActiveNetworkTokensRestriction; import com.adyen.model.balanceplatform.BrandVariantsRestriction; +import com.adyen.model.balanceplatform.CounterpartyBankRestriction; import com.adyen.model.balanceplatform.CountriesRestriction; import com.adyen.model.balanceplatform.DayOfWeekRestriction; import com.adyen.model.balanceplatform.DifferentCurrenciesRestriction; @@ -47,6 +48,7 @@ @JsonPropertyOrder({ TransactionRuleRestrictions.JSON_PROPERTY_ACTIVE_NETWORK_TOKENS, TransactionRuleRestrictions.JSON_PROPERTY_BRAND_VARIANTS, + TransactionRuleRestrictions.JSON_PROPERTY_COUNTERPARTY_BANK, TransactionRuleRestrictions.JSON_PROPERTY_COUNTRIES, TransactionRuleRestrictions.JSON_PROPERTY_DAY_OF_WEEK, TransactionRuleRestrictions.JSON_PROPERTY_DIFFERENT_CURRENCIES, @@ -68,6 +70,9 @@ public class TransactionRuleRestrictions { public static final String JSON_PROPERTY_BRAND_VARIANTS = "brandVariants"; private BrandVariantsRestriction brandVariants; + public static final String JSON_PROPERTY_COUNTERPARTY_BANK = "counterpartyBank"; + private CounterpartyBankRestriction counterpartyBank; + public static final String JSON_PROPERTY_COUNTRIES = "countries"; private CountriesRestriction countries; @@ -157,6 +162,31 @@ public void setBrandVariants(BrandVariantsRestriction brandVariants) { } + public TransactionRuleRestrictions counterpartyBank(CounterpartyBankRestriction counterpartyBank) { + this.counterpartyBank = counterpartyBank; + return this; + } + + /** + * Get counterpartyBank + * @return counterpartyBank + **/ + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_COUNTERPARTY_BANK) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public CounterpartyBankRestriction getCounterpartyBank() { + return counterpartyBank; + } + + + @JsonProperty(JSON_PROPERTY_COUNTERPARTY_BANK) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCounterpartyBank(CounterpartyBankRestriction counterpartyBank) { + this.counterpartyBank = counterpartyBank; + } + + public TransactionRuleRestrictions countries(CountriesRestriction countries) { this.countries = countries; return this; @@ -471,6 +501,7 @@ public boolean equals(Object o) { TransactionRuleRestrictions transactionRuleRestrictions = (TransactionRuleRestrictions) o; return Objects.equals(this.activeNetworkTokens, transactionRuleRestrictions.activeNetworkTokens) && Objects.equals(this.brandVariants, transactionRuleRestrictions.brandVariants) && + Objects.equals(this.counterpartyBank, transactionRuleRestrictions.counterpartyBank) && Objects.equals(this.countries, transactionRuleRestrictions.countries) && Objects.equals(this.dayOfWeek, transactionRuleRestrictions.dayOfWeek) && Objects.equals(this.differentCurrencies, transactionRuleRestrictions.differentCurrencies) && @@ -487,7 +518,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(activeNetworkTokens, brandVariants, countries, dayOfWeek, differentCurrencies, entryModes, internationalTransaction, matchingTransactions, mccs, merchantNames, merchants, processingTypes, timeOfDay, totalAmount); + return Objects.hash(activeNetworkTokens, brandVariants, counterpartyBank, countries, dayOfWeek, differentCurrencies, entryModes, internationalTransaction, matchingTransactions, mccs, merchantNames, merchants, processingTypes, timeOfDay, totalAmount); } @Override @@ -496,6 +527,7 @@ public String toString() { sb.append("class TransactionRuleRestrictions {\n"); sb.append(" activeNetworkTokens: ").append(toIndentedString(activeNetworkTokens)).append("\n"); sb.append(" brandVariants: ").append(toIndentedString(brandVariants)).append("\n"); + sb.append(" counterpartyBank: ").append(toIndentedString(counterpartyBank)).append("\n"); sb.append(" countries: ").append(toIndentedString(countries)).append("\n"); sb.append(" dayOfWeek: ").append(toIndentedString(dayOfWeek)).append("\n"); sb.append(" differentCurrencies: ").append(toIndentedString(differentCurrencies)).append("\n"); diff --git a/src/main/java/com/adyen/model/balanceplatform/TransferRoute.java b/src/main/java/com/adyen/model/balanceplatform/TransferRoute.java index 29e08b9ab..fff6cab08 100644 --- a/src/main/java/com/adyen/model/balanceplatform/TransferRoute.java +++ b/src/main/java/com/adyen/model/balanceplatform/TransferRoute.java @@ -32,7 +32,6 @@ * TransferRoute */ @JsonPropertyOrder({ - TransferRoute.JSON_PROPERTY_BALANCE_PLATFORM, TransferRoute.JSON_PROPERTY_CATEGORY, TransferRoute.JSON_PROPERTY_COUNTRY, TransferRoute.JSON_PROPERTY_CURRENCY, @@ -41,9 +40,6 @@ }) public class TransferRoute { - public static final String JSON_PROPERTY_BALANCE_PLATFORM = "balancePlatform"; - private String balancePlatform; - /** * The type of transfer. Possible values: - **bank**: Transfer to a [transfer instrument](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/transferInstruments__resParam_id) or a bank account. */ @@ -60,7 +56,9 @@ public enum CategoryEnum { MIGRATION("migration"), - PLATFORMPAYMENT("platformPayment"); + PLATFORMPAYMENT("platformPayment"), + + UPGRADE("upgrade"); private String value; @@ -150,31 +148,6 @@ public static PriorityEnum fromValue(String value) { public TransferRoute() { } - public TransferRoute balancePlatform(String balancePlatform) { - this.balancePlatform = balancePlatform; - return this; - } - - /** - * The unique identifier assigned to the balance platform associated with the account holder. - * @return balancePlatform - **/ - @ApiModelProperty(value = "The unique identifier assigned to the balance platform associated with the account holder.") - @JsonProperty(JSON_PROPERTY_BALANCE_PLATFORM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getBalancePlatform() { - return balancePlatform; - } - - - @JsonProperty(JSON_PROPERTY_BALANCE_PLATFORM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setBalancePlatform(String balancePlatform) { - this.balancePlatform = balancePlatform; - } - - public TransferRoute category(CategoryEnum category) { this.category = category; return this; @@ -312,8 +285,7 @@ public boolean equals(Object o) { return false; } TransferRoute transferRoute = (TransferRoute) o; - return Objects.equals(this.balancePlatform, transferRoute.balancePlatform) && - Objects.equals(this.category, transferRoute.category) && + return Objects.equals(this.category, transferRoute.category) && Objects.equals(this.country, transferRoute.country) && Objects.equals(this.currency, transferRoute.currency) && Objects.equals(this.priority, transferRoute.priority) && @@ -322,14 +294,13 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(balancePlatform, category, country, currency, priority, requirements); + return Objects.hash(category, country, currency, priority, requirements); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class TransferRoute {\n"); - sb.append(" balancePlatform: ").append(toIndentedString(balancePlatform)).append("\n"); sb.append(" category: ").append(toIndentedString(category)).append("\n"); sb.append(" country: ").append(toIndentedString(country)).append("\n"); sb.append(" currency: ").append(toIndentedString(currency)).append("\n"); diff --git a/src/main/java/com/adyen/model/balanceplatform/UpdateSweepConfigurationV2.java b/src/main/java/com/adyen/model/balanceplatform/UpdateSweepConfigurationV2.java index e9a920853..ab4e0e08b 100644 --- a/src/main/java/com/adyen/model/balanceplatform/UpdateSweepConfigurationV2.java +++ b/src/main/java/com/adyen/model/balanceplatform/UpdateSweepConfigurationV2.java @@ -110,8 +110,6 @@ public static CategoryEnum fromValue(String value) { public enum PrioritiesEnum { CROSSBORDER("crossBorder"), - DIRECTDEBIT("directDebit"), - FAST("fast"), INSTANT("instant"), @@ -160,6 +158,8 @@ public enum ReasonEnum { APPROVED("approved"), + BALANCEACCOUNTTEMPORARILYBLOCKEDBYTRANSACTIONRULE("balanceAccountTemporarilyBlockedByTransactionRule"), + COUNTERPARTYACCOUNTBLOCKED("counterpartyAccountBlocked"), COUNTERPARTYACCOUNTCLOSED("counterpartyAccountClosed"), @@ -172,6 +172,8 @@ public enum ReasonEnum { COUNTERPARTYBANKUNAVAILABLE("counterpartyBankUnavailable"), + DECLINEDBYTRANSACTIONRULE("declinedByTransactionRule"), + ERROR("error"), NOTENOUGHBALANCE("notEnoughBalance"), @@ -180,6 +182,8 @@ public enum ReasonEnum { ROUTENOTFOUND("routeNotFound"), + SCAFAILED("scaFailed"), + UNKNOWN("unknown"); private String value; diff --git a/src/main/java/com/adyen/model/binlookup/DSPublicKeyDetail.java b/src/main/java/com/adyen/model/binlookup/DSPublicKeyDetail.java index f366550c5..2c66fa3e9 100644 --- a/src/main/java/com/adyen/model/binlookup/DSPublicKeyDetail.java +++ b/src/main/java/com/adyen/model/binlookup/DSPublicKeyDetail.java @@ -35,7 +35,8 @@ DSPublicKeyDetail.JSON_PROPERTY_BRAND, DSPublicKeyDetail.JSON_PROPERTY_DIRECTORY_SERVER_ID, DSPublicKeyDetail.JSON_PROPERTY_FROM_S_D_K_VERSION, - DSPublicKeyDetail.JSON_PROPERTY_PUBLIC_KEY + DSPublicKeyDetail.JSON_PROPERTY_PUBLIC_KEY, + DSPublicKeyDetail.JSON_PROPERTY_ROOT_CERTIFICATES }) public class DSPublicKeyDetail { @@ -51,6 +52,9 @@ public class DSPublicKeyDetail { public static final String JSON_PROPERTY_PUBLIC_KEY = "publicKey"; private byte[] publicKey; + public static final String JSON_PROPERTY_ROOT_CERTIFICATES = "rootCertificates"; + private String rootCertificates; + public DSPublicKeyDetail() { } @@ -154,6 +158,31 @@ public void setPublicKey(byte[] publicKey) { } + public DSPublicKeyDetail rootCertificates(String rootCertificates) { + this.rootCertificates = rootCertificates; + return this; + } + + /** + * Directory Server root certificates. The 3D Secure 2 SDK verifies the ACS signed content using the rootCertificates. + * @return rootCertificates + **/ + @ApiModelProperty(value = "Directory Server root certificates. The 3D Secure 2 SDK verifies the ACS signed content using the rootCertificates.") + @JsonProperty(JSON_PROPERTY_ROOT_CERTIFICATES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getRootCertificates() { + return rootCertificates; + } + + + @JsonProperty(JSON_PROPERTY_ROOT_CERTIFICATES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setRootCertificates(String rootCertificates) { + this.rootCertificates = rootCertificates; + } + + /** * Return true if this DSPublicKeyDetail object is equal to o. */ @@ -169,12 +198,13 @@ public boolean equals(Object o) { return Objects.equals(this.brand, dsPublicKeyDetail.brand) && Objects.equals(this.directoryServerId, dsPublicKeyDetail.directoryServerId) && Objects.equals(this.fromSDKVersion, dsPublicKeyDetail.fromSDKVersion) && - Arrays.equals(this.publicKey, dsPublicKeyDetail.publicKey); + Arrays.equals(this.publicKey, dsPublicKeyDetail.publicKey) && + Objects.equals(this.rootCertificates, dsPublicKeyDetail.rootCertificates); } @Override public int hashCode() { - return Objects.hash(brand, directoryServerId, fromSDKVersion, Arrays.hashCode(publicKey)); + return Objects.hash(brand, directoryServerId, fromSDKVersion, Arrays.hashCode(publicKey), rootCertificates); } @Override @@ -185,6 +215,7 @@ public String toString() { sb.append(" directoryServerId: ").append(toIndentedString(directoryServerId)).append("\n"); sb.append(" fromSDKVersion: ").append(toIndentedString(fromSDKVersion)).append("\n"); sb.append(" publicKey: ").append(toIndentedString(publicKey)).append("\n"); + sb.append(" rootCertificates: ").append(toIndentedString(rootCertificates)).append("\n"); sb.append("}"); return sb.toString(); } diff --git a/src/main/java/com/adyen/model/checkout/BillingAddress.java b/src/main/java/com/adyen/model/checkout/BillingAddress.java new file mode 100644 index 000000000..bf544aecc --- /dev/null +++ b/src/main/java/com/adyen/model/checkout/BillingAddress.java @@ -0,0 +1,283 @@ +/* + * Adyen Checkout API + * + * The version of the OpenAPI document: 70 + * + * + * 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.adyen.model.checkout; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.core.JsonProcessingException; + + +/** + * BillingAddress + */ +@JsonPropertyOrder({ + BillingAddress.JSON_PROPERTY_CITY, + BillingAddress.JSON_PROPERTY_COUNTRY, + BillingAddress.JSON_PROPERTY_HOUSE_NUMBER_OR_NAME, + BillingAddress.JSON_PROPERTY_POSTAL_CODE, + BillingAddress.JSON_PROPERTY_STATE_OR_PROVINCE, + BillingAddress.JSON_PROPERTY_STREET +}) + +public class BillingAddress { + public static final String JSON_PROPERTY_CITY = "city"; + private String city; + + public static final String JSON_PROPERTY_COUNTRY = "country"; + private String country; + + public static final String JSON_PROPERTY_HOUSE_NUMBER_OR_NAME = "houseNumberOrName"; + private String houseNumberOrName; + + public static final String JSON_PROPERTY_POSTAL_CODE = "postalCode"; + private String postalCode; + + public static final String JSON_PROPERTY_STATE_OR_PROVINCE = "stateOrProvince"; + private String stateOrProvince; + + public static final String JSON_PROPERTY_STREET = "street"; + private String street; + + public BillingAddress() { + } + + public BillingAddress city(String city) { + this.city = city; + return this; + } + + /** + * The name of the city. Maximum length: 3000 characters. + * @return city + **/ + @ApiModelProperty(required = true, value = "The name of the city. Maximum length: 3000 characters.") + @JsonProperty(JSON_PROPERTY_CITY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getCity() { + return city; + } + + + @JsonProperty(JSON_PROPERTY_CITY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCity(String city) { + this.city = city; + } + + + public BillingAddress country(String country) { + this.country = country; + return this; + } + + /** + * The two-character ISO-3166-1 alpha-2 country code. For example, **US**. > If you don't know the country or are not collecting the country from the shopper, provide `country` as `ZZ`. + * @return country + **/ + @ApiModelProperty(required = true, value = "The two-character ISO-3166-1 alpha-2 country code. For example, **US**. > If you don't know the country or are not collecting the country from the shopper, provide `country` as `ZZ`.") + @JsonProperty(JSON_PROPERTY_COUNTRY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getCountry() { + return country; + } + + + @JsonProperty(JSON_PROPERTY_COUNTRY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCountry(String country) { + this.country = country; + } + + + public BillingAddress houseNumberOrName(String houseNumberOrName) { + this.houseNumberOrName = houseNumberOrName; + return this; + } + + /** + * The number or name of the house. Maximum length: 3000 characters. + * @return houseNumberOrName + **/ + @ApiModelProperty(required = true, value = "The number or name of the house. Maximum length: 3000 characters.") + @JsonProperty(JSON_PROPERTY_HOUSE_NUMBER_OR_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getHouseNumberOrName() { + return houseNumberOrName; + } + + + @JsonProperty(JSON_PROPERTY_HOUSE_NUMBER_OR_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setHouseNumberOrName(String houseNumberOrName) { + this.houseNumberOrName = houseNumberOrName; + } + + + public BillingAddress postalCode(String postalCode) { + this.postalCode = postalCode; + return this; + } + + /** + * A maximum of five digits for an address in the US, or a maximum of ten characters for an address in all other countries. + * @return postalCode + **/ + @ApiModelProperty(required = true, value = "A maximum of five digits for an address in the US, or a maximum of ten characters for an address in all other countries.") + @JsonProperty(JSON_PROPERTY_POSTAL_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getPostalCode() { + return postalCode; + } + + + @JsonProperty(JSON_PROPERTY_POSTAL_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPostalCode(String postalCode) { + this.postalCode = postalCode; + } + + + public BillingAddress stateOrProvince(String stateOrProvince) { + this.stateOrProvince = stateOrProvince; + return this; + } + + /** + * The two-character ISO 3166-2 state or province code. For example, **CA** in the US or **ON** in Canada. > Required for the US and Canada. + * @return stateOrProvince + **/ + @ApiModelProperty(value = "The two-character ISO 3166-2 state or province code. For example, **CA** in the US or **ON** in Canada. > Required for the US and Canada.") + @JsonProperty(JSON_PROPERTY_STATE_OR_PROVINCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getStateOrProvince() { + return stateOrProvince; + } + + + @JsonProperty(JSON_PROPERTY_STATE_OR_PROVINCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setStateOrProvince(String stateOrProvince) { + this.stateOrProvince = stateOrProvince; + } + + + public BillingAddress street(String street) { + this.street = street; + return this; + } + + /** + * The name of the street. Maximum length: 3000 characters. > The house number should not be included in this field; it should be separately provided via `houseNumberOrName`. + * @return street + **/ + @ApiModelProperty(required = true, value = "The name of the street. Maximum length: 3000 characters. > The house number should not be included in this field; it should be separately provided via `houseNumberOrName`.") + @JsonProperty(JSON_PROPERTY_STREET) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getStreet() { + return street; + } + + + @JsonProperty(JSON_PROPERTY_STREET) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setStreet(String street) { + this.street = street; + } + + + /** + * Return true if this BillingAddress object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + BillingAddress billingAddress = (BillingAddress) o; + return Objects.equals(this.city, billingAddress.city) && + Objects.equals(this.country, billingAddress.country) && + Objects.equals(this.houseNumberOrName, billingAddress.houseNumberOrName) && + Objects.equals(this.postalCode, billingAddress.postalCode) && + Objects.equals(this.stateOrProvince, billingAddress.stateOrProvince) && + Objects.equals(this.street, billingAddress.street); + } + + @Override + public int hashCode() { + return Objects.hash(city, country, houseNumberOrName, postalCode, stateOrProvince, street); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class BillingAddress {\n"); + sb.append(" city: ").append(toIndentedString(city)).append("\n"); + sb.append(" country: ").append(toIndentedString(country)).append("\n"); + sb.append(" houseNumberOrName: ").append(toIndentedString(houseNumberOrName)).append("\n"); + sb.append(" postalCode: ").append(toIndentedString(postalCode)).append("\n"); + sb.append(" stateOrProvince: ").append(toIndentedString(stateOrProvince)).append("\n"); + sb.append(" street: ").append(toIndentedString(street)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +/** + * Create an instance of BillingAddress given an JSON string + * + * @param jsonString JSON string + * @return An instance of BillingAddress + * @throws JsonProcessingException if the JSON string is invalid with respect to BillingAddress + */ + public static BillingAddress fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, BillingAddress.class); + } +/** + * Convert an instance of BillingAddress to an JSON string + * + * @return JSON string + */ + public String toJson() throws JsonProcessingException { + return JSON.getMapper().writeValueAsString(this); + } +} + diff --git a/src/main/java/com/adyen/model/checkout/CardDetails.java b/src/main/java/com/adyen/model/checkout/CardDetails.java index 00a2ed567..ea478a675 100644 --- a/src/main/java/com/adyen/model/checkout/CardDetails.java +++ b/src/main/java/com/adyen/model/checkout/CardDetails.java @@ -144,16 +144,10 @@ public static FundingSourceEnum fromValue(String value) { * Default payment method details. Common for scheme payment methods, and for simple payment method details. */ public enum TypeEnum { - BCMC("bcmc"), - SCHEME("scheme"), NETWORKTOKEN("networkToken"), - GIFTCARD("giftcard"), - - ALLIANCEDATA("alliancedata"), - CARD("card"); private String value; diff --git a/src/main/java/com/adyen/model/checkout/CreateCheckoutSessionRequest.java b/src/main/java/com/adyen/model/checkout/CreateCheckoutSessionRequest.java index 03030ce10..7d2db29b3 100644 --- a/src/main/java/com/adyen/model/checkout/CreateCheckoutSessionRequest.java +++ b/src/main/java/com/adyen/model/checkout/CreateCheckoutSessionRequest.java @@ -17,12 +17,13 @@ import java.util.Map; import java.util.HashMap; import com.adyen.model.checkout.AccountInfo; -import com.adyen.model.checkout.Address; import com.adyen.model.checkout.Amount; import com.adyen.model.checkout.ApplicationInfo; import com.adyen.model.checkout.AuthenticationData; +import com.adyen.model.checkout.BillingAddress; import com.adyen.model.checkout.CheckoutSessionInstallmentOption; import com.adyen.model.checkout.Company; +import com.adyen.model.checkout.DeliveryAddress; import com.adyen.model.checkout.FundOrigin; import com.adyen.model.checkout.FundRecipient; import com.adyen.model.checkout.LineItem; @@ -133,7 +134,7 @@ public class CreateCheckoutSessionRequest { private AuthenticationData authenticationData; public static final String JSON_PROPERTY_BILLING_ADDRESS = "billingAddress"; - private Address billingAddress; + private BillingAddress billingAddress; public static final String JSON_PROPERTY_BLOCKED_PAYMENT_METHODS = "blockedPaymentMethods"; private List blockedPaymentMethods = null; @@ -194,7 +195,7 @@ public static ChannelEnum fromValue(String value) { private OffsetDateTime deliverAt; public static final String JSON_PROPERTY_DELIVERY_ADDRESS = "deliveryAddress"; - private Address deliveryAddress; + private DeliveryAddress deliveryAddress; public static final String JSON_PROPERTY_ENABLE_ONE_CLICK = "enableOneClick"; private Boolean enableOneClick; @@ -620,7 +621,7 @@ public void setAuthenticationData(AuthenticationData authenticationData) { } - public CreateCheckoutSessionRequest billingAddress(Address billingAddress) { + public CreateCheckoutSessionRequest billingAddress(BillingAddress billingAddress) { this.billingAddress = billingAddress; return this; } @@ -633,14 +634,14 @@ public CreateCheckoutSessionRequest billingAddress(Address billingAddress) { @JsonProperty(JSON_PROPERTY_BILLING_ADDRESS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Address getBillingAddress() { + public BillingAddress getBillingAddress() { return billingAddress; } @JsonProperty(JSON_PROPERTY_BILLING_ADDRESS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setBillingAddress(Address billingAddress) { + public void setBillingAddress(BillingAddress billingAddress) { this.billingAddress = billingAddress; } @@ -828,7 +829,7 @@ public void setDeliverAt(OffsetDateTime deliverAt) { } - public CreateCheckoutSessionRequest deliveryAddress(Address deliveryAddress) { + public CreateCheckoutSessionRequest deliveryAddress(DeliveryAddress deliveryAddress) { this.deliveryAddress = deliveryAddress; return this; } @@ -841,14 +842,14 @@ public CreateCheckoutSessionRequest deliveryAddress(Address deliveryAddress) { @JsonProperty(JSON_PROPERTY_DELIVERY_ADDRESS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Address getDeliveryAddress() { + public DeliveryAddress getDeliveryAddress() { return deliveryAddress; } @JsonProperty(JSON_PROPERTY_DELIVERY_ADDRESS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setDeliveryAddress(Address deliveryAddress) { + public void setDeliveryAddress(DeliveryAddress deliveryAddress) { this.deliveryAddress = deliveryAddress; } diff --git a/src/main/java/com/adyen/model/checkout/CreateCheckoutSessionResponse.java b/src/main/java/com/adyen/model/checkout/CreateCheckoutSessionResponse.java index 79481ac6a..d78236efa 100644 --- a/src/main/java/com/adyen/model/checkout/CreateCheckoutSessionResponse.java +++ b/src/main/java/com/adyen/model/checkout/CreateCheckoutSessionResponse.java @@ -17,12 +17,13 @@ import java.util.Map; import java.util.HashMap; import com.adyen.model.checkout.AccountInfo; -import com.adyen.model.checkout.Address; import com.adyen.model.checkout.Amount; import com.adyen.model.checkout.ApplicationInfo; import com.adyen.model.checkout.AuthenticationData; +import com.adyen.model.checkout.BillingAddress; import com.adyen.model.checkout.CheckoutSessionInstallmentOption; import com.adyen.model.checkout.Company; +import com.adyen.model.checkout.DeliveryAddress; import com.adyen.model.checkout.FundOrigin; import com.adyen.model.checkout.FundRecipient; import com.adyen.model.checkout.LineItem; @@ -135,7 +136,7 @@ public class CreateCheckoutSessionResponse { private AuthenticationData authenticationData; public static final String JSON_PROPERTY_BILLING_ADDRESS = "billingAddress"; - private Address billingAddress; + private BillingAddress billingAddress; public static final String JSON_PROPERTY_BLOCKED_PAYMENT_METHODS = "blockedPaymentMethods"; private List blockedPaymentMethods = null; @@ -196,7 +197,7 @@ public static ChannelEnum fromValue(String value) { private OffsetDateTime deliverAt; public static final String JSON_PROPERTY_DELIVERY_ADDRESS = "deliveryAddress"; - private Address deliveryAddress; + private DeliveryAddress deliveryAddress; public static final String JSON_PROPERTY_ENABLE_ONE_CLICK = "enableOneClick"; private Boolean enableOneClick; @@ -666,7 +667,7 @@ public void setAuthenticationData(AuthenticationData authenticationData) { } - public CreateCheckoutSessionResponse billingAddress(Address billingAddress) { + public CreateCheckoutSessionResponse billingAddress(BillingAddress billingAddress) { this.billingAddress = billingAddress; return this; } @@ -679,14 +680,14 @@ public CreateCheckoutSessionResponse billingAddress(Address billingAddress) { @JsonProperty(JSON_PROPERTY_BILLING_ADDRESS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Address getBillingAddress() { + public BillingAddress getBillingAddress() { return billingAddress; } @JsonProperty(JSON_PROPERTY_BILLING_ADDRESS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setBillingAddress(Address billingAddress) { + public void setBillingAddress(BillingAddress billingAddress) { this.billingAddress = billingAddress; } @@ -874,7 +875,7 @@ public void setDeliverAt(OffsetDateTime deliverAt) { } - public CreateCheckoutSessionResponse deliveryAddress(Address deliveryAddress) { + public CreateCheckoutSessionResponse deliveryAddress(DeliveryAddress deliveryAddress) { this.deliveryAddress = deliveryAddress; return this; } @@ -887,14 +888,14 @@ public CreateCheckoutSessionResponse deliveryAddress(Address deliveryAddress) { @JsonProperty(JSON_PROPERTY_DELIVERY_ADDRESS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Address getDeliveryAddress() { + public DeliveryAddress getDeliveryAddress() { return deliveryAddress; } @JsonProperty(JSON_PROPERTY_DELIVERY_ADDRESS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setDeliveryAddress(Address deliveryAddress) { + public void setDeliveryAddress(DeliveryAddress deliveryAddress) { this.deliveryAddress = deliveryAddress; } diff --git a/src/main/java/com/adyen/model/checkout/DeliveryAddress.java b/src/main/java/com/adyen/model/checkout/DeliveryAddress.java new file mode 100644 index 000000000..ac1113ef7 --- /dev/null +++ b/src/main/java/com/adyen/model/checkout/DeliveryAddress.java @@ -0,0 +1,345 @@ +/* + * Adyen Checkout API + * + * The version of the OpenAPI document: 70 + * + * + * 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.adyen.model.checkout; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.core.JsonProcessingException; + + +/** + * DeliveryAddress + */ +@JsonPropertyOrder({ + DeliveryAddress.JSON_PROPERTY_CITY, + DeliveryAddress.JSON_PROPERTY_COUNTRY, + DeliveryAddress.JSON_PROPERTY_FIRST_NAME, + DeliveryAddress.JSON_PROPERTY_HOUSE_NUMBER_OR_NAME, + DeliveryAddress.JSON_PROPERTY_LAST_NAME, + DeliveryAddress.JSON_PROPERTY_POSTAL_CODE, + DeliveryAddress.JSON_PROPERTY_STATE_OR_PROVINCE, + DeliveryAddress.JSON_PROPERTY_STREET +}) + +public class DeliveryAddress { + public static final String JSON_PROPERTY_CITY = "city"; + private String city; + + public static final String JSON_PROPERTY_COUNTRY = "country"; + private String country; + + public static final String JSON_PROPERTY_FIRST_NAME = "firstName"; + private String firstName; + + public static final String JSON_PROPERTY_HOUSE_NUMBER_OR_NAME = "houseNumberOrName"; + private String houseNumberOrName; + + public static final String JSON_PROPERTY_LAST_NAME = "lastName"; + private String lastName; + + public static final String JSON_PROPERTY_POSTAL_CODE = "postalCode"; + private String postalCode; + + public static final String JSON_PROPERTY_STATE_OR_PROVINCE = "stateOrProvince"; + private String stateOrProvince; + + public static final String JSON_PROPERTY_STREET = "street"; + private String street; + + public DeliveryAddress() { + } + + public DeliveryAddress city(String city) { + this.city = city; + return this; + } + + /** + * The name of the city. Maximum length: 3000 characters. + * @return city + **/ + @ApiModelProperty(required = true, value = "The name of the city. Maximum length: 3000 characters.") + @JsonProperty(JSON_PROPERTY_CITY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getCity() { + return city; + } + + + @JsonProperty(JSON_PROPERTY_CITY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCity(String city) { + this.city = city; + } + + + public DeliveryAddress country(String country) { + this.country = country; + return this; + } + + /** + * The two-character ISO-3166-1 alpha-2 country code. For example, **US**. > If you don't know the country or are not collecting the country from the shopper, provide `country` as `ZZ`. + * @return country + **/ + @ApiModelProperty(required = true, value = "The two-character ISO-3166-1 alpha-2 country code. For example, **US**. > If you don't know the country or are not collecting the country from the shopper, provide `country` as `ZZ`.") + @JsonProperty(JSON_PROPERTY_COUNTRY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getCountry() { + return country; + } + + + @JsonProperty(JSON_PROPERTY_COUNTRY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCountry(String country) { + this.country = country; + } + + + public DeliveryAddress firstName(String firstName) { + this.firstName = firstName; + return this; + } + + /** + * Get firstName + * @return firstName + **/ + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_FIRST_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getFirstName() { + return firstName; + } + + + @JsonProperty(JSON_PROPERTY_FIRST_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setFirstName(String firstName) { + this.firstName = firstName; + } + + + public DeliveryAddress houseNumberOrName(String houseNumberOrName) { + this.houseNumberOrName = houseNumberOrName; + return this; + } + + /** + * The number or name of the house. Maximum length: 3000 characters. + * @return houseNumberOrName + **/ + @ApiModelProperty(required = true, value = "The number or name of the house. Maximum length: 3000 characters.") + @JsonProperty(JSON_PROPERTY_HOUSE_NUMBER_OR_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getHouseNumberOrName() { + return houseNumberOrName; + } + + + @JsonProperty(JSON_PROPERTY_HOUSE_NUMBER_OR_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setHouseNumberOrName(String houseNumberOrName) { + this.houseNumberOrName = houseNumberOrName; + } + + + public DeliveryAddress lastName(String lastName) { + this.lastName = lastName; + return this; + } + + /** + * Get lastName + * @return lastName + **/ + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_LAST_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getLastName() { + return lastName; + } + + + @JsonProperty(JSON_PROPERTY_LAST_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setLastName(String lastName) { + this.lastName = lastName; + } + + + public DeliveryAddress postalCode(String postalCode) { + this.postalCode = postalCode; + return this; + } + + /** + * A maximum of five digits for an address in the US, or a maximum of ten characters for an address in all other countries. + * @return postalCode + **/ + @ApiModelProperty(required = true, value = "A maximum of five digits for an address in the US, or a maximum of ten characters for an address in all other countries.") + @JsonProperty(JSON_PROPERTY_POSTAL_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getPostalCode() { + return postalCode; + } + + + @JsonProperty(JSON_PROPERTY_POSTAL_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPostalCode(String postalCode) { + this.postalCode = postalCode; + } + + + public DeliveryAddress stateOrProvince(String stateOrProvince) { + this.stateOrProvince = stateOrProvince; + return this; + } + + /** + * The two-character ISO 3166-2 state or province code. For example, **CA** in the US or **ON** in Canada. > Required for the US and Canada. + * @return stateOrProvince + **/ + @ApiModelProperty(value = "The two-character ISO 3166-2 state or province code. For example, **CA** in the US or **ON** in Canada. > Required for the US and Canada.") + @JsonProperty(JSON_PROPERTY_STATE_OR_PROVINCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getStateOrProvince() { + return stateOrProvince; + } + + + @JsonProperty(JSON_PROPERTY_STATE_OR_PROVINCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setStateOrProvince(String stateOrProvince) { + this.stateOrProvince = stateOrProvince; + } + + + public DeliveryAddress street(String street) { + this.street = street; + return this; + } + + /** + * The name of the street. Maximum length: 3000 characters. > The house number should not be included in this field; it should be separately provided via `houseNumberOrName`. + * @return street + **/ + @ApiModelProperty(required = true, value = "The name of the street. Maximum length: 3000 characters. > The house number should not be included in this field; it should be separately provided via `houseNumberOrName`.") + @JsonProperty(JSON_PROPERTY_STREET) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getStreet() { + return street; + } + + + @JsonProperty(JSON_PROPERTY_STREET) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setStreet(String street) { + this.street = street; + } + + + /** + * Return true if this DeliveryAddress object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DeliveryAddress deliveryAddress = (DeliveryAddress) o; + return Objects.equals(this.city, deliveryAddress.city) && + Objects.equals(this.country, deliveryAddress.country) && + Objects.equals(this.firstName, deliveryAddress.firstName) && + Objects.equals(this.houseNumberOrName, deliveryAddress.houseNumberOrName) && + Objects.equals(this.lastName, deliveryAddress.lastName) && + Objects.equals(this.postalCode, deliveryAddress.postalCode) && + Objects.equals(this.stateOrProvince, deliveryAddress.stateOrProvince) && + Objects.equals(this.street, deliveryAddress.street); + } + + @Override + public int hashCode() { + return Objects.hash(city, country, firstName, houseNumberOrName, lastName, postalCode, stateOrProvince, street); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DeliveryAddress {\n"); + sb.append(" city: ").append(toIndentedString(city)).append("\n"); + sb.append(" country: ").append(toIndentedString(country)).append("\n"); + sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n"); + sb.append(" houseNumberOrName: ").append(toIndentedString(houseNumberOrName)).append("\n"); + sb.append(" lastName: ").append(toIndentedString(lastName)).append("\n"); + sb.append(" postalCode: ").append(toIndentedString(postalCode)).append("\n"); + sb.append(" stateOrProvince: ").append(toIndentedString(stateOrProvince)).append("\n"); + sb.append(" street: ").append(toIndentedString(street)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +/** + * Create an instance of DeliveryAddress given an JSON string + * + * @param jsonString JSON string + * @return An instance of DeliveryAddress + * @throws JsonProcessingException if the JSON string is invalid with respect to DeliveryAddress + */ + public static DeliveryAddress fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, DeliveryAddress.class); + } +/** + * Convert an instance of DeliveryAddress to an JSON string + * + * @return JSON string + */ + public String toJson() throws JsonProcessingException { + return JSON.getMapper().writeValueAsString(this); + } +} + diff --git a/src/main/java/com/adyen/model/checkout/DokuDetails.java b/src/main/java/com/adyen/model/checkout/DokuDetails.java index c496e047b..ebed8476f 100644 --- a/src/main/java/com/adyen/model/checkout/DokuDetails.java +++ b/src/main/java/com/adyen/model/checkout/DokuDetails.java @@ -71,7 +71,11 @@ public enum TypeEnum { ALFAMART("doku_alfamart"), - INDOMARET("doku_indomaret"); + INDOMARET("doku_indomaret"), + + WALLET("doku_wallet"), + + OVO("doku_ovo"); private String value; diff --git a/src/main/java/com/adyen/model/checkout/DonationPaymentMethod.java b/src/main/java/com/adyen/model/checkout/DonationPaymentMethod.java new file mode 100644 index 000000000..634104a02 --- /dev/null +++ b/src/main/java/com/adyen/model/checkout/DonationPaymentMethod.java @@ -0,0 +1,437 @@ +/* + * Adyen Checkout API + * + * The version of the OpenAPI document: 70 + * + * + * 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.adyen.model.checkout; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.adyen.model.checkout.ApplePayDetails; +import com.adyen.model.checkout.CardDetails; +import com.adyen.model.checkout.GooglePayDetails; +import com.adyen.model.checkout.IdealDetails; +import com.adyen.model.checkout.PayWithGoogleDetails; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.core.JsonProcessingException; + +import com.fasterxml.jackson.core.type.TypeReference; + +import jakarta.ws.rs.core.GenericType; +import jakarta.ws.rs.core.Response; +import java.io.IOException; +import java.util.logging.Level; +import java.util.logging.Logger; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashSet; + +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.core.JsonToken; +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.JsonMappingException; +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.MapperFeature; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.DeserializationFeature; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; + + +@JsonDeserialize(using = DonationPaymentMethod.DonationPaymentMethodDeserializer.class) +@JsonSerialize(using = DonationPaymentMethod.DonationPaymentMethodSerializer.class) +public class DonationPaymentMethod extends AbstractOpenApiSchema { + private static final Logger log = Logger.getLogger(DonationPaymentMethod.class.getName()); + + public static class DonationPaymentMethodSerializer extends StdSerializer { + public DonationPaymentMethodSerializer(Class t) { + super(t); + } + + public DonationPaymentMethodSerializer() { + this(null); + } + + @Override + public void serialize(DonationPaymentMethod value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.getActualInstance()); + } + } + + public static class DonationPaymentMethodDeserializer extends StdDeserializer { + public DonationPaymentMethodDeserializer() { + this(DonationPaymentMethod.class); + } + + public DonationPaymentMethodDeserializer(Class vc) { + super(vc); + } + + @Override + public DonationPaymentMethod deserialize(JsonParser jp, DeserializationContext ctxt) throws IOException, JsonProcessingException { + JsonNode tree = jp.readValueAsTree(); + Object deserialized = null; + boolean typeCoercion = ctxt.isEnabled(MapperFeature.ALLOW_COERCION_OF_SCALARS); + int match = 0; + JsonToken token = tree.traverse(jp.getCodec()).nextToken(); + + // deserialize ApplePayDetails + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (ApplePayDetails.class.equals(Integer.class) || ApplePayDetails.class.equals(Long.class) || ApplePayDetails.class.equals(Float.class) || ApplePayDetails.class.equals(Double.class) || ApplePayDetails.class.equals(Boolean.class) || ApplePayDetails.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((ApplePayDetails.class.equals(Integer.class) || ApplePayDetails.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((ApplePayDetails.class.equals(Float.class) || ApplePayDetails.class.equals(Double.class)) && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= (ApplePayDetails.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (ApplePayDetails.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + // Checks if the unique type of the oneOf json matches any of the object TypeEnum values + boolean typeMatch = Arrays.stream(ApplePayDetails.TypeEnum.values()).anyMatch((t) -> t.getValue().contains(tree.findValue("type").asText())); + if (attemptParsing || typeMatch) { + // Strict deserialization for oneOf models + deserialized = JSON.getMapper().readValue(tree.toString(), ApplePayDetails.class); + // typeMatch should enforce proper deserialization + match++; + log.log(Level.FINER, "Input data matches schema 'ApplePayDetails'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'ApplePayDetails'", e); + } + + + // deserialize CardDetails + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (CardDetails.class.equals(Integer.class) || CardDetails.class.equals(Long.class) || CardDetails.class.equals(Float.class) || CardDetails.class.equals(Double.class) || CardDetails.class.equals(Boolean.class) || CardDetails.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((CardDetails.class.equals(Integer.class) || CardDetails.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((CardDetails.class.equals(Float.class) || CardDetails.class.equals(Double.class)) && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= (CardDetails.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (CardDetails.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + // Checks if the unique type of the oneOf json matches any of the object TypeEnum values + boolean typeMatch = Arrays.stream(CardDetails.TypeEnum.values()).anyMatch((t) -> t.getValue().contains(tree.findValue("type").asText())); + if (attemptParsing || typeMatch) { + // Strict deserialization for oneOf models + deserialized = JSON.getMapper().readValue(tree.toString(), CardDetails.class); + // typeMatch should enforce proper deserialization + match++; + log.log(Level.FINER, "Input data matches schema 'CardDetails'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'CardDetails'", e); + } + + + // deserialize GooglePayDetails + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (GooglePayDetails.class.equals(Integer.class) || GooglePayDetails.class.equals(Long.class) || GooglePayDetails.class.equals(Float.class) || GooglePayDetails.class.equals(Double.class) || GooglePayDetails.class.equals(Boolean.class) || GooglePayDetails.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((GooglePayDetails.class.equals(Integer.class) || GooglePayDetails.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((GooglePayDetails.class.equals(Float.class) || GooglePayDetails.class.equals(Double.class)) && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= (GooglePayDetails.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (GooglePayDetails.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + // Checks if the unique type of the oneOf json matches any of the object TypeEnum values + boolean typeMatch = Arrays.stream(GooglePayDetails.TypeEnum.values()).anyMatch((t) -> t.getValue().contains(tree.findValue("type").asText())); + if (attemptParsing || typeMatch) { + // Strict deserialization for oneOf models + deserialized = JSON.getMapper().readValue(tree.toString(), GooglePayDetails.class); + // typeMatch should enforce proper deserialization + match++; + log.log(Level.FINER, "Input data matches schema 'GooglePayDetails'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'GooglePayDetails'", e); + } + + + // deserialize IdealDetails + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (IdealDetails.class.equals(Integer.class) || IdealDetails.class.equals(Long.class) || IdealDetails.class.equals(Float.class) || IdealDetails.class.equals(Double.class) || IdealDetails.class.equals(Boolean.class) || IdealDetails.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((IdealDetails.class.equals(Integer.class) || IdealDetails.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((IdealDetails.class.equals(Float.class) || IdealDetails.class.equals(Double.class)) && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= (IdealDetails.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (IdealDetails.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + // Checks if the unique type of the oneOf json matches any of the object TypeEnum values + boolean typeMatch = Arrays.stream(IdealDetails.TypeEnum.values()).anyMatch((t) -> t.getValue().contains(tree.findValue("type").asText())); + if (attemptParsing || typeMatch) { + // Strict deserialization for oneOf models + deserialized = JSON.getMapper().readValue(tree.toString(), IdealDetails.class); + // typeMatch should enforce proper deserialization + match++; + log.log(Level.FINER, "Input data matches schema 'IdealDetails'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'IdealDetails'", e); + } + + + // deserialize PayWithGoogleDetails + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (PayWithGoogleDetails.class.equals(Integer.class) || PayWithGoogleDetails.class.equals(Long.class) || PayWithGoogleDetails.class.equals(Float.class) || PayWithGoogleDetails.class.equals(Double.class) || PayWithGoogleDetails.class.equals(Boolean.class) || PayWithGoogleDetails.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((PayWithGoogleDetails.class.equals(Integer.class) || PayWithGoogleDetails.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((PayWithGoogleDetails.class.equals(Float.class) || PayWithGoogleDetails.class.equals(Double.class)) && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= (PayWithGoogleDetails.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (PayWithGoogleDetails.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + // Checks if the unique type of the oneOf json matches any of the object TypeEnum values + boolean typeMatch = Arrays.stream(PayWithGoogleDetails.TypeEnum.values()).anyMatch((t) -> t.getValue().contains(tree.findValue("type").asText())); + if (attemptParsing || typeMatch) { + // Strict deserialization for oneOf models + deserialized = JSON.getMapper().readValue(tree.toString(), PayWithGoogleDetails.class); + // typeMatch should enforce proper deserialization + match++; + log.log(Level.FINER, "Input data matches schema 'PayWithGoogleDetails'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'PayWithGoogleDetails'", e); + } + + // Throw error if there is no match + if (match == 0) { + throw new IOException(String.format("Failed deserialization for DonationPaymentMethod: %d classes match result, expected 1", match)); + } + // Log warning if there is more than one match + if (match > 1) { + log.log(Level.WARNING, String.format("Warning, indecisive deserialization for DonationPaymentMethod: %d classes match result, expected 1", match)); + } + + DonationPaymentMethod ret = new DonationPaymentMethod(); + ret.setActualInstance(deserialized); + return ret; + } + + /** + * Handle deserialization of the 'null' value. + */ + @Override + public DonationPaymentMethod getNullValue(DeserializationContext ctxt) throws JsonMappingException { + throw new JsonMappingException(ctxt.getParser(), "DonationPaymentMethod cannot be null"); + } + } + + // store a list of schema names defined in oneOf + public static final Map schemas = new HashMap(); + + public DonationPaymentMethod() { + super("oneOf", Boolean.FALSE); + } + + public DonationPaymentMethod(ApplePayDetails o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public DonationPaymentMethod(CardDetails o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public DonationPaymentMethod(GooglePayDetails o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public DonationPaymentMethod(IdealDetails o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public DonationPaymentMethod(PayWithGoogleDetails o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + static { + schemas.put("ApplePayDetails", new GenericType() { + }); + schemas.put("CardDetails", new GenericType() { + }); + schemas.put("GooglePayDetails", new GenericType() { + }); + schemas.put("IdealDetails", new GenericType() { + }); + schemas.put("PayWithGoogleDetails", new GenericType() { + }); + JSON.registerDescendants(DonationPaymentMethod.class, Collections.unmodifiableMap(schemas)); + } + + @Override + public Map getSchemas() { + return DonationPaymentMethod.schemas; + } + + /** + * Set the instance that matches the oneOf child schema, check + * the instance parameter is valid against the oneOf child schemas: + * ApplePayDetails, CardDetails, GooglePayDetails, IdealDetails, PayWithGoogleDetails + * + * It could be an instance of the 'oneOf' schemas. + * The oneOf child schemas may themselves be a composed schema (allOf, anyOf, oneOf). + */ + @Override + public void setActualInstance(Object instance) { + if (JSON.isInstanceOf(ApplePayDetails.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf(CardDetails.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf(GooglePayDetails.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf(IdealDetails.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf(PayWithGoogleDetails.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + throw new RuntimeException("Invalid instance type. Must be ApplePayDetails, CardDetails, GooglePayDetails, IdealDetails, PayWithGoogleDetails"); + } + + /** + * Get the actual instance, which can be the following: + * ApplePayDetails, CardDetails, GooglePayDetails, IdealDetails, PayWithGoogleDetails + * + * @return The actual instance (ApplePayDetails, CardDetails, GooglePayDetails, IdealDetails, PayWithGoogleDetails) + */ + @Override + public Object getActualInstance() { + return super.getActualInstance(); + } + + /** + * Get the actual instance of `ApplePayDetails`. If the actual instance is not `ApplePayDetails`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `ApplePayDetails` + * @throws ClassCastException if the instance is not `ApplePayDetails` + */ + public ApplePayDetails getApplePayDetails() throws ClassCastException { + return (ApplePayDetails)super.getActualInstance(); + } + + /** + * Get the actual instance of `CardDetails`. If the actual instance is not `CardDetails`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `CardDetails` + * @throws ClassCastException if the instance is not `CardDetails` + */ + public CardDetails getCardDetails() throws ClassCastException { + return (CardDetails)super.getActualInstance(); + } + + /** + * Get the actual instance of `GooglePayDetails`. If the actual instance is not `GooglePayDetails`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `GooglePayDetails` + * @throws ClassCastException if the instance is not `GooglePayDetails` + */ + public GooglePayDetails getGooglePayDetails() throws ClassCastException { + return (GooglePayDetails)super.getActualInstance(); + } + + /** + * Get the actual instance of `IdealDetails`. If the actual instance is not `IdealDetails`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `IdealDetails` + * @throws ClassCastException if the instance is not `IdealDetails` + */ + public IdealDetails getIdealDetails() throws ClassCastException { + return (IdealDetails)super.getActualInstance(); + } + + /** + * Get the actual instance of `PayWithGoogleDetails`. If the actual instance is not `PayWithGoogleDetails`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `PayWithGoogleDetails` + * @throws ClassCastException if the instance is not `PayWithGoogleDetails` + */ + public PayWithGoogleDetails getPayWithGoogleDetails() throws ClassCastException { + return (PayWithGoogleDetails)super.getActualInstance(); + } + + /** + * Create an instance of DonationPaymentMethod given an JSON string + * + * @param jsonString JSON string + * @return An instance of DonationPaymentMethod + * @throws IOException if the JSON string is invalid with respect to DonationPaymentMethod + */ + public static DonationPaymentMethod fromJson(String jsonString) throws IOException { + return JSON.getMapper().readValue(jsonString, DonationPaymentMethod.class); + } + + /** + * Convert an instance of DonationPaymentMethod to an JSON string + * + * @return JSON string + */ + public String toJson() throws JsonProcessingException { + return JSON.getMapper().writeValueAsString(this); + } +} + diff --git a/src/main/java/com/adyen/model/checkout/DonationPaymentRequest.java b/src/main/java/com/adyen/model/checkout/DonationPaymentRequest.java index 3991ba86e..89310cfb4 100644 --- a/src/main/java/com/adyen/model/checkout/DonationPaymentRequest.java +++ b/src/main/java/com/adyen/model/checkout/DonationPaymentRequest.java @@ -17,13 +17,14 @@ import java.util.Map; import java.util.HashMap; import com.adyen.model.checkout.AccountInfo; -import com.adyen.model.checkout.Address; import com.adyen.model.checkout.Amount; import com.adyen.model.checkout.ApplicationInfo; import com.adyen.model.checkout.AuthenticationData; +import com.adyen.model.checkout.BillingAddress; import com.adyen.model.checkout.BrowserInfo; -import com.adyen.model.checkout.CheckoutPaymentMethod; import com.adyen.model.checkout.Company; +import com.adyen.model.checkout.DeliveryAddress; +import com.adyen.model.checkout.DonationPaymentMethod; import com.adyen.model.checkout.EncryptedOrderData; import com.adyen.model.checkout.ForexQuote; import com.adyen.model.checkout.FundOrigin; @@ -61,10 +62,12 @@ DonationPaymentRequest.JSON_PROPERTY_ACCOUNT_INFO, DonationPaymentRequest.JSON_PROPERTY_ADDITIONAL_AMOUNT, DonationPaymentRequest.JSON_PROPERTY_ADDITIONAL_DATA, + DonationPaymentRequest.JSON_PROPERTY_ALLOWED_PAYMENT_METHODS, DonationPaymentRequest.JSON_PROPERTY_AMOUNT, DonationPaymentRequest.JSON_PROPERTY_APPLICATION_INFO, DonationPaymentRequest.JSON_PROPERTY_AUTHENTICATION_DATA, DonationPaymentRequest.JSON_PROPERTY_BILLING_ADDRESS, + DonationPaymentRequest.JSON_PROPERTY_BLOCKED_PAYMENT_METHODS, DonationPaymentRequest.JSON_PROPERTY_BROWSER_INFO, DonationPaymentRequest.JSON_PROPERTY_CAPTURE_DELAY_HOURS, DonationPaymentRequest.JSON_PROPERTY_CHANNEL, @@ -88,6 +91,7 @@ DonationPaymentRequest.JSON_PROPERTY_FRAUD_OFFSET, DonationPaymentRequest.JSON_PROPERTY_FUND_ORIGIN, DonationPaymentRequest.JSON_PROPERTY_FUND_RECIPIENT, + DonationPaymentRequest.JSON_PROPERTY_FUNDING_SOURCE, DonationPaymentRequest.JSON_PROPERTY_INDUSTRY_USAGE, DonationPaymentRequest.JSON_PROPERTY_INSTALLMENTS, DonationPaymentRequest.JSON_PROPERTY_LINE_ITEMS, @@ -112,6 +116,7 @@ DonationPaymentRequest.JSON_PROPERTY_REFERENCE, DonationPaymentRequest.JSON_PROPERTY_RETURN_URL, DonationPaymentRequest.JSON_PROPERTY_RISK_DATA, + DonationPaymentRequest.JSON_PROPERTY_SELECTED_RECURRING_DETAIL_REFERENCE, DonationPaymentRequest.JSON_PROPERTY_SESSION_VALIDITY, DonationPaymentRequest.JSON_PROPERTY_SHOPPER_EMAIL, DonationPaymentRequest.JSON_PROPERTY_SHOPPER_I_P, @@ -140,6 +145,9 @@ public class DonationPaymentRequest { public static final String JSON_PROPERTY_ADDITIONAL_DATA = "additionalData"; private Map additionalData = null; + public static final String JSON_PROPERTY_ALLOWED_PAYMENT_METHODS = "allowedPaymentMethods"; + private List allowedPaymentMethods = null; + public static final String JSON_PROPERTY_AMOUNT = "amount"; private Amount amount; @@ -150,7 +158,10 @@ public class DonationPaymentRequest { private AuthenticationData authenticationData; public static final String JSON_PROPERTY_BILLING_ADDRESS = "billingAddress"; - private Address billingAddress; + private BillingAddress billingAddress; + + public static final String JSON_PROPERTY_BLOCKED_PAYMENT_METHODS = "blockedPaymentMethods"; + private List blockedPaymentMethods = null; public static final String JSON_PROPERTY_BROWSER_INFO = "browserInfo"; private BrowserInfo browserInfo; @@ -220,7 +231,7 @@ public static ChannelEnum fromValue(String value) { private OffsetDateTime deliverAt; public static final String JSON_PROPERTY_DELIVERY_ADDRESS = "deliveryAddress"; - private Address deliveryAddress; + private DeliveryAddress deliveryAddress; public static final String JSON_PROPERTY_DELIVERY_DATE = "deliveryDate"; private OffsetDateTime deliveryDate; @@ -293,6 +304,42 @@ public static EntityTypeEnum fromValue(String value) { public static final String JSON_PROPERTY_FUND_RECIPIENT = "fundRecipient"; private FundRecipient fundRecipient; + /** + * The funding source that should be used when multiple sources are available. For Brazilian combo cards, by default the funding source is credit. To use debit, set this value to **debit**. + */ + public enum FundingSourceEnum { + DEBIT("debit"); + + private String value; + + FundingSourceEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static FundingSourceEnum fromValue(String value) { + for (FundingSourceEnum b : FundingSourceEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_FUNDING_SOURCE = "fundingSource"; + private FundingSourceEnum fundingSource; + /** * The reason for the amount update. Possible values: * **delayedCharge** * **noShow** * **installment** */ @@ -373,7 +420,7 @@ public static IndustryUsageEnum fromValue(String value) { private String origin; public static final String JSON_PROPERTY_PAYMENT_METHOD = "paymentMethod"; - private CheckoutPaymentMethod paymentMethod; + private DonationPaymentMethod paymentMethod; public static final String JSON_PROPERTY_PLATFORM_CHARGEBACK_LOGIC = "platformChargebackLogic"; private PlatformChargebackLogic platformChargebackLogic; @@ -439,6 +486,9 @@ public static RecurringProcessingModelEnum fromValue(String value) { public static final String JSON_PROPERTY_RISK_DATA = "riskData"; private RiskData riskData; + public static final String JSON_PROPERTY_SELECTED_RECURRING_DETAIL_REFERENCE = "selectedRecurringDetailReference"; + private String selectedRecurringDetailReference; + public static final String JSON_PROPERTY_SESSION_VALIDITY = "sessionValidity"; private String sessionValidity; @@ -612,6 +662,39 @@ public void setAdditionalData(Map additionalData) { } + public DonationPaymentRequest allowedPaymentMethods(List allowedPaymentMethods) { + this.allowedPaymentMethods = allowedPaymentMethods; + return this; + } + + public DonationPaymentRequest addAllowedPaymentMethodsItem(String allowedPaymentMethodsItem) { + if (this.allowedPaymentMethods == null) { + this.allowedPaymentMethods = new ArrayList<>(); + } + this.allowedPaymentMethods.add(allowedPaymentMethodsItem); + return this; + } + + /** + * List of payment methods to be presented to the shopper. To refer to payment methods, use their [payment method type](https://docs.adyen.com/payment-methods/payment-method-types). Example: `\"allowedPaymentMethods\":[\"ideal\",\"giropay\"]` + * @return allowedPaymentMethods + **/ + @ApiModelProperty(value = "List of payment methods to be presented to the shopper. To refer to payment methods, use their [payment method type](https://docs.adyen.com/payment-methods/payment-method-types). Example: `\"allowedPaymentMethods\":[\"ideal\",\"giropay\"]`") + @JsonProperty(JSON_PROPERTY_ALLOWED_PAYMENT_METHODS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getAllowedPaymentMethods() { + return allowedPaymentMethods; + } + + + @JsonProperty(JSON_PROPERTY_ALLOWED_PAYMENT_METHODS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAllowedPaymentMethods(List allowedPaymentMethods) { + this.allowedPaymentMethods = allowedPaymentMethods; + } + + public DonationPaymentRequest amount(Amount amount) { this.amount = amount; return this; @@ -687,7 +770,7 @@ public void setAuthenticationData(AuthenticationData authenticationData) { } - public DonationPaymentRequest billingAddress(Address billingAddress) { + public DonationPaymentRequest billingAddress(BillingAddress billingAddress) { this.billingAddress = billingAddress; return this; } @@ -700,18 +783,51 @@ public DonationPaymentRequest billingAddress(Address billingAddress) { @JsonProperty(JSON_PROPERTY_BILLING_ADDRESS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Address getBillingAddress() { + public BillingAddress getBillingAddress() { return billingAddress; } @JsonProperty(JSON_PROPERTY_BILLING_ADDRESS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setBillingAddress(Address billingAddress) { + public void setBillingAddress(BillingAddress billingAddress) { this.billingAddress = billingAddress; } + public DonationPaymentRequest blockedPaymentMethods(List blockedPaymentMethods) { + this.blockedPaymentMethods = blockedPaymentMethods; + return this; + } + + public DonationPaymentRequest addBlockedPaymentMethodsItem(String blockedPaymentMethodsItem) { + if (this.blockedPaymentMethods == null) { + this.blockedPaymentMethods = new ArrayList<>(); + } + this.blockedPaymentMethods.add(blockedPaymentMethodsItem); + return this; + } + + /** + * List of payment methods to be hidden from the shopper. To refer to payment methods, use their [payment method type](https://docs.adyen.com/payment-methods/payment-method-types). Example: `\"blockedPaymentMethods\":[\"ideal\",\"giropay\"]` + * @return blockedPaymentMethods + **/ + @ApiModelProperty(value = "List of payment methods to be hidden from the shopper. To refer to payment methods, use their [payment method type](https://docs.adyen.com/payment-methods/payment-method-types). Example: `\"blockedPaymentMethods\":[\"ideal\",\"giropay\"]`") + @JsonProperty(JSON_PROPERTY_BLOCKED_PAYMENT_METHODS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getBlockedPaymentMethods() { + return blockedPaymentMethods; + } + + + @JsonProperty(JSON_PROPERTY_BLOCKED_PAYMENT_METHODS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setBlockedPaymentMethods(List blockedPaymentMethods) { + this.blockedPaymentMethods = blockedPaymentMethods; + } + + public DonationPaymentRequest browserInfo(BrowserInfo browserInfo) { this.browserInfo = browserInfo; return this; @@ -965,7 +1081,7 @@ public void setDeliverAt(OffsetDateTime deliverAt) { } - public DonationPaymentRequest deliveryAddress(Address deliveryAddress) { + public DonationPaymentRequest deliveryAddress(DeliveryAddress deliveryAddress) { this.deliveryAddress = deliveryAddress; return this; } @@ -978,14 +1094,14 @@ public DonationPaymentRequest deliveryAddress(Address deliveryAddress) { @JsonProperty(JSON_PROPERTY_DELIVERY_ADDRESS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Address getDeliveryAddress() { + public DeliveryAddress getDeliveryAddress() { return deliveryAddress; } @JsonProperty(JSON_PROPERTY_DELIVERY_ADDRESS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setDeliveryAddress(Address deliveryAddress) { + public void setDeliveryAddress(DeliveryAddress deliveryAddress) { this.deliveryAddress = deliveryAddress; } @@ -998,9 +1114,7 @@ public DonationPaymentRequest deliveryDate(OffsetDateTime deliveryDate) { /** * The date and time the purchased goods should be delivered. Format [ISO 8601](https://www.w3.org/TR/NOTE-datetime): YYYY-MM-DDThh:mm:ss.sssTZD Example: 2017-07-17T13:42:40.428+01:00 * @return deliveryDate - * @deprecated **/ - @Deprecated @ApiModelProperty(value = "The date and time the purchased goods should be delivered. Format [ISO 8601](https://www.w3.org/TR/NOTE-datetime): YYYY-MM-DDThh:mm:ss.sssTZD Example: 2017-07-17T13:42:40.428+01:00") @JsonProperty(JSON_PROPERTY_DELIVERY_DATE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -1010,7 +1124,6 @@ public OffsetDateTime getDeliveryDate() { } - @Deprecated @JsonProperty(JSON_PROPERTY_DELIVERY_DATE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public void setDeliveryDate(OffsetDateTime deliveryDate) { @@ -1293,6 +1406,31 @@ public void setFundRecipient(FundRecipient fundRecipient) { } + public DonationPaymentRequest fundingSource(FundingSourceEnum fundingSource) { + this.fundingSource = fundingSource; + return this; + } + + /** + * The funding source that should be used when multiple sources are available. For Brazilian combo cards, by default the funding source is credit. To use debit, set this value to **debit**. + * @return fundingSource + **/ + @ApiModelProperty(value = "The funding source that should be used when multiple sources are available. For Brazilian combo cards, by default the funding source is credit. To use debit, set this value to **debit**.") + @JsonProperty(JSON_PROPERTY_FUNDING_SOURCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public FundingSourceEnum getFundingSource() { + return fundingSource; + } + + + @JsonProperty(JSON_PROPERTY_FUNDING_SOURCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setFundingSource(FundingSourceEnum fundingSource) { + this.fundingSource = fundingSource; + } + + public DonationPaymentRequest industryUsage(IndustryUsageEnum industryUsage) { this.industryUsage = industryUsage; return this; @@ -1667,7 +1805,7 @@ public void setOrigin(String origin) { } - public DonationPaymentRequest paymentMethod(CheckoutPaymentMethod paymentMethod) { + public DonationPaymentRequest paymentMethod(DonationPaymentMethod paymentMethod) { this.paymentMethod = paymentMethod; return this; } @@ -1680,14 +1818,14 @@ public DonationPaymentRequest paymentMethod(CheckoutPaymentMethod paymentMethod) @JsonProperty(JSON_PROPERTY_PAYMENT_METHOD) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public CheckoutPaymentMethod getPaymentMethod() { + public DonationPaymentMethod getPaymentMethod() { return paymentMethod; } @JsonProperty(JSON_PROPERTY_PAYMENT_METHOD) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPaymentMethod(CheckoutPaymentMethod paymentMethod) { + public void setPaymentMethod(DonationPaymentMethod paymentMethod) { this.paymentMethod = paymentMethod; } @@ -1917,6 +2055,31 @@ public void setRiskData(RiskData riskData) { } + public DonationPaymentRequest selectedRecurringDetailReference(String selectedRecurringDetailReference) { + this.selectedRecurringDetailReference = selectedRecurringDetailReference; + return this; + } + + /** + * The `recurringDetailReference` you want to use for this payment. The value `LATEST` can be used to select the most recently stored recurring detail. + * @return selectedRecurringDetailReference + **/ + @ApiModelProperty(value = "The `recurringDetailReference` you want to use for this payment. The value `LATEST` can be used to select the most recently stored recurring detail.") + @JsonProperty(JSON_PROPERTY_SELECTED_RECURRING_DETAIL_REFERENCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getSelectedRecurringDetailReference() { + return selectedRecurringDetailReference; + } + + + @JsonProperty(JSON_PROPERTY_SELECTED_RECURRING_DETAIL_REFERENCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSelectedRecurringDetailReference(String selectedRecurringDetailReference) { + this.selectedRecurringDetailReference = selectedRecurringDetailReference; + } + + public DonationPaymentRequest sessionValidity(String sessionValidity) { this.sessionValidity = sessionValidity; return this; @@ -2343,10 +2506,12 @@ public boolean equals(Object o) { return Objects.equals(this.accountInfo, donationPaymentRequest.accountInfo) && Objects.equals(this.additionalAmount, donationPaymentRequest.additionalAmount) && Objects.equals(this.additionalData, donationPaymentRequest.additionalData) && + Objects.equals(this.allowedPaymentMethods, donationPaymentRequest.allowedPaymentMethods) && Objects.equals(this.amount, donationPaymentRequest.amount) && Objects.equals(this.applicationInfo, donationPaymentRequest.applicationInfo) && Objects.equals(this.authenticationData, donationPaymentRequest.authenticationData) && Objects.equals(this.billingAddress, donationPaymentRequest.billingAddress) && + Objects.equals(this.blockedPaymentMethods, donationPaymentRequest.blockedPaymentMethods) && Objects.equals(this.browserInfo, donationPaymentRequest.browserInfo) && Objects.equals(this.captureDelayHours, donationPaymentRequest.captureDelayHours) && Objects.equals(this.channel, donationPaymentRequest.channel) && @@ -2370,6 +2535,7 @@ public boolean equals(Object o) { Objects.equals(this.fraudOffset, donationPaymentRequest.fraudOffset) && Objects.equals(this.fundOrigin, donationPaymentRequest.fundOrigin) && Objects.equals(this.fundRecipient, donationPaymentRequest.fundRecipient) && + Objects.equals(this.fundingSource, donationPaymentRequest.fundingSource) && Objects.equals(this.industryUsage, donationPaymentRequest.industryUsage) && Objects.equals(this.installments, donationPaymentRequest.installments) && Objects.equals(this.lineItems, donationPaymentRequest.lineItems) && @@ -2394,6 +2560,7 @@ public boolean equals(Object o) { Objects.equals(this.reference, donationPaymentRequest.reference) && Objects.equals(this.returnUrl, donationPaymentRequest.returnUrl) && Objects.equals(this.riskData, donationPaymentRequest.riskData) && + Objects.equals(this.selectedRecurringDetailReference, donationPaymentRequest.selectedRecurringDetailReference) && Objects.equals(this.sessionValidity, donationPaymentRequest.sessionValidity) && Objects.equals(this.shopperEmail, donationPaymentRequest.shopperEmail) && Objects.equals(this.shopperIP, donationPaymentRequest.shopperIP) && @@ -2414,7 +2581,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(accountInfo, additionalAmount, additionalData, amount, applicationInfo, authenticationData, billingAddress, browserInfo, captureDelayHours, channel, checkoutAttemptId, company, conversionId, countryCode, dateOfBirth, dccQuote, deliverAt, deliveryAddress, deliveryDate, deviceFingerprint, donationAccount, donationOriginalPspReference, donationToken, enableOneClick, enablePayOut, enableRecurring, entityType, fraudOffset, fundOrigin, fundRecipient, industryUsage, installments, lineItems, localizedShopperStatement, mandate, mcc, merchantAccount, merchantOrderReference, merchantRiskIndicator, metadata, mpiData, order, orderReference, origin, paymentMethod, platformChargebackLogic, recurringExpiry, recurringFrequency, recurringProcessingModel, redirectFromIssuerMethod, redirectToIssuerMethod, reference, returnUrl, riskData, sessionValidity, shopperEmail, shopperIP, shopperInteraction, shopperLocale, shopperName, shopperReference, shopperStatement, socialSecurityNumber, splits, store, storePaymentMethod, telephoneNumber, threeDS2RequestData, threeDSAuthenticationOnly, trustedShopper); + return Objects.hash(accountInfo, additionalAmount, additionalData, allowedPaymentMethods, amount, applicationInfo, authenticationData, billingAddress, blockedPaymentMethods, browserInfo, captureDelayHours, channel, checkoutAttemptId, company, conversionId, countryCode, dateOfBirth, dccQuote, deliverAt, deliveryAddress, deliveryDate, deviceFingerprint, donationAccount, donationOriginalPspReference, donationToken, enableOneClick, enablePayOut, enableRecurring, entityType, fraudOffset, fundOrigin, fundRecipient, fundingSource, industryUsage, installments, lineItems, localizedShopperStatement, mandate, mcc, merchantAccount, merchantOrderReference, merchantRiskIndicator, metadata, mpiData, order, orderReference, origin, paymentMethod, platformChargebackLogic, recurringExpiry, recurringFrequency, recurringProcessingModel, redirectFromIssuerMethod, redirectToIssuerMethod, reference, returnUrl, riskData, selectedRecurringDetailReference, sessionValidity, shopperEmail, shopperIP, shopperInteraction, shopperLocale, shopperName, shopperReference, shopperStatement, socialSecurityNumber, splits, store, storePaymentMethod, telephoneNumber, threeDS2RequestData, threeDSAuthenticationOnly, trustedShopper); } @Override @@ -2424,10 +2591,12 @@ public String toString() { sb.append(" accountInfo: ").append(toIndentedString(accountInfo)).append("\n"); sb.append(" additionalAmount: ").append(toIndentedString(additionalAmount)).append("\n"); sb.append(" additionalData: ").append(toIndentedString(additionalData)).append("\n"); + sb.append(" allowedPaymentMethods: ").append(toIndentedString(allowedPaymentMethods)).append("\n"); sb.append(" amount: ").append(toIndentedString(amount)).append("\n"); sb.append(" applicationInfo: ").append(toIndentedString(applicationInfo)).append("\n"); sb.append(" authenticationData: ").append(toIndentedString(authenticationData)).append("\n"); sb.append(" billingAddress: ").append(toIndentedString(billingAddress)).append("\n"); + sb.append(" blockedPaymentMethods: ").append(toIndentedString(blockedPaymentMethods)).append("\n"); sb.append(" browserInfo: ").append(toIndentedString(browserInfo)).append("\n"); sb.append(" captureDelayHours: ").append(toIndentedString(captureDelayHours)).append("\n"); sb.append(" channel: ").append(toIndentedString(channel)).append("\n"); @@ -2451,6 +2620,7 @@ public String toString() { sb.append(" fraudOffset: ").append(toIndentedString(fraudOffset)).append("\n"); sb.append(" fundOrigin: ").append(toIndentedString(fundOrigin)).append("\n"); sb.append(" fundRecipient: ").append(toIndentedString(fundRecipient)).append("\n"); + sb.append(" fundingSource: ").append(toIndentedString(fundingSource)).append("\n"); sb.append(" industryUsage: ").append(toIndentedString(industryUsage)).append("\n"); sb.append(" installments: ").append(toIndentedString(installments)).append("\n"); sb.append(" lineItems: ").append(toIndentedString(lineItems)).append("\n"); @@ -2475,6 +2645,7 @@ public String toString() { sb.append(" reference: ").append(toIndentedString(reference)).append("\n"); sb.append(" returnUrl: ").append(toIndentedString(returnUrl)).append("\n"); sb.append(" riskData: ").append(toIndentedString(riskData)).append("\n"); + sb.append(" selectedRecurringDetailReference: ").append(toIndentedString(selectedRecurringDetailReference)).append("\n"); sb.append(" sessionValidity: ").append(toIndentedString(sessionValidity)).append("\n"); sb.append(" shopperEmail: ").append(toIndentedString(shopperEmail)).append("\n"); sb.append(" shopperIP: ").append(toIndentedString(shopperIP)).append("\n"); diff --git a/src/main/java/com/adyen/model/checkout/PaymentRequest.java b/src/main/java/com/adyen/model/checkout/PaymentRequest.java index 862919a55..1b31ea089 100644 --- a/src/main/java/com/adyen/model/checkout/PaymentRequest.java +++ b/src/main/java/com/adyen/model/checkout/PaymentRequest.java @@ -17,13 +17,14 @@ import java.util.Map; import java.util.HashMap; import com.adyen.model.checkout.AccountInfo; -import com.adyen.model.checkout.Address; import com.adyen.model.checkout.Amount; import com.adyen.model.checkout.ApplicationInfo; import com.adyen.model.checkout.AuthenticationData; +import com.adyen.model.checkout.BillingAddress; import com.adyen.model.checkout.BrowserInfo; import com.adyen.model.checkout.CheckoutPaymentMethod; import com.adyen.model.checkout.Company; +import com.adyen.model.checkout.DeliveryAddress; import com.adyen.model.checkout.EncryptedOrderData; import com.adyen.model.checkout.ForexQuote; import com.adyen.model.checkout.FundOrigin; @@ -147,7 +148,7 @@ public class PaymentRequest { private AuthenticationData authenticationData; public static final String JSON_PROPERTY_BILLING_ADDRESS = "billingAddress"; - private Address billingAddress; + private BillingAddress billingAddress; public static final String JSON_PROPERTY_BROWSER_INFO = "browserInfo"; private BrowserInfo browserInfo; @@ -217,7 +218,7 @@ public static ChannelEnum fromValue(String value) { private OffsetDateTime deliverAt; public static final String JSON_PROPERTY_DELIVERY_ADDRESS = "deliveryAddress"; - private Address deliveryAddress; + private DeliveryAddress deliveryAddress; public static final String JSON_PROPERTY_DELIVERY_DATE = "deliveryDate"; private OffsetDateTime deliveryDate; @@ -675,7 +676,7 @@ public void setAuthenticationData(AuthenticationData authenticationData) { } - public PaymentRequest billingAddress(Address billingAddress) { + public PaymentRequest billingAddress(BillingAddress billingAddress) { this.billingAddress = billingAddress; return this; } @@ -688,14 +689,14 @@ public PaymentRequest billingAddress(Address billingAddress) { @JsonProperty(JSON_PROPERTY_BILLING_ADDRESS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Address getBillingAddress() { + public BillingAddress getBillingAddress() { return billingAddress; } @JsonProperty(JSON_PROPERTY_BILLING_ADDRESS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setBillingAddress(Address billingAddress) { + public void setBillingAddress(BillingAddress billingAddress) { this.billingAddress = billingAddress; } @@ -953,7 +954,7 @@ public void setDeliverAt(OffsetDateTime deliverAt) { } - public PaymentRequest deliveryAddress(Address deliveryAddress) { + public PaymentRequest deliveryAddress(DeliveryAddress deliveryAddress) { this.deliveryAddress = deliveryAddress; return this; } @@ -966,14 +967,14 @@ public PaymentRequest deliveryAddress(Address deliveryAddress) { @JsonProperty(JSON_PROPERTY_DELIVERY_ADDRESS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Address getDeliveryAddress() { + public DeliveryAddress getDeliveryAddress() { return deliveryAddress; } @JsonProperty(JSON_PROPERTY_DELIVERY_ADDRESS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setDeliveryAddress(Address deliveryAddress) { + public void setDeliveryAddress(DeliveryAddress deliveryAddress) { this.deliveryAddress = deliveryAddress; } diff --git a/src/main/java/com/adyen/model/checkout/SubMerchantInfo.java b/src/main/java/com/adyen/model/checkout/SubMerchantInfo.java index a2cfbc142..4fd4edf9a 100644 --- a/src/main/java/com/adyen/model/checkout/SubMerchantInfo.java +++ b/src/main/java/com/adyen/model/checkout/SubMerchantInfo.java @@ -16,7 +16,7 @@ import java.util.Arrays; import java.util.Map; import java.util.HashMap; -import com.adyen.model.checkout.Address; +import com.adyen.model.checkout.BillingAddress; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -41,7 +41,7 @@ public class SubMerchantInfo { public static final String JSON_PROPERTY_ADDRESS = "address"; - private Address address; + private BillingAddress address; public static final String JSON_PROPERTY_ID = "id"; private String id; @@ -58,7 +58,7 @@ public class SubMerchantInfo { public SubMerchantInfo() { } - public SubMerchantInfo address(Address address) { + public SubMerchantInfo address(BillingAddress address) { this.address = address; return this; } @@ -71,14 +71,14 @@ public SubMerchantInfo address(Address address) { @JsonProperty(JSON_PROPERTY_ADDRESS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Address getAddress() { + public BillingAddress getAddress() { return address; } @JsonProperty(JSON_PROPERTY_ADDRESS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAddress(Address address) { + public void setAddress(BillingAddress address) { this.address = address; } diff --git a/src/main/java/com/adyen/model/legalentitymanagement/BusinessLine.java b/src/main/java/com/adyen/model/legalentitymanagement/BusinessLine.java index fca42d4b0..a5b19c145 100644 --- a/src/main/java/com/adyen/model/legalentitymanagement/BusinessLine.java +++ b/src/main/java/com/adyen/model/legalentitymanagement/BusinessLine.java @@ -274,10 +274,10 @@ public BusinessLine addProblemsItem(CapabilityProblem problemsItem) { } /** - * List of the verification errors from capabilities for this supporting entity. + * The verification errors related to capabilities for this supporting entity. * @return problems **/ - @ApiModelProperty(value = "List of the verification errors from capabilities for this supporting entity.") + @ApiModelProperty(value = "The verification errors related to capabilities for this supporting entity.") @JsonProperty(JSON_PROPERTY_PROBLEMS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) diff --git a/src/main/java/com/adyen/model/legalentitymanagement/GeneratePciDescriptionRequest.java b/src/main/java/com/adyen/model/legalentitymanagement/GeneratePciDescriptionRequest.java index 6e44da6b7..55759ae63 100644 --- a/src/main/java/com/adyen/model/legalentitymanagement/GeneratePciDescriptionRequest.java +++ b/src/main/java/com/adyen/model/legalentitymanagement/GeneratePciDescriptionRequest.java @@ -23,6 +23,8 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; +import java.util.ArrayList; +import java.util.List; import com.fasterxml.jackson.annotation.JsonPropertyOrder; import com.fasterxml.jackson.core.JsonProcessingException; @@ -31,16 +33,92 @@ * GeneratePciDescriptionRequest */ @JsonPropertyOrder({ + GeneratePciDescriptionRequest.JSON_PROPERTY_ADDITIONAL_SALES_CHANNELS, GeneratePciDescriptionRequest.JSON_PROPERTY_LANGUAGE }) public class GeneratePciDescriptionRequest { + /** + * Gets or Sets additionalSalesChannels + */ + public enum AdditionalSalesChannelsEnum { + ECOMMERCE("eCommerce"), + + ECOMMOTO("ecomMoto"), + + POS("pos"), + + POSMOTO("posMoto"); + + private String value; + + AdditionalSalesChannelsEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static AdditionalSalesChannelsEnum fromValue(String value) { + for (AdditionalSalesChannelsEnum b : AdditionalSalesChannelsEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_ADDITIONAL_SALES_CHANNELS = "additionalSalesChannels"; + private List additionalSalesChannels = null; + public static final String JSON_PROPERTY_LANGUAGE = "language"; private String language; public GeneratePciDescriptionRequest() { } + public GeneratePciDescriptionRequest additionalSalesChannels(List additionalSalesChannels) { + this.additionalSalesChannels = additionalSalesChannels; + return this; + } + + public GeneratePciDescriptionRequest addAdditionalSalesChannelsItem(AdditionalSalesChannelsEnum additionalSalesChannelsItem) { + if (this.additionalSalesChannels == null) { + this.additionalSalesChannels = new ArrayList<>(); + } + this.additionalSalesChannels.add(additionalSalesChannelsItem); + return this; + } + + /** + * An array of additional sales channels to generate PCI questionnaires. Include the relevant sales channels if you need your user to sign PCI questionnaires. Not required if you [create stores](https://docs.adyen.com/marketplaces-and-platforms/additional-for-platform-setup/create-stores/) and [add payment methods](https://docs.adyen.com/marketplaces-and-platforms/payment-methods/) for your user. Possible values: * **eCommerce** * **pos** * **ecomMoto** * **posMoto** + * @return additionalSalesChannels + **/ + @ApiModelProperty(value = "An array of additional sales channels to generate PCI questionnaires. Include the relevant sales channels if you need your user to sign PCI questionnaires. Not required if you [create stores](https://docs.adyen.com/marketplaces-and-platforms/additional-for-platform-setup/create-stores/) and [add payment methods](https://docs.adyen.com/marketplaces-and-platforms/payment-methods/) for your user. Possible values: * **eCommerce** * **pos** * **ecomMoto** * **posMoto** ") + @JsonProperty(JSON_PROPERTY_ADDITIONAL_SALES_CHANNELS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getAdditionalSalesChannels() { + return additionalSalesChannels; + } + + + @JsonProperty(JSON_PROPERTY_ADDITIONAL_SALES_CHANNELS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAdditionalSalesChannels(List additionalSalesChannels) { + this.additionalSalesChannels = additionalSalesChannels; + } + + public GeneratePciDescriptionRequest language(String language) { this.language = language; return this; @@ -78,18 +156,20 @@ public boolean equals(Object o) { return false; } GeneratePciDescriptionRequest generatePciDescriptionRequest = (GeneratePciDescriptionRequest) o; - return Objects.equals(this.language, generatePciDescriptionRequest.language); + return Objects.equals(this.additionalSalesChannels, generatePciDescriptionRequest.additionalSalesChannels) && + Objects.equals(this.language, generatePciDescriptionRequest.language); } @Override public int hashCode() { - return Objects.hash(language); + return Objects.hash(additionalSalesChannels, language); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class GeneratePciDescriptionRequest {\n"); + sb.append(" additionalSalesChannels: ").append(toIndentedString(additionalSalesChannels)).append("\n"); sb.append(" language: ").append(toIndentedString(language)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/src/main/java/com/adyen/model/legalentitymanagement/HKLocalAccountIdentification.java b/src/main/java/com/adyen/model/legalentitymanagement/HKLocalAccountIdentification.java index 2e5f4c8ea..4cd3a811a 100644 --- a/src/main/java/com/adyen/model/legalentitymanagement/HKLocalAccountIdentification.java +++ b/src/main/java/com/adyen/model/legalentitymanagement/HKLocalAccountIdentification.java @@ -88,10 +88,10 @@ public HKLocalAccountIdentification accountNumber(String accountNumber) { } /** - * The 9- to 12-character bank account number (alphanumeric), without separators or whitespace. Starts with the 3-digit branch code. + * The 9- to 15-character bank account number (alphanumeric), without separators or whitespace. Starts with the 3-digit branch code. * @return accountNumber **/ - @ApiModelProperty(required = true, value = "The 9- to 12-character bank account number (alphanumeric), without separators or whitespace. Starts with the 3-digit branch code.") + @ApiModelProperty(required = true, value = "The 9- to 15-character bank account number (alphanumeric), without separators or whitespace. Starts with the 3-digit branch code.") @JsonProperty(JSON_PROPERTY_ACCOUNT_NUMBER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) diff --git a/src/main/java/com/adyen/model/legalentitymanagement/IdentificationData.java b/src/main/java/com/adyen/model/legalentitymanagement/IdentificationData.java index 58d19db82..214da24ef 100644 --- a/src/main/java/com/adyen/model/legalentitymanagement/IdentificationData.java +++ b/src/main/java/com/adyen/model/legalentitymanagement/IdentificationData.java @@ -63,7 +63,7 @@ public class IdentificationData { * Type of identity data. For **individual**, the `type` value is **nationalIdNumber**. */ public enum TypeEnum { - PROOFOFNATIONALIDNUMBER("proofOfNationalIdNumber"); + NATIONALIDNUMBER("nationalIdNumber"); private String value; diff --git a/src/main/java/com/adyen/model/legalentitymanagement/LegalEntity.java b/src/main/java/com/adyen/model/legalentitymanagement/LegalEntity.java index 38aa0f159..f2f176101 100644 --- a/src/main/java/com/adyen/model/legalentitymanagement/LegalEntity.java +++ b/src/main/java/com/adyen/model/legalentitymanagement/LegalEntity.java @@ -368,10 +368,10 @@ public LegalEntity addProblemsItem(CapabilityProblem problemsItem) { } /** - * List of the verification errors from capabilities for the legal entity. + * List of verification errors related to capabilities for the legal entity. * @return problems **/ - @ApiModelProperty(value = "List of the verification errors from capabilities for the legal entity.") + @ApiModelProperty(value = "List of verification errors related to capabilities for the legal entity.") @JsonProperty(JSON_PROPERTY_PROBLEMS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) diff --git a/src/main/java/com/adyen/model/legalentitymanagement/LegalEntityCapability.java b/src/main/java/com/adyen/model/legalentitymanagement/LegalEntityCapability.java index 21e831b8a..af7e9251c 100644 --- a/src/main/java/com/adyen/model/legalentitymanagement/LegalEntityCapability.java +++ b/src/main/java/com/adyen/model/legalentitymanagement/LegalEntityCapability.java @@ -157,10 +157,10 @@ public LegalEntityCapability allowed(Boolean allowed) { } /** - * Indicates whether the capability is allowed. Adyen sets this to **true** if the verification is successful + * Indicates whether the capability is allowed. Adyen sets this to **true** if the verification is successful. * @return allowed **/ - @ApiModelProperty(value = "Indicates whether the capability is allowed. Adyen sets this to **true** if the verification is successful ") + @ApiModelProperty(value = "Indicates whether the capability is allowed. Adyen sets this to **true** if the verification is successful.") @JsonProperty(JSON_PROPERTY_ALLOWED) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -232,10 +232,10 @@ public LegalEntityCapability requested(Boolean requested) { } /** - * Indicates whether the capability is requested. To check whether the Legal Entity is permitted to use the capability, + * Indicates whether the capability is requested. To check whether the legal entity is permitted to use the capability, refer to the `allowed` field. * @return requested **/ - @ApiModelProperty(value = "Indicates whether the capability is requested. To check whether the Legal Entity is permitted to use the capability, ") + @ApiModelProperty(value = "Indicates whether the capability is requested. To check whether the legal entity is permitted to use the capability, refer to the `allowed` field.") @JsonProperty(JSON_PROPERTY_REQUESTED) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -315,10 +315,10 @@ public LegalEntityCapability addTransferInstrumentsItem(SupportingEntityCapabili } /** - * Capability status for transfer instruments associated with legal entity + * The capability status of transfer instruments associated with the legal entity. * @return transferInstruments **/ - @ApiModelProperty(value = "Capability status for transfer instruments associated with legal entity") + @ApiModelProperty(value = "The capability status of transfer instruments associated with the legal entity.") @JsonProperty(JSON_PROPERTY_TRANSFER_INSTRUMENTS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) diff --git a/src/main/java/com/adyen/model/legalentitymanagement/OnboardingLinkInfo.java b/src/main/java/com/adyen/model/legalentitymanagement/OnboardingLinkInfo.java index 6e420dc21..8d73bd12e 100644 --- a/src/main/java/com/adyen/model/legalentitymanagement/OnboardingLinkInfo.java +++ b/src/main/java/com/adyen/model/legalentitymanagement/OnboardingLinkInfo.java @@ -120,10 +120,10 @@ public OnboardingLinkInfo putSettingsItem(String key, Boolean settingsItem) { } /** - * Boolean key-value pairs indicating the settings for the hosted onboarding page. The keys are the settings. Possible keys: By default, these values are set to **true**. Set to **false** to not allow the action. - **changeLegalEntityType**: The user can change their legal entity type. - **editPrefilledCountry**: The user can change the country of their legal entity's address, for example the registered address of an organization. By default, this value is set to **false**. Set to **true** to allow the action. - **allowBankAccountFormatSelection**: The user can select the format for their payout account if applicable. - **allowIntraRegionCrossBorderPayout**: The user can select a payout account in a different EU/EEA country than the country of their legal entity. + * Boolean key-value pairs indicating the settings for the hosted onboarding page. The keys are the settings. Possible keys: By default, these values are set to **true**. Set to **false** to not allow the action. - **changeLegalEntityType**: The user can change their legal entity type. - **editPrefilledCountry**: The user can change the country of their legal entity's address, for example the registered address of an organization. By default, these values are set to **false**. Set to **true** to allow the action. - **allowBankAccountFormatSelection**: The user can select the format for their payout account if applicable. - **allowIntraRegionCrossBorderPayout**: The user can select a payout account in a different EU/EEA country than the country of their legal entity. By default, these value are set to **false**. Set the following values to **true** to require the user to sign PCI questionnaires based on their sales channels. The user must sign PCI questionnaires for all relevant sales channels. - **requirePciSignEcommerce** - **requirePciSignPos** - **requirePciSignEcomMoto** - **requirePciSignPosMoto** * @return settings **/ - @ApiModelProperty(value = "Boolean key-value pairs indicating the settings for the hosted onboarding page. The keys are the settings. Possible keys: By default, these values are set to **true**. Set to **false** to not allow the action. - **changeLegalEntityType**: The user can change their legal entity type. - **editPrefilledCountry**: The user can change the country of their legal entity's address, for example the registered address of an organization. By default, this value is set to **false**. Set to **true** to allow the action. - **allowBankAccountFormatSelection**: The user can select the format for their payout account if applicable. - **allowIntraRegionCrossBorderPayout**: The user can select a payout account in a different EU/EEA country than the country of their legal entity. ") + @ApiModelProperty(value = "Boolean key-value pairs indicating the settings for the hosted onboarding page. The keys are the settings. Possible keys: By default, these values are set to **true**. Set to **false** to not allow the action. - **changeLegalEntityType**: The user can change their legal entity type. - **editPrefilledCountry**: The user can change the country of their legal entity's address, for example the registered address of an organization. By default, these values are set to **false**. Set to **true** to allow the action. - **allowBankAccountFormatSelection**: The user can select the format for their payout account if applicable. - **allowIntraRegionCrossBorderPayout**: The user can select a payout account in a different EU/EEA country than the country of their legal entity. By default, these value are set to **false**. Set the following values to **true** to require the user to sign PCI questionnaires based on their sales channels. The user must sign PCI questionnaires for all relevant sales channels. - **requirePciSignEcommerce** - **requirePciSignPos** - **requirePciSignEcomMoto** - **requirePciSignPosMoto** ") @JsonProperty(JSON_PROPERTY_SETTINGS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) diff --git a/src/main/java/com/adyen/model/legalentitymanagement/SupportingEntityCapability.java b/src/main/java/com/adyen/model/legalentitymanagement/SupportingEntityCapability.java index 8edb187f7..f6c42b7b1 100644 --- a/src/main/java/com/adyen/model/legalentitymanagement/SupportingEntityCapability.java +++ b/src/main/java/com/adyen/model/legalentitymanagement/SupportingEntityCapability.java @@ -59,10 +59,10 @@ public SupportingEntityCapability allowed(Boolean allowed) { } /** - * Indicates whether the supporting entity capability is allowed. If a supporting entity is allowed but its parent legal entity is not, it means there are other supporting entities that failed validation. **The allowed supporting entity can still be used** + * Indicates whether the capability is allowed for the supporting entity. If a capability is allowed for a supporting entity but not for the parent legal entity, this means the legal entity has other supporting entities that failed verification. **You can use the allowed supporting entity** regardless of the verification status of other supporting entities. * @return allowed **/ - @ApiModelProperty(value = "Indicates whether the supporting entity capability is allowed. If a supporting entity is allowed but its parent legal entity is not, it means there are other supporting entities that failed validation. **The allowed supporting entity can still be used**") + @ApiModelProperty(value = "Indicates whether the capability is allowed for the supporting entity. If a capability is allowed for a supporting entity but not for the parent legal entity, this means the legal entity has other supporting entities that failed verification. **You can use the allowed supporting entity** regardless of the verification status of other supporting entities.") @JsonProperty(JSON_PROPERTY_ALLOWED) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -134,10 +134,10 @@ public SupportingEntityCapability verificationStatus(String verificationStatus) } /** - * The status of the verification checks for the supporting entity capability. Possible values: * **pending**: Adyen is running the verification. * **invalid**: The verification failed. Check if the `errors` array contains more information. * **valid**: The verification has been successfully completed. * **rejected**: Adyen has verified the information, but found reasons to not allow the capability. + * The status of the verification checks for the capability of the supporting entity. Possible values: * **pending**: Adyen is running the verification. * **invalid**: The verification failed. Check if the `errors` array contains more information. * **valid**: The verification has been successfully completed. * **rejected**: Adyen has verified the information, but found reasons to not allow the capability. * @return verificationStatus **/ - @ApiModelProperty(value = "The status of the verification checks for the supporting entity capability. Possible values: * **pending**: Adyen is running the verification. * **invalid**: The verification failed. Check if the `errors` array contains more information. * **valid**: The verification has been successfully completed. * **rejected**: Adyen has verified the information, but found reasons to not allow the capability. ") + @ApiModelProperty(value = "The status of the verification checks for the capability of the supporting entity. Possible values: * **pending**: Adyen is running the verification. * **invalid**: The verification failed. Check if the `errors` array contains more information. * **valid**: The verification has been successfully completed. * **rejected**: Adyen has verified the information, but found reasons to not allow the capability. ") @JsonProperty(JSON_PROPERTY_VERIFICATION_STATUS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) diff --git a/src/main/java/com/adyen/model/legalentitymanagement/TransferInstrument.java b/src/main/java/com/adyen/model/legalentitymanagement/TransferInstrument.java index 7b30b4101..b9f6f08b5 100644 --- a/src/main/java/com/adyen/model/legalentitymanagement/TransferInstrument.java +++ b/src/main/java/com/adyen/model/legalentitymanagement/TransferInstrument.java @@ -147,10 +147,10 @@ public TransferInstrument putCapabilitiesItem(String key, SupportingEntityCapabi } /** - * List of capabilities for this supporting entity. + * List of capabilities for this transfer instrument. * @return capabilities **/ - @ApiModelProperty(value = "List of capabilities for this supporting entity.") + @ApiModelProperty(value = "List of capabilities for this transfer instrument.") @JsonProperty(JSON_PROPERTY_CAPABILITIES) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -263,10 +263,10 @@ public TransferInstrument addProblemsItem(CapabilityProblem problemsItem) { } /** - * List of the verification errors from capabilities for this supporting entity. + * The verification errors related to capabilities for this transfer instrument. * @return problems **/ - @ApiModelProperty(value = "List of the verification errors from capabilities for this supporting entity.") + @ApiModelProperty(value = "The verification errors related to capabilities for this transfer instrument.") @JsonProperty(JSON_PROPERTY_PROBLEMS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) diff --git a/src/main/java/com/adyen/model/management/AbstractOpenApiSchema.java b/src/main/java/com/adyen/model/management/AbstractOpenApiSchema.java index 79e80f4c5..c96db355b 100644 --- a/src/main/java/com/adyen/model/management/AbstractOpenApiSchema.java +++ b/src/main/java/com/adyen/model/management/AbstractOpenApiSchema.java @@ -1,7 +1,7 @@ /* * Management API * - * The version of the OpenAPI document: 1 + * The version of the OpenAPI document: 3 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/management/AdditionalCommission.java b/src/main/java/com/adyen/model/management/AdditionalCommission.java index 54edc7699..7bc05a941 100644 --- a/src/main/java/com/adyen/model/management/AdditionalCommission.java +++ b/src/main/java/com/adyen/model/management/AdditionalCommission.java @@ -1,7 +1,7 @@ /* * Management API * - * The version of the OpenAPI document: 1 + * The version of the OpenAPI document: 3 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/management/AdditionalSettings.java b/src/main/java/com/adyen/model/management/AdditionalSettings.java index e8f9d55ca..18daeb998 100644 --- a/src/main/java/com/adyen/model/management/AdditionalSettings.java +++ b/src/main/java/com/adyen/model/management/AdditionalSettings.java @@ -1,7 +1,7 @@ /* * Management API * - * The version of the OpenAPI document: 1 + * The version of the OpenAPI document: 3 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/management/AdditionalSettingsResponse.java b/src/main/java/com/adyen/model/management/AdditionalSettingsResponse.java index 496b56102..8cf2415eb 100644 --- a/src/main/java/com/adyen/model/management/AdditionalSettingsResponse.java +++ b/src/main/java/com/adyen/model/management/AdditionalSettingsResponse.java @@ -1,7 +1,7 @@ /* * Management API * - * The version of the OpenAPI document: 1 + * The version of the OpenAPI document: 3 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/management/Address.java b/src/main/java/com/adyen/model/management/Address.java index 1df8bd845..d700f79f4 100644 --- a/src/main/java/com/adyen/model/management/Address.java +++ b/src/main/java/com/adyen/model/management/Address.java @@ -1,7 +1,7 @@ /* * Management API * - * The version of the OpenAPI document: 1 + * The version of the OpenAPI document: 3 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/management/AfterpayTouchInfo.java b/src/main/java/com/adyen/model/management/AfterpayTouchInfo.java index 89482e642..4c48f420d 100644 --- a/src/main/java/com/adyen/model/management/AfterpayTouchInfo.java +++ b/src/main/java/com/adyen/model/management/AfterpayTouchInfo.java @@ -1,7 +1,7 @@ /* * Management API * - * The version of the OpenAPI document: 1 + * The version of the OpenAPI document: 3 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/management/AllowedOrigin.java b/src/main/java/com/adyen/model/management/AllowedOrigin.java index e737639f1..ea9a02516 100644 --- a/src/main/java/com/adyen/model/management/AllowedOrigin.java +++ b/src/main/java/com/adyen/model/management/AllowedOrigin.java @@ -1,7 +1,7 @@ /* * Management API * - * The version of the OpenAPI document: 1 + * The version of the OpenAPI document: 3 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/management/AllowedOriginsResponse.java b/src/main/java/com/adyen/model/management/AllowedOriginsResponse.java index 695e74a3b..eef335027 100644 --- a/src/main/java/com/adyen/model/management/AllowedOriginsResponse.java +++ b/src/main/java/com/adyen/model/management/AllowedOriginsResponse.java @@ -1,7 +1,7 @@ /* * Management API * - * The version of the OpenAPI document: 1 + * The version of the OpenAPI document: 3 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/management/Amount.java b/src/main/java/com/adyen/model/management/Amount.java index fe2bde410..8cf193def 100644 --- a/src/main/java/com/adyen/model/management/Amount.java +++ b/src/main/java/com/adyen/model/management/Amount.java @@ -1,7 +1,7 @@ /* * Management API * - * The version of the OpenAPI document: 1 + * The version of the OpenAPI document: 3 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/management/AndroidApp.java b/src/main/java/com/adyen/model/management/AndroidApp.java index a6ce99b35..9be341082 100644 --- a/src/main/java/com/adyen/model/management/AndroidApp.java +++ b/src/main/java/com/adyen/model/management/AndroidApp.java @@ -1,7 +1,7 @@ /* * Management API * - * The version of the OpenAPI document: 1 + * The version of the OpenAPI document: 3 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/management/AndroidAppsResponse.java b/src/main/java/com/adyen/model/management/AndroidAppsResponse.java index a23cae1fe..ef5b75446 100644 --- a/src/main/java/com/adyen/model/management/AndroidAppsResponse.java +++ b/src/main/java/com/adyen/model/management/AndroidAppsResponse.java @@ -1,7 +1,7 @@ /* * Management API * - * The version of the OpenAPI document: 1 + * The version of the OpenAPI document: 3 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/management/AndroidCertificate.java b/src/main/java/com/adyen/model/management/AndroidCertificate.java index 0b8532785..3663c618f 100644 --- a/src/main/java/com/adyen/model/management/AndroidCertificate.java +++ b/src/main/java/com/adyen/model/management/AndroidCertificate.java @@ -1,7 +1,7 @@ /* * Management API * - * The version of the OpenAPI document: 1 + * The version of the OpenAPI document: 3 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/management/AndroidCertificatesResponse.java b/src/main/java/com/adyen/model/management/AndroidCertificatesResponse.java index a1520e2a3..dafedfc9f 100644 --- a/src/main/java/com/adyen/model/management/AndroidCertificatesResponse.java +++ b/src/main/java/com/adyen/model/management/AndroidCertificatesResponse.java @@ -1,7 +1,7 @@ /* * Management API * - * The version of the OpenAPI document: 1 + * The version of the OpenAPI document: 3 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/management/ApiCredential.java b/src/main/java/com/adyen/model/management/ApiCredential.java index a6f3acdd8..d738b872e 100644 --- a/src/main/java/com/adyen/model/management/ApiCredential.java +++ b/src/main/java/com/adyen/model/management/ApiCredential.java @@ -1,7 +1,7 @@ /* * Management API * - * The version of the OpenAPI document: 1 + * The version of the OpenAPI document: 3 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/management/ApiCredentialLinks.java b/src/main/java/com/adyen/model/management/ApiCredentialLinks.java index c248b215b..0b73f2a02 100644 --- a/src/main/java/com/adyen/model/management/ApiCredentialLinks.java +++ b/src/main/java/com/adyen/model/management/ApiCredentialLinks.java @@ -1,7 +1,7 @@ /* * Management API * - * The version of the OpenAPI document: 1 + * The version of the OpenAPI document: 3 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/management/ApplePayInfo.java b/src/main/java/com/adyen/model/management/ApplePayInfo.java index a80676573..58c75823d 100644 --- a/src/main/java/com/adyen/model/management/ApplePayInfo.java +++ b/src/main/java/com/adyen/model/management/ApplePayInfo.java @@ -1,7 +1,7 @@ /* * Management API * - * The version of the OpenAPI document: 1 + * The version of the OpenAPI document: 3 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -38,7 +38,7 @@ public class ApplePayInfo { public static final String JSON_PROPERTY_DOMAINS = "domains"; - private List domains = null; + private List domains = new ArrayList<>(); public ApplePayInfo() { } @@ -49,9 +49,6 @@ public ApplePayInfo domains(List domains) { } public ApplePayInfo addDomainsItem(String domainsItem) { - if (this.domains == null) { - this.domains = new ArrayList<>(); - } this.domains.add(domainsItem); return this; } @@ -60,7 +57,7 @@ public ApplePayInfo addDomainsItem(String domainsItem) { * The list of merchant domains. Maximum: 99 domains per request. For more information, see [Apple Pay documentation](https://docs.adyen.com/payment-methods/apple-pay/web-drop-in?tab=adyen-certificate-live_1#going-live). * @return domains **/ - @ApiModelProperty(value = "The list of merchant domains. Maximum: 99 domains per request. For more information, see [Apple Pay documentation](https://docs.adyen.com/payment-methods/apple-pay/web-drop-in?tab=adyen-certificate-live_1#going-live).") + @ApiModelProperty(required = true, value = "The list of merchant domains. Maximum: 99 domains per request. For more information, see [Apple Pay documentation](https://docs.adyen.com/payment-methods/apple-pay/web-drop-in?tab=adyen-certificate-live_1#going-live).") @JsonProperty(JSON_PROPERTY_DOMAINS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) diff --git a/src/main/java/com/adyen/model/management/BcmcInfo.java b/src/main/java/com/adyen/model/management/BcmcInfo.java index 6e03c60f0..af3b824be 100644 --- a/src/main/java/com/adyen/model/management/BcmcInfo.java +++ b/src/main/java/com/adyen/model/management/BcmcInfo.java @@ -1,7 +1,7 @@ /* * Management API * - * The version of the OpenAPI document: 1 + * The version of the OpenAPI document: 3 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/management/BillingEntitiesResponse.java b/src/main/java/com/adyen/model/management/BillingEntitiesResponse.java index d984939ed..d1a8bc5bd 100644 --- a/src/main/java/com/adyen/model/management/BillingEntitiesResponse.java +++ b/src/main/java/com/adyen/model/management/BillingEntitiesResponse.java @@ -1,7 +1,7 @@ /* * Management API * - * The version of the OpenAPI document: 1 + * The version of the OpenAPI document: 3 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/management/BillingEntity.java b/src/main/java/com/adyen/model/management/BillingEntity.java index 92db74e91..c9e8b7120 100644 --- a/src/main/java/com/adyen/model/management/BillingEntity.java +++ b/src/main/java/com/adyen/model/management/BillingEntity.java @@ -1,7 +1,7 @@ /* * Management API * - * The version of the OpenAPI document: 1 + * The version of the OpenAPI document: 3 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/management/CardholderReceipt.java b/src/main/java/com/adyen/model/management/CardholderReceipt.java index 78c087e7e..fadbac908 100644 --- a/src/main/java/com/adyen/model/management/CardholderReceipt.java +++ b/src/main/java/com/adyen/model/management/CardholderReceipt.java @@ -1,7 +1,7 @@ /* * Management API * - * The version of the OpenAPI document: 1 + * The version of the OpenAPI document: 3 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/management/CartesBancairesInfo.java b/src/main/java/com/adyen/model/management/CartesBancairesInfo.java index a864ac982..9e4816265 100644 --- a/src/main/java/com/adyen/model/management/CartesBancairesInfo.java +++ b/src/main/java/com/adyen/model/management/CartesBancairesInfo.java @@ -1,7 +1,7 @@ /* * Management API * - * The version of the OpenAPI document: 1 + * The version of the OpenAPI document: 3 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/management/ClearpayInfo.java b/src/main/java/com/adyen/model/management/ClearpayInfo.java index e42a5bde5..8b0a975f8 100644 --- a/src/main/java/com/adyen/model/management/ClearpayInfo.java +++ b/src/main/java/com/adyen/model/management/ClearpayInfo.java @@ -1,7 +1,7 @@ /* * Management API * - * The version of the OpenAPI document: 1 + * The version of the OpenAPI document: 3 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/management/Commission.java b/src/main/java/com/adyen/model/management/Commission.java index 6b5e68bd7..c9c6a585f 100644 --- a/src/main/java/com/adyen/model/management/Commission.java +++ b/src/main/java/com/adyen/model/management/Commission.java @@ -1,7 +1,7 @@ /* * Management API * - * The version of the OpenAPI document: 1 + * The version of the OpenAPI document: 3 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/management/Company.java b/src/main/java/com/adyen/model/management/Company.java index 4362b84cc..aa035afbc 100644 --- a/src/main/java/com/adyen/model/management/Company.java +++ b/src/main/java/com/adyen/model/management/Company.java @@ -1,7 +1,7 @@ /* * Management API * - * The version of the OpenAPI document: 1 + * The version of the OpenAPI document: 3 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/management/CompanyApiCredential.java b/src/main/java/com/adyen/model/management/CompanyApiCredential.java index fd51483af..351e69ab4 100644 --- a/src/main/java/com/adyen/model/management/CompanyApiCredential.java +++ b/src/main/java/com/adyen/model/management/CompanyApiCredential.java @@ -1,7 +1,7 @@ /* * Management API * - * The version of the OpenAPI document: 1 + * The version of the OpenAPI document: 3 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/management/CompanyLinks.java b/src/main/java/com/adyen/model/management/CompanyLinks.java index bf6c5e808..b93637194 100644 --- a/src/main/java/com/adyen/model/management/CompanyLinks.java +++ b/src/main/java/com/adyen/model/management/CompanyLinks.java @@ -1,7 +1,7 @@ /* * Management API * - * The version of the OpenAPI document: 1 + * The version of the OpenAPI document: 3 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/management/CompanyUser.java b/src/main/java/com/adyen/model/management/CompanyUser.java index a18834fec..720aa339b 100644 --- a/src/main/java/com/adyen/model/management/CompanyUser.java +++ b/src/main/java/com/adyen/model/management/CompanyUser.java @@ -1,7 +1,7 @@ /* * Management API * - * The version of the OpenAPI document: 1 + * The version of the OpenAPI document: 3 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/management/Connectivity.java b/src/main/java/com/adyen/model/management/Connectivity.java index 2de668604..88f5c8645 100644 --- a/src/main/java/com/adyen/model/management/Connectivity.java +++ b/src/main/java/com/adyen/model/management/Connectivity.java @@ -1,7 +1,7 @@ /* * Management API * - * The version of the OpenAPI document: 1 + * The version of the OpenAPI document: 3 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/management/Contact.java b/src/main/java/com/adyen/model/management/Contact.java index d868bc67c..66e6617f2 100644 --- a/src/main/java/com/adyen/model/management/Contact.java +++ b/src/main/java/com/adyen/model/management/Contact.java @@ -1,7 +1,7 @@ /* * Management API * - * The version of the OpenAPI document: 1 + * The version of the OpenAPI document: 3 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/management/CreateAllowedOriginRequest.java b/src/main/java/com/adyen/model/management/CreateAllowedOriginRequest.java index 439d75c2c..58557525e 100644 --- a/src/main/java/com/adyen/model/management/CreateAllowedOriginRequest.java +++ b/src/main/java/com/adyen/model/management/CreateAllowedOriginRequest.java @@ -1,7 +1,7 @@ /* * Management API * - * The version of the OpenAPI document: 1 + * The version of the OpenAPI document: 3 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/management/CreateApiCredentialResponse.java b/src/main/java/com/adyen/model/management/CreateApiCredentialResponse.java index c3d92bb52..64ca8d459 100644 --- a/src/main/java/com/adyen/model/management/CreateApiCredentialResponse.java +++ b/src/main/java/com/adyen/model/management/CreateApiCredentialResponse.java @@ -1,7 +1,7 @@ /* * Management API * - * The version of the OpenAPI document: 1 + * The version of the OpenAPI document: 3 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/management/CreateCompanyApiCredentialRequest.java b/src/main/java/com/adyen/model/management/CreateCompanyApiCredentialRequest.java index 6f07b4017..1e38e0698 100644 --- a/src/main/java/com/adyen/model/management/CreateCompanyApiCredentialRequest.java +++ b/src/main/java/com/adyen/model/management/CreateCompanyApiCredentialRequest.java @@ -1,7 +1,7 @@ /* * Management API * - * The version of the OpenAPI document: 1 + * The version of the OpenAPI document: 3 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/management/CreateCompanyApiCredentialResponse.java b/src/main/java/com/adyen/model/management/CreateCompanyApiCredentialResponse.java index 29cc0da03..5fe2c11d3 100644 --- a/src/main/java/com/adyen/model/management/CreateCompanyApiCredentialResponse.java +++ b/src/main/java/com/adyen/model/management/CreateCompanyApiCredentialResponse.java @@ -1,7 +1,7 @@ /* * Management API * - * The version of the OpenAPI document: 1 + * The version of the OpenAPI document: 3 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/management/CreateCompanyUserRequest.java b/src/main/java/com/adyen/model/management/CreateCompanyUserRequest.java index f8b10d449..2cc976132 100644 --- a/src/main/java/com/adyen/model/management/CreateCompanyUserRequest.java +++ b/src/main/java/com/adyen/model/management/CreateCompanyUserRequest.java @@ -1,7 +1,7 @@ /* * Management API * - * The version of the OpenAPI document: 1 + * The version of the OpenAPI document: 3 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/management/CreateCompanyUserResponse.java b/src/main/java/com/adyen/model/management/CreateCompanyUserResponse.java index c8454b652..558467480 100644 --- a/src/main/java/com/adyen/model/management/CreateCompanyUserResponse.java +++ b/src/main/java/com/adyen/model/management/CreateCompanyUserResponse.java @@ -1,7 +1,7 @@ /* * Management API * - * The version of the OpenAPI document: 1 + * The version of the OpenAPI document: 3 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/management/CreateCompanyWebhookRequest.java b/src/main/java/com/adyen/model/management/CreateCompanyWebhookRequest.java index 329faaaab..bf9006c21 100644 --- a/src/main/java/com/adyen/model/management/CreateCompanyWebhookRequest.java +++ b/src/main/java/com/adyen/model/management/CreateCompanyWebhookRequest.java @@ -1,7 +1,7 @@ /* * Management API * - * The version of the OpenAPI document: 1 + * The version of the OpenAPI document: 3 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -41,12 +41,12 @@ CreateCompanyWebhookRequest.JSON_PROPERTY_ADDITIONAL_SETTINGS, CreateCompanyWebhookRequest.JSON_PROPERTY_COMMUNICATION_FORMAT, CreateCompanyWebhookRequest.JSON_PROPERTY_DESCRIPTION, + CreateCompanyWebhookRequest.JSON_PROPERTY_ENCRYPTION_PROTOCOL, CreateCompanyWebhookRequest.JSON_PROPERTY_FILTER_MERCHANT_ACCOUNT_TYPE, CreateCompanyWebhookRequest.JSON_PROPERTY_FILTER_MERCHANT_ACCOUNTS, CreateCompanyWebhookRequest.JSON_PROPERTY_NETWORK_TYPE, CreateCompanyWebhookRequest.JSON_PROPERTY_PASSWORD, CreateCompanyWebhookRequest.JSON_PROPERTY_POPULATE_SOAP_ACTION_HEADER, - CreateCompanyWebhookRequest.JSON_PROPERTY_SSL_VERSION, CreateCompanyWebhookRequest.JSON_PROPERTY_TYPE, CreateCompanyWebhookRequest.JSON_PROPERTY_URL, CreateCompanyWebhookRequest.JSON_PROPERTY_USERNAME @@ -112,18 +112,18 @@ public static CommunicationFormatEnum fromValue(String value) { private String description; /** - * Shows how merchant accounts are filtered when configuring the webhook. Possible values: * **allAccounts** : Includes all merchant accounts, and does not require specifying `filterMerchantAccounts`. * **includeAccounts** : The webhook is configured for the merchant accounts listed in `filterMerchantAccounts`. * **excludeAccounts** : The webhook is not configured for the merchant accounts listed in `filterMerchantAccounts`. + * SSL version to access the public webhook URL specified in the `url` field. Possible values: * **TLSv1.3** * **TLSv1.2** * **HTTP** - Only allowed on Test environment. If not specified, the webhook will use `sslVersion`: **TLSv1.2**. */ - public enum FilterMerchantAccountTypeEnum { - ALLACCOUNTS("allAccounts"), + public enum EncryptionProtocolEnum { + HTTP("HTTP"), - EXCLUDEACCOUNTS("excludeAccounts"), + TLSV1_2("TLSv1.2"), - INCLUDEACCOUNTS("includeAccounts"); + TLSV1_3("TLSv1.3"); private String value; - FilterMerchantAccountTypeEnum(String value) { + EncryptionProtocolEnum(String value) { this.value = value; } @@ -138,8 +138,8 @@ public String toString() { } @JsonCreator - public static FilterMerchantAccountTypeEnum fromValue(String value) { - for (FilterMerchantAccountTypeEnum b : FilterMerchantAccountTypeEnum.values()) { + public static EncryptionProtocolEnum fromValue(String value) { + for (EncryptionProtocolEnum b : EncryptionProtocolEnum.values()) { if (b.value.equals(value)) { return b; } @@ -148,23 +148,22 @@ public static FilterMerchantAccountTypeEnum fromValue(String value) { } } - public static final String JSON_PROPERTY_FILTER_MERCHANT_ACCOUNT_TYPE = "filterMerchantAccountType"; - private FilterMerchantAccountTypeEnum filterMerchantAccountType; - - public static final String JSON_PROPERTY_FILTER_MERCHANT_ACCOUNTS = "filterMerchantAccounts"; - private List filterMerchantAccounts = new ArrayList<>(); + public static final String JSON_PROPERTY_ENCRYPTION_PROTOCOL = "encryptionProtocol"; + private EncryptionProtocolEnum encryptionProtocol; /** - * Network type for Terminal API notification webhooks. Possible values: * **public** * **local** Default Value: **public**. + * Shows how merchant accounts are filtered when configuring the webhook. Possible values: * **allAccounts** : Includes all merchant accounts, and does not require specifying `filterMerchantAccounts`. * **includeAccounts** : The webhook is configured for the merchant accounts listed in `filterMerchantAccounts`. * **excludeAccounts** : The webhook is not configured for the merchant accounts listed in `filterMerchantAccounts`. */ - public enum NetworkTypeEnum { - LOCAL("local"), + public enum FilterMerchantAccountTypeEnum { + ALLACCOUNTS("allAccounts"), - PUBLIC("public"); + EXCLUDEACCOUNTS("excludeAccounts"), + + INCLUDEACCOUNTS("includeAccounts"); private String value; - NetworkTypeEnum(String value) { + FilterMerchantAccountTypeEnum(String value) { this.value = value; } @@ -179,8 +178,8 @@ public String toString() { } @JsonCreator - public static NetworkTypeEnum fromValue(String value) { - for (NetworkTypeEnum b : NetworkTypeEnum.values()) { + public static FilterMerchantAccountTypeEnum fromValue(String value) { + for (FilterMerchantAccountTypeEnum b : FilterMerchantAccountTypeEnum.values()) { if (b.value.equals(value)) { return b; } @@ -189,28 +188,23 @@ public static NetworkTypeEnum fromValue(String value) { } } - public static final String JSON_PROPERTY_NETWORK_TYPE = "networkType"; - private NetworkTypeEnum networkType; - - public static final String JSON_PROPERTY_PASSWORD = "password"; - private String password; + public static final String JSON_PROPERTY_FILTER_MERCHANT_ACCOUNT_TYPE = "filterMerchantAccountType"; + private FilterMerchantAccountTypeEnum filterMerchantAccountType; - public static final String JSON_PROPERTY_POPULATE_SOAP_ACTION_HEADER = "populateSoapActionHeader"; - private Boolean populateSoapActionHeader; + public static final String JSON_PROPERTY_FILTER_MERCHANT_ACCOUNTS = "filterMerchantAccounts"; + private List filterMerchantAccounts = new ArrayList<>(); /** - * SSL version to access the public webhook URL specified in the `url` field. Possible values: * **TLSv1.3** * **TLSv1.2** * **HTTP** - Only allowed on Test environment. If not specified, the webhook will use `sslVersion`: **TLSv1.2**. + * Network type for Terminal API notification webhooks. Possible values: * **public** * **local** Default Value: **public**. */ - public enum SslVersionEnum { - HTTP("HTTP"), - - TLSV1_2("TLSv1.2"), + public enum NetworkTypeEnum { + LOCAL("local"), - TLSV1_3("TLSv1.3"); + PUBLIC("public"); private String value; - SslVersionEnum(String value) { + NetworkTypeEnum(String value) { this.value = value; } @@ -225,8 +219,8 @@ public String toString() { } @JsonCreator - public static SslVersionEnum fromValue(String value) { - for (SslVersionEnum b : SslVersionEnum.values()) { + public static NetworkTypeEnum fromValue(String value) { + for (NetworkTypeEnum b : NetworkTypeEnum.values()) { if (b.value.equals(value)) { return b; } @@ -235,8 +229,14 @@ public static SslVersionEnum fromValue(String value) { } } - public static final String JSON_PROPERTY_SSL_VERSION = "sslVersion"; - private SslVersionEnum sslVersion; + public static final String JSON_PROPERTY_NETWORK_TYPE = "networkType"; + private NetworkTypeEnum networkType; + + public static final String JSON_PROPERTY_PASSWORD = "password"; + private String password; + + public static final String JSON_PROPERTY_POPULATE_SOAP_ACTION_HEADER = "populateSoapActionHeader"; + private Boolean populateSoapActionHeader; public static final String JSON_PROPERTY_TYPE = "type"; private String type; @@ -425,6 +425,31 @@ public void setDescription(String description) { } + public CreateCompanyWebhookRequest encryptionProtocol(EncryptionProtocolEnum encryptionProtocol) { + this.encryptionProtocol = encryptionProtocol; + return this; + } + + /** + * SSL version to access the public webhook URL specified in the `url` field. Possible values: * **TLSv1.3** * **TLSv1.2** * **HTTP** - Only allowed on Test environment. If not specified, the webhook will use `sslVersion`: **TLSv1.2**. + * @return encryptionProtocol + **/ + @ApiModelProperty(example = "TLSv1.2", value = "SSL version to access the public webhook URL specified in the `url` field. Possible values: * **TLSv1.3** * **TLSv1.2** * **HTTP** - Only allowed on Test environment. If not specified, the webhook will use `sslVersion`: **TLSv1.2**.") + @JsonProperty(JSON_PROPERTY_ENCRYPTION_PROTOCOL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public EncryptionProtocolEnum getEncryptionProtocol() { + return encryptionProtocol; + } + + + @JsonProperty(JSON_PROPERTY_ENCRYPTION_PROTOCOL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEncryptionProtocol(EncryptionProtocolEnum encryptionProtocol) { + this.encryptionProtocol = encryptionProtocol; + } + + public CreateCompanyWebhookRequest filterMerchantAccountType(FilterMerchantAccountTypeEnum filterMerchantAccountType) { this.filterMerchantAccountType = filterMerchantAccountType; return this; @@ -555,31 +580,6 @@ public void setPopulateSoapActionHeader(Boolean populateSoapActionHeader) { } - public CreateCompanyWebhookRequest sslVersion(SslVersionEnum sslVersion) { - this.sslVersion = sslVersion; - return this; - } - - /** - * SSL version to access the public webhook URL specified in the `url` field. Possible values: * **TLSv1.3** * **TLSv1.2** * **HTTP** - Only allowed on Test environment. If not specified, the webhook will use `sslVersion`: **TLSv1.2**. - * @return sslVersion - **/ - @ApiModelProperty(example = "TLSv1.2", value = "SSL version to access the public webhook URL specified in the `url` field. Possible values: * **TLSv1.3** * **TLSv1.2** * **HTTP** - Only allowed on Test environment. If not specified, the webhook will use `sslVersion`: **TLSv1.2**.") - @JsonProperty(JSON_PROPERTY_SSL_VERSION) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public SslVersionEnum getSslVersion() { - return sslVersion; - } - - - @JsonProperty(JSON_PROPERTY_SSL_VERSION) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSslVersion(SslVersionEnum sslVersion) { - this.sslVersion = sslVersion; - } - - public CreateCompanyWebhookRequest type(String type) { this.type = type; return this; @@ -674,12 +674,12 @@ public boolean equals(Object o) { Objects.equals(this.additionalSettings, createCompanyWebhookRequest.additionalSettings) && Objects.equals(this.communicationFormat, createCompanyWebhookRequest.communicationFormat) && Objects.equals(this.description, createCompanyWebhookRequest.description) && + Objects.equals(this.encryptionProtocol, createCompanyWebhookRequest.encryptionProtocol) && Objects.equals(this.filterMerchantAccountType, createCompanyWebhookRequest.filterMerchantAccountType) && Objects.equals(this.filterMerchantAccounts, createCompanyWebhookRequest.filterMerchantAccounts) && Objects.equals(this.networkType, createCompanyWebhookRequest.networkType) && Objects.equals(this.password, createCompanyWebhookRequest.password) && Objects.equals(this.populateSoapActionHeader, createCompanyWebhookRequest.populateSoapActionHeader) && - Objects.equals(this.sslVersion, createCompanyWebhookRequest.sslVersion) && Objects.equals(this.type, createCompanyWebhookRequest.type) && Objects.equals(this.url, createCompanyWebhookRequest.url) && Objects.equals(this.username, createCompanyWebhookRequest.username); @@ -687,7 +687,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(acceptsExpiredCertificate, acceptsSelfSignedCertificate, acceptsUntrustedRootCertificate, active, additionalSettings, communicationFormat, description, filterMerchantAccountType, filterMerchantAccounts, networkType, password, populateSoapActionHeader, sslVersion, type, url, username); + return Objects.hash(acceptsExpiredCertificate, acceptsSelfSignedCertificate, acceptsUntrustedRootCertificate, active, additionalSettings, communicationFormat, description, encryptionProtocol, filterMerchantAccountType, filterMerchantAccounts, networkType, password, populateSoapActionHeader, type, url, username); } @Override @@ -701,12 +701,12 @@ public String toString() { sb.append(" additionalSettings: ").append(toIndentedString(additionalSettings)).append("\n"); sb.append(" communicationFormat: ").append(toIndentedString(communicationFormat)).append("\n"); sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" encryptionProtocol: ").append(toIndentedString(encryptionProtocol)).append("\n"); sb.append(" filterMerchantAccountType: ").append(toIndentedString(filterMerchantAccountType)).append("\n"); sb.append(" filterMerchantAccounts: ").append(toIndentedString(filterMerchantAccounts)).append("\n"); sb.append(" networkType: ").append(toIndentedString(networkType)).append("\n"); sb.append(" password: ").append(toIndentedString(password)).append("\n"); sb.append(" populateSoapActionHeader: ").append(toIndentedString(populateSoapActionHeader)).append("\n"); - sb.append(" sslVersion: ").append(toIndentedString(sslVersion)).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append(" url: ").append(toIndentedString(url)).append("\n"); sb.append(" username: ").append(toIndentedString(username)).append("\n"); diff --git a/src/main/java/com/adyen/model/management/CreateMerchantApiCredentialRequest.java b/src/main/java/com/adyen/model/management/CreateMerchantApiCredentialRequest.java index 66c588590..d024df154 100644 --- a/src/main/java/com/adyen/model/management/CreateMerchantApiCredentialRequest.java +++ b/src/main/java/com/adyen/model/management/CreateMerchantApiCredentialRequest.java @@ -1,7 +1,7 @@ /* * Management API * - * The version of the OpenAPI document: 1 + * The version of the OpenAPI document: 3 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/management/CreateMerchantRequest.java b/src/main/java/com/adyen/model/management/CreateMerchantRequest.java index 07857c20a..c4ea97fc6 100644 --- a/src/main/java/com/adyen/model/management/CreateMerchantRequest.java +++ b/src/main/java/com/adyen/model/management/CreateMerchantRequest.java @@ -1,7 +1,7 @@ /* * Management API * - * The version of the OpenAPI document: 1 + * The version of the OpenAPI document: 3 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/management/CreateMerchantResponse.java b/src/main/java/com/adyen/model/management/CreateMerchantResponse.java index 7914d0bca..f465fc5cf 100644 --- a/src/main/java/com/adyen/model/management/CreateMerchantResponse.java +++ b/src/main/java/com/adyen/model/management/CreateMerchantResponse.java @@ -1,7 +1,7 @@ /* * Management API * - * The version of the OpenAPI document: 1 + * The version of the OpenAPI document: 3 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/management/CreateMerchantUserRequest.java b/src/main/java/com/adyen/model/management/CreateMerchantUserRequest.java index 0f7f3a5dc..39e08f5b3 100644 --- a/src/main/java/com/adyen/model/management/CreateMerchantUserRequest.java +++ b/src/main/java/com/adyen/model/management/CreateMerchantUserRequest.java @@ -1,7 +1,7 @@ /* * Management API * - * The version of the OpenAPI document: 1 + * The version of the OpenAPI document: 3 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/management/CreateMerchantWebhookRequest.java b/src/main/java/com/adyen/model/management/CreateMerchantWebhookRequest.java index c1f348319..4a6dffb20 100644 --- a/src/main/java/com/adyen/model/management/CreateMerchantWebhookRequest.java +++ b/src/main/java/com/adyen/model/management/CreateMerchantWebhookRequest.java @@ -1,7 +1,7 @@ /* * Management API * - * The version of the OpenAPI document: 1 + * The version of the OpenAPI document: 3 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -39,10 +39,10 @@ CreateMerchantWebhookRequest.JSON_PROPERTY_ADDITIONAL_SETTINGS, CreateMerchantWebhookRequest.JSON_PROPERTY_COMMUNICATION_FORMAT, CreateMerchantWebhookRequest.JSON_PROPERTY_DESCRIPTION, + CreateMerchantWebhookRequest.JSON_PROPERTY_ENCRYPTION_PROTOCOL, CreateMerchantWebhookRequest.JSON_PROPERTY_NETWORK_TYPE, CreateMerchantWebhookRequest.JSON_PROPERTY_PASSWORD, CreateMerchantWebhookRequest.JSON_PROPERTY_POPULATE_SOAP_ACTION_HEADER, - CreateMerchantWebhookRequest.JSON_PROPERTY_SSL_VERSION, CreateMerchantWebhookRequest.JSON_PROPERTY_TYPE, CreateMerchantWebhookRequest.JSON_PROPERTY_URL, CreateMerchantWebhookRequest.JSON_PROPERTY_USERNAME @@ -108,16 +108,18 @@ public static CommunicationFormatEnum fromValue(String value) { private String description; /** - * Network type for Terminal API notification webhooks. Possible values: * **public** * **local** Default Value: **public**. + * SSL version to access the public webhook URL specified in the `url` field. Possible values: * **TLSv1.3** * **TLSv1.2** * **HTTP** - Only allowed on Test environment. If not specified, the webhook will use `sslVersion`: **TLSv1.2**. */ - public enum NetworkTypeEnum { - LOCAL("local"), + public enum EncryptionProtocolEnum { + HTTP("HTTP"), - PUBLIC("public"); + TLSV1_2("TLSv1.2"), + + TLSV1_3("TLSv1.3"); private String value; - NetworkTypeEnum(String value) { + EncryptionProtocolEnum(String value) { this.value = value; } @@ -132,8 +134,8 @@ public String toString() { } @JsonCreator - public static NetworkTypeEnum fromValue(String value) { - for (NetworkTypeEnum b : NetworkTypeEnum.values()) { + public static EncryptionProtocolEnum fromValue(String value) { + for (EncryptionProtocolEnum b : EncryptionProtocolEnum.values()) { if (b.value.equals(value)) { return b; } @@ -142,28 +144,20 @@ public static NetworkTypeEnum fromValue(String value) { } } - public static final String JSON_PROPERTY_NETWORK_TYPE = "networkType"; - private NetworkTypeEnum networkType; - - public static final String JSON_PROPERTY_PASSWORD = "password"; - private String password; - - public static final String JSON_PROPERTY_POPULATE_SOAP_ACTION_HEADER = "populateSoapActionHeader"; - private Boolean populateSoapActionHeader; + public static final String JSON_PROPERTY_ENCRYPTION_PROTOCOL = "encryptionProtocol"; + private EncryptionProtocolEnum encryptionProtocol; /** - * SSL version to access the public webhook URL specified in the `url` field. Possible values: * **TLSv1.3** * **TLSv1.2** * **HTTP** - Only allowed on Test environment. If not specified, the webhook will use `sslVersion`: **TLSv1.2**. + * Network type for Terminal API notification webhooks. Possible values: * **public** * **local** Default Value: **public**. */ - public enum SslVersionEnum { - HTTP("HTTP"), - - TLSV1_2("TLSv1.2"), + public enum NetworkTypeEnum { + LOCAL("local"), - TLSV1_3("TLSv1.3"); + PUBLIC("public"); private String value; - SslVersionEnum(String value) { + NetworkTypeEnum(String value) { this.value = value; } @@ -178,8 +172,8 @@ public String toString() { } @JsonCreator - public static SslVersionEnum fromValue(String value) { - for (SslVersionEnum b : SslVersionEnum.values()) { + public static NetworkTypeEnum fromValue(String value) { + for (NetworkTypeEnum b : NetworkTypeEnum.values()) { if (b.value.equals(value)) { return b; } @@ -188,8 +182,14 @@ public static SslVersionEnum fromValue(String value) { } } - public static final String JSON_PROPERTY_SSL_VERSION = "sslVersion"; - private SslVersionEnum sslVersion; + public static final String JSON_PROPERTY_NETWORK_TYPE = "networkType"; + private NetworkTypeEnum networkType; + + public static final String JSON_PROPERTY_PASSWORD = "password"; + private String password; + + public static final String JSON_PROPERTY_POPULATE_SOAP_ACTION_HEADER = "populateSoapActionHeader"; + private Boolean populateSoapActionHeader; public static final String JSON_PROPERTY_TYPE = "type"; private String type; @@ -378,6 +378,31 @@ public void setDescription(String description) { } + public CreateMerchantWebhookRequest encryptionProtocol(EncryptionProtocolEnum encryptionProtocol) { + this.encryptionProtocol = encryptionProtocol; + return this; + } + + /** + * SSL version to access the public webhook URL specified in the `url` field. Possible values: * **TLSv1.3** * **TLSv1.2** * **HTTP** - Only allowed on Test environment. If not specified, the webhook will use `sslVersion`: **TLSv1.2**. + * @return encryptionProtocol + **/ + @ApiModelProperty(example = "TLSv1.2", value = "SSL version to access the public webhook URL specified in the `url` field. Possible values: * **TLSv1.3** * **TLSv1.2** * **HTTP** - Only allowed on Test environment. If not specified, the webhook will use `sslVersion`: **TLSv1.2**.") + @JsonProperty(JSON_PROPERTY_ENCRYPTION_PROTOCOL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public EncryptionProtocolEnum getEncryptionProtocol() { + return encryptionProtocol; + } + + + @JsonProperty(JSON_PROPERTY_ENCRYPTION_PROTOCOL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEncryptionProtocol(EncryptionProtocolEnum encryptionProtocol) { + this.encryptionProtocol = encryptionProtocol; + } + + public CreateMerchantWebhookRequest networkType(NetworkTypeEnum networkType) { this.networkType = networkType; return this; @@ -453,31 +478,6 @@ public void setPopulateSoapActionHeader(Boolean populateSoapActionHeader) { } - public CreateMerchantWebhookRequest sslVersion(SslVersionEnum sslVersion) { - this.sslVersion = sslVersion; - return this; - } - - /** - * SSL version to access the public webhook URL specified in the `url` field. Possible values: * **TLSv1.3** * **TLSv1.2** * **HTTP** - Only allowed on Test environment. If not specified, the webhook will use `sslVersion`: **TLSv1.2**. - * @return sslVersion - **/ - @ApiModelProperty(example = "TLSv1.2", value = "SSL version to access the public webhook URL specified in the `url` field. Possible values: * **TLSv1.3** * **TLSv1.2** * **HTTP** - Only allowed on Test environment. If not specified, the webhook will use `sslVersion`: **TLSv1.2**.") - @JsonProperty(JSON_PROPERTY_SSL_VERSION) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public SslVersionEnum getSslVersion() { - return sslVersion; - } - - - @JsonProperty(JSON_PROPERTY_SSL_VERSION) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSslVersion(SslVersionEnum sslVersion) { - this.sslVersion = sslVersion; - } - - public CreateMerchantWebhookRequest type(String type) { this.type = type; return this; @@ -572,10 +572,10 @@ public boolean equals(Object o) { Objects.equals(this.additionalSettings, createMerchantWebhookRequest.additionalSettings) && Objects.equals(this.communicationFormat, createMerchantWebhookRequest.communicationFormat) && Objects.equals(this.description, createMerchantWebhookRequest.description) && + Objects.equals(this.encryptionProtocol, createMerchantWebhookRequest.encryptionProtocol) && Objects.equals(this.networkType, createMerchantWebhookRequest.networkType) && Objects.equals(this.password, createMerchantWebhookRequest.password) && Objects.equals(this.populateSoapActionHeader, createMerchantWebhookRequest.populateSoapActionHeader) && - Objects.equals(this.sslVersion, createMerchantWebhookRequest.sslVersion) && Objects.equals(this.type, createMerchantWebhookRequest.type) && Objects.equals(this.url, createMerchantWebhookRequest.url) && Objects.equals(this.username, createMerchantWebhookRequest.username); @@ -583,7 +583,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(acceptsExpiredCertificate, acceptsSelfSignedCertificate, acceptsUntrustedRootCertificate, active, additionalSettings, communicationFormat, description, networkType, password, populateSoapActionHeader, sslVersion, type, url, username); + return Objects.hash(acceptsExpiredCertificate, acceptsSelfSignedCertificate, acceptsUntrustedRootCertificate, active, additionalSettings, communicationFormat, description, encryptionProtocol, networkType, password, populateSoapActionHeader, type, url, username); } @Override @@ -597,10 +597,10 @@ public String toString() { sb.append(" additionalSettings: ").append(toIndentedString(additionalSettings)).append("\n"); sb.append(" communicationFormat: ").append(toIndentedString(communicationFormat)).append("\n"); sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" encryptionProtocol: ").append(toIndentedString(encryptionProtocol)).append("\n"); sb.append(" networkType: ").append(toIndentedString(networkType)).append("\n"); sb.append(" password: ").append(toIndentedString(password)).append("\n"); sb.append(" populateSoapActionHeader: ").append(toIndentedString(populateSoapActionHeader)).append("\n"); - sb.append(" sslVersion: ").append(toIndentedString(sslVersion)).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append(" url: ").append(toIndentedString(url)).append("\n"); sb.append(" username: ").append(toIndentedString(username)).append("\n"); diff --git a/src/main/java/com/adyen/model/management/CreateUserResponse.java b/src/main/java/com/adyen/model/management/CreateUserResponse.java index 6814af7ac..734d335cb 100644 --- a/src/main/java/com/adyen/model/management/CreateUserResponse.java +++ b/src/main/java/com/adyen/model/management/CreateUserResponse.java @@ -1,7 +1,7 @@ /* * Management API * - * The version of the OpenAPI document: 1 + * The version of the OpenAPI document: 3 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/management/Currency.java b/src/main/java/com/adyen/model/management/Currency.java index a4e7810f4..8b1fa8a18 100644 --- a/src/main/java/com/adyen/model/management/Currency.java +++ b/src/main/java/com/adyen/model/management/Currency.java @@ -1,7 +1,7 @@ /* * Management API * - * The version of the OpenAPI document: 1 + * The version of the OpenAPI document: 3 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/management/CustomNotification.java b/src/main/java/com/adyen/model/management/CustomNotification.java index df7bb6515..0fc8d8249 100644 --- a/src/main/java/com/adyen/model/management/CustomNotification.java +++ b/src/main/java/com/adyen/model/management/CustomNotification.java @@ -1,7 +1,7 @@ /* * Management API * - * The version of the OpenAPI document: 1 + * The version of the OpenAPI document: 3 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/management/DataCenter.java b/src/main/java/com/adyen/model/management/DataCenter.java index 06dc136ab..57cb3c37d 100644 --- a/src/main/java/com/adyen/model/management/DataCenter.java +++ b/src/main/java/com/adyen/model/management/DataCenter.java @@ -1,7 +1,7 @@ /* * Management API * - * The version of the OpenAPI document: 1 + * The version of the OpenAPI document: 3 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/management/EventUrl.java b/src/main/java/com/adyen/model/management/EventUrl.java index 9a3cd5909..6b105d43c 100644 --- a/src/main/java/com/adyen/model/management/EventUrl.java +++ b/src/main/java/com/adyen/model/management/EventUrl.java @@ -1,7 +1,7 @@ /* * Management API * - * The version of the OpenAPI document: 1 + * The version of the OpenAPI document: 3 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/management/ExternalTerminalAction.java b/src/main/java/com/adyen/model/management/ExternalTerminalAction.java index 1f9607121..607c8aa5c 100644 --- a/src/main/java/com/adyen/model/management/ExternalTerminalAction.java +++ b/src/main/java/com/adyen/model/management/ExternalTerminalAction.java @@ -1,7 +1,7 @@ /* * Management API * - * The version of the OpenAPI document: 1 + * The version of the OpenAPI document: 3 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/management/GenerateApiKeyResponse.java b/src/main/java/com/adyen/model/management/GenerateApiKeyResponse.java index 40f2badd9..a4bd3ca3b 100644 --- a/src/main/java/com/adyen/model/management/GenerateApiKeyResponse.java +++ b/src/main/java/com/adyen/model/management/GenerateApiKeyResponse.java @@ -1,7 +1,7 @@ /* * Management API * - * The version of the OpenAPI document: 1 + * The version of the OpenAPI document: 3 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/management/GenerateClientKeyResponse.java b/src/main/java/com/adyen/model/management/GenerateClientKeyResponse.java index e8e3290bb..ea90fae18 100644 --- a/src/main/java/com/adyen/model/management/GenerateClientKeyResponse.java +++ b/src/main/java/com/adyen/model/management/GenerateClientKeyResponse.java @@ -1,7 +1,7 @@ /* * Management API * - * The version of the OpenAPI document: 1 + * The version of the OpenAPI document: 3 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/management/GenerateHmacKeyResponse.java b/src/main/java/com/adyen/model/management/GenerateHmacKeyResponse.java index 9f693b40f..aa5532c4b 100644 --- a/src/main/java/com/adyen/model/management/GenerateHmacKeyResponse.java +++ b/src/main/java/com/adyen/model/management/GenerateHmacKeyResponse.java @@ -1,7 +1,7 @@ /* * Management API * - * The version of the OpenAPI document: 1 + * The version of the OpenAPI document: 3 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/management/GenericPmWithTdiInfo.java b/src/main/java/com/adyen/model/management/GenericPmWithTdiInfo.java index ec2f25d14..2d5389653 100644 --- a/src/main/java/com/adyen/model/management/GenericPmWithTdiInfo.java +++ b/src/main/java/com/adyen/model/management/GenericPmWithTdiInfo.java @@ -1,7 +1,7 @@ /* * Management API * - * The version of the OpenAPI document: 1 + * The version of the OpenAPI document: 3 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/management/GiroPayInfo.java b/src/main/java/com/adyen/model/management/GiroPayInfo.java index fcd1c4825..5fcf6729e 100644 --- a/src/main/java/com/adyen/model/management/GiroPayInfo.java +++ b/src/main/java/com/adyen/model/management/GiroPayInfo.java @@ -1,7 +1,7 @@ /* * Management API * - * The version of the OpenAPI document: 1 + * The version of the OpenAPI document: 3 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/management/GooglePayInfo.java b/src/main/java/com/adyen/model/management/GooglePayInfo.java index 40ae01988..bf293a4d9 100644 --- a/src/main/java/com/adyen/model/management/GooglePayInfo.java +++ b/src/main/java/com/adyen/model/management/GooglePayInfo.java @@ -1,7 +1,7 @@ /* * Management API * - * The version of the OpenAPI document: 1 + * The version of the OpenAPI document: 3 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/management/Gratuity.java b/src/main/java/com/adyen/model/management/Gratuity.java index b5541266f..d7fbd6bcf 100644 --- a/src/main/java/com/adyen/model/management/Gratuity.java +++ b/src/main/java/com/adyen/model/management/Gratuity.java @@ -1,7 +1,7 @@ /* * Management API * - * The version of the OpenAPI document: 1 + * The version of the OpenAPI document: 3 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/management/Hardware.java b/src/main/java/com/adyen/model/management/Hardware.java index b042bee5b..7e96d908d 100644 --- a/src/main/java/com/adyen/model/management/Hardware.java +++ b/src/main/java/com/adyen/model/management/Hardware.java @@ -1,7 +1,7 @@ /* * Management API * - * The version of the OpenAPI document: 1 + * The version of the OpenAPI document: 3 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -76,10 +76,10 @@ public Hardware restartHour(Integer restartHour) { } /** - * The hour (0 - 23) in which the device will reboot, reboot will happen in the timezone of the device + * The hour of the day when the terminal is set to reboot to apply the configuration and software updates. By default, the restart hour is at 6:00 AM in the timezone of the terminal Minimum vaoue: 0, maximum value: 23. * @return restartHour **/ - @ApiModelProperty(value = "The hour (0 - 23) in which the device will reboot, reboot will happen in the timezone of the device") + @ApiModelProperty(value = "The hour of the day when the terminal is set to reboot to apply the configuration and software updates. By default, the restart hour is at 6:00 AM in the timezone of the terminal Minimum vaoue: 0, maximum value: 23.") @JsonProperty(JSON_PROPERTY_RESTART_HOUR) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) diff --git a/src/main/java/com/adyen/model/management/IdName.java b/src/main/java/com/adyen/model/management/IdName.java index da395bf8d..29a3dace9 100644 --- a/src/main/java/com/adyen/model/management/IdName.java +++ b/src/main/java/com/adyen/model/management/IdName.java @@ -1,7 +1,7 @@ /* * Management API * - * The version of the OpenAPI document: 1 + * The version of the OpenAPI document: 3 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/management/InstallAndroidAppDetails.java b/src/main/java/com/adyen/model/management/InstallAndroidAppDetails.java index 632c40464..f070ab779 100644 --- a/src/main/java/com/adyen/model/management/InstallAndroidAppDetails.java +++ b/src/main/java/com/adyen/model/management/InstallAndroidAppDetails.java @@ -1,7 +1,7 @@ /* * Management API * - * The version of the OpenAPI document: 1 + * The version of the OpenAPI document: 3 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/management/InstallAndroidCertificateDetails.java b/src/main/java/com/adyen/model/management/InstallAndroidCertificateDetails.java index 44c6b193e..39ce3583b 100644 --- a/src/main/java/com/adyen/model/management/InstallAndroidCertificateDetails.java +++ b/src/main/java/com/adyen/model/management/InstallAndroidCertificateDetails.java @@ -1,7 +1,7 @@ /* * Management API * - * The version of the OpenAPI document: 1 + * The version of the OpenAPI document: 3 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/management/InvalidField.java b/src/main/java/com/adyen/model/management/InvalidField.java index c68f016a6..7f3a9174c 100644 --- a/src/main/java/com/adyen/model/management/InvalidField.java +++ b/src/main/java/com/adyen/model/management/InvalidField.java @@ -1,7 +1,7 @@ /* * Management API * - * The version of the OpenAPI document: 1 + * The version of the OpenAPI document: 3 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/management/JSONObject.java b/src/main/java/com/adyen/model/management/JSONObject.java index 01ced78a5..f1399f1ca 100644 --- a/src/main/java/com/adyen/model/management/JSONObject.java +++ b/src/main/java/com/adyen/model/management/JSONObject.java @@ -1,7 +1,7 @@ /* * Management API * - * The version of the OpenAPI document: 1 + * The version of the OpenAPI document: 3 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -17,7 +17,6 @@ import java.util.Map; import java.util.HashMap; import com.adyen.model.management.JSONPath; -import com.adyen.model.management.JSONPathWrapper; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -41,7 +40,7 @@ public class JSONObject { public static final String JSON_PROPERTY_PATHS = "paths"; - private List paths = null; + private List paths = null; public static final String JSON_PROPERTY_ROOT_PATH = "rootPath"; private JSONPath rootPath; @@ -49,12 +48,12 @@ public class JSONObject { public JSONObject() { } - public JSONObject paths(List paths) { + public JSONObject paths(List paths) { this.paths = paths; return this; } - public JSONObject addPathsItem(JSONPathWrapper pathsItem) { + public JSONObject addPathsItem(JSONPath pathsItem) { if (this.paths == null) { this.paths = new ArrayList<>(); } @@ -70,14 +69,14 @@ public JSONObject addPathsItem(JSONPathWrapper pathsItem) { @JsonProperty(JSON_PROPERTY_PATHS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getPaths() { + public List getPaths() { return paths; } @JsonProperty(JSON_PROPERTY_PATHS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPaths(List paths) { + public void setPaths(List paths) { this.paths = paths; } diff --git a/src/main/java/com/adyen/model/management/JSONPath.java b/src/main/java/com/adyen/model/management/JSONPath.java index f1e9de9d4..4637d3f5a 100644 --- a/src/main/java/com/adyen/model/management/JSONPath.java +++ b/src/main/java/com/adyen/model/management/JSONPath.java @@ -1,7 +1,7 @@ /* * Management API * - * The version of the OpenAPI document: 1 + * The version of the OpenAPI document: 3 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/management/Key.java b/src/main/java/com/adyen/model/management/Key.java index 51d82be2e..01a82e515 100644 --- a/src/main/java/com/adyen/model/management/Key.java +++ b/src/main/java/com/adyen/model/management/Key.java @@ -1,7 +1,7 @@ /* * Management API * - * The version of the OpenAPI document: 1 + * The version of the OpenAPI document: 3 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/management/KlarnaInfo.java b/src/main/java/com/adyen/model/management/KlarnaInfo.java index b9a11713d..19b03b68a 100644 --- a/src/main/java/com/adyen/model/management/KlarnaInfo.java +++ b/src/main/java/com/adyen/model/management/KlarnaInfo.java @@ -1,7 +1,7 @@ /* * Management API * - * The version of the OpenAPI document: 1 + * The version of the OpenAPI document: 3 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -151,7 +151,7 @@ public KlarnaInfo region(RegionEnum region) { * The region of operation. For example, **NA**, **EU**, **CH**, **AU**. * @return region **/ - @ApiModelProperty(value = "The region of operation. For example, **NA**, **EU**, **CH**, **AU**.") + @ApiModelProperty(required = true, value = "The region of operation. For example, **NA**, **EU**, **CH**, **AU**.") @JsonProperty(JSON_PROPERTY_REGION) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) diff --git a/src/main/java/com/adyen/model/management/Links.java b/src/main/java/com/adyen/model/management/Links.java index 4bb0f04b6..a50fa0916 100644 --- a/src/main/java/com/adyen/model/management/Links.java +++ b/src/main/java/com/adyen/model/management/Links.java @@ -1,7 +1,7 @@ /* * Management API * - * The version of the OpenAPI document: 1 + * The version of the OpenAPI document: 3 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/management/LinksElement.java b/src/main/java/com/adyen/model/management/LinksElement.java index 60413a8aa..ebf4fd205 100644 --- a/src/main/java/com/adyen/model/management/LinksElement.java +++ b/src/main/java/com/adyen/model/management/LinksElement.java @@ -1,7 +1,7 @@ /* * Management API * - * The version of the OpenAPI document: 1 + * The version of the OpenAPI document: 3 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/management/ListCompanyApiCredentialsResponse.java b/src/main/java/com/adyen/model/management/ListCompanyApiCredentialsResponse.java index 500b1754a..ebe7928b1 100644 --- a/src/main/java/com/adyen/model/management/ListCompanyApiCredentialsResponse.java +++ b/src/main/java/com/adyen/model/management/ListCompanyApiCredentialsResponse.java @@ -1,7 +1,7 @@ /* * Management API * - * The version of the OpenAPI document: 1 + * The version of the OpenAPI document: 3 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/management/ListCompanyResponse.java b/src/main/java/com/adyen/model/management/ListCompanyResponse.java index 76b7acc8d..f512b73e3 100644 --- a/src/main/java/com/adyen/model/management/ListCompanyResponse.java +++ b/src/main/java/com/adyen/model/management/ListCompanyResponse.java @@ -1,7 +1,7 @@ /* * Management API * - * The version of the OpenAPI document: 1 + * The version of the OpenAPI document: 3 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/management/ListCompanyUsersResponse.java b/src/main/java/com/adyen/model/management/ListCompanyUsersResponse.java index cbc04bcae..7a161510e 100644 --- a/src/main/java/com/adyen/model/management/ListCompanyUsersResponse.java +++ b/src/main/java/com/adyen/model/management/ListCompanyUsersResponse.java @@ -1,7 +1,7 @@ /* * Management API * - * The version of the OpenAPI document: 1 + * The version of the OpenAPI document: 3 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/management/ListExternalTerminalActionsResponse.java b/src/main/java/com/adyen/model/management/ListExternalTerminalActionsResponse.java index 2ae4848ad..0346475b8 100644 --- a/src/main/java/com/adyen/model/management/ListExternalTerminalActionsResponse.java +++ b/src/main/java/com/adyen/model/management/ListExternalTerminalActionsResponse.java @@ -1,7 +1,7 @@ /* * Management API * - * The version of the OpenAPI document: 1 + * The version of the OpenAPI document: 3 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/management/ListMerchantApiCredentialsResponse.java b/src/main/java/com/adyen/model/management/ListMerchantApiCredentialsResponse.java index 78b9aca4e..211fec165 100644 --- a/src/main/java/com/adyen/model/management/ListMerchantApiCredentialsResponse.java +++ b/src/main/java/com/adyen/model/management/ListMerchantApiCredentialsResponse.java @@ -1,7 +1,7 @@ /* * Management API * - * The version of the OpenAPI document: 1 + * The version of the OpenAPI document: 3 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/management/ListMerchantResponse.java b/src/main/java/com/adyen/model/management/ListMerchantResponse.java index 28d47f105..a8334d4bb 100644 --- a/src/main/java/com/adyen/model/management/ListMerchantResponse.java +++ b/src/main/java/com/adyen/model/management/ListMerchantResponse.java @@ -1,7 +1,7 @@ /* * Management API * - * The version of the OpenAPI document: 1 + * The version of the OpenAPI document: 3 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/management/ListMerchantUsersResponse.java b/src/main/java/com/adyen/model/management/ListMerchantUsersResponse.java index f526dd084..7447db0af 100644 --- a/src/main/java/com/adyen/model/management/ListMerchantUsersResponse.java +++ b/src/main/java/com/adyen/model/management/ListMerchantUsersResponse.java @@ -1,7 +1,7 @@ /* * Management API * - * The version of the OpenAPI document: 1 + * The version of the OpenAPI document: 3 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/management/ListStoresResponse.java b/src/main/java/com/adyen/model/management/ListStoresResponse.java index e960e51b5..c01a54347 100644 --- a/src/main/java/com/adyen/model/management/ListStoresResponse.java +++ b/src/main/java/com/adyen/model/management/ListStoresResponse.java @@ -1,7 +1,7 @@ /* * Management API * - * The version of the OpenAPI document: 1 + * The version of the OpenAPI document: 3 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/management/ListTerminalsResponse.java b/src/main/java/com/adyen/model/management/ListTerminalsResponse.java index 8df80f55d..993472a18 100644 --- a/src/main/java/com/adyen/model/management/ListTerminalsResponse.java +++ b/src/main/java/com/adyen/model/management/ListTerminalsResponse.java @@ -1,7 +1,7 @@ /* * Management API * - * The version of the OpenAPI document: 1 + * The version of the OpenAPI document: 3 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -96,10 +96,10 @@ public ListTerminalsResponse addDataItem(Terminal dataItem) { } /** - * The list of terminals. + * The list of terminals and their details. * @return data **/ - @ApiModelProperty(value = "The list of terminals.") + @ApiModelProperty(value = "The list of terminals and their details.") @JsonProperty(JSON_PROPERTY_DATA) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) diff --git a/src/main/java/com/adyen/model/management/ListWebhooksResponse.java b/src/main/java/com/adyen/model/management/ListWebhooksResponse.java index 6c62c9ccc..9e6500542 100644 --- a/src/main/java/com/adyen/model/management/ListWebhooksResponse.java +++ b/src/main/java/com/adyen/model/management/ListWebhooksResponse.java @@ -1,7 +1,7 @@ /* * Management API * - * The version of the OpenAPI document: 1 + * The version of the OpenAPI document: 3 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/management/JSONPathWrapper.java b/src/main/java/com/adyen/model/management/Localization.java similarity index 58% rename from src/main/java/com/adyen/model/management/JSONPathWrapper.java rename to src/main/java/com/adyen/model/management/Localization.java index 3a1733fe0..82c334181 100644 --- a/src/main/java/com/adyen/model/management/JSONPathWrapper.java +++ b/src/main/java/com/adyen/model/management/Localization.java @@ -1,7 +1,7 @@ /* * Management API * - * The version of the OpenAPI document: 1 + * The version of the OpenAPI document: 3 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -16,7 +16,6 @@ import java.util.Arrays; import java.util.Map; import java.util.HashMap; -import com.adyen.model.management.JSONPath; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -29,46 +28,46 @@ /** - * JSONPathWrapper + * Localization */ @JsonPropertyOrder({ - JSONPathWrapper.JSON_PROPERTY_JS_O_N_PATH + Localization.JSON_PROPERTY_LANGUAGE }) -public class JSONPathWrapper { - public static final String JSON_PROPERTY_JS_O_N_PATH = "JSONPath"; - private JSONPath jsONPath; +public class Localization { + public static final String JSON_PROPERTY_LANGUAGE = "language"; + private String language; - public JSONPathWrapper() { + public Localization() { } - public JSONPathWrapper jsONPath(JSONPath jsONPath) { - this.jsONPath = jsONPath; + public Localization language(String language) { + this.language = language; return this; } /** - * Get jsONPath - * @return jsONPath + * Language of the terminal. + * @return language **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_JS_O_N_PATH) + @ApiModelProperty(value = "Language of the terminal.") + @JsonProperty(JSON_PROPERTY_LANGUAGE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public JSONPath getJsONPath() { - return jsONPath; + public String getLanguage() { + return language; } - @JsonProperty(JSON_PROPERTY_JS_O_N_PATH) + @JsonProperty(JSON_PROPERTY_LANGUAGE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setJsONPath(JSONPath jsONPath) { - this.jsONPath = jsONPath; + public void setLanguage(String language) { + this.language = language; } /** - * Return true if this JSONPathWrapper object is equal to o. + * Return true if this Localization object is equal to o. */ @Override public boolean equals(Object o) { @@ -78,20 +77,20 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - JSONPathWrapper jsONPathWrapper = (JSONPathWrapper) o; - return Objects.equals(this.jsONPath, jsONPathWrapper.jsONPath); + Localization localization = (Localization) o; + return Objects.equals(this.language, localization.language); } @Override public int hashCode() { - return Objects.hash(jsONPath); + return Objects.hash(language); } @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class JSONPathWrapper {\n"); - sb.append(" jsONPath: ").append(toIndentedString(jsONPath)).append("\n"); + sb.append("class Localization {\n"); + sb.append(" language: ").append(toIndentedString(language)).append("\n"); sb.append("}"); return sb.toString(); } @@ -108,17 +107,17 @@ private String toIndentedString(Object o) { } /** - * Create an instance of JSONPathWrapper given an JSON string + * Create an instance of Localization given an JSON string * * @param jsonString JSON string - * @return An instance of JSONPathWrapper - * @throws JsonProcessingException if the JSON string is invalid with respect to JSONPathWrapper + * @return An instance of Localization + * @throws JsonProcessingException if the JSON string is invalid with respect to Localization */ - public static JSONPathWrapper fromJson(String jsonString) throws JsonProcessingException { - return JSON.getMapper().readValue(jsonString, JSONPathWrapper.class); + public static Localization fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, Localization.class); } /** - * Convert an instance of JSONPathWrapper to an JSON string + * Convert an instance of Localization to an JSON string * * @return JSON string */ diff --git a/src/main/java/com/adyen/model/management/Logo.java b/src/main/java/com/adyen/model/management/Logo.java index 64f17fe54..a63373f99 100644 --- a/src/main/java/com/adyen/model/management/Logo.java +++ b/src/main/java/com/adyen/model/management/Logo.java @@ -1,7 +1,7 @@ /* * Management API * - * The version of the OpenAPI document: 1 + * The version of the OpenAPI document: 3 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/management/MeApiCredential.java b/src/main/java/com/adyen/model/management/MeApiCredential.java index 32db0df97..de3007e78 100644 --- a/src/main/java/com/adyen/model/management/MeApiCredential.java +++ b/src/main/java/com/adyen/model/management/MeApiCredential.java @@ -1,7 +1,7 @@ /* * Management API * - * The version of the OpenAPI document: 1 + * The version of the OpenAPI document: 3 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/management/MealVoucherFRInfo.java b/src/main/java/com/adyen/model/management/MealVoucherFRInfo.java index ecfc456a0..550fc1d4b 100644 --- a/src/main/java/com/adyen/model/management/MealVoucherFRInfo.java +++ b/src/main/java/com/adyen/model/management/MealVoucherFRInfo.java @@ -1,7 +1,7 @@ /* * Management API * - * The version of the OpenAPI document: 1 + * The version of the OpenAPI document: 3 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/management/Merchant.java b/src/main/java/com/adyen/model/management/Merchant.java index 6c286801e..266c94b35 100644 --- a/src/main/java/com/adyen/model/management/Merchant.java +++ b/src/main/java/com/adyen/model/management/Merchant.java @@ -1,7 +1,7 @@ /* * Management API * - * The version of the OpenAPI document: 1 + * The version of the OpenAPI document: 3 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/management/MerchantLinks.java b/src/main/java/com/adyen/model/management/MerchantLinks.java index 74fcdce16..2241ac6a6 100644 --- a/src/main/java/com/adyen/model/management/MerchantLinks.java +++ b/src/main/java/com/adyen/model/management/MerchantLinks.java @@ -1,7 +1,7 @@ /* * Management API * - * The version of the OpenAPI document: 1 + * The version of the OpenAPI document: 3 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/management/MinorUnitsMonetaryValue.java b/src/main/java/com/adyen/model/management/MinorUnitsMonetaryValue.java index 4118d85b3..2812ef46e 100644 --- a/src/main/java/com/adyen/model/management/MinorUnitsMonetaryValue.java +++ b/src/main/java/com/adyen/model/management/MinorUnitsMonetaryValue.java @@ -1,7 +1,7 @@ /* * Management API * - * The version of the OpenAPI document: 1 + * The version of the OpenAPI document: 3 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/management/ModelConfiguration.java b/src/main/java/com/adyen/model/management/ModelConfiguration.java index 8d0bf1184..fa0076ab0 100644 --- a/src/main/java/com/adyen/model/management/ModelConfiguration.java +++ b/src/main/java/com/adyen/model/management/ModelConfiguration.java @@ -1,7 +1,7 @@ /* * Management API * - * The version of the OpenAPI document: 1 + * The version of the OpenAPI document: 3 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/management/ModelFile.java b/src/main/java/com/adyen/model/management/ModelFile.java index 1cbdeec5e..ff9de054e 100644 --- a/src/main/java/com/adyen/model/management/ModelFile.java +++ b/src/main/java/com/adyen/model/management/ModelFile.java @@ -1,7 +1,7 @@ /* * Management API * - * The version of the OpenAPI document: 1 + * The version of the OpenAPI document: 3 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/management/Name.java b/src/main/java/com/adyen/model/management/Name.java index fec01f2d0..bd5e0e66f 100644 --- a/src/main/java/com/adyen/model/management/Name.java +++ b/src/main/java/com/adyen/model/management/Name.java @@ -1,7 +1,7 @@ /* * Management API * - * The version of the OpenAPI document: 1 + * The version of the OpenAPI document: 3 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/management/Name2.java b/src/main/java/com/adyen/model/management/Name2.java index b0f91cca2..5d377b849 100644 --- a/src/main/java/com/adyen/model/management/Name2.java +++ b/src/main/java/com/adyen/model/management/Name2.java @@ -1,7 +1,7 @@ /* * Management API * - * The version of the OpenAPI document: 1 + * The version of the OpenAPI document: 3 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/management/Nexo.java b/src/main/java/com/adyen/model/management/Nexo.java index 4af317400..5b8504261 100644 --- a/src/main/java/com/adyen/model/management/Nexo.java +++ b/src/main/java/com/adyen/model/management/Nexo.java @@ -1,7 +1,7 @@ /* * Management API * - * The version of the OpenAPI document: 1 + * The version of the OpenAPI document: 3 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/management/Notification.java b/src/main/java/com/adyen/model/management/Notification.java index e0626a12c..a31e1cbb9 100644 --- a/src/main/java/com/adyen/model/management/Notification.java +++ b/src/main/java/com/adyen/model/management/Notification.java @@ -1,7 +1,7 @@ /* * Management API * - * The version of the OpenAPI document: 1 + * The version of the OpenAPI document: 3 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -47,10 +47,10 @@ public Notification showButton(Boolean showButton) { } /** - * Toggle to show or hide Notification button on the terminal + * Shows or hides the event notification button on the terminal screen. * @return showButton **/ - @ApiModelProperty(value = "Toggle to show or hide Notification button on the terminal") + @ApiModelProperty(value = "Shows or hides the event notification button on the terminal screen.") @JsonProperty(JSON_PROPERTY_SHOW_BUTTON) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) diff --git a/src/main/java/com/adyen/model/management/NotificationUrl.java b/src/main/java/com/adyen/model/management/NotificationUrl.java index 387f9c615..2b8a4dc26 100644 --- a/src/main/java/com/adyen/model/management/NotificationUrl.java +++ b/src/main/java/com/adyen/model/management/NotificationUrl.java @@ -1,7 +1,7 @@ /* * Management API * - * The version of the OpenAPI document: 1 + * The version of the OpenAPI document: 3 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/management/OfflineProcessing.java b/src/main/java/com/adyen/model/management/OfflineProcessing.java index ffc65d2a5..5ac0a1236 100644 --- a/src/main/java/com/adyen/model/management/OfflineProcessing.java +++ b/src/main/java/com/adyen/model/management/OfflineProcessing.java @@ -1,7 +1,7 @@ /* * Management API * - * The version of the OpenAPI document: 1 + * The version of the OpenAPI document: 3 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/management/Opi.java b/src/main/java/com/adyen/model/management/Opi.java index 62288c5ae..9ad8fb3f0 100644 --- a/src/main/java/com/adyen/model/management/Opi.java +++ b/src/main/java/com/adyen/model/management/Opi.java @@ -1,7 +1,7 @@ /* * Management API * - * The version of the OpenAPI document: 1 + * The version of the OpenAPI document: 3 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/management/OrderItem.java b/src/main/java/com/adyen/model/management/OrderItem.java index ba6b1423b..0c3744c1b 100644 --- a/src/main/java/com/adyen/model/management/OrderItem.java +++ b/src/main/java/com/adyen/model/management/OrderItem.java @@ -1,7 +1,7 @@ /* * Management API * - * The version of the OpenAPI document: 1 + * The version of the OpenAPI document: 3 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/management/PaginationLinks.java b/src/main/java/com/adyen/model/management/PaginationLinks.java index a35dd283c..5793c8615 100644 --- a/src/main/java/com/adyen/model/management/PaginationLinks.java +++ b/src/main/java/com/adyen/model/management/PaginationLinks.java @@ -1,7 +1,7 @@ /* * Management API * - * The version of the OpenAPI document: 1 + * The version of the OpenAPI document: 3 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/management/Passcodes.java b/src/main/java/com/adyen/model/management/Passcodes.java index 1eb68ac1e..70de906c3 100644 --- a/src/main/java/com/adyen/model/management/Passcodes.java +++ b/src/main/java/com/adyen/model/management/Passcodes.java @@ -1,7 +1,7 @@ /* * Management API * - * The version of the OpenAPI document: 1 + * The version of the OpenAPI document: 3 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/management/PayAtTable.java b/src/main/java/com/adyen/model/management/PayAtTable.java index 920ef7394..fc11ef0fc 100644 --- a/src/main/java/com/adyen/model/management/PayAtTable.java +++ b/src/main/java/com/adyen/model/management/PayAtTable.java @@ -1,7 +1,7 @@ /* * Management API * - * The version of the OpenAPI document: 1 + * The version of the OpenAPI document: 3 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/management/PayPalInfo.java b/src/main/java/com/adyen/model/management/PayPalInfo.java index 9dc1f27b7..c691a9aad 100644 --- a/src/main/java/com/adyen/model/management/PayPalInfo.java +++ b/src/main/java/com/adyen/model/management/PayPalInfo.java @@ -1,7 +1,7 @@ /* * Management API * - * The version of the OpenAPI document: 1 + * The version of the OpenAPI document: 3 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/management/Payment.java b/src/main/java/com/adyen/model/management/Payment.java index e0edec9f7..f7926a0c9 100644 --- a/src/main/java/com/adyen/model/management/Payment.java +++ b/src/main/java/com/adyen/model/management/Payment.java @@ -1,7 +1,7 @@ /* * Management API * - * The version of the OpenAPI document: 1 + * The version of the OpenAPI document: 3 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -33,16 +33,45 @@ * Payment */ @JsonPropertyOrder({ + Payment.JSON_PROPERTY_CONTACTLESS_CURRENCY, Payment.JSON_PROPERTY_HIDE_MINOR_UNITS_IN_CURRENCIES }) public class Payment { + public static final String JSON_PROPERTY_CONTACTLESS_CURRENCY = "contactlessCurrency"; + private String contactlessCurrency; + public static final String JSON_PROPERTY_HIDE_MINOR_UNITS_IN_CURRENCIES = "hideMinorUnitsInCurrencies"; private List hideMinorUnitsInCurrencies = null; public Payment() { } + public Payment contactlessCurrency(String contactlessCurrency) { + this.contactlessCurrency = contactlessCurrency; + return this; + } + + /** + * The default currency for contactless payments on the payment terminal, as the three-letter [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code. + * @return contactlessCurrency + **/ + @ApiModelProperty(value = "The default currency for contactless payments on the payment terminal, as the three-letter [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code.") + @JsonProperty(JSON_PROPERTY_CONTACTLESS_CURRENCY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getContactlessCurrency() { + return contactlessCurrency; + } + + + @JsonProperty(JSON_PROPERTY_CONTACTLESS_CURRENCY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setContactlessCurrency(String contactlessCurrency) { + this.contactlessCurrency = contactlessCurrency; + } + + public Payment hideMinorUnitsInCurrencies(List hideMinorUnitsInCurrencies) { this.hideMinorUnitsInCurrencies = hideMinorUnitsInCurrencies; return this; @@ -88,18 +117,20 @@ public boolean equals(Object o) { return false; } Payment payment = (Payment) o; - return Objects.equals(this.hideMinorUnitsInCurrencies, payment.hideMinorUnitsInCurrencies); + return Objects.equals(this.contactlessCurrency, payment.contactlessCurrency) && + Objects.equals(this.hideMinorUnitsInCurrencies, payment.hideMinorUnitsInCurrencies); } @Override public int hashCode() { - return Objects.hash(hideMinorUnitsInCurrencies); + return Objects.hash(contactlessCurrency, hideMinorUnitsInCurrencies); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Payment {\n"); + sb.append(" contactlessCurrency: ").append(toIndentedString(contactlessCurrency)).append("\n"); sb.append(" hideMinorUnitsInCurrencies: ").append(toIndentedString(hideMinorUnitsInCurrencies)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/src/main/java/com/adyen/model/management/PaymentMethod.java b/src/main/java/com/adyen/model/management/PaymentMethod.java index b536f4cd3..751d5a203 100644 --- a/src/main/java/com/adyen/model/management/PaymentMethod.java +++ b/src/main/java/com/adyen/model/management/PaymentMethod.java @@ -1,7 +1,7 @@ /* * Management API * - * The version of the OpenAPI document: 1 + * The version of the OpenAPI document: 3 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -78,7 +78,7 @@ PaymentMethod.JSON_PROPERTY_REFERENCE, PaymentMethod.JSON_PROPERTY_SHOPPER_INTERACTION, PaymentMethod.JSON_PROPERTY_SOFORT, - PaymentMethod.JSON_PROPERTY_STORE_ID, + PaymentMethod.JSON_PROPERTY_STORE_IDS, PaymentMethod.JSON_PROPERTY_SWISH, PaymentMethod.JSON_PROPERTY_TWINT, PaymentMethod.JSON_PROPERTY_TYPE, @@ -178,8 +178,8 @@ public class PaymentMethod { public static final String JSON_PROPERTY_SOFORT = "sofort"; private SofortInfo sofort; - public static final String JSON_PROPERTY_STORE_ID = "storeId"; - private String storeId; + public static final String JSON_PROPERTY_STORE_IDS = "storeIds"; + private List storeIds = null; public static final String JSON_PROPERTY_SWISH = "swish"; private SwishInfo swish; @@ -1015,28 +1015,36 @@ public void setSofort(SofortInfo sofort) { } - public PaymentMethod storeId(String storeId) { - this.storeId = storeId; + public PaymentMethod storeIds(List storeIds) { + this.storeIds = storeIds; + return this; + } + + public PaymentMethod addStoreIdsItem(String storeIdsItem) { + if (this.storeIds == null) { + this.storeIds = new ArrayList<>(); + } + this.storeIds.add(storeIdsItem); return this; } /** - * The ID of the [store](https://docs.adyen.com/api-explorer/#/ManagementService/latest/post/stores__resParam_id), if any. - * @return storeId + * The unique identifier of the store for which to configure the payment method, if any. + * @return storeIds **/ - @ApiModelProperty(value = "The ID of the [store](https://docs.adyen.com/api-explorer/#/ManagementService/latest/post/stores__resParam_id), if any.") - @JsonProperty(JSON_PROPERTY_STORE_ID) + @ApiModelProperty(value = "The unique identifier of the store for which to configure the payment method, if any.") + @JsonProperty(JSON_PROPERTY_STORE_IDS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getStoreId() { - return storeId; + public List getStoreIds() { + return storeIds; } - @JsonProperty(JSON_PROPERTY_STORE_ID) + @JsonProperty(JSON_PROPERTY_STORE_IDS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setStoreId(String storeId) { - this.storeId = storeId; + public void setStoreIds(List storeIds) { + this.storeIds = storeIds; } @@ -1232,7 +1240,7 @@ public boolean equals(Object o) { Objects.equals(this.reference, paymentMethod.reference) && Objects.equals(this.shopperInteraction, paymentMethod.shopperInteraction) && Objects.equals(this.sofort, paymentMethod.sofort) && - Objects.equals(this.storeId, paymentMethod.storeId) && + Objects.equals(this.storeIds, paymentMethod.storeIds) && Objects.equals(this.swish, paymentMethod.swish) && Objects.equals(this.twint, paymentMethod.twint) && Objects.equals(this.type, paymentMethod.type) && @@ -1243,7 +1251,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(afterpayTouch, allowed, applePay, bcmc, businessLineId, cartesBancaires, clearpay, countries, cup, currencies, customRoutingFlags, diners, discover, eftposAustralia, enabled, giroPay, girocard, googlePay, id, ideal, interacCard, jcb, klarna, maestro, mc, mealVoucherFR, paypal, reference, shopperInteraction, sofort, storeId, swish, twint, type, verificationStatus, vipps, visa); + return Objects.hash(afterpayTouch, allowed, applePay, bcmc, businessLineId, cartesBancaires, clearpay, countries, cup, currencies, customRoutingFlags, diners, discover, eftposAustralia, enabled, giroPay, girocard, googlePay, id, ideal, interacCard, jcb, klarna, maestro, mc, mealVoucherFR, paypal, reference, shopperInteraction, sofort, storeIds, swish, twint, type, verificationStatus, vipps, visa); } @Override @@ -1280,7 +1288,7 @@ public String toString() { sb.append(" reference: ").append(toIndentedString(reference)).append("\n"); sb.append(" shopperInteraction: ").append(toIndentedString(shopperInteraction)).append("\n"); sb.append(" sofort: ").append(toIndentedString(sofort)).append("\n"); - sb.append(" storeId: ").append(toIndentedString(storeId)).append("\n"); + sb.append(" storeIds: ").append(toIndentedString(storeIds)).append("\n"); sb.append(" swish: ").append(toIndentedString(swish)).append("\n"); sb.append(" twint: ").append(toIndentedString(twint)).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); diff --git a/src/main/java/com/adyen/model/management/PaymentMethodResponse.java b/src/main/java/com/adyen/model/management/PaymentMethodResponse.java index 131cd1329..57118ffed 100644 --- a/src/main/java/com/adyen/model/management/PaymentMethodResponse.java +++ b/src/main/java/com/adyen/model/management/PaymentMethodResponse.java @@ -1,7 +1,7 @@ /* * Management API * - * The version of the OpenAPI document: 1 + * The version of the OpenAPI document: 3 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -17,7 +17,7 @@ import java.util.Map; import java.util.HashMap; import com.adyen.model.management.PaginationLinks; -import com.adyen.model.management.PaymentMethodWrapper; +import com.adyen.model.management.PaymentMethod; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -47,7 +47,7 @@ public class PaymentMethodResponse { private PaginationLinks links; public static final String JSON_PROPERTY_DATA = "data"; - private List data = null; + private List data = null; public static final String JSON_PROPERTY_ITEMS_TOTAL = "itemsTotal"; private Integer itemsTotal; @@ -81,8 +81,6 @@ public enum TypesWithErrorsEnum { DINERS("diners"), - DIRECTEBANKING("directEbanking"), - DIRECTDEBIT_GB("directdebit_GB"), DISCOVER("discover"), @@ -217,12 +215,12 @@ public void setLinks(PaginationLinks links) { } - public PaymentMethodResponse data(List data) { + public PaymentMethodResponse data(List data) { this.data = data; return this; } - public PaymentMethodResponse addDataItem(PaymentMethodWrapper dataItem) { + public PaymentMethodResponse addDataItem(PaymentMethod dataItem) { if (this.data == null) { this.data = new ArrayList<>(); } @@ -231,21 +229,21 @@ public PaymentMethodResponse addDataItem(PaymentMethodWrapper dataItem) { } /** - * Payment methods details. + * The list of supported payment methods and their details. * @return data **/ - @ApiModelProperty(value = "Payment methods details.") + @ApiModelProperty(value = "The list of supported payment methods and their details.") @JsonProperty(JSON_PROPERTY_DATA) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getData() { + public List getData() { return data; } @JsonProperty(JSON_PROPERTY_DATA) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setData(List data) { + public void setData(List data) { this.data = data; } diff --git a/src/main/java/com/adyen/model/management/PaymentMethodSetupInfo.java b/src/main/java/com/adyen/model/management/PaymentMethodSetupInfo.java index 7206bc2d4..24ef538e4 100644 --- a/src/main/java/com/adyen/model/management/PaymentMethodSetupInfo.java +++ b/src/main/java/com/adyen/model/management/PaymentMethodSetupInfo.java @@ -1,7 +1,7 @@ /* * Management API * - * The version of the OpenAPI document: 1 + * The version of the OpenAPI document: 3 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -75,7 +75,7 @@ PaymentMethodSetupInfo.JSON_PROPERTY_REFERENCE, PaymentMethodSetupInfo.JSON_PROPERTY_SHOPPER_INTERACTION, PaymentMethodSetupInfo.JSON_PROPERTY_SOFORT, - PaymentMethodSetupInfo.JSON_PROPERTY_STORE_ID, + PaymentMethodSetupInfo.JSON_PROPERTY_STORE_IDS, PaymentMethodSetupInfo.JSON_PROPERTY_SWISH, PaymentMethodSetupInfo.JSON_PROPERTY_TWINT, PaymentMethodSetupInfo.JSON_PROPERTY_TYPE, @@ -204,8 +204,8 @@ public static ShopperInteractionEnum fromValue(String value) { public static final String JSON_PROPERTY_SOFORT = "sofort"; private SofortInfo sofort; - public static final String JSON_PROPERTY_STORE_ID = "storeId"; - private String storeId; + public static final String JSON_PROPERTY_STORE_IDS = "storeIds"; + private List storeIds = null; public static final String JSON_PROPERTY_SWISH = "swish"; private SwishInfo swish; @@ -239,8 +239,6 @@ public enum TypeEnum { DINERS("diners"), - DIRECTEBANKING("directEbanking"), - DIRECTDEBIT_GB("directdebit_GB"), DISCOVER("discover"), @@ -1055,28 +1053,36 @@ public void setSofort(SofortInfo sofort) { } - public PaymentMethodSetupInfo storeId(String storeId) { - this.storeId = storeId; + public PaymentMethodSetupInfo storeIds(List storeIds) { + this.storeIds = storeIds; + return this; + } + + public PaymentMethodSetupInfo addStoreIdsItem(String storeIdsItem) { + if (this.storeIds == null) { + this.storeIds = new ArrayList<>(); + } + this.storeIds.add(storeIdsItem); return this; } /** - * The ID of the [store](https://docs.adyen.com/api-explorer/#/ManagementService/latest/post/stores__resParam_id), if any. - * @return storeId + * The unique identifier of the store for which to configure the payment method, if any. + * @return storeIds **/ - @ApiModelProperty(value = "The ID of the [store](https://docs.adyen.com/api-explorer/#/ManagementService/latest/post/stores__resParam_id), if any.") - @JsonProperty(JSON_PROPERTY_STORE_ID) + @ApiModelProperty(value = "The unique identifier of the store for which to configure the payment method, if any.") + @JsonProperty(JSON_PROPERTY_STORE_IDS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getStoreId() { - return storeId; + public List getStoreIds() { + return storeIds; } - @JsonProperty(JSON_PROPERTY_STORE_ID) + @JsonProperty(JSON_PROPERTY_STORE_IDS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setStoreId(String storeId) { - this.storeId = storeId; + public void setStoreIds(List storeIds) { + this.storeIds = storeIds; } @@ -1139,7 +1145,7 @@ public PaymentMethodSetupInfo type(TypeEnum type) { * Payment method [variant](https://docs.adyen.com/development-resources/paymentmethodvariant#management-api). * @return type **/ - @ApiModelProperty(value = "Payment method [variant](https://docs.adyen.com/development-resources/paymentmethodvariant#management-api).") + @ApiModelProperty(required = true, value = "Payment method [variant](https://docs.adyen.com/development-resources/paymentmethodvariant#management-api).") @JsonProperty(JSON_PROPERTY_TYPE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -1244,7 +1250,7 @@ public boolean equals(Object o) { Objects.equals(this.reference, paymentMethodSetupInfo.reference) && Objects.equals(this.shopperInteraction, paymentMethodSetupInfo.shopperInteraction) && Objects.equals(this.sofort, paymentMethodSetupInfo.sofort) && - Objects.equals(this.storeId, paymentMethodSetupInfo.storeId) && + Objects.equals(this.storeIds, paymentMethodSetupInfo.storeIds) && Objects.equals(this.swish, paymentMethodSetupInfo.swish) && Objects.equals(this.twint, paymentMethodSetupInfo.twint) && Objects.equals(this.type, paymentMethodSetupInfo.type) && @@ -1254,7 +1260,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(afterpayTouch, applePay, bcmc, businessLineId, cartesBancaires, clearpay, countries, cup, currencies, customRoutingFlags, diners, discover, eftposAustralia, giroPay, girocard, googlePay, ideal, interacCard, jcb, klarna, maestro, mc, mealVoucherFR, paypal, reference, shopperInteraction, sofort, storeId, swish, twint, type, vipps, visa); + return Objects.hash(afterpayTouch, applePay, bcmc, businessLineId, cartesBancaires, clearpay, countries, cup, currencies, customRoutingFlags, diners, discover, eftposAustralia, giroPay, girocard, googlePay, ideal, interacCard, jcb, klarna, maestro, mc, mealVoucherFR, paypal, reference, shopperInteraction, sofort, storeIds, swish, twint, type, vipps, visa); } @Override @@ -1288,7 +1294,7 @@ public String toString() { sb.append(" reference: ").append(toIndentedString(reference)).append("\n"); sb.append(" shopperInteraction: ").append(toIndentedString(shopperInteraction)).append("\n"); sb.append(" sofort: ").append(toIndentedString(sofort)).append("\n"); - sb.append(" storeId: ").append(toIndentedString(storeId)).append("\n"); + sb.append(" storeIds: ").append(toIndentedString(storeIds)).append("\n"); sb.append(" swish: ").append(toIndentedString(swish)).append("\n"); sb.append(" twint: ").append(toIndentedString(twint)).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); diff --git a/src/main/java/com/adyen/model/management/PaymentMethodWrapper.java b/src/main/java/com/adyen/model/management/PaymentMethodWrapper.java deleted file mode 100644 index ce063bce2..000000000 --- a/src/main/java/com/adyen/model/management/PaymentMethodWrapper.java +++ /dev/null @@ -1,129 +0,0 @@ -/* - * Management API - * - * The version of the OpenAPI document: 1 - * - * - * 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.adyen.model.management; - -import java.util.Objects; -import java.util.Arrays; -import java.util.Map; -import java.util.HashMap; -import com.adyen.model.management.PaymentMethod; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.core.JsonProcessingException; - - -/** - * PaymentMethodWrapper - */ -@JsonPropertyOrder({ - PaymentMethodWrapper.JSON_PROPERTY_PAYMENT_METHOD -}) - -public class PaymentMethodWrapper { - public static final String JSON_PROPERTY_PAYMENT_METHOD = "PaymentMethod"; - private PaymentMethod paymentMethod; - - public PaymentMethodWrapper() { - } - - public PaymentMethodWrapper paymentMethod(PaymentMethod paymentMethod) { - this.paymentMethod = paymentMethod; - return this; - } - - /** - * Get paymentMethod - * @return paymentMethod - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_PAYMENT_METHOD) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public PaymentMethod getPaymentMethod() { - return paymentMethod; - } - - - @JsonProperty(JSON_PROPERTY_PAYMENT_METHOD) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPaymentMethod(PaymentMethod paymentMethod) { - this.paymentMethod = paymentMethod; - } - - - /** - * Return true if this PaymentMethodWrapper object is equal to o. - */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - PaymentMethodWrapper paymentMethodWrapper = (PaymentMethodWrapper) o; - return Objects.equals(this.paymentMethod, paymentMethodWrapper.paymentMethod); - } - - @Override - public int hashCode() { - return Objects.hash(paymentMethod); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class PaymentMethodWrapper {\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 "); - } - -/** - * Create an instance of PaymentMethodWrapper given an JSON string - * - * @param jsonString JSON string - * @return An instance of PaymentMethodWrapper - * @throws JsonProcessingException if the JSON string is invalid with respect to PaymentMethodWrapper - */ - public static PaymentMethodWrapper fromJson(String jsonString) throws JsonProcessingException { - return JSON.getMapper().readValue(jsonString, PaymentMethodWrapper.class); - } -/** - * Convert an instance of PaymentMethodWrapper to an JSON string - * - * @return JSON string - */ - public String toJson() throws JsonProcessingException { - return JSON.getMapper().writeValueAsString(this); - } -} - diff --git a/src/main/java/com/adyen/model/management/PayoutSettings.java b/src/main/java/com/adyen/model/management/PayoutSettings.java index 438ec6072..5595cc947 100644 --- a/src/main/java/com/adyen/model/management/PayoutSettings.java +++ b/src/main/java/com/adyen/model/management/PayoutSettings.java @@ -1,7 +1,7 @@ /* * Management API * - * The version of the OpenAPI document: 1 + * The version of the OpenAPI document: 3 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/management/PayoutSettingsRequest.java b/src/main/java/com/adyen/model/management/PayoutSettingsRequest.java index 91c67a1fc..141251845 100644 --- a/src/main/java/com/adyen/model/management/PayoutSettingsRequest.java +++ b/src/main/java/com/adyen/model/management/PayoutSettingsRequest.java @@ -1,7 +1,7 @@ /* * Management API * - * The version of the OpenAPI document: 1 + * The version of the OpenAPI document: 3 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/management/PayoutSettingsResponse.java b/src/main/java/com/adyen/model/management/PayoutSettingsResponse.java index c33bd21e5..49520cf1f 100644 --- a/src/main/java/com/adyen/model/management/PayoutSettingsResponse.java +++ b/src/main/java/com/adyen/model/management/PayoutSettingsResponse.java @@ -1,7 +1,7 @@ /* * Management API * - * The version of the OpenAPI document: 1 + * The version of the OpenAPI document: 3 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/management/Profile.java b/src/main/java/com/adyen/model/management/Profile.java index 373b95d67..592cd68b0 100644 --- a/src/main/java/com/adyen/model/management/Profile.java +++ b/src/main/java/com/adyen/model/management/Profile.java @@ -1,7 +1,7 @@ /* * Management API * - * The version of the OpenAPI document: 1 + * The version of the OpenAPI document: 3 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/management/ReceiptOptions.java b/src/main/java/com/adyen/model/management/ReceiptOptions.java index 96c32ede0..7a34ee83a 100644 --- a/src/main/java/com/adyen/model/management/ReceiptOptions.java +++ b/src/main/java/com/adyen/model/management/ReceiptOptions.java @@ -1,7 +1,7 @@ /* * Management API * - * The version of the OpenAPI document: 1 + * The version of the OpenAPI document: 3 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/management/ReceiptPrinting.java b/src/main/java/com/adyen/model/management/ReceiptPrinting.java index 551597233..555ac7f08 100644 --- a/src/main/java/com/adyen/model/management/ReceiptPrinting.java +++ b/src/main/java/com/adyen/model/management/ReceiptPrinting.java @@ -1,7 +1,7 @@ /* * Management API * - * The version of the OpenAPI document: 1 + * The version of the OpenAPI document: 3 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/management/ReleaseUpdateDetails.java b/src/main/java/com/adyen/model/management/ReleaseUpdateDetails.java index 96b442efc..b55b7bc24 100644 --- a/src/main/java/com/adyen/model/management/ReleaseUpdateDetails.java +++ b/src/main/java/com/adyen/model/management/ReleaseUpdateDetails.java @@ -1,7 +1,7 @@ /* * Management API * - * The version of the OpenAPI document: 1 + * The version of the OpenAPI document: 3 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/management/RequestActivationResponse.java b/src/main/java/com/adyen/model/management/RequestActivationResponse.java index 816938239..1b82dfeda 100644 --- a/src/main/java/com/adyen/model/management/RequestActivationResponse.java +++ b/src/main/java/com/adyen/model/management/RequestActivationResponse.java @@ -1,7 +1,7 @@ /* * Management API * - * The version of the OpenAPI document: 1 + * The version of the OpenAPI document: 3 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/management/RestServiceError.java b/src/main/java/com/adyen/model/management/RestServiceError.java index 0d245e6ef..14f4c1295 100644 --- a/src/main/java/com/adyen/model/management/RestServiceError.java +++ b/src/main/java/com/adyen/model/management/RestServiceError.java @@ -1,7 +1,7 @@ /* * Management API * - * The version of the OpenAPI document: 1 + * The version of the OpenAPI document: 3 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -16,7 +16,7 @@ import java.util.Arrays; import java.util.Map; import java.util.HashMap; -import com.adyen.model.management.InvalidFieldWrapper; +import com.adyen.model.management.InvalidField; import com.adyen.model.management.JSONObject; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; @@ -57,7 +57,7 @@ public class RestServiceError { private String instance; public static final String JSON_PROPERTY_INVALID_FIELDS = "invalidFields"; - private List invalidFields = null; + private List invalidFields = null; public static final String JSON_PROPERTY_REQUEST_ID = "requestId"; private String requestId; @@ -152,12 +152,12 @@ public void setInstance(String instance) { } - public RestServiceError invalidFields(List invalidFields) { + public RestServiceError invalidFields(List invalidFields) { this.invalidFields = invalidFields; return this; } - public RestServiceError addInvalidFieldsItem(InvalidFieldWrapper invalidFieldsItem) { + public RestServiceError addInvalidFieldsItem(InvalidField invalidFieldsItem) { if (this.invalidFields == null) { this.invalidFields = new ArrayList<>(); } @@ -173,14 +173,14 @@ public RestServiceError addInvalidFieldsItem(InvalidFieldWrapper invalidFieldsIt @JsonProperty(JSON_PROPERTY_INVALID_FIELDS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getInvalidFields() { + public List getInvalidFields() { return invalidFields; } @JsonProperty(JSON_PROPERTY_INVALID_FIELDS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setInvalidFields(List invalidFields) { + public void setInvalidFields(List invalidFields) { this.invalidFields = invalidFields; } diff --git a/src/main/java/com/adyen/model/management/ScheduleTerminalActionsRequest.java b/src/main/java/com/adyen/model/management/ScheduleTerminalActionsRequest.java index 44f6cf05f..17271bfd6 100644 --- a/src/main/java/com/adyen/model/management/ScheduleTerminalActionsRequest.java +++ b/src/main/java/com/adyen/model/management/ScheduleTerminalActionsRequest.java @@ -1,7 +1,7 @@ /* * Management API * - * The version of the OpenAPI document: 1 + * The version of the OpenAPI document: 3 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/management/ScheduleTerminalActionsRequestActionDetails.java b/src/main/java/com/adyen/model/management/ScheduleTerminalActionsRequestActionDetails.java index d531e358c..22d8136a6 100644 --- a/src/main/java/com/adyen/model/management/ScheduleTerminalActionsRequestActionDetails.java +++ b/src/main/java/com/adyen/model/management/ScheduleTerminalActionsRequestActionDetails.java @@ -1,7 +1,7 @@ /* * Management API * - * The version of the OpenAPI document: 1 + * The version of the OpenAPI document: 3 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/management/ScheduleTerminalActionsResponse.java b/src/main/java/com/adyen/model/management/ScheduleTerminalActionsResponse.java index c4eb61f71..aa08bd7a3 100644 --- a/src/main/java/com/adyen/model/management/ScheduleTerminalActionsResponse.java +++ b/src/main/java/com/adyen/model/management/ScheduleTerminalActionsResponse.java @@ -1,7 +1,7 @@ /* * Management API * - * The version of the OpenAPI document: 1 + * The version of the OpenAPI document: 3 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -41,7 +41,6 @@ ScheduleTerminalActionsResponse.JSON_PROPERTY_ITEMS, ScheduleTerminalActionsResponse.JSON_PROPERTY_SCHEDULED_AT, ScheduleTerminalActionsResponse.JSON_PROPERTY_STORE_ID, - ScheduleTerminalActionsResponse.JSON_PROPERTY_TERMINAL_IDS, ScheduleTerminalActionsResponse.JSON_PROPERTY_TERMINALS_WITH_ERRORS, ScheduleTerminalActionsResponse.JSON_PROPERTY_TOTAL_ERRORS, ScheduleTerminalActionsResponse.JSON_PROPERTY_TOTAL_SCHEDULED @@ -60,9 +59,6 @@ public class ScheduleTerminalActionsResponse { public static final String JSON_PROPERTY_STORE_ID = "storeId"; private String storeId; - public static final String JSON_PROPERTY_TERMINAL_IDS = "terminalIds"; - private List terminalIds = null; - public static final String JSON_PROPERTY_TERMINALS_WITH_ERRORS = "terminalsWithErrors"; private Map> terminalsWithErrors = null; @@ -183,42 +179,6 @@ public void setStoreId(String storeId) { } - public ScheduleTerminalActionsResponse terminalIds(List terminalIds) { - this.terminalIds = terminalIds; - return this; - } - - public ScheduleTerminalActionsResponse addTerminalIdsItem(String terminalIdsItem) { - if (this.terminalIds == null) { - this.terminalIds = new ArrayList<>(); - } - this.terminalIds.add(terminalIdsItem); - return this; - } - - /** - * A list of unique IDs of the terminals that the action applies to. - * @return terminalIds - * @deprecated - **/ - @Deprecated - @ApiModelProperty(value = "A list of unique IDs of the terminals that the action applies to.") - @JsonProperty(JSON_PROPERTY_TERMINAL_IDS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public List getTerminalIds() { - return terminalIds; - } - - - @Deprecated - @JsonProperty(JSON_PROPERTY_TERMINAL_IDS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTerminalIds(List terminalIds) { - this.terminalIds = terminalIds; - } - - public ScheduleTerminalActionsResponse terminalsWithErrors(Map> terminalsWithErrors) { this.terminalsWithErrors = terminalsWithErrors; return this; @@ -318,7 +278,6 @@ public boolean equals(Object o) { Objects.equals(this.items, scheduleTerminalActionsResponse.items) && Objects.equals(this.scheduledAt, scheduleTerminalActionsResponse.scheduledAt) && Objects.equals(this.storeId, scheduleTerminalActionsResponse.storeId) && - Objects.equals(this.terminalIds, scheduleTerminalActionsResponse.terminalIds) && Objects.equals(this.terminalsWithErrors, scheduleTerminalActionsResponse.terminalsWithErrors) && Objects.equals(this.totalErrors, scheduleTerminalActionsResponse.totalErrors) && Objects.equals(this.totalScheduled, scheduleTerminalActionsResponse.totalScheduled); @@ -326,7 +285,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(actionDetails, items, scheduledAt, storeId, terminalIds, terminalsWithErrors, totalErrors, totalScheduled); + return Objects.hash(actionDetails, items, scheduledAt, storeId, terminalsWithErrors, totalErrors, totalScheduled); } @Override @@ -337,7 +296,6 @@ public String toString() { sb.append(" items: ").append(toIndentedString(items)).append("\n"); sb.append(" scheduledAt: ").append(toIndentedString(scheduledAt)).append("\n"); sb.append(" storeId: ").append(toIndentedString(storeId)).append("\n"); - sb.append(" terminalIds: ").append(toIndentedString(terminalIds)).append("\n"); sb.append(" terminalsWithErrors: ").append(toIndentedString(terminalsWithErrors)).append("\n"); sb.append(" totalErrors: ").append(toIndentedString(totalErrors)).append("\n"); sb.append(" totalScheduled: ").append(toIndentedString(totalScheduled)).append("\n"); diff --git a/src/main/java/com/adyen/model/management/Settings.java b/src/main/java/com/adyen/model/management/Settings.java index 86f6f10f0..973885cb4 100644 --- a/src/main/java/com/adyen/model/management/Settings.java +++ b/src/main/java/com/adyen/model/management/Settings.java @@ -1,7 +1,7 @@ /* * Management API * - * The version of the OpenAPI document: 1 + * The version of the OpenAPI document: 3 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/management/ShippingLocation.java b/src/main/java/com/adyen/model/management/ShippingLocation.java index 1b231b5f5..99396c838 100644 --- a/src/main/java/com/adyen/model/management/ShippingLocation.java +++ b/src/main/java/com/adyen/model/management/ShippingLocation.java @@ -1,7 +1,7 @@ /* * Management API * - * The version of the OpenAPI document: 1 + * The version of the OpenAPI document: 3 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/management/ShippingLocationsResponse.java b/src/main/java/com/adyen/model/management/ShippingLocationsResponse.java index 5cf680989..1d5fc0ffa 100644 --- a/src/main/java/com/adyen/model/management/ShippingLocationsResponse.java +++ b/src/main/java/com/adyen/model/management/ShippingLocationsResponse.java @@ -1,7 +1,7 @@ /* * Management API * - * The version of the OpenAPI document: 1 + * The version of the OpenAPI document: 3 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/management/Signature.java b/src/main/java/com/adyen/model/management/Signature.java index 15a68b9a5..cc10cc5f1 100644 --- a/src/main/java/com/adyen/model/management/Signature.java +++ b/src/main/java/com/adyen/model/management/Signature.java @@ -1,7 +1,7 @@ /* * Management API * - * The version of the OpenAPI document: 1 + * The version of the OpenAPI document: 3 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/management/SofortInfo.java b/src/main/java/com/adyen/model/management/SofortInfo.java index 81899c1dc..2418863ff 100644 --- a/src/main/java/com/adyen/model/management/SofortInfo.java +++ b/src/main/java/com/adyen/model/management/SofortInfo.java @@ -1,7 +1,7 @@ /* * Management API * - * The version of the OpenAPI document: 1 + * The version of the OpenAPI document: 3 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/management/SplitConfiguration.java b/src/main/java/com/adyen/model/management/SplitConfiguration.java index 763b3c8c6..d760c8e27 100644 --- a/src/main/java/com/adyen/model/management/SplitConfiguration.java +++ b/src/main/java/com/adyen/model/management/SplitConfiguration.java @@ -1,7 +1,7 @@ /* * Management API * - * The version of the OpenAPI document: 1 + * The version of the OpenAPI document: 3 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/management/SplitConfigurationList.java b/src/main/java/com/adyen/model/management/SplitConfigurationList.java index 4ed1260a9..41a7272bd 100644 --- a/src/main/java/com/adyen/model/management/SplitConfigurationList.java +++ b/src/main/java/com/adyen/model/management/SplitConfigurationList.java @@ -1,7 +1,7 @@ /* * Management API * - * The version of the OpenAPI document: 1 + * The version of the OpenAPI document: 3 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/management/SplitConfigurationLogic.java b/src/main/java/com/adyen/model/management/SplitConfigurationLogic.java index 3ca1bce24..076f48b6d 100644 --- a/src/main/java/com/adyen/model/management/SplitConfigurationLogic.java +++ b/src/main/java/com/adyen/model/management/SplitConfigurationLogic.java @@ -1,7 +1,7 @@ /* * Management API * - * The version of the OpenAPI document: 1 + * The version of the OpenAPI document: 3 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -33,20 +33,179 @@ * SplitConfigurationLogic */ @JsonPropertyOrder({ + SplitConfigurationLogic.JSON_PROPERTY_ACQUIRING_FEES, SplitConfigurationLogic.JSON_PROPERTY_ADDITIONAL_COMMISSION, + SplitConfigurationLogic.JSON_PROPERTY_ADYEN_COMMISSION, + SplitConfigurationLogic.JSON_PROPERTY_ADYEN_FEES, + SplitConfigurationLogic.JSON_PROPERTY_ADYEN_MARKUP, SplitConfigurationLogic.JSON_PROPERTY_CHARGEBACK, + SplitConfigurationLogic.JSON_PROPERTY_CHARGEBACK_COST_ALLOCATION, SplitConfigurationLogic.JSON_PROPERTY_COMMISSION, + SplitConfigurationLogic.JSON_PROPERTY_INTERCHANGE, SplitConfigurationLogic.JSON_PROPERTY_PAYMENT_FEE, SplitConfigurationLogic.JSON_PROPERTY_REMAINDER, + SplitConfigurationLogic.JSON_PROPERTY_SCHEME_FEE, SplitConfigurationLogic.JSON_PROPERTY_SPLIT_LOGIC_ID, SplitConfigurationLogic.JSON_PROPERTY_SURCHARGE, SplitConfigurationLogic.JSON_PROPERTY_TIP }) public class SplitConfigurationLogic { + /** + * Specifies the logic to apply when booking the transaction fees. Should be combined with adyenFees. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. + */ + public enum AcquiringFeesEnum { + DEDUCTFROMLIABLEACCOUNT("deductFromLiableAccount"), + + DEDUCTFROMONEBALANCEACCOUNT("deductFromOneBalanceAccount"); + + private String value; + + AcquiringFeesEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static AcquiringFeesEnum fromValue(String value) { + for (AcquiringFeesEnum b : AcquiringFeesEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_ACQUIRING_FEES = "acquiringFees"; + private AcquiringFeesEnum acquiringFees; + public static final String JSON_PROPERTY_ADDITIONAL_COMMISSION = "additionalCommission"; private AdditionalCommission additionalCommission; + /** + * Specifies the logic to apply when booking the transaction fees. Should be combined with schemeFee, interchange & adyenMarkup. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. + */ + public enum AdyenCommissionEnum { + DEDUCTFROMLIABLEACCOUNT("deductFromLiableAccount"), + + DEDUCTFROMONEBALANCEACCOUNT("deductFromOneBalanceAccount"); + + private String value; + + AdyenCommissionEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static AdyenCommissionEnum fromValue(String value) { + for (AdyenCommissionEnum b : AdyenCommissionEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_ADYEN_COMMISSION = "adyenCommission"; + private AdyenCommissionEnum adyenCommission; + + /** + * Specifies the logic to apply when booking the transaction fees. Should be combined with acquiringFees. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. + */ + public enum AdyenFeesEnum { + DEDUCTFROMLIABLEACCOUNT("deductFromLiableAccount"), + + DEDUCTFROMONEBALANCEACCOUNT("deductFromOneBalanceAccount"); + + private String value; + + AdyenFeesEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static AdyenFeesEnum fromValue(String value) { + for (AdyenFeesEnum b : AdyenFeesEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_ADYEN_FEES = "adyenFees"; + private AdyenFeesEnum adyenFees; + + /** + * Specifies the logic to apply when booking the transaction fees. Should be combined with schemeFee, adyenCommission & interchange. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. + */ + public enum AdyenMarkupEnum { + DEDUCTFROMLIABLEACCOUNT("deductFromLiableAccount"), + + DEDUCTFROMONEBALANCEACCOUNT("deductFromOneBalanceAccount"); + + private String value; + + AdyenMarkupEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static AdyenMarkupEnum fromValue(String value) { + for (AdyenMarkupEnum b : AdyenMarkupEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_ADYEN_MARKUP = "adyenMarkup"; + private AdyenMarkupEnum adyenMarkup; + /** * Specifies the logic to apply when booking the chargeback amount. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**, **deductAccordingToSplitRatio**. */ @@ -87,11 +246,87 @@ public static ChargebackEnum fromValue(String value) { public static final String JSON_PROPERTY_CHARGEBACK = "chargeback"; private ChargebackEnum chargeback; + /** + * Specifies the logic to apply when allocating the chargeback costs. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount** + */ + public enum ChargebackCostAllocationEnum { + DEDUCTFROMLIABLEACCOUNT("deductFromLiableAccount"), + + DEDUCTFROMONEBALANCEACCOUNT("deductFromOneBalanceAccount"); + + private String value; + + ChargebackCostAllocationEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static ChargebackCostAllocationEnum fromValue(String value) { + for (ChargebackCostAllocationEnum b : ChargebackCostAllocationEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_CHARGEBACK_COST_ALLOCATION = "chargebackCostAllocation"; + private ChargebackCostAllocationEnum chargebackCostAllocation; + public static final String JSON_PROPERTY_COMMISSION = "commission"; private Commission commission; /** - * Specifies the logic to apply when booking the transaction fees. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. + * Specifies the logic to apply when booking the transaction fees. Should be combined with schemeFee, adyenCommission & adyenMarkup. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. + */ + public enum InterchangeEnum { + DEDUCTFROMLIABLEACCOUNT("deductFromLiableAccount"), + + DEDUCTFROMONEBALANCEACCOUNT("deductFromOneBalanceAccount"); + + private String value; + + InterchangeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static InterchangeEnum fromValue(String value) { + for (InterchangeEnum b : InterchangeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_INTERCHANGE = "interchange"; + private InterchangeEnum interchange; + + /** + * Specifies the logic to apply when booking the transaction fees. Cannot be combined with other fees. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. */ public enum PaymentFeeEnum { DEDUCTFROMLIABLEACCOUNT("deductFromLiableAccount"), @@ -166,6 +401,44 @@ public static RemainderEnum fromValue(String value) { public static final String JSON_PROPERTY_REMAINDER = "remainder"; private RemainderEnum remainder; + /** + * Specifies the logic to apply when booking the transaction fees. Should be combined with interchange, adyenCommission & adyenMarkup. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. + */ + public enum SchemeFeeEnum { + DEDUCTFROMLIABLEACCOUNT("deductFromLiableAccount"), + + DEDUCTFROMONEBALANCEACCOUNT("deductFromOneBalanceAccount"); + + private String value; + + SchemeFeeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static SchemeFeeEnum fromValue(String value) { + for (SchemeFeeEnum b : SchemeFeeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_SCHEME_FEE = "schemeFee"; + private SchemeFeeEnum schemeFee; + public static final String JSON_PROPERTY_SPLIT_LOGIC_ID = "splitLogicId"; private String splitLogicId; @@ -248,6 +521,31 @@ public static TipEnum fromValue(String value) { public SplitConfigurationLogic() { } + public SplitConfigurationLogic acquiringFees(AcquiringFeesEnum acquiringFees) { + this.acquiringFees = acquiringFees; + return this; + } + + /** + * Specifies the logic to apply when booking the transaction fees. Should be combined with adyenFees. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. + * @return acquiringFees + **/ + @ApiModelProperty(value = "Specifies the logic to apply when booking the transaction fees. Should be combined with adyenFees. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**.") + @JsonProperty(JSON_PROPERTY_ACQUIRING_FEES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public AcquiringFeesEnum getAcquiringFees() { + return acquiringFees; + } + + + @JsonProperty(JSON_PROPERTY_ACQUIRING_FEES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAcquiringFees(AcquiringFeesEnum acquiringFees) { + this.acquiringFees = acquiringFees; + } + + public SplitConfigurationLogic additionalCommission(AdditionalCommission additionalCommission) { this.additionalCommission = additionalCommission; return this; @@ -273,6 +571,81 @@ public void setAdditionalCommission(AdditionalCommission additionalCommission) { } + public SplitConfigurationLogic adyenCommission(AdyenCommissionEnum adyenCommission) { + this.adyenCommission = adyenCommission; + return this; + } + + /** + * Specifies the logic to apply when booking the transaction fees. Should be combined with schemeFee, interchange & adyenMarkup. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. + * @return adyenCommission + **/ + @ApiModelProperty(value = "Specifies the logic to apply when booking the transaction fees. Should be combined with schemeFee, interchange & adyenMarkup. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**.") + @JsonProperty(JSON_PROPERTY_ADYEN_COMMISSION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public AdyenCommissionEnum getAdyenCommission() { + return adyenCommission; + } + + + @JsonProperty(JSON_PROPERTY_ADYEN_COMMISSION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAdyenCommission(AdyenCommissionEnum adyenCommission) { + this.adyenCommission = adyenCommission; + } + + + public SplitConfigurationLogic adyenFees(AdyenFeesEnum adyenFees) { + this.adyenFees = adyenFees; + return this; + } + + /** + * Specifies the logic to apply when booking the transaction fees. Should be combined with acquiringFees. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. + * @return adyenFees + **/ + @ApiModelProperty(value = "Specifies the logic to apply when booking the transaction fees. Should be combined with acquiringFees. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**.") + @JsonProperty(JSON_PROPERTY_ADYEN_FEES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public AdyenFeesEnum getAdyenFees() { + return adyenFees; + } + + + @JsonProperty(JSON_PROPERTY_ADYEN_FEES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAdyenFees(AdyenFeesEnum adyenFees) { + this.adyenFees = adyenFees; + } + + + public SplitConfigurationLogic adyenMarkup(AdyenMarkupEnum adyenMarkup) { + this.adyenMarkup = adyenMarkup; + return this; + } + + /** + * Specifies the logic to apply when booking the transaction fees. Should be combined with schemeFee, adyenCommission & interchange. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. + * @return adyenMarkup + **/ + @ApiModelProperty(value = "Specifies the logic to apply when booking the transaction fees. Should be combined with schemeFee, adyenCommission & interchange. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**.") + @JsonProperty(JSON_PROPERTY_ADYEN_MARKUP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public AdyenMarkupEnum getAdyenMarkup() { + return adyenMarkup; + } + + + @JsonProperty(JSON_PROPERTY_ADYEN_MARKUP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAdyenMarkup(AdyenMarkupEnum adyenMarkup) { + this.adyenMarkup = adyenMarkup; + } + + public SplitConfigurationLogic chargeback(ChargebackEnum chargeback) { this.chargeback = chargeback; return this; @@ -298,6 +671,31 @@ public void setChargeback(ChargebackEnum chargeback) { } + public SplitConfigurationLogic chargebackCostAllocation(ChargebackCostAllocationEnum chargebackCostAllocation) { + this.chargebackCostAllocation = chargebackCostAllocation; + return this; + } + + /** + * Specifies the logic to apply when allocating the chargeback costs. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount** + * @return chargebackCostAllocation + **/ + @ApiModelProperty(value = "Specifies the logic to apply when allocating the chargeback costs. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**") + @JsonProperty(JSON_PROPERTY_CHARGEBACK_COST_ALLOCATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public ChargebackCostAllocationEnum getChargebackCostAllocation() { + return chargebackCostAllocation; + } + + + @JsonProperty(JSON_PROPERTY_CHARGEBACK_COST_ALLOCATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setChargebackCostAllocation(ChargebackCostAllocationEnum chargebackCostAllocation) { + this.chargebackCostAllocation = chargebackCostAllocation; + } + + public SplitConfigurationLogic commission(Commission commission) { this.commission = commission; return this; @@ -323,16 +721,41 @@ public void setCommission(Commission commission) { } + public SplitConfigurationLogic interchange(InterchangeEnum interchange) { + this.interchange = interchange; + return this; + } + + /** + * Specifies the logic to apply when booking the transaction fees. Should be combined with schemeFee, adyenCommission & adyenMarkup. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. + * @return interchange + **/ + @ApiModelProperty(value = "Specifies the logic to apply when booking the transaction fees. Should be combined with schemeFee, adyenCommission & adyenMarkup. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**.") + @JsonProperty(JSON_PROPERTY_INTERCHANGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public InterchangeEnum getInterchange() { + return interchange; + } + + + @JsonProperty(JSON_PROPERTY_INTERCHANGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setInterchange(InterchangeEnum interchange) { + this.interchange = interchange; + } + + public SplitConfigurationLogic paymentFee(PaymentFeeEnum paymentFee) { this.paymentFee = paymentFee; return this; } /** - * Specifies the logic to apply when booking the transaction fees. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. + * Specifies the logic to apply when booking the transaction fees. Cannot be combined with other fees. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. * @return paymentFee **/ - @ApiModelProperty(required = true, value = "Specifies the logic to apply when booking the transaction fees. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**.") + @ApiModelProperty(value = "Specifies the logic to apply when booking the transaction fees. Cannot be combined with other fees. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**.") @JsonProperty(JSON_PROPERTY_PAYMENT_FEE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -373,6 +796,31 @@ public void setRemainder(RemainderEnum remainder) { } + public SplitConfigurationLogic schemeFee(SchemeFeeEnum schemeFee) { + this.schemeFee = schemeFee; + return this; + } + + /** + * Specifies the logic to apply when booking the transaction fees. Should be combined with interchange, adyenCommission & adyenMarkup. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. + * @return schemeFee + **/ + @ApiModelProperty(value = "Specifies the logic to apply when booking the transaction fees. Should be combined with interchange, adyenCommission & adyenMarkup. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**.") + @JsonProperty(JSON_PROPERTY_SCHEME_FEE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public SchemeFeeEnum getSchemeFee() { + return schemeFee; + } + + + @JsonProperty(JSON_PROPERTY_SCHEME_FEE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSchemeFee(SchemeFeeEnum schemeFee) { + this.schemeFee = schemeFee; + } + + public SplitConfigurationLogic splitLogicId(String splitLogicId) { this.splitLogicId = splitLogicId; return this; @@ -460,11 +908,18 @@ public boolean equals(Object o) { return false; } SplitConfigurationLogic splitConfigurationLogic = (SplitConfigurationLogic) o; - return Objects.equals(this.additionalCommission, splitConfigurationLogic.additionalCommission) && + return Objects.equals(this.acquiringFees, splitConfigurationLogic.acquiringFees) && + Objects.equals(this.additionalCommission, splitConfigurationLogic.additionalCommission) && + Objects.equals(this.adyenCommission, splitConfigurationLogic.adyenCommission) && + Objects.equals(this.adyenFees, splitConfigurationLogic.adyenFees) && + Objects.equals(this.adyenMarkup, splitConfigurationLogic.adyenMarkup) && Objects.equals(this.chargeback, splitConfigurationLogic.chargeback) && + Objects.equals(this.chargebackCostAllocation, splitConfigurationLogic.chargebackCostAllocation) && Objects.equals(this.commission, splitConfigurationLogic.commission) && + Objects.equals(this.interchange, splitConfigurationLogic.interchange) && Objects.equals(this.paymentFee, splitConfigurationLogic.paymentFee) && Objects.equals(this.remainder, splitConfigurationLogic.remainder) && + Objects.equals(this.schemeFee, splitConfigurationLogic.schemeFee) && Objects.equals(this.splitLogicId, splitConfigurationLogic.splitLogicId) && Objects.equals(this.surcharge, splitConfigurationLogic.surcharge) && Objects.equals(this.tip, splitConfigurationLogic.tip); @@ -472,18 +927,25 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(additionalCommission, chargeback, commission, paymentFee, remainder, splitLogicId, surcharge, tip); + return Objects.hash(acquiringFees, additionalCommission, adyenCommission, adyenFees, adyenMarkup, chargeback, chargebackCostAllocation, commission, interchange, paymentFee, remainder, schemeFee, splitLogicId, surcharge, tip); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class SplitConfigurationLogic {\n"); + sb.append(" acquiringFees: ").append(toIndentedString(acquiringFees)).append("\n"); sb.append(" additionalCommission: ").append(toIndentedString(additionalCommission)).append("\n"); + sb.append(" adyenCommission: ").append(toIndentedString(adyenCommission)).append("\n"); + sb.append(" adyenFees: ").append(toIndentedString(adyenFees)).append("\n"); + sb.append(" adyenMarkup: ").append(toIndentedString(adyenMarkup)).append("\n"); sb.append(" chargeback: ").append(toIndentedString(chargeback)).append("\n"); + sb.append(" chargebackCostAllocation: ").append(toIndentedString(chargebackCostAllocation)).append("\n"); sb.append(" commission: ").append(toIndentedString(commission)).append("\n"); + sb.append(" interchange: ").append(toIndentedString(interchange)).append("\n"); sb.append(" paymentFee: ").append(toIndentedString(paymentFee)).append("\n"); sb.append(" remainder: ").append(toIndentedString(remainder)).append("\n"); + sb.append(" schemeFee: ").append(toIndentedString(schemeFee)).append("\n"); sb.append(" splitLogicId: ").append(toIndentedString(splitLogicId)).append("\n"); sb.append(" surcharge: ").append(toIndentedString(surcharge)).append("\n"); sb.append(" tip: ").append(toIndentedString(tip)).append("\n"); diff --git a/src/main/java/com/adyen/model/management/SplitConfigurationRule.java b/src/main/java/com/adyen/model/management/SplitConfigurationRule.java index 96993bff3..2f83ef127 100644 --- a/src/main/java/com/adyen/model/management/SplitConfigurationRule.java +++ b/src/main/java/com/adyen/model/management/SplitConfigurationRule.java @@ -1,7 +1,7 @@ /* * Management API * - * The version of the OpenAPI document: 1 + * The version of the OpenAPI document: 3 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/management/Standalone.java b/src/main/java/com/adyen/model/management/Standalone.java index 94ddbfe69..2b5debece 100644 --- a/src/main/java/com/adyen/model/management/Standalone.java +++ b/src/main/java/com/adyen/model/management/Standalone.java @@ -1,7 +1,7 @@ /* * Management API * - * The version of the OpenAPI document: 1 + * The version of the OpenAPI document: 3 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/management/Store.java b/src/main/java/com/adyen/model/management/Store.java index 232b0f583..5ba5b86d6 100644 --- a/src/main/java/com/adyen/model/management/Store.java +++ b/src/main/java/com/adyen/model/management/Store.java @@ -1,7 +1,7 @@ /* * Management API * - * The version of the OpenAPI document: 1 + * The version of the OpenAPI document: 3 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -316,10 +316,10 @@ public Store phoneNumber(String phoneNumber) { } /** - * The phone number of the store, including '+' and country code. + * The phone number of the store, including '+' and country code in the [E.164](https://en.wikipedia.org/wiki/E.164) format. If passed in a different format, we convert and validate the phone number against E.164. * @return phoneNumber **/ - @ApiModelProperty(value = "The phone number of the store, including '+' and country code.") + @ApiModelProperty(value = "The phone number of the store, including '+' and country code in the [E.164](https://en.wikipedia.org/wiki/E.164) format. If passed in a different format, we convert and validate the phone number against E.164. ") @JsonProperty(JSON_PROPERTY_PHONE_NUMBER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -341,10 +341,10 @@ public Store reference(String reference) { } /** - * A reference to recognize the store by. Also known as the store code. Allowed characters: Lowercase and uppercase letters without diacritics, numbers 0 through 9, hyphen (-), and underscore (_) + * A reference to recognize the store by. Also known as the store code. Allowed characters: lowercase and uppercase letters without diacritics, numbers 0 through 9, hyphen (-), and underscore (_) * @return reference **/ - @ApiModelProperty(value = "A reference to recognize the store by. Also known as the store code. Allowed characters: Lowercase and uppercase letters without diacritics, numbers 0 through 9, hyphen (-), and underscore (_)") + @ApiModelProperty(value = "A reference to recognize the store by. Also known as the store code. Allowed characters: lowercase and uppercase letters without diacritics, numbers 0 through 9, hyphen (-), and underscore (_)") @JsonProperty(JSON_PROPERTY_REFERENCE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) diff --git a/src/main/java/com/adyen/model/management/StoreCreationRequest.java b/src/main/java/com/adyen/model/management/StoreCreationRequest.java index c64b767d5..73d309076 100644 --- a/src/main/java/com/adyen/model/management/StoreCreationRequest.java +++ b/src/main/java/com/adyen/model/management/StoreCreationRequest.java @@ -1,7 +1,7 @@ /* * Management API * - * The version of the OpenAPI document: 1 + * The version of the OpenAPI document: 3 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -162,10 +162,10 @@ public StoreCreationRequest externalReferenceId(String externalReferenceId) { } /** - * Used by certain payment methods and tax authorities to uniquely identify the store. For CNPJ in Brazil, ZIP in Australia and SIRET in France. This field is conditionally required if the store is in Brazil, Australia or France. For CNPJ the format is 00.000.000/0000-00, can be submitted as just digits, or with dots, slash & hyphen. For Australian stores ZIP an optional field used by the Zip payment method. For SIRET the format is 14 digits. + * The unique identifier of the store, used by certain payment methods and tax authorities. Accepts up to 14 digits. Required for CNPJ in Brazil, in the format 00.000.000/00git00-00 separated by dots, slashes, hyphens, or without separators. Optional for Zip in Australia and SIRET in France, required except for nonprofit organizations and incorporated associations. * @return externalReferenceId **/ - @ApiModelProperty(value = "Used by certain payment methods and tax authorities to uniquely identify the store. For CNPJ in Brazil, ZIP in Australia and SIRET in France. This field is conditionally required if the store is in Brazil, Australia or France. For CNPJ the format is 00.000.000/0000-00, can be submitted as just digits, or with dots, slash & hyphen. For Australian stores ZIP an optional field used by the Zip payment method. For SIRET the format is 14 digits.") + @ApiModelProperty(value = "The unique identifier of the store, used by certain payment methods and tax authorities. Accepts up to 14 digits. Required for CNPJ in Brazil, in the format 00.000.000/00git00-00 separated by dots, slashes, hyphens, or without separators. Optional for Zip in Australia and SIRET in France, required except for nonprofit organizations and incorporated associations. ") @JsonProperty(JSON_PROPERTY_EXTERNAL_REFERENCE_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -187,10 +187,10 @@ public StoreCreationRequest phoneNumber(String phoneNumber) { } /** - * The phone number of the store, including '+' and country code. + * The phone number of the store, including '+' and country code in the [E.164](https://en.wikipedia.org/wiki/E.164) format. If passed in a different format, we convert and validate the phone number against E.164. * @return phoneNumber **/ - @ApiModelProperty(required = true, value = "The phone number of the store, including '+' and country code.") + @ApiModelProperty(required = true, value = "The phone number of the store, including '+' and country code in the [E.164](https://en.wikipedia.org/wiki/E.164) format. If passed in a different format, we convert and validate the phone number against E.164. ") @JsonProperty(JSON_PROPERTY_PHONE_NUMBER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) diff --git a/src/main/java/com/adyen/model/management/StoreCreationWithMerchantCodeRequest.java b/src/main/java/com/adyen/model/management/StoreCreationWithMerchantCodeRequest.java index d7a4c0149..c8fefc17e 100644 --- a/src/main/java/com/adyen/model/management/StoreCreationWithMerchantCodeRequest.java +++ b/src/main/java/com/adyen/model/management/StoreCreationWithMerchantCodeRequest.java @@ -1,7 +1,7 @@ /* * Management API * - * The version of the OpenAPI document: 1 + * The version of the OpenAPI document: 3 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -166,10 +166,10 @@ public StoreCreationWithMerchantCodeRequest externalReferenceId(String externalR } /** - * Used by certain payment methods and tax authorities to uniquely identify the store. For CNPJ in Brazil, ZIP in Australia and SIRET in France. This field is conditionally required if the store is in Brazil, Australia or France. For CNPJ the format is 00.000.000/0000-00, can be submitted as just digits, or with dots, slash & hyphen. For Australian stores ZIP an optional field used by the Zip payment method. For SIRET the format is 14 digits. + * The unique identifier of the store, used by certain payment methods and tax authorities. Accepts up to 14 digits. Required for CNPJ in Brazil, in the format 00.000.000/00git00-00 separated by dots, slashes, hyphens, or without separators. Optional for Zip in Australia and SIRET in France, required except for nonprofit organizations and incorporated associations. * @return externalReferenceId **/ - @ApiModelProperty(value = "Used by certain payment methods and tax authorities to uniquely identify the store. For CNPJ in Brazil, ZIP in Australia and SIRET in France. This field is conditionally required if the store is in Brazil, Australia or France. For CNPJ the format is 00.000.000/0000-00, can be submitted as just digits, or with dots, slash & hyphen. For Australian stores ZIP an optional field used by the Zip payment method. For SIRET the format is 14 digits.") + @ApiModelProperty(value = "The unique identifier of the store, used by certain payment methods and tax authorities. Accepts up to 14 digits. Required for CNPJ in Brazil, in the format 00.000.000/00git00-00 separated by dots, slashes, hyphens, or without separators. Optional for Zip in Australia and SIRET in France, required except for nonprofit organizations and incorporated associations. ") @JsonProperty(JSON_PROPERTY_EXTERNAL_REFERENCE_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -216,10 +216,10 @@ public StoreCreationWithMerchantCodeRequest phoneNumber(String phoneNumber) { } /** - * The phone number of the store, including '+' and country code. + * The phone number of the store, including '+' and country code in the [E.164](https://en.wikipedia.org/wiki/E.164) format. If passed in a different format, we convert and validate the phone number against E.164. * @return phoneNumber **/ - @ApiModelProperty(required = true, value = "The phone number of the store, including '+' and country code.") + @ApiModelProperty(required = true, value = "The phone number of the store, including '+' and country code in the [E.164](https://en.wikipedia.org/wiki/E.164) format. If passed in a different format, we convert and validate the phone number against E.164. ") @JsonProperty(JSON_PROPERTY_PHONE_NUMBER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) diff --git a/src/main/java/com/adyen/model/management/StoreLocation.java b/src/main/java/com/adyen/model/management/StoreLocation.java index 8db8b2f6f..f139e12ef 100644 --- a/src/main/java/com/adyen/model/management/StoreLocation.java +++ b/src/main/java/com/adyen/model/management/StoreLocation.java @@ -1,7 +1,7 @@ /* * Management API * - * The version of the OpenAPI document: 1 + * The version of the OpenAPI document: 3 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/management/StoreSplitConfiguration.java b/src/main/java/com/adyen/model/management/StoreSplitConfiguration.java index ccaf52348..5ad70206e 100644 --- a/src/main/java/com/adyen/model/management/StoreSplitConfiguration.java +++ b/src/main/java/com/adyen/model/management/StoreSplitConfiguration.java @@ -1,7 +1,7 @@ /* * Management API * - * The version of the OpenAPI document: 1 + * The version of the OpenAPI document: 3 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/management/Surcharge.java b/src/main/java/com/adyen/model/management/Surcharge.java index 7ac604124..933a161eb 100644 --- a/src/main/java/com/adyen/model/management/Surcharge.java +++ b/src/main/java/com/adyen/model/management/Surcharge.java @@ -1,7 +1,7 @@ /* * Management API * - * The version of the OpenAPI document: 1 + * The version of the OpenAPI document: 3 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/management/SwishInfo.java b/src/main/java/com/adyen/model/management/SwishInfo.java index 6d240bf15..789d8fda1 100644 --- a/src/main/java/com/adyen/model/management/SwishInfo.java +++ b/src/main/java/com/adyen/model/management/SwishInfo.java @@ -1,7 +1,7 @@ /* * Management API * - * The version of the OpenAPI document: 1 + * The version of the OpenAPI document: 3 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -50,7 +50,7 @@ public SwishInfo swishNumber(String swishNumber) { * Swish number. Format: 10 digits without spaces. For example, **1231111111**. * @return swishNumber **/ - @ApiModelProperty(value = "Swish number. Format: 10 digits without spaces. For example, **1231111111**.") + @ApiModelProperty(required = true, value = "Swish number. Format: 10 digits without spaces. For example, **1231111111**.") @JsonProperty(JSON_PROPERTY_SWISH_NUMBER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) diff --git a/src/main/java/com/adyen/model/management/Terminal.java b/src/main/java/com/adyen/model/management/Terminal.java index 7993ae2fb..11e79758f 100644 --- a/src/main/java/com/adyen/model/management/Terminal.java +++ b/src/main/java/com/adyen/model/management/Terminal.java @@ -1,7 +1,7 @@ /* * Management API * - * The version of the OpenAPI document: 1 + * The version of the OpenAPI document: 3 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -16,6 +16,8 @@ import java.util.Arrays; import java.util.Map; import java.util.HashMap; +import com.adyen.model.management.TerminalAssignment; +import com.adyen.model.management.TerminalConnectivity; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -32,322 +34,91 @@ * Terminal */ @JsonPropertyOrder({ - Terminal.JSON_PROPERTY_ASSIGNED, - Terminal.JSON_PROPERTY_BLUETOOTH_IP, - Terminal.JSON_PROPERTY_BLUETOOTH_MAC, - Terminal.JSON_PROPERTY_CITY, - Terminal.JSON_PROPERTY_COMPANY_ACCOUNT, - Terminal.JSON_PROPERTY_COUNTRY_CODE, - Terminal.JSON_PROPERTY_DEVICE_MODEL, - Terminal.JSON_PROPERTY_ETHERNET_IP, - Terminal.JSON_PROPERTY_ETHERNET_MAC, + Terminal.JSON_PROPERTY_ASSIGNMENT, + Terminal.JSON_PROPERTY_CONNECTIVITY, Terminal.JSON_PROPERTY_FIRMWARE_VERSION, - Terminal.JSON_PROPERTY_ICCID, Terminal.JSON_PROPERTY_ID, - Terminal.JSON_PROPERTY_LAST_ACTIVITY_DATE_TIME, - Terminal.JSON_PROPERTY_LAST_TRANSACTION_DATE_TIME, - Terminal.JSON_PROPERTY_LINK_NEGOTIATION, - Terminal.JSON_PROPERTY_SERIAL_NUMBER, - Terminal.JSON_PROPERTY_SIM_STATUS, - Terminal.JSON_PROPERTY_STATUS, - Terminal.JSON_PROPERTY_STORE_STATUS, - Terminal.JSON_PROPERTY_WIFI_IP, - Terminal.JSON_PROPERTY_WIFI_MAC, - Terminal.JSON_PROPERTY_WIFI_SSID + Terminal.JSON_PROPERTY_LAST_ACTIVITY_AT, + Terminal.JSON_PROPERTY_LAST_TRANSACTION_AT, + Terminal.JSON_PROPERTY_MODEL, + Terminal.JSON_PROPERTY_SERIAL_NUMBER }) public class Terminal { - public static final String JSON_PROPERTY_ASSIGNED = "assigned"; - private Boolean assigned; + public static final String JSON_PROPERTY_ASSIGNMENT = "assignment"; + private TerminalAssignment assignment; - public static final String JSON_PROPERTY_BLUETOOTH_IP = "bluetoothIp"; - private String bluetoothIp; - - public static final String JSON_PROPERTY_BLUETOOTH_MAC = "bluetoothMac"; - private String bluetoothMac; - - public static final String JSON_PROPERTY_CITY = "city"; - private String city; - - public static final String JSON_PROPERTY_COMPANY_ACCOUNT = "companyAccount"; - private String companyAccount; - - public static final String JSON_PROPERTY_COUNTRY_CODE = "countryCode"; - private String countryCode; - - public static final String JSON_PROPERTY_DEVICE_MODEL = "deviceModel"; - private String deviceModel; - - public static final String JSON_PROPERTY_ETHERNET_IP = "ethernetIp"; - private String ethernetIp; - - public static final String JSON_PROPERTY_ETHERNET_MAC = "ethernetMac"; - private String ethernetMac; + public static final String JSON_PROPERTY_CONNECTIVITY = "connectivity"; + private TerminalConnectivity connectivity; public static final String JSON_PROPERTY_FIRMWARE_VERSION = "firmwareVersion"; private String firmwareVersion; - public static final String JSON_PROPERTY_ICCID = "iccid"; - private String iccid; - public static final String JSON_PROPERTY_ID = "id"; private String id; - public static final String JSON_PROPERTY_LAST_ACTIVITY_DATE_TIME = "lastActivityDateTime"; - private OffsetDateTime lastActivityDateTime; + public static final String JSON_PROPERTY_LAST_ACTIVITY_AT = "lastActivityAt"; + private OffsetDateTime lastActivityAt; - public static final String JSON_PROPERTY_LAST_TRANSACTION_DATE_TIME = "lastTransactionDateTime"; - private OffsetDateTime lastTransactionDateTime; + public static final String JSON_PROPERTY_LAST_TRANSACTION_AT = "lastTransactionAt"; + private OffsetDateTime lastTransactionAt; - public static final String JSON_PROPERTY_LINK_NEGOTIATION = "linkNegotiation"; - private String linkNegotiation; + public static final String JSON_PROPERTY_MODEL = "model"; + private String model; public static final String JSON_PROPERTY_SERIAL_NUMBER = "serialNumber"; private String serialNumber; - public static final String JSON_PROPERTY_SIM_STATUS = "simStatus"; - private String simStatus; - - public static final String JSON_PROPERTY_STATUS = "status"; - private String status; - - public static final String JSON_PROPERTY_STORE_STATUS = "storeStatus"; - private String storeStatus; - - public static final String JSON_PROPERTY_WIFI_IP = "wifiIp"; - private String wifiIp; - - public static final String JSON_PROPERTY_WIFI_MAC = "wifiMac"; - private String wifiMac; - - public static final String JSON_PROPERTY_WIFI_SSID = "wifiSsid"; - private String wifiSsid; - public Terminal() { } - public Terminal assigned(Boolean assigned) { - this.assigned = assigned; - return this; - } - - /** - * The [assignment status](https://docs.adyen.com/point-of-sale/automating-terminal-management/assign-terminals-api) of the terminal. If true, the terminal is assigned. If false, the terminal is in inventory and can't be boarded. - * @return assigned - **/ - @ApiModelProperty(value = "The [assignment status](https://docs.adyen.com/point-of-sale/automating-terminal-management/assign-terminals-api) of the terminal. If true, the terminal is assigned. If false, the terminal is in inventory and can't be boarded.") - @JsonProperty(JSON_PROPERTY_ASSIGNED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Boolean getAssigned() { - return assigned; - } - - - @JsonProperty(JSON_PROPERTY_ASSIGNED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAssigned(Boolean assigned) { - this.assigned = assigned; - } - - - public Terminal bluetoothIp(String bluetoothIp) { - this.bluetoothIp = bluetoothIp; - return this; - } - - /** - * The Bluetooth IP address of the terminal. - * @return bluetoothIp - **/ - @ApiModelProperty(value = "The Bluetooth IP address of the terminal.") - @JsonProperty(JSON_PROPERTY_BLUETOOTH_IP) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getBluetoothIp() { - return bluetoothIp; - } - - - @JsonProperty(JSON_PROPERTY_BLUETOOTH_IP) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setBluetoothIp(String bluetoothIp) { - this.bluetoothIp = bluetoothIp; - } - - - public Terminal bluetoothMac(String bluetoothMac) { - this.bluetoothMac = bluetoothMac; - return this; - } - - /** - * The Bluetooth MAC address of the terminal. - * @return bluetoothMac - **/ - @ApiModelProperty(value = "The Bluetooth MAC address of the terminal.") - @JsonProperty(JSON_PROPERTY_BLUETOOTH_MAC) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getBluetoothMac() { - return bluetoothMac; - } - - - @JsonProperty(JSON_PROPERTY_BLUETOOTH_MAC) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setBluetoothMac(String bluetoothMac) { - this.bluetoothMac = bluetoothMac; - } - - - public Terminal city(String city) { - this.city = city; - return this; - } - - /** - * The city where the terminal is located. - * @return city - **/ - @ApiModelProperty(value = "The city where the terminal is located.") - @JsonProperty(JSON_PROPERTY_CITY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getCity() { - return city; - } - - - @JsonProperty(JSON_PROPERTY_CITY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCity(String city) { - this.city = city; - } - - - public Terminal companyAccount(String companyAccount) { - this.companyAccount = companyAccount; - return this; - } - - /** - * The company account that the terminal is associated with. If this is the only account level shown in the response, the terminal is assigned to the inventory of the company account. - * @return companyAccount - **/ - @ApiModelProperty(value = "The company account that the terminal is associated with. If this is the only account level shown in the response, the terminal is assigned to the inventory of the company account.") - @JsonProperty(JSON_PROPERTY_COMPANY_ACCOUNT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getCompanyAccount() { - return companyAccount; - } - - - @JsonProperty(JSON_PROPERTY_COMPANY_ACCOUNT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCompanyAccount(String companyAccount) { - this.companyAccount = companyAccount; - } - - - public Terminal countryCode(String countryCode) { - this.countryCode = countryCode; - return this; - } - - /** - * The country code of the country where the terminal is located. - * @return countryCode - **/ - @ApiModelProperty(value = "The country code of the country where the terminal is located.") - @JsonProperty(JSON_PROPERTY_COUNTRY_CODE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getCountryCode() { - return countryCode; - } - - - @JsonProperty(JSON_PROPERTY_COUNTRY_CODE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCountryCode(String countryCode) { - this.countryCode = countryCode; - } - - - public Terminal deviceModel(String deviceModel) { - this.deviceModel = deviceModel; - return this; - } - - /** - * The model name of the terminal. - * @return deviceModel - **/ - @ApiModelProperty(value = "The model name of the terminal.") - @JsonProperty(JSON_PROPERTY_DEVICE_MODEL) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getDeviceModel() { - return deviceModel; - } - - - @JsonProperty(JSON_PROPERTY_DEVICE_MODEL) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setDeviceModel(String deviceModel) { - this.deviceModel = deviceModel; - } - - - public Terminal ethernetIp(String ethernetIp) { - this.ethernetIp = ethernetIp; + public Terminal assignment(TerminalAssignment assignment) { + this.assignment = assignment; return this; } /** - * The ethernet IP address of the terminal. - * @return ethernetIp + * Get assignment + * @return assignment **/ - @ApiModelProperty(value = "The ethernet IP address of the terminal.") - @JsonProperty(JSON_PROPERTY_ETHERNET_IP) + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_ASSIGNMENT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getEthernetIp() { - return ethernetIp; + public TerminalAssignment getAssignment() { + return assignment; } - @JsonProperty(JSON_PROPERTY_ETHERNET_IP) + @JsonProperty(JSON_PROPERTY_ASSIGNMENT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setEthernetIp(String ethernetIp) { - this.ethernetIp = ethernetIp; + public void setAssignment(TerminalAssignment assignment) { + this.assignment = assignment; } - public Terminal ethernetMac(String ethernetMac) { - this.ethernetMac = ethernetMac; + public Terminal connectivity(TerminalConnectivity connectivity) { + this.connectivity = connectivity; return this; } /** - * The ethernet MAC address of the terminal. - * @return ethernetMac + * Get connectivity + * @return connectivity **/ - @ApiModelProperty(value = "The ethernet MAC address of the terminal.") - @JsonProperty(JSON_PROPERTY_ETHERNET_MAC) + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_CONNECTIVITY) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getEthernetMac() { - return ethernetMac; + public TerminalConnectivity getConnectivity() { + return connectivity; } - @JsonProperty(JSON_PROPERTY_ETHERNET_MAC) + @JsonProperty(JSON_PROPERTY_CONNECTIVITY) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setEthernetMac(String ethernetMac) { - this.ethernetMac = ethernetMac; + public void setConnectivity(TerminalConnectivity connectivity) { + this.connectivity = connectivity; } @@ -376,31 +147,6 @@ public void setFirmwareVersion(String firmwareVersion) { } - public Terminal iccid(String iccid) { - this.iccid = iccid; - return this; - } - - /** - * The integrated circuit card identifier (ICCID) of the SIM card in the terminal. - * @return iccid - **/ - @ApiModelProperty(value = "The integrated circuit card identifier (ICCID) of the SIM card in the terminal.") - @JsonProperty(JSON_PROPERTY_ICCID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getIccid() { - return iccid; - } - - - @JsonProperty(JSON_PROPERTY_ICCID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setIccid(String iccid) { - this.iccid = iccid; - } - - public Terminal id(String id) { this.id = id; return this; @@ -426,78 +172,78 @@ public void setId(String id) { } - public Terminal lastActivityDateTime(OffsetDateTime lastActivityDateTime) { - this.lastActivityDateTime = lastActivityDateTime; + public Terminal lastActivityAt(OffsetDateTime lastActivityAt) { + this.lastActivityAt = lastActivityAt; return this; } /** * Date and time of the last activity on the terminal. Not included when the last activity was more than 14 days ago. - * @return lastActivityDateTime + * @return lastActivityAt **/ @ApiModelProperty(value = "Date and time of the last activity on the terminal. Not included when the last activity was more than 14 days ago.") - @JsonProperty(JSON_PROPERTY_LAST_ACTIVITY_DATE_TIME) + @JsonProperty(JSON_PROPERTY_LAST_ACTIVITY_AT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public OffsetDateTime getLastActivityDateTime() { - return lastActivityDateTime; + public OffsetDateTime getLastActivityAt() { + return lastActivityAt; } - @JsonProperty(JSON_PROPERTY_LAST_ACTIVITY_DATE_TIME) + @JsonProperty(JSON_PROPERTY_LAST_ACTIVITY_AT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setLastActivityDateTime(OffsetDateTime lastActivityDateTime) { - this.lastActivityDateTime = lastActivityDateTime; + public void setLastActivityAt(OffsetDateTime lastActivityAt) { + this.lastActivityAt = lastActivityAt; } - public Terminal lastTransactionDateTime(OffsetDateTime lastTransactionDateTime) { - this.lastTransactionDateTime = lastTransactionDateTime; + public Terminal lastTransactionAt(OffsetDateTime lastTransactionAt) { + this.lastTransactionAt = lastTransactionAt; return this; } /** * Date and time of the last transaction on the terminal. Not included when the last transaction was more than 14 days ago. - * @return lastTransactionDateTime + * @return lastTransactionAt **/ @ApiModelProperty(value = "Date and time of the last transaction on the terminal. Not included when the last transaction was more than 14 days ago.") - @JsonProperty(JSON_PROPERTY_LAST_TRANSACTION_DATE_TIME) + @JsonProperty(JSON_PROPERTY_LAST_TRANSACTION_AT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public OffsetDateTime getLastTransactionDateTime() { - return lastTransactionDateTime; + public OffsetDateTime getLastTransactionAt() { + return lastTransactionAt; } - @JsonProperty(JSON_PROPERTY_LAST_TRANSACTION_DATE_TIME) + @JsonProperty(JSON_PROPERTY_LAST_TRANSACTION_AT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setLastTransactionDateTime(OffsetDateTime lastTransactionDateTime) { - this.lastTransactionDateTime = lastTransactionDateTime; + public void setLastTransactionAt(OffsetDateTime lastTransactionAt) { + this.lastTransactionAt = lastTransactionAt; } - public Terminal linkNegotiation(String linkNegotiation) { - this.linkNegotiation = linkNegotiation; + public Terminal model(String model) { + this.model = model; return this; } /** - * The Ethernet link negotiation that the terminal uses: - `auto`: Auto-negotiation - `100full`: 100 Mbps full duplex - * @return linkNegotiation + * The model name of the terminal. + * @return model **/ - @ApiModelProperty(value = "The Ethernet link negotiation that the terminal uses: - `auto`: Auto-negotiation - `100full`: 100 Mbps full duplex") - @JsonProperty(JSON_PROPERTY_LINK_NEGOTIATION) + @ApiModelProperty(value = "The model name of the terminal.") + @JsonProperty(JSON_PROPERTY_MODEL) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getLinkNegotiation() { - return linkNegotiation; + public String getModel() { + return model; } - @JsonProperty(JSON_PROPERTY_LINK_NEGOTIATION) + @JsonProperty(JSON_PROPERTY_MODEL) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setLinkNegotiation(String linkNegotiation) { - this.linkNegotiation = linkNegotiation; + public void setModel(String model) { + this.model = model; } @@ -526,156 +272,6 @@ public void setSerialNumber(String serialNumber) { } - public Terminal simStatus(String simStatus) { - this.simStatus = simStatus; - return this; - } - - /** - * On a terminal that supports 3G or 4G connectivity, indicates the status of the SIM card in the terminal: ACTIVE or INVENTORY. - * @return simStatus - **/ - @ApiModelProperty(value = "On a terminal that supports 3G or 4G connectivity, indicates the status of the SIM card in the terminal: ACTIVE or INVENTORY.") - @JsonProperty(JSON_PROPERTY_SIM_STATUS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getSimStatus() { - return simStatus; - } - - - @JsonProperty(JSON_PROPERTY_SIM_STATUS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSimStatus(String simStatus) { - this.simStatus = simStatus; - } - - - public Terminal status(String status) { - this.status = status; - return this; - } - - /** - * Indicates when the terminal was last online, whether the terminal is being reassigned, or whether the terminal is turned off. If the terminal was last online more that a week ago, it is also shown as turned off. - * @return status - **/ - @ApiModelProperty(value = "Indicates when the terminal was last online, whether the terminal is being reassigned, or whether the terminal is turned off. If the terminal was last online more that a week ago, it is also shown as turned off.") - @JsonProperty(JSON_PROPERTY_STATUS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getStatus() { - return status; - } - - - @JsonProperty(JSON_PROPERTY_STATUS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setStatus(String status) { - this.status = status; - } - - - public Terminal storeStatus(String storeStatus) { - this.storeStatus = storeStatus; - return this; - } - - /** - * The status of the store that the terminal is assigned to. - * @return storeStatus - **/ - @ApiModelProperty(value = "The status of the store that the terminal is assigned to.") - @JsonProperty(JSON_PROPERTY_STORE_STATUS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getStoreStatus() { - return storeStatus; - } - - - @JsonProperty(JSON_PROPERTY_STORE_STATUS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setStoreStatus(String storeStatus) { - this.storeStatus = storeStatus; - } - - - public Terminal wifiIp(String wifiIp) { - this.wifiIp = wifiIp; - return this; - } - - /** - * The terminal's IP address in your Wi-Fi network. - * @return wifiIp - **/ - @ApiModelProperty(value = "The terminal's IP address in your Wi-Fi network.") - @JsonProperty(JSON_PROPERTY_WIFI_IP) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getWifiIp() { - return wifiIp; - } - - - @JsonProperty(JSON_PROPERTY_WIFI_IP) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setWifiIp(String wifiIp) { - this.wifiIp = wifiIp; - } - - - public Terminal wifiMac(String wifiMac) { - this.wifiMac = wifiMac; - return this; - } - - /** - * The terminal's MAC address in your Wi-Fi network. - * @return wifiMac - **/ - @ApiModelProperty(value = "The terminal's MAC address in your Wi-Fi network.") - @JsonProperty(JSON_PROPERTY_WIFI_MAC) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getWifiMac() { - return wifiMac; - } - - - @JsonProperty(JSON_PROPERTY_WIFI_MAC) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setWifiMac(String wifiMac) { - this.wifiMac = wifiMac; - } - - - public Terminal wifiSsid(String wifiSsid) { - this.wifiSsid = wifiSsid; - return this; - } - - /** - * The SSID of the Wi-Fi network that your terminal is connected to. - * @return wifiSsid - **/ - @ApiModelProperty(value = "The SSID of the Wi-Fi network that your terminal is connected to.") - @JsonProperty(JSON_PROPERTY_WIFI_SSID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getWifiSsid() { - return wifiSsid; - } - - - @JsonProperty(JSON_PROPERTY_WIFI_SSID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setWifiSsid(String wifiSsid) { - this.wifiSsid = wifiSsid; - } - - /** * Return true if this Terminal object is equal to o. */ @@ -688,61 +284,33 @@ public boolean equals(Object o) { return false; } Terminal terminal = (Terminal) o; - return Objects.equals(this.assigned, terminal.assigned) && - Objects.equals(this.bluetoothIp, terminal.bluetoothIp) && - Objects.equals(this.bluetoothMac, terminal.bluetoothMac) && - Objects.equals(this.city, terminal.city) && - Objects.equals(this.companyAccount, terminal.companyAccount) && - Objects.equals(this.countryCode, terminal.countryCode) && - Objects.equals(this.deviceModel, terminal.deviceModel) && - Objects.equals(this.ethernetIp, terminal.ethernetIp) && - Objects.equals(this.ethernetMac, terminal.ethernetMac) && + return Objects.equals(this.assignment, terminal.assignment) && + Objects.equals(this.connectivity, terminal.connectivity) && Objects.equals(this.firmwareVersion, terminal.firmwareVersion) && - Objects.equals(this.iccid, terminal.iccid) && Objects.equals(this.id, terminal.id) && - Objects.equals(this.lastActivityDateTime, terminal.lastActivityDateTime) && - Objects.equals(this.lastTransactionDateTime, terminal.lastTransactionDateTime) && - Objects.equals(this.linkNegotiation, terminal.linkNegotiation) && - Objects.equals(this.serialNumber, terminal.serialNumber) && - Objects.equals(this.simStatus, terminal.simStatus) && - Objects.equals(this.status, terminal.status) && - Objects.equals(this.storeStatus, terminal.storeStatus) && - Objects.equals(this.wifiIp, terminal.wifiIp) && - Objects.equals(this.wifiMac, terminal.wifiMac) && - Objects.equals(this.wifiSsid, terminal.wifiSsid); + Objects.equals(this.lastActivityAt, terminal.lastActivityAt) && + Objects.equals(this.lastTransactionAt, terminal.lastTransactionAt) && + Objects.equals(this.model, terminal.model) && + Objects.equals(this.serialNumber, terminal.serialNumber); } @Override public int hashCode() { - return Objects.hash(assigned, bluetoothIp, bluetoothMac, city, companyAccount, countryCode, deviceModel, ethernetIp, ethernetMac, firmwareVersion, iccid, id, lastActivityDateTime, lastTransactionDateTime, linkNegotiation, serialNumber, simStatus, status, storeStatus, wifiIp, wifiMac, wifiSsid); + return Objects.hash(assignment, connectivity, firmwareVersion, id, lastActivityAt, lastTransactionAt, model, serialNumber); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Terminal {\n"); - sb.append(" assigned: ").append(toIndentedString(assigned)).append("\n"); - sb.append(" bluetoothIp: ").append(toIndentedString(bluetoothIp)).append("\n"); - sb.append(" bluetoothMac: ").append(toIndentedString(bluetoothMac)).append("\n"); - sb.append(" city: ").append(toIndentedString(city)).append("\n"); - sb.append(" companyAccount: ").append(toIndentedString(companyAccount)).append("\n"); - sb.append(" countryCode: ").append(toIndentedString(countryCode)).append("\n"); - sb.append(" deviceModel: ").append(toIndentedString(deviceModel)).append("\n"); - sb.append(" ethernetIp: ").append(toIndentedString(ethernetIp)).append("\n"); - sb.append(" ethernetMac: ").append(toIndentedString(ethernetMac)).append("\n"); + sb.append(" assignment: ").append(toIndentedString(assignment)).append("\n"); + sb.append(" connectivity: ").append(toIndentedString(connectivity)).append("\n"); sb.append(" firmwareVersion: ").append(toIndentedString(firmwareVersion)).append("\n"); - sb.append(" iccid: ").append(toIndentedString(iccid)).append("\n"); sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" lastActivityDateTime: ").append(toIndentedString(lastActivityDateTime)).append("\n"); - sb.append(" lastTransactionDateTime: ").append(toIndentedString(lastTransactionDateTime)).append("\n"); - sb.append(" linkNegotiation: ").append(toIndentedString(linkNegotiation)).append("\n"); + sb.append(" lastActivityAt: ").append(toIndentedString(lastActivityAt)).append("\n"); + sb.append(" lastTransactionAt: ").append(toIndentedString(lastTransactionAt)).append("\n"); + sb.append(" model: ").append(toIndentedString(model)).append("\n"); sb.append(" serialNumber: ").append(toIndentedString(serialNumber)).append("\n"); - sb.append(" simStatus: ").append(toIndentedString(simStatus)).append("\n"); - sb.append(" status: ").append(toIndentedString(status)).append("\n"); - sb.append(" storeStatus: ").append(toIndentedString(storeStatus)).append("\n"); - sb.append(" wifiIp: ").append(toIndentedString(wifiIp)).append("\n"); - sb.append(" wifiMac: ").append(toIndentedString(wifiMac)).append("\n"); - sb.append(" wifiSsid: ").append(toIndentedString(wifiSsid)).append("\n"); sb.append("}"); return sb.toString(); } diff --git a/src/main/java/com/adyen/model/management/TerminalActionScheduleDetail.java b/src/main/java/com/adyen/model/management/TerminalActionScheduleDetail.java index ad42f342f..d6de630e0 100644 --- a/src/main/java/com/adyen/model/management/TerminalActionScheduleDetail.java +++ b/src/main/java/com/adyen/model/management/TerminalActionScheduleDetail.java @@ -1,7 +1,7 @@ /* * Management API * - * The version of the OpenAPI document: 1 + * The version of the OpenAPI document: 3 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/management/TerminalAssignment.java b/src/main/java/com/adyen/model/management/TerminalAssignment.java new file mode 100644 index 000000000..34dbb12cd --- /dev/null +++ b/src/main/java/com/adyen/model/management/TerminalAssignment.java @@ -0,0 +1,290 @@ +/* + * Management API + * + * The version of the OpenAPI document: 3 + * + * + * 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.adyen.model.management; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.adyen.model.management.TerminalReassignmentTarget; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.core.JsonProcessingException; + + +/** + * TerminalAssignment + */ +@JsonPropertyOrder({ + TerminalAssignment.JSON_PROPERTY_COMPANY_ID, + TerminalAssignment.JSON_PROPERTY_MERCHANT_ID, + TerminalAssignment.JSON_PROPERTY_REASSIGNMENT_TARGET, + TerminalAssignment.JSON_PROPERTY_STATUS, + TerminalAssignment.JSON_PROPERTY_STORE_ID +}) + +public class TerminalAssignment { + public static final String JSON_PROPERTY_COMPANY_ID = "companyId"; + private String companyId; + + public static final String JSON_PROPERTY_MERCHANT_ID = "merchantId"; + private String merchantId; + + public static final String JSON_PROPERTY_REASSIGNMENT_TARGET = "reassignmentTarget"; + private TerminalReassignmentTarget reassignmentTarget; + + /** + * The status of the reassignment. Possible values: * `reassignmentInProgress`: the terminal was boarded and is now scheduled to remove the configuration. Wait for the terminal to synchronize with the Adyen platform. * `deployed`: the terminal is deployed and reassigned. * `inventory`: the terminal is in inventory and cannot process transactions. + */ + public enum StatusEnum { + REASSIGNMENTINPROGRESS("reassignmentInProgress"), + + DEPLOYED("deployed"), + + INVENTORY("inventory"); + + private String value; + + StatusEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_STATUS = "status"; + private StatusEnum status; + + public static final String JSON_PROPERTY_STORE_ID = "storeId"; + private String storeId; + + public TerminalAssignment() { + } + + public TerminalAssignment companyId(String companyId) { + this.companyId = companyId; + return this; + } + + /** + * The unique identifier of the company account to which terminal is assigned. + * @return companyId + **/ + @ApiModelProperty(required = true, value = "The unique identifier of the company account to which terminal is assigned.") + @JsonProperty(JSON_PROPERTY_COMPANY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getCompanyId() { + return companyId; + } + + + @JsonProperty(JSON_PROPERTY_COMPANY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCompanyId(String companyId) { + this.companyId = companyId; + } + + + public TerminalAssignment merchantId(String merchantId) { + this.merchantId = merchantId; + return this; + } + + /** + * The unique identifier of the merchant account to which terminal is assigned. + * @return merchantId + **/ + @ApiModelProperty(value = "The unique identifier of the merchant account to which terminal is assigned.") + @JsonProperty(JSON_PROPERTY_MERCHANT_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getMerchantId() { + return merchantId; + } + + + @JsonProperty(JSON_PROPERTY_MERCHANT_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMerchantId(String merchantId) { + this.merchantId = merchantId; + } + + + public TerminalAssignment reassignmentTarget(TerminalReassignmentTarget reassignmentTarget) { + this.reassignmentTarget = reassignmentTarget; + return this; + } + + /** + * Get reassignmentTarget + * @return reassignmentTarget + **/ + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_REASSIGNMENT_TARGET) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public TerminalReassignmentTarget getReassignmentTarget() { + return reassignmentTarget; + } + + + @JsonProperty(JSON_PROPERTY_REASSIGNMENT_TARGET) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setReassignmentTarget(TerminalReassignmentTarget reassignmentTarget) { + this.reassignmentTarget = reassignmentTarget; + } + + + public TerminalAssignment status(StatusEnum status) { + this.status = status; + return this; + } + + /** + * The status of the reassignment. Possible values: * `reassignmentInProgress`: the terminal was boarded and is now scheduled to remove the configuration. Wait for the terminal to synchronize with the Adyen platform. * `deployed`: the terminal is deployed and reassigned. * `inventory`: the terminal is in inventory and cannot process transactions. + * @return status + **/ + @ApiModelProperty(required = true, value = "The status of the reassignment. Possible values: * `reassignmentInProgress`: the terminal was boarded and is now scheduled to remove the configuration. Wait for the terminal to synchronize with the Adyen platform. * `deployed`: the terminal is deployed and reassigned. * `inventory`: the terminal is in inventory and cannot process transactions. ") + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public StatusEnum getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setStatus(StatusEnum status) { + this.status = status; + } + + + public TerminalAssignment storeId(String storeId) { + this.storeId = storeId; + return this; + } + + /** + * The unique identifier of the store to which terminal is assigned. + * @return storeId + **/ + @ApiModelProperty(value = "The unique identifier of the store to which terminal is assigned.") + @JsonProperty(JSON_PROPERTY_STORE_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getStoreId() { + return storeId; + } + + + @JsonProperty(JSON_PROPERTY_STORE_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setStoreId(String storeId) { + this.storeId = storeId; + } + + + /** + * Return true if this TerminalAssignment object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TerminalAssignment terminalAssignment = (TerminalAssignment) o; + return Objects.equals(this.companyId, terminalAssignment.companyId) && + Objects.equals(this.merchantId, terminalAssignment.merchantId) && + Objects.equals(this.reassignmentTarget, terminalAssignment.reassignmentTarget) && + Objects.equals(this.status, terminalAssignment.status) && + Objects.equals(this.storeId, terminalAssignment.storeId); + } + + @Override + public int hashCode() { + return Objects.hash(companyId, merchantId, reassignmentTarget, status, storeId); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TerminalAssignment {\n"); + sb.append(" companyId: ").append(toIndentedString(companyId)).append("\n"); + sb.append(" merchantId: ").append(toIndentedString(merchantId)).append("\n"); + sb.append(" reassignmentTarget: ").append(toIndentedString(reassignmentTarget)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" storeId: ").append(toIndentedString(storeId)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +/** + * Create an instance of TerminalAssignment given an JSON string + * + * @param jsonString JSON string + * @return An instance of TerminalAssignment + * @throws JsonProcessingException if the JSON string is invalid with respect to TerminalAssignment + */ + public static TerminalAssignment fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, TerminalAssignment.class); + } +/** + * Convert an instance of TerminalAssignment to an JSON string + * + * @return JSON string + */ + public String toJson() throws JsonProcessingException { + return JSON.getMapper().writeValueAsString(this); + } +} + diff --git a/src/main/java/com/adyen/model/management/TerminalConnectivity.java b/src/main/java/com/adyen/model/management/TerminalConnectivity.java new file mode 100644 index 000000000..ba2f33a80 --- /dev/null +++ b/src/main/java/com/adyen/model/management/TerminalConnectivity.java @@ -0,0 +1,225 @@ +/* + * Management API + * + * The version of the OpenAPI document: 3 + * + * + * 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.adyen.model.management; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.adyen.model.management.TerminalConnectivityBluetooth; +import com.adyen.model.management.TerminalConnectivityCellular; +import com.adyen.model.management.TerminalConnectivityEthernet; +import com.adyen.model.management.TerminalConnectivityWifi; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.core.JsonProcessingException; + + +/** + * TerminalConnectivity + */ +@JsonPropertyOrder({ + TerminalConnectivity.JSON_PROPERTY_BLUETOOTH, + TerminalConnectivity.JSON_PROPERTY_CELLULAR, + TerminalConnectivity.JSON_PROPERTY_ETHERNET, + TerminalConnectivity.JSON_PROPERTY_WIFI +}) + +public class TerminalConnectivity { + public static final String JSON_PROPERTY_BLUETOOTH = "bluetooth"; + private TerminalConnectivityBluetooth bluetooth; + + public static final String JSON_PROPERTY_CELLULAR = "cellular"; + private TerminalConnectivityCellular cellular; + + public static final String JSON_PROPERTY_ETHERNET = "ethernet"; + private TerminalConnectivityEthernet ethernet; + + public static final String JSON_PROPERTY_WIFI = "wifi"; + private TerminalConnectivityWifi wifi; + + public TerminalConnectivity() { + } + + public TerminalConnectivity bluetooth(TerminalConnectivityBluetooth bluetooth) { + this.bluetooth = bluetooth; + return this; + } + + /** + * Get bluetooth + * @return bluetooth + **/ + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_BLUETOOTH) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public TerminalConnectivityBluetooth getBluetooth() { + return bluetooth; + } + + + @JsonProperty(JSON_PROPERTY_BLUETOOTH) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setBluetooth(TerminalConnectivityBluetooth bluetooth) { + this.bluetooth = bluetooth; + } + + + public TerminalConnectivity cellular(TerminalConnectivityCellular cellular) { + this.cellular = cellular; + return this; + } + + /** + * Get cellular + * @return cellular + **/ + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_CELLULAR) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public TerminalConnectivityCellular getCellular() { + return cellular; + } + + + @JsonProperty(JSON_PROPERTY_CELLULAR) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCellular(TerminalConnectivityCellular cellular) { + this.cellular = cellular; + } + + + public TerminalConnectivity ethernet(TerminalConnectivityEthernet ethernet) { + this.ethernet = ethernet; + return this; + } + + /** + * Get ethernet + * @return ethernet + **/ + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_ETHERNET) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public TerminalConnectivityEthernet getEthernet() { + return ethernet; + } + + + @JsonProperty(JSON_PROPERTY_ETHERNET) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEthernet(TerminalConnectivityEthernet ethernet) { + this.ethernet = ethernet; + } + + + public TerminalConnectivity wifi(TerminalConnectivityWifi wifi) { + this.wifi = wifi; + return this; + } + + /** + * Get wifi + * @return wifi + **/ + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_WIFI) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public TerminalConnectivityWifi getWifi() { + return wifi; + } + + + @JsonProperty(JSON_PROPERTY_WIFI) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setWifi(TerminalConnectivityWifi wifi) { + this.wifi = wifi; + } + + + /** + * Return true if this TerminalConnectivity object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TerminalConnectivity terminalConnectivity = (TerminalConnectivity) o; + return Objects.equals(this.bluetooth, terminalConnectivity.bluetooth) && + Objects.equals(this.cellular, terminalConnectivity.cellular) && + Objects.equals(this.ethernet, terminalConnectivity.ethernet) && + Objects.equals(this.wifi, terminalConnectivity.wifi); + } + + @Override + public int hashCode() { + return Objects.hash(bluetooth, cellular, ethernet, wifi); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TerminalConnectivity {\n"); + sb.append(" bluetooth: ").append(toIndentedString(bluetooth)).append("\n"); + sb.append(" cellular: ").append(toIndentedString(cellular)).append("\n"); + sb.append(" ethernet: ").append(toIndentedString(ethernet)).append("\n"); + sb.append(" wifi: ").append(toIndentedString(wifi)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +/** + * Create an instance of TerminalConnectivity given an JSON string + * + * @param jsonString JSON string + * @return An instance of TerminalConnectivity + * @throws JsonProcessingException if the JSON string is invalid with respect to TerminalConnectivity + */ + public static TerminalConnectivity fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, TerminalConnectivity.class); + } +/** + * Convert an instance of TerminalConnectivity to an JSON string + * + * @return JSON string + */ + public String toJson() throws JsonProcessingException { + return JSON.getMapper().writeValueAsString(this); + } +} + diff --git a/src/main/java/com/adyen/model/management/TerminalConnectivityBluetooth.java b/src/main/java/com/adyen/model/management/TerminalConnectivityBluetooth.java new file mode 100644 index 000000000..ac5ff6157 --- /dev/null +++ b/src/main/java/com/adyen/model/management/TerminalConnectivityBluetooth.java @@ -0,0 +1,159 @@ +/* + * Management API + * + * The version of the OpenAPI document: 3 + * + * + * 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.adyen.model.management; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.core.JsonProcessingException; + + +/** + * TerminalConnectivityBluetooth + */ +@JsonPropertyOrder({ + TerminalConnectivityBluetooth.JSON_PROPERTY_IP_ADDRESS, + TerminalConnectivityBluetooth.JSON_PROPERTY_MAC_ADDRESS +}) + +public class TerminalConnectivityBluetooth { + public static final String JSON_PROPERTY_IP_ADDRESS = "ipAddress"; + private String ipAddress; + + public static final String JSON_PROPERTY_MAC_ADDRESS = "macAddress"; + private String macAddress; + + public TerminalConnectivityBluetooth() { + } + + public TerminalConnectivityBluetooth ipAddress(String ipAddress) { + this.ipAddress = ipAddress; + return this; + } + + /** + * The terminal's Bluetooth IP address. + * @return ipAddress + **/ + @ApiModelProperty(value = "The terminal's Bluetooth IP address.") + @JsonProperty(JSON_PROPERTY_IP_ADDRESS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getIpAddress() { + return ipAddress; + } + + + @JsonProperty(JSON_PROPERTY_IP_ADDRESS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setIpAddress(String ipAddress) { + this.ipAddress = ipAddress; + } + + + public TerminalConnectivityBluetooth macAddress(String macAddress) { + this.macAddress = macAddress; + return this; + } + + /** + * The terminal's Bluetooth MAC address. + * @return macAddress + **/ + @ApiModelProperty(value = "The terminal's Bluetooth MAC address.") + @JsonProperty(JSON_PROPERTY_MAC_ADDRESS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getMacAddress() { + return macAddress; + } + + + @JsonProperty(JSON_PROPERTY_MAC_ADDRESS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMacAddress(String macAddress) { + this.macAddress = macAddress; + } + + + /** + * Return true if this TerminalConnectivityBluetooth object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TerminalConnectivityBluetooth terminalConnectivityBluetooth = (TerminalConnectivityBluetooth) o; + return Objects.equals(this.ipAddress, terminalConnectivityBluetooth.ipAddress) && + Objects.equals(this.macAddress, terminalConnectivityBluetooth.macAddress); + } + + @Override + public int hashCode() { + return Objects.hash(ipAddress, macAddress); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TerminalConnectivityBluetooth {\n"); + sb.append(" ipAddress: ").append(toIndentedString(ipAddress)).append("\n"); + sb.append(" macAddress: ").append(toIndentedString(macAddress)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +/** + * Create an instance of TerminalConnectivityBluetooth given an JSON string + * + * @param jsonString JSON string + * @return An instance of TerminalConnectivityBluetooth + * @throws JsonProcessingException if the JSON string is invalid with respect to TerminalConnectivityBluetooth + */ + public static TerminalConnectivityBluetooth fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, TerminalConnectivityBluetooth.class); + } +/** + * Convert an instance of TerminalConnectivityBluetooth to an JSON string + * + * @return JSON string + */ + public String toJson() throws JsonProcessingException { + return JSON.getMapper().writeValueAsString(this); + } +} + diff --git a/src/main/java/com/adyen/model/management/TerminalConnectivityCellular.java b/src/main/java/com/adyen/model/management/TerminalConnectivityCellular.java new file mode 100644 index 000000000..26eb043ff --- /dev/null +++ b/src/main/java/com/adyen/model/management/TerminalConnectivityCellular.java @@ -0,0 +1,200 @@ +/* + * Management API + * + * The version of the OpenAPI document: 3 + * + * + * 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.adyen.model.management; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.core.JsonProcessingException; + + +/** + * TerminalConnectivityCellular + */ +@JsonPropertyOrder({ + TerminalConnectivityCellular.JSON_PROPERTY_ICCID, + TerminalConnectivityCellular.JSON_PROPERTY_STATUS +}) + +public class TerminalConnectivityCellular { + public static final String JSON_PROPERTY_ICCID = "iccid"; + private String iccid; + + /** + * On a terminal that supports 3G or 4G connectivity, indicates the status of the SIM card in the terminal. + */ + public enum StatusEnum { + ACTIVATED("activated"), + + DEACTIVATED("deactivated"), + + DEPRECATED("deprecated"), + + INVENTORY("inventory"), + + READYFORACTIVATION("readyForActivation"); + + private String value; + + StatusEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_STATUS = "status"; + private StatusEnum status; + + public TerminalConnectivityCellular() { + } + + public TerminalConnectivityCellular iccid(String iccid) { + this.iccid = iccid; + return this; + } + + /** + * The integrated circuit card identifier (ICCID) of the SIM card in the terminal. + * @return iccid + **/ + @ApiModelProperty(value = "The integrated circuit card identifier (ICCID) of the SIM card in the terminal.") + @JsonProperty(JSON_PROPERTY_ICCID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getIccid() { + return iccid; + } + + + @JsonProperty(JSON_PROPERTY_ICCID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setIccid(String iccid) { + this.iccid = iccid; + } + + + public TerminalConnectivityCellular status(StatusEnum status) { + this.status = status; + return this; + } + + /** + * On a terminal that supports 3G or 4G connectivity, indicates the status of the SIM card in the terminal. + * @return status + **/ + @ApiModelProperty(value = "On a terminal that supports 3G or 4G connectivity, indicates the status of the SIM card in the terminal.") + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public StatusEnum getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setStatus(StatusEnum status) { + this.status = status; + } + + + /** + * Return true if this TerminalConnectivityCellular object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TerminalConnectivityCellular terminalConnectivityCellular = (TerminalConnectivityCellular) o; + return Objects.equals(this.iccid, terminalConnectivityCellular.iccid) && + Objects.equals(this.status, terminalConnectivityCellular.status); + } + + @Override + public int hashCode() { + return Objects.hash(iccid, status); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TerminalConnectivityCellular {\n"); + sb.append(" iccid: ").append(toIndentedString(iccid)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +/** + * Create an instance of TerminalConnectivityCellular given an JSON string + * + * @param jsonString JSON string + * @return An instance of TerminalConnectivityCellular + * @throws JsonProcessingException if the JSON string is invalid with respect to TerminalConnectivityCellular + */ + public static TerminalConnectivityCellular fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, TerminalConnectivityCellular.class); + } +/** + * Convert an instance of TerminalConnectivityCellular to an JSON string + * + * @return JSON string + */ + public String toJson() throws JsonProcessingException { + return JSON.getMapper().writeValueAsString(this); + } +} + diff --git a/src/main/java/com/adyen/model/management/TerminalConnectivityEthernet.java b/src/main/java/com/adyen/model/management/TerminalConnectivityEthernet.java new file mode 100644 index 000000000..733cdb957 --- /dev/null +++ b/src/main/java/com/adyen/model/management/TerminalConnectivityEthernet.java @@ -0,0 +1,190 @@ +/* + * Management API + * + * The version of the OpenAPI document: 3 + * + * + * 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.adyen.model.management; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.core.JsonProcessingException; + + +/** + * TerminalConnectivityEthernet + */ +@JsonPropertyOrder({ + TerminalConnectivityEthernet.JSON_PROPERTY_IP_ADDRESS, + TerminalConnectivityEthernet.JSON_PROPERTY_LINK_NEGOTIATION, + TerminalConnectivityEthernet.JSON_PROPERTY_MAC_ADDRESS +}) + +public class TerminalConnectivityEthernet { + public static final String JSON_PROPERTY_IP_ADDRESS = "ipAddress"; + private String ipAddress; + + public static final String JSON_PROPERTY_LINK_NEGOTIATION = "linkNegotiation"; + private String linkNegotiation; + + public static final String JSON_PROPERTY_MAC_ADDRESS = "macAddress"; + private String macAddress; + + public TerminalConnectivityEthernet() { + } + + public TerminalConnectivityEthernet ipAddress(String ipAddress) { + this.ipAddress = ipAddress; + return this; + } + + /** + * The terminal's ethernet IP address. + * @return ipAddress + **/ + @ApiModelProperty(value = "The terminal's ethernet IP address.") + @JsonProperty(JSON_PROPERTY_IP_ADDRESS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getIpAddress() { + return ipAddress; + } + + + @JsonProperty(JSON_PROPERTY_IP_ADDRESS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setIpAddress(String ipAddress) { + this.ipAddress = ipAddress; + } + + + public TerminalConnectivityEthernet linkNegotiation(String linkNegotiation) { + this.linkNegotiation = linkNegotiation; + return this; + } + + /** + * The ethernet link negotiation that the terminal uses. + * @return linkNegotiation + **/ + @ApiModelProperty(value = "The ethernet link negotiation that the terminal uses.") + @JsonProperty(JSON_PROPERTY_LINK_NEGOTIATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getLinkNegotiation() { + return linkNegotiation; + } + + + @JsonProperty(JSON_PROPERTY_LINK_NEGOTIATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setLinkNegotiation(String linkNegotiation) { + this.linkNegotiation = linkNegotiation; + } + + + public TerminalConnectivityEthernet macAddress(String macAddress) { + this.macAddress = macAddress; + return this; + } + + /** + * The terminal's ethernet MAC address. + * @return macAddress + **/ + @ApiModelProperty(value = "The terminal's ethernet MAC address.") + @JsonProperty(JSON_PROPERTY_MAC_ADDRESS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getMacAddress() { + return macAddress; + } + + + @JsonProperty(JSON_PROPERTY_MAC_ADDRESS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMacAddress(String macAddress) { + this.macAddress = macAddress; + } + + + /** + * Return true if this TerminalConnectivityEthernet object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TerminalConnectivityEthernet terminalConnectivityEthernet = (TerminalConnectivityEthernet) o; + return Objects.equals(this.ipAddress, terminalConnectivityEthernet.ipAddress) && + Objects.equals(this.linkNegotiation, terminalConnectivityEthernet.linkNegotiation) && + Objects.equals(this.macAddress, terminalConnectivityEthernet.macAddress); + } + + @Override + public int hashCode() { + return Objects.hash(ipAddress, linkNegotiation, macAddress); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TerminalConnectivityEthernet {\n"); + sb.append(" ipAddress: ").append(toIndentedString(ipAddress)).append("\n"); + sb.append(" linkNegotiation: ").append(toIndentedString(linkNegotiation)).append("\n"); + sb.append(" macAddress: ").append(toIndentedString(macAddress)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +/** + * Create an instance of TerminalConnectivityEthernet given an JSON string + * + * @param jsonString JSON string + * @return An instance of TerminalConnectivityEthernet + * @throws JsonProcessingException if the JSON string is invalid with respect to TerminalConnectivityEthernet + */ + public static TerminalConnectivityEthernet fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, TerminalConnectivityEthernet.class); + } +/** + * Convert an instance of TerminalConnectivityEthernet to an JSON string + * + * @return JSON string + */ + public String toJson() throws JsonProcessingException { + return JSON.getMapper().writeValueAsString(this); + } +} + diff --git a/src/main/java/com/adyen/model/management/TerminalConnectivityWifi.java b/src/main/java/com/adyen/model/management/TerminalConnectivityWifi.java new file mode 100644 index 000000000..893ab3991 --- /dev/null +++ b/src/main/java/com/adyen/model/management/TerminalConnectivityWifi.java @@ -0,0 +1,190 @@ +/* + * Management API + * + * The version of the OpenAPI document: 3 + * + * + * 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.adyen.model.management; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.core.JsonProcessingException; + + +/** + * TerminalConnectivityWifi + */ +@JsonPropertyOrder({ + TerminalConnectivityWifi.JSON_PROPERTY_IP_ADDRESS, + TerminalConnectivityWifi.JSON_PROPERTY_MAC_ADDRESS, + TerminalConnectivityWifi.JSON_PROPERTY_SSID +}) + +public class TerminalConnectivityWifi { + public static final String JSON_PROPERTY_IP_ADDRESS = "ipAddress"; + private String ipAddress; + + public static final String JSON_PROPERTY_MAC_ADDRESS = "macAddress"; + private String macAddress; + + public static final String JSON_PROPERTY_SSID = "ssid"; + private String ssid; + + public TerminalConnectivityWifi() { + } + + public TerminalConnectivityWifi ipAddress(String ipAddress) { + this.ipAddress = ipAddress; + return this; + } + + /** + * The terminal's IP address in the Wi-Fi network. + * @return ipAddress + **/ + @ApiModelProperty(value = "The terminal's IP address in the Wi-Fi network.") + @JsonProperty(JSON_PROPERTY_IP_ADDRESS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getIpAddress() { + return ipAddress; + } + + + @JsonProperty(JSON_PROPERTY_IP_ADDRESS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setIpAddress(String ipAddress) { + this.ipAddress = ipAddress; + } + + + public TerminalConnectivityWifi macAddress(String macAddress) { + this.macAddress = macAddress; + return this; + } + + /** + * The terminal's MAC address in the Wi-Fi network. + * @return macAddress + **/ + @ApiModelProperty(value = "The terminal's MAC address in the Wi-Fi network.") + @JsonProperty(JSON_PROPERTY_MAC_ADDRESS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getMacAddress() { + return macAddress; + } + + + @JsonProperty(JSON_PROPERTY_MAC_ADDRESS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMacAddress(String macAddress) { + this.macAddress = macAddress; + } + + + public TerminalConnectivityWifi ssid(String ssid) { + this.ssid = ssid; + return this; + } + + /** + * The SSID of the Wi-Fi network that the terminal is connected to. + * @return ssid + **/ + @ApiModelProperty(value = "The SSID of the Wi-Fi network that the terminal is connected to.") + @JsonProperty(JSON_PROPERTY_SSID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getSsid() { + return ssid; + } + + + @JsonProperty(JSON_PROPERTY_SSID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSsid(String ssid) { + this.ssid = ssid; + } + + + /** + * Return true if this TerminalConnectivityWifi object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TerminalConnectivityWifi terminalConnectivityWifi = (TerminalConnectivityWifi) o; + return Objects.equals(this.ipAddress, terminalConnectivityWifi.ipAddress) && + Objects.equals(this.macAddress, terminalConnectivityWifi.macAddress) && + Objects.equals(this.ssid, terminalConnectivityWifi.ssid); + } + + @Override + public int hashCode() { + return Objects.hash(ipAddress, macAddress, ssid); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TerminalConnectivityWifi {\n"); + sb.append(" ipAddress: ").append(toIndentedString(ipAddress)).append("\n"); + sb.append(" macAddress: ").append(toIndentedString(macAddress)).append("\n"); + sb.append(" ssid: ").append(toIndentedString(ssid)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +/** + * Create an instance of TerminalConnectivityWifi given an JSON string + * + * @param jsonString JSON string + * @return An instance of TerminalConnectivityWifi + * @throws JsonProcessingException if the JSON string is invalid with respect to TerminalConnectivityWifi + */ + public static TerminalConnectivityWifi fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, TerminalConnectivityWifi.class); + } +/** + * Convert an instance of TerminalConnectivityWifi to an JSON string + * + * @return JSON string + */ + public String toJson() throws JsonProcessingException { + return JSON.getMapper().writeValueAsString(this); + } +} + diff --git a/src/main/java/com/adyen/model/management/TerminalModelsResponse.java b/src/main/java/com/adyen/model/management/TerminalModelsResponse.java index 33397b75c..59f2ee220 100644 --- a/src/main/java/com/adyen/model/management/TerminalModelsResponse.java +++ b/src/main/java/com/adyen/model/management/TerminalModelsResponse.java @@ -1,7 +1,7 @@ /* * Management API * - * The version of the OpenAPI document: 1 + * The version of the OpenAPI document: 3 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/management/TerminalOrder.java b/src/main/java/com/adyen/model/management/TerminalOrder.java index db5767370..6992a89ad 100644 --- a/src/main/java/com/adyen/model/management/TerminalOrder.java +++ b/src/main/java/com/adyen/model/management/TerminalOrder.java @@ -1,7 +1,7 @@ /* * Management API * - * The version of the OpenAPI document: 1 + * The version of the OpenAPI document: 3 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/management/TerminalOrderRequest.java b/src/main/java/com/adyen/model/management/TerminalOrderRequest.java index fe66cf37a..93943d7eb 100644 --- a/src/main/java/com/adyen/model/management/TerminalOrderRequest.java +++ b/src/main/java/com/adyen/model/management/TerminalOrderRequest.java @@ -1,7 +1,7 @@ /* * Management API * - * The version of the OpenAPI document: 1 + * The version of the OpenAPI document: 3 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/management/TerminalOrdersResponse.java b/src/main/java/com/adyen/model/management/TerminalOrdersResponse.java index 804b598b9..3030a8b34 100644 --- a/src/main/java/com/adyen/model/management/TerminalOrdersResponse.java +++ b/src/main/java/com/adyen/model/management/TerminalOrdersResponse.java @@ -1,7 +1,7 @@ /* * Management API * - * The version of the OpenAPI document: 1 + * The version of the OpenAPI document: 3 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/management/TerminalProduct.java b/src/main/java/com/adyen/model/management/TerminalProduct.java index 050cb7cd7..4840d37a4 100644 --- a/src/main/java/com/adyen/model/management/TerminalProduct.java +++ b/src/main/java/com/adyen/model/management/TerminalProduct.java @@ -1,7 +1,7 @@ /* * Management API * - * The version of the OpenAPI document: 1 + * The version of the OpenAPI document: 3 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/management/TerminalProductPrice.java b/src/main/java/com/adyen/model/management/TerminalProductPrice.java index 6f33b1e1d..0609ede0b 100644 --- a/src/main/java/com/adyen/model/management/TerminalProductPrice.java +++ b/src/main/java/com/adyen/model/management/TerminalProductPrice.java @@ -1,7 +1,7 @@ /* * Management API * - * The version of the OpenAPI document: 1 + * The version of the OpenAPI document: 3 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/management/TerminalProductsResponse.java b/src/main/java/com/adyen/model/management/TerminalProductsResponse.java index 9bcb3e9a9..c07eec208 100644 --- a/src/main/java/com/adyen/model/management/TerminalProductsResponse.java +++ b/src/main/java/com/adyen/model/management/TerminalProductsResponse.java @@ -1,7 +1,7 @@ /* * Management API * - * The version of the OpenAPI document: 1 + * The version of the OpenAPI document: 3 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/management/TerminalReassignmentRequest.java b/src/main/java/com/adyen/model/management/TerminalReassignmentRequest.java new file mode 100644 index 000000000..3b088495c --- /dev/null +++ b/src/main/java/com/adyen/model/management/TerminalReassignmentRequest.java @@ -0,0 +1,221 @@ +/* + * Management API + * + * The version of the OpenAPI document: 3 + * + * + * 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.adyen.model.management; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.core.JsonProcessingException; + + +/** + * TerminalReassignmentRequest + */ +@JsonPropertyOrder({ + TerminalReassignmentRequest.JSON_PROPERTY_COMPANY_ID, + TerminalReassignmentRequest.JSON_PROPERTY_INVENTORY, + TerminalReassignmentRequest.JSON_PROPERTY_MERCHANT_ID, + TerminalReassignmentRequest.JSON_PROPERTY_STORE_ID +}) + +public class TerminalReassignmentRequest { + public static final String JSON_PROPERTY_COMPANY_ID = "companyId"; + private String companyId; + + public static final String JSON_PROPERTY_INVENTORY = "inventory"; + private Boolean inventory; + + public static final String JSON_PROPERTY_MERCHANT_ID = "merchantId"; + private String merchantId; + + public static final String JSON_PROPERTY_STORE_ID = "storeId"; + private String storeId; + + public TerminalReassignmentRequest() { + } + + public TerminalReassignmentRequest companyId(String companyId) { + this.companyId = companyId; + return this; + } + + /** + * The unique identifier of the company account to which the terminal is reassigned. + * @return companyId + **/ + @ApiModelProperty(value = "The unique identifier of the company account to which the terminal is reassigned.") + @JsonProperty(JSON_PROPERTY_COMPANY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getCompanyId() { + return companyId; + } + + + @JsonProperty(JSON_PROPERTY_COMPANY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCompanyId(String companyId) { + this.companyId = companyId; + } + + + public TerminalReassignmentRequest inventory(Boolean inventory) { + this.inventory = inventory; + return this; + } + + /** + * Must be specified when reassigning terminals to a merchant account: - If set to **true**, reassigns terminals to the inventory of the merchant account and the terminals cannot process transactions. - If set to **false**, reassigns terminals directly to the merchant account and the terminals can process transactions. + * @return inventory + **/ + @ApiModelProperty(value = "Must be specified when reassigning terminals to a merchant account: - If set to **true**, reassigns terminals to the inventory of the merchant account and the terminals cannot process transactions. - If set to **false**, reassigns terminals directly to the merchant account and the terminals can process transactions.") + @JsonProperty(JSON_PROPERTY_INVENTORY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getInventory() { + return inventory; + } + + + @JsonProperty(JSON_PROPERTY_INVENTORY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setInventory(Boolean inventory) { + this.inventory = inventory; + } + + + public TerminalReassignmentRequest merchantId(String merchantId) { + this.merchantId = merchantId; + return this; + } + + /** + * The unique identifier of the merchant account to which the terminal is reassigned. When reassigning terminals to a merchant account, you must specify the `inventory` field. + * @return merchantId + **/ + @ApiModelProperty(value = "The unique identifier of the merchant account to which the terminal is reassigned. When reassigning terminals to a merchant account, you must specify the `inventory` field.") + @JsonProperty(JSON_PROPERTY_MERCHANT_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getMerchantId() { + return merchantId; + } + + + @JsonProperty(JSON_PROPERTY_MERCHANT_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMerchantId(String merchantId) { + this.merchantId = merchantId; + } + + + public TerminalReassignmentRequest storeId(String storeId) { + this.storeId = storeId; + return this; + } + + /** + * The unique identifier of the store to which the terminal is reassigned. + * @return storeId + **/ + @ApiModelProperty(value = "The unique identifier of the store to which the terminal is reassigned.") + @JsonProperty(JSON_PROPERTY_STORE_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getStoreId() { + return storeId; + } + + + @JsonProperty(JSON_PROPERTY_STORE_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setStoreId(String storeId) { + this.storeId = storeId; + } + + + /** + * Return true if this TerminalReassignmentRequest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TerminalReassignmentRequest terminalReassignmentRequest = (TerminalReassignmentRequest) o; + return Objects.equals(this.companyId, terminalReassignmentRequest.companyId) && + Objects.equals(this.inventory, terminalReassignmentRequest.inventory) && + Objects.equals(this.merchantId, terminalReassignmentRequest.merchantId) && + Objects.equals(this.storeId, terminalReassignmentRequest.storeId); + } + + @Override + public int hashCode() { + return Objects.hash(companyId, inventory, merchantId, storeId); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TerminalReassignmentRequest {\n"); + sb.append(" companyId: ").append(toIndentedString(companyId)).append("\n"); + sb.append(" inventory: ").append(toIndentedString(inventory)).append("\n"); + sb.append(" merchantId: ").append(toIndentedString(merchantId)).append("\n"); + sb.append(" storeId: ").append(toIndentedString(storeId)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +/** + * Create an instance of TerminalReassignmentRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of TerminalReassignmentRequest + * @throws JsonProcessingException if the JSON string is invalid with respect to TerminalReassignmentRequest + */ + public static TerminalReassignmentRequest fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, TerminalReassignmentRequest.class); + } +/** + * Convert an instance of TerminalReassignmentRequest to an JSON string + * + * @return JSON string + */ + public String toJson() throws JsonProcessingException { + return JSON.getMapper().writeValueAsString(this); + } +} + diff --git a/src/main/java/com/adyen/model/management/TerminalReassignmentTarget.java b/src/main/java/com/adyen/model/management/TerminalReassignmentTarget.java new file mode 100644 index 000000000..e0bdd6e96 --- /dev/null +++ b/src/main/java/com/adyen/model/management/TerminalReassignmentTarget.java @@ -0,0 +1,221 @@ +/* + * Management API + * + * The version of the OpenAPI document: 3 + * + * + * 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.adyen.model.management; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.core.JsonProcessingException; + + +/** + * TerminalReassignmentTarget + */ +@JsonPropertyOrder({ + TerminalReassignmentTarget.JSON_PROPERTY_COMPANY_ID, + TerminalReassignmentTarget.JSON_PROPERTY_INVENTORY, + TerminalReassignmentTarget.JSON_PROPERTY_MERCHANT_ID, + TerminalReassignmentTarget.JSON_PROPERTY_STORE_ID +}) + +public class TerminalReassignmentTarget { + public static final String JSON_PROPERTY_COMPANY_ID = "companyId"; + private String companyId; + + public static final String JSON_PROPERTY_INVENTORY = "inventory"; + private Boolean inventory; + + public static final String JSON_PROPERTY_MERCHANT_ID = "merchantId"; + private String merchantId; + + public static final String JSON_PROPERTY_STORE_ID = "storeId"; + private String storeId; + + public TerminalReassignmentTarget() { + } + + public TerminalReassignmentTarget companyId(String companyId) { + this.companyId = companyId; + return this; + } + + /** + * The unique identifier of the company account to which the terminal is reassigned. + * @return companyId + **/ + @ApiModelProperty(value = "The unique identifier of the company account to which the terminal is reassigned.") + @JsonProperty(JSON_PROPERTY_COMPANY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getCompanyId() { + return companyId; + } + + + @JsonProperty(JSON_PROPERTY_COMPANY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCompanyId(String companyId) { + this.companyId = companyId; + } + + + public TerminalReassignmentTarget inventory(Boolean inventory) { + this.inventory = inventory; + return this; + } + + /** + * Indicates if the terminal is reassigned to the inventory of the merchant account. - If **true**, the terminal is in the inventory of the merchant account and cannot process transactions. - If **false**, the terminal is reassigned directly to the merchant account and can process transactions. + * @return inventory + **/ + @ApiModelProperty(required = true, value = "Indicates if the terminal is reassigned to the inventory of the merchant account. - If **true**, the terminal is in the inventory of the merchant account and cannot process transactions. - If **false**, the terminal is reassigned directly to the merchant account and can process transactions.") + @JsonProperty(JSON_PROPERTY_INVENTORY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getInventory() { + return inventory; + } + + + @JsonProperty(JSON_PROPERTY_INVENTORY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setInventory(Boolean inventory) { + this.inventory = inventory; + } + + + public TerminalReassignmentTarget merchantId(String merchantId) { + this.merchantId = merchantId; + return this; + } + + /** + * The unique identifier of the merchant account to which the terminal is reassigned. + * @return merchantId + **/ + @ApiModelProperty(value = "The unique identifier of the merchant account to which the terminal is reassigned.") + @JsonProperty(JSON_PROPERTY_MERCHANT_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getMerchantId() { + return merchantId; + } + + + @JsonProperty(JSON_PROPERTY_MERCHANT_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMerchantId(String merchantId) { + this.merchantId = merchantId; + } + + + public TerminalReassignmentTarget storeId(String storeId) { + this.storeId = storeId; + return this; + } + + /** + * The unique identifier of the store to which the terminal is reassigned. + * @return storeId + **/ + @ApiModelProperty(value = "The unique identifier of the store to which the terminal is reassigned.") + @JsonProperty(JSON_PROPERTY_STORE_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getStoreId() { + return storeId; + } + + + @JsonProperty(JSON_PROPERTY_STORE_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setStoreId(String storeId) { + this.storeId = storeId; + } + + + /** + * Return true if this TerminalReassignmentTarget object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TerminalReassignmentTarget terminalReassignmentTarget = (TerminalReassignmentTarget) o; + return Objects.equals(this.companyId, terminalReassignmentTarget.companyId) && + Objects.equals(this.inventory, terminalReassignmentTarget.inventory) && + Objects.equals(this.merchantId, terminalReassignmentTarget.merchantId) && + Objects.equals(this.storeId, terminalReassignmentTarget.storeId); + } + + @Override + public int hashCode() { + return Objects.hash(companyId, inventory, merchantId, storeId); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TerminalReassignmentTarget {\n"); + sb.append(" companyId: ").append(toIndentedString(companyId)).append("\n"); + sb.append(" inventory: ").append(toIndentedString(inventory)).append("\n"); + sb.append(" merchantId: ").append(toIndentedString(merchantId)).append("\n"); + sb.append(" storeId: ").append(toIndentedString(storeId)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +/** + * Create an instance of TerminalReassignmentTarget given an JSON string + * + * @param jsonString JSON string + * @return An instance of TerminalReassignmentTarget + * @throws JsonProcessingException if the JSON string is invalid with respect to TerminalReassignmentTarget + */ + public static TerminalReassignmentTarget fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, TerminalReassignmentTarget.class); + } +/** + * Convert an instance of TerminalReassignmentTarget to an JSON string + * + * @return JSON string + */ + public String toJson() throws JsonProcessingException { + return JSON.getMapper().writeValueAsString(this); + } +} + diff --git a/src/main/java/com/adyen/model/management/TerminalSettings.java b/src/main/java/com/adyen/model/management/TerminalSettings.java index ff5ead2cd..ff13d6da1 100644 --- a/src/main/java/com/adyen/model/management/TerminalSettings.java +++ b/src/main/java/com/adyen/model/management/TerminalSettings.java @@ -1,7 +1,7 @@ /* * Management API * - * The version of the OpenAPI document: 1 + * The version of the OpenAPI document: 3 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -20,6 +20,7 @@ import com.adyen.model.management.Connectivity; import com.adyen.model.management.Gratuity; import com.adyen.model.management.Hardware; +import com.adyen.model.management.Localization; import com.adyen.model.management.Nexo; import com.adyen.model.management.OfflineProcessing; import com.adyen.model.management.Opi; @@ -54,6 +55,7 @@ TerminalSettings.JSON_PROPERTY_CONNECTIVITY, TerminalSettings.JSON_PROPERTY_GRATUITIES, TerminalSettings.JSON_PROPERTY_HARDWARE, + TerminalSettings.JSON_PROPERTY_LOCALIZATION, TerminalSettings.JSON_PROPERTY_NEXO, TerminalSettings.JSON_PROPERTY_OFFLINE_PROCESSING, TerminalSettings.JSON_PROPERTY_OPI, @@ -82,6 +84,9 @@ public class TerminalSettings { public static final String JSON_PROPERTY_HARDWARE = "hardware"; private Hardware hardware; + public static final String JSON_PROPERTY_LOCALIZATION = "localization"; + private Localization localization; + public static final String JSON_PROPERTY_NEXO = "nexo"; private Nexo nexo; @@ -232,6 +237,31 @@ public void setHardware(Hardware hardware) { } + public TerminalSettings localization(Localization localization) { + this.localization = localization; + return this; + } + + /** + * Get localization + * @return localization + **/ + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_LOCALIZATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Localization getLocalization() { + return localization; + } + + + @JsonProperty(JSON_PROPERTY_LOCALIZATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setLocalization(Localization localization) { + this.localization = localization; + } + + public TerminalSettings nexo(Nexo nexo) { this.nexo = nexo; return this; @@ -573,6 +603,7 @@ public boolean equals(Object o) { Objects.equals(this.connectivity, terminalSettings.connectivity) && Objects.equals(this.gratuities, terminalSettings.gratuities) && Objects.equals(this.hardware, terminalSettings.hardware) && + Objects.equals(this.localization, terminalSettings.localization) && Objects.equals(this.nexo, terminalSettings.nexo) && Objects.equals(this.offlineProcessing, terminalSettings.offlineProcessing) && Objects.equals(this.opi, terminalSettings.opi) && @@ -590,7 +621,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(cardholderReceipt, connectivity, gratuities, hardware, nexo, offlineProcessing, opi, passcodes, payAtTable, payment, receiptOptions, receiptPrinting, signature, standalone, surcharge, timeouts, wifiProfiles); + return Objects.hash(cardholderReceipt, connectivity, gratuities, hardware, localization, nexo, offlineProcessing, opi, passcodes, payAtTable, payment, receiptOptions, receiptPrinting, signature, standalone, surcharge, timeouts, wifiProfiles); } @Override @@ -601,6 +632,7 @@ public String toString() { sb.append(" connectivity: ").append(toIndentedString(connectivity)).append("\n"); sb.append(" gratuities: ").append(toIndentedString(gratuities)).append("\n"); sb.append(" hardware: ").append(toIndentedString(hardware)).append("\n"); + sb.append(" localization: ").append(toIndentedString(localization)).append("\n"); sb.append(" nexo: ").append(toIndentedString(nexo)).append("\n"); sb.append(" offlineProcessing: ").append(toIndentedString(offlineProcessing)).append("\n"); sb.append(" opi: ").append(toIndentedString(opi)).append("\n"); diff --git a/src/main/java/com/adyen/model/management/TestCompanyWebhookRequest.java b/src/main/java/com/adyen/model/management/TestCompanyWebhookRequest.java index 3805bde79..e0698905a 100644 --- a/src/main/java/com/adyen/model/management/TestCompanyWebhookRequest.java +++ b/src/main/java/com/adyen/model/management/TestCompanyWebhookRequest.java @@ -1,7 +1,7 @@ /* * Management API * - * The version of the OpenAPI document: 1 + * The version of the OpenAPI document: 3 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/management/TestOutput.java b/src/main/java/com/adyen/model/management/TestOutput.java index be989a9ab..246f462a3 100644 --- a/src/main/java/com/adyen/model/management/TestOutput.java +++ b/src/main/java/com/adyen/model/management/TestOutput.java @@ -1,7 +1,7 @@ /* * Management API * - * The version of the OpenAPI document: 1 + * The version of the OpenAPI document: 3 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/management/TestWebhookRequest.java b/src/main/java/com/adyen/model/management/TestWebhookRequest.java index d583d1b40..7ac5263ce 100644 --- a/src/main/java/com/adyen/model/management/TestWebhookRequest.java +++ b/src/main/java/com/adyen/model/management/TestWebhookRequest.java @@ -1,7 +1,7 @@ /* * Management API * - * The version of the OpenAPI document: 1 + * The version of the OpenAPI document: 3 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/management/TestWebhookResponse.java b/src/main/java/com/adyen/model/management/TestWebhookResponse.java index 2a3e6fdfb..58e81c7e1 100644 --- a/src/main/java/com/adyen/model/management/TestWebhookResponse.java +++ b/src/main/java/com/adyen/model/management/TestWebhookResponse.java @@ -1,7 +1,7 @@ /* * Management API * - * The version of the OpenAPI document: 1 + * The version of the OpenAPI document: 3 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/management/Timeouts.java b/src/main/java/com/adyen/model/management/Timeouts.java index 545f708a3..a24134869 100644 --- a/src/main/java/com/adyen/model/management/Timeouts.java +++ b/src/main/java/com/adyen/model/management/Timeouts.java @@ -1,7 +1,7 @@ /* * Management API * - * The version of the OpenAPI document: 1 + * The version of the OpenAPI document: 3 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/management/TransactionDescriptionInfo.java b/src/main/java/com/adyen/model/management/TransactionDescriptionInfo.java index 9f4ee2f87..c481d5bfb 100644 --- a/src/main/java/com/adyen/model/management/TransactionDescriptionInfo.java +++ b/src/main/java/com/adyen/model/management/TransactionDescriptionInfo.java @@ -1,7 +1,7 @@ /* * Management API * - * The version of the OpenAPI document: 1 + * The version of the OpenAPI document: 3 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/management/TwintInfo.java b/src/main/java/com/adyen/model/management/TwintInfo.java index e83d2d863..496924823 100644 --- a/src/main/java/com/adyen/model/management/TwintInfo.java +++ b/src/main/java/com/adyen/model/management/TwintInfo.java @@ -1,7 +1,7 @@ /* * Management API * - * The version of the OpenAPI document: 1 + * The version of the OpenAPI document: 3 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/management/UninstallAndroidAppDetails.java b/src/main/java/com/adyen/model/management/UninstallAndroidAppDetails.java index a214d6e85..e36bfdf0a 100644 --- a/src/main/java/com/adyen/model/management/UninstallAndroidAppDetails.java +++ b/src/main/java/com/adyen/model/management/UninstallAndroidAppDetails.java @@ -1,7 +1,7 @@ /* * Management API * - * The version of the OpenAPI document: 1 + * The version of the OpenAPI document: 3 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/management/UninstallAndroidCertificateDetails.java b/src/main/java/com/adyen/model/management/UninstallAndroidCertificateDetails.java index ba245e69b..b32a50de2 100644 --- a/src/main/java/com/adyen/model/management/UninstallAndroidCertificateDetails.java +++ b/src/main/java/com/adyen/model/management/UninstallAndroidCertificateDetails.java @@ -1,7 +1,7 @@ /* * Management API * - * The version of the OpenAPI document: 1 + * The version of the OpenAPI document: 3 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/management/UpdatableAddress.java b/src/main/java/com/adyen/model/management/UpdatableAddress.java index f0f466d9a..e96ca2e6d 100644 --- a/src/main/java/com/adyen/model/management/UpdatableAddress.java +++ b/src/main/java/com/adyen/model/management/UpdatableAddress.java @@ -1,7 +1,7 @@ /* * Management API * - * The version of the OpenAPI document: 1 + * The version of the OpenAPI document: 3 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/management/UpdateCompanyApiCredentialRequest.java b/src/main/java/com/adyen/model/management/UpdateCompanyApiCredentialRequest.java index ab538b113..5a0459dec 100644 --- a/src/main/java/com/adyen/model/management/UpdateCompanyApiCredentialRequest.java +++ b/src/main/java/com/adyen/model/management/UpdateCompanyApiCredentialRequest.java @@ -1,7 +1,7 @@ /* * Management API * - * The version of the OpenAPI document: 1 + * The version of the OpenAPI document: 3 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/management/UpdateCompanyUserRequest.java b/src/main/java/com/adyen/model/management/UpdateCompanyUserRequest.java index 490535429..90cbd1b5a 100644 --- a/src/main/java/com/adyen/model/management/UpdateCompanyUserRequest.java +++ b/src/main/java/com/adyen/model/management/UpdateCompanyUserRequest.java @@ -1,7 +1,7 @@ /* * Management API * - * The version of the OpenAPI document: 1 + * The version of the OpenAPI document: 3 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/management/UpdateCompanyWebhookRequest.java b/src/main/java/com/adyen/model/management/UpdateCompanyWebhookRequest.java index 8918bc41e..1a57b359d 100644 --- a/src/main/java/com/adyen/model/management/UpdateCompanyWebhookRequest.java +++ b/src/main/java/com/adyen/model/management/UpdateCompanyWebhookRequest.java @@ -1,7 +1,7 @@ /* * Management API * - * The version of the OpenAPI document: 1 + * The version of the OpenAPI document: 3 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -41,12 +41,12 @@ UpdateCompanyWebhookRequest.JSON_PROPERTY_ADDITIONAL_SETTINGS, UpdateCompanyWebhookRequest.JSON_PROPERTY_COMMUNICATION_FORMAT, UpdateCompanyWebhookRequest.JSON_PROPERTY_DESCRIPTION, + UpdateCompanyWebhookRequest.JSON_PROPERTY_ENCRYPTION_PROTOCOL, UpdateCompanyWebhookRequest.JSON_PROPERTY_FILTER_MERCHANT_ACCOUNT_TYPE, UpdateCompanyWebhookRequest.JSON_PROPERTY_FILTER_MERCHANT_ACCOUNTS, UpdateCompanyWebhookRequest.JSON_PROPERTY_NETWORK_TYPE, UpdateCompanyWebhookRequest.JSON_PROPERTY_PASSWORD, UpdateCompanyWebhookRequest.JSON_PROPERTY_POPULATE_SOAP_ACTION_HEADER, - UpdateCompanyWebhookRequest.JSON_PROPERTY_SSL_VERSION, UpdateCompanyWebhookRequest.JSON_PROPERTY_URL, UpdateCompanyWebhookRequest.JSON_PROPERTY_USERNAME }) @@ -111,18 +111,18 @@ public static CommunicationFormatEnum fromValue(String value) { private String description; /** - * Shows how merchant accounts are filtered when configuring the webhook. Possible values: * **includeAccounts**: The webhook is configured for the merchant accounts listed in `filterMerchantAccounts`. * **excludeAccounts**: The webhook is not configured for the merchant accounts listed in `filterMerchantAccounts`. * **allAccounts**: Includes all merchant accounts, and does not require specifying `filterMerchantAccounts`. + * SSL version to access the public webhook URL specified in the `url` field. Possible values: * **TLSv1.3** * **TLSv1.2** * **HTTP** - Only allowed on Test environment. If not specified, the webhook will use `sslVersion`: **TLSv1.2**. */ - public enum FilterMerchantAccountTypeEnum { - ALLACCOUNTS("allAccounts"), + public enum EncryptionProtocolEnum { + HTTP("HTTP"), - EXCLUDEACCOUNTS("excludeAccounts"), + TLSV1_2("TLSv1.2"), - INCLUDEACCOUNTS("includeAccounts"); + TLSV1_3("TLSv1.3"); private String value; - FilterMerchantAccountTypeEnum(String value) { + EncryptionProtocolEnum(String value) { this.value = value; } @@ -137,8 +137,8 @@ public String toString() { } @JsonCreator - public static FilterMerchantAccountTypeEnum fromValue(String value) { - for (FilterMerchantAccountTypeEnum b : FilterMerchantAccountTypeEnum.values()) { + public static EncryptionProtocolEnum fromValue(String value) { + for (EncryptionProtocolEnum b : EncryptionProtocolEnum.values()) { if (b.value.equals(value)) { return b; } @@ -147,23 +147,22 @@ public static FilterMerchantAccountTypeEnum fromValue(String value) { } } - public static final String JSON_PROPERTY_FILTER_MERCHANT_ACCOUNT_TYPE = "filterMerchantAccountType"; - private FilterMerchantAccountTypeEnum filterMerchantAccountType; - - public static final String JSON_PROPERTY_FILTER_MERCHANT_ACCOUNTS = "filterMerchantAccounts"; - private List filterMerchantAccounts = null; + public static final String JSON_PROPERTY_ENCRYPTION_PROTOCOL = "encryptionProtocol"; + private EncryptionProtocolEnum encryptionProtocol; /** - * Network type for Terminal API notification webhooks. Possible values: * **public** * **local** Default Value: **public**. + * Shows how merchant accounts are filtered when configuring the webhook. Possible values: * **includeAccounts**: The webhook is configured for the merchant accounts listed in `filterMerchantAccounts`. * **excludeAccounts**: The webhook is not configured for the merchant accounts listed in `filterMerchantAccounts`. * **allAccounts**: Includes all merchant accounts, and does not require specifying `filterMerchantAccounts`. */ - public enum NetworkTypeEnum { - LOCAL("local"), + public enum FilterMerchantAccountTypeEnum { + ALLACCOUNTS("allAccounts"), - PUBLIC("public"); + EXCLUDEACCOUNTS("excludeAccounts"), + + INCLUDEACCOUNTS("includeAccounts"); private String value; - NetworkTypeEnum(String value) { + FilterMerchantAccountTypeEnum(String value) { this.value = value; } @@ -178,8 +177,8 @@ public String toString() { } @JsonCreator - public static NetworkTypeEnum fromValue(String value) { - for (NetworkTypeEnum b : NetworkTypeEnum.values()) { + public static FilterMerchantAccountTypeEnum fromValue(String value) { + for (FilterMerchantAccountTypeEnum b : FilterMerchantAccountTypeEnum.values()) { if (b.value.equals(value)) { return b; } @@ -188,28 +187,23 @@ public static NetworkTypeEnum fromValue(String value) { } } - public static final String JSON_PROPERTY_NETWORK_TYPE = "networkType"; - private NetworkTypeEnum networkType; - - public static final String JSON_PROPERTY_PASSWORD = "password"; - private String password; + public static final String JSON_PROPERTY_FILTER_MERCHANT_ACCOUNT_TYPE = "filterMerchantAccountType"; + private FilterMerchantAccountTypeEnum filterMerchantAccountType; - public static final String JSON_PROPERTY_POPULATE_SOAP_ACTION_HEADER = "populateSoapActionHeader"; - private Boolean populateSoapActionHeader; + public static final String JSON_PROPERTY_FILTER_MERCHANT_ACCOUNTS = "filterMerchantAccounts"; + private List filterMerchantAccounts = null; /** - * SSL version to access the public webhook URL specified in the `url` field. Possible values: * **TLSv1.3** * **TLSv1.2** * **HTTP** - Only allowed on Test environment. If not specified, the webhook will use `sslVersion`: **TLSv1.2**. + * Network type for Terminal API notification webhooks. Possible values: * **public** * **local** Default Value: **public**. */ - public enum SslVersionEnum { - HTTP("HTTP"), - - TLSV1_2("TLSv1.2"), + public enum NetworkTypeEnum { + LOCAL("local"), - TLSV1_3("TLSv1.3"); + PUBLIC("public"); private String value; - SslVersionEnum(String value) { + NetworkTypeEnum(String value) { this.value = value; } @@ -224,8 +218,8 @@ public String toString() { } @JsonCreator - public static SslVersionEnum fromValue(String value) { - for (SslVersionEnum b : SslVersionEnum.values()) { + public static NetworkTypeEnum fromValue(String value) { + for (NetworkTypeEnum b : NetworkTypeEnum.values()) { if (b.value.equals(value)) { return b; } @@ -234,8 +228,14 @@ public static SslVersionEnum fromValue(String value) { } } - public static final String JSON_PROPERTY_SSL_VERSION = "sslVersion"; - private SslVersionEnum sslVersion; + public static final String JSON_PROPERTY_NETWORK_TYPE = "networkType"; + private NetworkTypeEnum networkType; + + public static final String JSON_PROPERTY_PASSWORD = "password"; + private String password; + + public static final String JSON_PROPERTY_POPULATE_SOAP_ACTION_HEADER = "populateSoapActionHeader"; + private Boolean populateSoapActionHeader; public static final String JSON_PROPERTY_URL = "url"; private String url; @@ -421,6 +421,31 @@ public void setDescription(String description) { } + public UpdateCompanyWebhookRequest encryptionProtocol(EncryptionProtocolEnum encryptionProtocol) { + this.encryptionProtocol = encryptionProtocol; + return this; + } + + /** + * SSL version to access the public webhook URL specified in the `url` field. Possible values: * **TLSv1.3** * **TLSv1.2** * **HTTP** - Only allowed on Test environment. If not specified, the webhook will use `sslVersion`: **TLSv1.2**. + * @return encryptionProtocol + **/ + @ApiModelProperty(example = "TLSv1.2", value = "SSL version to access the public webhook URL specified in the `url` field. Possible values: * **TLSv1.3** * **TLSv1.2** * **HTTP** - Only allowed on Test environment. If not specified, the webhook will use `sslVersion`: **TLSv1.2**.") + @JsonProperty(JSON_PROPERTY_ENCRYPTION_PROTOCOL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public EncryptionProtocolEnum getEncryptionProtocol() { + return encryptionProtocol; + } + + + @JsonProperty(JSON_PROPERTY_ENCRYPTION_PROTOCOL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEncryptionProtocol(EncryptionProtocolEnum encryptionProtocol) { + this.encryptionProtocol = encryptionProtocol; + } + + public UpdateCompanyWebhookRequest filterMerchantAccountType(FilterMerchantAccountTypeEnum filterMerchantAccountType) { this.filterMerchantAccountType = filterMerchantAccountType; return this; @@ -554,31 +579,6 @@ public void setPopulateSoapActionHeader(Boolean populateSoapActionHeader) { } - public UpdateCompanyWebhookRequest sslVersion(SslVersionEnum sslVersion) { - this.sslVersion = sslVersion; - return this; - } - - /** - * SSL version to access the public webhook URL specified in the `url` field. Possible values: * **TLSv1.3** * **TLSv1.2** * **HTTP** - Only allowed on Test environment. If not specified, the webhook will use `sslVersion`: **TLSv1.2**. - * @return sslVersion - **/ - @ApiModelProperty(example = "TLSv1.2", value = "SSL version to access the public webhook URL specified in the `url` field. Possible values: * **TLSv1.3** * **TLSv1.2** * **HTTP** - Only allowed on Test environment. If not specified, the webhook will use `sslVersion`: **TLSv1.2**.") - @JsonProperty(JSON_PROPERTY_SSL_VERSION) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public SslVersionEnum getSslVersion() { - return sslVersion; - } - - - @JsonProperty(JSON_PROPERTY_SSL_VERSION) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSslVersion(SslVersionEnum sslVersion) { - this.sslVersion = sslVersion; - } - - public UpdateCompanyWebhookRequest url(String url) { this.url = url; return this; @@ -648,19 +648,19 @@ public boolean equals(Object o) { Objects.equals(this.additionalSettings, updateCompanyWebhookRequest.additionalSettings) && Objects.equals(this.communicationFormat, updateCompanyWebhookRequest.communicationFormat) && Objects.equals(this.description, updateCompanyWebhookRequest.description) && + Objects.equals(this.encryptionProtocol, updateCompanyWebhookRequest.encryptionProtocol) && Objects.equals(this.filterMerchantAccountType, updateCompanyWebhookRequest.filterMerchantAccountType) && Objects.equals(this.filterMerchantAccounts, updateCompanyWebhookRequest.filterMerchantAccounts) && Objects.equals(this.networkType, updateCompanyWebhookRequest.networkType) && Objects.equals(this.password, updateCompanyWebhookRequest.password) && Objects.equals(this.populateSoapActionHeader, updateCompanyWebhookRequest.populateSoapActionHeader) && - Objects.equals(this.sslVersion, updateCompanyWebhookRequest.sslVersion) && Objects.equals(this.url, updateCompanyWebhookRequest.url) && Objects.equals(this.username, updateCompanyWebhookRequest.username); } @Override public int hashCode() { - return Objects.hash(acceptsExpiredCertificate, acceptsSelfSignedCertificate, acceptsUntrustedRootCertificate, active, additionalSettings, communicationFormat, description, filterMerchantAccountType, filterMerchantAccounts, networkType, password, populateSoapActionHeader, sslVersion, url, username); + return Objects.hash(acceptsExpiredCertificate, acceptsSelfSignedCertificate, acceptsUntrustedRootCertificate, active, additionalSettings, communicationFormat, description, encryptionProtocol, filterMerchantAccountType, filterMerchantAccounts, networkType, password, populateSoapActionHeader, url, username); } @Override @@ -674,12 +674,12 @@ public String toString() { sb.append(" additionalSettings: ").append(toIndentedString(additionalSettings)).append("\n"); sb.append(" communicationFormat: ").append(toIndentedString(communicationFormat)).append("\n"); sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" encryptionProtocol: ").append(toIndentedString(encryptionProtocol)).append("\n"); sb.append(" filterMerchantAccountType: ").append(toIndentedString(filterMerchantAccountType)).append("\n"); sb.append(" filterMerchantAccounts: ").append(toIndentedString(filterMerchantAccounts)).append("\n"); sb.append(" networkType: ").append(toIndentedString(networkType)).append("\n"); sb.append(" password: ").append(toIndentedString(password)).append("\n"); sb.append(" populateSoapActionHeader: ").append(toIndentedString(populateSoapActionHeader)).append("\n"); - sb.append(" sslVersion: ").append(toIndentedString(sslVersion)).append("\n"); sb.append(" url: ").append(toIndentedString(url)).append("\n"); sb.append(" username: ").append(toIndentedString(username)).append("\n"); sb.append("}"); diff --git a/src/main/java/com/adyen/model/management/UpdateMerchantApiCredentialRequest.java b/src/main/java/com/adyen/model/management/UpdateMerchantApiCredentialRequest.java index 2e68e2e9e..1199393c6 100644 --- a/src/main/java/com/adyen/model/management/UpdateMerchantApiCredentialRequest.java +++ b/src/main/java/com/adyen/model/management/UpdateMerchantApiCredentialRequest.java @@ -1,7 +1,7 @@ /* * Management API * - * The version of the OpenAPI document: 1 + * The version of the OpenAPI document: 3 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/management/UpdateMerchantUserRequest.java b/src/main/java/com/adyen/model/management/UpdateMerchantUserRequest.java index f09945d0d..cff514e8f 100644 --- a/src/main/java/com/adyen/model/management/UpdateMerchantUserRequest.java +++ b/src/main/java/com/adyen/model/management/UpdateMerchantUserRequest.java @@ -1,7 +1,7 @@ /* * Management API * - * The version of the OpenAPI document: 1 + * The version of the OpenAPI document: 3 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/management/UpdateMerchantWebhookRequest.java b/src/main/java/com/adyen/model/management/UpdateMerchantWebhookRequest.java index db711edc2..9103c583f 100644 --- a/src/main/java/com/adyen/model/management/UpdateMerchantWebhookRequest.java +++ b/src/main/java/com/adyen/model/management/UpdateMerchantWebhookRequest.java @@ -1,7 +1,7 @@ /* * Management API * - * The version of the OpenAPI document: 1 + * The version of the OpenAPI document: 3 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -39,10 +39,10 @@ UpdateMerchantWebhookRequest.JSON_PROPERTY_ADDITIONAL_SETTINGS, UpdateMerchantWebhookRequest.JSON_PROPERTY_COMMUNICATION_FORMAT, UpdateMerchantWebhookRequest.JSON_PROPERTY_DESCRIPTION, + UpdateMerchantWebhookRequest.JSON_PROPERTY_ENCRYPTION_PROTOCOL, UpdateMerchantWebhookRequest.JSON_PROPERTY_NETWORK_TYPE, UpdateMerchantWebhookRequest.JSON_PROPERTY_PASSWORD, UpdateMerchantWebhookRequest.JSON_PROPERTY_POPULATE_SOAP_ACTION_HEADER, - UpdateMerchantWebhookRequest.JSON_PROPERTY_SSL_VERSION, UpdateMerchantWebhookRequest.JSON_PROPERTY_URL, UpdateMerchantWebhookRequest.JSON_PROPERTY_USERNAME }) @@ -107,16 +107,18 @@ public static CommunicationFormatEnum fromValue(String value) { private String description; /** - * Network type for Terminal API notification webhooks. Possible values: * **public** * **local** Default Value: **public**. + * SSL version to access the public webhook URL specified in the `url` field. Possible values: * **TLSv1.3** * **TLSv1.2** * **HTTP** - Only allowed on Test environment. If not specified, the webhook will use `sslVersion`: **TLSv1.2**. */ - public enum NetworkTypeEnum { - LOCAL("local"), + public enum EncryptionProtocolEnum { + HTTP("HTTP"), - PUBLIC("public"); + TLSV1_2("TLSv1.2"), + + TLSV1_3("TLSv1.3"); private String value; - NetworkTypeEnum(String value) { + EncryptionProtocolEnum(String value) { this.value = value; } @@ -131,8 +133,8 @@ public String toString() { } @JsonCreator - public static NetworkTypeEnum fromValue(String value) { - for (NetworkTypeEnum b : NetworkTypeEnum.values()) { + public static EncryptionProtocolEnum fromValue(String value) { + for (EncryptionProtocolEnum b : EncryptionProtocolEnum.values()) { if (b.value.equals(value)) { return b; } @@ -141,28 +143,20 @@ public static NetworkTypeEnum fromValue(String value) { } } - public static final String JSON_PROPERTY_NETWORK_TYPE = "networkType"; - private NetworkTypeEnum networkType; - - public static final String JSON_PROPERTY_PASSWORD = "password"; - private String password; - - public static final String JSON_PROPERTY_POPULATE_SOAP_ACTION_HEADER = "populateSoapActionHeader"; - private Boolean populateSoapActionHeader; + public static final String JSON_PROPERTY_ENCRYPTION_PROTOCOL = "encryptionProtocol"; + private EncryptionProtocolEnum encryptionProtocol; /** - * SSL version to access the public webhook URL specified in the `url` field. Possible values: * **TLSv1.3** * **TLSv1.2** * **HTTP** - Only allowed on Test environment. If not specified, the webhook will use `sslVersion`: **TLSv1.2**. + * Network type for Terminal API notification webhooks. Possible values: * **public** * **local** Default Value: **public**. */ - public enum SslVersionEnum { - HTTP("HTTP"), - - TLSV1_2("TLSv1.2"), + public enum NetworkTypeEnum { + LOCAL("local"), - TLSV1_3("TLSv1.3"); + PUBLIC("public"); private String value; - SslVersionEnum(String value) { + NetworkTypeEnum(String value) { this.value = value; } @@ -177,8 +171,8 @@ public String toString() { } @JsonCreator - public static SslVersionEnum fromValue(String value) { - for (SslVersionEnum b : SslVersionEnum.values()) { + public static NetworkTypeEnum fromValue(String value) { + for (NetworkTypeEnum b : NetworkTypeEnum.values()) { if (b.value.equals(value)) { return b; } @@ -187,8 +181,14 @@ public static SslVersionEnum fromValue(String value) { } } - public static final String JSON_PROPERTY_SSL_VERSION = "sslVersion"; - private SslVersionEnum sslVersion; + public static final String JSON_PROPERTY_NETWORK_TYPE = "networkType"; + private NetworkTypeEnum networkType; + + public static final String JSON_PROPERTY_PASSWORD = "password"; + private String password; + + public static final String JSON_PROPERTY_POPULATE_SOAP_ACTION_HEADER = "populateSoapActionHeader"; + private Boolean populateSoapActionHeader; public static final String JSON_PROPERTY_URL = "url"; private String url; @@ -374,6 +374,31 @@ public void setDescription(String description) { } + public UpdateMerchantWebhookRequest encryptionProtocol(EncryptionProtocolEnum encryptionProtocol) { + this.encryptionProtocol = encryptionProtocol; + return this; + } + + /** + * SSL version to access the public webhook URL specified in the `url` field. Possible values: * **TLSv1.3** * **TLSv1.2** * **HTTP** - Only allowed on Test environment. If not specified, the webhook will use `sslVersion`: **TLSv1.2**. + * @return encryptionProtocol + **/ + @ApiModelProperty(example = "TLSv1.2", value = "SSL version to access the public webhook URL specified in the `url` field. Possible values: * **TLSv1.3** * **TLSv1.2** * **HTTP** - Only allowed on Test environment. If not specified, the webhook will use `sslVersion`: **TLSv1.2**.") + @JsonProperty(JSON_PROPERTY_ENCRYPTION_PROTOCOL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public EncryptionProtocolEnum getEncryptionProtocol() { + return encryptionProtocol; + } + + + @JsonProperty(JSON_PROPERTY_ENCRYPTION_PROTOCOL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEncryptionProtocol(EncryptionProtocolEnum encryptionProtocol) { + this.encryptionProtocol = encryptionProtocol; + } + + public UpdateMerchantWebhookRequest networkType(NetworkTypeEnum networkType) { this.networkType = networkType; return this; @@ -449,31 +474,6 @@ public void setPopulateSoapActionHeader(Boolean populateSoapActionHeader) { } - public UpdateMerchantWebhookRequest sslVersion(SslVersionEnum sslVersion) { - this.sslVersion = sslVersion; - return this; - } - - /** - * SSL version to access the public webhook URL specified in the `url` field. Possible values: * **TLSv1.3** * **TLSv1.2** * **HTTP** - Only allowed on Test environment. If not specified, the webhook will use `sslVersion`: **TLSv1.2**. - * @return sslVersion - **/ - @ApiModelProperty(example = "TLSv1.2", value = "SSL version to access the public webhook URL specified in the `url` field. Possible values: * **TLSv1.3** * **TLSv1.2** * **HTTP** - Only allowed on Test environment. If not specified, the webhook will use `sslVersion`: **TLSv1.2**.") - @JsonProperty(JSON_PROPERTY_SSL_VERSION) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public SslVersionEnum getSslVersion() { - return sslVersion; - } - - - @JsonProperty(JSON_PROPERTY_SSL_VERSION) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSslVersion(SslVersionEnum sslVersion) { - this.sslVersion = sslVersion; - } - - public UpdateMerchantWebhookRequest url(String url) { this.url = url; return this; @@ -543,17 +543,17 @@ public boolean equals(Object o) { Objects.equals(this.additionalSettings, updateMerchantWebhookRequest.additionalSettings) && Objects.equals(this.communicationFormat, updateMerchantWebhookRequest.communicationFormat) && Objects.equals(this.description, updateMerchantWebhookRequest.description) && + Objects.equals(this.encryptionProtocol, updateMerchantWebhookRequest.encryptionProtocol) && Objects.equals(this.networkType, updateMerchantWebhookRequest.networkType) && Objects.equals(this.password, updateMerchantWebhookRequest.password) && Objects.equals(this.populateSoapActionHeader, updateMerchantWebhookRequest.populateSoapActionHeader) && - Objects.equals(this.sslVersion, updateMerchantWebhookRequest.sslVersion) && Objects.equals(this.url, updateMerchantWebhookRequest.url) && Objects.equals(this.username, updateMerchantWebhookRequest.username); } @Override public int hashCode() { - return Objects.hash(acceptsExpiredCertificate, acceptsSelfSignedCertificate, acceptsUntrustedRootCertificate, active, additionalSettings, communicationFormat, description, networkType, password, populateSoapActionHeader, sslVersion, url, username); + return Objects.hash(acceptsExpiredCertificate, acceptsSelfSignedCertificate, acceptsUntrustedRootCertificate, active, additionalSettings, communicationFormat, description, encryptionProtocol, networkType, password, populateSoapActionHeader, url, username); } @Override @@ -567,10 +567,10 @@ public String toString() { sb.append(" additionalSettings: ").append(toIndentedString(additionalSettings)).append("\n"); sb.append(" communicationFormat: ").append(toIndentedString(communicationFormat)).append("\n"); sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" encryptionProtocol: ").append(toIndentedString(encryptionProtocol)).append("\n"); sb.append(" networkType: ").append(toIndentedString(networkType)).append("\n"); sb.append(" password: ").append(toIndentedString(password)).append("\n"); sb.append(" populateSoapActionHeader: ").append(toIndentedString(populateSoapActionHeader)).append("\n"); - sb.append(" sslVersion: ").append(toIndentedString(sslVersion)).append("\n"); sb.append(" url: ").append(toIndentedString(url)).append("\n"); sb.append(" username: ").append(toIndentedString(username)).append("\n"); sb.append("}"); diff --git a/src/main/java/com/adyen/model/management/UpdatePaymentMethodInfo.java b/src/main/java/com/adyen/model/management/UpdatePaymentMethodInfo.java index 56bcd7322..eaec8f93f 100644 --- a/src/main/java/com/adyen/model/management/UpdatePaymentMethodInfo.java +++ b/src/main/java/com/adyen/model/management/UpdatePaymentMethodInfo.java @@ -1,7 +1,7 @@ /* * Management API * - * The version of the OpenAPI document: 1 + * The version of the OpenAPI document: 3 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/management/UpdatePayoutSettingsRequest.java b/src/main/java/com/adyen/model/management/UpdatePayoutSettingsRequest.java index 25993b0f8..2ac5f37f1 100644 --- a/src/main/java/com/adyen/model/management/UpdatePayoutSettingsRequest.java +++ b/src/main/java/com/adyen/model/management/UpdatePayoutSettingsRequest.java @@ -1,7 +1,7 @@ /* * Management API * - * The version of the OpenAPI document: 1 + * The version of the OpenAPI document: 3 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/management/UpdateSplitConfigurationLogicRequest.java b/src/main/java/com/adyen/model/management/UpdateSplitConfigurationLogicRequest.java index 868b9e9c9..c6214cd29 100644 --- a/src/main/java/com/adyen/model/management/UpdateSplitConfigurationLogicRequest.java +++ b/src/main/java/com/adyen/model/management/UpdateSplitConfigurationLogicRequest.java @@ -1,7 +1,7 @@ /* * Management API * - * The version of the OpenAPI document: 1 + * The version of the OpenAPI document: 3 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -33,20 +33,179 @@ * UpdateSplitConfigurationLogicRequest */ @JsonPropertyOrder({ + UpdateSplitConfigurationLogicRequest.JSON_PROPERTY_ACQUIRING_FEES, UpdateSplitConfigurationLogicRequest.JSON_PROPERTY_ADDITIONAL_COMMISSION, + UpdateSplitConfigurationLogicRequest.JSON_PROPERTY_ADYEN_COMMISSION, + UpdateSplitConfigurationLogicRequest.JSON_PROPERTY_ADYEN_FEES, + UpdateSplitConfigurationLogicRequest.JSON_PROPERTY_ADYEN_MARKUP, UpdateSplitConfigurationLogicRequest.JSON_PROPERTY_CHARGEBACK, + UpdateSplitConfigurationLogicRequest.JSON_PROPERTY_CHARGEBACK_COST_ALLOCATION, UpdateSplitConfigurationLogicRequest.JSON_PROPERTY_COMMISSION, + UpdateSplitConfigurationLogicRequest.JSON_PROPERTY_INTERCHANGE, UpdateSplitConfigurationLogicRequest.JSON_PROPERTY_PAYMENT_FEE, UpdateSplitConfigurationLogicRequest.JSON_PROPERTY_REMAINDER, + UpdateSplitConfigurationLogicRequest.JSON_PROPERTY_SCHEME_FEE, UpdateSplitConfigurationLogicRequest.JSON_PROPERTY_SPLIT_LOGIC_ID, UpdateSplitConfigurationLogicRequest.JSON_PROPERTY_SURCHARGE, UpdateSplitConfigurationLogicRequest.JSON_PROPERTY_TIP }) public class UpdateSplitConfigurationLogicRequest { + /** + * Specifies the logic to apply when booking the transaction fees. Should be combined with adyenFees. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. + */ + public enum AcquiringFeesEnum { + DEDUCTFROMLIABLEACCOUNT("deductFromLiableAccount"), + + DEDUCTFROMONEBALANCEACCOUNT("deductFromOneBalanceAccount"); + + private String value; + + AcquiringFeesEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static AcquiringFeesEnum fromValue(String value) { + for (AcquiringFeesEnum b : AcquiringFeesEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_ACQUIRING_FEES = "acquiringFees"; + private AcquiringFeesEnum acquiringFees; + public static final String JSON_PROPERTY_ADDITIONAL_COMMISSION = "additionalCommission"; private AdditionalCommission additionalCommission; + /** + * Specifies the logic to apply when booking the transaction fees. Should be combined with schemeFee, interchange & adyenMarkup. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. + */ + public enum AdyenCommissionEnum { + DEDUCTFROMLIABLEACCOUNT("deductFromLiableAccount"), + + DEDUCTFROMONEBALANCEACCOUNT("deductFromOneBalanceAccount"); + + private String value; + + AdyenCommissionEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static AdyenCommissionEnum fromValue(String value) { + for (AdyenCommissionEnum b : AdyenCommissionEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_ADYEN_COMMISSION = "adyenCommission"; + private AdyenCommissionEnum adyenCommission; + + /** + * Specifies the logic to apply when booking the transaction fees. Should be combined with acquiringFees. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. + */ + public enum AdyenFeesEnum { + DEDUCTFROMLIABLEACCOUNT("deductFromLiableAccount"), + + DEDUCTFROMONEBALANCEACCOUNT("deductFromOneBalanceAccount"); + + private String value; + + AdyenFeesEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static AdyenFeesEnum fromValue(String value) { + for (AdyenFeesEnum b : AdyenFeesEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_ADYEN_FEES = "adyenFees"; + private AdyenFeesEnum adyenFees; + + /** + * Specifies the logic to apply when booking the transaction fees. Should be combined with schemeFee, adyenCommission & interchange. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. + */ + public enum AdyenMarkupEnum { + DEDUCTFROMLIABLEACCOUNT("deductFromLiableAccount"), + + DEDUCTFROMONEBALANCEACCOUNT("deductFromOneBalanceAccount"); + + private String value; + + AdyenMarkupEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static AdyenMarkupEnum fromValue(String value) { + for (AdyenMarkupEnum b : AdyenMarkupEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_ADYEN_MARKUP = "adyenMarkup"; + private AdyenMarkupEnum adyenMarkup; + /** * Specifies the logic to apply when booking the chargeback amount. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**, **deductAccordingToSplitRatio**. */ @@ -87,11 +246,87 @@ public static ChargebackEnum fromValue(String value) { public static final String JSON_PROPERTY_CHARGEBACK = "chargeback"; private ChargebackEnum chargeback; + /** + * Specifies the logic to apply when allocating the chargeback costs. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount** + */ + public enum ChargebackCostAllocationEnum { + DEDUCTFROMLIABLEACCOUNT("deductFromLiableAccount"), + + DEDUCTFROMONEBALANCEACCOUNT("deductFromOneBalanceAccount"); + + private String value; + + ChargebackCostAllocationEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static ChargebackCostAllocationEnum fromValue(String value) { + for (ChargebackCostAllocationEnum b : ChargebackCostAllocationEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_CHARGEBACK_COST_ALLOCATION = "chargebackCostAllocation"; + private ChargebackCostAllocationEnum chargebackCostAllocation; + public static final String JSON_PROPERTY_COMMISSION = "commission"; private Commission commission; /** - * Specifies the logic to apply when booking the transaction fees. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. + * Specifies the logic to apply when booking the transaction fees. Should be combined with schemeFee, adyenCommission & adyenMarkup. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. + */ + public enum InterchangeEnum { + DEDUCTFROMLIABLEACCOUNT("deductFromLiableAccount"), + + DEDUCTFROMONEBALANCEACCOUNT("deductFromOneBalanceAccount"); + + private String value; + + InterchangeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static InterchangeEnum fromValue(String value) { + for (InterchangeEnum b : InterchangeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_INTERCHANGE = "interchange"; + private InterchangeEnum interchange; + + /** + * Specifies the logic to apply when booking the transaction fees. Cannot be combined with other fees. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. */ public enum PaymentFeeEnum { DEDUCTFROMLIABLEACCOUNT("deductFromLiableAccount"), @@ -166,6 +401,44 @@ public static RemainderEnum fromValue(String value) { public static final String JSON_PROPERTY_REMAINDER = "remainder"; private RemainderEnum remainder; + /** + * Specifies the logic to apply when booking the transaction fees. Should be combined with interchange, adyenCommission & adyenMarkup. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. + */ + public enum SchemeFeeEnum { + DEDUCTFROMLIABLEACCOUNT("deductFromLiableAccount"), + + DEDUCTFROMONEBALANCEACCOUNT("deductFromOneBalanceAccount"); + + private String value; + + SchemeFeeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static SchemeFeeEnum fromValue(String value) { + for (SchemeFeeEnum b : SchemeFeeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_SCHEME_FEE = "schemeFee"; + private SchemeFeeEnum schemeFee; + public static final String JSON_PROPERTY_SPLIT_LOGIC_ID = "splitLogicId"; private String splitLogicId; @@ -248,6 +521,31 @@ public static TipEnum fromValue(String value) { public UpdateSplitConfigurationLogicRequest() { } + public UpdateSplitConfigurationLogicRequest acquiringFees(AcquiringFeesEnum acquiringFees) { + this.acquiringFees = acquiringFees; + return this; + } + + /** + * Specifies the logic to apply when booking the transaction fees. Should be combined with adyenFees. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. + * @return acquiringFees + **/ + @ApiModelProperty(value = "Specifies the logic to apply when booking the transaction fees. Should be combined with adyenFees. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**.") + @JsonProperty(JSON_PROPERTY_ACQUIRING_FEES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public AcquiringFeesEnum getAcquiringFees() { + return acquiringFees; + } + + + @JsonProperty(JSON_PROPERTY_ACQUIRING_FEES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAcquiringFees(AcquiringFeesEnum acquiringFees) { + this.acquiringFees = acquiringFees; + } + + public UpdateSplitConfigurationLogicRequest additionalCommission(AdditionalCommission additionalCommission) { this.additionalCommission = additionalCommission; return this; @@ -273,6 +571,81 @@ public void setAdditionalCommission(AdditionalCommission additionalCommission) { } + public UpdateSplitConfigurationLogicRequest adyenCommission(AdyenCommissionEnum adyenCommission) { + this.adyenCommission = adyenCommission; + return this; + } + + /** + * Specifies the logic to apply when booking the transaction fees. Should be combined with schemeFee, interchange & adyenMarkup. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. + * @return adyenCommission + **/ + @ApiModelProperty(value = "Specifies the logic to apply when booking the transaction fees. Should be combined with schemeFee, interchange & adyenMarkup. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**.") + @JsonProperty(JSON_PROPERTY_ADYEN_COMMISSION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public AdyenCommissionEnum getAdyenCommission() { + return adyenCommission; + } + + + @JsonProperty(JSON_PROPERTY_ADYEN_COMMISSION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAdyenCommission(AdyenCommissionEnum adyenCommission) { + this.adyenCommission = adyenCommission; + } + + + public UpdateSplitConfigurationLogicRequest adyenFees(AdyenFeesEnum adyenFees) { + this.adyenFees = adyenFees; + return this; + } + + /** + * Specifies the logic to apply when booking the transaction fees. Should be combined with acquiringFees. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. + * @return adyenFees + **/ + @ApiModelProperty(value = "Specifies the logic to apply when booking the transaction fees. Should be combined with acquiringFees. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**.") + @JsonProperty(JSON_PROPERTY_ADYEN_FEES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public AdyenFeesEnum getAdyenFees() { + return adyenFees; + } + + + @JsonProperty(JSON_PROPERTY_ADYEN_FEES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAdyenFees(AdyenFeesEnum adyenFees) { + this.adyenFees = adyenFees; + } + + + public UpdateSplitConfigurationLogicRequest adyenMarkup(AdyenMarkupEnum adyenMarkup) { + this.adyenMarkup = adyenMarkup; + return this; + } + + /** + * Specifies the logic to apply when booking the transaction fees. Should be combined with schemeFee, adyenCommission & interchange. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. + * @return adyenMarkup + **/ + @ApiModelProperty(value = "Specifies the logic to apply when booking the transaction fees. Should be combined with schemeFee, adyenCommission & interchange. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**.") + @JsonProperty(JSON_PROPERTY_ADYEN_MARKUP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public AdyenMarkupEnum getAdyenMarkup() { + return adyenMarkup; + } + + + @JsonProperty(JSON_PROPERTY_ADYEN_MARKUP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAdyenMarkup(AdyenMarkupEnum adyenMarkup) { + this.adyenMarkup = adyenMarkup; + } + + public UpdateSplitConfigurationLogicRequest chargeback(ChargebackEnum chargeback) { this.chargeback = chargeback; return this; @@ -298,6 +671,31 @@ public void setChargeback(ChargebackEnum chargeback) { } + public UpdateSplitConfigurationLogicRequest chargebackCostAllocation(ChargebackCostAllocationEnum chargebackCostAllocation) { + this.chargebackCostAllocation = chargebackCostAllocation; + return this; + } + + /** + * Specifies the logic to apply when allocating the chargeback costs. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount** + * @return chargebackCostAllocation + **/ + @ApiModelProperty(value = "Specifies the logic to apply when allocating the chargeback costs. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**") + @JsonProperty(JSON_PROPERTY_CHARGEBACK_COST_ALLOCATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public ChargebackCostAllocationEnum getChargebackCostAllocation() { + return chargebackCostAllocation; + } + + + @JsonProperty(JSON_PROPERTY_CHARGEBACK_COST_ALLOCATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setChargebackCostAllocation(ChargebackCostAllocationEnum chargebackCostAllocation) { + this.chargebackCostAllocation = chargebackCostAllocation; + } + + public UpdateSplitConfigurationLogicRequest commission(Commission commission) { this.commission = commission; return this; @@ -323,16 +721,41 @@ public void setCommission(Commission commission) { } + public UpdateSplitConfigurationLogicRequest interchange(InterchangeEnum interchange) { + this.interchange = interchange; + return this; + } + + /** + * Specifies the logic to apply when booking the transaction fees. Should be combined with schemeFee, adyenCommission & adyenMarkup. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. + * @return interchange + **/ + @ApiModelProperty(value = "Specifies the logic to apply when booking the transaction fees. Should be combined with schemeFee, adyenCommission & adyenMarkup. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**.") + @JsonProperty(JSON_PROPERTY_INTERCHANGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public InterchangeEnum getInterchange() { + return interchange; + } + + + @JsonProperty(JSON_PROPERTY_INTERCHANGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setInterchange(InterchangeEnum interchange) { + this.interchange = interchange; + } + + public UpdateSplitConfigurationLogicRequest paymentFee(PaymentFeeEnum paymentFee) { this.paymentFee = paymentFee; return this; } /** - * Specifies the logic to apply when booking the transaction fees. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. + * Specifies the logic to apply when booking the transaction fees. Cannot be combined with other fees. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. * @return paymentFee **/ - @ApiModelProperty(required = true, value = "Specifies the logic to apply when booking the transaction fees. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**.") + @ApiModelProperty(value = "Specifies the logic to apply when booking the transaction fees. Cannot be combined with other fees. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**.") @JsonProperty(JSON_PROPERTY_PAYMENT_FEE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -373,6 +796,31 @@ public void setRemainder(RemainderEnum remainder) { } + public UpdateSplitConfigurationLogicRequest schemeFee(SchemeFeeEnum schemeFee) { + this.schemeFee = schemeFee; + return this; + } + + /** + * Specifies the logic to apply when booking the transaction fees. Should be combined with interchange, adyenCommission & adyenMarkup. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. + * @return schemeFee + **/ + @ApiModelProperty(value = "Specifies the logic to apply when booking the transaction fees. Should be combined with interchange, adyenCommission & adyenMarkup. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**.") + @JsonProperty(JSON_PROPERTY_SCHEME_FEE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public SchemeFeeEnum getSchemeFee() { + return schemeFee; + } + + + @JsonProperty(JSON_PROPERTY_SCHEME_FEE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSchemeFee(SchemeFeeEnum schemeFee) { + this.schemeFee = schemeFee; + } + + public UpdateSplitConfigurationLogicRequest splitLogicId(String splitLogicId) { this.splitLogicId = splitLogicId; return this; @@ -460,11 +908,18 @@ public boolean equals(Object o) { return false; } UpdateSplitConfigurationLogicRequest updateSplitConfigurationLogicRequest = (UpdateSplitConfigurationLogicRequest) o; - return Objects.equals(this.additionalCommission, updateSplitConfigurationLogicRequest.additionalCommission) && + return Objects.equals(this.acquiringFees, updateSplitConfigurationLogicRequest.acquiringFees) && + Objects.equals(this.additionalCommission, updateSplitConfigurationLogicRequest.additionalCommission) && + Objects.equals(this.adyenCommission, updateSplitConfigurationLogicRequest.adyenCommission) && + Objects.equals(this.adyenFees, updateSplitConfigurationLogicRequest.adyenFees) && + Objects.equals(this.adyenMarkup, updateSplitConfigurationLogicRequest.adyenMarkup) && Objects.equals(this.chargeback, updateSplitConfigurationLogicRequest.chargeback) && + Objects.equals(this.chargebackCostAllocation, updateSplitConfigurationLogicRequest.chargebackCostAllocation) && Objects.equals(this.commission, updateSplitConfigurationLogicRequest.commission) && + Objects.equals(this.interchange, updateSplitConfigurationLogicRequest.interchange) && Objects.equals(this.paymentFee, updateSplitConfigurationLogicRequest.paymentFee) && Objects.equals(this.remainder, updateSplitConfigurationLogicRequest.remainder) && + Objects.equals(this.schemeFee, updateSplitConfigurationLogicRequest.schemeFee) && Objects.equals(this.splitLogicId, updateSplitConfigurationLogicRequest.splitLogicId) && Objects.equals(this.surcharge, updateSplitConfigurationLogicRequest.surcharge) && Objects.equals(this.tip, updateSplitConfigurationLogicRequest.tip); @@ -472,18 +927,25 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(additionalCommission, chargeback, commission, paymentFee, remainder, splitLogicId, surcharge, tip); + return Objects.hash(acquiringFees, additionalCommission, adyenCommission, adyenFees, adyenMarkup, chargeback, chargebackCostAllocation, commission, interchange, paymentFee, remainder, schemeFee, splitLogicId, surcharge, tip); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class UpdateSplitConfigurationLogicRequest {\n"); + sb.append(" acquiringFees: ").append(toIndentedString(acquiringFees)).append("\n"); sb.append(" additionalCommission: ").append(toIndentedString(additionalCommission)).append("\n"); + sb.append(" adyenCommission: ").append(toIndentedString(adyenCommission)).append("\n"); + sb.append(" adyenFees: ").append(toIndentedString(adyenFees)).append("\n"); + sb.append(" adyenMarkup: ").append(toIndentedString(adyenMarkup)).append("\n"); sb.append(" chargeback: ").append(toIndentedString(chargeback)).append("\n"); + sb.append(" chargebackCostAllocation: ").append(toIndentedString(chargebackCostAllocation)).append("\n"); sb.append(" commission: ").append(toIndentedString(commission)).append("\n"); + sb.append(" interchange: ").append(toIndentedString(interchange)).append("\n"); sb.append(" paymentFee: ").append(toIndentedString(paymentFee)).append("\n"); sb.append(" remainder: ").append(toIndentedString(remainder)).append("\n"); + sb.append(" schemeFee: ").append(toIndentedString(schemeFee)).append("\n"); sb.append(" splitLogicId: ").append(toIndentedString(splitLogicId)).append("\n"); sb.append(" surcharge: ").append(toIndentedString(surcharge)).append("\n"); sb.append(" tip: ").append(toIndentedString(tip)).append("\n"); diff --git a/src/main/java/com/adyen/model/management/UpdateSplitConfigurationRequest.java b/src/main/java/com/adyen/model/management/UpdateSplitConfigurationRequest.java index d09e4c7f6..a84f5a781 100644 --- a/src/main/java/com/adyen/model/management/UpdateSplitConfigurationRequest.java +++ b/src/main/java/com/adyen/model/management/UpdateSplitConfigurationRequest.java @@ -1,7 +1,7 @@ /* * Management API * - * The version of the OpenAPI document: 1 + * The version of the OpenAPI document: 3 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/management/UpdateSplitConfigurationRuleRequest.java b/src/main/java/com/adyen/model/management/UpdateSplitConfigurationRuleRequest.java index 0ac523eed..35987858d 100644 --- a/src/main/java/com/adyen/model/management/UpdateSplitConfigurationRuleRequest.java +++ b/src/main/java/com/adyen/model/management/UpdateSplitConfigurationRuleRequest.java @@ -1,7 +1,7 @@ /* * Management API * - * The version of the OpenAPI document: 1 + * The version of the OpenAPI document: 3 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/management/UpdateStoreRequest.java b/src/main/java/com/adyen/model/management/UpdateStoreRequest.java index f9d2b5684..8554c548b 100644 --- a/src/main/java/com/adyen/model/management/UpdateStoreRequest.java +++ b/src/main/java/com/adyen/model/management/UpdateStoreRequest.java @@ -1,7 +1,7 @@ /* * Management API * - * The version of the OpenAPI document: 1 + * The version of the OpenAPI document: 3 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -141,10 +141,10 @@ public UpdateStoreRequest addBusinessLineIdsItem(String businessLineIdsItem) { } /** - * The unique identifiers of the [business lines](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/businesslines__resParam_id) that the store is associated with. + * The unique identifiers of the [business lines](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/businessLines__resParam_id) that the store is associated with. * @return businessLineIds **/ - @ApiModelProperty(value = "The unique identifiers of the [business lines](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/businesslines__resParam_id) that the store is associated with.") + @ApiModelProperty(value = "The unique identifiers of the [business lines](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/businessLines__resParam_id) that the store is associated with.") @JsonProperty(JSON_PROPERTY_BUSINESS_LINE_IDS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) diff --git a/src/main/java/com/adyen/model/management/InvalidFieldWrapper.java b/src/main/java/com/adyen/model/management/UploadAndroidAppResponse.java similarity index 54% rename from src/main/java/com/adyen/model/management/InvalidFieldWrapper.java rename to src/main/java/com/adyen/model/management/UploadAndroidAppResponse.java index 4e3eccfd6..87e416d5d 100644 --- a/src/main/java/com/adyen/model/management/InvalidFieldWrapper.java +++ b/src/main/java/com/adyen/model/management/UploadAndroidAppResponse.java @@ -1,7 +1,7 @@ /* * Management API * - * The version of the OpenAPI document: 1 + * The version of the OpenAPI document: 3 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -16,7 +16,6 @@ import java.util.Arrays; import java.util.Map; import java.util.HashMap; -import com.adyen.model.management.InvalidField; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -29,46 +28,46 @@ /** - * InvalidFieldWrapper + * UploadAndroidAppResponse */ @JsonPropertyOrder({ - InvalidFieldWrapper.JSON_PROPERTY_INVALID_FIELD + UploadAndroidAppResponse.JSON_PROPERTY_ID }) -public class InvalidFieldWrapper { - public static final String JSON_PROPERTY_INVALID_FIELD = "InvalidField"; - private InvalidField invalidField; +public class UploadAndroidAppResponse { + public static final String JSON_PROPERTY_ID = "id"; + private String id; - public InvalidFieldWrapper() { + public UploadAndroidAppResponse() { } - public InvalidFieldWrapper invalidField(InvalidField invalidField) { - this.invalidField = invalidField; + public UploadAndroidAppResponse id(String id) { + this.id = id; return this; } /** - * Get invalidField - * @return invalidField + * The unique identifier of the uploaded Android app. + * @return id **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_INVALID_FIELD) + @ApiModelProperty(value = "The unique identifier of the uploaded Android app.") + @JsonProperty(JSON_PROPERTY_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public InvalidField getInvalidField() { - return invalidField; + public String getId() { + return id; } - @JsonProperty(JSON_PROPERTY_INVALID_FIELD) + @JsonProperty(JSON_PROPERTY_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setInvalidField(InvalidField invalidField) { - this.invalidField = invalidField; + public void setId(String id) { + this.id = id; } /** - * Return true if this InvalidFieldWrapper object is equal to o. + * Return true if this UploadAndroidAppResponse object is equal to o. */ @Override public boolean equals(Object o) { @@ -78,20 +77,20 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - InvalidFieldWrapper invalidFieldWrapper = (InvalidFieldWrapper) o; - return Objects.equals(this.invalidField, invalidFieldWrapper.invalidField); + UploadAndroidAppResponse uploadAndroidAppResponse = (UploadAndroidAppResponse) o; + return Objects.equals(this.id, uploadAndroidAppResponse.id); } @Override public int hashCode() { - return Objects.hash(invalidField); + return Objects.hash(id); } @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class InvalidFieldWrapper {\n"); - sb.append(" invalidField: ").append(toIndentedString(invalidField)).append("\n"); + sb.append("class UploadAndroidAppResponse {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append("}"); return sb.toString(); } @@ -108,17 +107,17 @@ private String toIndentedString(Object o) { } /** - * Create an instance of InvalidFieldWrapper given an JSON string + * Create an instance of UploadAndroidAppResponse given an JSON string * * @param jsonString JSON string - * @return An instance of InvalidFieldWrapper - * @throws JsonProcessingException if the JSON string is invalid with respect to InvalidFieldWrapper + * @return An instance of UploadAndroidAppResponse + * @throws JsonProcessingException if the JSON string is invalid with respect to UploadAndroidAppResponse */ - public static InvalidFieldWrapper fromJson(String jsonString) throws JsonProcessingException { - return JSON.getMapper().readValue(jsonString, InvalidFieldWrapper.class); + public static UploadAndroidAppResponse fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, UploadAndroidAppResponse.class); } /** - * Convert an instance of InvalidFieldWrapper to an JSON string + * Convert an instance of UploadAndroidAppResponse to an JSON string * * @return JSON string */ diff --git a/src/main/java/com/adyen/model/management/Url.java b/src/main/java/com/adyen/model/management/Url.java index ce0a98072..39aed014a 100644 --- a/src/main/java/com/adyen/model/management/Url.java +++ b/src/main/java/com/adyen/model/management/Url.java @@ -1,7 +1,7 @@ /* * Management API * - * The version of the OpenAPI document: 1 + * The version of the OpenAPI document: 3 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/management/User.java b/src/main/java/com/adyen/model/management/User.java index e5f06bc1b..9e2545ba3 100644 --- a/src/main/java/com/adyen/model/management/User.java +++ b/src/main/java/com/adyen/model/management/User.java @@ -1,7 +1,7 @@ /* * Management API * - * The version of the OpenAPI document: 1 + * The version of the OpenAPI document: 3 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/management/VippsInfo.java b/src/main/java/com/adyen/model/management/VippsInfo.java index 01f02c0b8..63d1322a8 100644 --- a/src/main/java/com/adyen/model/management/VippsInfo.java +++ b/src/main/java/com/adyen/model/management/VippsInfo.java @@ -1,7 +1,7 @@ /* * Management API * - * The version of the OpenAPI document: 1 + * The version of the OpenAPI document: 3 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/management/Webhook.java b/src/main/java/com/adyen/model/management/Webhook.java index 7b17f4772..797d39dc6 100644 --- a/src/main/java/com/adyen/model/management/Webhook.java +++ b/src/main/java/com/adyen/model/management/Webhook.java @@ -1,7 +1,7 @@ /* * Management API * - * The version of the OpenAPI document: 1 + * The version of the OpenAPI document: 3 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -45,6 +45,7 @@ Webhook.JSON_PROPERTY_CERTIFICATE_ALIAS, Webhook.JSON_PROPERTY_COMMUNICATION_FORMAT, Webhook.JSON_PROPERTY_DESCRIPTION, + Webhook.JSON_PROPERTY_ENCRYPTION_PROTOCOL, Webhook.JSON_PROPERTY_FILTER_MERCHANT_ACCOUNT_TYPE, Webhook.JSON_PROPERTY_FILTER_MERCHANT_ACCOUNTS, Webhook.JSON_PROPERTY_HAS_ERROR, @@ -53,7 +54,6 @@ Webhook.JSON_PROPERTY_ID, Webhook.JSON_PROPERTY_NETWORK_TYPE, Webhook.JSON_PROPERTY_POPULATE_SOAP_ACTION_HEADER, - Webhook.JSON_PROPERTY_SSL_VERSION, Webhook.JSON_PROPERTY_TYPE, Webhook.JSON_PROPERTY_URL, Webhook.JSON_PROPERTY_USERNAME @@ -127,6 +127,46 @@ public static CommunicationFormatEnum fromValue(String value) { public static final String JSON_PROPERTY_DESCRIPTION = "description"; private String description; + /** + * SSL version to access the public webhook URL specified in the `url` field. Possible values: * **TLSv1.3** * **TLSv1.2** * **HTTP** - Only allowed on Test environment. If not specified, the webhook will use `sslVersion`: **TLSv1.2**. + */ + public enum EncryptionProtocolEnum { + HTTP("HTTP"), + + TLSV1_2("TLSv1.2"), + + TLSV1_3("TLSv1.3"); + + private String value; + + EncryptionProtocolEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EncryptionProtocolEnum fromValue(String value) { + for (EncryptionProtocolEnum b : EncryptionProtocolEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_ENCRYPTION_PROTOCOL = "encryptionProtocol"; + private EncryptionProtocolEnum encryptionProtocol; + /** * Shows how merchant accounts are included in company-level webhooks. Possible values: * **includeAccounts** * **excludeAccounts** * **allAccounts**: Includes all merchant accounts, and does not require specifying `filterMerchantAccounts`. */ @@ -223,46 +263,6 @@ public static NetworkTypeEnum fromValue(String value) { public static final String JSON_PROPERTY_POPULATE_SOAP_ACTION_HEADER = "populateSoapActionHeader"; private Boolean populateSoapActionHeader; - /** - * SSL version to access the public webhook URL specified in the `url` field. Possible values: * **TLSv1.3** * **TLSv1.2** * **HTTP** - Only allowed on Test environment. If not specified, the webhook will use `sslVersion`: **TLSv1.2**. - */ - public enum SslVersionEnum { - HTTP("HTTP"), - - TLSV1_2("TLSv1.2"), - - TLSV1_3("TLSv1.3"); - - private String value; - - SslVersionEnum(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static SslVersionEnum fromValue(String value) { - for (SslVersionEnum b : SslVersionEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - } - - public static final String JSON_PROPERTY_SSL_VERSION = "sslVersion"; - private SslVersionEnum sslVersion; - public static final String JSON_PROPERTY_TYPE = "type"; private String type; @@ -525,6 +525,31 @@ public void setDescription(String description) { } + public Webhook encryptionProtocol(EncryptionProtocolEnum encryptionProtocol) { + this.encryptionProtocol = encryptionProtocol; + return this; + } + + /** + * SSL version to access the public webhook URL specified in the `url` field. Possible values: * **TLSv1.3** * **TLSv1.2** * **HTTP** - Only allowed on Test environment. If not specified, the webhook will use `sslVersion`: **TLSv1.2**. + * @return encryptionProtocol + **/ + @ApiModelProperty(example = "TLSv1.2", value = "SSL version to access the public webhook URL specified in the `url` field. Possible values: * **TLSv1.3** * **TLSv1.2** * **HTTP** - Only allowed on Test environment. If not specified, the webhook will use `sslVersion`: **TLSv1.2**.") + @JsonProperty(JSON_PROPERTY_ENCRYPTION_PROTOCOL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public EncryptionProtocolEnum getEncryptionProtocol() { + return encryptionProtocol; + } + + + @JsonProperty(JSON_PROPERTY_ENCRYPTION_PROTOCOL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEncryptionProtocol(EncryptionProtocolEnum encryptionProtocol) { + this.encryptionProtocol = encryptionProtocol; + } + + public Webhook filterMerchantAccountType(FilterMerchantAccountTypeEnum filterMerchantAccountType) { this.filterMerchantAccountType = filterMerchantAccountType; return this; @@ -733,31 +758,6 @@ public void setPopulateSoapActionHeader(Boolean populateSoapActionHeader) { } - public Webhook sslVersion(SslVersionEnum sslVersion) { - this.sslVersion = sslVersion; - return this; - } - - /** - * SSL version to access the public webhook URL specified in the `url` field. Possible values: * **TLSv1.3** * **TLSv1.2** * **HTTP** - Only allowed on Test environment. If not specified, the webhook will use `sslVersion`: **TLSv1.2**. - * @return sslVersion - **/ - @ApiModelProperty(example = "TLSv1.2", value = "SSL version to access the public webhook URL specified in the `url` field. Possible values: * **TLSv1.3** * **TLSv1.2** * **HTTP** - Only allowed on Test environment. If not specified, the webhook will use `sslVersion`: **TLSv1.2**.") - @JsonProperty(JSON_PROPERTY_SSL_VERSION) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public SslVersionEnum getSslVersion() { - return sslVersion; - } - - - @JsonProperty(JSON_PROPERTY_SSL_VERSION) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSslVersion(SslVersionEnum sslVersion) { - this.sslVersion = sslVersion; - } - - public Webhook type(String type) { this.type = type; return this; @@ -855,6 +855,7 @@ public boolean equals(Object o) { Objects.equals(this.certificateAlias, webhook.certificateAlias) && Objects.equals(this.communicationFormat, webhook.communicationFormat) && Objects.equals(this.description, webhook.description) && + Objects.equals(this.encryptionProtocol, webhook.encryptionProtocol) && Objects.equals(this.filterMerchantAccountType, webhook.filterMerchantAccountType) && Objects.equals(this.filterMerchantAccounts, webhook.filterMerchantAccounts) && Objects.equals(this.hasError, webhook.hasError) && @@ -863,7 +864,6 @@ public boolean equals(Object o) { Objects.equals(this.id, webhook.id) && Objects.equals(this.networkType, webhook.networkType) && Objects.equals(this.populateSoapActionHeader, webhook.populateSoapActionHeader) && - Objects.equals(this.sslVersion, webhook.sslVersion) && Objects.equals(this.type, webhook.type) && Objects.equals(this.url, webhook.url) && Objects.equals(this.username, webhook.username); @@ -871,7 +871,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(links, acceptsExpiredCertificate, acceptsSelfSignedCertificate, acceptsUntrustedRootCertificate, accountReference, active, additionalSettings, certificateAlias, communicationFormat, description, filterMerchantAccountType, filterMerchantAccounts, hasError, hasPassword, hmacKeyCheckValue, id, networkType, populateSoapActionHeader, sslVersion, type, url, username); + return Objects.hash(links, acceptsExpiredCertificate, acceptsSelfSignedCertificate, acceptsUntrustedRootCertificate, accountReference, active, additionalSettings, certificateAlias, communicationFormat, description, encryptionProtocol, filterMerchantAccountType, filterMerchantAccounts, hasError, hasPassword, hmacKeyCheckValue, id, networkType, populateSoapActionHeader, type, url, username); } @Override @@ -888,6 +888,7 @@ public String toString() { sb.append(" certificateAlias: ").append(toIndentedString(certificateAlias)).append("\n"); sb.append(" communicationFormat: ").append(toIndentedString(communicationFormat)).append("\n"); sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" encryptionProtocol: ").append(toIndentedString(encryptionProtocol)).append("\n"); sb.append(" filterMerchantAccountType: ").append(toIndentedString(filterMerchantAccountType)).append("\n"); sb.append(" filterMerchantAccounts: ").append(toIndentedString(filterMerchantAccounts)).append("\n"); sb.append(" hasError: ").append(toIndentedString(hasError)).append("\n"); @@ -896,7 +897,6 @@ public String toString() { sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" networkType: ").append(toIndentedString(networkType)).append("\n"); sb.append(" populateSoapActionHeader: ").append(toIndentedString(populateSoapActionHeader)).append("\n"); - sb.append(" sslVersion: ").append(toIndentedString(sslVersion)).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append(" url: ").append(toIndentedString(url)).append("\n"); sb.append(" username: ").append(toIndentedString(username)).append("\n"); diff --git a/src/main/java/com/adyen/model/management/WebhookLinks.java b/src/main/java/com/adyen/model/management/WebhookLinks.java index e0ddad77a..6defbedfa 100644 --- a/src/main/java/com/adyen/model/management/WebhookLinks.java +++ b/src/main/java/com/adyen/model/management/WebhookLinks.java @@ -1,7 +1,7 @@ /* * Management API * - * The version of the OpenAPI document: 1 + * The version of the OpenAPI document: 3 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/management/WifiProfiles.java b/src/main/java/com/adyen/model/management/WifiProfiles.java index 3817032c2..dabf64043 100644 --- a/src/main/java/com/adyen/model/management/WifiProfiles.java +++ b/src/main/java/com/adyen/model/management/WifiProfiles.java @@ -1,7 +1,7 @@ /* * Management API * - * The version of the OpenAPI document: 1 + * The version of the OpenAPI document: 3 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/managementwebhooks/AbstractOpenApiSchema.java b/src/main/java/com/adyen/model/managementwebhooks/AbstractOpenApiSchema.java index daa2febf2..632146e53 100644 --- a/src/main/java/com/adyen/model/managementwebhooks/AbstractOpenApiSchema.java +++ b/src/main/java/com/adyen/model/managementwebhooks/AbstractOpenApiSchema.java @@ -1,7 +1,7 @@ /* * Management Webhooks * - * The version of the OpenAPI document: 1 + * The version of the OpenAPI document: 3 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/managementwebhooks/AccountCapabilityData.java b/src/main/java/com/adyen/model/managementwebhooks/AccountCapabilityData.java index 1b9db6030..0d99233a5 100644 --- a/src/main/java/com/adyen/model/managementwebhooks/AccountCapabilityData.java +++ b/src/main/java/com/adyen/model/managementwebhooks/AccountCapabilityData.java @@ -1,7 +1,7 @@ /* * Management Webhooks * - * The version of the OpenAPI document: 1 + * The version of the OpenAPI document: 3 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/managementwebhooks/AccountCreateNotificationData.java b/src/main/java/com/adyen/model/managementwebhooks/AccountCreateNotificationData.java index 07318b136..63c252e5f 100644 --- a/src/main/java/com/adyen/model/managementwebhooks/AccountCreateNotificationData.java +++ b/src/main/java/com/adyen/model/managementwebhooks/AccountCreateNotificationData.java @@ -1,7 +1,7 @@ /* * Management Webhooks * - * The version of the OpenAPI document: 1 + * The version of the OpenAPI document: 3 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/managementwebhooks/AccountNotificationResponse.java b/src/main/java/com/adyen/model/managementwebhooks/AccountNotificationResponse.java index dbd37f7ca..e11b99c29 100644 --- a/src/main/java/com/adyen/model/managementwebhooks/AccountNotificationResponse.java +++ b/src/main/java/com/adyen/model/managementwebhooks/AccountNotificationResponse.java @@ -1,7 +1,7 @@ /* * Management Webhooks * - * The version of the OpenAPI document: 1 + * The version of the OpenAPI document: 3 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/managementwebhooks/AccountUpdateNotificationData.java b/src/main/java/com/adyen/model/managementwebhooks/AccountUpdateNotificationData.java index 81a136990..228c5975e 100644 --- a/src/main/java/com/adyen/model/managementwebhooks/AccountUpdateNotificationData.java +++ b/src/main/java/com/adyen/model/managementwebhooks/AccountUpdateNotificationData.java @@ -1,7 +1,7 @@ /* * Management Webhooks * - * The version of the OpenAPI document: 1 + * The version of the OpenAPI document: 3 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/managementwebhooks/CapabilityProblem.java b/src/main/java/com/adyen/model/managementwebhooks/CapabilityProblem.java index 1a7288c65..bd4e99521 100644 --- a/src/main/java/com/adyen/model/managementwebhooks/CapabilityProblem.java +++ b/src/main/java/com/adyen/model/managementwebhooks/CapabilityProblem.java @@ -1,7 +1,7 @@ /* * Management Webhooks * - * The version of the OpenAPI document: 1 + * The version of the OpenAPI document: 3 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/managementwebhooks/CapabilityProblemEntity.java b/src/main/java/com/adyen/model/managementwebhooks/CapabilityProblemEntity.java index 62822707b..17dafa0cd 100644 --- a/src/main/java/com/adyen/model/managementwebhooks/CapabilityProblemEntity.java +++ b/src/main/java/com/adyen/model/managementwebhooks/CapabilityProblemEntity.java @@ -1,7 +1,7 @@ /* * Management Webhooks * - * The version of the OpenAPI document: 1 + * The version of the OpenAPI document: 3 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/managementwebhooks/CapabilityProblemEntityRecursive.java b/src/main/java/com/adyen/model/managementwebhooks/CapabilityProblemEntityRecursive.java index 9a0aea1e7..fb3966731 100644 --- a/src/main/java/com/adyen/model/managementwebhooks/CapabilityProblemEntityRecursive.java +++ b/src/main/java/com/adyen/model/managementwebhooks/CapabilityProblemEntityRecursive.java @@ -1,7 +1,7 @@ /* * Management Webhooks * - * The version of the OpenAPI document: 1 + * The version of the OpenAPI document: 3 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/managementwebhooks/JSON.java b/src/main/java/com/adyen/model/managementwebhooks/JSON.java index 6568e459e..5beb7d8ab 100644 --- a/src/main/java/com/adyen/model/managementwebhooks/JSON.java +++ b/src/main/java/com/adyen/model/managementwebhooks/JSON.java @@ -1,6 +1,7 @@ package com.adyen.model.managementwebhooks; import com.adyen.serializer.ByteArraySerializer; +import com.adyen.serializer.ByteArrayDeserializer; import com.fasterxml.jackson.annotation.*; import com.fasterxml.jackson.databind.*; import com.fasterxml.jackson.databind.json.JsonMapper; @@ -33,6 +34,7 @@ public JSON() { // Custom ByteSerializer SimpleModule simpleModule = new SimpleModule(); simpleModule.addSerializer(byte[].class, new ByteArraySerializer()); + simpleModule.addDeserializer(byte[].class, new ByteArrayDeserializer()); mapper.registerModule(simpleModule); } diff --git a/src/main/java/com/adyen/model/managementwebhooks/MerchantCreatedNotificationRequest.java b/src/main/java/com/adyen/model/managementwebhooks/MerchantCreatedNotificationRequest.java index 5192e27f4..3f87f2778 100644 --- a/src/main/java/com/adyen/model/managementwebhooks/MerchantCreatedNotificationRequest.java +++ b/src/main/java/com/adyen/model/managementwebhooks/MerchantCreatedNotificationRequest.java @@ -1,7 +1,7 @@ /* * Management Webhooks * - * The version of the OpenAPI document: 1 + * The version of the OpenAPI document: 3 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/managementwebhooks/MerchantUpdatedNotificationRequest.java b/src/main/java/com/adyen/model/managementwebhooks/MerchantUpdatedNotificationRequest.java index 2b2ba66c7..08a9bb7c6 100644 --- a/src/main/java/com/adyen/model/managementwebhooks/MerchantUpdatedNotificationRequest.java +++ b/src/main/java/com/adyen/model/managementwebhooks/MerchantUpdatedNotificationRequest.java @@ -1,7 +1,7 @@ /* * Management Webhooks * - * The version of the OpenAPI document: 1 + * The version of the OpenAPI document: 3 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/managementwebhooks/MidServiceNotificationData.java b/src/main/java/com/adyen/model/managementwebhooks/MidServiceNotificationData.java index b2b2e8e5c..9ae5e90b8 100644 --- a/src/main/java/com/adyen/model/managementwebhooks/MidServiceNotificationData.java +++ b/src/main/java/com/adyen/model/managementwebhooks/MidServiceNotificationData.java @@ -1,7 +1,7 @@ /* * Management Webhooks * - * The version of the OpenAPI document: 1 + * The version of the OpenAPI document: 3 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -36,7 +36,7 @@ MidServiceNotificationData.JSON_PROPERTY_ID, MidServiceNotificationData.JSON_PROPERTY_MERCHANT_ID, MidServiceNotificationData.JSON_PROPERTY_REFERENCE, - MidServiceNotificationData.JSON_PROPERTY_RESULT, + MidServiceNotificationData.JSON_PROPERTY_STATUS, MidServiceNotificationData.JSON_PROPERTY_STORE_ID, MidServiceNotificationData.JSON_PROPERTY_TYPE, MidServiceNotificationData.JSON_PROPERTY_VERIFICATION_STATUS @@ -59,16 +59,22 @@ public class MidServiceNotificationData { private String reference; /** - * The result of the request to create a payment method. + * The status of the request to add a payment method. Possible values: * **success**: the payment method was added. * **failure**: the request failed. * **dataRequired**: the request is in a draft state because the required KYC data are missing. To check what data are missing, [get the details of the legal entity](https://docs.adyen.com/api-explorer/legalentity/latest/get/legalEntities/_id_). * **capabilityPending**: the **receivePayments** capability is not allowed. * **updatesExpected**: the **receivePayments** capability is not allowed and the required KYC data are missing. To check what data are missing, [get the details of the legal entity](https://docs.adyen.com/api-explorer/legalentity/latest/get/legalEntities/_id_). */ - public enum ResultEnum { - SUCCESS("SUCCESS"), + public enum StatusEnum { + SUCCESS("success"), - FAILURE("FAILURE"); + FAILURE("failure"), + + CAPABILITYPENDING("capabilityPending"), + + DATAREQUIRED("dataRequired"), + + UPDATESEXPECTED("updatesExpected"); private String value; - ResultEnum(String value) { + StatusEnum(String value) { this.value = value; } @@ -83,8 +89,8 @@ public String toString() { } @JsonCreator - public static ResultEnum fromValue(String value) { - for (ResultEnum b : ResultEnum.values()) { + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { if (b.value.equals(value)) { return b; } @@ -93,8 +99,8 @@ public static ResultEnum fromValue(String value) { } } - public static final String JSON_PROPERTY_RESULT = "result"; - private ResultEnum result; + public static final String JSON_PROPERTY_STATUS = "status"; + private StatusEnum status; public static final String JSON_PROPERTY_STORE_ID = "storeId"; private String storeId; @@ -203,10 +209,10 @@ public MidServiceNotificationData id(String id) { } /** - * The identifier of the resource. + * The unique identifier of the resource. * @return id **/ - @ApiModelProperty(required = true, value = "The identifier of the resource.") + @ApiModelProperty(required = true, value = "The unique identifier of the resource.") @JsonProperty(JSON_PROPERTY_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -228,10 +234,10 @@ public MidServiceNotificationData merchantId(String merchantId) { } /** - * The identifier of the merchant account. + * The unique identifier of the merchant account. * @return merchantId **/ - @ApiModelProperty(required = true, value = "The identifier of the merchant account.") + @ApiModelProperty(required = true, value = "The unique identifier of the merchant account.") @JsonProperty(JSON_PROPERTY_MERCHANT_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -272,28 +278,28 @@ public void setReference(String reference) { } - public MidServiceNotificationData result(ResultEnum result) { - this.result = result; + public MidServiceNotificationData status(StatusEnum status) { + this.status = status; return this; } /** - * The result of the request to create a payment method. - * @return result + * The status of the request to add a payment method. Possible values: * **success**: the payment method was added. * **failure**: the request failed. * **dataRequired**: the request is in a draft state because the required KYC data are missing. To check what data are missing, [get the details of the legal entity](https://docs.adyen.com/api-explorer/legalentity/latest/get/legalEntities/_id_). * **capabilityPending**: the **receivePayments** capability is not allowed. * **updatesExpected**: the **receivePayments** capability is not allowed and the required KYC data are missing. To check what data are missing, [get the details of the legal entity](https://docs.adyen.com/api-explorer/legalentity/latest/get/legalEntities/_id_). + * @return status **/ - @ApiModelProperty(required = true, value = "The result of the request to create a payment method.") - @JsonProperty(JSON_PROPERTY_RESULT) + @ApiModelProperty(required = true, value = "The status of the request to add a payment method. Possible values: * **success**: the payment method was added. * **failure**: the request failed. * **dataRequired**: the request is in a draft state because the required KYC data are missing. To check what data are missing, [get the details of the legal entity](https://docs.adyen.com/api-explorer/legalentity/latest/get/legalEntities/_id_). * **capabilityPending**: the **receivePayments** capability is not allowed. * **updatesExpected**: the **receivePayments** capability is not allowed and the required KYC data are missing. To check what data are missing, [get the details of the legal entity](https://docs.adyen.com/api-explorer/legalentity/latest/get/legalEntities/_id_).") + @JsonProperty(JSON_PROPERTY_STATUS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public ResultEnum getResult() { - return result; + public StatusEnum getStatus() { + return status; } - @JsonProperty(JSON_PROPERTY_RESULT) + @JsonProperty(JSON_PROPERTY_STATUS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setResult(ResultEnum result) { - this.result = result; + public void setStatus(StatusEnum status) { + this.status = status; } @@ -303,10 +309,10 @@ public MidServiceNotificationData storeId(String storeId) { } /** - * The identifier of the [store](https://docs.adyen.com/api-explorer/#/ManagementService/latest/post/merchants/{id}/paymentMethodSettings__reqParam_storeId), if any. + * The unique identifier of the [store](https://docs.adyen.com/api-explorer/#/ManagementService/latest/post/merchants/{id}/paymentMethodSettings__reqParam_storeId), if any. * @return storeId **/ - @ApiModelProperty(value = "The identifier of the [store](https://docs.adyen.com/api-explorer/#/ManagementService/latest/post/merchants/{id}/paymentMethodSettings__reqParam_storeId), if any.") + @ApiModelProperty(value = "The unique identifier of the [store](https://docs.adyen.com/api-explorer/#/ManagementService/latest/post/merchants/{id}/paymentMethodSettings__reqParam_storeId), if any.") @JsonProperty(JSON_PROPERTY_STORE_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -389,7 +395,7 @@ public boolean equals(Object o) { Objects.equals(this.id, midServiceNotificationData.id) && Objects.equals(this.merchantId, midServiceNotificationData.merchantId) && Objects.equals(this.reference, midServiceNotificationData.reference) && - Objects.equals(this.result, midServiceNotificationData.result) && + Objects.equals(this.status, midServiceNotificationData.status) && Objects.equals(this.storeId, midServiceNotificationData.storeId) && Objects.equals(this.type, midServiceNotificationData.type) && Objects.equals(this.verificationStatus, midServiceNotificationData.verificationStatus); @@ -397,7 +403,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(allowed, enabled, id, merchantId, reference, result, storeId, type, verificationStatus); + return Objects.hash(allowed, enabled, id, merchantId, reference, status, storeId, type, verificationStatus); } @Override @@ -409,7 +415,7 @@ public String toString() { sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" merchantId: ").append(toIndentedString(merchantId)).append("\n"); sb.append(" reference: ").append(toIndentedString(reference)).append("\n"); - sb.append(" result: ").append(toIndentedString(result)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); sb.append(" storeId: ").append(toIndentedString(storeId)).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append(" verificationStatus: ").append(toIndentedString(verificationStatus)).append("\n"); diff --git a/src/main/java/com/adyen/model/managementwebhooks/PaymentMethodCreatedNotificationRequest.java b/src/main/java/com/adyen/model/managementwebhooks/PaymentMethodCreatedNotificationRequest.java index d4586db39..666eececd 100644 --- a/src/main/java/com/adyen/model/managementwebhooks/PaymentMethodCreatedNotificationRequest.java +++ b/src/main/java/com/adyen/model/managementwebhooks/PaymentMethodCreatedNotificationRequest.java @@ -1,7 +1,7 @@ /* * Management Webhooks * - * The version of the OpenAPI document: 1 + * The version of the OpenAPI document: 3 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/managementwebhooks/PaymentMethodNotificationResponse.java b/src/main/java/com/adyen/model/managementwebhooks/PaymentMethodNotificationResponse.java index 86180735c..a623fc464 100644 --- a/src/main/java/com/adyen/model/managementwebhooks/PaymentMethodNotificationResponse.java +++ b/src/main/java/com/adyen/model/managementwebhooks/PaymentMethodNotificationResponse.java @@ -1,7 +1,7 @@ /* * Management Webhooks * - * The version of the OpenAPI document: 1 + * The version of the OpenAPI document: 3 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/managementwebhooks/PaymentMethodRequestRemovedNotificationRequest.java b/src/main/java/com/adyen/model/managementwebhooks/PaymentMethodRequestRemovedNotificationRequest.java new file mode 100644 index 000000000..47219cee3 --- /dev/null +++ b/src/main/java/com/adyen/model/managementwebhooks/PaymentMethodRequestRemovedNotificationRequest.java @@ -0,0 +1,256 @@ +/* + * Management Webhooks + * + * The version of the OpenAPI document: 3 + * + * + * 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.adyen.model.managementwebhooks; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.adyen.model.managementwebhooks.MidServiceNotificationData; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.time.OffsetDateTime; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.core.JsonProcessingException; + + +/** + * PaymentMethodRequestRemovedNotificationRequest + */ +@JsonPropertyOrder({ + PaymentMethodRequestRemovedNotificationRequest.JSON_PROPERTY_CREATED_AT, + PaymentMethodRequestRemovedNotificationRequest.JSON_PROPERTY_DATA, + PaymentMethodRequestRemovedNotificationRequest.JSON_PROPERTY_ENVIRONMENT, + PaymentMethodRequestRemovedNotificationRequest.JSON_PROPERTY_TYPE +}) + +public class PaymentMethodRequestRemovedNotificationRequest { + public static final String JSON_PROPERTY_CREATED_AT = "createdAt"; + private OffsetDateTime createdAt; + + public static final String JSON_PROPERTY_DATA = "data"; + private MidServiceNotificationData data; + + public static final String JSON_PROPERTY_ENVIRONMENT = "environment"; + private String environment; + + /** + * Type of notification. + */ + public enum TypeEnum { + PAYMENTMETHOD_REQUESTREMOVED("paymentMethod.requestRemoved"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_TYPE = "type"; + private TypeEnum type; + + public PaymentMethodRequestRemovedNotificationRequest() { + } + + public PaymentMethodRequestRemovedNotificationRequest createdAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * Timestamp for when the webhook was created. + * @return createdAt + **/ + @ApiModelProperty(required = true, value = "Timestamp for when the webhook was created.") + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCreatedAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + } + + + public PaymentMethodRequestRemovedNotificationRequest data(MidServiceNotificationData data) { + this.data = data; + return this; + } + + /** + * Get data + * @return data + **/ + @ApiModelProperty(required = true, value = "") + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public MidServiceNotificationData getData() { + return data; + } + + + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setData(MidServiceNotificationData data) { + this.data = data; + } + + + public PaymentMethodRequestRemovedNotificationRequest environment(String environment) { + this.environment = environment; + return this; + } + + /** + * The environment from which the webhook originated. Possible values: **test**, **live**. + * @return environment + **/ + @ApiModelProperty(required = true, value = "The environment from which the webhook originated. Possible values: **test**, **live**.") + @JsonProperty(JSON_PROPERTY_ENVIRONMENT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getEnvironment() { + return environment; + } + + + @JsonProperty(JSON_PROPERTY_ENVIRONMENT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEnvironment(String environment) { + this.environment = environment; + } + + + public PaymentMethodRequestRemovedNotificationRequest type(TypeEnum type) { + this.type = type; + return this; + } + + /** + * Type of notification. + * @return type + **/ + @ApiModelProperty(required = true, value = "Type of notification.") + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public TypeEnum getType() { + return type; + } + + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setType(TypeEnum type) { + this.type = type; + } + + + /** + * Return true if this PaymentMethodRequestRemovedNotificationRequest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PaymentMethodRequestRemovedNotificationRequest paymentMethodRequestRemovedNotificationRequest = (PaymentMethodRequestRemovedNotificationRequest) o; + return Objects.equals(this.createdAt, paymentMethodRequestRemovedNotificationRequest.createdAt) && + Objects.equals(this.data, paymentMethodRequestRemovedNotificationRequest.data) && + Objects.equals(this.environment, paymentMethodRequestRemovedNotificationRequest.environment) && + Objects.equals(this.type, paymentMethodRequestRemovedNotificationRequest.type); + } + + @Override + public int hashCode() { + return Objects.hash(createdAt, data, environment, type); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PaymentMethodRequestRemovedNotificationRequest {\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" environment: ").append(toIndentedString(environment)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +/** + * Create an instance of PaymentMethodRequestRemovedNotificationRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of PaymentMethodRequestRemovedNotificationRequest + * @throws JsonProcessingException if the JSON string is invalid with respect to PaymentMethodRequestRemovedNotificationRequest + */ + public static PaymentMethodRequestRemovedNotificationRequest fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, PaymentMethodRequestRemovedNotificationRequest.class); + } +/** + * Convert an instance of PaymentMethodRequestRemovedNotificationRequest to an JSON string + * + * @return JSON string + */ + public String toJson() throws JsonProcessingException { + return JSON.getMapper().writeValueAsString(this); + } +} + diff --git a/src/main/java/com/adyen/model/managementwebhooks/PaymentMethodScheduledForRemovalNotificationRequest.java b/src/main/java/com/adyen/model/managementwebhooks/PaymentMethodScheduledForRemovalNotificationRequest.java new file mode 100644 index 000000000..eefd26450 --- /dev/null +++ b/src/main/java/com/adyen/model/managementwebhooks/PaymentMethodScheduledForRemovalNotificationRequest.java @@ -0,0 +1,256 @@ +/* + * Management Webhooks + * + * The version of the OpenAPI document: 3 + * + * + * 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.adyen.model.managementwebhooks; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.adyen.model.managementwebhooks.MidServiceNotificationData; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.time.OffsetDateTime; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.core.JsonProcessingException; + + +/** + * PaymentMethodScheduledForRemovalNotificationRequest + */ +@JsonPropertyOrder({ + PaymentMethodScheduledForRemovalNotificationRequest.JSON_PROPERTY_CREATED_AT, + PaymentMethodScheduledForRemovalNotificationRequest.JSON_PROPERTY_DATA, + PaymentMethodScheduledForRemovalNotificationRequest.JSON_PROPERTY_ENVIRONMENT, + PaymentMethodScheduledForRemovalNotificationRequest.JSON_PROPERTY_TYPE +}) + +public class PaymentMethodScheduledForRemovalNotificationRequest { + public static final String JSON_PROPERTY_CREATED_AT = "createdAt"; + private OffsetDateTime createdAt; + + public static final String JSON_PROPERTY_DATA = "data"; + private MidServiceNotificationData data; + + public static final String JSON_PROPERTY_ENVIRONMENT = "environment"; + private String environment; + + /** + * Type of notification. + */ + public enum TypeEnum { + PAYMENTMETHOD_REQUESTSCHEDULEDFORREMOVAL("paymentMethod.requestScheduledForRemoval"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_TYPE = "type"; + private TypeEnum type; + + public PaymentMethodScheduledForRemovalNotificationRequest() { + } + + public PaymentMethodScheduledForRemovalNotificationRequest createdAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * Timestamp for when the webhook was created. + * @return createdAt + **/ + @ApiModelProperty(required = true, value = "Timestamp for when the webhook was created.") + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCreatedAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + } + + + public PaymentMethodScheduledForRemovalNotificationRequest data(MidServiceNotificationData data) { + this.data = data; + return this; + } + + /** + * Get data + * @return data + **/ + @ApiModelProperty(required = true, value = "") + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public MidServiceNotificationData getData() { + return data; + } + + + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setData(MidServiceNotificationData data) { + this.data = data; + } + + + public PaymentMethodScheduledForRemovalNotificationRequest environment(String environment) { + this.environment = environment; + return this; + } + + /** + * The environment from which the webhook originated. Possible values: **test**, **live**. + * @return environment + **/ + @ApiModelProperty(required = true, value = "The environment from which the webhook originated. Possible values: **test**, **live**.") + @JsonProperty(JSON_PROPERTY_ENVIRONMENT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getEnvironment() { + return environment; + } + + + @JsonProperty(JSON_PROPERTY_ENVIRONMENT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEnvironment(String environment) { + this.environment = environment; + } + + + public PaymentMethodScheduledForRemovalNotificationRequest type(TypeEnum type) { + this.type = type; + return this; + } + + /** + * Type of notification. + * @return type + **/ + @ApiModelProperty(required = true, value = "Type of notification.") + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public TypeEnum getType() { + return type; + } + + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setType(TypeEnum type) { + this.type = type; + } + + + /** + * Return true if this PaymentMethodScheduledForRemovalNotificationRequest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PaymentMethodScheduledForRemovalNotificationRequest paymentMethodScheduledForRemovalNotificationRequest = (PaymentMethodScheduledForRemovalNotificationRequest) o; + return Objects.equals(this.createdAt, paymentMethodScheduledForRemovalNotificationRequest.createdAt) && + Objects.equals(this.data, paymentMethodScheduledForRemovalNotificationRequest.data) && + Objects.equals(this.environment, paymentMethodScheduledForRemovalNotificationRequest.environment) && + Objects.equals(this.type, paymentMethodScheduledForRemovalNotificationRequest.type); + } + + @Override + public int hashCode() { + return Objects.hash(createdAt, data, environment, type); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PaymentMethodScheduledForRemovalNotificationRequest {\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" environment: ").append(toIndentedString(environment)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +/** + * Create an instance of PaymentMethodScheduledForRemovalNotificationRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of PaymentMethodScheduledForRemovalNotificationRequest + * @throws JsonProcessingException if the JSON string is invalid with respect to PaymentMethodScheduledForRemovalNotificationRequest + */ + public static PaymentMethodScheduledForRemovalNotificationRequest fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, PaymentMethodScheduledForRemovalNotificationRequest.class); + } +/** + * Convert an instance of PaymentMethodScheduledForRemovalNotificationRequest to an JSON string + * + * @return JSON string + */ + public String toJson() throws JsonProcessingException { + return JSON.getMapper().writeValueAsString(this); + } +} + diff --git a/src/main/java/com/adyen/model/managementwebhooks/RemediatingAction.java b/src/main/java/com/adyen/model/managementwebhooks/RemediatingAction.java index 316a29102..9e3a2d435 100644 --- a/src/main/java/com/adyen/model/managementwebhooks/RemediatingAction.java +++ b/src/main/java/com/adyen/model/managementwebhooks/RemediatingAction.java @@ -1,7 +1,7 @@ /* * Management Webhooks * - * The version of the OpenAPI document: 1 + * The version of the OpenAPI document: 3 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/managementwebhooks/VerificationError.java b/src/main/java/com/adyen/model/managementwebhooks/VerificationError.java index 82bba2d9a..1077a5080 100644 --- a/src/main/java/com/adyen/model/managementwebhooks/VerificationError.java +++ b/src/main/java/com/adyen/model/managementwebhooks/VerificationError.java @@ -1,7 +1,7 @@ /* * Management Webhooks * - * The version of the OpenAPI document: 1 + * The version of the OpenAPI document: 3 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/managementwebhooks/VerificationErrorRecursive.java b/src/main/java/com/adyen/model/managementwebhooks/VerificationErrorRecursive.java index b31e55d5a..86894004b 100644 --- a/src/main/java/com/adyen/model/managementwebhooks/VerificationErrorRecursive.java +++ b/src/main/java/com/adyen/model/managementwebhooks/VerificationErrorRecursive.java @@ -1,7 +1,7 @@ /* * Management Webhooks * - * The version of the OpenAPI document: 1 + * The version of the OpenAPI document: 3 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/marketpayaccount/PayoutScheduleResponse.java b/src/main/java/com/adyen/model/marketpayaccount/PayoutScheduleResponse.java index 258932f53..61c075dce 100644 --- a/src/main/java/com/adyen/model/marketpayaccount/PayoutScheduleResponse.java +++ b/src/main/java/com/adyen/model/marketpayaccount/PayoutScheduleResponse.java @@ -45,6 +45,7 @@ public class PayoutScheduleResponse { * The payout schedule of the account. Permitted values: `DEFAULT`, `DAILY`, `DAILY_US`, `DAILY_EU`, `DAILY_AU`, `DAILY_SG`, `WEEKLY`, `WEEKLY_ON_TUE_FRI_MIDNIGHT`, `BIWEEKLY_ON_1ST_AND_15TH_AT_MIDNIGHT`, `MONTHLY`, `HOLD`. */ public enum ScheduleEnum { + DEFAULT("DEFAULT"), BIWEEKLY_ON_1ST_AND_15TH_AT_MIDNIGHT("BIWEEKLY_ON_1ST_AND_15TH_AT_MIDNIGHT"), DAILY("DAILY"), diff --git a/src/main/java/com/adyen/model/transfers/AULocalAccountIdentification.java b/src/main/java/com/adyen/model/transfers/AULocalAccountIdentification.java index 97f7d7487..0cbb906ec 100644 --- a/src/main/java/com/adyen/model/transfers/AULocalAccountIdentification.java +++ b/src/main/java/com/adyen/model/transfers/AULocalAccountIdentification.java @@ -1,7 +1,7 @@ /* * Transfers API * - * The version of the OpenAPI document: 3 + * The version of the OpenAPI document: 4 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/transfers/AbstractOpenApiSchema.java b/src/main/java/com/adyen/model/transfers/AbstractOpenApiSchema.java index fc37ace6e..438dba59c 100644 --- a/src/main/java/com/adyen/model/transfers/AbstractOpenApiSchema.java +++ b/src/main/java/com/adyen/model/transfers/AbstractOpenApiSchema.java @@ -1,7 +1,7 @@ /* * Transfers API * - * The version of the OpenAPI document: 3 + * The version of the OpenAPI document: 4 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/transfers/AdditionalBankIdentification.java b/src/main/java/com/adyen/model/transfers/AdditionalBankIdentification.java index a7801c9a4..e7cc6b7d1 100644 --- a/src/main/java/com/adyen/model/transfers/AdditionalBankIdentification.java +++ b/src/main/java/com/adyen/model/transfers/AdditionalBankIdentification.java @@ -1,7 +1,7 @@ /* * Transfers API * - * The version of the OpenAPI document: 3 + * The version of the OpenAPI document: 4 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/transfers/Address2.java b/src/main/java/com/adyen/model/transfers/Address.java similarity index 82% rename from src/main/java/com/adyen/model/transfers/Address2.java rename to src/main/java/com/adyen/model/transfers/Address.java index 9476aeaa4..71f53a4fe 100644 --- a/src/main/java/com/adyen/model/transfers/Address2.java +++ b/src/main/java/com/adyen/model/transfers/Address.java @@ -1,7 +1,7 @@ /* * Transfers API * - * The version of the OpenAPI document: 3 + * The version of the OpenAPI document: 4 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -28,19 +28,18 @@ /** - * Address2 + * Address */ @JsonPropertyOrder({ - Address2.JSON_PROPERTY_CITY, - Address2.JSON_PROPERTY_COUNTRY, - Address2.JSON_PROPERTY_LINE1, - Address2.JSON_PROPERTY_LINE2, - Address2.JSON_PROPERTY_POSTAL_CODE, - Address2.JSON_PROPERTY_STATE_OR_PROVINCE + Address.JSON_PROPERTY_CITY, + Address.JSON_PROPERTY_COUNTRY, + Address.JSON_PROPERTY_LINE1, + Address.JSON_PROPERTY_LINE2, + Address.JSON_PROPERTY_POSTAL_CODE, + Address.JSON_PROPERTY_STATE_OR_PROVINCE }) -@JsonTypeName("Address-2") -public class Address2 { +public class Address { public static final String JSON_PROPERTY_CITY = "city"; private String city; @@ -59,10 +58,10 @@ public class Address2 { public static final String JSON_PROPERTY_STATE_OR_PROVINCE = "stateOrProvince"; private String stateOrProvince; - public Address2() { + public Address() { } - public Address2 city(String city) { + public Address city(String city) { this.city = city; return this; } @@ -87,7 +86,7 @@ public void setCity(String city) { } - public Address2 country(String country) { + public Address country(String country) { this.country = country; return this; } @@ -112,7 +111,7 @@ public void setCountry(String country) { } - public Address2 line1(String line1) { + public Address line1(String line1) { this.line1 = line1; return this; } @@ -137,7 +136,7 @@ public void setLine1(String line1) { } - public Address2 line2(String line2) { + public Address line2(String line2) { this.line2 = line2; return this; } @@ -162,7 +161,7 @@ public void setLine2(String line2) { } - public Address2 postalCode(String postalCode) { + public Address postalCode(String postalCode) { this.postalCode = postalCode; return this; } @@ -187,7 +186,7 @@ public void setPostalCode(String postalCode) { } - public Address2 stateOrProvince(String stateOrProvince) { + public Address stateOrProvince(String stateOrProvince) { this.stateOrProvince = stateOrProvince; return this; } @@ -213,7 +212,7 @@ public void setStateOrProvince(String stateOrProvince) { /** - * Return true if this Address-2 object is equal to o. + * Return true if this Address object is equal to o. */ @Override public boolean equals(Object o) { @@ -223,13 +222,13 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - Address2 address2 = (Address2) o; - return Objects.equals(this.city, address2.city) && - Objects.equals(this.country, address2.country) && - Objects.equals(this.line1, address2.line1) && - Objects.equals(this.line2, address2.line2) && - Objects.equals(this.postalCode, address2.postalCode) && - Objects.equals(this.stateOrProvince, address2.stateOrProvince); + Address address = (Address) o; + return Objects.equals(this.city, address.city) && + Objects.equals(this.country, address.country) && + Objects.equals(this.line1, address.line1) && + Objects.equals(this.line2, address.line2) && + Objects.equals(this.postalCode, address.postalCode) && + Objects.equals(this.stateOrProvince, address.stateOrProvince); } @Override @@ -240,7 +239,7 @@ public int hashCode() { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class Address2 {\n"); + sb.append("class Address {\n"); sb.append(" city: ").append(toIndentedString(city)).append("\n"); sb.append(" country: ").append(toIndentedString(country)).append("\n"); sb.append(" line1: ").append(toIndentedString(line1)).append("\n"); @@ -263,17 +262,17 @@ private String toIndentedString(Object o) { } /** - * Create an instance of Address2 given an JSON string + * Create an instance of Address given an JSON string * * @param jsonString JSON string - * @return An instance of Address2 - * @throws JsonProcessingException if the JSON string is invalid with respect to Address2 + * @return An instance of Address + * @throws JsonProcessingException if the JSON string is invalid with respect to Address */ - public static Address2 fromJson(String jsonString) throws JsonProcessingException { - return JSON.getMapper().readValue(jsonString, Address2.class); + public static Address fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, Address.class); } /** - * Convert an instance of Address2 to an JSON string + * Convert an instance of Address to an JSON string * * @return JSON string */ diff --git a/src/main/java/com/adyen/model/transfers/Amount.java b/src/main/java/com/adyen/model/transfers/Amount.java index d6dab5c6e..0f964c2f0 100644 --- a/src/main/java/com/adyen/model/transfers/Amount.java +++ b/src/main/java/com/adyen/model/transfers/Amount.java @@ -1,7 +1,7 @@ /* * Transfers API * - * The version of the OpenAPI document: 3 + * The version of the OpenAPI document: 4 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/transfers/BRLocalAccountIdentification.java b/src/main/java/com/adyen/model/transfers/BRLocalAccountIdentification.java index 3e9650b7d..186367df8 100644 --- a/src/main/java/com/adyen/model/transfers/BRLocalAccountIdentification.java +++ b/src/main/java/com/adyen/model/transfers/BRLocalAccountIdentification.java @@ -1,7 +1,7 @@ /* * Transfers API * - * The version of the OpenAPI document: 3 + * The version of the OpenAPI document: 4 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/transfers/BankAccountV3.java b/src/main/java/com/adyen/model/transfers/BankAccountV3.java index 3ce18365e..7fedfd76a 100644 --- a/src/main/java/com/adyen/model/transfers/BankAccountV3.java +++ b/src/main/java/com/adyen/model/transfers/BankAccountV3.java @@ -1,7 +1,7 @@ /* * Transfers API * - * The version of the OpenAPI document: 3 + * The version of the OpenAPI document: 4 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -17,7 +17,7 @@ import java.util.Map; import java.util.HashMap; import com.adyen.model.transfers.BankAccountV3AccountIdentification; -import com.adyen.model.transfers.PartyIdentification2; +import com.adyen.model.transfers.PartyIdentification; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -39,7 +39,7 @@ public class BankAccountV3 { public static final String JSON_PROPERTY_ACCOUNT_HOLDER = "accountHolder"; - private PartyIdentification2 accountHolder; + private PartyIdentification accountHolder; public static final String JSON_PROPERTY_ACCOUNT_IDENTIFICATION = "accountIdentification"; private BankAccountV3AccountIdentification accountIdentification; @@ -47,7 +47,7 @@ public class BankAccountV3 { public BankAccountV3() { } - public BankAccountV3 accountHolder(PartyIdentification2 accountHolder) { + public BankAccountV3 accountHolder(PartyIdentification accountHolder) { this.accountHolder = accountHolder; return this; } @@ -60,14 +60,14 @@ public BankAccountV3 accountHolder(PartyIdentification2 accountHolder) { @JsonProperty(JSON_PROPERTY_ACCOUNT_HOLDER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public PartyIdentification2 getAccountHolder() { + public PartyIdentification getAccountHolder() { return accountHolder; } @JsonProperty(JSON_PROPERTY_ACCOUNT_HOLDER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAccountHolder(PartyIdentification2 accountHolder) { + public void setAccountHolder(PartyIdentification accountHolder) { this.accountHolder = accountHolder; } diff --git a/src/main/java/com/adyen/model/transfers/BankAccountV3AccountIdentification.java b/src/main/java/com/adyen/model/transfers/BankAccountV3AccountIdentification.java index 196bd8242..3d9c9c5b8 100644 --- a/src/main/java/com/adyen/model/transfers/BankAccountV3AccountIdentification.java +++ b/src/main/java/com/adyen/model/transfers/BankAccountV3AccountIdentification.java @@ -1,7 +1,7 @@ /* * Transfers API * - * The version of the OpenAPI document: 3 + * The version of the OpenAPI document: 4 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/transfers/BankCategoryData.java b/src/main/java/com/adyen/model/transfers/BankCategoryData.java new file mode 100644 index 000000000..0e6aa1179 --- /dev/null +++ b/src/main/java/com/adyen/model/transfers/BankCategoryData.java @@ -0,0 +1,235 @@ +/* + * Transfers API + * + * The version of the OpenAPI document: 4 + * + * + * 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.adyen.model.transfers; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.core.JsonProcessingException; + + +/** + * BankCategoryData + */ +@JsonPropertyOrder({ + BankCategoryData.JSON_PROPERTY_PRIORITY, + BankCategoryData.JSON_PROPERTY_TYPE +}) + +public class BankCategoryData { + /** + * The priority for the bank transfer. This sets the speed at which the transfer is sent and the fees that you have to pay. Required for transfers with `category` **bank**. Possible values: * **regular**: For normal, low-value transactions. * **fast**: Faster way to transfer funds but has higher fees. Recommended for high-priority, low-value transactions. * **wire**: Fastest way to transfer funds but has the highest fees. Recommended for high-priority, high-value transactions. * **instant**: Instant way to transfer funds in [SEPA countries](https://www.ecb.europa.eu/paym/integration/retail/sepa/html/index.en.html). * **crossBorder**: High-value transfer to a recipient in a different country. * **internal**: Transfer to an Adyen-issued business bank account (by bank account number/IBAN). + */ + public enum PriorityEnum { + CROSSBORDER("crossBorder"), + + FAST("fast"), + + INSTANT("instant"), + + INTERNAL("internal"), + + REGULAR("regular"), + + WIRE("wire"); + + private String value; + + PriorityEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static PriorityEnum fromValue(String value) { + for (PriorityEnum b : PriorityEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_PRIORITY = "priority"; + private PriorityEnum priority; + + /** + * **bank** + */ + public enum TypeEnum { + BANK("bank"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_TYPE = "type"; + private TypeEnum type = TypeEnum.BANK; + + public BankCategoryData() { + } + + public BankCategoryData priority(PriorityEnum priority) { + this.priority = priority; + return this; + } + + /** + * The priority for the bank transfer. This sets the speed at which the transfer is sent and the fees that you have to pay. Required for transfers with `category` **bank**. Possible values: * **regular**: For normal, low-value transactions. * **fast**: Faster way to transfer funds but has higher fees. Recommended for high-priority, low-value transactions. * **wire**: Fastest way to transfer funds but has the highest fees. Recommended for high-priority, high-value transactions. * **instant**: Instant way to transfer funds in [SEPA countries](https://www.ecb.europa.eu/paym/integration/retail/sepa/html/index.en.html). * **crossBorder**: High-value transfer to a recipient in a different country. * **internal**: Transfer to an Adyen-issued business bank account (by bank account number/IBAN). + * @return priority + **/ + @ApiModelProperty(value = "The priority for the bank transfer. This sets the speed at which the transfer is sent and the fees that you have to pay. Required for transfers with `category` **bank**. Possible values: * **regular**: For normal, low-value transactions. * **fast**: Faster way to transfer funds but has higher fees. Recommended for high-priority, low-value transactions. * **wire**: Fastest way to transfer funds but has the highest fees. Recommended for high-priority, high-value transactions. * **instant**: Instant way to transfer funds in [SEPA countries](https://www.ecb.europa.eu/paym/integration/retail/sepa/html/index.en.html). * **crossBorder**: High-value transfer to a recipient in a different country. * **internal**: Transfer to an Adyen-issued business bank account (by bank account number/IBAN).") + @JsonProperty(JSON_PROPERTY_PRIORITY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public PriorityEnum getPriority() { + return priority; + } + + + @JsonProperty(JSON_PROPERTY_PRIORITY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPriority(PriorityEnum priority) { + this.priority = priority; + } + + + public BankCategoryData type(TypeEnum type) { + this.type = type; + return this; + } + + /** + * **bank** + * @return type + **/ + @ApiModelProperty(value = "**bank**") + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public TypeEnum getType() { + return type; + } + + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setType(TypeEnum type) { + this.type = type; + } + + + /** + * Return true if this BankCategoryData object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + BankCategoryData bankCategoryData = (BankCategoryData) o; + return Objects.equals(this.priority, bankCategoryData.priority) && + Objects.equals(this.type, bankCategoryData.type); + } + + @Override + public int hashCode() { + return Objects.hash(priority, type); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class BankCategoryData {\n"); + sb.append(" priority: ").append(toIndentedString(priority)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +/** + * Create an instance of BankCategoryData given an JSON string + * + * @param jsonString JSON string + * @return An instance of BankCategoryData + * @throws JsonProcessingException if the JSON string is invalid with respect to BankCategoryData + */ + public static BankCategoryData fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, BankCategoryData.class); + } +/** + * Convert an instance of BankCategoryData to an JSON string + * + * @return JSON string + */ + public String toJson() throws JsonProcessingException { + return JSON.getMapper().writeValueAsString(this); + } +} + diff --git a/src/main/java/com/adyen/model/transfers/CALocalAccountIdentification.java b/src/main/java/com/adyen/model/transfers/CALocalAccountIdentification.java index a202d596c..b67d70737 100644 --- a/src/main/java/com/adyen/model/transfers/CALocalAccountIdentification.java +++ b/src/main/java/com/adyen/model/transfers/CALocalAccountIdentification.java @@ -1,7 +1,7 @@ /* * Transfers API * - * The version of the OpenAPI document: 3 + * The version of the OpenAPI document: 4 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/transfers/CZLocalAccountIdentification.java b/src/main/java/com/adyen/model/transfers/CZLocalAccountIdentification.java index 10837bd75..f8ae32f48 100644 --- a/src/main/java/com/adyen/model/transfers/CZLocalAccountIdentification.java +++ b/src/main/java/com/adyen/model/transfers/CZLocalAccountIdentification.java @@ -1,7 +1,7 @@ /* * Transfers API * - * The version of the OpenAPI document: 3 + * The version of the OpenAPI document: 4 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/transfers/CapitalBalance.java b/src/main/java/com/adyen/model/transfers/CapitalBalance.java index 13cf13720..9e4aadfce 100644 --- a/src/main/java/com/adyen/model/transfers/CapitalBalance.java +++ b/src/main/java/com/adyen/model/transfers/CapitalBalance.java @@ -1,7 +1,7 @@ /* * Transfers API * - * The version of the OpenAPI document: 3 + * The version of the OpenAPI document: 4 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/transfers/CapitalGrant.java b/src/main/java/com/adyen/model/transfers/CapitalGrant.java index e84248e19..9dcc6cbf0 100644 --- a/src/main/java/com/adyen/model/transfers/CapitalGrant.java +++ b/src/main/java/com/adyen/model/transfers/CapitalGrant.java @@ -1,7 +1,7 @@ /* * Transfers API * - * The version of the OpenAPI document: 3 + * The version of the OpenAPI document: 4 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -18,7 +18,7 @@ import java.util.HashMap; import com.adyen.model.transfers.Amount; import com.adyen.model.transfers.CapitalBalance; -import com.adyen.model.transfers.Counterparty2; +import com.adyen.model.transfers.Counterparty; import com.adyen.model.transfers.Fee; import com.adyen.model.transfers.Repayment; import com.fasterxml.jackson.annotation.JsonInclude; @@ -55,7 +55,7 @@ public class CapitalGrant { private CapitalBalance balances; public static final String JSON_PROPERTY_COUNTERPARTY = "counterparty"; - private Counterparty2 counterparty; + private Counterparty counterparty; public static final String JSON_PROPERTY_FEE = "fee"; private Fee fee; @@ -165,7 +165,7 @@ public void setBalances(CapitalBalance balances) { } - public CapitalGrant counterparty(Counterparty2 counterparty) { + public CapitalGrant counterparty(Counterparty counterparty) { this.counterparty = counterparty; return this; } @@ -178,14 +178,14 @@ public CapitalGrant counterparty(Counterparty2 counterparty) { @JsonProperty(JSON_PROPERTY_COUNTERPARTY) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Counterparty2 getCounterparty() { + public Counterparty getCounterparty() { return counterparty; } @JsonProperty(JSON_PROPERTY_COUNTERPARTY) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCounterparty(Counterparty2 counterparty) { + public void setCounterparty(Counterparty counterparty) { this.counterparty = counterparty; } diff --git a/src/main/java/com/adyen/model/transfers/CapitalGrantInfo.java b/src/main/java/com/adyen/model/transfers/CapitalGrantInfo.java index 3d63c5de2..418ec5fd6 100644 --- a/src/main/java/com/adyen/model/transfers/CapitalGrantInfo.java +++ b/src/main/java/com/adyen/model/transfers/CapitalGrantInfo.java @@ -1,7 +1,7 @@ /* * Transfers API * - * The version of the OpenAPI document: 3 + * The version of the OpenAPI document: 4 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -16,7 +16,7 @@ import java.util.Arrays; import java.util.Map; import java.util.HashMap; -import com.adyen.model.transfers.Counterparty2; +import com.adyen.model.transfers.Counterparty; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -39,7 +39,7 @@ public class CapitalGrantInfo { public static final String JSON_PROPERTY_COUNTERPARTY = "counterparty"; - private Counterparty2 counterparty; + private Counterparty counterparty; public static final String JSON_PROPERTY_GRANT_ACCOUNT_ID = "grantAccountId"; private String grantAccountId; @@ -50,7 +50,7 @@ public class CapitalGrantInfo { public CapitalGrantInfo() { } - public CapitalGrantInfo counterparty(Counterparty2 counterparty) { + public CapitalGrantInfo counterparty(Counterparty counterparty) { this.counterparty = counterparty; return this; } @@ -63,14 +63,14 @@ public CapitalGrantInfo counterparty(Counterparty2 counterparty) { @JsonProperty(JSON_PROPERTY_COUNTERPARTY) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Counterparty2 getCounterparty() { + public Counterparty getCounterparty() { return counterparty; } @JsonProperty(JSON_PROPERTY_COUNTERPARTY) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCounterparty(Counterparty2 counterparty) { + public void setCounterparty(Counterparty counterparty) { this.counterparty = counterparty; } diff --git a/src/main/java/com/adyen/model/transfers/CapitalGrants.java b/src/main/java/com/adyen/model/transfers/CapitalGrants.java index 7a7352ce2..9c7b50229 100644 --- a/src/main/java/com/adyen/model/transfers/CapitalGrants.java +++ b/src/main/java/com/adyen/model/transfers/CapitalGrants.java @@ -1,7 +1,7 @@ /* * Transfers API * - * The version of the OpenAPI document: 3 + * The version of the OpenAPI document: 4 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/transfers/Counterparty2.java b/src/main/java/com/adyen/model/transfers/Counterparty.java similarity index 79% rename from src/main/java/com/adyen/model/transfers/Counterparty2.java rename to src/main/java/com/adyen/model/transfers/Counterparty.java index 0aba921b1..ba1aca0a4 100644 --- a/src/main/java/com/adyen/model/transfers/Counterparty2.java +++ b/src/main/java/com/adyen/model/transfers/Counterparty.java @@ -1,7 +1,7 @@ /* * Transfers API * - * The version of the OpenAPI document: 3 + * The version of the OpenAPI document: 4 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -28,16 +28,15 @@ /** - * Counterparty2 + * Counterparty */ @JsonPropertyOrder({ - Counterparty2.JSON_PROPERTY_ACCOUNT_HOLDER_ID, - Counterparty2.JSON_PROPERTY_BALANCE_ACCOUNT_ID, - Counterparty2.JSON_PROPERTY_TRANSFER_INSTRUMENT_ID + Counterparty.JSON_PROPERTY_ACCOUNT_HOLDER_ID, + Counterparty.JSON_PROPERTY_BALANCE_ACCOUNT_ID, + Counterparty.JSON_PROPERTY_TRANSFER_INSTRUMENT_ID }) -@JsonTypeName("Counterparty-2") -public class Counterparty2 { +public class Counterparty { public static final String JSON_PROPERTY_ACCOUNT_HOLDER_ID = "accountHolderId"; private String accountHolderId; @@ -47,10 +46,10 @@ public class Counterparty2 { public static final String JSON_PROPERTY_TRANSFER_INSTRUMENT_ID = "transferInstrumentId"; private String transferInstrumentId; - public Counterparty2() { + public Counterparty() { } - public Counterparty2 accountHolderId(String accountHolderId) { + public Counterparty accountHolderId(String accountHolderId) { this.accountHolderId = accountHolderId; return this; } @@ -75,7 +74,7 @@ public void setAccountHolderId(String accountHolderId) { } - public Counterparty2 balanceAccountId(String balanceAccountId) { + public Counterparty balanceAccountId(String balanceAccountId) { this.balanceAccountId = balanceAccountId; return this; } @@ -100,7 +99,7 @@ public void setBalanceAccountId(String balanceAccountId) { } - public Counterparty2 transferInstrumentId(String transferInstrumentId) { + public Counterparty transferInstrumentId(String transferInstrumentId) { this.transferInstrumentId = transferInstrumentId; return this; } @@ -126,7 +125,7 @@ public void setTransferInstrumentId(String transferInstrumentId) { /** - * Return true if this Counterparty-2 object is equal to o. + * Return true if this Counterparty object is equal to o. */ @Override public boolean equals(Object o) { @@ -136,10 +135,10 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - Counterparty2 counterparty2 = (Counterparty2) o; - return Objects.equals(this.accountHolderId, counterparty2.accountHolderId) && - Objects.equals(this.balanceAccountId, counterparty2.balanceAccountId) && - Objects.equals(this.transferInstrumentId, counterparty2.transferInstrumentId); + Counterparty counterparty = (Counterparty) o; + return Objects.equals(this.accountHolderId, counterparty.accountHolderId) && + Objects.equals(this.balanceAccountId, counterparty.balanceAccountId) && + Objects.equals(this.transferInstrumentId, counterparty.transferInstrumentId); } @Override @@ -150,7 +149,7 @@ public int hashCode() { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class Counterparty2 {\n"); + sb.append("class Counterparty {\n"); sb.append(" accountHolderId: ").append(toIndentedString(accountHolderId)).append("\n"); sb.append(" balanceAccountId: ").append(toIndentedString(balanceAccountId)).append("\n"); sb.append(" transferInstrumentId: ").append(toIndentedString(transferInstrumentId)).append("\n"); @@ -170,17 +169,17 @@ private String toIndentedString(Object o) { } /** - * Create an instance of Counterparty2 given an JSON string + * Create an instance of Counterparty given an JSON string * * @param jsonString JSON string - * @return An instance of Counterparty2 - * @throws JsonProcessingException if the JSON string is invalid with respect to Counterparty2 + * @return An instance of Counterparty + * @throws JsonProcessingException if the JSON string is invalid with respect to Counterparty */ - public static Counterparty2 fromJson(String jsonString) throws JsonProcessingException { - return JSON.getMapper().readValue(jsonString, Counterparty2.class); + public static Counterparty fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, Counterparty.class); } /** - * Convert an instance of Counterparty2 to an JSON string + * Convert an instance of Counterparty to an JSON string * * @return JSON string */ diff --git a/src/main/java/com/adyen/model/transfers/CounterpartyInfoV3.java b/src/main/java/com/adyen/model/transfers/CounterpartyInfoV3.java index 845a3953b..edcf5f9b1 100644 --- a/src/main/java/com/adyen/model/transfers/CounterpartyInfoV3.java +++ b/src/main/java/com/adyen/model/transfers/CounterpartyInfoV3.java @@ -1,7 +1,7 @@ /* * Transfers API * - * The version of the OpenAPI document: 3 + * The version of the OpenAPI document: 4 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/transfers/CounterpartyV3.java b/src/main/java/com/adyen/model/transfers/CounterpartyV3.java index ea2b56b9a..56446f3c9 100644 --- a/src/main/java/com/adyen/model/transfers/CounterpartyV3.java +++ b/src/main/java/com/adyen/model/transfers/CounterpartyV3.java @@ -1,7 +1,7 @@ /* * Transfers API * - * The version of the OpenAPI document: 3 + * The version of the OpenAPI document: 4 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/transfers/DKLocalAccountIdentification.java b/src/main/java/com/adyen/model/transfers/DKLocalAccountIdentification.java index b143e3cfd..d02a1d9a2 100644 --- a/src/main/java/com/adyen/model/transfers/DKLocalAccountIdentification.java +++ b/src/main/java/com/adyen/model/transfers/DKLocalAccountIdentification.java @@ -1,7 +1,7 @@ /* * Transfers API * - * The version of the OpenAPI document: 3 + * The version of the OpenAPI document: 4 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/transfers/Fee.java b/src/main/java/com/adyen/model/transfers/Fee.java index 8042a674a..9eb41a69f 100644 --- a/src/main/java/com/adyen/model/transfers/Fee.java +++ b/src/main/java/com/adyen/model/transfers/Fee.java @@ -1,7 +1,7 @@ /* * Transfers API * - * The version of the OpenAPI document: 3 + * The version of the OpenAPI document: 4 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/transfers/HKLocalAccountIdentification.java b/src/main/java/com/adyen/model/transfers/HKLocalAccountIdentification.java index 9d839ba60..5ad9af724 100644 --- a/src/main/java/com/adyen/model/transfers/HKLocalAccountIdentification.java +++ b/src/main/java/com/adyen/model/transfers/HKLocalAccountIdentification.java @@ -1,7 +1,7 @@ /* * Transfers API * - * The version of the OpenAPI document: 3 + * The version of the OpenAPI document: 4 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -88,10 +88,10 @@ public HKLocalAccountIdentification accountNumber(String accountNumber) { } /** - * The 9- to 12-character bank account number (alphanumeric), without separators or whitespace. Starts with the 3-digit branch code. + * The 9- to 15-character bank account number (alphanumeric), without separators or whitespace. Starts with the 3-digit branch code. * @return accountNumber **/ - @ApiModelProperty(required = true, value = "The 9- to 12-character bank account number (alphanumeric), without separators or whitespace. Starts with the 3-digit branch code.") + @ApiModelProperty(required = true, value = "The 9- to 15-character bank account number (alphanumeric), without separators or whitespace. Starts with the 3-digit branch code.") @JsonProperty(JSON_PROPERTY_ACCOUNT_NUMBER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) diff --git a/src/main/java/com/adyen/model/transfers/HULocalAccountIdentification.java b/src/main/java/com/adyen/model/transfers/HULocalAccountIdentification.java index 5131ff507..853ae0dca 100644 --- a/src/main/java/com/adyen/model/transfers/HULocalAccountIdentification.java +++ b/src/main/java/com/adyen/model/transfers/HULocalAccountIdentification.java @@ -1,7 +1,7 @@ /* * Transfers API * - * The version of the OpenAPI document: 3 + * The version of the OpenAPI document: 4 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/transfers/IbanAccountIdentification.java b/src/main/java/com/adyen/model/transfers/IbanAccountIdentification.java index d86dc123c..903908e67 100644 --- a/src/main/java/com/adyen/model/transfers/IbanAccountIdentification.java +++ b/src/main/java/com/adyen/model/transfers/IbanAccountIdentification.java @@ -1,7 +1,7 @@ /* * Transfers API * - * The version of the OpenAPI document: 3 + * The version of the OpenAPI document: 4 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/transfers/InternalCategoryData.java b/src/main/java/com/adyen/model/transfers/InternalCategoryData.java new file mode 100644 index 000000000..50ee37e61 --- /dev/null +++ b/src/main/java/com/adyen/model/transfers/InternalCategoryData.java @@ -0,0 +1,223 @@ +/* + * Transfers API + * + * The version of the OpenAPI document: 4 + * + * + * 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.adyen.model.transfers; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.core.JsonProcessingException; + + +/** + * InternalCategoryData + */ +@JsonPropertyOrder({ + InternalCategoryData.JSON_PROPERTY_MODIFICATION_MERCHANT_REFERENCE, + InternalCategoryData.JSON_PROPERTY_MODIFICATION_PSP_REFERENCE, + InternalCategoryData.JSON_PROPERTY_TYPE +}) + +public class InternalCategoryData { + public static final String JSON_PROPERTY_MODIFICATION_MERCHANT_REFERENCE = "modificationMerchantReference"; + private String modificationMerchantReference; + + public static final String JSON_PROPERTY_MODIFICATION_PSP_REFERENCE = "modificationPspReference"; + private String modificationPspReference; + + /** + * **internal** + */ + public enum TypeEnum { + INTERNAL("internal"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_TYPE = "type"; + private TypeEnum type = TypeEnum.INTERNAL; + + public InternalCategoryData() { + } + + public InternalCategoryData modificationMerchantReference(String modificationMerchantReference) { + this.modificationMerchantReference = modificationMerchantReference; + return this; + } + + /** + * The capture's merchant reference included in the transfer. + * @return modificationMerchantReference + **/ + @ApiModelProperty(value = "The capture's merchant reference included in the transfer.") + @JsonProperty(JSON_PROPERTY_MODIFICATION_MERCHANT_REFERENCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getModificationMerchantReference() { + return modificationMerchantReference; + } + + + @JsonProperty(JSON_PROPERTY_MODIFICATION_MERCHANT_REFERENCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setModificationMerchantReference(String modificationMerchantReference) { + this.modificationMerchantReference = modificationMerchantReference; + } + + + public InternalCategoryData modificationPspReference(String modificationPspReference) { + this.modificationPspReference = modificationPspReference; + return this; + } + + /** + * The capture reference included in the transfer. + * @return modificationPspReference + **/ + @ApiModelProperty(value = "The capture reference included in the transfer.") + @JsonProperty(JSON_PROPERTY_MODIFICATION_PSP_REFERENCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getModificationPspReference() { + return modificationPspReference; + } + + + @JsonProperty(JSON_PROPERTY_MODIFICATION_PSP_REFERENCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setModificationPspReference(String modificationPspReference) { + this.modificationPspReference = modificationPspReference; + } + + + public InternalCategoryData type(TypeEnum type) { + this.type = type; + return this; + } + + /** + * **internal** + * @return type + **/ + @ApiModelProperty(value = "**internal**") + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public TypeEnum getType() { + return type; + } + + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setType(TypeEnum type) { + this.type = type; + } + + + /** + * Return true if this InternalCategoryData object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + InternalCategoryData internalCategoryData = (InternalCategoryData) o; + return Objects.equals(this.modificationMerchantReference, internalCategoryData.modificationMerchantReference) && + Objects.equals(this.modificationPspReference, internalCategoryData.modificationPspReference) && + Objects.equals(this.type, internalCategoryData.type); + } + + @Override + public int hashCode() { + return Objects.hash(modificationMerchantReference, modificationPspReference, type); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class InternalCategoryData {\n"); + sb.append(" modificationMerchantReference: ").append(toIndentedString(modificationMerchantReference)).append("\n"); + sb.append(" modificationPspReference: ").append(toIndentedString(modificationPspReference)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +/** + * Create an instance of InternalCategoryData given an JSON string + * + * @param jsonString JSON string + * @return An instance of InternalCategoryData + * @throws JsonProcessingException if the JSON string is invalid with respect to InternalCategoryData + */ + public static InternalCategoryData fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, InternalCategoryData.class); + } +/** + * Convert an instance of InternalCategoryData to an JSON string + * + * @return JSON string + */ + public String toJson() throws JsonProcessingException { + return JSON.getMapper().writeValueAsString(this); + } +} + diff --git a/src/main/java/com/adyen/model/transfers/InvalidField.java b/src/main/java/com/adyen/model/transfers/InvalidField.java index 868860d33..5ce85df45 100644 --- a/src/main/java/com/adyen/model/transfers/InvalidField.java +++ b/src/main/java/com/adyen/model/transfers/InvalidField.java @@ -1,7 +1,7 @@ /* * Transfers API * - * The version of the OpenAPI document: 3 + * The version of the OpenAPI document: 4 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/transfers/IssuedCard.java b/src/main/java/com/adyen/model/transfers/IssuedCard.java new file mode 100644 index 000000000..a21209a60 --- /dev/null +++ b/src/main/java/com/adyen/model/transfers/IssuedCard.java @@ -0,0 +1,389 @@ +/* + * Transfers API + * + * The version of the OpenAPI document: 4 + * + * + * 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.adyen.model.transfers; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.adyen.model.transfers.RelayedAuthorisationData; +import com.adyen.model.transfers.TransferNotificationValidationFact; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.ArrayList; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.core.JsonProcessingException; + + +/** + * IssuedCard + */ +@JsonPropertyOrder({ + IssuedCard.JSON_PROPERTY_PAN_ENTRY_MODE, + IssuedCard.JSON_PROPERTY_PROCESSING_TYPE, + IssuedCard.JSON_PROPERTY_RELAYED_AUTHORISATION_DATA, + IssuedCard.JSON_PROPERTY_TYPE, + IssuedCard.JSON_PROPERTY_VALIDATION_FACTS +}) + +public class IssuedCard { + /** + * Indicates the method used for entering the PAN to initiate a transaction. Possible values: **manual**, **chip**, **magstripe**, **contactless**, **cof**, **ecommerce**, **token**. + */ + public enum PanEntryModeEnum { + CHIP("chip"), + + COF("cof"), + + CONTACTLESS("contactless"), + + ECOMMERCE("ecommerce"), + + MAGSTRIPE("magstripe"), + + MANUAL("manual"), + + TOKEN("token"); + + private String value; + + PanEntryModeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static PanEntryModeEnum fromValue(String value) { + for (PanEntryModeEnum b : PanEntryModeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_PAN_ENTRY_MODE = "panEntryMode"; + private PanEntryModeEnum panEntryMode; + + /** + * Contains information about how the payment was processed. For example, **ecommerce** for online or **pos** for in-person payments. + */ + public enum ProcessingTypeEnum { + ATMWITHDRAW("atmWithdraw"), + + BALANCEINQUIRY("balanceInquiry"), + + ECOMMERCE("ecommerce"), + + MOTO("moto"), + + POS("pos"), + + PURCHASEWITHCASHBACK("purchaseWithCashback"), + + RECURRING("recurring"), + + TOKEN("token"); + + private String value; + + ProcessingTypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static ProcessingTypeEnum fromValue(String value) { + for (ProcessingTypeEnum b : ProcessingTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_PROCESSING_TYPE = "processingType"; + private ProcessingTypeEnum processingType; + + public static final String JSON_PROPERTY_RELAYED_AUTHORISATION_DATA = "relayedAuthorisationData"; + private RelayedAuthorisationData relayedAuthorisationData; + + /** + * **issuedCard** + */ + public enum TypeEnum { + ISSUEDCARD("issuedCard"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_TYPE = "type"; + private TypeEnum type = TypeEnum.ISSUEDCARD; + + public static final String JSON_PROPERTY_VALIDATION_FACTS = "validationFacts"; + private List validationFacts = null; + + public IssuedCard() { + } + + public IssuedCard panEntryMode(PanEntryModeEnum panEntryMode) { + this.panEntryMode = panEntryMode; + return this; + } + + /** + * Indicates the method used for entering the PAN to initiate a transaction. Possible values: **manual**, **chip**, **magstripe**, **contactless**, **cof**, **ecommerce**, **token**. + * @return panEntryMode + **/ + @ApiModelProperty(value = "Indicates the method used for entering the PAN to initiate a transaction. Possible values: **manual**, **chip**, **magstripe**, **contactless**, **cof**, **ecommerce**, **token**.") + @JsonProperty(JSON_PROPERTY_PAN_ENTRY_MODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public PanEntryModeEnum getPanEntryMode() { + return panEntryMode; + } + + + @JsonProperty(JSON_PROPERTY_PAN_ENTRY_MODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPanEntryMode(PanEntryModeEnum panEntryMode) { + this.panEntryMode = panEntryMode; + } + + + public IssuedCard processingType(ProcessingTypeEnum processingType) { + this.processingType = processingType; + return this; + } + + /** + * Contains information about how the payment was processed. For example, **ecommerce** for online or **pos** for in-person payments. + * @return processingType + **/ + @ApiModelProperty(value = "Contains information about how the payment was processed. For example, **ecommerce** for online or **pos** for in-person payments.") + @JsonProperty(JSON_PROPERTY_PROCESSING_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public ProcessingTypeEnum getProcessingType() { + return processingType; + } + + + @JsonProperty(JSON_PROPERTY_PROCESSING_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setProcessingType(ProcessingTypeEnum processingType) { + this.processingType = processingType; + } + + + public IssuedCard relayedAuthorisationData(RelayedAuthorisationData relayedAuthorisationData) { + this.relayedAuthorisationData = relayedAuthorisationData; + return this; + } + + /** + * Get relayedAuthorisationData + * @return relayedAuthorisationData + **/ + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_RELAYED_AUTHORISATION_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public RelayedAuthorisationData getRelayedAuthorisationData() { + return relayedAuthorisationData; + } + + + @JsonProperty(JSON_PROPERTY_RELAYED_AUTHORISATION_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setRelayedAuthorisationData(RelayedAuthorisationData relayedAuthorisationData) { + this.relayedAuthorisationData = relayedAuthorisationData; + } + + + public IssuedCard type(TypeEnum type) { + this.type = type; + return this; + } + + /** + * **issuedCard** + * @return type + **/ + @ApiModelProperty(value = "**issuedCard**") + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public TypeEnum getType() { + return type; + } + + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setType(TypeEnum type) { + this.type = type; + } + + + public IssuedCard validationFacts(List validationFacts) { + this.validationFacts = validationFacts; + return this; + } + + public IssuedCard addValidationFactsItem(TransferNotificationValidationFact validationFactsItem) { + if (this.validationFacts == null) { + this.validationFacts = new ArrayList<>(); + } + this.validationFacts.add(validationFactsItem); + return this; + } + + /** + * The evaluation of the validation facts. See [validation checks](https://docs.adyen.com/issuing/validation-checks) for more information. + * @return validationFacts + **/ + @ApiModelProperty(value = "The evaluation of the validation facts. See [validation checks](https://docs.adyen.com/issuing/validation-checks) for more information.") + @JsonProperty(JSON_PROPERTY_VALIDATION_FACTS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getValidationFacts() { + return validationFacts; + } + + + @JsonProperty(JSON_PROPERTY_VALIDATION_FACTS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setValidationFacts(List validationFacts) { + this.validationFacts = validationFacts; + } + + + /** + * Return true if this IssuedCard object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IssuedCard issuedCard = (IssuedCard) o; + return Objects.equals(this.panEntryMode, issuedCard.panEntryMode) && + Objects.equals(this.processingType, issuedCard.processingType) && + Objects.equals(this.relayedAuthorisationData, issuedCard.relayedAuthorisationData) && + Objects.equals(this.type, issuedCard.type) && + Objects.equals(this.validationFacts, issuedCard.validationFacts); + } + + @Override + public int hashCode() { + return Objects.hash(panEntryMode, processingType, relayedAuthorisationData, type, validationFacts); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IssuedCard {\n"); + sb.append(" panEntryMode: ").append(toIndentedString(panEntryMode)).append("\n"); + sb.append(" processingType: ").append(toIndentedString(processingType)).append("\n"); + sb.append(" relayedAuthorisationData: ").append(toIndentedString(relayedAuthorisationData)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" validationFacts: ").append(toIndentedString(validationFacts)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +/** + * Create an instance of IssuedCard given an JSON string + * + * @param jsonString JSON string + * @return An instance of IssuedCard + * @throws JsonProcessingException if the JSON string is invalid with respect to IssuedCard + */ + public static IssuedCard fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, IssuedCard.class); + } +/** + * Convert an instance of IssuedCard to an JSON string + * + * @return JSON string + */ + public String toJson() throws JsonProcessingException { + return JSON.getMapper().writeValueAsString(this); + } +} + diff --git a/src/main/java/com/adyen/model/transfers/JSONObject.java b/src/main/java/com/adyen/model/transfers/JSONObject.java index 832f99a52..8899bf9ff 100644 --- a/src/main/java/com/adyen/model/transfers/JSONObject.java +++ b/src/main/java/com/adyen/model/transfers/JSONObject.java @@ -1,7 +1,7 @@ /* * Transfers API * - * The version of the OpenAPI document: 3 + * The version of the OpenAPI document: 4 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/transfers/JSONPath.java b/src/main/java/com/adyen/model/transfers/JSONPath.java index d6b614c02..c081113fb 100644 --- a/src/main/java/com/adyen/model/transfers/JSONPath.java +++ b/src/main/java/com/adyen/model/transfers/JSONPath.java @@ -1,7 +1,7 @@ /* * Transfers API * - * The version of the OpenAPI document: 3 + * The version of the OpenAPI document: 4 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/transfers/Link.java b/src/main/java/com/adyen/model/transfers/Link.java index c62ea3295..225af449d 100644 --- a/src/main/java/com/adyen/model/transfers/Link.java +++ b/src/main/java/com/adyen/model/transfers/Link.java @@ -1,7 +1,7 @@ /* * Transfers API * - * The version of the OpenAPI document: 3 + * The version of the OpenAPI document: 4 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/transfers/Links.java b/src/main/java/com/adyen/model/transfers/Links.java index ab1790f6e..9d56f3823 100644 --- a/src/main/java/com/adyen/model/transfers/Links.java +++ b/src/main/java/com/adyen/model/transfers/Links.java @@ -1,7 +1,7 @@ /* * Transfers API * - * The version of the OpenAPI document: 3 + * The version of the OpenAPI document: 4 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/transfers/MerchantData.java b/src/main/java/com/adyen/model/transfers/MerchantData.java index 00fd6fc5b..32777b0ba 100644 --- a/src/main/java/com/adyen/model/transfers/MerchantData.java +++ b/src/main/java/com/adyen/model/transfers/MerchantData.java @@ -1,7 +1,7 @@ /* * Transfers API * - * The version of the OpenAPI document: 3 + * The version of the OpenAPI document: 4 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/transfers/NOLocalAccountIdentification.java b/src/main/java/com/adyen/model/transfers/NOLocalAccountIdentification.java index a119d1816..c639fddee 100644 --- a/src/main/java/com/adyen/model/transfers/NOLocalAccountIdentification.java +++ b/src/main/java/com/adyen/model/transfers/NOLocalAccountIdentification.java @@ -1,7 +1,7 @@ /* * Transfers API * - * The version of the OpenAPI document: 3 + * The version of the OpenAPI document: 4 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/transfers/NZLocalAccountIdentification.java b/src/main/java/com/adyen/model/transfers/NZLocalAccountIdentification.java index cc29c368c..440656f3c 100644 --- a/src/main/java/com/adyen/model/transfers/NZLocalAccountIdentification.java +++ b/src/main/java/com/adyen/model/transfers/NZLocalAccountIdentification.java @@ -1,7 +1,7 @@ /* * Transfers API * - * The version of the OpenAPI document: 3 + * The version of the OpenAPI document: 4 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/transfers/NameLocation.java b/src/main/java/com/adyen/model/transfers/NameLocation.java index 555af3c60..9cde56140 100644 --- a/src/main/java/com/adyen/model/transfers/NameLocation.java +++ b/src/main/java/com/adyen/model/transfers/NameLocation.java @@ -1,7 +1,7 @@ /* * Transfers API * - * The version of the OpenAPI document: 3 + * The version of the OpenAPI document: 4 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/transfers/NumberAndBicAccountIdentification.java b/src/main/java/com/adyen/model/transfers/NumberAndBicAccountIdentification.java index bb1a0e776..050e7f52a 100644 --- a/src/main/java/com/adyen/model/transfers/NumberAndBicAccountIdentification.java +++ b/src/main/java/com/adyen/model/transfers/NumberAndBicAccountIdentification.java @@ -1,7 +1,7 @@ /* * Transfers API * - * The version of the OpenAPI document: 3 + * The version of the OpenAPI document: 4 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/transfers/PLLocalAccountIdentification.java b/src/main/java/com/adyen/model/transfers/PLLocalAccountIdentification.java index 163b31ef5..996944c5a 100644 --- a/src/main/java/com/adyen/model/transfers/PLLocalAccountIdentification.java +++ b/src/main/java/com/adyen/model/transfers/PLLocalAccountIdentification.java @@ -1,7 +1,7 @@ /* * Transfers API * - * The version of the OpenAPI document: 3 + * The version of the OpenAPI document: 4 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/transfers/PartyIdentification2.java b/src/main/java/com/adyen/model/transfers/PartyIdentification.java similarity index 80% rename from src/main/java/com/adyen/model/transfers/PartyIdentification2.java rename to src/main/java/com/adyen/model/transfers/PartyIdentification.java index a40d8aae7..1c26c1be9 100644 --- a/src/main/java/com/adyen/model/transfers/PartyIdentification2.java +++ b/src/main/java/com/adyen/model/transfers/PartyIdentification.java @@ -1,7 +1,7 @@ /* * Transfers API * - * The version of the OpenAPI document: 3 + * The version of the OpenAPI document: 4 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -16,7 +16,7 @@ import java.util.Arrays; import java.util.Map; import java.util.HashMap; -import com.adyen.model.transfers.Address2; +import com.adyen.model.transfers.Address; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -30,22 +30,21 @@ /** - * PartyIdentification2 + * PartyIdentification */ @JsonPropertyOrder({ - PartyIdentification2.JSON_PROPERTY_ADDRESS, - PartyIdentification2.JSON_PROPERTY_DATE_OF_BIRTH, - PartyIdentification2.JSON_PROPERTY_FIRST_NAME, - PartyIdentification2.JSON_PROPERTY_FULL_NAME, - PartyIdentification2.JSON_PROPERTY_LAST_NAME, - PartyIdentification2.JSON_PROPERTY_REFERENCE, - PartyIdentification2.JSON_PROPERTY_TYPE + PartyIdentification.JSON_PROPERTY_ADDRESS, + PartyIdentification.JSON_PROPERTY_DATE_OF_BIRTH, + PartyIdentification.JSON_PROPERTY_FIRST_NAME, + PartyIdentification.JSON_PROPERTY_FULL_NAME, + PartyIdentification.JSON_PROPERTY_LAST_NAME, + PartyIdentification.JSON_PROPERTY_REFERENCE, + PartyIdentification.JSON_PROPERTY_TYPE }) -@JsonTypeName("PartyIdentification-2") -public class PartyIdentification2 { +public class PartyIdentification { public static final String JSON_PROPERTY_ADDRESS = "address"; - private Address2 address; + private Address address; public static final String JSON_PROPERTY_DATE_OF_BIRTH = "dateOfBirth"; private LocalDate dateOfBirth; @@ -102,10 +101,10 @@ public static TypeEnum fromValue(String value) { public static final String JSON_PROPERTY_TYPE = "type"; private TypeEnum type = TypeEnum.UNKNOWN; - public PartyIdentification2() { + public PartyIdentification() { } - public PartyIdentification2 address(Address2 address) { + public PartyIdentification address(Address address) { this.address = address; return this; } @@ -118,19 +117,19 @@ public PartyIdentification2 address(Address2 address) { @JsonProperty(JSON_PROPERTY_ADDRESS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Address2 getAddress() { + public Address getAddress() { return address; } @JsonProperty(JSON_PROPERTY_ADDRESS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAddress(Address2 address) { + public void setAddress(Address address) { this.address = address; } - public PartyIdentification2 dateOfBirth(LocalDate dateOfBirth) { + public PartyIdentification dateOfBirth(LocalDate dateOfBirth) { this.dateOfBirth = dateOfBirth; return this; } @@ -155,7 +154,7 @@ public void setDateOfBirth(LocalDate dateOfBirth) { } - public PartyIdentification2 firstName(String firstName) { + public PartyIdentification firstName(String firstName) { this.firstName = firstName; return this; } @@ -180,7 +179,7 @@ public void setFirstName(String firstName) { } - public PartyIdentification2 fullName(String fullName) { + public PartyIdentification fullName(String fullName) { this.fullName = fullName; return this; } @@ -205,7 +204,7 @@ public void setFullName(String fullName) { } - public PartyIdentification2 lastName(String lastName) { + public PartyIdentification lastName(String lastName) { this.lastName = lastName; return this; } @@ -230,7 +229,7 @@ public void setLastName(String lastName) { } - public PartyIdentification2 reference(String reference) { + public PartyIdentification reference(String reference) { this.reference = reference; return this; } @@ -255,7 +254,7 @@ public void setReference(String reference) { } - public PartyIdentification2 type(TypeEnum type) { + public PartyIdentification type(TypeEnum type) { this.type = type; return this; } @@ -281,7 +280,7 @@ public void setType(TypeEnum type) { /** - * Return true if this PartyIdentification-2 object is equal to o. + * Return true if this PartyIdentification object is equal to o. */ @Override public boolean equals(Object o) { @@ -291,14 +290,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - PartyIdentification2 partyIdentification2 = (PartyIdentification2) o; - return Objects.equals(this.address, partyIdentification2.address) && - Objects.equals(this.dateOfBirth, partyIdentification2.dateOfBirth) && - Objects.equals(this.firstName, partyIdentification2.firstName) && - Objects.equals(this.fullName, partyIdentification2.fullName) && - Objects.equals(this.lastName, partyIdentification2.lastName) && - Objects.equals(this.reference, partyIdentification2.reference) && - Objects.equals(this.type, partyIdentification2.type); + PartyIdentification partyIdentification = (PartyIdentification) o; + return Objects.equals(this.address, partyIdentification.address) && + Objects.equals(this.dateOfBirth, partyIdentification.dateOfBirth) && + Objects.equals(this.firstName, partyIdentification.firstName) && + Objects.equals(this.fullName, partyIdentification.fullName) && + Objects.equals(this.lastName, partyIdentification.lastName) && + Objects.equals(this.reference, partyIdentification.reference) && + Objects.equals(this.type, partyIdentification.type); } @Override @@ -309,7 +308,7 @@ public int hashCode() { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class PartyIdentification2 {\n"); + sb.append("class PartyIdentification {\n"); sb.append(" address: ").append(toIndentedString(address)).append("\n"); sb.append(" dateOfBirth: ").append(toIndentedString(dateOfBirth)).append("\n"); sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n"); @@ -333,17 +332,17 @@ private String toIndentedString(Object o) { } /** - * Create an instance of PartyIdentification2 given an JSON string + * Create an instance of PartyIdentification given an JSON string * * @param jsonString JSON string - * @return An instance of PartyIdentification2 - * @throws JsonProcessingException if the JSON string is invalid with respect to PartyIdentification2 + * @return An instance of PartyIdentification + * @throws JsonProcessingException if the JSON string is invalid with respect to PartyIdentification */ - public static PartyIdentification2 fromJson(String jsonString) throws JsonProcessingException { - return JSON.getMapper().readValue(jsonString, PartyIdentification2.class); + public static PartyIdentification fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, PartyIdentification.class); } /** - * Convert an instance of PartyIdentification2 to an JSON string + * Convert an instance of PartyIdentification to an JSON string * * @return JSON string */ diff --git a/src/main/java/com/adyen/model/transfers/PaymentInstrument.java b/src/main/java/com/adyen/model/transfers/PaymentInstrument.java index 6301d626a..7d048cde6 100644 --- a/src/main/java/com/adyen/model/transfers/PaymentInstrument.java +++ b/src/main/java/com/adyen/model/transfers/PaymentInstrument.java @@ -1,7 +1,7 @@ /* * Transfers API * - * The version of the OpenAPI document: 3 + * The version of the OpenAPI document: 4 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/transfers/PlatformPayment.java b/src/main/java/com/adyen/model/transfers/PlatformPayment.java new file mode 100644 index 000000000..7a5c907d1 --- /dev/null +++ b/src/main/java/com/adyen/model/transfers/PlatformPayment.java @@ -0,0 +1,373 @@ +/* + * Transfers API + * + * The version of the OpenAPI document: 4 + * + * + * 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.adyen.model.transfers; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.core.JsonProcessingException; + + +/** + * PlatformPayment + */ +@JsonPropertyOrder({ + PlatformPayment.JSON_PROPERTY_MODIFICATION_MERCHANT_REFERENCE, + PlatformPayment.JSON_PROPERTY_MODIFICATION_PSP_REFERENCE, + PlatformPayment.JSON_PROPERTY_PAYMENT_MERCHANT_REFERENCE, + PlatformPayment.JSON_PROPERTY_PLATFORM_PAYMENT_TYPE, + PlatformPayment.JSON_PROPERTY_PSP_PAYMENT_REFERENCE, + PlatformPayment.JSON_PROPERTY_TYPE +}) + +public class PlatformPayment { + public static final String JSON_PROPERTY_MODIFICATION_MERCHANT_REFERENCE = "modificationMerchantReference"; + private String modificationMerchantReference; + + public static final String JSON_PROPERTY_MODIFICATION_PSP_REFERENCE = "modificationPspReference"; + private String modificationPspReference; + + public static final String JSON_PROPERTY_PAYMENT_MERCHANT_REFERENCE = "paymentMerchantReference"; + private String paymentMerchantReference; + + /** + * The type of the related split. + */ + public enum PlatformPaymentTypeEnum { + ACQUIRINGFEES("AcquiringFees"), + + ADYENCOMMISSION("AdyenCommission"), + + ADYENFEES("AdyenFees"), + + ADYENMARKUP("AdyenMarkup"), + + BALANCEACCOUNT("BalanceAccount"), + + COMMISSION("Commission"), + + DEFAULT("Default"), + + INTERCHANGE("Interchange"), + + PAYMENTFEE("PaymentFee"), + + REMAINDER("Remainder"), + + SCHEMEFEE("SchemeFee"), + + TOPUP("TopUp"), + + VAT("VAT"); + + private String value; + + PlatformPaymentTypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static PlatformPaymentTypeEnum fromValue(String value) { + for (PlatformPaymentTypeEnum b : PlatformPaymentTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_PLATFORM_PAYMENT_TYPE = "platformPaymentType"; + private PlatformPaymentTypeEnum platformPaymentType; + + public static final String JSON_PROPERTY_PSP_PAYMENT_REFERENCE = "pspPaymentReference"; + private String pspPaymentReference; + + /** + * **platformPayment** + */ + public enum TypeEnum { + PLATFORMPAYMENT("platformPayment"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_TYPE = "type"; + private TypeEnum type = TypeEnum.PLATFORMPAYMENT; + + public PlatformPayment() { + } + + public PlatformPayment modificationMerchantReference(String modificationMerchantReference) { + this.modificationMerchantReference = modificationMerchantReference; + return this; + } + + /** + * The capture's merchant reference included in the transfer. + * @return modificationMerchantReference + **/ + @ApiModelProperty(value = "The capture's merchant reference included in the transfer.") + @JsonProperty(JSON_PROPERTY_MODIFICATION_MERCHANT_REFERENCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getModificationMerchantReference() { + return modificationMerchantReference; + } + + + @JsonProperty(JSON_PROPERTY_MODIFICATION_MERCHANT_REFERENCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setModificationMerchantReference(String modificationMerchantReference) { + this.modificationMerchantReference = modificationMerchantReference; + } + + + public PlatformPayment modificationPspReference(String modificationPspReference) { + this.modificationPspReference = modificationPspReference; + return this; + } + + /** + * The capture reference included in the transfer. + * @return modificationPspReference + **/ + @ApiModelProperty(value = "The capture reference included in the transfer.") + @JsonProperty(JSON_PROPERTY_MODIFICATION_PSP_REFERENCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getModificationPspReference() { + return modificationPspReference; + } + + + @JsonProperty(JSON_PROPERTY_MODIFICATION_PSP_REFERENCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setModificationPspReference(String modificationPspReference) { + this.modificationPspReference = modificationPspReference; + } + + + public PlatformPayment paymentMerchantReference(String paymentMerchantReference) { + this.paymentMerchantReference = paymentMerchantReference; + return this; + } + + /** + * The payment's merchant reference included in the transfer. + * @return paymentMerchantReference + **/ + @ApiModelProperty(value = "The payment's merchant reference included in the transfer.") + @JsonProperty(JSON_PROPERTY_PAYMENT_MERCHANT_REFERENCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getPaymentMerchantReference() { + return paymentMerchantReference; + } + + + @JsonProperty(JSON_PROPERTY_PAYMENT_MERCHANT_REFERENCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPaymentMerchantReference(String paymentMerchantReference) { + this.paymentMerchantReference = paymentMerchantReference; + } + + + public PlatformPayment platformPaymentType(PlatformPaymentTypeEnum platformPaymentType) { + this.platformPaymentType = platformPaymentType; + return this; + } + + /** + * The type of the related split. + * @return platformPaymentType + **/ + @ApiModelProperty(value = "The type of the related split.") + @JsonProperty(JSON_PROPERTY_PLATFORM_PAYMENT_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public PlatformPaymentTypeEnum getPlatformPaymentType() { + return platformPaymentType; + } + + + @JsonProperty(JSON_PROPERTY_PLATFORM_PAYMENT_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPlatformPaymentType(PlatformPaymentTypeEnum platformPaymentType) { + this.platformPaymentType = platformPaymentType; + } + + + public PlatformPayment pspPaymentReference(String pspPaymentReference) { + this.pspPaymentReference = pspPaymentReference; + return this; + } + + /** + * The payment reference included in the transfer. + * @return pspPaymentReference + **/ + @ApiModelProperty(value = "The payment reference included in the transfer.") + @JsonProperty(JSON_PROPERTY_PSP_PAYMENT_REFERENCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getPspPaymentReference() { + return pspPaymentReference; + } + + + @JsonProperty(JSON_PROPERTY_PSP_PAYMENT_REFERENCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPspPaymentReference(String pspPaymentReference) { + this.pspPaymentReference = pspPaymentReference; + } + + + public PlatformPayment type(TypeEnum type) { + this.type = type; + return this; + } + + /** + * **platformPayment** + * @return type + **/ + @ApiModelProperty(value = "**platformPayment**") + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public TypeEnum getType() { + return type; + } + + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setType(TypeEnum type) { + this.type = type; + } + + + /** + * Return true if this PlatformPayment object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PlatformPayment platformPayment = (PlatformPayment) o; + return Objects.equals(this.modificationMerchantReference, platformPayment.modificationMerchantReference) && + Objects.equals(this.modificationPspReference, platformPayment.modificationPspReference) && + Objects.equals(this.paymentMerchantReference, platformPayment.paymentMerchantReference) && + Objects.equals(this.platformPaymentType, platformPayment.platformPaymentType) && + Objects.equals(this.pspPaymentReference, platformPayment.pspPaymentReference) && + Objects.equals(this.type, platformPayment.type); + } + + @Override + public int hashCode() { + return Objects.hash(modificationMerchantReference, modificationPspReference, paymentMerchantReference, platformPaymentType, pspPaymentReference, type); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PlatformPayment {\n"); + sb.append(" modificationMerchantReference: ").append(toIndentedString(modificationMerchantReference)).append("\n"); + sb.append(" modificationPspReference: ").append(toIndentedString(modificationPspReference)).append("\n"); + sb.append(" paymentMerchantReference: ").append(toIndentedString(paymentMerchantReference)).append("\n"); + sb.append(" platformPaymentType: ").append(toIndentedString(platformPaymentType)).append("\n"); + sb.append(" pspPaymentReference: ").append(toIndentedString(pspPaymentReference)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +/** + * Create an instance of PlatformPayment given an JSON string + * + * @param jsonString JSON string + * @return An instance of PlatformPayment + * @throws JsonProcessingException if the JSON string is invalid with respect to PlatformPayment + */ + public static PlatformPayment fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, PlatformPayment.class); + } +/** + * Convert an instance of PlatformPayment to an JSON string + * + * @return JSON string + */ + public String toJson() throws JsonProcessingException { + return JSON.getMapper().writeValueAsString(this); + } +} + diff --git a/src/main/java/com/adyen/model/transfers/RelayedAuthorisationData.java b/src/main/java/com/adyen/model/transfers/RelayedAuthorisationData.java new file mode 100644 index 000000000..4b2332bae --- /dev/null +++ b/src/main/java/com/adyen/model/transfers/RelayedAuthorisationData.java @@ -0,0 +1,170 @@ +/* + * Transfers API + * + * The version of the OpenAPI document: 4 + * + * + * 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.adyen.model.transfers; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.core.JsonProcessingException; + + +/** + * RelayedAuthorisationData + */ +@JsonPropertyOrder({ + RelayedAuthorisationData.JSON_PROPERTY_METADATA, + RelayedAuthorisationData.JSON_PROPERTY_REFERENCE +}) + +public class RelayedAuthorisationData { + public static final String JSON_PROPERTY_METADATA = "metadata"; + private Map metadata = null; + + public static final String JSON_PROPERTY_REFERENCE = "reference"; + private String reference; + + public RelayedAuthorisationData() { + } + + public RelayedAuthorisationData metadata(Map metadata) { + this.metadata = metadata; + return this; + } + + public RelayedAuthorisationData putMetadataItem(String key, String metadataItem) { + if (this.metadata == null) { + this.metadata = new HashMap<>(); + } + this.metadata.put(key, metadataItem); + return this; + } + + /** + * Contains key-value pairs of your references and descriptions, for example, `customId`:`your-own-custom-field-12345`. + * @return metadata + **/ + @ApiModelProperty(value = "Contains key-value pairs of your references and descriptions, for example, `customId`:`your-own-custom-field-12345`.") + @JsonProperty(JSON_PROPERTY_METADATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Map getMetadata() { + return metadata; + } + + + @JsonProperty(JSON_PROPERTY_METADATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMetadata(Map metadata) { + this.metadata = metadata; + } + + + public RelayedAuthorisationData reference(String reference) { + this.reference = reference; + return this; + } + + /** + * Your reference for the relayed authorisation data. + * @return reference + **/ + @ApiModelProperty(value = "Your reference for the relayed authorisation data.") + @JsonProperty(JSON_PROPERTY_REFERENCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getReference() { + return reference; + } + + + @JsonProperty(JSON_PROPERTY_REFERENCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setReference(String reference) { + this.reference = reference; + } + + + /** + * Return true if this RelayedAuthorisationData object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RelayedAuthorisationData relayedAuthorisationData = (RelayedAuthorisationData) o; + return Objects.equals(this.metadata, relayedAuthorisationData.metadata) && + Objects.equals(this.reference, relayedAuthorisationData.reference); + } + + @Override + public int hashCode() { + return Objects.hash(metadata, reference); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RelayedAuthorisationData {\n"); + sb.append(" metadata: ").append(toIndentedString(metadata)).append("\n"); + sb.append(" reference: ").append(toIndentedString(reference)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +/** + * Create an instance of RelayedAuthorisationData given an JSON string + * + * @param jsonString JSON string + * @return An instance of RelayedAuthorisationData + * @throws JsonProcessingException if the JSON string is invalid with respect to RelayedAuthorisationData + */ + public static RelayedAuthorisationData fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, RelayedAuthorisationData.class); + } +/** + * Convert an instance of RelayedAuthorisationData to an JSON string + * + * @return JSON string + */ + public String toJson() throws JsonProcessingException { + return JSON.getMapper().writeValueAsString(this); + } +} + diff --git a/src/main/java/com/adyen/model/transfers/Repayment.java b/src/main/java/com/adyen/model/transfers/Repayment.java index 07b6dbd1e..6b9a69ef0 100644 --- a/src/main/java/com/adyen/model/transfers/Repayment.java +++ b/src/main/java/com/adyen/model/transfers/Repayment.java @@ -1,7 +1,7 @@ /* * Transfers API * - * The version of the OpenAPI document: 3 + * The version of the OpenAPI document: 4 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/transfers/RepaymentTerm.java b/src/main/java/com/adyen/model/transfers/RepaymentTerm.java index c3f8102a5..fcdd2bb88 100644 --- a/src/main/java/com/adyen/model/transfers/RepaymentTerm.java +++ b/src/main/java/com/adyen/model/transfers/RepaymentTerm.java @@ -1,7 +1,7 @@ /* * Transfers API * - * The version of the OpenAPI document: 3 + * The version of the OpenAPI document: 4 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/transfers/ResourceReference.java b/src/main/java/com/adyen/model/transfers/ResourceReference.java index 9566e4531..a52333f9b 100644 --- a/src/main/java/com/adyen/model/transfers/ResourceReference.java +++ b/src/main/java/com/adyen/model/transfers/ResourceReference.java @@ -1,7 +1,7 @@ /* * Transfers API * - * The version of the OpenAPI document: 3 + * The version of the OpenAPI document: 4 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/transfers/RestServiceError.java b/src/main/java/com/adyen/model/transfers/RestServiceError.java index 921184209..b96aedd30 100644 --- a/src/main/java/com/adyen/model/transfers/RestServiceError.java +++ b/src/main/java/com/adyen/model/transfers/RestServiceError.java @@ -1,7 +1,7 @@ /* * Transfers API * - * The version of the OpenAPI document: 3 + * The version of the OpenAPI document: 4 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/transfers/ReturnTransferRequest.java b/src/main/java/com/adyen/model/transfers/ReturnTransferRequest.java new file mode 100644 index 000000000..08695c039 --- /dev/null +++ b/src/main/java/com/adyen/model/transfers/ReturnTransferRequest.java @@ -0,0 +1,160 @@ +/* + * Transfers API + * + * The version of the OpenAPI document: 4 + * + * + * 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.adyen.model.transfers; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.adyen.model.transfers.Amount; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.core.JsonProcessingException; + + +/** + * ReturnTransferRequest + */ +@JsonPropertyOrder({ + ReturnTransferRequest.JSON_PROPERTY_AMOUNT, + ReturnTransferRequest.JSON_PROPERTY_REFERENCE +}) + +public class ReturnTransferRequest { + public static final String JSON_PROPERTY_AMOUNT = "amount"; + private Amount amount; + + public static final String JSON_PROPERTY_REFERENCE = "reference"; + private String reference; + + public ReturnTransferRequest() { + } + + public ReturnTransferRequest amount(Amount amount) { + this.amount = amount; + return this; + } + + /** + * Get amount + * @return amount + **/ + @ApiModelProperty(required = true, value = "") + @JsonProperty(JSON_PROPERTY_AMOUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Amount getAmount() { + return amount; + } + + + @JsonProperty(JSON_PROPERTY_AMOUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAmount(Amount amount) { + this.amount = amount; + } + + + public ReturnTransferRequest reference(String reference) { + this.reference = reference; + return this; + } + + /** + * Your internal reference for the return. If you don't provide this in the request, Adyen generates a unique reference. This reference is used in all communication with you about the instruction status. We recommend using a unique value per instruction. If you need to provide multiple references for a transaction, separate them with hyphens (\"-\"). + * @return reference + **/ + @ApiModelProperty(value = "Your internal reference for the return. If you don't provide this in the request, Adyen generates a unique reference. This reference is used in all communication with you about the instruction status. We recommend using a unique value per instruction. If you need to provide multiple references for a transaction, separate them with hyphens (\"-\"). ") + @JsonProperty(JSON_PROPERTY_REFERENCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getReference() { + return reference; + } + + + @JsonProperty(JSON_PROPERTY_REFERENCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setReference(String reference) { + this.reference = reference; + } + + + /** + * Return true if this ReturnTransferRequest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ReturnTransferRequest returnTransferRequest = (ReturnTransferRequest) o; + return Objects.equals(this.amount, returnTransferRequest.amount) && + Objects.equals(this.reference, returnTransferRequest.reference); + } + + @Override + public int hashCode() { + return Objects.hash(amount, reference); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ReturnTransferRequest {\n"); + sb.append(" amount: ").append(toIndentedString(amount)).append("\n"); + sb.append(" reference: ").append(toIndentedString(reference)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +/** + * Create an instance of ReturnTransferRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of ReturnTransferRequest + * @throws JsonProcessingException if the JSON string is invalid with respect to ReturnTransferRequest + */ + public static ReturnTransferRequest fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, ReturnTransferRequest.class); + } +/** + * Convert an instance of ReturnTransferRequest to an JSON string + * + * @return JSON string + */ + public String toJson() throws JsonProcessingException { + return JSON.getMapper().writeValueAsString(this); + } +} + diff --git a/src/main/java/com/adyen/model/transfers/ReturnTransferResponse.java b/src/main/java/com/adyen/model/transfers/ReturnTransferResponse.java new file mode 100644 index 000000000..12a6451f5 --- /dev/null +++ b/src/main/java/com/adyen/model/transfers/ReturnTransferResponse.java @@ -0,0 +1,256 @@ +/* + * Transfers API + * + * The version of the OpenAPI document: 4 + * + * + * 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.adyen.model.transfers; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.core.JsonProcessingException; + + +/** + * ReturnTransferResponse + */ +@JsonPropertyOrder({ + ReturnTransferResponse.JSON_PROPERTY_ID, + ReturnTransferResponse.JSON_PROPERTY_REFERENCE, + ReturnTransferResponse.JSON_PROPERTY_STATUS, + ReturnTransferResponse.JSON_PROPERTY_TRANSFER_ID +}) + +public class ReturnTransferResponse { + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_REFERENCE = "reference"; + private String reference; + + /** + * The resulting status of the return. For example: **authorised**, **booked**, **error**. + */ + public enum StatusEnum { + AUTHORISED("Authorised"), + + DECLINED("Declined"); + + private String value; + + StatusEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_STATUS = "status"; + private StatusEnum status; + + public static final String JSON_PROPERTY_TRANSFER_ID = "transferId"; + private String transferId; + + public ReturnTransferResponse() { + } + + public ReturnTransferResponse id(String id) { + this.id = id; + return this; + } + + /** + * The unique identifier of the return. + * @return id + **/ + @ApiModelProperty(value = "The unique identifier of the return.") + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getId() { + return id; + } + + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setId(String id) { + this.id = id; + } + + + public ReturnTransferResponse reference(String reference) { + this.reference = reference; + return this; + } + + /** + * Your internal reference for the return. + * @return reference + **/ + @ApiModelProperty(value = "Your internal reference for the return.") + @JsonProperty(JSON_PROPERTY_REFERENCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getReference() { + return reference; + } + + + @JsonProperty(JSON_PROPERTY_REFERENCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setReference(String reference) { + this.reference = reference; + } + + + public ReturnTransferResponse status(StatusEnum status) { + this.status = status; + return this; + } + + /** + * The resulting status of the return. For example: **authorised**, **booked**, **error**. + * @return status + **/ + @ApiModelProperty(value = "The resulting status of the return. For example: **authorised**, **booked**, **error**.") + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public StatusEnum getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setStatus(StatusEnum status) { + this.status = status; + } + + + public ReturnTransferResponse transferId(String transferId) { + this.transferId = transferId; + return this; + } + + /** + * The unique identifier of the original transfer. + * @return transferId + **/ + @ApiModelProperty(value = "The unique identifier of the original transfer.") + @JsonProperty(JSON_PROPERTY_TRANSFER_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getTransferId() { + return transferId; + } + + + @JsonProperty(JSON_PROPERTY_TRANSFER_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTransferId(String transferId) { + this.transferId = transferId; + } + + + /** + * Return true if this ReturnTransferResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ReturnTransferResponse returnTransferResponse = (ReturnTransferResponse) o; + return Objects.equals(this.id, returnTransferResponse.id) && + Objects.equals(this.reference, returnTransferResponse.reference) && + Objects.equals(this.status, returnTransferResponse.status) && + Objects.equals(this.transferId, returnTransferResponse.transferId); + } + + @Override + public int hashCode() { + return Objects.hash(id, reference, status, transferId); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ReturnTransferResponse {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" reference: ").append(toIndentedString(reference)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" transferId: ").append(toIndentedString(transferId)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +/** + * Create an instance of ReturnTransferResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of ReturnTransferResponse + * @throws JsonProcessingException if the JSON string is invalid with respect to ReturnTransferResponse + */ + public static ReturnTransferResponse fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, ReturnTransferResponse.class); + } +/** + * Convert an instance of ReturnTransferResponse to an JSON string + * + * @return JSON string + */ + public String toJson() throws JsonProcessingException { + return JSON.getMapper().writeValueAsString(this); + } +} + diff --git a/src/main/java/com/adyen/model/transfers/SELocalAccountIdentification.java b/src/main/java/com/adyen/model/transfers/SELocalAccountIdentification.java index cb1057c74..237bd80af 100644 --- a/src/main/java/com/adyen/model/transfers/SELocalAccountIdentification.java +++ b/src/main/java/com/adyen/model/transfers/SELocalAccountIdentification.java @@ -1,7 +1,7 @@ /* * Transfers API * - * The version of the OpenAPI document: 3 + * The version of the OpenAPI document: 4 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/transfers/SGLocalAccountIdentification.java b/src/main/java/com/adyen/model/transfers/SGLocalAccountIdentification.java index 8ba1d88a5..db1d1e5a1 100644 --- a/src/main/java/com/adyen/model/transfers/SGLocalAccountIdentification.java +++ b/src/main/java/com/adyen/model/transfers/SGLocalAccountIdentification.java @@ -1,7 +1,7 @@ /* * Transfers API * - * The version of the OpenAPI document: 3 + * The version of the OpenAPI document: 4 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/transfers/ServiceError.java b/src/main/java/com/adyen/model/transfers/ServiceError.java index 32a28e36f..ee7ff68e8 100644 --- a/src/main/java/com/adyen/model/transfers/ServiceError.java +++ b/src/main/java/com/adyen/model/transfers/ServiceError.java @@ -1,7 +1,7 @@ /* * Transfers API * - * The version of the OpenAPI document: 3 + * The version of the OpenAPI document: 4 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/transfers/ThresholdRepayment.java b/src/main/java/com/adyen/model/transfers/ThresholdRepayment.java index 36aa8b334..fc77bf7f4 100644 --- a/src/main/java/com/adyen/model/transfers/ThresholdRepayment.java +++ b/src/main/java/com/adyen/model/transfers/ThresholdRepayment.java @@ -1,7 +1,7 @@ /* * Transfers API * - * The version of the OpenAPI document: 3 + * The version of the OpenAPI document: 4 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/transfers/Transaction.java b/src/main/java/com/adyen/model/transfers/Transaction.java index 39ecbef6d..cc3d2631f 100644 --- a/src/main/java/com/adyen/model/transfers/Transaction.java +++ b/src/main/java/com/adyen/model/transfers/Transaction.java @@ -1,7 +1,7 @@ /* * Transfers API * - * The version of the OpenAPI document: 3 + * The version of the OpenAPI document: 4 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,11 +13,18 @@ package com.adyen.model.transfers; import java.util.Objects; - +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.adyen.model.transfers.Amount; +import com.adyen.model.transfers.ResourceReference; +import com.adyen.model.transfers.TransferData; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.time.OffsetDateTime; import com.fasterxml.jackson.annotation.JsonPropertyOrder; @@ -28,37 +35,28 @@ * Transaction */ @JsonPropertyOrder({ - Transaction.JSON_PROPERTY_ACCOUNT_HOLDER_ID, + Transaction.JSON_PROPERTY_ACCOUNT_HOLDER, Transaction.JSON_PROPERTY_AMOUNT, - Transaction.JSON_PROPERTY_BALANCE_ACCOUNT_ID, + Transaction.JSON_PROPERTY_BALANCE_ACCOUNT, Transaction.JSON_PROPERTY_BALANCE_PLATFORM, Transaction.JSON_PROPERTY_BOOKING_DATE, - Transaction.JSON_PROPERTY_CATEGORY, - Transaction.JSON_PROPERTY_COUNTERPARTY, - Transaction.JSON_PROPERTY_CREATED_AT, Transaction.JSON_PROPERTY_CREATION_DATE, - Transaction.JSON_PROPERTY_DESCRIPTION, Transaction.JSON_PROPERTY_EVENT_ID, Transaction.JSON_PROPERTY_ID, - Transaction.JSON_PROPERTY_INSTRUCTED_AMOUNT, - Transaction.JSON_PROPERTY_PAYMENT_INSTRUMENT_ID, - Transaction.JSON_PROPERTY_REFERENCE, - Transaction.JSON_PROPERTY_REFERENCE_FOR_BENEFICIARY, Transaction.JSON_PROPERTY_STATUS, - Transaction.JSON_PROPERTY_TRANSFER_ID, - Transaction.JSON_PROPERTY_TYPE, + Transaction.JSON_PROPERTY_TRANSFER, Transaction.JSON_PROPERTY_VALUE_DATE }) public class Transaction { - public static final String JSON_PROPERTY_ACCOUNT_HOLDER_ID = "accountHolderId"; - private String accountHolderId; + public static final String JSON_PROPERTY_ACCOUNT_HOLDER = "accountHolder"; + private ResourceReference accountHolder; public static final String JSON_PROPERTY_AMOUNT = "amount"; private Amount amount; - public static final String JSON_PROPERTY_BALANCE_ACCOUNT_ID = "balanceAccountId"; - private String balanceAccountId; + public static final String JSON_PROPERTY_BALANCE_ACCOUNT = "balanceAccount"; + private ResourceReference balanceAccount; public static final String JSON_PROPERTY_BALANCE_PLATFORM = "balancePlatform"; private String balancePlatform; @@ -66,86 +64,15 @@ public class Transaction { public static final String JSON_PROPERTY_BOOKING_DATE = "bookingDate"; private OffsetDateTime bookingDate; - /** - * The category of the transaction indicating the type of activity. Possible values: * **platformPayment**: The transaction is a payment or payment modification made with an Adyen merchant account. * **internal**: The transaction resulted from an internal adjustment such as a deposit correction or invoice deduction. * **bank**: The transaction is a bank-related activity, such as sending a payout or receiving funds. * **issuedCard**: The transaction is a card-related activity, such as using an Adyen-issued card to pay online. - */ - public enum CategoryEnum { - BANK("bank"), - - CARD("card"), - - GRANTS("grants"), - - INTERNAL("internal"), - - ISSUEDCARD("issuedCard"), - - MIGRATION("migration"), - - PLATFORMPAYMENT("platformPayment"), - - UPGRADE("upgrade"); - - private String value; - - CategoryEnum(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static CategoryEnum fromValue(String value) { - for (CategoryEnum b : CategoryEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - } - - public static final String JSON_PROPERTY_CATEGORY = "category"; - private CategoryEnum category; - - public static final String JSON_PROPERTY_COUNTERPARTY = "counterparty"; - private CounterpartyV3 counterparty; - - public static final String JSON_PROPERTY_CREATED_AT = "createdAt"; - private OffsetDateTime createdAt; - public static final String JSON_PROPERTY_CREATION_DATE = "creationDate"; private OffsetDateTime creationDate; - public static final String JSON_PROPERTY_DESCRIPTION = "description"; - private String description; - public static final String JSON_PROPERTY_EVENT_ID = "eventId"; private String eventId; public static final String JSON_PROPERTY_ID = "id"; private String id; - public static final String JSON_PROPERTY_INSTRUCTED_AMOUNT = "instructedAmount"; - private Amount instructedAmount; - - public static final String JSON_PROPERTY_PAYMENT_INSTRUMENT_ID = "paymentInstrumentId"; - private String paymentInstrumentId; - - public static final String JSON_PROPERTY_REFERENCE = "reference"; - private String reference; - - public static final String JSON_PROPERTY_REFERENCE_FOR_BENEFICIARY = "referenceForBeneficiary"; - private String referenceForBeneficiary; - /** * The status of the transaction. Possible values: * **pending**: The transaction is still pending. * **booked**: The transaction has been booked to the balance account. */ @@ -184,139 +111,37 @@ public static StatusEnum fromValue(String value) { public static final String JSON_PROPERTY_STATUS = "status"; private StatusEnum status; - public static final String JSON_PROPERTY_TRANSFER_ID = "transferId"; - private String transferId; - - /** - * The type of the transaction. Possible values: **payment**, **capture**, **captureReversal**, **refund** **refundReversal**, **chargeback**, **chargebackReversal**, **secondChargeback**, **atmWithdrawal**, **atmWithdrawalReversal**, **internalTransfer**, **manualCorrection**, **invoiceDeduction**, **depositCorrection**, **bankTransfer**, **miscCost**, **paymentCost**, **fee** - */ - public enum TypeEnum { - ATMWITHDRAWAL("atmWithdrawal"), - - ATMWITHDRAWALREVERSAL("atmWithdrawalReversal"), - - BALANCEADJUSTMENT("balanceAdjustment"), - - BALANCEMIGRATION("balanceMigration"), - - BALANCEROLLOVER("balanceRollover"), - - BANKTRANSFER("bankTransfer"), - - CAPTURE("capture"), - - CAPTUREREVERSAL("captureReversal"), - - CARDTRANSFER("cardTransfer"), - - CASHOUTFEE("cashOutFee"), - - CASHOUTFUNDING("cashOutFunding"), - - CASHOUTINSTRUCTION("cashOutInstruction"), - - CHARGEBACK("chargeback"), - - CHARGEBACKCORRECTION("chargebackCorrection"), - - CHARGEBACKREVERSAL("chargebackReversal"), - - CHARGEBACKREVERSALCORRECTION("chargebackReversalCorrection"), - - DEPOSITCORRECTION("depositCorrection"), - - FEE("fee"), - - GRANT("grant"), - - INSTALLMENT("installment"), - - INSTALLMENTREVERSAL("installmentReversal"), - - INTERNALTRANSFER("internalTransfer"), - - INVOICEDEDUCTION("invoiceDeduction"), - - LEFTOVER("leftover"), - - MANUALCORRECTION("manualCorrection"), - - MISCCOST("miscCost"), - - PAYMENT("payment"), - - PAYMENTCOST("paymentCost"), - - REFUND("refund"), - - REFUNDREVERSAL("refundReversal"), - - REPAYMENT("repayment"), - - RESERVEADJUSTMENT("reserveAdjustment"), - - SECONDCHARGEBACK("secondChargeback"), - - SECONDCHARGEBACKCORRECTION("secondChargebackCorrection"); - - private String value; - - TypeEnum(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static TypeEnum fromValue(String value) { - for (TypeEnum b : TypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - } - - public static final String JSON_PROPERTY_TYPE = "type"; - private TypeEnum type; + public static final String JSON_PROPERTY_TRANSFER = "transfer"; + private TransferData transfer; public static final String JSON_PROPERTY_VALUE_DATE = "valueDate"; private OffsetDateTime valueDate; - public Transaction() { + public Transaction() { } - public Transaction accountHolderId(String accountHolderId) { - this.accountHolderId = accountHolderId; + public Transaction accountHolder(ResourceReference accountHolder) { + this.accountHolder = accountHolder; return this; } /** - * Unique identifier of the account holder. - * @return accountHolderId + * Get accountHolder + * @return accountHolder **/ - @ApiModelProperty(required = true, value = "Unique identifier of the account holder.") - @JsonProperty(JSON_PROPERTY_ACCOUNT_HOLDER_ID) + @ApiModelProperty(required = true, value = "") + @JsonProperty(JSON_PROPERTY_ACCOUNT_HOLDER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getAccountHolderId() { - return accountHolderId; + public ResourceReference getAccountHolder() { + return accountHolder; } - @JsonProperty(JSON_PROPERTY_ACCOUNT_HOLDER_ID) + @JsonProperty(JSON_PROPERTY_ACCOUNT_HOLDER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAccountHolderId(String accountHolderId) { - this.accountHolderId = accountHolderId; + public void setAccountHolder(ResourceReference accountHolder) { + this.accountHolder = accountHolder; } @@ -345,28 +170,28 @@ public void setAmount(Amount amount) { } - public Transaction balanceAccountId(String balanceAccountId) { - this.balanceAccountId = balanceAccountId; + public Transaction balanceAccount(ResourceReference balanceAccount) { + this.balanceAccount = balanceAccount; return this; } /** - * Unique identifier of the balance account. - * @return balanceAccountId + * Get balanceAccount + * @return balanceAccount **/ - @ApiModelProperty(required = true, value = "Unique identifier of the balance account.") - @JsonProperty(JSON_PROPERTY_BALANCE_ACCOUNT_ID) + @ApiModelProperty(required = true, value = "") + @JsonProperty(JSON_PROPERTY_BALANCE_ACCOUNT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getBalanceAccountId() { - return balanceAccountId; + public ResourceReference getBalanceAccount() { + return balanceAccount; } - @JsonProperty(JSON_PROPERTY_BALANCE_ACCOUNT_ID) + @JsonProperty(JSON_PROPERTY_BALANCE_ACCOUNT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setBalanceAccountId(String balanceAccountId) { - this.balanceAccountId = balanceAccountId; + public void setBalanceAccount(ResourceReference balanceAccount) { + this.balanceAccount = balanceAccount; } @@ -420,81 +245,6 @@ public void setBookingDate(OffsetDateTime bookingDate) { } - public Transaction category(CategoryEnum category) { - this.category = category; - return this; - } - - /** - * The category of the transaction indicating the type of activity. Possible values: * **platformPayment**: The transaction is a payment or payment modification made with an Adyen merchant account. * **internal**: The transaction resulted from an internal adjustment such as a deposit correction or invoice deduction. * **bank**: The transaction is a bank-related activity, such as sending a payout or receiving funds. * **issuedCard**: The transaction is a card-related activity, such as using an Adyen-issued card to pay online. - * @return category - **/ - @ApiModelProperty(value = "The category of the transaction indicating the type of activity. Possible values: * **platformPayment**: The transaction is a payment or payment modification made with an Adyen merchant account. * **internal**: The transaction resulted from an internal adjustment such as a deposit correction or invoice deduction. * **bank**: The transaction is a bank-related activity, such as sending a payout or receiving funds. * **issuedCard**: The transaction is a card-related activity, such as using an Adyen-issued card to pay online. ") - @JsonProperty(JSON_PROPERTY_CATEGORY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public CategoryEnum getCategory() { - return category; - } - - - @JsonProperty(JSON_PROPERTY_CATEGORY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCategory(CategoryEnum category) { - this.category = category; - } - - - public Transaction counterparty(CounterpartyV3 counterparty) { - this.counterparty = counterparty; - return this; - } - - /** - * Get counterparty - * @return counterparty - **/ - @ApiModelProperty(required = true, value = "") - @JsonProperty(JSON_PROPERTY_COUNTERPARTY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public CounterpartyV3 getCounterparty() { - return counterparty; - } - - - @JsonProperty(JSON_PROPERTY_COUNTERPARTY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCounterparty(CounterpartyV3 counterparty) { - this.counterparty = counterparty; - } - - - public Transaction createdAt(OffsetDateTime createdAt) { - this.createdAt = createdAt; - return this; - } - - /** - * The date the transaction was created. - * @return createdAt - **/ - @ApiModelProperty(required = true, value = "The date the transaction was created.") - @JsonProperty(JSON_PROPERTY_CREATED_AT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public OffsetDateTime getCreatedAt() { - return createdAt; - } - - - @JsonProperty(JSON_PROPERTY_CREATED_AT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCreatedAt(OffsetDateTime createdAt) { - this.createdAt = createdAt; - } - - public Transaction creationDate(OffsetDateTime creationDate) { this.creationDate = creationDate; return this; @@ -520,31 +270,6 @@ public void setCreationDate(OffsetDateTime creationDate) { } - public Transaction description(String description) { - this.description = description; - return this; - } - - /** - * The `description` from the `/transfers` request. - * @return description - **/ - @ApiModelProperty(value = "The `description` from the `/transfers` request.") - @JsonProperty(JSON_PROPERTY_DESCRIPTION) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getDescription() { - return description; - } - - - @JsonProperty(JSON_PROPERTY_DESCRIPTION) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setDescription(String description) { - this.description = description; - } - - public Transaction eventId(String eventId) { this.eventId = eventId; return this; @@ -595,106 +320,6 @@ public void setId(String id) { } - public Transaction instructedAmount(Amount instructedAmount) { - this.instructedAmount = instructedAmount; - return this; - } - - /** - * Get instructedAmount - * @return instructedAmount - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_INSTRUCTED_AMOUNT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Amount getInstructedAmount() { - return instructedAmount; - } - - - @JsonProperty(JSON_PROPERTY_INSTRUCTED_AMOUNT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setInstructedAmount(Amount instructedAmount) { - this.instructedAmount = instructedAmount; - } - - - public Transaction paymentInstrumentId(String paymentInstrumentId) { - this.paymentInstrumentId = paymentInstrumentId; - return this; - } - - /** - * The unique identifier of the payment instrument that was used for the transaction. - * @return paymentInstrumentId - **/ - @ApiModelProperty(value = "The unique identifier of the payment instrument that was used for the transaction.") - @JsonProperty(JSON_PROPERTY_PAYMENT_INSTRUMENT_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getPaymentInstrumentId() { - return paymentInstrumentId; - } - - - @JsonProperty(JSON_PROPERTY_PAYMENT_INSTRUMENT_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPaymentInstrumentId(String paymentInstrumentId) { - this.paymentInstrumentId = paymentInstrumentId; - } - - - public Transaction reference(String reference) { - this.reference = reference; - return this; - } - - /** - * The [`reference`](https://docs.adyen.com/api-explorer/#/transfers/latest/post/transfers__reqParam_reference) from the `/transfers` request. If you haven't provided any, Adyen generates a unique reference. - * @return reference - **/ - @ApiModelProperty(required = true, value = "The [`reference`](https://docs.adyen.com/api-explorer/#/transfers/latest/post/transfers__reqParam_reference) from the `/transfers` request. If you haven't provided any, Adyen generates a unique reference.") - @JsonProperty(JSON_PROPERTY_REFERENCE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getReference() { - return reference; - } - - - @JsonProperty(JSON_PROPERTY_REFERENCE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setReference(String reference) { - this.reference = reference; - } - - - public Transaction referenceForBeneficiary(String referenceForBeneficiary) { - this.referenceForBeneficiary = referenceForBeneficiary; - return this; - } - - /** - * The reference sent to or received from the counterparty. * For outgoing funds, this is the [`referenceForBeneficiary`](https://docs.adyen.com/api-explorer/#/transfers/latest/post/transfers__resParam_referenceForBeneficiary) from the [`/transfers`](https://docs.adyen.com/api-explorer/#/transfers/latest/post/transfers__reqParam_referenceForBeneficiary) request. * For incoming funds, this is the reference from the sender. - * @return referenceForBeneficiary - **/ - @ApiModelProperty(value = "The reference sent to or received from the counterparty. * For outgoing funds, this is the [`referenceForBeneficiary`](https://docs.adyen.com/api-explorer/#/transfers/latest/post/transfers__resParam_referenceForBeneficiary) from the [`/transfers`](https://docs.adyen.com/api-explorer/#/transfers/latest/post/transfers__reqParam_referenceForBeneficiary) request. * For incoming funds, this is the reference from the sender.") - @JsonProperty(JSON_PROPERTY_REFERENCE_FOR_BENEFICIARY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getReferenceForBeneficiary() { - return referenceForBeneficiary; - } - - - @JsonProperty(JSON_PROPERTY_REFERENCE_FOR_BENEFICIARY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setReferenceForBeneficiary(String referenceForBeneficiary) { - this.referenceForBeneficiary = referenceForBeneficiary; - } - - public Transaction status(StatusEnum status) { this.status = status; return this; @@ -720,53 +345,28 @@ public void setStatus(StatusEnum status) { } - public Transaction transferId(String transferId) { - this.transferId = transferId; + public Transaction transfer(TransferData transfer) { + this.transfer = transfer; return this; } /** - * Unique identifier of the related transfer. - * @return transferId + * Get transfer + * @return transfer **/ - @ApiModelProperty(value = "Unique identifier of the related transfer.") - @JsonProperty(JSON_PROPERTY_TRANSFER_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getTransferId() { - return transferId; - } - - - @JsonProperty(JSON_PROPERTY_TRANSFER_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTransferId(String transferId) { - this.transferId = transferId; - } - - - public Transaction type(TypeEnum type) { - this.type = type; - return this; - } - - /** - * The type of the transaction. Possible values: **payment**, **capture**, **captureReversal**, **refund** **refundReversal**, **chargeback**, **chargebackReversal**, **secondChargeback**, **atmWithdrawal**, **atmWithdrawalReversal**, **internalTransfer**, **manualCorrection**, **invoiceDeduction**, **depositCorrection**, **bankTransfer**, **miscCost**, **paymentCost**, **fee** - * @return type - **/ - @ApiModelProperty(value = "The type of the transaction. Possible values: **payment**, **capture**, **captureReversal**, **refund** **refundReversal**, **chargeback**, **chargebackReversal**, **secondChargeback**, **atmWithdrawal**, **atmWithdrawalReversal**, **internalTransfer**, **manualCorrection**, **invoiceDeduction**, **depositCorrection**, **bankTransfer**, **miscCost**, **paymentCost**, **fee**") - @JsonProperty(JSON_PROPERTY_TYPE) + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_TRANSFER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public TypeEnum getType() { - return type; + public TransferData getTransfer() { + return transfer; } - @JsonProperty(JSON_PROPERTY_TYPE) + @JsonProperty(JSON_PROPERTY_TRANSFER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setType(TypeEnum type) { - this.type = type; + public void setTransfer(TransferData transfer) { + this.transfer = transfer; } @@ -807,56 +407,38 @@ public boolean equals(Object o) { return false; } Transaction transaction = (Transaction) o; - return Objects.equals(this.accountHolderId, transaction.accountHolderId) && + return Objects.equals(this.accountHolder, transaction.accountHolder) && Objects.equals(this.amount, transaction.amount) && - Objects.equals(this.balanceAccountId, transaction.balanceAccountId) && + Objects.equals(this.balanceAccount, transaction.balanceAccount) && Objects.equals(this.balancePlatform, transaction.balancePlatform) && Objects.equals(this.bookingDate, transaction.bookingDate) && - Objects.equals(this.category, transaction.category) && - Objects.equals(this.counterparty, transaction.counterparty) && - Objects.equals(this.createdAt, transaction.createdAt) && Objects.equals(this.creationDate, transaction.creationDate) && - Objects.equals(this.description, transaction.description) && Objects.equals(this.eventId, transaction.eventId) && Objects.equals(this.id, transaction.id) && - Objects.equals(this.instructedAmount, transaction.instructedAmount) && - Objects.equals(this.paymentInstrumentId, transaction.paymentInstrumentId) && - Objects.equals(this.reference, transaction.reference) && - Objects.equals(this.referenceForBeneficiary, transaction.referenceForBeneficiary) && Objects.equals(this.status, transaction.status) && - Objects.equals(this.transferId, transaction.transferId) && - Objects.equals(this.type, transaction.type) && + Objects.equals(this.transfer, transaction.transfer) && Objects.equals(this.valueDate, transaction.valueDate); } @Override public int hashCode() { - return Objects.hash(accountHolderId, amount, balanceAccountId, balancePlatform, bookingDate, category, counterparty, createdAt, creationDate, description, eventId, id, instructedAmount, paymentInstrumentId, reference, referenceForBeneficiary, status, transferId, type, valueDate); + return Objects.hash(accountHolder, amount, balanceAccount, balancePlatform, bookingDate, creationDate, eventId, id, status, transfer, valueDate); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Transaction {\n"); - sb.append(" accountHolderId: ").append(toIndentedString(accountHolderId)).append("\n"); + sb.append(" accountHolder: ").append(toIndentedString(accountHolder)).append("\n"); sb.append(" amount: ").append(toIndentedString(amount)).append("\n"); - sb.append(" balanceAccountId: ").append(toIndentedString(balanceAccountId)).append("\n"); + sb.append(" balanceAccount: ").append(toIndentedString(balanceAccount)).append("\n"); sb.append(" balancePlatform: ").append(toIndentedString(balancePlatform)).append("\n"); sb.append(" bookingDate: ").append(toIndentedString(bookingDate)).append("\n"); - sb.append(" category: ").append(toIndentedString(category)).append("\n"); - sb.append(" counterparty: ").append(toIndentedString(counterparty)).append("\n"); - sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); sb.append(" creationDate: ").append(toIndentedString(creationDate)).append("\n"); - sb.append(" description: ").append(toIndentedString(description)).append("\n"); sb.append(" eventId: ").append(toIndentedString(eventId)).append("\n"); sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" instructedAmount: ").append(toIndentedString(instructedAmount)).append("\n"); - sb.append(" paymentInstrumentId: ").append(toIndentedString(paymentInstrumentId)).append("\n"); - sb.append(" reference: ").append(toIndentedString(reference)).append("\n"); - sb.append(" referenceForBeneficiary: ").append(toIndentedString(referenceForBeneficiary)).append("\n"); sb.append(" status: ").append(toIndentedString(status)).append("\n"); - sb.append(" transferId: ").append(toIndentedString(transferId)).append("\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" transfer: ").append(toIndentedString(transfer)).append("\n"); sb.append(" valueDate: ").append(toIndentedString(valueDate)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/src/main/java/com/adyen/model/transfers/TransactionSearchResponse.java b/src/main/java/com/adyen/model/transfers/TransactionSearchResponse.java index 1676aa433..a71ec380f 100644 --- a/src/main/java/com/adyen/model/transfers/TransactionSearchResponse.java +++ b/src/main/java/com/adyen/model/transfers/TransactionSearchResponse.java @@ -1,7 +1,7 @@ /* * Transfers API * - * The version of the OpenAPI document: 3 + * The version of the OpenAPI document: 4 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,9 +13,17 @@ package com.adyen.model.transfers; import java.util.Objects; - +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.adyen.model.transfers.Links; +import com.adyen.model.transfers.Transaction; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.util.ArrayList; import java.util.List; diff --git a/src/main/java/com/adyen/model/transfers/Transfer.java b/src/main/java/com/adyen/model/transfers/Transfer.java index 1df33f11d..ca498a027 100644 --- a/src/main/java/com/adyen/model/transfers/Transfer.java +++ b/src/main/java/com/adyen/model/transfers/Transfer.java @@ -1,7 +1,7 @@ /* * Transfers API * - * The version of the OpenAPI document: 3 + * The version of the OpenAPI document: 4 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -20,6 +20,7 @@ import com.adyen.model.transfers.CounterpartyV3; import com.adyen.model.transfers.PaymentInstrument; import com.adyen.model.transfers.ResourceReference; +import com.adyen.model.transfers.TransferCategoryData; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -39,16 +40,14 @@ Transfer.JSON_PROPERTY_ACCOUNT_HOLDER, Transfer.JSON_PROPERTY_AMOUNT, Transfer.JSON_PROPERTY_BALANCE_ACCOUNT, - Transfer.JSON_PROPERTY_BALANCE_ACCOUNT_ID, Transfer.JSON_PROPERTY_CATEGORY, + Transfer.JSON_PROPERTY_CATEGORY_DATA, Transfer.JSON_PROPERTY_COUNTERPARTY, Transfer.JSON_PROPERTY_CREATION_DATE, Transfer.JSON_PROPERTY_DESCRIPTION, Transfer.JSON_PROPERTY_DIRECTION, Transfer.JSON_PROPERTY_ID, Transfer.JSON_PROPERTY_PAYMENT_INSTRUMENT, - Transfer.JSON_PROPERTY_PAYMENT_INSTRUMENT_ID, - Transfer.JSON_PROPERTY_PRIORITY, Transfer.JSON_PROPERTY_REASON, Transfer.JSON_PROPERTY_REFERENCE, Transfer.JSON_PROPERTY_REFERENCE_FOR_BENEFICIARY, @@ -65,9 +64,6 @@ public class Transfer { public static final String JSON_PROPERTY_BALANCE_ACCOUNT = "balanceAccount"; private ResourceReference balanceAccount; - public static final String JSON_PROPERTY_BALANCE_ACCOUNT_ID = "balanceAccountId"; - private String balanceAccountId; - /** * The category of transfer. Possible values: - **bank**: Transfer to a [transfer instrument](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/transferInstruments__resParam_id) or a bank account. - **internal**: Transfer to another [balance account](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/post/balanceAccounts__resParam_id) within your platform. - **issuedCard**: Transfer initiated by a Adyen-issued card. - **platformPayment**: Fund movements related to payments that are acquired for your users. */ @@ -110,6 +106,9 @@ public static CategoryEnum fromValue(String value) { public static final String JSON_PROPERTY_CATEGORY = "category"; private CategoryEnum category; + public static final String JSON_PROPERTY_CATEGORY_DATA = "categoryData"; + private TransferCategoryData categoryData; + public static final String JSON_PROPERTY_COUNTERPARTY = "counterparty"; private CounterpartyV3 counterparty; @@ -163,57 +162,6 @@ public static DirectionEnum fromValue(String value) { public static final String JSON_PROPERTY_PAYMENT_INSTRUMENT = "paymentInstrument"; private PaymentInstrument paymentInstrument; - public static final String JSON_PROPERTY_PAYMENT_INSTRUMENT_ID = "paymentInstrumentId"; - private String paymentInstrumentId; - - /** - * The priority for the bank transfer. This sets the speed at which the transfer is sent and the fees that you have to pay. Required for transfers with `category` **bank**. Possible values: * **regular**: For normal, low-value transactions. * **fast**: Faster way to transfer funds but has higher fees. Recommended for high-priority, low-value transactions. * **wire**: Fastest way to transfer funds but has the highest fees. Recommended for high-priority, high-value transactions. * **instant**: Instant way to transfer funds in [SEPA countries](https://www.ecb.europa.eu/paym/integration/retail/sepa/html/index.en.html). * **crossBorder**: High-value transfer to a recipient in a different country. * **internal**: Transfer to an Adyen-issued business bank account (by bank account number/IBAN). This will be removed in v4 and replaced with a new field. - */ - public enum PriorityEnum { - CROSSBORDER("crossBorder"), - - DIRECTDEBIT("directDebit"), - - FAST("fast"), - - INSTANT("instant"), - - INTERNAL("internal"), - - REGULAR("regular"), - - WIRE("wire"); - - private String value; - - PriorityEnum(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static PriorityEnum fromValue(String value) { - for (PriorityEnum b : PriorityEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - } - - public static final String JSON_PROPERTY_PRIORITY = "priority"; - private PriorityEnum priority; - /** * Additional information about the status of the transfer. */ @@ -526,56 +474,53 @@ public void setBalanceAccount(ResourceReference balanceAccount) { } - public Transfer balanceAccountId(String balanceAccountId) { - this.balanceAccountId = balanceAccountId; + public Transfer category(CategoryEnum category) { + this.category = category; return this; } /** - * The unique identifier of the source [balance account](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/post/balanceAccounts__resParam_id). - * @return balanceAccountId - * @deprecated + * The category of transfer. Possible values: - **bank**: Transfer to a [transfer instrument](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/transferInstruments__resParam_id) or a bank account. - **internal**: Transfer to another [balance account](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/post/balanceAccounts__resParam_id) within your platform. - **issuedCard**: Transfer initiated by a Adyen-issued card. - **platformPayment**: Fund movements related to payments that are acquired for your users. + * @return category **/ - @Deprecated - @ApiModelProperty(value = "The unique identifier of the source [balance account](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/post/balanceAccounts__resParam_id).") - @JsonProperty(JSON_PROPERTY_BALANCE_ACCOUNT_ID) + @ApiModelProperty(required = true, value = "The category of transfer. Possible values: - **bank**: Transfer to a [transfer instrument](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/transferInstruments__resParam_id) or a bank account. - **internal**: Transfer to another [balance account](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/post/balanceAccounts__resParam_id) within your platform. - **issuedCard**: Transfer initiated by a Adyen-issued card. - **platformPayment**: Fund movements related to payments that are acquired for your users.") + @JsonProperty(JSON_PROPERTY_CATEGORY) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getBalanceAccountId() { - return balanceAccountId; + public CategoryEnum getCategory() { + return category; } - @Deprecated - @JsonProperty(JSON_PROPERTY_BALANCE_ACCOUNT_ID) + @JsonProperty(JSON_PROPERTY_CATEGORY) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setBalanceAccountId(String balanceAccountId) { - this.balanceAccountId = balanceAccountId; + public void setCategory(CategoryEnum category) { + this.category = category; } - public Transfer category(CategoryEnum category) { - this.category = category; + public Transfer categoryData(TransferCategoryData categoryData) { + this.categoryData = categoryData; return this; } /** - * The category of transfer. Possible values: - **bank**: Transfer to a [transfer instrument](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/transferInstruments__resParam_id) or a bank account. - **internal**: Transfer to another [balance account](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/post/balanceAccounts__resParam_id) within your platform. - **issuedCard**: Transfer initiated by a Adyen-issued card. - **platformPayment**: Fund movements related to payments that are acquired for your users. - * @return category + * Get categoryData + * @return categoryData **/ - @ApiModelProperty(required = true, value = "The category of transfer. Possible values: - **bank**: Transfer to a [transfer instrument](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/transferInstruments__resParam_id) or a bank account. - **internal**: Transfer to another [balance account](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/post/balanceAccounts__resParam_id) within your platform. - **issuedCard**: Transfer initiated by a Adyen-issued card. - **platformPayment**: Fund movements related to payments that are acquired for your users.") - @JsonProperty(JSON_PROPERTY_CATEGORY) + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_CATEGORY_DATA) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public CategoryEnum getCategory() { - return category; + public TransferCategoryData getCategoryData() { + return categoryData; } - @JsonProperty(JSON_PROPERTY_CATEGORY) + @JsonProperty(JSON_PROPERTY_CATEGORY_DATA) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCategory(CategoryEnum category) { - this.category = category; + public void setCategoryData(TransferCategoryData categoryData) { + this.categoryData = categoryData; } @@ -729,59 +674,6 @@ public void setPaymentInstrument(PaymentInstrument paymentInstrument) { } - public Transfer paymentInstrumentId(String paymentInstrumentId) { - this.paymentInstrumentId = paymentInstrumentId; - return this; - } - - /** - * The unique identifier of the [payment instrument](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/post/balanceAccounts__resParam_id) used in the transfer. - * @return paymentInstrumentId - * @deprecated - **/ - @Deprecated - @ApiModelProperty(value = "The unique identifier of the [payment instrument](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/post/balanceAccounts__resParam_id) used in the transfer.") - @JsonProperty(JSON_PROPERTY_PAYMENT_INSTRUMENT_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getPaymentInstrumentId() { - return paymentInstrumentId; - } - - - @Deprecated - @JsonProperty(JSON_PROPERTY_PAYMENT_INSTRUMENT_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPaymentInstrumentId(String paymentInstrumentId) { - this.paymentInstrumentId = paymentInstrumentId; - } - - - public Transfer priority(PriorityEnum priority) { - this.priority = priority; - return this; - } - - /** - * The priority for the bank transfer. This sets the speed at which the transfer is sent and the fees that you have to pay. Required for transfers with `category` **bank**. Possible values: * **regular**: For normal, low-value transactions. * **fast**: Faster way to transfer funds but has higher fees. Recommended for high-priority, low-value transactions. * **wire**: Fastest way to transfer funds but has the highest fees. Recommended for high-priority, high-value transactions. * **instant**: Instant way to transfer funds in [SEPA countries](https://www.ecb.europa.eu/paym/integration/retail/sepa/html/index.en.html). * **crossBorder**: High-value transfer to a recipient in a different country. * **internal**: Transfer to an Adyen-issued business bank account (by bank account number/IBAN). This will be removed in v4 and replaced with a new field. - * @return priority - **/ - @ApiModelProperty(value = "The priority for the bank transfer. This sets the speed at which the transfer is sent and the fees that you have to pay. Required for transfers with `category` **bank**. Possible values: * **regular**: For normal, low-value transactions. * **fast**: Faster way to transfer funds but has higher fees. Recommended for high-priority, low-value transactions. * **wire**: Fastest way to transfer funds but has the highest fees. Recommended for high-priority, high-value transactions. * **instant**: Instant way to transfer funds in [SEPA countries](https://www.ecb.europa.eu/paym/integration/retail/sepa/html/index.en.html). * **crossBorder**: High-value transfer to a recipient in a different country. * **internal**: Transfer to an Adyen-issued business bank account (by bank account number/IBAN). This will be removed in v4 and replaced with a new field.") - @JsonProperty(JSON_PROPERTY_PRIORITY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public PriorityEnum getPriority() { - return priority; - } - - - @JsonProperty(JSON_PROPERTY_PRIORITY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPriority(PriorityEnum priority) { - this.priority = priority; - } - - public Transfer reason(ReasonEnum reason) { this.reason = reason; return this; @@ -897,16 +789,14 @@ public boolean equals(Object o) { return Objects.equals(this.accountHolder, transfer.accountHolder) && Objects.equals(this.amount, transfer.amount) && Objects.equals(this.balanceAccount, transfer.balanceAccount) && - Objects.equals(this.balanceAccountId, transfer.balanceAccountId) && Objects.equals(this.category, transfer.category) && + Objects.equals(this.categoryData, transfer.categoryData) && Objects.equals(this.counterparty, transfer.counterparty) && Objects.equals(this.creationDate, transfer.creationDate) && Objects.equals(this.description, transfer.description) && Objects.equals(this.direction, transfer.direction) && Objects.equals(this.id, transfer.id) && Objects.equals(this.paymentInstrument, transfer.paymentInstrument) && - Objects.equals(this.paymentInstrumentId, transfer.paymentInstrumentId) && - Objects.equals(this.priority, transfer.priority) && Objects.equals(this.reason, transfer.reason) && Objects.equals(this.reference, transfer.reference) && Objects.equals(this.referenceForBeneficiary, transfer.referenceForBeneficiary) && @@ -915,7 +805,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(accountHolder, amount, balanceAccount, balanceAccountId, category, counterparty, creationDate, description, direction, id, paymentInstrument, paymentInstrumentId, priority, reason, reference, referenceForBeneficiary, status); + return Objects.hash(accountHolder, amount, balanceAccount, category, categoryData, counterparty, creationDate, description, direction, id, paymentInstrument, reason, reference, referenceForBeneficiary, status); } @Override @@ -925,16 +815,14 @@ public String toString() { sb.append(" accountHolder: ").append(toIndentedString(accountHolder)).append("\n"); sb.append(" amount: ").append(toIndentedString(amount)).append("\n"); sb.append(" balanceAccount: ").append(toIndentedString(balanceAccount)).append("\n"); - sb.append(" balanceAccountId: ").append(toIndentedString(balanceAccountId)).append("\n"); sb.append(" category: ").append(toIndentedString(category)).append("\n"); + sb.append(" categoryData: ").append(toIndentedString(categoryData)).append("\n"); sb.append(" counterparty: ").append(toIndentedString(counterparty)).append("\n"); sb.append(" creationDate: ").append(toIndentedString(creationDate)).append("\n"); sb.append(" description: ").append(toIndentedString(description)).append("\n"); sb.append(" direction: ").append(toIndentedString(direction)).append("\n"); sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" paymentInstrument: ").append(toIndentedString(paymentInstrument)).append("\n"); - sb.append(" paymentInstrumentId: ").append(toIndentedString(paymentInstrumentId)).append("\n"); - sb.append(" priority: ").append(toIndentedString(priority)).append("\n"); sb.append(" reason: ").append(toIndentedString(reason)).append("\n"); sb.append(" reference: ").append(toIndentedString(reference)).append("\n"); sb.append(" referenceForBeneficiary: ").append(toIndentedString(referenceForBeneficiary)).append("\n"); diff --git a/src/main/java/com/adyen/model/transfers/TransferCategoryData.java b/src/main/java/com/adyen/model/transfers/TransferCategoryData.java new file mode 100644 index 000000000..106461fbb --- /dev/null +++ b/src/main/java/com/adyen/model/transfers/TransferCategoryData.java @@ -0,0 +1,389 @@ +/* + * Transfers API + * + * The version of the OpenAPI document: 4 + * + * + * 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.adyen.model.transfers; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.adyen.model.transfers.BankCategoryData; +import com.adyen.model.transfers.InternalCategoryData; +import com.adyen.model.transfers.IssuedCard; +import com.adyen.model.transfers.PlatformPayment; +import com.adyen.model.transfers.RelayedAuthorisationData; +import com.adyen.model.transfers.TransferNotificationValidationFact; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.ArrayList; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.core.JsonProcessingException; + +import com.fasterxml.jackson.core.type.TypeReference; + +import jakarta.ws.rs.core.GenericType; +import jakarta.ws.rs.core.Response; +import java.io.IOException; +import java.util.logging.Level; +import java.util.logging.Logger; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashSet; + +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.core.JsonToken; +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.JsonMappingException; +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.MapperFeature; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.DeserializationFeature; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; + + +@JsonDeserialize(using = TransferCategoryData.TransferCategoryDataDeserializer.class) +@JsonSerialize(using = TransferCategoryData.TransferCategoryDataSerializer.class) +public class TransferCategoryData extends AbstractOpenApiSchema { + private static final Logger log = Logger.getLogger(TransferCategoryData.class.getName()); + + public static class TransferCategoryDataSerializer extends StdSerializer { + public TransferCategoryDataSerializer(Class t) { + super(t); + } + + public TransferCategoryDataSerializer() { + this(null); + } + + @Override + public void serialize(TransferCategoryData value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.getActualInstance()); + } + } + + public static class TransferCategoryDataDeserializer extends StdDeserializer { + public TransferCategoryDataDeserializer() { + this(TransferCategoryData.class); + } + + public TransferCategoryDataDeserializer(Class vc) { + super(vc); + } + + @Override + public TransferCategoryData deserialize(JsonParser jp, DeserializationContext ctxt) throws IOException, JsonProcessingException { + JsonNode tree = jp.readValueAsTree(); + Object deserialized = null; + boolean typeCoercion = ctxt.isEnabled(MapperFeature.ALLOW_COERCION_OF_SCALARS); + int match = 0; + JsonToken token = tree.traverse(jp.getCodec()).nextToken(); + + // deserialize BankCategoryData + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (BankCategoryData.class.equals(Integer.class) || BankCategoryData.class.equals(Long.class) || BankCategoryData.class.equals(Float.class) || BankCategoryData.class.equals(Double.class) || BankCategoryData.class.equals(Boolean.class) || BankCategoryData.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((BankCategoryData.class.equals(Integer.class) || BankCategoryData.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((BankCategoryData.class.equals(Float.class) || BankCategoryData.class.equals(Double.class)) && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= (BankCategoryData.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (BankCategoryData.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + // Checks if the unique type of the oneOf json matches any of the object TypeEnum values + boolean typeMatch = Arrays.stream(BankCategoryData.TypeEnum.values()).anyMatch((t) -> t.getValue().contains(tree.findValue("type").asText())); + if (attemptParsing || typeMatch) { + // Strict deserialization for oneOf models + deserialized = JSON.getMapper().readValue(tree.toString(), BankCategoryData.class); + // typeMatch should enforce proper deserialization + match++; + log.log(Level.FINER, "Input data matches schema 'BankCategoryData'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'BankCategoryData'", e); + } + + + // deserialize InternalCategoryData + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (InternalCategoryData.class.equals(Integer.class) || InternalCategoryData.class.equals(Long.class) || InternalCategoryData.class.equals(Float.class) || InternalCategoryData.class.equals(Double.class) || InternalCategoryData.class.equals(Boolean.class) || InternalCategoryData.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((InternalCategoryData.class.equals(Integer.class) || InternalCategoryData.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((InternalCategoryData.class.equals(Float.class) || InternalCategoryData.class.equals(Double.class)) && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= (InternalCategoryData.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (InternalCategoryData.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + // Checks if the unique type of the oneOf json matches any of the object TypeEnum values + boolean typeMatch = Arrays.stream(InternalCategoryData.TypeEnum.values()).anyMatch((t) -> t.getValue().contains(tree.findValue("type").asText())); + if (attemptParsing || typeMatch) { + // Strict deserialization for oneOf models + deserialized = JSON.getMapper().readValue(tree.toString(), InternalCategoryData.class); + // typeMatch should enforce proper deserialization + match++; + log.log(Level.FINER, "Input data matches schema 'InternalCategoryData'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'InternalCategoryData'", e); + } + + + // deserialize IssuedCard + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (IssuedCard.class.equals(Integer.class) || IssuedCard.class.equals(Long.class) || IssuedCard.class.equals(Float.class) || IssuedCard.class.equals(Double.class) || IssuedCard.class.equals(Boolean.class) || IssuedCard.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((IssuedCard.class.equals(Integer.class) || IssuedCard.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((IssuedCard.class.equals(Float.class) || IssuedCard.class.equals(Double.class)) && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= (IssuedCard.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (IssuedCard.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + // Checks if the unique type of the oneOf json matches any of the object TypeEnum values + boolean typeMatch = Arrays.stream(IssuedCard.TypeEnum.values()).anyMatch((t) -> t.getValue().contains(tree.findValue("type").asText())); + if (attemptParsing || typeMatch) { + // Strict deserialization for oneOf models + deserialized = JSON.getMapper().readValue(tree.toString(), IssuedCard.class); + // typeMatch should enforce proper deserialization + match++; + log.log(Level.FINER, "Input data matches schema 'IssuedCard'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'IssuedCard'", e); + } + + + // deserialize PlatformPayment + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (PlatformPayment.class.equals(Integer.class) || PlatformPayment.class.equals(Long.class) || PlatformPayment.class.equals(Float.class) || PlatformPayment.class.equals(Double.class) || PlatformPayment.class.equals(Boolean.class) || PlatformPayment.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((PlatformPayment.class.equals(Integer.class) || PlatformPayment.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((PlatformPayment.class.equals(Float.class) || PlatformPayment.class.equals(Double.class)) && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= (PlatformPayment.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (PlatformPayment.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + // Checks if the unique type of the oneOf json matches any of the object TypeEnum values + boolean typeMatch = Arrays.stream(PlatformPayment.TypeEnum.values()).anyMatch((t) -> t.getValue().contains(tree.findValue("type").asText())); + if (attemptParsing || typeMatch) { + // Strict deserialization for oneOf models + deserialized = JSON.getMapper().readValue(tree.toString(), PlatformPayment.class); + // typeMatch should enforce proper deserialization + match++; + log.log(Level.FINER, "Input data matches schema 'PlatformPayment'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'PlatformPayment'", e); + } + + // Throw error if there is no match + if (match == 0) { + throw new IOException(String.format("Failed deserialization for TransferCategoryData: %d classes match result, expected 1", match)); + } + // Log warning if there is more than one match + if (match > 1) { + log.log(Level.WARNING, String.format("Warning, indecisive deserialization for TransferCategoryData: %d classes match result, expected 1", match)); + } + + TransferCategoryData ret = new TransferCategoryData(); + ret.setActualInstance(deserialized); + return ret; + } + + /** + * Handle deserialization of the 'null' value. + */ + @Override + public TransferCategoryData getNullValue(DeserializationContext ctxt) throws JsonMappingException { + throw new JsonMappingException(ctxt.getParser(), "TransferCategoryData cannot be null"); + } + } + + // store a list of schema names defined in oneOf + public static final Map schemas = new HashMap(); + + public TransferCategoryData() { + super("oneOf", Boolean.FALSE); + } + + public TransferCategoryData(BankCategoryData o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public TransferCategoryData(InternalCategoryData o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public TransferCategoryData(IssuedCard o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public TransferCategoryData(PlatformPayment o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + static { + schemas.put("BankCategoryData", new GenericType() { + }); + schemas.put("InternalCategoryData", new GenericType() { + }); + schemas.put("IssuedCard", new GenericType() { + }); + schemas.put("PlatformPayment", new GenericType() { + }); + JSON.registerDescendants(TransferCategoryData.class, Collections.unmodifiableMap(schemas)); + } + + @Override + public Map getSchemas() { + return TransferCategoryData.schemas; + } + + /** + * Set the instance that matches the oneOf child schema, check + * the instance parameter is valid against the oneOf child schemas: + * BankCategoryData, InternalCategoryData, IssuedCard, PlatformPayment + * + * It could be an instance of the 'oneOf' schemas. + * The oneOf child schemas may themselves be a composed schema (allOf, anyOf, oneOf). + */ + @Override + public void setActualInstance(Object instance) { + if (JSON.isInstanceOf(BankCategoryData.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf(InternalCategoryData.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf(IssuedCard.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf(PlatformPayment.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + throw new RuntimeException("Invalid instance type. Must be BankCategoryData, InternalCategoryData, IssuedCard, PlatformPayment"); + } + + /** + * Get the actual instance, which can be the following: + * BankCategoryData, InternalCategoryData, IssuedCard, PlatformPayment + * + * @return The actual instance (BankCategoryData, InternalCategoryData, IssuedCard, PlatformPayment) + */ + @Override + public Object getActualInstance() { + return super.getActualInstance(); + } + + /** + * Get the actual instance of `BankCategoryData`. If the actual instance is not `BankCategoryData`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `BankCategoryData` + * @throws ClassCastException if the instance is not `BankCategoryData` + */ + public BankCategoryData getBankCategoryData() throws ClassCastException { + return (BankCategoryData)super.getActualInstance(); + } + + /** + * Get the actual instance of `InternalCategoryData`. If the actual instance is not `InternalCategoryData`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `InternalCategoryData` + * @throws ClassCastException if the instance is not `InternalCategoryData` + */ + public InternalCategoryData getInternalCategoryData() throws ClassCastException { + return (InternalCategoryData)super.getActualInstance(); + } + + /** + * Get the actual instance of `IssuedCard`. If the actual instance is not `IssuedCard`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `IssuedCard` + * @throws ClassCastException if the instance is not `IssuedCard` + */ + public IssuedCard getIssuedCard() throws ClassCastException { + return (IssuedCard)super.getActualInstance(); + } + + /** + * Get the actual instance of `PlatformPayment`. If the actual instance is not `PlatformPayment`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `PlatformPayment` + * @throws ClassCastException if the instance is not `PlatformPayment` + */ + public PlatformPayment getPlatformPayment() throws ClassCastException { + return (PlatformPayment)super.getActualInstance(); + } + + /** + * Create an instance of TransferCategoryData given an JSON string + * + * @param jsonString JSON string + * @return An instance of TransferCategoryData + * @throws IOException if the JSON string is invalid with respect to TransferCategoryData + */ + public static TransferCategoryData fromJson(String jsonString) throws IOException { + return JSON.getMapper().readValue(jsonString, TransferCategoryData.class); + } + + /** + * Convert an instance of TransferCategoryData to an JSON string + * + * @return JSON string + */ + public String toJson() throws JsonProcessingException { + return JSON.getMapper().writeValueAsString(this); + } +} + diff --git a/src/main/java/com/adyen/model/transfers/TransferData.java b/src/main/java/com/adyen/model/transfers/TransferData.java new file mode 100644 index 000000000..5e0715ddf --- /dev/null +++ b/src/main/java/com/adyen/model/transfers/TransferData.java @@ -0,0 +1,159 @@ +/* + * Transfers API + * + * The version of the OpenAPI document: 4 + * + * + * 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.adyen.model.transfers; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.core.JsonProcessingException; + + +/** + * TransferData + */ +@JsonPropertyOrder({ + TransferData.JSON_PROPERTY_ID, + TransferData.JSON_PROPERTY_REFERENCE +}) + +public class TransferData { + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_REFERENCE = "reference"; + private String reference; + + public TransferData() { + } + + public TransferData id(String id) { + this.id = id; + return this; + } + + /** + * The ID of the resource. + * @return id + **/ + @ApiModelProperty(value = "The ID of the resource.") + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getId() { + return id; + } + + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setId(String id) { + this.id = id; + } + + + public TransferData reference(String reference) { + this.reference = reference; + return this; + } + + /** + * The [`reference`](https://docs.adyen.com/api-explorer/#/transfers/latest/post/transfers__reqParam_reference) from the `/transfers` request. If you haven't provided any, Adyen generates a unique reference. + * @return reference + **/ + @ApiModelProperty(required = true, value = "The [`reference`](https://docs.adyen.com/api-explorer/#/transfers/latest/post/transfers__reqParam_reference) from the `/transfers` request. If you haven't provided any, Adyen generates a unique reference.") + @JsonProperty(JSON_PROPERTY_REFERENCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getReference() { + return reference; + } + + + @JsonProperty(JSON_PROPERTY_REFERENCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setReference(String reference) { + this.reference = reference; + } + + + /** + * Return true if this TransferData object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TransferData transferData = (TransferData) o; + return Objects.equals(this.id, transferData.id) && + Objects.equals(this.reference, transferData.reference); + } + + @Override + public int hashCode() { + return Objects.hash(id, reference); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TransferData {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" reference: ").append(toIndentedString(reference)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +/** + * Create an instance of TransferData given an JSON string + * + * @param jsonString JSON string + * @return An instance of TransferData + * @throws JsonProcessingException if the JSON string is invalid with respect to TransferData + */ + public static TransferData fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, TransferData.class); + } +/** + * Convert an instance of TransferData to an JSON string + * + * @return JSON string + */ + public String toJson() throws JsonProcessingException { + return JSON.getMapper().writeValueAsString(this); + } +} + diff --git a/src/main/java/com/adyen/model/transfers/TransferInfo.java b/src/main/java/com/adyen/model/transfers/TransferInfo.java index 270a25fc3..4ab40b579 100644 --- a/src/main/java/com/adyen/model/transfers/TransferInfo.java +++ b/src/main/java/com/adyen/model/transfers/TransferInfo.java @@ -1,7 +1,7 @@ /* * Transfers API * - * The version of the OpenAPI document: 3 + * The version of the OpenAPI document: 4 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -112,8 +112,6 @@ public static CategoryEnum fromValue(String value) { public enum PriorityEnum { CROSSBORDER("crossBorder"), - DIRECTDEBIT("directDebit"), - FAST("fast"), INSTANT("instant"), diff --git a/src/main/java/com/adyen/model/transfers/TransferNotificationValidationFact.java b/src/main/java/com/adyen/model/transfers/TransferNotificationValidationFact.java new file mode 100644 index 000000000..2cfdb3751 --- /dev/null +++ b/src/main/java/com/adyen/model/transfers/TransferNotificationValidationFact.java @@ -0,0 +1,159 @@ +/* + * Transfers API + * + * The version of the OpenAPI document: 4 + * + * + * 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.adyen.model.transfers; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.core.JsonProcessingException; + + +/** + * TransferNotificationValidationFact + */ +@JsonPropertyOrder({ + TransferNotificationValidationFact.JSON_PROPERTY_RESULT, + TransferNotificationValidationFact.JSON_PROPERTY_TYPE +}) + +public class TransferNotificationValidationFact { + public static final String JSON_PROPERTY_RESULT = "result"; + private String result; + + public static final String JSON_PROPERTY_TYPE = "type"; + private String type; + + public TransferNotificationValidationFact() { + } + + public TransferNotificationValidationFact result(String result) { + this.result = result; + return this; + } + + /** + * The evaluation result of the validation fact. + * @return result + **/ + @ApiModelProperty(value = "The evaluation result of the validation fact.") + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getResult() { + return result; + } + + + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setResult(String result) { + this.result = result; + } + + + public TransferNotificationValidationFact type(String type) { + this.type = type; + return this; + } + + /** + * The type of the validation fact. + * @return type + **/ + @ApiModelProperty(value = "The type of the validation fact.") + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getType() { + return type; + } + + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setType(String type) { + this.type = type; + } + + + /** + * Return true if this TransferNotificationValidationFact object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TransferNotificationValidationFact transferNotificationValidationFact = (TransferNotificationValidationFact) o; + return Objects.equals(this.result, transferNotificationValidationFact.result) && + Objects.equals(this.type, transferNotificationValidationFact.type); + } + + @Override + public int hashCode() { + return Objects.hash(result, type); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TransferNotificationValidationFact {\n"); + sb.append(" result: ").append(toIndentedString(result)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +/** + * Create an instance of TransferNotificationValidationFact given an JSON string + * + * @param jsonString JSON string + * @return An instance of TransferNotificationValidationFact + * @throws JsonProcessingException if the JSON string is invalid with respect to TransferNotificationValidationFact + */ + public static TransferNotificationValidationFact fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, TransferNotificationValidationFact.class); + } +/** + * Convert an instance of TransferNotificationValidationFact to an JSON string + * + * @return JSON string + */ + public String toJson() throws JsonProcessingException { + return JSON.getMapper().writeValueAsString(this); + } +} + diff --git a/src/main/java/com/adyen/model/transfers/UKLocalAccountIdentification.java b/src/main/java/com/adyen/model/transfers/UKLocalAccountIdentification.java index 6886b1715..278a4215b 100644 --- a/src/main/java/com/adyen/model/transfers/UKLocalAccountIdentification.java +++ b/src/main/java/com/adyen/model/transfers/UKLocalAccountIdentification.java @@ -1,7 +1,7 @@ /* * Transfers API * - * The version of the OpenAPI document: 3 + * The version of the OpenAPI document: 4 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/transfers/USLocalAccountIdentification.java b/src/main/java/com/adyen/model/transfers/USLocalAccountIdentification.java index bbfe28d27..e6eb5488a 100644 --- a/src/main/java/com/adyen/model/transfers/USLocalAccountIdentification.java +++ b/src/main/java/com/adyen/model/transfers/USLocalAccountIdentification.java @@ -1,7 +1,7 @@ /* * Transfers API * - * The version of the OpenAPI document: 3 + * The version of the OpenAPI document: 4 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/transfers/UltimatePartyIdentification.java b/src/main/java/com/adyen/model/transfers/UltimatePartyIdentification.java index 9b69444f8..b91f3fbc6 100644 --- a/src/main/java/com/adyen/model/transfers/UltimatePartyIdentification.java +++ b/src/main/java/com/adyen/model/transfers/UltimatePartyIdentification.java @@ -1,7 +1,7 @@ /* * Transfers API * - * The version of the OpenAPI document: 3 + * The version of the OpenAPI document: 4 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -16,7 +16,7 @@ import java.util.Arrays; import java.util.Map; import java.util.HashMap; -import com.adyen.model.transfers.Address2; +import com.adyen.model.transfers.Address; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -44,7 +44,7 @@ public class UltimatePartyIdentification { public static final String JSON_PROPERTY_ADDRESS = "address"; - private Address2 address; + private Address address; public static final String JSON_PROPERTY_DATE_OF_BIRTH = "dateOfBirth"; private LocalDate dateOfBirth; @@ -104,7 +104,7 @@ public static TypeEnum fromValue(String value) { public UltimatePartyIdentification() { } - public UltimatePartyIdentification address(Address2 address) { + public UltimatePartyIdentification address(Address address) { this.address = address; return this; } @@ -117,14 +117,14 @@ public UltimatePartyIdentification address(Address2 address) { @JsonProperty(JSON_PROPERTY_ADDRESS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Address2 getAddress() { + public Address getAddress() { return address; } @JsonProperty(JSON_PROPERTY_ADDRESS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAddress(Address2 address) { + public void setAddress(Address address) { this.address = address; } diff --git a/src/main/java/com/adyen/model/transferwebhooks/AULocalAccountIdentification.java b/src/main/java/com/adyen/model/transferwebhooks/AULocalAccountIdentification.java index deb7b9e8c..230315e93 100644 --- a/src/main/java/com/adyen/model/transferwebhooks/AULocalAccountIdentification.java +++ b/src/main/java/com/adyen/model/transferwebhooks/AULocalAccountIdentification.java @@ -1,7 +1,7 @@ /* * Transfer webhooks * - * The version of the OpenAPI document: 3 + * The version of the OpenAPI document: 4 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/transferwebhooks/AbstractOpenApiSchema.java b/src/main/java/com/adyen/model/transferwebhooks/AbstractOpenApiSchema.java index 5131f7d4b..f64d52572 100644 --- a/src/main/java/com/adyen/model/transferwebhooks/AbstractOpenApiSchema.java +++ b/src/main/java/com/adyen/model/transferwebhooks/AbstractOpenApiSchema.java @@ -1,7 +1,7 @@ /* * Transfer webhooks * - * The version of the OpenAPI document: 3 + * The version of the OpenAPI document: 4 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/transferwebhooks/AdditionalBankIdentification.java b/src/main/java/com/adyen/model/transferwebhooks/AdditionalBankIdentification.java index e34e701fa..bb36c3b4e 100644 --- a/src/main/java/com/adyen/model/transferwebhooks/AdditionalBankIdentification.java +++ b/src/main/java/com/adyen/model/transferwebhooks/AdditionalBankIdentification.java @@ -1,7 +1,7 @@ /* * Transfer webhooks * - * The version of the OpenAPI document: 3 + * The version of the OpenAPI document: 4 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/transferwebhooks/Address.java b/src/main/java/com/adyen/model/transferwebhooks/Address.java index 192333f74..fe3483d68 100644 --- a/src/main/java/com/adyen/model/transferwebhooks/Address.java +++ b/src/main/java/com/adyen/model/transferwebhooks/Address.java @@ -1,7 +1,7 @@ /* * Transfer webhooks * - * The version of the OpenAPI document: 3 + * The version of the OpenAPI document: 4 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/transferwebhooks/Amount.java b/src/main/java/com/adyen/model/transferwebhooks/Amount.java index 54fbc5fe6..76cc44ea2 100644 --- a/src/main/java/com/adyen/model/transferwebhooks/Amount.java +++ b/src/main/java/com/adyen/model/transferwebhooks/Amount.java @@ -1,7 +1,7 @@ /* * Transfer webhooks * - * The version of the OpenAPI document: 3 + * The version of the OpenAPI document: 4 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/transferwebhooks/AmountAdjustment.java b/src/main/java/com/adyen/model/transferwebhooks/AmountAdjustment.java index 3f24bdd8f..18b2c52f7 100644 --- a/src/main/java/com/adyen/model/transferwebhooks/AmountAdjustment.java +++ b/src/main/java/com/adyen/model/transferwebhooks/AmountAdjustment.java @@ -1,7 +1,7 @@ /* * Transfer webhooks * - * The version of the OpenAPI document: 3 + * The version of the OpenAPI document: 4 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/transferwebhooks/BRLocalAccountIdentification.java b/src/main/java/com/adyen/model/transferwebhooks/BRLocalAccountIdentification.java index 46683c5cc..edb6df76d 100644 --- a/src/main/java/com/adyen/model/transferwebhooks/BRLocalAccountIdentification.java +++ b/src/main/java/com/adyen/model/transferwebhooks/BRLocalAccountIdentification.java @@ -1,7 +1,7 @@ /* * Transfer webhooks * - * The version of the OpenAPI document: 3 + * The version of the OpenAPI document: 4 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/transferwebhooks/BalanceMutation.java b/src/main/java/com/adyen/model/transferwebhooks/BalanceMutation.java index c1db986dc..9637a88b7 100644 --- a/src/main/java/com/adyen/model/transferwebhooks/BalanceMutation.java +++ b/src/main/java/com/adyen/model/transferwebhooks/BalanceMutation.java @@ -1,7 +1,7 @@ /* * Transfer webhooks * - * The version of the OpenAPI document: 3 + * The version of the OpenAPI document: 4 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/transferwebhooks/BalancePlatformNotificationResponse.java b/src/main/java/com/adyen/model/transferwebhooks/BalancePlatformNotificationResponse.java index 3a0840656..f656e51bf 100644 --- a/src/main/java/com/adyen/model/transferwebhooks/BalancePlatformNotificationResponse.java +++ b/src/main/java/com/adyen/model/transferwebhooks/BalancePlatformNotificationResponse.java @@ -1,7 +1,7 @@ /* * Transfer webhooks * - * The version of the OpenAPI document: 3 + * The version of the OpenAPI document: 4 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/transferwebhooks/BankAccountV3.java b/src/main/java/com/adyen/model/transferwebhooks/BankAccountV3.java index 6345bb098..6c3a3e592 100644 --- a/src/main/java/com/adyen/model/transferwebhooks/BankAccountV3.java +++ b/src/main/java/com/adyen/model/transferwebhooks/BankAccountV3.java @@ -1,7 +1,7 @@ /* * Transfer webhooks * - * The version of the OpenAPI document: 3 + * The version of the OpenAPI document: 4 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/transferwebhooks/BankAccountV3AccountIdentification.java b/src/main/java/com/adyen/model/transferwebhooks/BankAccountV3AccountIdentification.java index 0225ed60d..754a83c9c 100644 --- a/src/main/java/com/adyen/model/transferwebhooks/BankAccountV3AccountIdentification.java +++ b/src/main/java/com/adyen/model/transferwebhooks/BankAccountV3AccountIdentification.java @@ -1,7 +1,7 @@ /* * Transfer webhooks * - * The version of the OpenAPI document: 3 + * The version of the OpenAPI document: 4 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/transferwebhooks/BankCategoryData.java b/src/main/java/com/adyen/model/transferwebhooks/BankCategoryData.java new file mode 100644 index 000000000..e654d1826 --- /dev/null +++ b/src/main/java/com/adyen/model/transferwebhooks/BankCategoryData.java @@ -0,0 +1,235 @@ +/* + * Transfer webhooks + * + * The version of the OpenAPI document: 4 + * + * + * 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.adyen.model.transferwebhooks; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.core.JsonProcessingException; + + +/** + * BankCategoryData + */ +@JsonPropertyOrder({ + BankCategoryData.JSON_PROPERTY_PRIORITY, + BankCategoryData.JSON_PROPERTY_TYPE +}) + +public class BankCategoryData { + /** + * The priority for the bank transfer. This sets the speed at which the transfer is sent and the fees that you have to pay. Required for transfers with `category` **bank**. Possible values: * **regular**: For normal, low-value transactions. * **fast**: Faster way to transfer funds but has higher fees. Recommended for high-priority, low-value transactions. * **wire**: Fastest way to transfer funds but has the highest fees. Recommended for high-priority, high-value transactions. * **instant**: Instant way to transfer funds in [SEPA countries](https://www.ecb.europa.eu/paym/integration/retail/sepa/html/index.en.html). * **crossBorder**: High-value transfer to a recipient in a different country. * **internal**: Transfer to an Adyen-issued business bank account (by bank account number/IBAN). + */ + public enum PriorityEnum { + CROSSBORDER("crossBorder"), + + FAST("fast"), + + INSTANT("instant"), + + INTERNAL("internal"), + + REGULAR("regular"), + + WIRE("wire"); + + private String value; + + PriorityEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static PriorityEnum fromValue(String value) { + for (PriorityEnum b : PriorityEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_PRIORITY = "priority"; + private PriorityEnum priority; + + /** + * **bank** + */ + public enum TypeEnum { + BANK("bank"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_TYPE = "type"; + private TypeEnum type = TypeEnum.BANK; + + public BankCategoryData() { + } + + public BankCategoryData priority(PriorityEnum priority) { + this.priority = priority; + return this; + } + + /** + * The priority for the bank transfer. This sets the speed at which the transfer is sent and the fees that you have to pay. Required for transfers with `category` **bank**. Possible values: * **regular**: For normal, low-value transactions. * **fast**: Faster way to transfer funds but has higher fees. Recommended for high-priority, low-value transactions. * **wire**: Fastest way to transfer funds but has the highest fees. Recommended for high-priority, high-value transactions. * **instant**: Instant way to transfer funds in [SEPA countries](https://www.ecb.europa.eu/paym/integration/retail/sepa/html/index.en.html). * **crossBorder**: High-value transfer to a recipient in a different country. * **internal**: Transfer to an Adyen-issued business bank account (by bank account number/IBAN). + * @return priority + **/ + @ApiModelProperty(value = "The priority for the bank transfer. This sets the speed at which the transfer is sent and the fees that you have to pay. Required for transfers with `category` **bank**. Possible values: * **regular**: For normal, low-value transactions. * **fast**: Faster way to transfer funds but has higher fees. Recommended for high-priority, low-value transactions. * **wire**: Fastest way to transfer funds but has the highest fees. Recommended for high-priority, high-value transactions. * **instant**: Instant way to transfer funds in [SEPA countries](https://www.ecb.europa.eu/paym/integration/retail/sepa/html/index.en.html). * **crossBorder**: High-value transfer to a recipient in a different country. * **internal**: Transfer to an Adyen-issued business bank account (by bank account number/IBAN).") + @JsonProperty(JSON_PROPERTY_PRIORITY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public PriorityEnum getPriority() { + return priority; + } + + + @JsonProperty(JSON_PROPERTY_PRIORITY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPriority(PriorityEnum priority) { + this.priority = priority; + } + + + public BankCategoryData type(TypeEnum type) { + this.type = type; + return this; + } + + /** + * **bank** + * @return type + **/ + @ApiModelProperty(value = "**bank**") + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public TypeEnum getType() { + return type; + } + + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setType(TypeEnum type) { + this.type = type; + } + + + /** + * Return true if this BankCategoryData object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + BankCategoryData bankCategoryData = (BankCategoryData) o; + return Objects.equals(this.priority, bankCategoryData.priority) && + Objects.equals(this.type, bankCategoryData.type); + } + + @Override + public int hashCode() { + return Objects.hash(priority, type); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class BankCategoryData {\n"); + sb.append(" priority: ").append(toIndentedString(priority)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +/** + * Create an instance of BankCategoryData given an JSON string + * + * @param jsonString JSON string + * @return An instance of BankCategoryData + * @throws JsonProcessingException if the JSON string is invalid with respect to BankCategoryData + */ + public static BankCategoryData fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, BankCategoryData.class); + } +/** + * Convert an instance of BankCategoryData to an JSON string + * + * @return JSON string + */ + public String toJson() throws JsonProcessingException { + return JSON.getMapper().writeValueAsString(this); + } +} + diff --git a/src/main/java/com/adyen/model/transferwebhooks/CALocalAccountIdentification.java b/src/main/java/com/adyen/model/transferwebhooks/CALocalAccountIdentification.java index 3572b1636..16cb35c97 100644 --- a/src/main/java/com/adyen/model/transferwebhooks/CALocalAccountIdentification.java +++ b/src/main/java/com/adyen/model/transferwebhooks/CALocalAccountIdentification.java @@ -1,7 +1,7 @@ /* * Transfer webhooks * - * The version of the OpenAPI document: 3 + * The version of the OpenAPI document: 4 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/transferwebhooks/CZLocalAccountIdentification.java b/src/main/java/com/adyen/model/transferwebhooks/CZLocalAccountIdentification.java index 451277f39..01ff02aa4 100644 --- a/src/main/java/com/adyen/model/transferwebhooks/CZLocalAccountIdentification.java +++ b/src/main/java/com/adyen/model/transferwebhooks/CZLocalAccountIdentification.java @@ -1,7 +1,7 @@ /* * Transfer webhooks * - * The version of the OpenAPI document: 3 + * The version of the OpenAPI document: 4 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/transferwebhooks/CounterpartyV3.java b/src/main/java/com/adyen/model/transferwebhooks/CounterpartyV3.java index 5463f094e..c766ef57f 100644 --- a/src/main/java/com/adyen/model/transferwebhooks/CounterpartyV3.java +++ b/src/main/java/com/adyen/model/transferwebhooks/CounterpartyV3.java @@ -1,7 +1,7 @@ /* * Transfer webhooks * - * The version of the OpenAPI document: 3 + * The version of the OpenAPI document: 4 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/transferwebhooks/DKLocalAccountIdentification.java b/src/main/java/com/adyen/model/transferwebhooks/DKLocalAccountIdentification.java index cc439dd9a..d6e62c1f2 100644 --- a/src/main/java/com/adyen/model/transferwebhooks/DKLocalAccountIdentification.java +++ b/src/main/java/com/adyen/model/transferwebhooks/DKLocalAccountIdentification.java @@ -1,7 +1,7 @@ /* * Transfer webhooks * - * The version of the OpenAPI document: 3 + * The version of the OpenAPI document: 4 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/transferwebhooks/HKLocalAccountIdentification.java b/src/main/java/com/adyen/model/transferwebhooks/HKLocalAccountIdentification.java index ed727a75e..fc3520819 100644 --- a/src/main/java/com/adyen/model/transferwebhooks/HKLocalAccountIdentification.java +++ b/src/main/java/com/adyen/model/transferwebhooks/HKLocalAccountIdentification.java @@ -1,7 +1,7 @@ /* * Transfer webhooks * - * The version of the OpenAPI document: 3 + * The version of the OpenAPI document: 4 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -32,7 +32,7 @@ */ @JsonPropertyOrder({ HKLocalAccountIdentification.JSON_PROPERTY_ACCOUNT_NUMBER, - HKLocalAccountIdentification.JSON_PROPERTY_BANK_CODE, + HKLocalAccountIdentification.JSON_PROPERTY_CLEARING_CODE, HKLocalAccountIdentification.JSON_PROPERTY_TYPE }) @@ -40,8 +40,8 @@ public class HKLocalAccountIdentification { public static final String JSON_PROPERTY_ACCOUNT_NUMBER = "accountNumber"; private String accountNumber; - public static final String JSON_PROPERTY_BANK_CODE = "bankCode"; - private String bankCode; + public static final String JSON_PROPERTY_CLEARING_CODE = "clearingCode"; + private String clearingCode; /** * **hkLocal** @@ -88,10 +88,10 @@ public HKLocalAccountIdentification accountNumber(String accountNumber) { } /** - * The 6- to 19-character bank account number (alphanumeric), without separators or whitespace. + * The 9- to 15-character bank account number (alphanumeric), without separators or whitespace. Starts with the 3-digit branch code. * @return accountNumber **/ - @ApiModelProperty(required = true, value = "The 6- to 19-character bank account number (alphanumeric), without separators or whitespace.") + @ApiModelProperty(required = true, value = "The 9- to 15-character bank account number (alphanumeric), without separators or whitespace. Starts with the 3-digit branch code.") @JsonProperty(JSON_PROPERTY_ACCOUNT_NUMBER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -107,28 +107,28 @@ public void setAccountNumber(String accountNumber) { } - public HKLocalAccountIdentification bankCode(String bankCode) { - this.bankCode = bankCode; + public HKLocalAccountIdentification clearingCode(String clearingCode) { + this.clearingCode = clearingCode; return this; } /** - * The 6-digit bank code including the 3-digit bank code and 3-digit branch code, without separators or whitespace. - * @return bankCode + * The 3-digit clearing code, without separators or whitespace. + * @return clearingCode **/ - @ApiModelProperty(required = true, value = "The 6-digit bank code including the 3-digit bank code and 3-digit branch code, without separators or whitespace.") - @JsonProperty(JSON_PROPERTY_BANK_CODE) + @ApiModelProperty(required = true, value = "The 3-digit clearing code, without separators or whitespace.") + @JsonProperty(JSON_PROPERTY_CLEARING_CODE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getBankCode() { - return bankCode; + public String getClearingCode() { + return clearingCode; } - @JsonProperty(JSON_PROPERTY_BANK_CODE) + @JsonProperty(JSON_PROPERTY_CLEARING_CODE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setBankCode(String bankCode) { - this.bankCode = bankCode; + public void setClearingCode(String clearingCode) { + this.clearingCode = clearingCode; } @@ -170,13 +170,13 @@ public boolean equals(Object o) { } HKLocalAccountIdentification hkLocalAccountIdentification = (HKLocalAccountIdentification) o; return Objects.equals(this.accountNumber, hkLocalAccountIdentification.accountNumber) && - Objects.equals(this.bankCode, hkLocalAccountIdentification.bankCode) && + Objects.equals(this.clearingCode, hkLocalAccountIdentification.clearingCode) && Objects.equals(this.type, hkLocalAccountIdentification.type); } @Override public int hashCode() { - return Objects.hash(accountNumber, bankCode, type); + return Objects.hash(accountNumber, clearingCode, type); } @Override @@ -184,7 +184,7 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class HKLocalAccountIdentification {\n"); sb.append(" accountNumber: ").append(toIndentedString(accountNumber)).append("\n"); - sb.append(" bankCode: ").append(toIndentedString(bankCode)).append("\n"); + sb.append(" clearingCode: ").append(toIndentedString(clearingCode)).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/src/main/java/com/adyen/model/transferwebhooks/HULocalAccountIdentification.java b/src/main/java/com/adyen/model/transferwebhooks/HULocalAccountIdentification.java index 19daed927..755f617ee 100644 --- a/src/main/java/com/adyen/model/transferwebhooks/HULocalAccountIdentification.java +++ b/src/main/java/com/adyen/model/transferwebhooks/HULocalAccountIdentification.java @@ -1,7 +1,7 @@ /* * Transfer webhooks * - * The version of the OpenAPI document: 3 + * The version of the OpenAPI document: 4 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/transferwebhooks/IbanAccountIdentification.java b/src/main/java/com/adyen/model/transferwebhooks/IbanAccountIdentification.java index f14aa2389..e68d47da5 100644 --- a/src/main/java/com/adyen/model/transferwebhooks/IbanAccountIdentification.java +++ b/src/main/java/com/adyen/model/transferwebhooks/IbanAccountIdentification.java @@ -1,7 +1,7 @@ /* * Transfer webhooks * - * The version of the OpenAPI document: 3 + * The version of the OpenAPI document: 4 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/transferwebhooks/InternalCategoryData.java b/src/main/java/com/adyen/model/transferwebhooks/InternalCategoryData.java new file mode 100644 index 000000000..dcbbaa92e --- /dev/null +++ b/src/main/java/com/adyen/model/transferwebhooks/InternalCategoryData.java @@ -0,0 +1,223 @@ +/* + * Transfer webhooks + * + * The version of the OpenAPI document: 4 + * + * + * 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.adyen.model.transferwebhooks; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.core.JsonProcessingException; + + +/** + * InternalCategoryData + */ +@JsonPropertyOrder({ + InternalCategoryData.JSON_PROPERTY_MODIFICATION_MERCHANT_REFERENCE, + InternalCategoryData.JSON_PROPERTY_MODIFICATION_PSP_REFERENCE, + InternalCategoryData.JSON_PROPERTY_TYPE +}) + +public class InternalCategoryData { + public static final String JSON_PROPERTY_MODIFICATION_MERCHANT_REFERENCE = "modificationMerchantReference"; + private String modificationMerchantReference; + + public static final String JSON_PROPERTY_MODIFICATION_PSP_REFERENCE = "modificationPspReference"; + private String modificationPspReference; + + /** + * **internal** + */ + public enum TypeEnum { + INTERNAL("internal"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_TYPE = "type"; + private TypeEnum type = TypeEnum.INTERNAL; + + public InternalCategoryData() { + } + + public InternalCategoryData modificationMerchantReference(String modificationMerchantReference) { + this.modificationMerchantReference = modificationMerchantReference; + return this; + } + + /** + * The capture's merchant reference included in the transfer. + * @return modificationMerchantReference + **/ + @ApiModelProperty(value = "The capture's merchant reference included in the transfer.") + @JsonProperty(JSON_PROPERTY_MODIFICATION_MERCHANT_REFERENCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getModificationMerchantReference() { + return modificationMerchantReference; + } + + + @JsonProperty(JSON_PROPERTY_MODIFICATION_MERCHANT_REFERENCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setModificationMerchantReference(String modificationMerchantReference) { + this.modificationMerchantReference = modificationMerchantReference; + } + + + public InternalCategoryData modificationPspReference(String modificationPspReference) { + this.modificationPspReference = modificationPspReference; + return this; + } + + /** + * The capture reference included in the transfer. + * @return modificationPspReference + **/ + @ApiModelProperty(value = "The capture reference included in the transfer.") + @JsonProperty(JSON_PROPERTY_MODIFICATION_PSP_REFERENCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getModificationPspReference() { + return modificationPspReference; + } + + + @JsonProperty(JSON_PROPERTY_MODIFICATION_PSP_REFERENCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setModificationPspReference(String modificationPspReference) { + this.modificationPspReference = modificationPspReference; + } + + + public InternalCategoryData type(TypeEnum type) { + this.type = type; + return this; + } + + /** + * **internal** + * @return type + **/ + @ApiModelProperty(value = "**internal**") + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public TypeEnum getType() { + return type; + } + + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setType(TypeEnum type) { + this.type = type; + } + + + /** + * Return true if this InternalCategoryData object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + InternalCategoryData internalCategoryData = (InternalCategoryData) o; + return Objects.equals(this.modificationMerchantReference, internalCategoryData.modificationMerchantReference) && + Objects.equals(this.modificationPspReference, internalCategoryData.modificationPspReference) && + Objects.equals(this.type, internalCategoryData.type); + } + + @Override + public int hashCode() { + return Objects.hash(modificationMerchantReference, modificationPspReference, type); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class InternalCategoryData {\n"); + sb.append(" modificationMerchantReference: ").append(toIndentedString(modificationMerchantReference)).append("\n"); + sb.append(" modificationPspReference: ").append(toIndentedString(modificationPspReference)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +/** + * Create an instance of InternalCategoryData given an JSON string + * + * @param jsonString JSON string + * @return An instance of InternalCategoryData + * @throws JsonProcessingException if the JSON string is invalid with respect to InternalCategoryData + */ + public static InternalCategoryData fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, InternalCategoryData.class); + } +/** + * Convert an instance of InternalCategoryData to an JSON string + * + * @return JSON string + */ + public String toJson() throws JsonProcessingException { + return JSON.getMapper().writeValueAsString(this); + } +} + diff --git a/src/main/java/com/adyen/model/transferwebhooks/IssuedCard.java b/src/main/java/com/adyen/model/transferwebhooks/IssuedCard.java new file mode 100644 index 000000000..2f6ab4c9a --- /dev/null +++ b/src/main/java/com/adyen/model/transferwebhooks/IssuedCard.java @@ -0,0 +1,389 @@ +/* + * Transfer webhooks + * + * The version of the OpenAPI document: 4 + * + * + * 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.adyen.model.transferwebhooks; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.adyen.model.transferwebhooks.RelayedAuthorisationData; +import com.adyen.model.transferwebhooks.TransferNotificationValidationFact; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.ArrayList; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.core.JsonProcessingException; + + +/** + * IssuedCard + */ +@JsonPropertyOrder({ + IssuedCard.JSON_PROPERTY_PAN_ENTRY_MODE, + IssuedCard.JSON_PROPERTY_PROCESSING_TYPE, + IssuedCard.JSON_PROPERTY_RELAYED_AUTHORISATION_DATA, + IssuedCard.JSON_PROPERTY_TYPE, + IssuedCard.JSON_PROPERTY_VALIDATION_FACTS +}) + +public class IssuedCard { + /** + * Indicates the method used for entering the PAN to initiate a transaction. Possible values: **manual**, **chip**, **magstripe**, **contactless**, **cof**, **ecommerce**, **token**. + */ + public enum PanEntryModeEnum { + CHIP("chip"), + + COF("cof"), + + CONTACTLESS("contactless"), + + ECOMMERCE("ecommerce"), + + MAGSTRIPE("magstripe"), + + MANUAL("manual"), + + TOKEN("token"); + + private String value; + + PanEntryModeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static PanEntryModeEnum fromValue(String value) { + for (PanEntryModeEnum b : PanEntryModeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_PAN_ENTRY_MODE = "panEntryMode"; + private PanEntryModeEnum panEntryMode; + + /** + * Contains information about how the payment was processed. For example, **ecommerce** for online or **pos** for in-person payments. + */ + public enum ProcessingTypeEnum { + ATMWITHDRAW("atmWithdraw"), + + BALANCEINQUIRY("balanceInquiry"), + + ECOMMERCE("ecommerce"), + + MOTO("moto"), + + POS("pos"), + + PURCHASEWITHCASHBACK("purchaseWithCashback"), + + RECURRING("recurring"), + + TOKEN("token"); + + private String value; + + ProcessingTypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static ProcessingTypeEnum fromValue(String value) { + for (ProcessingTypeEnum b : ProcessingTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_PROCESSING_TYPE = "processingType"; + private ProcessingTypeEnum processingType; + + public static final String JSON_PROPERTY_RELAYED_AUTHORISATION_DATA = "relayedAuthorisationData"; + private RelayedAuthorisationData relayedAuthorisationData; + + /** + * **issuedCard** + */ + public enum TypeEnum { + ISSUEDCARD("issuedCard"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_TYPE = "type"; + private TypeEnum type = TypeEnum.ISSUEDCARD; + + public static final String JSON_PROPERTY_VALIDATION_FACTS = "validationFacts"; + private List validationFacts = null; + + public IssuedCard() { + } + + public IssuedCard panEntryMode(PanEntryModeEnum panEntryMode) { + this.panEntryMode = panEntryMode; + return this; + } + + /** + * Indicates the method used for entering the PAN to initiate a transaction. Possible values: **manual**, **chip**, **magstripe**, **contactless**, **cof**, **ecommerce**, **token**. + * @return panEntryMode + **/ + @ApiModelProperty(value = "Indicates the method used for entering the PAN to initiate a transaction. Possible values: **manual**, **chip**, **magstripe**, **contactless**, **cof**, **ecommerce**, **token**.") + @JsonProperty(JSON_PROPERTY_PAN_ENTRY_MODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public PanEntryModeEnum getPanEntryMode() { + return panEntryMode; + } + + + @JsonProperty(JSON_PROPERTY_PAN_ENTRY_MODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPanEntryMode(PanEntryModeEnum panEntryMode) { + this.panEntryMode = panEntryMode; + } + + + public IssuedCard processingType(ProcessingTypeEnum processingType) { + this.processingType = processingType; + return this; + } + + /** + * Contains information about how the payment was processed. For example, **ecommerce** for online or **pos** for in-person payments. + * @return processingType + **/ + @ApiModelProperty(value = "Contains information about how the payment was processed. For example, **ecommerce** for online or **pos** for in-person payments.") + @JsonProperty(JSON_PROPERTY_PROCESSING_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public ProcessingTypeEnum getProcessingType() { + return processingType; + } + + + @JsonProperty(JSON_PROPERTY_PROCESSING_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setProcessingType(ProcessingTypeEnum processingType) { + this.processingType = processingType; + } + + + public IssuedCard relayedAuthorisationData(RelayedAuthorisationData relayedAuthorisationData) { + this.relayedAuthorisationData = relayedAuthorisationData; + return this; + } + + /** + * Get relayedAuthorisationData + * @return relayedAuthorisationData + **/ + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_RELAYED_AUTHORISATION_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public RelayedAuthorisationData getRelayedAuthorisationData() { + return relayedAuthorisationData; + } + + + @JsonProperty(JSON_PROPERTY_RELAYED_AUTHORISATION_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setRelayedAuthorisationData(RelayedAuthorisationData relayedAuthorisationData) { + this.relayedAuthorisationData = relayedAuthorisationData; + } + + + public IssuedCard type(TypeEnum type) { + this.type = type; + return this; + } + + /** + * **issuedCard** + * @return type + **/ + @ApiModelProperty(value = "**issuedCard**") + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public TypeEnum getType() { + return type; + } + + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setType(TypeEnum type) { + this.type = type; + } + + + public IssuedCard validationFacts(List validationFacts) { + this.validationFacts = validationFacts; + return this; + } + + public IssuedCard addValidationFactsItem(TransferNotificationValidationFact validationFactsItem) { + if (this.validationFacts == null) { + this.validationFacts = new ArrayList<>(); + } + this.validationFacts.add(validationFactsItem); + return this; + } + + /** + * The evaluation of the validation facts. See [validation checks](https://docs.adyen.com/issuing/validation-checks) for more information. + * @return validationFacts + **/ + @ApiModelProperty(value = "The evaluation of the validation facts. See [validation checks](https://docs.adyen.com/issuing/validation-checks) for more information.") + @JsonProperty(JSON_PROPERTY_VALIDATION_FACTS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getValidationFacts() { + return validationFacts; + } + + + @JsonProperty(JSON_PROPERTY_VALIDATION_FACTS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setValidationFacts(List validationFacts) { + this.validationFacts = validationFacts; + } + + + /** + * Return true if this IssuedCard object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IssuedCard issuedCard = (IssuedCard) o; + return Objects.equals(this.panEntryMode, issuedCard.panEntryMode) && + Objects.equals(this.processingType, issuedCard.processingType) && + Objects.equals(this.relayedAuthorisationData, issuedCard.relayedAuthorisationData) && + Objects.equals(this.type, issuedCard.type) && + Objects.equals(this.validationFacts, issuedCard.validationFacts); + } + + @Override + public int hashCode() { + return Objects.hash(panEntryMode, processingType, relayedAuthorisationData, type, validationFacts); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IssuedCard {\n"); + sb.append(" panEntryMode: ").append(toIndentedString(panEntryMode)).append("\n"); + sb.append(" processingType: ").append(toIndentedString(processingType)).append("\n"); + sb.append(" relayedAuthorisationData: ").append(toIndentedString(relayedAuthorisationData)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" validationFacts: ").append(toIndentedString(validationFacts)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +/** + * Create an instance of IssuedCard given an JSON string + * + * @param jsonString JSON string + * @return An instance of IssuedCard + * @throws JsonProcessingException if the JSON string is invalid with respect to IssuedCard + */ + public static IssuedCard fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, IssuedCard.class); + } +/** + * Convert an instance of IssuedCard to an JSON string + * + * @return JSON string + */ + public String toJson() throws JsonProcessingException { + return JSON.getMapper().writeValueAsString(this); + } +} + diff --git a/src/main/java/com/adyen/model/transferwebhooks/JSON.java b/src/main/java/com/adyen/model/transferwebhooks/JSON.java index 356c97686..9d993c622 100644 --- a/src/main/java/com/adyen/model/transferwebhooks/JSON.java +++ b/src/main/java/com/adyen/model/transferwebhooks/JSON.java @@ -1,6 +1,7 @@ package com.adyen.model.transferwebhooks; import com.adyen.serializer.ByteArraySerializer; +import com.adyen.serializer.ByteArrayDeserializer; import com.fasterxml.jackson.annotation.*; import com.fasterxml.jackson.databind.*; import com.fasterxml.jackson.databind.json.JsonMapper; @@ -33,6 +34,7 @@ public JSON() { // Custom ByteSerializer SimpleModule simpleModule = new SimpleModule(); simpleModule.addSerializer(byte[].class, new ByteArraySerializer()); + simpleModule.addDeserializer(byte[].class, new ByteArrayDeserializer()); mapper.registerModule(simpleModule); } diff --git a/src/main/java/com/adyen/model/transferwebhooks/MerchantData.java b/src/main/java/com/adyen/model/transferwebhooks/MerchantData.java index 4cfee9901..648b9cd97 100644 --- a/src/main/java/com/adyen/model/transferwebhooks/MerchantData.java +++ b/src/main/java/com/adyen/model/transferwebhooks/MerchantData.java @@ -1,7 +1,7 @@ /* * Transfer webhooks * - * The version of the OpenAPI document: 3 + * The version of the OpenAPI document: 4 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -32,6 +32,7 @@ * MerchantData */ @JsonPropertyOrder({ + MerchantData.JSON_PROPERTY_ACQUIRER_ID, MerchantData.JSON_PROPERTY_MCC, MerchantData.JSON_PROPERTY_MERCHANT_ID, MerchantData.JSON_PROPERTY_NAME_LOCATION, @@ -39,6 +40,9 @@ }) public class MerchantData { + public static final String JSON_PROPERTY_ACQUIRER_ID = "acquirerId"; + private String acquirerId; + public static final String JSON_PROPERTY_MCC = "mcc"; private String mcc; @@ -54,6 +58,31 @@ public class MerchantData { public MerchantData() { } + public MerchantData acquirerId(String acquirerId) { + this.acquirerId = acquirerId; + return this; + } + + /** + * The unique identifier of the merchant's acquirer. + * @return acquirerId + **/ + @ApiModelProperty(value = "The unique identifier of the merchant's acquirer.") + @JsonProperty(JSON_PROPERTY_ACQUIRER_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getAcquirerId() { + return acquirerId; + } + + + @JsonProperty(JSON_PROPERTY_ACQUIRER_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAcquirerId(String acquirerId) { + this.acquirerId = acquirerId; + } + + public MerchantData mcc(String mcc) { this.mcc = mcc; return this; @@ -166,7 +195,8 @@ public boolean equals(Object o) { return false; } MerchantData merchantData = (MerchantData) o; - return Objects.equals(this.mcc, merchantData.mcc) && + return Objects.equals(this.acquirerId, merchantData.acquirerId) && + Objects.equals(this.mcc, merchantData.mcc) && Objects.equals(this.merchantId, merchantData.merchantId) && Objects.equals(this.nameLocation, merchantData.nameLocation) && Objects.equals(this.postalCode, merchantData.postalCode); @@ -174,13 +204,14 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(mcc, merchantId, nameLocation, postalCode); + return Objects.hash(acquirerId, mcc, merchantId, nameLocation, postalCode); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class MerchantData {\n"); + sb.append(" acquirerId: ").append(toIndentedString(acquirerId)).append("\n"); sb.append(" mcc: ").append(toIndentedString(mcc)).append("\n"); sb.append(" merchantId: ").append(toIndentedString(merchantId)).append("\n"); sb.append(" nameLocation: ").append(toIndentedString(nameLocation)).append("\n"); diff --git a/src/main/java/com/adyen/model/transferwebhooks/Modification.java b/src/main/java/com/adyen/model/transferwebhooks/Modification.java new file mode 100644 index 000000000..05169c2bc --- /dev/null +++ b/src/main/java/com/adyen/model/transferwebhooks/Modification.java @@ -0,0 +1,411 @@ +/* + * Transfer webhooks + * + * The version of the OpenAPI document: 4 + * + * + * 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.adyen.model.transferwebhooks; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.core.JsonProcessingException; + + +/** + * Modification + */ +@JsonPropertyOrder({ + Modification.JSON_PROPERTY_DIRECTION, + Modification.JSON_PROPERTY_ID, + Modification.JSON_PROPERTY_REFERENCE, + Modification.JSON_PROPERTY_STATUS, + Modification.JSON_PROPERTY_TYPE +}) + +public class Modification { + public static final String JSON_PROPERTY_DIRECTION = "direction"; + private String direction; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_REFERENCE = "reference"; + private String reference; + + /** + * The status of the transfer event. + */ + public enum StatusEnum { + APPROVALPENDING("approvalPending"), + + ATMWITHDRAWAL("atmWithdrawal"), + + ATMWITHDRAWALREVERSALPENDING("atmWithdrawalReversalPending"), + + ATMWITHDRAWALREVERSED("atmWithdrawalReversed"), + + AUTHADJUSTMENTAUTHORISED("authAdjustmentAuthorised"), + + AUTHADJUSTMENTERROR("authAdjustmentError"), + + AUTHADJUSTMENTREFUSED("authAdjustmentRefused"), + + AUTHORISED("authorised"), + + BANKTRANSFER("bankTransfer"), + + BANKTRANSFERPENDING("bankTransferPending"), + + BOOKED("booked"), + + BOOKINGPENDING("bookingPending"), + + CANCELLED("cancelled"), + + CAPTUREPENDING("capturePending"), + + CAPTUREREVERSALPENDING("captureReversalPending"), + + CAPTUREREVERSED("captureReversed"), + + CAPTURED("captured"), + + CAPTUREDEXTERNALLY("capturedExternally"), + + CHARGEBACK("chargeback"), + + CHARGEBACKEXTERNALLY("chargebackExternally"), + + CHARGEBACKPENDING("chargebackPending"), + + CHARGEBACKREVERSALPENDING("chargebackReversalPending"), + + CHARGEBACKREVERSED("chargebackReversed"), + + CREDITED("credited"), + + DEPOSITCORRECTION("depositCorrection"), + + DEPOSITCORRECTIONPENDING("depositCorrectionPending"), + + DISPUTE("dispute"), + + DISPUTECLOSED("disputeClosed"), + + DISPUTEEXPIRED("disputeExpired"), + + DISPUTENEEDSREVIEW("disputeNeedsReview"), + + ERROR("error"), + + EXPIRED("expired"), + + FAILED("failed"), + + FEE("fee"), + + FEEPENDING("feePending"), + + INTERNALTRANSFER("internalTransfer"), + + INTERNALTRANSFERPENDING("internalTransferPending"), + + INVOICEDEDUCTION("invoiceDeduction"), + + INVOICEDEDUCTIONPENDING("invoiceDeductionPending"), + + MANUALCORRECTIONPENDING("manualCorrectionPending"), + + MANUALLYCORRECTED("manuallyCorrected"), + + MATCHEDSTATEMENT("matchedStatement"), + + MATCHEDSTATEMENTPENDING("matchedStatementPending"), + + MERCHANTPAYIN("merchantPayin"), + + MERCHANTPAYINPENDING("merchantPayinPending"), + + MERCHANTPAYINREVERSED("merchantPayinReversed"), + + MERCHANTPAYINREVERSEDPENDING("merchantPayinReversedPending"), + + MISCCOST("miscCost"), + + MISCCOSTPENDING("miscCostPending"), + + PAYMENTCOST("paymentCost"), + + PAYMENTCOSTPENDING("paymentCostPending"), + + RECEIVED("received"), + + REFUNDPENDING("refundPending"), + + REFUNDREVERSALPENDING("refundReversalPending"), + + REFUNDREVERSED("refundReversed"), + + REFUNDED("refunded"), + + REFUNDEDEXTERNALLY("refundedExternally"), + + REFUSED("refused"), + + RESERVEADJUSTMENT("reserveAdjustment"), + + RESERVEADJUSTMENTPENDING("reserveAdjustmentPending"), + + RETURNED("returned"), + + SECONDCHARGEBACK("secondChargeback"), + + SECONDCHARGEBACKPENDING("secondChargebackPending"), + + UNDEFINED("undefined"); + + private String value; + + StatusEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_STATUS = "status"; + private StatusEnum status; + + public static final String JSON_PROPERTY_TYPE = "type"; + private String type; + + public Modification() { + } + + public Modification direction(String direction) { + this.direction = direction; + return this; + } + + /** + * The direction of the money movement. + * @return direction + **/ + @ApiModelProperty(value = "The direction of the money movement.") + @JsonProperty(JSON_PROPERTY_DIRECTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getDirection() { + return direction; + } + + + @JsonProperty(JSON_PROPERTY_DIRECTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDirection(String direction) { + this.direction = direction; + } + + + public Modification id(String id) { + this.id = id; + return this; + } + + /** + * Our reference for the modification. + * @return id + **/ + @ApiModelProperty(value = "Our reference for the modification.") + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getId() { + return id; + } + + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setId(String id) { + this.id = id; + } + + + public Modification reference(String reference) { + this.reference = reference; + return this; + } + + /** + * Your reference for the modification, used internally within your platform. + * @return reference + **/ + @ApiModelProperty(value = "Your reference for the modification, used internally within your platform.") + @JsonProperty(JSON_PROPERTY_REFERENCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getReference() { + return reference; + } + + + @JsonProperty(JSON_PROPERTY_REFERENCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setReference(String reference) { + this.reference = reference; + } + + + public Modification status(StatusEnum status) { + this.status = status; + return this; + } + + /** + * The status of the transfer event. + * @return status + **/ + @ApiModelProperty(value = "The status of the transfer event.") + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public StatusEnum getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setStatus(StatusEnum status) { + this.status = status; + } + + + public Modification type(String type) { + this.type = type; + return this; + } + + /** + * The type of transfer modification. + * @return type + **/ + @ApiModelProperty(value = "The type of transfer modification.") + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getType() { + return type; + } + + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setType(String type) { + this.type = type; + } + + + /** + * Return true if this Modification object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Modification modification = (Modification) o; + return Objects.equals(this.direction, modification.direction) && + Objects.equals(this.id, modification.id) && + Objects.equals(this.reference, modification.reference) && + Objects.equals(this.status, modification.status) && + Objects.equals(this.type, modification.type); + } + + @Override + public int hashCode() { + return Objects.hash(direction, id, reference, status, type); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Modification {\n"); + sb.append(" direction: ").append(toIndentedString(direction)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" reference: ").append(toIndentedString(reference)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +/** + * Create an instance of Modification given an JSON string + * + * @param jsonString JSON string + * @return An instance of Modification + * @throws JsonProcessingException if the JSON string is invalid with respect to Modification + */ + public static Modification fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, Modification.class); + } +/** + * Convert an instance of Modification to an JSON string + * + * @return JSON string + */ + public String toJson() throws JsonProcessingException { + return JSON.getMapper().writeValueAsString(this); + } +} + diff --git a/src/main/java/com/adyen/model/transferwebhooks/NOLocalAccountIdentification.java b/src/main/java/com/adyen/model/transferwebhooks/NOLocalAccountIdentification.java index 3faa504db..750c17620 100644 --- a/src/main/java/com/adyen/model/transferwebhooks/NOLocalAccountIdentification.java +++ b/src/main/java/com/adyen/model/transferwebhooks/NOLocalAccountIdentification.java @@ -1,7 +1,7 @@ /* * Transfer webhooks * - * The version of the OpenAPI document: 3 + * The version of the OpenAPI document: 4 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/transferwebhooks/NZLocalAccountIdentification.java b/src/main/java/com/adyen/model/transferwebhooks/NZLocalAccountIdentification.java index 0f3427913..7a08a5ace 100644 --- a/src/main/java/com/adyen/model/transferwebhooks/NZLocalAccountIdentification.java +++ b/src/main/java/com/adyen/model/transferwebhooks/NZLocalAccountIdentification.java @@ -1,7 +1,7 @@ /* * Transfer webhooks * - * The version of the OpenAPI document: 3 + * The version of the OpenAPI document: 4 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -32,8 +32,6 @@ */ @JsonPropertyOrder({ NZLocalAccountIdentification.JSON_PROPERTY_ACCOUNT_NUMBER, - NZLocalAccountIdentification.JSON_PROPERTY_ACCOUNT_SUFFIX, - NZLocalAccountIdentification.JSON_PROPERTY_BANK_CODE, NZLocalAccountIdentification.JSON_PROPERTY_TYPE }) @@ -41,12 +39,6 @@ public class NZLocalAccountIdentification { public static final String JSON_PROPERTY_ACCOUNT_NUMBER = "accountNumber"; private String accountNumber; - public static final String JSON_PROPERTY_ACCOUNT_SUFFIX = "accountSuffix"; - private String accountSuffix; - - public static final String JSON_PROPERTY_BANK_CODE = "bankCode"; - private String bankCode; - /** * **nzLocal** */ @@ -92,10 +84,10 @@ public NZLocalAccountIdentification accountNumber(String accountNumber) { } /** - * The 7-digit bank account number, without separators or whitespace. + * The 15-16 digit bank account number. The first 2 digits are the bank number, the next 4 digits are the branch number, the next 7 digits are the account number, and the final 2-3 digits are the suffix. * @return accountNumber **/ - @ApiModelProperty(required = true, value = "The 7-digit bank account number, without separators or whitespace.") + @ApiModelProperty(required = true, value = "The 15-16 digit bank account number. The first 2 digits are the bank number, the next 4 digits are the branch number, the next 7 digits are the account number, and the final 2-3 digits are the suffix.") @JsonProperty(JSON_PROPERTY_ACCOUNT_NUMBER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -111,56 +103,6 @@ public void setAccountNumber(String accountNumber) { } - public NZLocalAccountIdentification accountSuffix(String accountSuffix) { - this.accountSuffix = accountSuffix; - return this; - } - - /** - * The 2- to 3-digit account suffix, without separators or whitespace. - * @return accountSuffix - **/ - @ApiModelProperty(required = true, value = "The 2- to 3-digit account suffix, without separators or whitespace.") - @JsonProperty(JSON_PROPERTY_ACCOUNT_SUFFIX) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getAccountSuffix() { - return accountSuffix; - } - - - @JsonProperty(JSON_PROPERTY_ACCOUNT_SUFFIX) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAccountSuffix(String accountSuffix) { - this.accountSuffix = accountSuffix; - } - - - public NZLocalAccountIdentification bankCode(String bankCode) { - this.bankCode = bankCode; - return this; - } - - /** - * The 6-digit bank code including the 2-digit bank code and 4-digit branch code, without separators or whitespace. - * @return bankCode - **/ - @ApiModelProperty(required = true, value = "The 6-digit bank code including the 2-digit bank code and 4-digit branch code, without separators or whitespace.") - @JsonProperty(JSON_PROPERTY_BANK_CODE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getBankCode() { - return bankCode; - } - - - @JsonProperty(JSON_PROPERTY_BANK_CODE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setBankCode(String bankCode) { - this.bankCode = bankCode; - } - - public NZLocalAccountIdentification type(TypeEnum type) { this.type = type; return this; @@ -199,14 +141,12 @@ public boolean equals(Object o) { } NZLocalAccountIdentification nzLocalAccountIdentification = (NZLocalAccountIdentification) o; return Objects.equals(this.accountNumber, nzLocalAccountIdentification.accountNumber) && - Objects.equals(this.accountSuffix, nzLocalAccountIdentification.accountSuffix) && - Objects.equals(this.bankCode, nzLocalAccountIdentification.bankCode) && Objects.equals(this.type, nzLocalAccountIdentification.type); } @Override public int hashCode() { - return Objects.hash(accountNumber, accountSuffix, bankCode, type); + return Objects.hash(accountNumber, type); } @Override @@ -214,8 +154,6 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class NZLocalAccountIdentification {\n"); sb.append(" accountNumber: ").append(toIndentedString(accountNumber)).append("\n"); - sb.append(" accountSuffix: ").append(toIndentedString(accountSuffix)).append("\n"); - sb.append(" bankCode: ").append(toIndentedString(bankCode)).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/src/main/java/com/adyen/model/transferwebhooks/NameLocation.java b/src/main/java/com/adyen/model/transferwebhooks/NameLocation.java index 2cb478c3c..b665ed5c4 100644 --- a/src/main/java/com/adyen/model/transferwebhooks/NameLocation.java +++ b/src/main/java/com/adyen/model/transferwebhooks/NameLocation.java @@ -1,7 +1,7 @@ /* * Transfer webhooks * - * The version of the OpenAPI document: 3 + * The version of the OpenAPI document: 4 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/transferwebhooks/NumberAndBicAccountIdentification.java b/src/main/java/com/adyen/model/transferwebhooks/NumberAndBicAccountIdentification.java index fb2e33460..21c306837 100644 --- a/src/main/java/com/adyen/model/transferwebhooks/NumberAndBicAccountIdentification.java +++ b/src/main/java/com/adyen/model/transferwebhooks/NumberAndBicAccountIdentification.java @@ -1,7 +1,7 @@ /* * Transfer webhooks * - * The version of the OpenAPI document: 3 + * The version of the OpenAPI document: 4 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/transferwebhooks/PLLocalAccountIdentification.java b/src/main/java/com/adyen/model/transferwebhooks/PLLocalAccountIdentification.java index fcac5e1ab..32c831c74 100644 --- a/src/main/java/com/adyen/model/transferwebhooks/PLLocalAccountIdentification.java +++ b/src/main/java/com/adyen/model/transferwebhooks/PLLocalAccountIdentification.java @@ -1,7 +1,7 @@ /* * Transfer webhooks * - * The version of the OpenAPI document: 3 + * The version of the OpenAPI document: 4 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/transferwebhooks/PartyIdentification.java b/src/main/java/com/adyen/model/transferwebhooks/PartyIdentification.java index 895f44df5..6136330ec 100644 --- a/src/main/java/com/adyen/model/transferwebhooks/PartyIdentification.java +++ b/src/main/java/com/adyen/model/transferwebhooks/PartyIdentification.java @@ -1,7 +1,7 @@ /* * Transfer webhooks * - * The version of the OpenAPI document: 3 + * The version of the OpenAPI document: 4 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/transferwebhooks/PaymentInstrument.java b/src/main/java/com/adyen/model/transferwebhooks/PaymentInstrument.java index 91f9a60b7..e21d0e793 100644 --- a/src/main/java/com/adyen/model/transferwebhooks/PaymentInstrument.java +++ b/src/main/java/com/adyen/model/transferwebhooks/PaymentInstrument.java @@ -1,7 +1,7 @@ /* * Transfer webhooks * - * The version of the OpenAPI document: 3 + * The version of the OpenAPI document: 4 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/transferwebhooks/PlatformPayment.java b/src/main/java/com/adyen/model/transferwebhooks/PlatformPayment.java new file mode 100644 index 000000000..5476b4ef8 --- /dev/null +++ b/src/main/java/com/adyen/model/transferwebhooks/PlatformPayment.java @@ -0,0 +1,373 @@ +/* + * Transfer webhooks + * + * The version of the OpenAPI document: 4 + * + * + * 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.adyen.model.transferwebhooks; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.core.JsonProcessingException; + + +/** + * PlatformPayment + */ +@JsonPropertyOrder({ + PlatformPayment.JSON_PROPERTY_MODIFICATION_MERCHANT_REFERENCE, + PlatformPayment.JSON_PROPERTY_MODIFICATION_PSP_REFERENCE, + PlatformPayment.JSON_PROPERTY_PAYMENT_MERCHANT_REFERENCE, + PlatformPayment.JSON_PROPERTY_PLATFORM_PAYMENT_TYPE, + PlatformPayment.JSON_PROPERTY_PSP_PAYMENT_REFERENCE, + PlatformPayment.JSON_PROPERTY_TYPE +}) + +public class PlatformPayment { + public static final String JSON_PROPERTY_MODIFICATION_MERCHANT_REFERENCE = "modificationMerchantReference"; + private String modificationMerchantReference; + + public static final String JSON_PROPERTY_MODIFICATION_PSP_REFERENCE = "modificationPspReference"; + private String modificationPspReference; + + public static final String JSON_PROPERTY_PAYMENT_MERCHANT_REFERENCE = "paymentMerchantReference"; + private String paymentMerchantReference; + + /** + * The type of the related split. + */ + public enum PlatformPaymentTypeEnum { + ACQUIRINGFEES("AcquiringFees"), + + ADYENCOMMISSION("AdyenCommission"), + + ADYENFEES("AdyenFees"), + + ADYENMARKUP("AdyenMarkup"), + + BALANCEACCOUNT("BalanceAccount"), + + COMMISSION("Commission"), + + DEFAULT("Default"), + + INTERCHANGE("Interchange"), + + PAYMENTFEE("PaymentFee"), + + REMAINDER("Remainder"), + + SCHEMEFEE("SchemeFee"), + + TOPUP("TopUp"), + + VAT("VAT"); + + private String value; + + PlatformPaymentTypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static PlatformPaymentTypeEnum fromValue(String value) { + for (PlatformPaymentTypeEnum b : PlatformPaymentTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_PLATFORM_PAYMENT_TYPE = "platformPaymentType"; + private PlatformPaymentTypeEnum platformPaymentType; + + public static final String JSON_PROPERTY_PSP_PAYMENT_REFERENCE = "pspPaymentReference"; + private String pspPaymentReference; + + /** + * **platformPayment** + */ + public enum TypeEnum { + PLATFORMPAYMENT("platformPayment"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_TYPE = "type"; + private TypeEnum type = TypeEnum.PLATFORMPAYMENT; + + public PlatformPayment() { + } + + public PlatformPayment modificationMerchantReference(String modificationMerchantReference) { + this.modificationMerchantReference = modificationMerchantReference; + return this; + } + + /** + * The capture's merchant reference included in the transfer. + * @return modificationMerchantReference + **/ + @ApiModelProperty(value = "The capture's merchant reference included in the transfer.") + @JsonProperty(JSON_PROPERTY_MODIFICATION_MERCHANT_REFERENCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getModificationMerchantReference() { + return modificationMerchantReference; + } + + + @JsonProperty(JSON_PROPERTY_MODIFICATION_MERCHANT_REFERENCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setModificationMerchantReference(String modificationMerchantReference) { + this.modificationMerchantReference = modificationMerchantReference; + } + + + public PlatformPayment modificationPspReference(String modificationPspReference) { + this.modificationPspReference = modificationPspReference; + return this; + } + + /** + * The capture reference included in the transfer. + * @return modificationPspReference + **/ + @ApiModelProperty(value = "The capture reference included in the transfer.") + @JsonProperty(JSON_PROPERTY_MODIFICATION_PSP_REFERENCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getModificationPspReference() { + return modificationPspReference; + } + + + @JsonProperty(JSON_PROPERTY_MODIFICATION_PSP_REFERENCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setModificationPspReference(String modificationPspReference) { + this.modificationPspReference = modificationPspReference; + } + + + public PlatformPayment paymentMerchantReference(String paymentMerchantReference) { + this.paymentMerchantReference = paymentMerchantReference; + return this; + } + + /** + * The payment's merchant reference included in the transfer. + * @return paymentMerchantReference + **/ + @ApiModelProperty(value = "The payment's merchant reference included in the transfer.") + @JsonProperty(JSON_PROPERTY_PAYMENT_MERCHANT_REFERENCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getPaymentMerchantReference() { + return paymentMerchantReference; + } + + + @JsonProperty(JSON_PROPERTY_PAYMENT_MERCHANT_REFERENCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPaymentMerchantReference(String paymentMerchantReference) { + this.paymentMerchantReference = paymentMerchantReference; + } + + + public PlatformPayment platformPaymentType(PlatformPaymentTypeEnum platformPaymentType) { + this.platformPaymentType = platformPaymentType; + return this; + } + + /** + * The type of the related split. + * @return platformPaymentType + **/ + @ApiModelProperty(value = "The type of the related split.") + @JsonProperty(JSON_PROPERTY_PLATFORM_PAYMENT_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public PlatformPaymentTypeEnum getPlatformPaymentType() { + return platformPaymentType; + } + + + @JsonProperty(JSON_PROPERTY_PLATFORM_PAYMENT_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPlatformPaymentType(PlatformPaymentTypeEnum platformPaymentType) { + this.platformPaymentType = platformPaymentType; + } + + + public PlatformPayment pspPaymentReference(String pspPaymentReference) { + this.pspPaymentReference = pspPaymentReference; + return this; + } + + /** + * The payment reference included in the transfer. + * @return pspPaymentReference + **/ + @ApiModelProperty(value = "The payment reference included in the transfer.") + @JsonProperty(JSON_PROPERTY_PSP_PAYMENT_REFERENCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getPspPaymentReference() { + return pspPaymentReference; + } + + + @JsonProperty(JSON_PROPERTY_PSP_PAYMENT_REFERENCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPspPaymentReference(String pspPaymentReference) { + this.pspPaymentReference = pspPaymentReference; + } + + + public PlatformPayment type(TypeEnum type) { + this.type = type; + return this; + } + + /** + * **platformPayment** + * @return type + **/ + @ApiModelProperty(value = "**platformPayment**") + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public TypeEnum getType() { + return type; + } + + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setType(TypeEnum type) { + this.type = type; + } + + + /** + * Return true if this PlatformPayment object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PlatformPayment platformPayment = (PlatformPayment) o; + return Objects.equals(this.modificationMerchantReference, platformPayment.modificationMerchantReference) && + Objects.equals(this.modificationPspReference, platformPayment.modificationPspReference) && + Objects.equals(this.paymentMerchantReference, platformPayment.paymentMerchantReference) && + Objects.equals(this.platformPaymentType, platformPayment.platformPaymentType) && + Objects.equals(this.pspPaymentReference, platformPayment.pspPaymentReference) && + Objects.equals(this.type, platformPayment.type); + } + + @Override + public int hashCode() { + return Objects.hash(modificationMerchantReference, modificationPspReference, paymentMerchantReference, platformPaymentType, pspPaymentReference, type); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PlatformPayment {\n"); + sb.append(" modificationMerchantReference: ").append(toIndentedString(modificationMerchantReference)).append("\n"); + sb.append(" modificationPspReference: ").append(toIndentedString(modificationPspReference)).append("\n"); + sb.append(" paymentMerchantReference: ").append(toIndentedString(paymentMerchantReference)).append("\n"); + sb.append(" platformPaymentType: ").append(toIndentedString(platformPaymentType)).append("\n"); + sb.append(" pspPaymentReference: ").append(toIndentedString(pspPaymentReference)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +/** + * Create an instance of PlatformPayment given an JSON string + * + * @param jsonString JSON string + * @return An instance of PlatformPayment + * @throws JsonProcessingException if the JSON string is invalid with respect to PlatformPayment + */ + public static PlatformPayment fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, PlatformPayment.class); + } +/** + * Convert an instance of PlatformPayment to an JSON string + * + * @return JSON string + */ + public String toJson() throws JsonProcessingException { + return JSON.getMapper().writeValueAsString(this); + } +} + diff --git a/src/main/java/com/adyen/model/transferwebhooks/RelayedAuthorisationData.java b/src/main/java/com/adyen/model/transferwebhooks/RelayedAuthorisationData.java index 12c22ad21..06064861a 100644 --- a/src/main/java/com/adyen/model/transferwebhooks/RelayedAuthorisationData.java +++ b/src/main/java/com/adyen/model/transferwebhooks/RelayedAuthorisationData.java @@ -1,7 +1,7 @@ /* * Transfer webhooks * - * The version of the OpenAPI document: 3 + * The version of the OpenAPI document: 4 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/transferwebhooks/Resource.java b/src/main/java/com/adyen/model/transferwebhooks/Resource.java index ae6a17d75..fd2cd3be9 100644 --- a/src/main/java/com/adyen/model/transferwebhooks/Resource.java +++ b/src/main/java/com/adyen/model/transferwebhooks/Resource.java @@ -1,7 +1,7 @@ /* * Transfer webhooks * - * The version of the OpenAPI document: 3 + * The version of the OpenAPI document: 4 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/transferwebhooks/ResourceReference.java b/src/main/java/com/adyen/model/transferwebhooks/ResourceReference.java index 1fb60d1d1..b79809c2e 100644 --- a/src/main/java/com/adyen/model/transferwebhooks/ResourceReference.java +++ b/src/main/java/com/adyen/model/transferwebhooks/ResourceReference.java @@ -1,7 +1,7 @@ /* * Transfer webhooks * - * The version of the OpenAPI document: 3 + * The version of the OpenAPI document: 4 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/transferwebhooks/SELocalAccountIdentification.java b/src/main/java/com/adyen/model/transferwebhooks/SELocalAccountIdentification.java index 77f40bd8d..6a2a8429b 100644 --- a/src/main/java/com/adyen/model/transferwebhooks/SELocalAccountIdentification.java +++ b/src/main/java/com/adyen/model/transferwebhooks/SELocalAccountIdentification.java @@ -1,7 +1,7 @@ /* * Transfer webhooks * - * The version of the OpenAPI document: 3 + * The version of the OpenAPI document: 4 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/transferwebhooks/SGLocalAccountIdentification.java b/src/main/java/com/adyen/model/transferwebhooks/SGLocalAccountIdentification.java index 33295b060..08269deea 100644 --- a/src/main/java/com/adyen/model/transferwebhooks/SGLocalAccountIdentification.java +++ b/src/main/java/com/adyen/model/transferwebhooks/SGLocalAccountIdentification.java @@ -1,7 +1,7 @@ /* * Transfer webhooks * - * The version of the OpenAPI document: 3 + * The version of the OpenAPI document: 4 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/transferwebhooks/TransactionEventViolation.java b/src/main/java/com/adyen/model/transferwebhooks/TransactionEventViolation.java index 318514c70..44278a7d8 100644 --- a/src/main/java/com/adyen/model/transferwebhooks/TransactionEventViolation.java +++ b/src/main/java/com/adyen/model/transferwebhooks/TransactionEventViolation.java @@ -1,7 +1,7 @@ /* * Transfer webhooks * - * The version of the OpenAPI document: 3 + * The version of the OpenAPI document: 4 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/transferwebhooks/TransactionRuleReference.java b/src/main/java/com/adyen/model/transferwebhooks/TransactionRuleReference.java index dd524f4ae..1d8ccb31d 100644 --- a/src/main/java/com/adyen/model/transferwebhooks/TransactionRuleReference.java +++ b/src/main/java/com/adyen/model/transferwebhooks/TransactionRuleReference.java @@ -1,7 +1,7 @@ /* * Transfer webhooks * - * The version of the OpenAPI document: 3 + * The version of the OpenAPI document: 4 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -33,7 +33,9 @@ @JsonPropertyOrder({ TransactionRuleReference.JSON_PROPERTY_DESCRIPTION, TransactionRuleReference.JSON_PROPERTY_ID, - TransactionRuleReference.JSON_PROPERTY_REFERENCE + TransactionRuleReference.JSON_PROPERTY_OUTCOME_TYPE, + TransactionRuleReference.JSON_PROPERTY_REFERENCE, + TransactionRuleReference.JSON_PROPERTY_SCORE }) public class TransactionRuleReference { @@ -43,9 +45,15 @@ public class TransactionRuleReference { public static final String JSON_PROPERTY_ID = "id"; private String id; + public static final String JSON_PROPERTY_OUTCOME_TYPE = "outcomeType"; + private String outcomeType; + public static final String JSON_PROPERTY_REFERENCE = "reference"; private String reference; + public static final String JSON_PROPERTY_SCORE = "score"; + private Integer score; + public TransactionRuleReference() { } @@ -99,6 +107,31 @@ public void setId(String id) { } + public TransactionRuleReference outcomeType(String outcomeType) { + this.outcomeType = outcomeType; + return this; + } + + /** + * The outcome type of the rule. + * @return outcomeType + **/ + @ApiModelProperty(value = "The outcome type of the rule.") + @JsonProperty(JSON_PROPERTY_OUTCOME_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getOutcomeType() { + return outcomeType; + } + + + @JsonProperty(JSON_PROPERTY_OUTCOME_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setOutcomeType(String outcomeType) { + this.outcomeType = outcomeType; + } + + public TransactionRuleReference reference(String reference) { this.reference = reference; return this; @@ -124,6 +157,31 @@ public void setReference(String reference) { } + public TransactionRuleReference score(Integer score) { + this.score = score; + return this; + } + + /** + * The score of the rule in case it's a scoreBased rule. + * @return score + **/ + @ApiModelProperty(value = "The score of the rule in case it's a scoreBased rule.") + @JsonProperty(JSON_PROPERTY_SCORE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Integer getScore() { + return score; + } + + + @JsonProperty(JSON_PROPERTY_SCORE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setScore(Integer score) { + this.score = score; + } + + /** * Return true if this TransactionRuleReference object is equal to o. */ @@ -138,12 +196,14 @@ public boolean equals(Object o) { TransactionRuleReference transactionRuleReference = (TransactionRuleReference) o; return Objects.equals(this.description, transactionRuleReference.description) && Objects.equals(this.id, transactionRuleReference.id) && - Objects.equals(this.reference, transactionRuleReference.reference); + Objects.equals(this.outcomeType, transactionRuleReference.outcomeType) && + Objects.equals(this.reference, transactionRuleReference.reference) && + Objects.equals(this.score, transactionRuleReference.score); } @Override public int hashCode() { - return Objects.hash(description, id, reference); + return Objects.hash(description, id, outcomeType, reference, score); } @Override @@ -152,7 +212,9 @@ public String toString() { sb.append("class TransactionRuleReference {\n"); sb.append(" description: ").append(toIndentedString(description)).append("\n"); sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" outcomeType: ").append(toIndentedString(outcomeType)).append("\n"); sb.append(" reference: ").append(toIndentedString(reference)).append("\n"); + sb.append(" score: ").append(toIndentedString(score)).append("\n"); sb.append("}"); return sb.toString(); } diff --git a/src/main/java/com/adyen/model/transferwebhooks/TransactionRuleSource.java b/src/main/java/com/adyen/model/transferwebhooks/TransactionRuleSource.java index 1bf78e58a..073b14f94 100644 --- a/src/main/java/com/adyen/model/transferwebhooks/TransactionRuleSource.java +++ b/src/main/java/com/adyen/model/transferwebhooks/TransactionRuleSource.java @@ -1,7 +1,7 @@ /* * Transfer webhooks * - * The version of the OpenAPI document: 3 + * The version of the OpenAPI document: 4 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/transferwebhooks/TransactionRulesResult.java b/src/main/java/com/adyen/model/transferwebhooks/TransactionRulesResult.java index 960136bce..63f1f09bb 100644 --- a/src/main/java/com/adyen/model/transferwebhooks/TransactionRulesResult.java +++ b/src/main/java/com/adyen/model/transferwebhooks/TransactionRulesResult.java @@ -1,7 +1,7 @@ /* * Transfer webhooks * - * The version of the OpenAPI document: 3 + * The version of the OpenAPI document: 4 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -35,24 +35,24 @@ */ @JsonPropertyOrder({ TransactionRulesResult.JSON_PROPERTY_ADVICE, - TransactionRulesResult.JSON_PROPERTY_ALL_RULES_PASSED, - TransactionRulesResult.JSON_PROPERTY_FAILED_TRANSACTION_RULES, - TransactionRulesResult.JSON_PROPERTY_SCORE + TransactionRulesResult.JSON_PROPERTY_ALL_HARD_BLOCK_RULES_PASSED, + TransactionRulesResult.JSON_PROPERTY_SCORE, + TransactionRulesResult.JSON_PROPERTY_TRIGGERED_TRANSACTION_RULES }) public class TransactionRulesResult { public static final String JSON_PROPERTY_ADVICE = "advice"; private String advice; - public static final String JSON_PROPERTY_ALL_RULES_PASSED = "allRulesPassed"; - private Boolean allRulesPassed; - - public static final String JSON_PROPERTY_FAILED_TRANSACTION_RULES = "failedTransactionRules"; - private List failedTransactionRules = null; + public static final String JSON_PROPERTY_ALL_HARD_BLOCK_RULES_PASSED = "allHardBlockRulesPassed"; + private Boolean allHardBlockRulesPassed; public static final String JSON_PROPERTY_SCORE = "score"; private Integer score; + public static final String JSON_PROPERTY_TRIGGERED_TRANSACTION_RULES = "triggeredTransactionRules"; + private List triggeredTransactionRules = null; + public TransactionRulesResult() { } @@ -81,86 +81,86 @@ public void setAdvice(String advice) { } - public TransactionRulesResult allRulesPassed(Boolean allRulesPassed) { - this.allRulesPassed = allRulesPassed; + public TransactionRulesResult allHardBlockRulesPassed(Boolean allHardBlockRulesPassed) { + this.allHardBlockRulesPassed = allHardBlockRulesPassed; return this; } /** - * Indicates whether the transaction passed the evaluation for all transaction rules. - * @return allRulesPassed + * Indicates whether the transaction passed the evaluation for all hardblock rules + * @return allHardBlockRulesPassed **/ - @ApiModelProperty(value = "Indicates whether the transaction passed the evaluation for all transaction rules.") - @JsonProperty(JSON_PROPERTY_ALL_RULES_PASSED) + @ApiModelProperty(value = "Indicates whether the transaction passed the evaluation for all hardblock rules") + @JsonProperty(JSON_PROPERTY_ALL_HARD_BLOCK_RULES_PASSED) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getAllRulesPassed() { - return allRulesPassed; + public Boolean getAllHardBlockRulesPassed() { + return allHardBlockRulesPassed; } - @JsonProperty(JSON_PROPERTY_ALL_RULES_PASSED) + @JsonProperty(JSON_PROPERTY_ALL_HARD_BLOCK_RULES_PASSED) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAllRulesPassed(Boolean allRulesPassed) { - this.allRulesPassed = allRulesPassed; + public void setAllHardBlockRulesPassed(Boolean allHardBlockRulesPassed) { + this.allHardBlockRulesPassed = allHardBlockRulesPassed; } - public TransactionRulesResult failedTransactionRules(List failedTransactionRules) { - this.failedTransactionRules = failedTransactionRules; - return this; - } - - public TransactionRulesResult addFailedTransactionRulesItem(TransactionEventViolation failedTransactionRulesItem) { - if (this.failedTransactionRules == null) { - this.failedTransactionRules = new ArrayList<>(); - } - this.failedTransactionRules.add(failedTransactionRulesItem); + public TransactionRulesResult score(Integer score) { + this.score = score; return this; } /** - * Array containing all the transaction rules that the transaction violated. This list is only sent when `allRulesPassed` is **false**. - * @return failedTransactionRules + * The score of the Risk analysis. + * @return score **/ - @ApiModelProperty(value = "Array containing all the transaction rules that the transaction violated. This list is only sent when `allRulesPassed` is **false**.") - @JsonProperty(JSON_PROPERTY_FAILED_TRANSACTION_RULES) + @ApiModelProperty(value = "The score of the Risk analysis.") + @JsonProperty(JSON_PROPERTY_SCORE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getFailedTransactionRules() { - return failedTransactionRules; + public Integer getScore() { + return score; } - @JsonProperty(JSON_PROPERTY_FAILED_TRANSACTION_RULES) + @JsonProperty(JSON_PROPERTY_SCORE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFailedTransactionRules(List failedTransactionRules) { - this.failedTransactionRules = failedTransactionRules; + public void setScore(Integer score) { + this.score = score; } - public TransactionRulesResult score(Integer score) { - this.score = score; + public TransactionRulesResult triggeredTransactionRules(List triggeredTransactionRules) { + this.triggeredTransactionRules = triggeredTransactionRules; + return this; + } + + public TransactionRulesResult addTriggeredTransactionRulesItem(TransactionEventViolation triggeredTransactionRulesItem) { + if (this.triggeredTransactionRules == null) { + this.triggeredTransactionRules = new ArrayList<>(); + } + this.triggeredTransactionRules.add(triggeredTransactionRulesItem); return this; } /** - * The score of the Risk analysis. - * @return score + * Array containing all the transaction rules that the transaction triggered. + * @return triggeredTransactionRules **/ - @ApiModelProperty(value = "The score of the Risk analysis.") - @JsonProperty(JSON_PROPERTY_SCORE) + @ApiModelProperty(value = "Array containing all the transaction rules that the transaction triggered.") + @JsonProperty(JSON_PROPERTY_TRIGGERED_TRANSACTION_RULES) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Integer getScore() { - return score; + public List getTriggeredTransactionRules() { + return triggeredTransactionRules; } - @JsonProperty(JSON_PROPERTY_SCORE) + @JsonProperty(JSON_PROPERTY_TRIGGERED_TRANSACTION_RULES) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setScore(Integer score) { - this.score = score; + public void setTriggeredTransactionRules(List triggeredTransactionRules) { + this.triggeredTransactionRules = triggeredTransactionRules; } @@ -177,14 +177,14 @@ public boolean equals(Object o) { } TransactionRulesResult transactionRulesResult = (TransactionRulesResult) o; return Objects.equals(this.advice, transactionRulesResult.advice) && - Objects.equals(this.allRulesPassed, transactionRulesResult.allRulesPassed) && - Objects.equals(this.failedTransactionRules, transactionRulesResult.failedTransactionRules) && - Objects.equals(this.score, transactionRulesResult.score); + Objects.equals(this.allHardBlockRulesPassed, transactionRulesResult.allHardBlockRulesPassed) && + Objects.equals(this.score, transactionRulesResult.score) && + Objects.equals(this.triggeredTransactionRules, transactionRulesResult.triggeredTransactionRules); } @Override public int hashCode() { - return Objects.hash(advice, allRulesPassed, failedTransactionRules, score); + return Objects.hash(advice, allHardBlockRulesPassed, score, triggeredTransactionRules); } @Override @@ -192,9 +192,9 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class TransactionRulesResult {\n"); sb.append(" advice: ").append(toIndentedString(advice)).append("\n"); - sb.append(" allRulesPassed: ").append(toIndentedString(allRulesPassed)).append("\n"); - sb.append(" failedTransactionRules: ").append(toIndentedString(failedTransactionRules)).append("\n"); + sb.append(" allHardBlockRulesPassed: ").append(toIndentedString(allHardBlockRulesPassed)).append("\n"); sb.append(" score: ").append(toIndentedString(score)).append("\n"); + sb.append(" triggeredTransactionRules: ").append(toIndentedString(triggeredTransactionRules)).append("\n"); sb.append("}"); return sb.toString(); } diff --git a/src/main/java/com/adyen/model/transferwebhooks/TransferData.java b/src/main/java/com/adyen/model/transferwebhooks/TransferData.java index c1064dcbf..2f6a3f7cb 100644 --- a/src/main/java/com/adyen/model/transferwebhooks/TransferData.java +++ b/src/main/java/com/adyen/model/transferwebhooks/TransferData.java @@ -1,7 +1,7 @@ /* * Transfer webhooks * - * The version of the OpenAPI document: 3 + * The version of the OpenAPI document: 4 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -20,12 +20,11 @@ import com.adyen.model.transferwebhooks.BalanceMutation; import com.adyen.model.transferwebhooks.CounterpartyV3; import com.adyen.model.transferwebhooks.PaymentInstrument; -import com.adyen.model.transferwebhooks.RelayedAuthorisationData; import com.adyen.model.transferwebhooks.ResourceReference; import com.adyen.model.transferwebhooks.TransactionRulesResult; +import com.adyen.model.transferwebhooks.TransferDataCategoryData; import com.adyen.model.transferwebhooks.TransferEvent; import com.adyen.model.transferwebhooks.TransferNotificationTransferTracking; -import com.adyen.model.transferwebhooks.TransferNotificationValidationFact; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -47,37 +46,25 @@ TransferData.JSON_PROPERTY_ACCOUNT_HOLDER, TransferData.JSON_PROPERTY_AMOUNT, TransferData.JSON_PROPERTY_BALANCE_ACCOUNT, - TransferData.JSON_PROPERTY_BALANCE_ACCOUNT_ID, TransferData.JSON_PROPERTY_BALANCE_PLATFORM, TransferData.JSON_PROPERTY_BALANCES, TransferData.JSON_PROPERTY_CATEGORY, + TransferData.JSON_PROPERTY_CATEGORY_DATA, TransferData.JSON_PROPERTY_COUNTERPARTY, TransferData.JSON_PROPERTY_CREATION_DATE, TransferData.JSON_PROPERTY_DESCRIPTION, TransferData.JSON_PROPERTY_DIRECTION, TransferData.JSON_PROPERTY_EVENTS, TransferData.JSON_PROPERTY_ID, - TransferData.JSON_PROPERTY_MODIFICATION_MERCHANT_REFERENCE, - TransferData.JSON_PROPERTY_MODIFICATION_PSP_REFERENCE, - TransferData.JSON_PROPERTY_PAN_ENTRY_MODE, TransferData.JSON_PROPERTY_PAYMENT_INSTRUMENT, - TransferData.JSON_PROPERTY_PAYMENT_INSTRUMENT_ID, - TransferData.JSON_PROPERTY_PAYMENT_MERCHANT_REFERENCE, - TransferData.JSON_PROPERTY_PLATFORM_PAYMENT_TYPE, - TransferData.JSON_PROPERTY_PRIORITY, - TransferData.JSON_PROPERTY_PROCESSING_TYPE, - TransferData.JSON_PROPERTY_PSP_PAYMENT_REFERENCE, TransferData.JSON_PROPERTY_REASON, TransferData.JSON_PROPERTY_REFERENCE, TransferData.JSON_PROPERTY_REFERENCE_FOR_BENEFICIARY, - TransferData.JSON_PROPERTY_RELAYED_AUTHORISATION_DATA, TransferData.JSON_PROPERTY_SEQUENCE_NUMBER, TransferData.JSON_PROPERTY_STATUS, TransferData.JSON_PROPERTY_TRACKING, - TransferData.JSON_PROPERTY_TRANSACTION_ID, TransferData.JSON_PROPERTY_TRANSACTION_RULES_RESULT, - TransferData.JSON_PROPERTY_TYPE, - TransferData.JSON_PROPERTY_VALIDATION_FACTS + TransferData.JSON_PROPERTY_TYPE }) public class TransferData { @@ -90,9 +77,6 @@ public class TransferData { public static final String JSON_PROPERTY_BALANCE_ACCOUNT = "balanceAccount"; private ResourceReference balanceAccount; - public static final String JSON_PROPERTY_BALANCE_ACCOUNT_ID = "balanceAccountId"; - private String balanceAccountId; - public static final String JSON_PROPERTY_BALANCE_PLATFORM = "balancePlatform"; private String balancePlatform; @@ -100,7 +84,7 @@ public class TransferData { private List balances = null; /** - * The type of transfer. Possible values: - **bank**: Transfer to a [transfer instrument](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/transferInstruments__resParam_id) or a bank account. - **internal**: Transfer to another [balance account](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/post/balanceAccounts__resParam_id) within your platform. - **issuedCard**: Transfer initiated by a Adyen-issued card. - **platformPayment**: Fund movements related to payments that are acquired for your users. + * The category of transfer. Possible values: - **bank**: Transfer to a [transfer instrument](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/transferInstruments__resParam_id) or a bank account. - **internal**: Transfer to another [balance account](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/post/balanceAccounts__resParam_id) within your platform. - **issuedCard**: Transfer initiated by a Adyen-issued card. - **platformPayment**: Fund movements related to payments that are acquired for your users. */ public enum CategoryEnum { BANK("bank"), @@ -141,6 +125,9 @@ public static CategoryEnum fromValue(String value) { public static final String JSON_PROPERTY_CATEGORY = "category"; private CategoryEnum category; + public static final String JSON_PROPERTY_CATEGORY_DATA = "categoryData"; + private TransferDataCategoryData categoryData; + public static final String JSON_PROPERTY_COUNTERPARTY = "counterparty"; private CounterpartyV3 counterparty; @@ -194,214 +181,9 @@ public static DirectionEnum fromValue(String value) { public static final String JSON_PROPERTY_ID = "id"; private String id; - public static final String JSON_PROPERTY_MODIFICATION_MERCHANT_REFERENCE = "modificationMerchantReference"; - private String modificationMerchantReference; - - public static final String JSON_PROPERTY_MODIFICATION_PSP_REFERENCE = "modificationPspReference"; - private String modificationPspReference; - - /** - * Indicates the method used for entering the PAN to initiate a transaction. Possible values: **manual**, **chip**, **magstripe**, **contactless**, **cof**, **ecommerce**, **token**. - */ - public enum PanEntryModeEnum { - CHIP("chip"), - - COF("cof"), - - CONTACTLESS("contactless"), - - ECOMMERCE("ecommerce"), - - MAGSTRIPE("magstripe"), - - MANUAL("manual"), - - TOKEN("token"); - - private String value; - - PanEntryModeEnum(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static PanEntryModeEnum fromValue(String value) { - for (PanEntryModeEnum b : PanEntryModeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - } - - public static final String JSON_PROPERTY_PAN_ENTRY_MODE = "panEntryMode"; - private PanEntryModeEnum panEntryMode; - public static final String JSON_PROPERTY_PAYMENT_INSTRUMENT = "paymentInstrument"; private PaymentInstrument paymentInstrument; - public static final String JSON_PROPERTY_PAYMENT_INSTRUMENT_ID = "paymentInstrumentId"; - private String paymentInstrumentId; - - public static final String JSON_PROPERTY_PAYMENT_MERCHANT_REFERENCE = "paymentMerchantReference"; - private String paymentMerchantReference; - - /** - * The type of the related split. - */ - public enum PlatformPaymentTypeEnum { - BALANCEACCOUNT("BalanceAccount"), - - COMMISSION("Commission"), - - DEFAULT("Default"), - - PAYMENTFEE("PaymentFee"), - - VAT("VAT"); - - private String value; - - PlatformPaymentTypeEnum(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static PlatformPaymentTypeEnum fromValue(String value) { - for (PlatformPaymentTypeEnum b : PlatformPaymentTypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - } - - public static final String JSON_PROPERTY_PLATFORM_PAYMENT_TYPE = "platformPaymentType"; - private PlatformPaymentTypeEnum platformPaymentType; - - /** - * The priority for the bank transfer. This sets the speed at which the transfer is sent and the fees that you have to pay. Required for transfers with `category` **bank**. Possible values: * **regular**: For normal, low-value transactions. * **fast**: Faster way to transfer funds but has higher fees. Recommended for high-priority, low-value transactions. * **wire**: Fastest way to transfer funds but has the highest fees. Recommended for high-priority, high-value transactions. * **instant**: Instant way to transfer funds in [SEPA countries](https://www.ecb.europa.eu/paym/integration/retail/sepa/html/index.en.html). * **crossBorder**: High-value transfer to a recipient in a different country. * **internal**: Transfer to an Adyen-issued business bank account (by bank account number/IBAN). - */ - public enum PriorityEnum { - CROSSBORDER("crossBorder"), - - DIRECTDEBIT("directDebit"), - - FAST("fast"), - - INSTANT("instant"), - - INTERNAL("internal"), - - REGULAR("regular"), - - WIRE("wire"); - - private String value; - - PriorityEnum(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static PriorityEnum fromValue(String value) { - for (PriorityEnum b : PriorityEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - } - - public static final String JSON_PROPERTY_PRIORITY = "priority"; - private PriorityEnum priority; - - /** - * Contains information about how the payment was processed. For example, **ecommerce** for online or **pos** for in-person payments. - */ - public enum ProcessingTypeEnum { - ATMWITHDRAW("atmWithdraw"), - - BALANCEINQUIRY("balanceInquiry"), - - ECOMMERCE("ecommerce"), - - MOTO("moto"), - - POS("pos"), - - PURCHASEWITHCASHBACK("purchaseWithCashback"), - - RECURRING("recurring"), - - TOKEN("token"); - - private String value; - - ProcessingTypeEnum(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static ProcessingTypeEnum fromValue(String value) { - for (ProcessingTypeEnum b : ProcessingTypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - } - - public static final String JSON_PROPERTY_PROCESSING_TYPE = "processingType"; - private ProcessingTypeEnum processingType; - - public static final String JSON_PROPERTY_PSP_PAYMENT_REFERENCE = "pspPaymentReference"; - private String pspPaymentReference; - /** * Additional information about the status of the transfer. */ @@ -410,6 +192,8 @@ public enum ReasonEnum { APPROVED("approved"), + BALANCEACCOUNTTEMPORARILYBLOCKEDBYTRANSACTIONRULE("balanceAccountTemporarilyBlockedByTransactionRule"), + COUNTERPARTYACCOUNTBLOCKED("counterpartyAccountBlocked"), COUNTERPARTYACCOUNTCLOSED("counterpartyAccountClosed"), @@ -422,6 +206,8 @@ public enum ReasonEnum { COUNTERPARTYBANKUNAVAILABLE("counterpartyBankUnavailable"), + DECLINEDBYTRANSACTIONRULE("declinedByTransactionRule"), + ERROR("error"), NOTENOUGHBALANCE("notEnoughBalance"), @@ -430,6 +216,8 @@ public enum ReasonEnum { ROUTENOTFOUND("routeNotFound"), + SCAFAILED("scaFailed"), + UNKNOWN("unknown"); private String value; @@ -468,9 +256,6 @@ public static ReasonEnum fromValue(String value) { public static final String JSON_PROPERTY_REFERENCE_FOR_BENEFICIARY = "referenceForBeneficiary"; private String referenceForBeneficiary; - public static final String JSON_PROPERTY_RELAYED_AUTHORISATION_DATA = "relayedAuthorisationData"; - private RelayedAuthorisationData relayedAuthorisationData; - public static final String JSON_PROPERTY_SEQUENCE_NUMBER = "sequenceNumber"; private Integer sequenceNumber; @@ -576,14 +361,6 @@ public enum StatusEnum { MISCCOSTPENDING("miscCostPending"), - OPERATIONAUTHORIZED("operationAuthorized"), - - OPERATIONBOOKED("operationBooked"), - - OPERATIONPENDING("operationPending"), - - OPERATIONRECEIVED("operationReceived"), - PAYMENTCOST("paymentCost"), PAYMENTCOSTPENDING("paymentCostPending"), @@ -647,9 +424,6 @@ public static StatusEnum fromValue(String value) { public static final String JSON_PROPERTY_TRACKING = "tracking"; private TransferNotificationTransferTracking tracking; - public static final String JSON_PROPERTY_TRANSACTION_ID = "transactionId"; - private String transactionId; - public static final String JSON_PROPERTY_TRANSACTION_RULES_RESULT = "transactionRulesResult"; private TransactionRulesResult transactionRulesResult; @@ -663,6 +437,8 @@ public enum TypeEnum { BALANCEADJUSTMENT("balanceAdjustment"), + BALANCEMIGRATION("balanceMigration"), + BALANCEROLLOVER("balanceRollover"), BANKTRANSFER("bankTransfer"), @@ -673,10 +449,20 @@ public enum TypeEnum { CARDTRANSFER("cardTransfer"), + CASHOUTFEE("cashOutFee"), + + CASHOUTFUNDING("cashOutFunding"), + + CASHOUTINSTRUCTION("cashOutInstruction"), + CHARGEBACK("chargeback"), + CHARGEBACKCORRECTION("chargebackCorrection"), + CHARGEBACKREVERSAL("chargebackReversal"), + CHARGEBACKREVERSALCORRECTION("chargebackReversalCorrection"), + DEPOSITCORRECTION("depositCorrection"), FEE("fee"), @@ -709,7 +495,9 @@ public enum TypeEnum { RESERVEADJUSTMENT("reserveAdjustment"), - SECONDCHARGEBACK("secondChargeback"); + SECONDCHARGEBACK("secondChargeback"), + + SECONDCHARGEBACKCORRECTION("secondChargebackCorrection"); private String value; @@ -741,9 +529,6 @@ public static TypeEnum fromValue(String value) { public static final String JSON_PROPERTY_TYPE = "type"; private TypeEnum type; - public static final String JSON_PROPERTY_VALIDATION_FACTS = "validationFacts"; - private List validationFacts = null; - public TransferData() { } @@ -822,34 +607,6 @@ public void setBalanceAccount(ResourceReference balanceAccount) { } - public TransferData balanceAccountId(String balanceAccountId) { - this.balanceAccountId = balanceAccountId; - return this; - } - - /** - * The unique identifier of the source [balance account](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/post/balanceAccounts__resParam_id). - * @return balanceAccountId - * @deprecated - **/ - @Deprecated - @ApiModelProperty(value = "The unique identifier of the source [balance account](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/post/balanceAccounts__resParam_id).") - @JsonProperty(JSON_PROPERTY_BALANCE_ACCOUNT_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getBalanceAccountId() { - return balanceAccountId; - } - - - @Deprecated - @JsonProperty(JSON_PROPERTY_BALANCE_ACCOUNT_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setBalanceAccountId(String balanceAccountId) { - this.balanceAccountId = balanceAccountId; - } - - public TransferData balancePlatform(String balancePlatform) { this.balancePlatform = balancePlatform; return this; @@ -914,10 +671,10 @@ public TransferData category(CategoryEnum category) { } /** - * The type of transfer. Possible values: - **bank**: Transfer to a [transfer instrument](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/transferInstruments__resParam_id) or a bank account. - **internal**: Transfer to another [balance account](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/post/balanceAccounts__resParam_id) within your platform. - **issuedCard**: Transfer initiated by a Adyen-issued card. - **platformPayment**: Fund movements related to payments that are acquired for your users. + * The category of transfer. Possible values: - **bank**: Transfer to a [transfer instrument](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/transferInstruments__resParam_id) or a bank account. - **internal**: Transfer to another [balance account](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/post/balanceAccounts__resParam_id) within your platform. - **issuedCard**: Transfer initiated by a Adyen-issued card. - **platformPayment**: Fund movements related to payments that are acquired for your users. * @return category **/ - @ApiModelProperty(required = true, value = "The type of transfer. Possible values: - **bank**: Transfer to a [transfer instrument](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/transferInstruments__resParam_id) or a bank account. - **internal**: Transfer to another [balance account](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/post/balanceAccounts__resParam_id) within your platform. - **issuedCard**: Transfer initiated by a Adyen-issued card. - **platformPayment**: Fund movements related to payments that are acquired for your users.") + @ApiModelProperty(required = true, value = "The category of transfer. Possible values: - **bank**: Transfer to a [transfer instrument](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/transferInstruments__resParam_id) or a bank account. - **internal**: Transfer to another [balance account](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/post/balanceAccounts__resParam_id) within your platform. - **issuedCard**: Transfer initiated by a Adyen-issued card. - **platformPayment**: Fund movements related to payments that are acquired for your users.") @JsonProperty(JSON_PROPERTY_CATEGORY) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -933,6 +690,31 @@ public void setCategory(CategoryEnum category) { } + public TransferData categoryData(TransferDataCategoryData categoryData) { + this.categoryData = categoryData; + return this; + } + + /** + * Get categoryData + * @return categoryData + **/ + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_CATEGORY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public TransferDataCategoryData getCategoryData() { + return categoryData; + } + + + @JsonProperty(JSON_PROPERTY_CATEGORY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCategoryData(TransferDataCategoryData categoryData) { + this.categoryData = categoryData; + } + + public TransferData counterparty(CounterpartyV3 counterparty) { this.counterparty = counterparty; return this; @@ -1091,90 +873,6 @@ public void setId(String id) { } - public TransferData modificationMerchantReference(String modificationMerchantReference) { - this.modificationMerchantReference = modificationMerchantReference; - return this; - } - - /** - * The capture's merchant reference included in the transfer. - * @return modificationMerchantReference - * @deprecated - **/ - @Deprecated - @ApiModelProperty(value = "The capture's merchant reference included in the transfer.") - @JsonProperty(JSON_PROPERTY_MODIFICATION_MERCHANT_REFERENCE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getModificationMerchantReference() { - return modificationMerchantReference; - } - - - @Deprecated - @JsonProperty(JSON_PROPERTY_MODIFICATION_MERCHANT_REFERENCE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setModificationMerchantReference(String modificationMerchantReference) { - this.modificationMerchantReference = modificationMerchantReference; - } - - - public TransferData modificationPspReference(String modificationPspReference) { - this.modificationPspReference = modificationPspReference; - return this; - } - - /** - * The capture reference included in the transfer. - * @return modificationPspReference - * @deprecated - **/ - @Deprecated - @ApiModelProperty(value = "The capture reference included in the transfer.") - @JsonProperty(JSON_PROPERTY_MODIFICATION_PSP_REFERENCE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getModificationPspReference() { - return modificationPspReference; - } - - - @Deprecated - @JsonProperty(JSON_PROPERTY_MODIFICATION_PSP_REFERENCE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setModificationPspReference(String modificationPspReference) { - this.modificationPspReference = modificationPspReference; - } - - - public TransferData panEntryMode(PanEntryModeEnum panEntryMode) { - this.panEntryMode = panEntryMode; - return this; - } - - /** - * Indicates the method used for entering the PAN to initiate a transaction. Possible values: **manual**, **chip**, **magstripe**, **contactless**, **cof**, **ecommerce**, **token**. - * @return panEntryMode - * @deprecated - **/ - @Deprecated - @ApiModelProperty(value = "Indicates the method used for entering the PAN to initiate a transaction. Possible values: **manual**, **chip**, **magstripe**, **contactless**, **cof**, **ecommerce**, **token**.") - @JsonProperty(JSON_PROPERTY_PAN_ENTRY_MODE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public PanEntryModeEnum getPanEntryMode() { - return panEntryMode; - } - - - @Deprecated - @JsonProperty(JSON_PROPERTY_PAN_ENTRY_MODE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPanEntryMode(PanEntryModeEnum panEntryMode) { - this.panEntryMode = panEntryMode; - } - - public TransferData paymentInstrument(PaymentInstrument paymentInstrument) { this.paymentInstrument = paymentInstrument; return this; @@ -1200,171 +898,6 @@ public void setPaymentInstrument(PaymentInstrument paymentInstrument) { } - public TransferData paymentInstrumentId(String paymentInstrumentId) { - this.paymentInstrumentId = paymentInstrumentId; - return this; - } - - /** - * The unique identifier of the [payment instrument](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/post/balanceAccounts__resParam_id) used in the transfer. - * @return paymentInstrumentId - * @deprecated - **/ - @Deprecated - @ApiModelProperty(value = "The unique identifier of the [payment instrument](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/post/balanceAccounts__resParam_id) used in the transfer.") - @JsonProperty(JSON_PROPERTY_PAYMENT_INSTRUMENT_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getPaymentInstrumentId() { - return paymentInstrumentId; - } - - - @Deprecated - @JsonProperty(JSON_PROPERTY_PAYMENT_INSTRUMENT_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPaymentInstrumentId(String paymentInstrumentId) { - this.paymentInstrumentId = paymentInstrumentId; - } - - - public TransferData paymentMerchantReference(String paymentMerchantReference) { - this.paymentMerchantReference = paymentMerchantReference; - return this; - } - - /** - * The payment's merchant reference included in the transfer. - * @return paymentMerchantReference - * @deprecated - **/ - @Deprecated - @ApiModelProperty(value = "The payment's merchant reference included in the transfer.") - @JsonProperty(JSON_PROPERTY_PAYMENT_MERCHANT_REFERENCE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getPaymentMerchantReference() { - return paymentMerchantReference; - } - - - @Deprecated - @JsonProperty(JSON_PROPERTY_PAYMENT_MERCHANT_REFERENCE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPaymentMerchantReference(String paymentMerchantReference) { - this.paymentMerchantReference = paymentMerchantReference; - } - - - public TransferData platformPaymentType(PlatformPaymentTypeEnum platformPaymentType) { - this.platformPaymentType = platformPaymentType; - return this; - } - - /** - * The type of the related split. - * @return platformPaymentType - * @deprecated - **/ - @Deprecated - @ApiModelProperty(value = "The type of the related split.") - @JsonProperty(JSON_PROPERTY_PLATFORM_PAYMENT_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public PlatformPaymentTypeEnum getPlatformPaymentType() { - return platformPaymentType; - } - - - @Deprecated - @JsonProperty(JSON_PROPERTY_PLATFORM_PAYMENT_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPlatformPaymentType(PlatformPaymentTypeEnum platformPaymentType) { - this.platformPaymentType = platformPaymentType; - } - - - public TransferData priority(PriorityEnum priority) { - this.priority = priority; - return this; - } - - /** - * The priority for the bank transfer. This sets the speed at which the transfer is sent and the fees that you have to pay. Required for transfers with `category` **bank**. Possible values: * **regular**: For normal, low-value transactions. * **fast**: Faster way to transfer funds but has higher fees. Recommended for high-priority, low-value transactions. * **wire**: Fastest way to transfer funds but has the highest fees. Recommended for high-priority, high-value transactions. * **instant**: Instant way to transfer funds in [SEPA countries](https://www.ecb.europa.eu/paym/integration/retail/sepa/html/index.en.html). * **crossBorder**: High-value transfer to a recipient in a different country. * **internal**: Transfer to an Adyen-issued business bank account (by bank account number/IBAN). - * @return priority - **/ - @ApiModelProperty(value = "The priority for the bank transfer. This sets the speed at which the transfer is sent and the fees that you have to pay. Required for transfers with `category` **bank**. Possible values: * **regular**: For normal, low-value transactions. * **fast**: Faster way to transfer funds but has higher fees. Recommended for high-priority, low-value transactions. * **wire**: Fastest way to transfer funds but has the highest fees. Recommended for high-priority, high-value transactions. * **instant**: Instant way to transfer funds in [SEPA countries](https://www.ecb.europa.eu/paym/integration/retail/sepa/html/index.en.html). * **crossBorder**: High-value transfer to a recipient in a different country. * **internal**: Transfer to an Adyen-issued business bank account (by bank account number/IBAN).") - @JsonProperty(JSON_PROPERTY_PRIORITY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public PriorityEnum getPriority() { - return priority; - } - - - @JsonProperty(JSON_PROPERTY_PRIORITY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPriority(PriorityEnum priority) { - this.priority = priority; - } - - - public TransferData processingType(ProcessingTypeEnum processingType) { - this.processingType = processingType; - return this; - } - - /** - * Contains information about how the payment was processed. For example, **ecommerce** for online or **pos** for in-person payments. - * @return processingType - * @deprecated - **/ - @Deprecated - @ApiModelProperty(value = "Contains information about how the payment was processed. For example, **ecommerce** for online or **pos** for in-person payments.") - @JsonProperty(JSON_PROPERTY_PROCESSING_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public ProcessingTypeEnum getProcessingType() { - return processingType; - } - - - @Deprecated - @JsonProperty(JSON_PROPERTY_PROCESSING_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setProcessingType(ProcessingTypeEnum processingType) { - this.processingType = processingType; - } - - - public TransferData pspPaymentReference(String pspPaymentReference) { - this.pspPaymentReference = pspPaymentReference; - return this; - } - - /** - * The payment reference included in the transfer. - * @return pspPaymentReference - * @deprecated - **/ - @Deprecated - @ApiModelProperty(value = "The payment reference included in the transfer.") - @JsonProperty(JSON_PROPERTY_PSP_PAYMENT_REFERENCE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getPspPaymentReference() { - return pspPaymentReference; - } - - - @Deprecated - @JsonProperty(JSON_PROPERTY_PSP_PAYMENT_REFERENCE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPspPaymentReference(String pspPaymentReference) { - this.pspPaymentReference = pspPaymentReference; - } - - public TransferData reason(ReasonEnum reason) { this.reason = reason; return this; @@ -1440,31 +973,6 @@ public void setReferenceForBeneficiary(String referenceForBeneficiary) { } - public TransferData relayedAuthorisationData(RelayedAuthorisationData relayedAuthorisationData) { - this.relayedAuthorisationData = relayedAuthorisationData; - return this; - } - - /** - * Get relayedAuthorisationData - * @return relayedAuthorisationData - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_RELAYED_AUTHORISATION_DATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public RelayedAuthorisationData getRelayedAuthorisationData() { - return relayedAuthorisationData; - } - - - @JsonProperty(JSON_PROPERTY_RELAYED_AUTHORISATION_DATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setRelayedAuthorisationData(RelayedAuthorisationData relayedAuthorisationData) { - this.relayedAuthorisationData = relayedAuthorisationData; - } - - public TransferData sequenceNumber(Integer sequenceNumber) { this.sequenceNumber = sequenceNumber; return this; @@ -1540,34 +1048,6 @@ public void setTracking(TransferNotificationTransferTracking tracking) { } - public TransferData transactionId(String transactionId) { - this.transactionId = transactionId; - return this; - } - - /** - * The ID of the transaction that is created based on the transfer. - * @return transactionId - * @deprecated - **/ - @Deprecated - @ApiModelProperty(value = "The ID of the transaction that is created based on the transfer.") - @JsonProperty(JSON_PROPERTY_TRANSACTION_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getTransactionId() { - return transactionId; - } - - - @Deprecated - @JsonProperty(JSON_PROPERTY_TRANSACTION_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTransactionId(String transactionId) { - this.transactionId = transactionId; - } - - public TransferData transactionRulesResult(TransactionRulesResult transactionRulesResult) { this.transactionRulesResult = transactionRulesResult; return this; @@ -1618,42 +1098,6 @@ public void setType(TypeEnum type) { } - public TransferData validationFacts(List validationFacts) { - this.validationFacts = validationFacts; - return this; - } - - public TransferData addValidationFactsItem(TransferNotificationValidationFact validationFactsItem) { - if (this.validationFacts == null) { - this.validationFacts = new ArrayList<>(); - } - this.validationFacts.add(validationFactsItem); - return this; - } - - /** - * The evaluation of the validation facts. See [validation checks](https://docs.adyen.com/issuing/validation-checks) for more information. - * @return validationFacts - * @deprecated - **/ - @Deprecated - @ApiModelProperty(value = "The evaluation of the validation facts. See [validation checks](https://docs.adyen.com/issuing/validation-checks) for more information.") - @JsonProperty(JSON_PROPERTY_VALIDATION_FACTS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public List getValidationFacts() { - return validationFacts; - } - - - @Deprecated - @JsonProperty(JSON_PROPERTY_VALIDATION_FACTS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setValidationFacts(List validationFacts) { - this.validationFacts = validationFacts; - } - - /** * Return true if this TransferData object is equal to o. */ @@ -1669,42 +1113,30 @@ public boolean equals(Object o) { return Objects.equals(this.accountHolder, transferData.accountHolder) && Objects.equals(this.amount, transferData.amount) && Objects.equals(this.balanceAccount, transferData.balanceAccount) && - Objects.equals(this.balanceAccountId, transferData.balanceAccountId) && Objects.equals(this.balancePlatform, transferData.balancePlatform) && Objects.equals(this.balances, transferData.balances) && Objects.equals(this.category, transferData.category) && + Objects.equals(this.categoryData, transferData.categoryData) && Objects.equals(this.counterparty, transferData.counterparty) && Objects.equals(this.creationDate, transferData.creationDate) && Objects.equals(this.description, transferData.description) && Objects.equals(this.direction, transferData.direction) && Objects.equals(this.events, transferData.events) && Objects.equals(this.id, transferData.id) && - Objects.equals(this.modificationMerchantReference, transferData.modificationMerchantReference) && - Objects.equals(this.modificationPspReference, transferData.modificationPspReference) && - Objects.equals(this.panEntryMode, transferData.panEntryMode) && Objects.equals(this.paymentInstrument, transferData.paymentInstrument) && - Objects.equals(this.paymentInstrumentId, transferData.paymentInstrumentId) && - Objects.equals(this.paymentMerchantReference, transferData.paymentMerchantReference) && - Objects.equals(this.platformPaymentType, transferData.platformPaymentType) && - Objects.equals(this.priority, transferData.priority) && - Objects.equals(this.processingType, transferData.processingType) && - Objects.equals(this.pspPaymentReference, transferData.pspPaymentReference) && Objects.equals(this.reason, transferData.reason) && Objects.equals(this.reference, transferData.reference) && Objects.equals(this.referenceForBeneficiary, transferData.referenceForBeneficiary) && - Objects.equals(this.relayedAuthorisationData, transferData.relayedAuthorisationData) && Objects.equals(this.sequenceNumber, transferData.sequenceNumber) && Objects.equals(this.status, transferData.status) && Objects.equals(this.tracking, transferData.tracking) && - Objects.equals(this.transactionId, transferData.transactionId) && Objects.equals(this.transactionRulesResult, transferData.transactionRulesResult) && - Objects.equals(this.type, transferData.type) && - Objects.equals(this.validationFacts, transferData.validationFacts); + Objects.equals(this.type, transferData.type); } @Override public int hashCode() { - return Objects.hash(accountHolder, amount, balanceAccount, balanceAccountId, balancePlatform, balances, category, counterparty, creationDate, description, direction, events, id, modificationMerchantReference, modificationPspReference, panEntryMode, paymentInstrument, paymentInstrumentId, paymentMerchantReference, platformPaymentType, priority, processingType, pspPaymentReference, reason, reference, referenceForBeneficiary, relayedAuthorisationData, sequenceNumber, status, tracking, transactionId, transactionRulesResult, type, validationFacts); + return Objects.hash(accountHolder, amount, balanceAccount, balancePlatform, balances, category, categoryData, counterparty, creationDate, description, direction, events, id, paymentInstrument, reason, reference, referenceForBeneficiary, sequenceNumber, status, tracking, transactionRulesResult, type); } @Override @@ -1714,37 +1146,25 @@ public String toString() { sb.append(" accountHolder: ").append(toIndentedString(accountHolder)).append("\n"); sb.append(" amount: ").append(toIndentedString(amount)).append("\n"); sb.append(" balanceAccount: ").append(toIndentedString(balanceAccount)).append("\n"); - sb.append(" balanceAccountId: ").append(toIndentedString(balanceAccountId)).append("\n"); sb.append(" balancePlatform: ").append(toIndentedString(balancePlatform)).append("\n"); sb.append(" balances: ").append(toIndentedString(balances)).append("\n"); sb.append(" category: ").append(toIndentedString(category)).append("\n"); + sb.append(" categoryData: ").append(toIndentedString(categoryData)).append("\n"); sb.append(" counterparty: ").append(toIndentedString(counterparty)).append("\n"); sb.append(" creationDate: ").append(toIndentedString(creationDate)).append("\n"); sb.append(" description: ").append(toIndentedString(description)).append("\n"); sb.append(" direction: ").append(toIndentedString(direction)).append("\n"); sb.append(" events: ").append(toIndentedString(events)).append("\n"); sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" modificationMerchantReference: ").append(toIndentedString(modificationMerchantReference)).append("\n"); - sb.append(" modificationPspReference: ").append(toIndentedString(modificationPspReference)).append("\n"); - sb.append(" panEntryMode: ").append(toIndentedString(panEntryMode)).append("\n"); sb.append(" paymentInstrument: ").append(toIndentedString(paymentInstrument)).append("\n"); - sb.append(" paymentInstrumentId: ").append(toIndentedString(paymentInstrumentId)).append("\n"); - sb.append(" paymentMerchantReference: ").append(toIndentedString(paymentMerchantReference)).append("\n"); - sb.append(" platformPaymentType: ").append(toIndentedString(platformPaymentType)).append("\n"); - sb.append(" priority: ").append(toIndentedString(priority)).append("\n"); - sb.append(" processingType: ").append(toIndentedString(processingType)).append("\n"); - sb.append(" pspPaymentReference: ").append(toIndentedString(pspPaymentReference)).append("\n"); sb.append(" reason: ").append(toIndentedString(reason)).append("\n"); sb.append(" reference: ").append(toIndentedString(reference)).append("\n"); sb.append(" referenceForBeneficiary: ").append(toIndentedString(referenceForBeneficiary)).append("\n"); - sb.append(" relayedAuthorisationData: ").append(toIndentedString(relayedAuthorisationData)).append("\n"); sb.append(" sequenceNumber: ").append(toIndentedString(sequenceNumber)).append("\n"); sb.append(" status: ").append(toIndentedString(status)).append("\n"); sb.append(" tracking: ").append(toIndentedString(tracking)).append("\n"); - sb.append(" transactionId: ").append(toIndentedString(transactionId)).append("\n"); sb.append(" transactionRulesResult: ").append(toIndentedString(transactionRulesResult)).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" validationFacts: ").append(toIndentedString(validationFacts)).append("\n"); sb.append("}"); return sb.toString(); } diff --git a/src/main/java/com/adyen/model/transferwebhooks/TransferDataCategoryData.java b/src/main/java/com/adyen/model/transferwebhooks/TransferDataCategoryData.java new file mode 100644 index 000000000..7705fbfeb --- /dev/null +++ b/src/main/java/com/adyen/model/transferwebhooks/TransferDataCategoryData.java @@ -0,0 +1,389 @@ +/* + * Transfer webhooks + * + * The version of the OpenAPI document: 4 + * + * + * 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.adyen.model.transferwebhooks; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.adyen.model.transferwebhooks.BankCategoryData; +import com.adyen.model.transferwebhooks.InternalCategoryData; +import com.adyen.model.transferwebhooks.IssuedCard; +import com.adyen.model.transferwebhooks.PlatformPayment; +import com.adyen.model.transferwebhooks.RelayedAuthorisationData; +import com.adyen.model.transferwebhooks.TransferNotificationValidationFact; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.ArrayList; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.core.JsonProcessingException; + +import com.fasterxml.jackson.core.type.TypeReference; + +import jakarta.ws.rs.core.GenericType; +import jakarta.ws.rs.core.Response; +import java.io.IOException; +import java.util.logging.Level; +import java.util.logging.Logger; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashSet; + +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.core.JsonToken; +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.JsonMappingException; +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.MapperFeature; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.DeserializationFeature; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; + + +@JsonDeserialize(using = TransferDataCategoryData.TransferDataCategoryDataDeserializer.class) +@JsonSerialize(using = TransferDataCategoryData.TransferDataCategoryDataSerializer.class) +public class TransferDataCategoryData extends AbstractOpenApiSchema { + private static final Logger log = Logger.getLogger(TransferDataCategoryData.class.getName()); + + public static class TransferDataCategoryDataSerializer extends StdSerializer { + public TransferDataCategoryDataSerializer(Class t) { + super(t); + } + + public TransferDataCategoryDataSerializer() { + this(null); + } + + @Override + public void serialize(TransferDataCategoryData value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.getActualInstance()); + } + } + + public static class TransferDataCategoryDataDeserializer extends StdDeserializer { + public TransferDataCategoryDataDeserializer() { + this(TransferDataCategoryData.class); + } + + public TransferDataCategoryDataDeserializer(Class vc) { + super(vc); + } + + @Override + public TransferDataCategoryData deserialize(JsonParser jp, DeserializationContext ctxt) throws IOException, JsonProcessingException { + JsonNode tree = jp.readValueAsTree(); + Object deserialized = null; + boolean typeCoercion = ctxt.isEnabled(MapperFeature.ALLOW_COERCION_OF_SCALARS); + int match = 0; + JsonToken token = tree.traverse(jp.getCodec()).nextToken(); + + // deserialize BankCategoryData + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (BankCategoryData.class.equals(Integer.class) || BankCategoryData.class.equals(Long.class) || BankCategoryData.class.equals(Float.class) || BankCategoryData.class.equals(Double.class) || BankCategoryData.class.equals(Boolean.class) || BankCategoryData.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((BankCategoryData.class.equals(Integer.class) || BankCategoryData.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((BankCategoryData.class.equals(Float.class) || BankCategoryData.class.equals(Double.class)) && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= (BankCategoryData.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (BankCategoryData.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + // Checks if the unique type of the oneOf json matches any of the object TypeEnum values + boolean typeMatch = Arrays.stream(BankCategoryData.TypeEnum.values()).anyMatch((t) -> t.getValue().contains(tree.findValue("type").asText())); + if (attemptParsing || typeMatch) { + // Strict deserialization for oneOf models + deserialized = JSON.getMapper().readValue(tree.toString(), BankCategoryData.class); + // typeMatch should enforce proper deserialization + match++; + log.log(Level.FINER, "Input data matches schema 'BankCategoryData'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'BankCategoryData'", e); + } + + + // deserialize InternalCategoryData + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (InternalCategoryData.class.equals(Integer.class) || InternalCategoryData.class.equals(Long.class) || InternalCategoryData.class.equals(Float.class) || InternalCategoryData.class.equals(Double.class) || InternalCategoryData.class.equals(Boolean.class) || InternalCategoryData.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((InternalCategoryData.class.equals(Integer.class) || InternalCategoryData.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((InternalCategoryData.class.equals(Float.class) || InternalCategoryData.class.equals(Double.class)) && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= (InternalCategoryData.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (InternalCategoryData.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + // Checks if the unique type of the oneOf json matches any of the object TypeEnum values + boolean typeMatch = Arrays.stream(InternalCategoryData.TypeEnum.values()).anyMatch((t) -> t.getValue().contains(tree.findValue("type").asText())); + if (attemptParsing || typeMatch) { + // Strict deserialization for oneOf models + deserialized = JSON.getMapper().readValue(tree.toString(), InternalCategoryData.class); + // typeMatch should enforce proper deserialization + match++; + log.log(Level.FINER, "Input data matches schema 'InternalCategoryData'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'InternalCategoryData'", e); + } + + + // deserialize IssuedCard + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (IssuedCard.class.equals(Integer.class) || IssuedCard.class.equals(Long.class) || IssuedCard.class.equals(Float.class) || IssuedCard.class.equals(Double.class) || IssuedCard.class.equals(Boolean.class) || IssuedCard.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((IssuedCard.class.equals(Integer.class) || IssuedCard.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((IssuedCard.class.equals(Float.class) || IssuedCard.class.equals(Double.class)) && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= (IssuedCard.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (IssuedCard.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + // Checks if the unique type of the oneOf json matches any of the object TypeEnum values + boolean typeMatch = Arrays.stream(IssuedCard.TypeEnum.values()).anyMatch((t) -> t.getValue().contains(tree.findValue("type").asText())); + if (attemptParsing || typeMatch) { + // Strict deserialization for oneOf models + deserialized = JSON.getMapper().readValue(tree.toString(), IssuedCard.class); + // typeMatch should enforce proper deserialization + match++; + log.log(Level.FINER, "Input data matches schema 'IssuedCard'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'IssuedCard'", e); + } + + + // deserialize PlatformPayment + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (PlatformPayment.class.equals(Integer.class) || PlatformPayment.class.equals(Long.class) || PlatformPayment.class.equals(Float.class) || PlatformPayment.class.equals(Double.class) || PlatformPayment.class.equals(Boolean.class) || PlatformPayment.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((PlatformPayment.class.equals(Integer.class) || PlatformPayment.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((PlatformPayment.class.equals(Float.class) || PlatformPayment.class.equals(Double.class)) && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= (PlatformPayment.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (PlatformPayment.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + // Checks if the unique type of the oneOf json matches any of the object TypeEnum values + boolean typeMatch = Arrays.stream(PlatformPayment.TypeEnum.values()).anyMatch((t) -> t.getValue().contains(tree.findValue("type").asText())); + if (attemptParsing || typeMatch) { + // Strict deserialization for oneOf models + deserialized = JSON.getMapper().readValue(tree.toString(), PlatformPayment.class); + // typeMatch should enforce proper deserialization + match++; + log.log(Level.FINER, "Input data matches schema 'PlatformPayment'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'PlatformPayment'", e); + } + + // Throw error if there is no match + if (match == 0) { + throw new IOException(String.format("Failed deserialization for TransferDataCategoryData: %d classes match result, expected 1", match)); + } + // Log warning if there is more than one match + if (match > 1) { + log.log(Level.WARNING, String.format("Warning, indecisive deserialization for TransferDataCategoryData: %d classes match result, expected 1", match)); + } + + TransferDataCategoryData ret = new TransferDataCategoryData(); + ret.setActualInstance(deserialized); + return ret; + } + + /** + * Handle deserialization of the 'null' value. + */ + @Override + public TransferDataCategoryData getNullValue(DeserializationContext ctxt) throws JsonMappingException { + throw new JsonMappingException(ctxt.getParser(), "TransferDataCategoryData cannot be null"); + } + } + + // store a list of schema names defined in oneOf + public static final Map schemas = new HashMap(); + + public TransferDataCategoryData() { + super("oneOf", Boolean.FALSE); + } + + public TransferDataCategoryData(BankCategoryData o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public TransferDataCategoryData(InternalCategoryData o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public TransferDataCategoryData(IssuedCard o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public TransferDataCategoryData(PlatformPayment o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + static { + schemas.put("BankCategoryData", new GenericType() { + }); + schemas.put("InternalCategoryData", new GenericType() { + }); + schemas.put("IssuedCard", new GenericType() { + }); + schemas.put("PlatformPayment", new GenericType() { + }); + JSON.registerDescendants(TransferDataCategoryData.class, Collections.unmodifiableMap(schemas)); + } + + @Override + public Map getSchemas() { + return TransferDataCategoryData.schemas; + } + + /** + * Set the instance that matches the oneOf child schema, check + * the instance parameter is valid against the oneOf child schemas: + * BankCategoryData, InternalCategoryData, IssuedCard, PlatformPayment + * + * It could be an instance of the 'oneOf' schemas. + * The oneOf child schemas may themselves be a composed schema (allOf, anyOf, oneOf). + */ + @Override + public void setActualInstance(Object instance) { + if (JSON.isInstanceOf(BankCategoryData.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf(InternalCategoryData.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf(IssuedCard.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf(PlatformPayment.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + throw new RuntimeException("Invalid instance type. Must be BankCategoryData, InternalCategoryData, IssuedCard, PlatformPayment"); + } + + /** + * Get the actual instance, which can be the following: + * BankCategoryData, InternalCategoryData, IssuedCard, PlatformPayment + * + * @return The actual instance (BankCategoryData, InternalCategoryData, IssuedCard, PlatformPayment) + */ + @Override + public Object getActualInstance() { + return super.getActualInstance(); + } + + /** + * Get the actual instance of `BankCategoryData`. If the actual instance is not `BankCategoryData`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `BankCategoryData` + * @throws ClassCastException if the instance is not `BankCategoryData` + */ + public BankCategoryData getBankCategoryData() throws ClassCastException { + return (BankCategoryData)super.getActualInstance(); + } + + /** + * Get the actual instance of `InternalCategoryData`. If the actual instance is not `InternalCategoryData`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `InternalCategoryData` + * @throws ClassCastException if the instance is not `InternalCategoryData` + */ + public InternalCategoryData getInternalCategoryData() throws ClassCastException { + return (InternalCategoryData)super.getActualInstance(); + } + + /** + * Get the actual instance of `IssuedCard`. If the actual instance is not `IssuedCard`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `IssuedCard` + * @throws ClassCastException if the instance is not `IssuedCard` + */ + public IssuedCard getIssuedCard() throws ClassCastException { + return (IssuedCard)super.getActualInstance(); + } + + /** + * Get the actual instance of `PlatformPayment`. If the actual instance is not `PlatformPayment`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `PlatformPayment` + * @throws ClassCastException if the instance is not `PlatformPayment` + */ + public PlatformPayment getPlatformPayment() throws ClassCastException { + return (PlatformPayment)super.getActualInstance(); + } + + /** + * Create an instance of TransferDataCategoryData given an JSON string + * + * @param jsonString JSON string + * @return An instance of TransferDataCategoryData + * @throws IOException if the JSON string is invalid with respect to TransferDataCategoryData + */ + public static TransferDataCategoryData fromJson(String jsonString) throws IOException { + return JSON.getMapper().readValue(jsonString, TransferDataCategoryData.class); + } + + /** + * Convert an instance of TransferDataCategoryData to an JSON string + * + * @return JSON string + */ + public String toJson() throws JsonProcessingException { + return JSON.getMapper().writeValueAsString(this); + } +} + diff --git a/src/main/java/com/adyen/model/transferwebhooks/TransferEvent.java b/src/main/java/com/adyen/model/transferwebhooks/TransferEvent.java index 5cd5d4bcc..dedc3e863 100644 --- a/src/main/java/com/adyen/model/transferwebhooks/TransferEvent.java +++ b/src/main/java/com/adyen/model/transferwebhooks/TransferEvent.java @@ -1,7 +1,7 @@ /* * Transfer webhooks * - * The version of the OpenAPI document: 3 + * The version of the OpenAPI document: 4 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -19,7 +19,7 @@ import com.adyen.model.transferwebhooks.Amount; import com.adyen.model.transferwebhooks.AmountAdjustment; import com.adyen.model.transferwebhooks.BalanceMutation; -import com.adyen.model.transferwebhooks.TransferOperation; +import com.adyen.model.transferwebhooks.Modification; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -43,12 +43,14 @@ TransferEvent.JSON_PROPERTY_BOOKING_DATE, TransferEvent.JSON_PROPERTY_ESTIMATED_ARRIVAL_TIME, TransferEvent.JSON_PROPERTY_ID, + TransferEvent.JSON_PROPERTY_MODIFICATION, TransferEvent.JSON_PROPERTY_MUTATIONS, TransferEvent.JSON_PROPERTY_ORIGINAL_AMOUNT, TransferEvent.JSON_PROPERTY_REASON, + TransferEvent.JSON_PROPERTY_SCHEME_TRACE_I_D, + TransferEvent.JSON_PROPERTY_SCHEME_UNIQUE_TRANSACTION_I_D, TransferEvent.JSON_PROPERTY_STATUS, TransferEvent.JSON_PROPERTY_TRANSACTION_ID, - TransferEvent.JSON_PROPERTY_TRANSFER_OPERATION, TransferEvent.JSON_PROPERTY_TYPE, TransferEvent.JSON_PROPERTY_UPDATE_DATE, TransferEvent.JSON_PROPERTY_VALUE_DATE @@ -70,6 +72,9 @@ public class TransferEvent { public static final String JSON_PROPERTY_ID = "id"; private String id; + public static final String JSON_PROPERTY_MODIFICATION = "modification"; + private Modification modification; + public static final String JSON_PROPERTY_MUTATIONS = "mutations"; private List mutations = null; @@ -84,6 +89,8 @@ public enum ReasonEnum { APPROVED("approved"), + BALANCEACCOUNTTEMPORARILYBLOCKEDBYTRANSACTIONRULE("balanceAccountTemporarilyBlockedByTransactionRule"), + COUNTERPARTYACCOUNTBLOCKED("counterpartyAccountBlocked"), COUNTERPARTYACCOUNTCLOSED("counterpartyAccountClosed"), @@ -96,6 +103,8 @@ public enum ReasonEnum { COUNTERPARTYBANKUNAVAILABLE("counterpartyBankUnavailable"), + DECLINEDBYTRANSACTIONRULE("declinedByTransactionRule"), + ERROR("error"), NOTENOUGHBALANCE("notEnoughBalance"), @@ -104,6 +113,8 @@ public enum ReasonEnum { ROUTENOTFOUND("routeNotFound"), + SCAFAILED("scaFailed"), + UNKNOWN("unknown"); private String value; @@ -136,6 +147,12 @@ public static ReasonEnum fromValue(String value) { public static final String JSON_PROPERTY_REASON = "reason"; private ReasonEnum reason; + public static final String JSON_PROPERTY_SCHEME_TRACE_I_D = "schemeTraceID"; + private String schemeTraceID; + + public static final String JSON_PROPERTY_SCHEME_UNIQUE_TRANSACTION_I_D = "schemeUniqueTransactionID"; + private String schemeUniqueTransactionID; + /** * The status of the transfer event. */ @@ -238,14 +255,6 @@ public enum StatusEnum { MISCCOSTPENDING("miscCostPending"), - OPERATIONAUTHORIZED("operationAuthorized"), - - OPERATIONBOOKED("operationBooked"), - - OPERATIONPENDING("operationPending"), - - OPERATIONRECEIVED("operationReceived"), - PAYMENTCOST("paymentCost"), PAYMENTCOSTPENDING("paymentCostPending"), @@ -309,9 +318,6 @@ public static StatusEnum fromValue(String value) { public static final String JSON_PROPERTY_TRANSACTION_ID = "transactionId"; private String transactionId; - public static final String JSON_PROPERTY_TRANSFER_OPERATION = "transferOperation"; - private TransferOperation transferOperation; - /** * The type of the transfer event. Possible values: **accounting**, **tracking**. */ @@ -492,6 +498,31 @@ public void setId(String id) { } + public TransferEvent modification(Modification modification) { + this.modification = modification; + return this; + } + + /** + * Get modification + * @return modification + **/ + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_MODIFICATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Modification getModification() { + return modification; + } + + + @JsonProperty(JSON_PROPERTY_MODIFICATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setModification(Modification modification) { + this.modification = modification; + } + + public TransferEvent mutations(List mutations) { this.mutations = mutations; return this; @@ -575,6 +606,56 @@ public void setReason(ReasonEnum reason) { } + public TransferEvent schemeTraceID(String schemeTraceID) { + this.schemeTraceID = schemeTraceID; + return this; + } + + /** + * SchemeTraceID retrieved from scheme. + * @return schemeTraceID + **/ + @ApiModelProperty(value = "SchemeTraceID retrieved from scheme.") + @JsonProperty(JSON_PROPERTY_SCHEME_TRACE_I_D) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getSchemeTraceID() { + return schemeTraceID; + } + + + @JsonProperty(JSON_PROPERTY_SCHEME_TRACE_I_D) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSchemeTraceID(String schemeTraceID) { + this.schemeTraceID = schemeTraceID; + } + + + public TransferEvent schemeUniqueTransactionID(String schemeUniqueTransactionID) { + this.schemeUniqueTransactionID = schemeUniqueTransactionID; + return this; + } + + /** + * SchemeUniqueTransactionID retrieved from scheme. + * @return schemeUniqueTransactionID + **/ + @ApiModelProperty(value = "SchemeUniqueTransactionID retrieved from scheme.") + @JsonProperty(JSON_PROPERTY_SCHEME_UNIQUE_TRANSACTION_I_D) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getSchemeUniqueTransactionID() { + return schemeUniqueTransactionID; + } + + + @JsonProperty(JSON_PROPERTY_SCHEME_UNIQUE_TRANSACTION_I_D) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSchemeUniqueTransactionID(String schemeUniqueTransactionID) { + this.schemeUniqueTransactionID = schemeUniqueTransactionID; + } + + public TransferEvent status(StatusEnum status) { this.status = status; return this; @@ -625,31 +706,6 @@ public void setTransactionId(String transactionId) { } - public TransferEvent transferOperation(TransferOperation transferOperation) { - this.transferOperation = transferOperation; - return this; - } - - /** - * Get transferOperation - * @return transferOperation - **/ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_TRANSFER_OPERATION) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public TransferOperation getTransferOperation() { - return transferOperation; - } - - - @JsonProperty(JSON_PROPERTY_TRANSFER_OPERATION) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTransferOperation(TransferOperation transferOperation) { - this.transferOperation = transferOperation; - } - - public TransferEvent type(TypeEnum type) { this.type = type; return this; @@ -742,12 +798,14 @@ public boolean equals(Object o) { Objects.equals(this.bookingDate, transferEvent.bookingDate) && Objects.equals(this.estimatedArrivalTime, transferEvent.estimatedArrivalTime) && Objects.equals(this.id, transferEvent.id) && + Objects.equals(this.modification, transferEvent.modification) && Objects.equals(this.mutations, transferEvent.mutations) && Objects.equals(this.originalAmount, transferEvent.originalAmount) && Objects.equals(this.reason, transferEvent.reason) && + Objects.equals(this.schemeTraceID, transferEvent.schemeTraceID) && + Objects.equals(this.schemeUniqueTransactionID, transferEvent.schemeUniqueTransactionID) && Objects.equals(this.status, transferEvent.status) && Objects.equals(this.transactionId, transferEvent.transactionId) && - Objects.equals(this.transferOperation, transferEvent.transferOperation) && Objects.equals(this.type, transferEvent.type) && Objects.equals(this.updateDate, transferEvent.updateDate) && Objects.equals(this.valueDate, transferEvent.valueDate); @@ -755,7 +813,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(amount, amountAdjustments, bookingDate, estimatedArrivalTime, id, mutations, originalAmount, reason, status, transactionId, transferOperation, type, updateDate, valueDate); + return Objects.hash(amount, amountAdjustments, bookingDate, estimatedArrivalTime, id, modification, mutations, originalAmount, reason, schemeTraceID, schemeUniqueTransactionID, status, transactionId, type, updateDate, valueDate); } @Override @@ -767,12 +825,14 @@ public String toString() { sb.append(" bookingDate: ").append(toIndentedString(bookingDate)).append("\n"); sb.append(" estimatedArrivalTime: ").append(toIndentedString(estimatedArrivalTime)).append("\n"); sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" modification: ").append(toIndentedString(modification)).append("\n"); sb.append(" mutations: ").append(toIndentedString(mutations)).append("\n"); sb.append(" originalAmount: ").append(toIndentedString(originalAmount)).append("\n"); sb.append(" reason: ").append(toIndentedString(reason)).append("\n"); + sb.append(" schemeTraceID: ").append(toIndentedString(schemeTraceID)).append("\n"); + sb.append(" schemeUniqueTransactionID: ").append(toIndentedString(schemeUniqueTransactionID)).append("\n"); sb.append(" status: ").append(toIndentedString(status)).append("\n"); sb.append(" transactionId: ").append(toIndentedString(transactionId)).append("\n"); - sb.append(" transferOperation: ").append(toIndentedString(transferOperation)).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append(" updateDate: ").append(toIndentedString(updateDate)).append("\n"); sb.append(" valueDate: ").append(toIndentedString(valueDate)).append("\n"); diff --git a/src/main/java/com/adyen/model/transferwebhooks/TransferNotificationRequest.java b/src/main/java/com/adyen/model/transferwebhooks/TransferNotificationRequest.java index c5beafde0..c342578f3 100644 --- a/src/main/java/com/adyen/model/transferwebhooks/TransferNotificationRequest.java +++ b/src/main/java/com/adyen/model/transferwebhooks/TransferNotificationRequest.java @@ -1,7 +1,7 @@ /* * Transfer webhooks * - * The version of the OpenAPI document: 3 + * The version of the OpenAPI document: 4 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/transferwebhooks/TransferNotificationTransferTracking.java b/src/main/java/com/adyen/model/transferwebhooks/TransferNotificationTransferTracking.java index cb9db307e..11e59930a 100644 --- a/src/main/java/com/adyen/model/transferwebhooks/TransferNotificationTransferTracking.java +++ b/src/main/java/com/adyen/model/transferwebhooks/TransferNotificationTransferTracking.java @@ -1,7 +1,7 @@ /* * Transfer webhooks * - * The version of the OpenAPI document: 3 + * The version of the OpenAPI document: 4 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/transferwebhooks/TransferNotificationValidationFact.java b/src/main/java/com/adyen/model/transferwebhooks/TransferNotificationValidationFact.java index e1fd0e775..99cad8874 100644 --- a/src/main/java/com/adyen/model/transferwebhooks/TransferNotificationValidationFact.java +++ b/src/main/java/com/adyen/model/transferwebhooks/TransferNotificationValidationFact.java @@ -1,7 +1,7 @@ /* * Transfer webhooks * - * The version of the OpenAPI document: 3 + * The version of the OpenAPI document: 4 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/transferwebhooks/TransferOperation.java b/src/main/java/com/adyen/model/transferwebhooks/TransferOperation.java deleted file mode 100644 index c0f17ca96..000000000 --- a/src/main/java/com/adyen/model/transferwebhooks/TransferOperation.java +++ /dev/null @@ -1,190 +0,0 @@ -/* - * Transfer webhooks - * - * The version of the OpenAPI document: 3 - * - * - * 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.adyen.model.transferwebhooks; - -import java.util.Objects; -import java.util.Arrays; -import java.util.Map; -import java.util.HashMap; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.core.JsonProcessingException; - - -/** - * TransferOperation - */ -@JsonPropertyOrder({ - TransferOperation.JSON_PROPERTY_DIRECTION, - TransferOperation.JSON_PROPERTY_REFERENCE, - TransferOperation.JSON_PROPERTY_TYPE -}) - -public class TransferOperation { - public static final String JSON_PROPERTY_DIRECTION = "direction"; - private String direction; - - public static final String JSON_PROPERTY_REFERENCE = "reference"; - private String reference; - - public static final String JSON_PROPERTY_TYPE = "type"; - private String type; - - public TransferOperation() { - } - - public TransferOperation direction(String direction) { - this.direction = direction; - return this; - } - - /** - * The direction of the money movement. - * @return direction - **/ - @ApiModelProperty(value = "The direction of the money movement.") - @JsonProperty(JSON_PROPERTY_DIRECTION) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getDirection() { - return direction; - } - - - @JsonProperty(JSON_PROPERTY_DIRECTION) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setDirection(String direction) { - this.direction = direction; - } - - - public TransferOperation reference(String reference) { - this.reference = reference; - return this; - } - - /** - * The reference returned when the amend was initiated. - * @return reference - **/ - @ApiModelProperty(value = "The reference returned when the amend was initiated.") - @JsonProperty(JSON_PROPERTY_REFERENCE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getReference() { - return reference; - } - - - @JsonProperty(JSON_PROPERTY_REFERENCE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setReference(String reference) { - this.reference = reference; - } - - - public TransferOperation type(String type) { - this.type = type; - return this; - } - - /** - * The type of amend for the transfer. - * @return type - **/ - @ApiModelProperty(value = "The type of amend for the transfer.") - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getType() { - return type; - } - - - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setType(String type) { - this.type = type; - } - - - /** - * Return true if this TransferOperation object is equal to o. - */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - TransferOperation transferOperation = (TransferOperation) o; - return Objects.equals(this.direction, transferOperation.direction) && - Objects.equals(this.reference, transferOperation.reference) && - Objects.equals(this.type, transferOperation.type); - } - - @Override - public int hashCode() { - return Objects.hash(direction, reference, type); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class TransferOperation {\n"); - sb.append(" direction: ").append(toIndentedString(direction)).append("\n"); - sb.append(" reference: ").append(toIndentedString(reference)).append("\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -/** - * Create an instance of TransferOperation given an JSON string - * - * @param jsonString JSON string - * @return An instance of TransferOperation - * @throws JsonProcessingException if the JSON string is invalid with respect to TransferOperation - */ - public static TransferOperation fromJson(String jsonString) throws JsonProcessingException { - return JSON.getMapper().readValue(jsonString, TransferOperation.class); - } -/** - * Convert an instance of TransferOperation to an JSON string - * - * @return JSON string - */ - public String toJson() throws JsonProcessingException { - return JSON.getMapper().writeValueAsString(this); - } -} - diff --git a/src/main/java/com/adyen/model/transferwebhooks/UKLocalAccountIdentification.java b/src/main/java/com/adyen/model/transferwebhooks/UKLocalAccountIdentification.java index 75fa8f1b7..ca37ab2e1 100644 --- a/src/main/java/com/adyen/model/transferwebhooks/UKLocalAccountIdentification.java +++ b/src/main/java/com/adyen/model/transferwebhooks/UKLocalAccountIdentification.java @@ -1,7 +1,7 @@ /* * Transfer webhooks * - * The version of the OpenAPI document: 3 + * The version of the OpenAPI document: 4 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/model/transferwebhooks/USLocalAccountIdentification.java b/src/main/java/com/adyen/model/transferwebhooks/USLocalAccountIdentification.java index c85162279..8a588f2b0 100644 --- a/src/main/java/com/adyen/model/transferwebhooks/USLocalAccountIdentification.java +++ b/src/main/java/com/adyen/model/transferwebhooks/USLocalAccountIdentification.java @@ -1,7 +1,7 @@ /* * Transfer webhooks * - * The version of the OpenAPI document: 3 + * The version of the OpenAPI document: 4 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/adyen/notification/ManagementWebhookHandler.java b/src/main/java/com/adyen/notification/ManagementWebhookHandler.java index 1645c86c1..c64dbced5 100644 --- a/src/main/java/com/adyen/notification/ManagementWebhookHandler.java +++ b/src/main/java/com/adyen/notification/ManagementWebhookHandler.java @@ -3,7 +3,9 @@ import com.adyen.model.managementwebhooks.MerchantCreatedNotificationRequest; import com.adyen.model.managementwebhooks.MerchantUpdatedNotificationRequest; import com.adyen.model.managementwebhooks.PaymentMethodCreatedNotificationRequest; -import com.adyen.model.transferwebhooks.JSON; +import com.adyen.model.managementwebhooks.PaymentMethodRequestRemovedNotificationRequest; +import com.adyen.model.managementwebhooks.PaymentMethodScheduledForRemovalNotificationRequest; +import com.adyen.model.managementwebhooks.JSON; import java.util.Optional; @@ -25,6 +27,14 @@ public Optional getPaymentMethodCreated return getOptionalField(PaymentMethodCreatedNotificationRequest.class); } + public Optional getPaymentMethodRequestRemovedNotificationRequest() { + return getOptionalField(PaymentMethodRequestRemovedNotificationRequest.class); + } + + public Optional getPaymentMethodScheduledForRemovalNotificationRequest() { + return getOptionalField(PaymentMethodScheduledForRemovalNotificationRequest.class); + } + private Optional getOptionalField(Class clazz) { try { T val = JSON.getMapper().readValue(payload, clazz); diff --git a/src/main/java/com/adyen/service/balanceplatform/AccountHoldersApi.java b/src/main/java/com/adyen/service/balanceplatform/AccountHoldersApi.java index 73b503c38..136f80363 100644 --- a/src/main/java/com/adyen/service/balanceplatform/AccountHoldersApi.java +++ b/src/main/java/com/adyen/service/balanceplatform/AccountHoldersApi.java @@ -17,6 +17,7 @@ import com.adyen.model.balanceplatform.AccountHolder; import com.adyen.model.balanceplatform.AccountHolderInfo; import com.adyen.model.balanceplatform.AccountHolderUpdateRequest; +import com.adyen.model.balanceplatform.GetTaxFormResponse; import com.adyen.model.balanceplatform.PaginatedBalanceAccountsResponse; import com.adyen.model.balanceplatform.RestServiceError; import com.adyen.model.RequestOptions; @@ -129,6 +130,51 @@ public PaginatedBalanceAccountsResponse getAllBalanceAccountsOfAccountHolder(Str return PaginatedBalanceAccountsResponse.fromJson(jsonResult); } + /** + * Get a tax form + * + * @param id {@link String } The unique identifier of the account holder. (required) + * @param formType {@link String } The type of tax form you want to retrieve. Accepted values are **us1099k** and **us1099nec** (required) + * @param year {@link Integer } The tax year in YYYY format for the tax form you want to retrieve (required) + * @return {@link GetTaxFormResponse } + * @throws ApiException if fails to make API call + */ + public GetTaxFormResponse getTaxForm(String id, String formType, Integer year) throws ApiException, IOException { + return getTaxForm(id, formType, year, null); + } + + /** + * Get a tax form + * + * @param id {@link String } The unique identifier of the account holder. (required) + * @param formType {@link String } Query: The type of tax form you want to retrieve. Accepted values are **us1099k** and **us1099nec** (required) + * @param year {@link Integer } Query: The tax year in YYYY format for the tax form you want to retrieve (required) + * @param requestOptions {@link RequestOptions } Object to store additional data such as idempotency-keys (optional) + * @return {@link GetTaxFormResponse } + * @throws ApiException if fails to make API call + */ + public GetTaxFormResponse getTaxForm(String id, String formType, Integer year, RequestOptions requestOptions) throws ApiException, IOException { + //Add path params + Map pathParams = new HashMap<>(); + if (id == null) { + throw new IllegalArgumentException("Please provide the id path parameter"); + } + pathParams.put("id", id); + //Add query params + Map queryParams = new HashMap<>(); + if (formType != null) { + queryParams.put("formType", formType); + } + if (year != null) { + queryParams.put("year", year.toString()); + } + + String requestBody = null; + Resource resource = new Resource(this, this.baseURL + "/accountHolders/{id}/taxForms", null); + String jsonResult = resource.request(requestBody, requestOptions, ApiConstants.HttpMethod.GET, pathParams, queryParams); + return GetTaxFormResponse.fromJson(jsonResult); + } + /** * Update an account holder * diff --git a/src/main/java/com/adyen/service/management/AccountCompanyLevelApi.java b/src/main/java/com/adyen/service/management/AccountCompanyLevelApi.java index 35dccb5ca..2ca85e660 100644 --- a/src/main/java/com/adyen/service/management/AccountCompanyLevelApi.java +++ b/src/main/java/com/adyen/service/management/AccountCompanyLevelApi.java @@ -1,7 +1,7 @@ /* * Management API * - * The version of the OpenAPI document: 1 + * The version of the OpenAPI document: 3 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -28,7 +28,7 @@ public class AccountCompanyLevelApi extends Service { - public static final String API_VERSION = "1"; + public static final String API_VERSION = "3"; protected String baseURL; @@ -38,7 +38,7 @@ public class AccountCompanyLevelApi extends Service { */ public AccountCompanyLevelApi(Client client) { super(client); - this.baseURL = createBaseURL("https://management-test.adyen.com/v1"); + this.baseURL = createBaseURL("https://management-test.adyen.com/v3"); } /** diff --git a/src/main/java/com/adyen/service/management/AccountMerchantLevelApi.java b/src/main/java/com/adyen/service/management/AccountMerchantLevelApi.java index f64b313a8..88596004c 100644 --- a/src/main/java/com/adyen/service/management/AccountMerchantLevelApi.java +++ b/src/main/java/com/adyen/service/management/AccountMerchantLevelApi.java @@ -1,7 +1,7 @@ /* * Management API * - * The version of the OpenAPI document: 1 + * The version of the OpenAPI document: 3 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -30,7 +30,7 @@ public class AccountMerchantLevelApi extends Service { - public static final String API_VERSION = "1"; + public static final String API_VERSION = "3"; protected String baseURL; @@ -40,7 +40,7 @@ public class AccountMerchantLevelApi extends Service { */ public AccountMerchantLevelApi(Client client) { super(client); - this.baseURL = createBaseURL("https://management-test.adyen.com/v1"); + this.baseURL = createBaseURL("https://management-test.adyen.com/v3"); } /** diff --git a/src/main/java/com/adyen/service/management/AccountStoreLevelApi.java b/src/main/java/com/adyen/service/management/AccountStoreLevelApi.java index c203a35dc..3c3eee812 100644 --- a/src/main/java/com/adyen/service/management/AccountStoreLevelApi.java +++ b/src/main/java/com/adyen/service/management/AccountStoreLevelApi.java @@ -1,7 +1,7 @@ /* * Management API * - * The version of the OpenAPI document: 1 + * The version of the OpenAPI document: 3 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -30,7 +30,7 @@ public class AccountStoreLevelApi extends Service { - public static final String API_VERSION = "1"; + public static final String API_VERSION = "3"; protected String baseURL; @@ -40,7 +40,7 @@ public class AccountStoreLevelApi extends Service { */ public AccountStoreLevelApi(Client client) { super(client); - this.baseURL = createBaseURL("https://management-test.adyen.com/v1"); + this.baseURL = createBaseURL("https://management-test.adyen.com/v3"); } /** diff --git a/src/main/java/com/adyen/service/management/AllowedOriginsCompanyLevelApi.java b/src/main/java/com/adyen/service/management/AllowedOriginsCompanyLevelApi.java index 0e5191c6a..cc24658e8 100644 --- a/src/main/java/com/adyen/service/management/AllowedOriginsCompanyLevelApi.java +++ b/src/main/java/com/adyen/service/management/AllowedOriginsCompanyLevelApi.java @@ -1,7 +1,7 @@ /* * Management API * - * The version of the OpenAPI document: 1 + * The version of the OpenAPI document: 3 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -27,7 +27,7 @@ public class AllowedOriginsCompanyLevelApi extends Service { - public static final String API_VERSION = "1"; + public static final String API_VERSION = "3"; protected String baseURL; @@ -37,7 +37,7 @@ public class AllowedOriginsCompanyLevelApi extends Service { */ public AllowedOriginsCompanyLevelApi(Client client) { super(client); - this.baseURL = createBaseURL("https://management-test.adyen.com/v1"); + this.baseURL = createBaseURL("https://management-test.adyen.com/v3"); } /** diff --git a/src/main/java/com/adyen/service/management/AllowedOriginsMerchantLevelApi.java b/src/main/java/com/adyen/service/management/AllowedOriginsMerchantLevelApi.java index ee3fba493..cc7471f91 100644 --- a/src/main/java/com/adyen/service/management/AllowedOriginsMerchantLevelApi.java +++ b/src/main/java/com/adyen/service/management/AllowedOriginsMerchantLevelApi.java @@ -1,7 +1,7 @@ /* * Management API * - * The version of the OpenAPI document: 1 + * The version of the OpenAPI document: 3 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -27,7 +27,7 @@ public class AllowedOriginsMerchantLevelApi extends Service { - public static final String API_VERSION = "1"; + public static final String API_VERSION = "3"; protected String baseURL; @@ -37,7 +37,7 @@ public class AllowedOriginsMerchantLevelApi extends Service { */ public AllowedOriginsMerchantLevelApi(Client client) { super(client); - this.baseURL = createBaseURL("https://management-test.adyen.com/v1"); + this.baseURL = createBaseURL("https://management-test.adyen.com/v3"); } /** diff --git a/src/main/java/com/adyen/service/management/AndroidFilesCompanyLevelApi.java b/src/main/java/com/adyen/service/management/AndroidFilesCompanyLevelApi.java index 9daf7df61..46c7ab7b7 100644 --- a/src/main/java/com/adyen/service/management/AndroidFilesCompanyLevelApi.java +++ b/src/main/java/com/adyen/service/management/AndroidFilesCompanyLevelApi.java @@ -1,7 +1,7 @@ /* * Management API * - * The version of the OpenAPI document: 1 + * The version of the OpenAPI document: 3 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -28,7 +28,7 @@ public class AndroidFilesCompanyLevelApi extends Service { - public static final String API_VERSION = "1"; + public static final String API_VERSION = "3"; protected String baseURL; @@ -38,7 +38,7 @@ public class AndroidFilesCompanyLevelApi extends Service { */ public AndroidFilesCompanyLevelApi(Client client) { super(client); - this.baseURL = createBaseURL("https://management-test.adyen.com/v1"); + this.baseURL = createBaseURL("https://management-test.adyen.com/v3"); } /** @@ -188,4 +188,34 @@ public AndroidCertificatesResponse listAndroidCertificates(String companyId, Int String jsonResult = resource.request(requestBody, requestOptions, ApiConstants.HttpMethod.GET, pathParams, queryParams); return AndroidCertificatesResponse.fromJson(jsonResult); } + + /** + * Upload Android App + * + * @param companyId {@link String } The unique identifier of the company account. (required) + * @throws ApiException if fails to make API call + */ + public void uploadAndroidApp(String companyId) throws ApiException, IOException { + uploadAndroidApp(companyId, null); + } + + /** + * Upload Android App + * + * @param companyId {@link String } The unique identifier of the company account. (required) + * @param requestOptions {@link RequestOptions } Object to store additional data such as idempotency-keys (optional) + * @throws ApiException if fails to make API call + */ + public void uploadAndroidApp(String companyId, RequestOptions requestOptions) throws ApiException, IOException { + //Add path params + Map pathParams = new HashMap<>(); + if (companyId == null) { + throw new IllegalArgumentException("Please provide the companyId path parameter"); + } + pathParams.put("companyId", companyId); + + String requestBody = null; + Resource resource = new Resource(this, this.baseURL + "/companies/{companyId}/androidApps", null); + resource.request(requestBody, requestOptions, ApiConstants.HttpMethod.POST, pathParams); + } } diff --git a/src/main/java/com/adyen/service/management/ApiCredentialsCompanyLevelApi.java b/src/main/java/com/adyen/service/management/ApiCredentialsCompanyLevelApi.java index 954fb0a8e..bb1886376 100644 --- a/src/main/java/com/adyen/service/management/ApiCredentialsCompanyLevelApi.java +++ b/src/main/java/com/adyen/service/management/ApiCredentialsCompanyLevelApi.java @@ -1,7 +1,7 @@ /* * Management API * - * The version of the OpenAPI document: 1 + * The version of the OpenAPI document: 3 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -30,7 +30,7 @@ public class ApiCredentialsCompanyLevelApi extends Service { - public static final String API_VERSION = "1"; + public static final String API_VERSION = "3"; protected String baseURL; @@ -40,7 +40,7 @@ public class ApiCredentialsCompanyLevelApi extends Service { */ public ApiCredentialsCompanyLevelApi(Client client) { super(client); - this.baseURL = createBaseURL("https://management-test.adyen.com/v1"); + this.baseURL = createBaseURL("https://management-test.adyen.com/v3"); } /** diff --git a/src/main/java/com/adyen/service/management/ApiCredentialsMerchantLevelApi.java b/src/main/java/com/adyen/service/management/ApiCredentialsMerchantLevelApi.java index 7a472489a..d8ab39a36 100644 --- a/src/main/java/com/adyen/service/management/ApiCredentialsMerchantLevelApi.java +++ b/src/main/java/com/adyen/service/management/ApiCredentialsMerchantLevelApi.java @@ -1,7 +1,7 @@ /* * Management API * - * The version of the OpenAPI document: 1 + * The version of the OpenAPI document: 3 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -30,7 +30,7 @@ public class ApiCredentialsMerchantLevelApi extends Service { - public static final String API_VERSION = "1"; + public static final String API_VERSION = "3"; protected String baseURL; @@ -40,7 +40,7 @@ public class ApiCredentialsMerchantLevelApi extends Service { */ public ApiCredentialsMerchantLevelApi(Client client) { super(client); - this.baseURL = createBaseURL("https://management-test.adyen.com/v1"); + this.baseURL = createBaseURL("https://management-test.adyen.com/v3"); } /** diff --git a/src/main/java/com/adyen/service/management/ApiKeyCompanyLevelApi.java b/src/main/java/com/adyen/service/management/ApiKeyCompanyLevelApi.java index 375643775..dc179ffdc 100644 --- a/src/main/java/com/adyen/service/management/ApiKeyCompanyLevelApi.java +++ b/src/main/java/com/adyen/service/management/ApiKeyCompanyLevelApi.java @@ -1,7 +1,7 @@ /* * Management API * - * The version of the OpenAPI document: 1 + * The version of the OpenAPI document: 3 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -26,7 +26,7 @@ public class ApiKeyCompanyLevelApi extends Service { - public static final String API_VERSION = "1"; + public static final String API_VERSION = "3"; protected String baseURL; @@ -36,7 +36,7 @@ public class ApiKeyCompanyLevelApi extends Service { */ public ApiKeyCompanyLevelApi(Client client) { super(client); - this.baseURL = createBaseURL("https://management-test.adyen.com/v1"); + this.baseURL = createBaseURL("https://management-test.adyen.com/v3"); } /** diff --git a/src/main/java/com/adyen/service/management/ApiKeyMerchantLevelApi.java b/src/main/java/com/adyen/service/management/ApiKeyMerchantLevelApi.java index de27bb58b..491caa8dd 100644 --- a/src/main/java/com/adyen/service/management/ApiKeyMerchantLevelApi.java +++ b/src/main/java/com/adyen/service/management/ApiKeyMerchantLevelApi.java @@ -1,7 +1,7 @@ /* * Management API * - * The version of the OpenAPI document: 1 + * The version of the OpenAPI document: 3 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -26,7 +26,7 @@ public class ApiKeyMerchantLevelApi extends Service { - public static final String API_VERSION = "1"; + public static final String API_VERSION = "3"; protected String baseURL; @@ -36,7 +36,7 @@ public class ApiKeyMerchantLevelApi extends Service { */ public ApiKeyMerchantLevelApi(Client client) { super(client); - this.baseURL = createBaseURL("https://management-test.adyen.com/v1"); + this.baseURL = createBaseURL("https://management-test.adyen.com/v3"); } /** diff --git a/src/main/java/com/adyen/service/management/ClientKeyCompanyLevelApi.java b/src/main/java/com/adyen/service/management/ClientKeyCompanyLevelApi.java index f6df7d358..fcb2a2ba5 100644 --- a/src/main/java/com/adyen/service/management/ClientKeyCompanyLevelApi.java +++ b/src/main/java/com/adyen/service/management/ClientKeyCompanyLevelApi.java @@ -1,7 +1,7 @@ /* * Management API * - * The version of the OpenAPI document: 1 + * The version of the OpenAPI document: 3 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -26,7 +26,7 @@ public class ClientKeyCompanyLevelApi extends Service { - public static final String API_VERSION = "1"; + public static final String API_VERSION = "3"; protected String baseURL; @@ -36,7 +36,7 @@ public class ClientKeyCompanyLevelApi extends Service { */ public ClientKeyCompanyLevelApi(Client client) { super(client); - this.baseURL = createBaseURL("https://management-test.adyen.com/v1"); + this.baseURL = createBaseURL("https://management-test.adyen.com/v3"); } /** diff --git a/src/main/java/com/adyen/service/management/ClientKeyMerchantLevelApi.java b/src/main/java/com/adyen/service/management/ClientKeyMerchantLevelApi.java index da7486309..09f1d8ba2 100644 --- a/src/main/java/com/adyen/service/management/ClientKeyMerchantLevelApi.java +++ b/src/main/java/com/adyen/service/management/ClientKeyMerchantLevelApi.java @@ -1,7 +1,7 @@ /* * Management API * - * The version of the OpenAPI document: 1 + * The version of the OpenAPI document: 3 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -26,7 +26,7 @@ public class ClientKeyMerchantLevelApi extends Service { - public static final String API_VERSION = "1"; + public static final String API_VERSION = "3"; protected String baseURL; @@ -36,7 +36,7 @@ public class ClientKeyMerchantLevelApi extends Service { */ public ClientKeyMerchantLevelApi(Client client) { super(client); - this.baseURL = createBaseURL("https://management-test.adyen.com/v1"); + this.baseURL = createBaseURL("https://management-test.adyen.com/v3"); } /** diff --git a/src/main/java/com/adyen/service/management/MyApiCredentialApi.java b/src/main/java/com/adyen/service/management/MyApiCredentialApi.java index e77f4c2c4..098a513a4 100644 --- a/src/main/java/com/adyen/service/management/MyApiCredentialApi.java +++ b/src/main/java/com/adyen/service/management/MyApiCredentialApi.java @@ -1,7 +1,7 @@ /* * Management API * - * The version of the OpenAPI document: 1 + * The version of the OpenAPI document: 3 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -17,6 +17,7 @@ import com.adyen.model.management.AllowedOrigin; import com.adyen.model.management.AllowedOriginsResponse; import com.adyen.model.management.CreateAllowedOriginRequest; +import com.adyen.model.management.GenerateClientKeyResponse; import com.adyen.model.management.MeApiCredential; import com.adyen.model.management.RestServiceError; import com.adyen.model.RequestOptions; @@ -29,7 +30,7 @@ public class MyApiCredentialApi extends Service { - public static final String API_VERSION = "1"; + public static final String API_VERSION = "3"; protected String baseURL; @@ -39,7 +40,7 @@ public class MyApiCredentialApi extends Service { */ public MyApiCredentialApi(Client client) { super(client); - this.baseURL = createBaseURL("https://management-test.adyen.com/v1"); + this.baseURL = createBaseURL("https://management-test.adyen.com/v3"); } /** @@ -192,4 +193,29 @@ public AllowedOrigin addAllowedOrigin(CreateAllowedOriginRequest createAllowedOr String jsonResult = resource.request(requestBody, requestOptions, ApiConstants.HttpMethod.POST, null); return AllowedOrigin.fromJson(jsonResult); } + + /** + * Generate new client key for self + * + * @return {@link GenerateClientKeyResponse } + * @throws ApiException if fails to make API call + */ + public GenerateClientKeyResponse generateNewClientKeyForSelf() throws ApiException, IOException { + return generateNewClientKeyForSelf(null); + } + + /** + * Generate new client key for self + * + * @param requestOptions {@link RequestOptions } Object to store additional data such as idempotency-keys (optional) + * @return {@link GenerateClientKeyResponse } + * @throws ApiException if fails to make API call + */ + public GenerateClientKeyResponse generateNewClientKeyForSelf(RequestOptions requestOptions) throws ApiException, IOException { + + String requestBody = null; + Resource resource = new Resource(this, this.baseURL + "/me/generateClientKey", null); + String jsonResult = resource.request(requestBody, requestOptions, ApiConstants.HttpMethod.POST, null); + return GenerateClientKeyResponse.fromJson(jsonResult); + } } diff --git a/src/main/java/com/adyen/service/management/PaymentMethodsMerchantLevelApi.java b/src/main/java/com/adyen/service/management/PaymentMethodsMerchantLevelApi.java index 62db1036a..50efc89d8 100644 --- a/src/main/java/com/adyen/service/management/PaymentMethodsMerchantLevelApi.java +++ b/src/main/java/com/adyen/service/management/PaymentMethodsMerchantLevelApi.java @@ -1,7 +1,7 @@ /* * Management API * - * The version of the OpenAPI document: 1 + * The version of the OpenAPI document: 3 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -30,7 +30,7 @@ public class PaymentMethodsMerchantLevelApi extends Service { - public static final String API_VERSION = "1"; + public static final String API_VERSION = "3"; protected String baseURL; @@ -40,7 +40,7 @@ public class PaymentMethodsMerchantLevelApi extends Service { */ public PaymentMethodsMerchantLevelApi(Client client) { super(client); - this.baseURL = createBaseURL("https://management-test.adyen.com/v1"); + this.baseURL = createBaseURL("https://management-test.adyen.com/v3"); } /** diff --git a/src/main/java/com/adyen/service/management/PayoutSettingsMerchantLevelApi.java b/src/main/java/com/adyen/service/management/PayoutSettingsMerchantLevelApi.java index e3bcbd740..a499264a5 100644 --- a/src/main/java/com/adyen/service/management/PayoutSettingsMerchantLevelApi.java +++ b/src/main/java/com/adyen/service/management/PayoutSettingsMerchantLevelApi.java @@ -1,7 +1,7 @@ /* * Management API * - * The version of the OpenAPI document: 1 + * The version of the OpenAPI document: 3 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -29,7 +29,7 @@ public class PayoutSettingsMerchantLevelApi extends Service { - public static final String API_VERSION = "1"; + public static final String API_VERSION = "3"; protected String baseURL; @@ -39,7 +39,7 @@ public class PayoutSettingsMerchantLevelApi extends Service { */ public PayoutSettingsMerchantLevelApi(Client client) { super(client); - this.baseURL = createBaseURL("https://management-test.adyen.com/v1"); + this.baseURL = createBaseURL("https://management-test.adyen.com/v3"); } /** diff --git a/src/main/java/com/adyen/service/management/SplitConfigurationMerchantLevelApi.java b/src/main/java/com/adyen/service/management/SplitConfigurationMerchantLevelApi.java index 78c9bc763..38ab32fdf 100644 --- a/src/main/java/com/adyen/service/management/SplitConfigurationMerchantLevelApi.java +++ b/src/main/java/com/adyen/service/management/SplitConfigurationMerchantLevelApi.java @@ -1,7 +1,7 @@ /* * Management API * - * The version of the OpenAPI document: 1 + * The version of the OpenAPI document: 3 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -31,7 +31,7 @@ public class SplitConfigurationMerchantLevelApi extends Service { - public static final String API_VERSION = "1"; + public static final String API_VERSION = "3"; protected String baseURL; @@ -41,7 +41,7 @@ public class SplitConfigurationMerchantLevelApi extends Service { */ public SplitConfigurationMerchantLevelApi(Client client) { super(client); - this.baseURL = createBaseURL("https://management-test.adyen.com/v1"); + this.baseURL = createBaseURL("https://management-test.adyen.com/v3"); } /** diff --git a/src/main/java/com/adyen/service/management/TerminalActionsCompanyLevelApi.java b/src/main/java/com/adyen/service/management/TerminalActionsCompanyLevelApi.java index 1d45e68f7..ad10bb0df 100644 --- a/src/main/java/com/adyen/service/management/TerminalActionsCompanyLevelApi.java +++ b/src/main/java/com/adyen/service/management/TerminalActionsCompanyLevelApi.java @@ -1,7 +1,7 @@ /* * Management API * - * The version of the OpenAPI document: 1 + * The version of the OpenAPI document: 3 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -27,7 +27,7 @@ public class TerminalActionsCompanyLevelApi extends Service { - public static final String API_VERSION = "1"; + public static final String API_VERSION = "3"; protected String baseURL; @@ -37,7 +37,7 @@ public class TerminalActionsCompanyLevelApi extends Service { */ public TerminalActionsCompanyLevelApi(Client client) { super(client); - this.baseURL = createBaseURL("https://management-test.adyen.com/v1"); + this.baseURL = createBaseURL("https://management-test.adyen.com/v3"); } /** diff --git a/src/main/java/com/adyen/service/management/TerminalActionsTerminalLevelApi.java b/src/main/java/com/adyen/service/management/TerminalActionsTerminalLevelApi.java index 0bc5101b8..e46470568 100644 --- a/src/main/java/com/adyen/service/management/TerminalActionsTerminalLevelApi.java +++ b/src/main/java/com/adyen/service/management/TerminalActionsTerminalLevelApi.java @@ -1,7 +1,7 @@ /* * Management API * - * The version of the OpenAPI document: 1 + * The version of the OpenAPI document: 3 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -27,7 +27,7 @@ public class TerminalActionsTerminalLevelApi extends Service { - public static final String API_VERSION = "1"; + public static final String API_VERSION = "3"; protected String baseURL; @@ -37,7 +37,7 @@ public class TerminalActionsTerminalLevelApi extends Service { */ public TerminalActionsTerminalLevelApi(Client client) { super(client); - this.baseURL = createBaseURL("https://management-test.adyen.com/v1"); + this.baseURL = createBaseURL("https://management-test.adyen.com/v3"); } /** diff --git a/src/main/java/com/adyen/service/management/TerminalOrdersCompanyLevelApi.java b/src/main/java/com/adyen/service/management/TerminalOrdersCompanyLevelApi.java index 08ccdc6cb..8d01c46f7 100644 --- a/src/main/java/com/adyen/service/management/TerminalOrdersCompanyLevelApi.java +++ b/src/main/java/com/adyen/service/management/TerminalOrdersCompanyLevelApi.java @@ -1,7 +1,7 @@ /* * Management API * - * The version of the OpenAPI document: 1 + * The version of the OpenAPI document: 3 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -33,7 +33,7 @@ public class TerminalOrdersCompanyLevelApi extends Service { - public static final String API_VERSION = "1"; + public static final String API_VERSION = "3"; protected String baseURL; @@ -43,7 +43,7 @@ public class TerminalOrdersCompanyLevelApi extends Service { */ public TerminalOrdersCompanyLevelApi(Client client) { super(client); - this.baseURL = createBaseURL("https://management-test.adyen.com/v1"); + this.baseURL = createBaseURL("https://management-test.adyen.com/v3"); } /** diff --git a/src/main/java/com/adyen/service/management/TerminalOrdersMerchantLevelApi.java b/src/main/java/com/adyen/service/management/TerminalOrdersMerchantLevelApi.java index 93a63e9d4..8bba2874f 100644 --- a/src/main/java/com/adyen/service/management/TerminalOrdersMerchantLevelApi.java +++ b/src/main/java/com/adyen/service/management/TerminalOrdersMerchantLevelApi.java @@ -1,7 +1,7 @@ /* * Management API * - * The version of the OpenAPI document: 1 + * The version of the OpenAPI document: 3 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -33,7 +33,7 @@ public class TerminalOrdersMerchantLevelApi extends Service { - public static final String API_VERSION = "1"; + public static final String API_VERSION = "3"; protected String baseURL; @@ -43,7 +43,7 @@ public class TerminalOrdersMerchantLevelApi extends Service { */ public TerminalOrdersMerchantLevelApi(Client client) { super(client); - this.baseURL = createBaseURL("https://management-test.adyen.com/v1"); + this.baseURL = createBaseURL("https://management-test.adyen.com/v3"); } /** diff --git a/src/main/java/com/adyen/service/management/TerminalSettingsCompanyLevelApi.java b/src/main/java/com/adyen/service/management/TerminalSettingsCompanyLevelApi.java index 69bb5aafa..2d491cf08 100644 --- a/src/main/java/com/adyen/service/management/TerminalSettingsCompanyLevelApi.java +++ b/src/main/java/com/adyen/service/management/TerminalSettingsCompanyLevelApi.java @@ -1,7 +1,7 @@ /* * Management API * - * The version of the OpenAPI document: 1 + * The version of the OpenAPI document: 3 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -27,7 +27,7 @@ public class TerminalSettingsCompanyLevelApi extends Service { - public static final String API_VERSION = "1"; + public static final String API_VERSION = "3"; protected String baseURL; @@ -37,7 +37,7 @@ public class TerminalSettingsCompanyLevelApi extends Service { */ public TerminalSettingsCompanyLevelApi(Client client) { super(client); - this.baseURL = createBaseURL("https://management-test.adyen.com/v1"); + this.baseURL = createBaseURL("https://management-test.adyen.com/v3"); } /** diff --git a/src/main/java/com/adyen/service/management/TerminalSettingsMerchantLevelApi.java b/src/main/java/com/adyen/service/management/TerminalSettingsMerchantLevelApi.java index 31a4a7f8e..69ca3237f 100644 --- a/src/main/java/com/adyen/service/management/TerminalSettingsMerchantLevelApi.java +++ b/src/main/java/com/adyen/service/management/TerminalSettingsMerchantLevelApi.java @@ -1,7 +1,7 @@ /* * Management API * - * The version of the OpenAPI document: 1 + * The version of the OpenAPI document: 3 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -27,7 +27,7 @@ public class TerminalSettingsMerchantLevelApi extends Service { - public static final String API_VERSION = "1"; + public static final String API_VERSION = "3"; protected String baseURL; @@ -37,7 +37,7 @@ public class TerminalSettingsMerchantLevelApi extends Service { */ public TerminalSettingsMerchantLevelApi(Client client) { super(client); - this.baseURL = createBaseURL("https://management-test.adyen.com/v1"); + this.baseURL = createBaseURL("https://management-test.adyen.com/v3"); } /** diff --git a/src/main/java/com/adyen/service/management/TerminalSettingsStoreLevelApi.java b/src/main/java/com/adyen/service/management/TerminalSettingsStoreLevelApi.java index da191c1b2..355abc9c0 100644 --- a/src/main/java/com/adyen/service/management/TerminalSettingsStoreLevelApi.java +++ b/src/main/java/com/adyen/service/management/TerminalSettingsStoreLevelApi.java @@ -1,7 +1,7 @@ /* * Management API * - * The version of the OpenAPI document: 1 + * The version of the OpenAPI document: 3 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -27,7 +27,7 @@ public class TerminalSettingsStoreLevelApi extends Service { - public static final String API_VERSION = "1"; + public static final String API_VERSION = "3"; protected String baseURL; @@ -37,7 +37,7 @@ public class TerminalSettingsStoreLevelApi extends Service { */ public TerminalSettingsStoreLevelApi(Client client) { super(client); - this.baseURL = createBaseURL("https://management-test.adyen.com/v1"); + this.baseURL = createBaseURL("https://management-test.adyen.com/v3"); } /** diff --git a/src/main/java/com/adyen/service/management/TerminalSettingsTerminalLevelApi.java b/src/main/java/com/adyen/service/management/TerminalSettingsTerminalLevelApi.java index 905acd3f6..6ae415012 100644 --- a/src/main/java/com/adyen/service/management/TerminalSettingsTerminalLevelApi.java +++ b/src/main/java/com/adyen/service/management/TerminalSettingsTerminalLevelApi.java @@ -1,7 +1,7 @@ /* * Management API * - * The version of the OpenAPI document: 1 + * The version of the OpenAPI document: 3 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -27,7 +27,7 @@ public class TerminalSettingsTerminalLevelApi extends Service { - public static final String API_VERSION = "1"; + public static final String API_VERSION = "3"; protected String baseURL; @@ -37,7 +37,7 @@ public class TerminalSettingsTerminalLevelApi extends Service { */ public TerminalSettingsTerminalLevelApi(Client client) { super(client); - this.baseURL = createBaseURL("https://management-test.adyen.com/v1"); + this.baseURL = createBaseURL("https://management-test.adyen.com/v3"); } /** diff --git a/src/main/java/com/adyen/service/management/TerminalsTerminalLevelApi.java b/src/main/java/com/adyen/service/management/TerminalsTerminalLevelApi.java index 2bb857571..619cbe6bf 100644 --- a/src/main/java/com/adyen/service/management/TerminalsTerminalLevelApi.java +++ b/src/main/java/com/adyen/service/management/TerminalsTerminalLevelApi.java @@ -1,7 +1,7 @@ /* * Management API * - * The version of the OpenAPI document: 1 + * The version of the OpenAPI document: 3 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -16,6 +16,7 @@ import com.adyen.constants.ApiConstants; import com.adyen.model.management.ListTerminalsResponse; import com.adyen.model.management.RestServiceError; +import com.adyen.model.management.TerminalReassignmentRequest; import com.adyen.model.RequestOptions; import com.adyen.service.exception.ApiException; import com.adyen.service.resource.Resource; @@ -26,7 +27,7 @@ public class TerminalsTerminalLevelApi extends Service { - public static final String API_VERSION = "1"; + public static final String API_VERSION = "3"; protected String baseURL; @@ -36,7 +37,7 @@ public class TerminalsTerminalLevelApi extends Service { */ public TerminalsTerminalLevelApi(Client client) { super(client); - this.baseURL = createBaseURL("https://management-test.adyen.com/v1"); + this.baseURL = createBaseURL("https://management-test.adyen.com/v3"); } /** @@ -108,4 +109,36 @@ public ListTerminalsResponse listTerminals(String searchQuery, String otpQuery, String jsonResult = resource.request(requestBody, requestOptions, ApiConstants.HttpMethod.GET, null, queryParams); return ListTerminalsResponse.fromJson(jsonResult); } + + /** + * Reassign a terminal + * + * @param terminalId {@link String } The unique identifier of the payment terminal. (required) + * @param terminalReassignmentRequest {@link TerminalReassignmentRequest } (required) + * @throws ApiException if fails to make API call + */ + public void reassignTerminal(String terminalId, TerminalReassignmentRequest terminalReassignmentRequest) throws ApiException, IOException { + reassignTerminal(terminalId, terminalReassignmentRequest, null); + } + + /** + * Reassign a terminal + * + * @param terminalId {@link String } The unique identifier of the payment terminal. (required) + * @param terminalReassignmentRequest {@link TerminalReassignmentRequest } (required) + * @param requestOptions {@link RequestOptions } Object to store additional data such as idempotency-keys (optional) + * @throws ApiException if fails to make API call + */ + public void reassignTerminal(String terminalId, TerminalReassignmentRequest terminalReassignmentRequest, RequestOptions requestOptions) throws ApiException, IOException { + //Add path params + Map pathParams = new HashMap<>(); + if (terminalId == null) { + throw new IllegalArgumentException("Please provide the terminalId path parameter"); + } + pathParams.put("terminalId", terminalId); + + String requestBody = terminalReassignmentRequest.toJson(); + Resource resource = new Resource(this, this.baseURL + "/terminals/{terminalId}/reassign", null); + resource.request(requestBody, requestOptions, ApiConstants.HttpMethod.POST, pathParams); + } } diff --git a/src/main/java/com/adyen/service/management/UsersCompanyLevelApi.java b/src/main/java/com/adyen/service/management/UsersCompanyLevelApi.java index 57549f13f..69cc25d8c 100644 --- a/src/main/java/com/adyen/service/management/UsersCompanyLevelApi.java +++ b/src/main/java/com/adyen/service/management/UsersCompanyLevelApi.java @@ -1,7 +1,7 @@ /* * Management API * - * The version of the OpenAPI document: 1 + * The version of the OpenAPI document: 3 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -30,7 +30,7 @@ public class UsersCompanyLevelApi extends Service { - public static final String API_VERSION = "1"; + public static final String API_VERSION = "3"; protected String baseURL; @@ -40,7 +40,7 @@ public class UsersCompanyLevelApi extends Service { */ public UsersCompanyLevelApi(Client client) { super(client); - this.baseURL = createBaseURL("https://management-test.adyen.com/v1"); + this.baseURL = createBaseURL("https://management-test.adyen.com/v3"); } /** diff --git a/src/main/java/com/adyen/service/management/UsersMerchantLevelApi.java b/src/main/java/com/adyen/service/management/UsersMerchantLevelApi.java index 539448bcd..e2741eb50 100644 --- a/src/main/java/com/adyen/service/management/UsersMerchantLevelApi.java +++ b/src/main/java/com/adyen/service/management/UsersMerchantLevelApi.java @@ -1,7 +1,7 @@ /* * Management API * - * The version of the OpenAPI document: 1 + * The version of the OpenAPI document: 3 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -30,7 +30,7 @@ public class UsersMerchantLevelApi extends Service { - public static final String API_VERSION = "1"; + public static final String API_VERSION = "3"; protected String baseURL; @@ -40,7 +40,7 @@ public class UsersMerchantLevelApi extends Service { */ public UsersMerchantLevelApi(Client client) { super(client); - this.baseURL = createBaseURL("https://management-test.adyen.com/v1"); + this.baseURL = createBaseURL("https://management-test.adyen.com/v3"); } /** diff --git a/src/main/java/com/adyen/service/management/WebhooksCompanyLevelApi.java b/src/main/java/com/adyen/service/management/WebhooksCompanyLevelApi.java index 46f2697e0..82c0b36fe 100644 --- a/src/main/java/com/adyen/service/management/WebhooksCompanyLevelApi.java +++ b/src/main/java/com/adyen/service/management/WebhooksCompanyLevelApi.java @@ -1,7 +1,7 @@ /* * Management API * - * The version of the OpenAPI document: 1 + * The version of the OpenAPI document: 3 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -32,7 +32,7 @@ public class WebhooksCompanyLevelApi extends Service { - public static final String API_VERSION = "1"; + public static final String API_VERSION = "3"; protected String baseURL; @@ -42,7 +42,7 @@ public class WebhooksCompanyLevelApi extends Service { */ public WebhooksCompanyLevelApi(Client client) { super(client); - this.baseURL = createBaseURL("https://management-test.adyen.com/v1"); + this.baseURL = createBaseURL("https://management-test.adyen.com/v3"); } /** diff --git a/src/main/java/com/adyen/service/management/WebhooksMerchantLevelApi.java b/src/main/java/com/adyen/service/management/WebhooksMerchantLevelApi.java index 6408fb495..faefbb53b 100644 --- a/src/main/java/com/adyen/service/management/WebhooksMerchantLevelApi.java +++ b/src/main/java/com/adyen/service/management/WebhooksMerchantLevelApi.java @@ -1,7 +1,7 @@ /* * Management API * - * The version of the OpenAPI document: 1 + * The version of the OpenAPI document: 3 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -32,7 +32,7 @@ public class WebhooksMerchantLevelApi extends Service { - public static final String API_VERSION = "1"; + public static final String API_VERSION = "3"; protected String baseURL; @@ -42,7 +42,7 @@ public class WebhooksMerchantLevelApi extends Service { */ public WebhooksMerchantLevelApi(Client client) { super(client); - this.baseURL = createBaseURL("https://management-test.adyen.com/v1"); + this.baseURL = createBaseURL("https://management-test.adyen.com/v3"); } /** diff --git a/src/main/java/com/adyen/service/transfers/CapitalApi.java b/src/main/java/com/adyen/service/transfers/CapitalApi.java index 4b38529e6..542c92c6c 100644 --- a/src/main/java/com/adyen/service/transfers/CapitalApi.java +++ b/src/main/java/com/adyen/service/transfers/CapitalApi.java @@ -1,7 +1,7 @@ /* * Transfers API * - * The version of the OpenAPI document: 3 + * The version of the OpenAPI document: 4 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -28,7 +28,7 @@ public class CapitalApi extends Service { - public static final String API_VERSION = "3"; + public static final String API_VERSION = "4"; protected String baseURL; @@ -38,7 +38,7 @@ public class CapitalApi extends Service { */ public CapitalApi(Client client) { super(client); - this.baseURL = createBaseURL("https://balanceplatform-api-test.adyen.com/btl/v3"); + this.baseURL = createBaseURL("https://balanceplatform-api-test.adyen.com/btl/v4"); } /** diff --git a/src/main/java/com/adyen/service/transfers/TransactionsApi.java b/src/main/java/com/adyen/service/transfers/TransactionsApi.java index 25049d88b..c3eae2cee 100644 --- a/src/main/java/com/adyen/service/transfers/TransactionsApi.java +++ b/src/main/java/com/adyen/service/transfers/TransactionsApi.java @@ -1,7 +1,7 @@ /* * Transfers API * - * The version of the OpenAPI document: 3 + * The version of the OpenAPI document: 4 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -15,7 +15,7 @@ import com.adyen.Service; import com.adyen.constants.ApiConstants; import java.time.OffsetDateTime; - +import com.adyen.model.transfers.RestServiceError; import com.adyen.model.transfers.Transaction; import com.adyen.model.transfers.TransactionSearchResponse; import com.adyen.model.RequestOptions; @@ -28,7 +28,7 @@ public class TransactionsApi extends Service { - public static final String API_VERSION = "3"; + public static final String API_VERSION = "4"; protected String baseURL; @@ -38,7 +38,7 @@ public class TransactionsApi extends Service { */ public TransactionsApi(Client client) { super(client); - this.baseURL = createBaseURL("https://balanceplatform-api-test.adyen.com/btl/v3"); + this.baseURL = createBaseURL("https://balanceplatform-api-test.adyen.com/btl/v4"); } /** diff --git a/src/main/java/com/adyen/service/transfers/TransfersApi.java b/src/main/java/com/adyen/service/transfers/TransfersApi.java index 64575c82b..22a91a8ad 100644 --- a/src/main/java/com/adyen/service/transfers/TransfersApi.java +++ b/src/main/java/com/adyen/service/transfers/TransfersApi.java @@ -1,7 +1,7 @@ /* * Transfers API * - * The version of the OpenAPI document: 3 + * The version of the OpenAPI document: 4 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -15,6 +15,8 @@ import com.adyen.Service; import com.adyen.constants.ApiConstants; import com.adyen.model.transfers.RestServiceError; +import com.adyen.model.transfers.ReturnTransferRequest; +import com.adyen.model.transfers.ReturnTransferResponse; import com.adyen.model.transfers.ServiceError; import com.adyen.model.transfers.Transfer; import com.adyen.model.transfers.TransferInfo; @@ -28,7 +30,7 @@ public class TransfersApi extends Service { - public static final String API_VERSION = "3"; + public static final String API_VERSION = "4"; protected String baseURL; @@ -38,7 +40,7 @@ public class TransfersApi extends Service { */ public TransfersApi(Client client) { super(client); - this.baseURL = createBaseURL("https://balanceplatform-api-test.adyen.com/btl/v3"); + this.baseURL = createBaseURL("https://balanceplatform-api-test.adyen.com/btl/v4"); } /** @@ -78,4 +80,39 @@ public Transfer transferFunds(TransferInfo transferInfo, RequestOptions requestO String jsonResult = resource.request(requestBody, requestOptions, ApiConstants.HttpMethod.POST, null); return Transfer.fromJson(jsonResult); } + + /** + * Return a transfer + * + * @param id {@link String } The unique identifier of the transfer to be returned. (required) + * @param returnTransferRequest {@link ReturnTransferRequest } (required) + * @return {@link ReturnTransferResponse } + * @throws ApiException if fails to make API call + */ + public ReturnTransferResponse returnTransfer(String id, ReturnTransferRequest returnTransferRequest) throws ApiException, IOException { + return returnTransfer(id, returnTransferRequest, null); + } + + /** + * Return a transfer + * + * @param id {@link String } The unique identifier of the transfer to be returned. (required) + * @param returnTransferRequest {@link ReturnTransferRequest } (required) + * @param requestOptions {@link RequestOptions } Object to store additional data such as idempotency-keys (optional) + * @return {@link ReturnTransferResponse } + * @throws ApiException if fails to make API call + */ + public ReturnTransferResponse returnTransfer(String id, ReturnTransferRequest returnTransferRequest, RequestOptions requestOptions) throws ApiException, IOException { + //Add path params + Map pathParams = new HashMap<>(); + if (id == null) { + throw new IllegalArgumentException("Please provide the id path parameter"); + } + pathParams.put("id", id); + + String requestBody = returnTransferRequest.toJson(); + Resource resource = new Resource(this, this.baseURL + "/transfers/{id}/returns", null); + String jsonResult = resource.request(requestBody, requestOptions, ApiConstants.HttpMethod.POST, pathParams); + return ReturnTransferResponse.fromJson(jsonResult); + } } diff --git a/src/test/java/com/adyen/CheckoutTest.java b/src/test/java/com/adyen/CheckoutTest.java index a1970c5a7..48162bea8 100644 --- a/src/test/java/com/adyen/CheckoutTest.java +++ b/src/test/java/com/adyen/CheckoutTest.java @@ -305,7 +305,7 @@ public void TestDonationsSuccessCall() throws Exception { paymentDonationRequest.setDonationAccount("YOUR_DONATION_ACCOUNT"); paymentDonationRequest.setMerchantAccount("YOUR_MERCHANT_ACCOUNT"); CardDetails cardDetails = new CardDetails().type(CardDetails.TypeEnum.SCHEME); - paymentDonationRequest.paymentMethod(new CheckoutPaymentMethod(cardDetails)); + paymentDonationRequest.paymentMethod(new DonationPaymentMethod(cardDetails)); paymentDonationRequest.setReference("YOUR_MERCHANT_REFERENCE"); paymentDonationRequest.setReturnUrl("https://your-company.com/..."); PaymentsApi checkout = new PaymentsApi(client); diff --git a/src/test/java/com/adyen/ClientTest.java b/src/test/java/com/adyen/ClientTest.java index 3fd9e2f7f..3494d7eb0 100644 --- a/src/test/java/com/adyen/ClientTest.java +++ b/src/test/java/com/adyen/ClientTest.java @@ -6,18 +6,12 @@ import org.junit.Test; import org.mockito.Mock; -import java.security.KeyStore; +import javax.net.ssl.SSLContext; public class ClientTest { @Mock - private KeyStore trustStore; - - @Mock - private KeyStore clientKeyStore; - - @Mock - private String clientKeyStorePassword; + private SSLContext clientCertificateAuthSSLContext; @Mock private String apiKey; @@ -44,24 +38,8 @@ public void testConfigLiveClient() { @Test public void testClientCertificateAuth() { - Client client = new Client(trustStore, clientKeyStore, clientKeyStorePassword, apiKey, null); - Assert.assertEquals(Environment.LIVE, client.getConfig().getEnvironment()); - } - - @Test - public void testClientCertificateAuth_AU() { - Client client = new Client(trustStore, clientKeyStore, clientKeyStorePassword, apiKey, Region.AU); - - Assert.assertEquals(Environment.LIVE, client.getConfig().getEnvironment()); - assertCommonEndpoints(client.getConfig()); - } - - @Test - public void testClientCertificateAuth_US() { - Client client = new Client(trustStore, clientKeyStore, clientKeyStorePassword, apiKey, Region.US); - + Client client = new Client(clientCertificateAuthSSLContext, apiKey); Assert.assertEquals(Environment.LIVE, client.getConfig().getEnvironment()); - assertCommonEndpoints(client.getConfig()); } private void assertCommonEndpoints(Config config) { diff --git a/src/test/java/com/adyen/ManagementTest.java b/src/test/java/com/adyen/ManagementTest.java index 150f8814d..a3b1b5b6d 100644 --- a/src/test/java/com/adyen/ManagementTest.java +++ b/src/test/java/com/adyen/ManagementTest.java @@ -38,7 +38,7 @@ public void listMerchantAccountsPaginated() throws IOException, ApiException, HT service.listMerchantAccounts(null, 25, null); verify(client.getHttpClient()).request( - "https://management-test.adyen.com/v1/merchants", + "https://management-test.adyen.com/v3/merchants", null, client.getConfig(), false, @@ -72,7 +72,7 @@ public void updateTerminalSettings() throws IOException, ApiException, HTTPClien assertNotNull(response.getReceiptPrinting().getShopperApproved()); assertTrue(response.getReceiptPrinting().getShopperApproved()); verify(client.getHttpClient()).request( - "https://management-test.adyen.com/v1/terminals/123ABC/terminalSettings", + "https://management-test.adyen.com/v3/terminals/123ABC/terminalSettings", "{\"receiptPrinting\":{\"shopperApproved\":true}}", client.getConfig(), false, @@ -93,7 +93,7 @@ public void createStore() throws IOException, ApiException, HTTPClientException assertEquals("YOUR_STORE_ID", store.getId()); verify(client.getHttpClient()).request( - "https://management-test.adyen.com/v1/merchants/YOUR_MERCHANT_ACCOUNT_ID/stores", + "https://management-test.adyen.com/v3/merchants/YOUR_MERCHANT_ACCOUNT_ID/stores", "{\"description\":\"City centre store\"}", client.getConfig(), false, @@ -111,7 +111,7 @@ public void removeAllowedOrigin() throws IOException, ApiException, HTTPClientEx service.removeAllowedOrigin("ID"); verify(client.getHttpClient()).request( - "https://management-test.adyen.com/v1/me/allowedOrigins/ID", + "https://management-test.adyen.com/v3/me/allowedOrigins/ID", null, client.getConfig(), false, diff --git a/src/test/java/com/adyen/MarketPayTest.java b/src/test/java/com/adyen/MarketPayTest.java index 8d47c8fc4..b849aebd4 100644 --- a/src/test/java/com/adyen/MarketPayTest.java +++ b/src/test/java/com/adyen/MarketPayTest.java @@ -137,7 +137,6 @@ public void testAccountApi() throws IOException, ApiException, HTTPClientExcepti "}"); // For some reason setting this content byte [] is broken String json = response.toJson(); - System.out.println(new String(response.getContent())); Client client = createMockClientFromResponse(json); ClassicPlatformAccountApi api = new ClassicPlatformAccountApi(client); diff --git a/src/test/java/com/adyen/TransfersTest.java b/src/test/java/com/adyen/TransfersTest.java index f8e465917..9fb0d5416 100644 --- a/src/test/java/com/adyen/TransfersTest.java +++ b/src/test/java/com/adyen/TransfersTest.java @@ -20,10 +20,10 @@ public void TransferTest() throws Exception { Transfer response = transfers.transferFunds(new TransferInfo()); Amount amount = new Amount(); amount.setCurrency("EUR"); - amount.setValue(80000L); + amount.setValue(110000L); assertEquals(response.getAmount(), amount); - assertEquals(response.getBalanceAccountId(), "BAB8B2C3D4E5F6G7H8D9J6GD4"); - assertEquals(response.getPriority(), Transfer.PriorityEnum.REGULAR); + assertEquals(response.getBalanceAccount().getId(), "BAB8B2C3D4E5F6G7H8D9J6GD4"); + assertEquals(response.getId(), "1W1UG35U8A9J5ZLG"); } @Test @@ -32,9 +32,9 @@ public void TransactionsListTest() throws Exception { TransactionsApi transactions = new TransactionsApi(client); TransactionSearchResponse response = transactions.getAllTransactions(null, null); Transaction transactionsResponse = response.getData().get(1); - assertEquals(transactionsResponse.getAccountHolderId(), "AHA1B2C3D4E5F6G7H8I9J0"); - assertEquals(transactionsResponse.getCounterparty().getBalanceAccountId(), "BAB8B2C3D4E5F6G7H8D9J6GD4"); - assertEquals(transactionsResponse.getBalancePlatform(), "YOUR_BALANCE_PLATFORM"); + assertEquals(transactionsResponse.getAccountHolder().getId(), "AH00000000000000000000001"); + assertEquals(transactionsResponse.getBalanceAccount().getId(), "BA00000000000000000000001"); + assertEquals(transactionsResponse.getStatus(), Transaction.StatusEnum.BOOKED); } @Test @@ -42,9 +42,9 @@ public void TransactionsRetrieveTest() throws Exception { Client client = createMockClientFromFile("mocks/transfers/get-transactions-id-success-200.json"); TransactionsApi transactions = new TransactionsApi(client); Transaction response = transactions.getTransaction("1"); - assertEquals(response.getAccountHolderId(), "AHA1B2C3D4E5F6G7H8I9J0"); - assertEquals(response.getBalancePlatform(), "YOUR_BALANCE_PLATFORM"); - assertEquals(response.getTransferId(), "2QP32A5U7IWC5WKG"); + assertEquals(response.getId(), "EVJN4227C224222B5JBDHPTD672M52EUR"); + assertEquals(response.getAccountHolder().getId(), "AH00000000000000000000001"); + assertEquals(response.getTransfer().getId(), "48TYZO5ZVURJ2FCW"); } @Test @@ -54,7 +54,7 @@ public void TestGetCapitalAccounts() throws Exception { CapitalGrants response = capital.getCapitalAccount(); assertEquals(response.getGrants().get(0).getGrantOfferId(), "string"); verify(client.getHttpClient()).request( - "https://balanceplatform-api-test.adyen.com/btl/v3/grants", + "https://balanceplatform-api-test.adyen.com/btl/v4/grants", null, client.getConfig(), false, @@ -71,7 +71,7 @@ public void TestRequestGrant() throws Exception { CapitalGrant response = capital.requestGrantPayout(new CapitalGrantInfo()); assertEquals(response.getGrantAccountId(), "CG00000000000000000000001"); verify(client.getHttpClient()).request( - "https://balanceplatform-api-test.adyen.com/btl/v3/grants", + "https://balanceplatform-api-test.adyen.com/btl/v4/grants", "{}", client.getConfig(), false, diff --git a/src/test/resources/mocks/legalentitymanagement/request/LegalEntityInfoRequiredType.json b/src/test/resources/mocks/legalentitymanagement/request/LegalEntityInfoRequiredType.json index bc7782a7d..dcb9429ed 100644 --- a/src/test/resources/mocks/legalentitymanagement/request/LegalEntityInfoRequiredType.json +++ b/src/test/resources/mocks/legalentitymanagement/request/LegalEntityInfoRequiredType.json @@ -16,7 +16,7 @@ "issuerState": "string", "nationalIdExempt": true, "number": "string", - "type": "proofOfNationalIdNumber" + "type": "nationalIdNumber" }, "name": { "firstName": "string", diff --git a/src/test/resources/mocks/legalentitymanagement/response/LegalEntity.json b/src/test/resources/mocks/legalentitymanagement/response/LegalEntity.json index 97996eed7..cc75ab298 100644 --- a/src/test/resources/mocks/legalentitymanagement/response/LegalEntity.json +++ b/src/test/resources/mocks/legalentitymanagement/response/LegalEntity.json @@ -227,7 +227,7 @@ "issuerState": "string", "nationalIdExempt": true, "number": "string", - "type": "proofOfNationalIdNumber" + "type": "nationalIdNumber" }, "name": { "firstName": "string", diff --git a/src/test/resources/mocks/transfers/get-transactions-id-success-200.json b/src/test/resources/mocks/transfers/get-transactions-id-success-200.json index 41537ec5e..384c75295 100644 --- a/src/test/resources/mocks/transfers/get-transactions-id-success-200.json +++ b/src/test/resources/mocks/transfers/get-transactions-id-success-200.json @@ -1,27 +1,25 @@ { - "accountHolderId": "AHA1B2C3D4E5F6G7H8I9J0", + "id": "EVJN4227C224222B5JBDHPTD672M52EUR", "amount": { - "currency": "EUR", - "value": 9887 + "value": -10000, + "currency": "EUR" }, - "balanceAccountId": "BAB8B2C3D4E5F6G7H8D9J6GD4", - "balancePlatform": "YOUR_BALANCE_PLATFORM", - "bookingDate": "2022-03-14T12:01:00+01:00", - "category": "bank", - "counterparty": { - "balanceAccountId": "NL29ADYX0000000001" + "status": "booked", + "eventId": "EVJN4227C224222B5JBDHPTD672M52", + "transfer": { + "id": "48TYZO5ZVURJ2FCW", + "reference": "Your internal reference for the transfer" }, - "createdAt": "2022-03-14T12:01:00+01:00", - "description": "YOUR_DESCRIPTION", - "id": "IZK7C25U7DYVX03Y", - "instructedAmount": { - "currency": "EUR", - "value": 9887 + "valueDate": "2023-08-11T16:19:35+02:00", + "bookingDate": "2023-08-11T16:19:39+02:00", + "creationDate": "2023-08-11T16:19:35+02:00", + "accountHolder": { + "id": "AH00000000000000000000001", + "description": "Your description of the account holder" }, - "reference": "2L6C6B5U7DYULLXC", - "referenceForBeneficiary": "YOUR_REFERENCE_FOR_BENEFICIARY", - "status": "booked", - "transferId": "2QP32A5U7IWC5WKG", - "type": "bankTransfer", - "valueDate": "2022-03-14T12:01:00+01:00" -} + "balanceAccount": { + "id": "BA00000000000000000000001", + "description": "Your description of the balance account" + }, + "balancePlatform": "YOUR_BALANCE_PLATFORM" +} \ No newline at end of file diff --git a/src/test/resources/mocks/transfers/get-transactions-success-200.json b/src/test/resources/mocks/transfers/get-transactions-success-200.json index 3f203c9bc..c253e2bed 100644 --- a/src/test/resources/mocks/transfers/get-transactions-success-200.json +++ b/src/test/resources/mocks/transfers/get-transactions-success-200.json @@ -1,84 +1,109 @@ { "data": [ { - "accountHolderId": "AHA1B2C3D4E5F6G7H8I9J0", - "counterparty": { - "balanceAccountId": "BAB8B2C3D4E5F6G7H8D9J6GD4" + "balancePlatform": "YOUR_BALANCE_PLATFORM", + "creationDate": "2023-08-10T14:51:20+02:00", + "id": "EVJN42272224222B5JB8BRC84N686ZEUR", + "accountHolder": { + "description": "Your description for the account holder", + "id": "AH00000000000000000000001" }, "amount": { - "currency": "EUR", - "value": -9 + "currency": "USD", + "value": -1000 }, - "balanceAccountId": "BAB8B2C3D4E5F6G7H8D9J6GD4", - "balancePlatform": "YOUR_BALANCE_PLATFORM", - "bookingDate": "2022-03-11T11:21:24+01:00", - "category": "internal", - "createdAt": "2022-03-11T11:21:24+01:00", - "id": "1VVF0D5U66PIUIVP", - "instructedAmount": { - "currency": "EUR", - "value": -9 - }, - "reference": "REFERENCE_46e8c40e", + "balanceAccount": { + "description": "Your description for the account holder", + "id": "BA00000000000000000000001" + }, + "bookingDate": "2023-08-10T14:51:33+02:00", + "eventId": "EVJN42272224222B5JB8BRC84N686Z", "status": "booked", - "transferId": "1VVF0D5U66PIUIVP", - "type": "fee", - "valueDate": "2022-03-11T11:21:24+01:00" + "transfer": { + "id": "3JNC3O5ZVFLLGV4B", + "reference": "Your internal reference for the transfer" + }, + "valueDate": "2023-08-10T14:51:20+02:00" }, { - "accountHolderId": "AHA1B2C3D4E5F6G7H8I9J0", - "counterparty": { - "balanceAccountId": "BAB8B2C3D4E5F6G7H8D9J6GD4" + "balancePlatform": "YOUR_BALANCE_PLATFORM", + "creationDate": "2023-08-10T15:34:31+02:00", + "id": "EVJN4227C224222B5JB8G3Q89N2NB6EUR", + "accountHolder": { + "description": "Your description for the account holder", + "id": "AH00000000000000000000001" }, "amount": { - "currency": "EUR", - "value": -46 + "currency": "USD", + "value": 123 }, - "balanceAccountId": "BAB8B2C3D4E5F6G7H8D9J6GD4", - "balancePlatform": "YOUR_BALANCE_PLATFORM", - "bookingDate": "2022-03-12T14:22:52+01:00", - "category": "internal", - "createdAt": "2022-03-12T14:22:52+01:00", - "id": "1WEPGD5U6MS1CFK3", - "instructedAmount": { - "currency": "EUR", - "value": -46 - }, - "reference": "REFERENCE_46e8c40e", + "balanceAccount": { + "description": "Your description for the account holder", + "id": "BA00000000000000000000001" + }, + "bookingDate": "2023-08-10T15:34:40+02:00", + "eventId": "EVJN4227C224222B5JB8G3Q89N2NB6", "status": "booked", - "transferId": "1WEPGD5U6MS1CFK3", - "type": "fee", - "valueDate": "2022-03-12T14:22:52+01:00" + "transfer": { + "id": "48POO45ZVG11166J", + "reference": "Your internal reference for the transfer" + }, + "valueDate": "2023-08-10T15:34:31+02:00" }, { - "accountHolderId": "AHA1B2C3D4E5F6G7H8I9J0", - "counterparty": { - "balanceAccountId": "BAB8B2C3D4E5F6G7H8D9J6GD4" + "balancePlatform": "YOUR_BALANCE_PLATFORM", + "creationDate": "2023-08-11T13:45:46+02:00", + "id": "EVJN4227C224222B5JBD3XHF8P3L8GUSD", + "accountHolder": { + "description": "Your description for the account holder", + "id": "AH00000000000000000000001" }, "amount": { - "currency": "EUR", - "value": -8 + "currency": "USD", + "value": -10000 }, - "balanceAccountId": "BAB8B2C3D4E5F6G7H8D9J6GD4", + "balanceAccount": { + "description": "Your description for the account holder", + "id": "BA00000000000000000000001" + }, + "bookingDate": "2023-08-11T13:45:57+02:00", + "eventId": "EVJN4227C224222B5JBD3XHF8P3L8G", + "status": "booked", + "transfer": { + "id": "48RTTW5ZVT8KU9DV", + "reference": "my-reference" + }, + "valueDate": "2023-08-11T13:45:46+02:00" + }, + { "balancePlatform": "YOUR_BALANCE_PLATFORM", - "bookingDate": "2022-03-14T21:00:48+01:00", - "createdAt": "2022-03-14T15:00:00+01:00", - "description": "YOUR_DESCRIPTION_2", - "id": "2QP32A5U7IWC5WKG", - "reference": "REFERENCE_46e8c40e", - - "instructedAmount": { - "currency": "EUR", - "value": -8 + "creationDate": "2023-08-11T13:45:51+02:00", + "id": "EVJN42272224222B5JBD3XJGHF4J26USD", + "accountHolder": { + "description": "Your description for the account holder", + "id": "AH00000000000000000000001" }, + "amount": { + "currency": "USD", + "value": 1000 + }, + "balanceAccount": { + "description": "Your description for the account holder", + "id": "BA00000000000000000000001" + }, + "bookingDate": "2023-08-11T13:45:58+02:00", + "eventId": "EVJN42272224222B5JBD3XJGHF4J26", "status": "booked", - "valueDate": "2022-03-14T21:00:48+01:00" + "transfer": { + "id": "48TYZO5ZVT8M1K47", + "reference": "my-reference" + }, + "valueDate": "2023-08-11T13:45:51+02:00" } ], "_links": { "next": { - "href": "https://balanceplatform-api-test.adyen.com/btl/v2/transactions?balancePlatform=Bastronaut&createdUntil=2022-03-21T00%3A00%3A00Z&createdSince=2022-03-11T00%3A00%3A00Z&limit=3&cursor=S2B-TSAjOkIrYlIlbjdqe0RreHRyM32lKRSxubXBHRkhHL2E32XitQQz5SfzpucD5HbHwpM1p6NDR1eXVQLFF6MmY33J32sobDxQYT90MHIud1hwLnd6JitcX32xJ" + "href": "https://balanceplatform-api-test.adyen.com/btl/v4/transactions?balancePlatform=TestBalancePlatform&createdUntil=2023-08-20T13%3A07%3A40Z&createdSince=2023-08-10T10%3A50%3A40Z&cursor=S2B-c0p1N0tdN0l6RGhYK1YpM0lgOTUyMDlLXElyKE9LMCtyaFEuMj1NMHgidCsrJi1ZNnhqXCtqVi5JPGpRK1F2fCFqWzU33JTojSVNJc1J1VXhncS10QDd6JX9FQFl5Zn0uNyUvSXJNQTo" } } -} - +} \ No newline at end of file diff --git a/src/test/resources/mocks/transfers/post-transfers-payout-cross-border-200.json b/src/test/resources/mocks/transfers/post-transfers-payout-cross-border-200.json index 6d1b293e4..097bffa2e 100644 --- a/src/test/resources/mocks/transfers/post-transfers-payout-cross-border-200.json +++ b/src/test/resources/mocks/transfers/post-transfers-payout-cross-border-200.json @@ -1,19 +1,53 @@ { "id": "1W1UG35U8A9J5ZLG", + "accountHolder": { + "description": "Your account holder description", + "id": "AH3227C223222C5GXQXF658WB", + "reference": "Your account holder reference" + }, "amount": { - "value": 80000, + "value": 110000, "currency": "EUR" }, - "balanceAccountId": "BAB8B2C3D4E5F6G7H8D9J6GD4", + "balanceAccount": { + "description": "Your balance account description", + "id": "BAB8B2C3D4E5F6G7H8D9J6GD4", + "reference": "Your balance account reference" + }, "category": "bank", + "categoryData": { + "priority": "crossBorder", + "type": "bank" + }, "counterparty": { - "transferInstrumentId": "SE1234567890ABC1234567890" + "bankAccount": { + "accountHolder": { + "fullName": "A. Klaassen", + "address": { + "city": "San Francisco", + "country": "US", + "postalCode": "94678", + "stateOrProvince": "CA", + "line1": "274", + "line2": "Brannan Street" + } + }, + "accountIdentification": { + "type": "numberAndBic", + "accountNumber": "123456789", + "bic": "BOFAUS3NXXX" + } + } + }, + "paymentInstrument": { + "description": "Your payment instrument description", + "id": "PI3222G223222G59347DAA265", + "reference": "Your payment instrument reference" }, - "priority": "regular", - "referenceForBeneficiary": "Your reference sent to the beneficiary", + "referenceForBeneficiary": "Your-reference-sent-to-the-beneficiary", "reference": "Your internal reference for the transfer", "description": "Your description for the transfer", "direction": "outgoing", "reason": "approved", "status": "authorised" -} +} \ No newline at end of file