diff --git a/Makefile b/Makefile index b32a36100..1320b022c 100644 --- a/Makefile +++ b/Makefile @@ -33,11 +33,15 @@ balanceplatform: spec=BalancePlatformService-v2 transfers: spec=TransferService-v3 legalentitymanagement: spec=LegalEntityService-v3 # Classic Platforms -marketpay/account: spec=AccountService-v6 -marketpay/fund: spec=FundService-v6 -marketpay/configuration: spec=NotificationConfigurationService-v6 -marketpay/webhooks: spec=MarketPayNotificationService-v6 -hop: spec=HopService-v6 +marketpayaccount: spec=AccountService-v6 +marketpayaccount: smallServiceName=ClassicPlatformAccountApi +marketpayfund: spec=FundService-v6 +marketpayfund: smallServiceName=ClassicPlatformFundApi +marketpayconfiguration: spec=NotificationConfigurationService-v6 +marketpayconfiguration: smallServiceName=ClassicPlatformConfigurationApi +marketpayhop: spec=HopService-v6 +marketpayhop: smallServiceName=ClassicPlatformHopApi +#marketpaywebhooks: spec=MarketPayNotificationService-v6 # Balance Webhooks acswebhooks: spec=BalancePlatformAcsNotification-v1 configurationwebhooks: spec=BalancePlatformConfigurationNotification-v1 diff --git a/README.md b/README.md index c757e060f..195c167e4 100644 --- a/README.md +++ b/README.md @@ -58,7 +58,7 @@ You can use Maven and add this dependency to your project's POM: com.adyen adyen-java-api-library - 21.4.0 + 21.5.0 ``` diff --git a/pom.xml b/pom.xml index 280d222d8..0e2ab6da3 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ com.adyen adyen-java-api-library jar - 21.4.0 + 21.5.0 Adyen Java API Library Adyen API Client Library for Java https://github.com/adyen/adyen-java-api-library @@ -248,7 +248,7 @@ com.squareup.okio okio - 3.5.0 + 3.6.0 test diff --git a/src/main/java/com/adyen/Client.java b/src/main/java/com/adyen/Client.java index 0adc5f769..827d43883 100644 --- a/src/main/java/com/adyen/Client.java +++ b/src/main/java/com/adyen/Client.java @@ -11,7 +11,7 @@ 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.4.0"; + public static final String LIB_VERSION = "21.5.0"; 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"; diff --git a/src/main/java/com/adyen/model/balancecontrol/JSON.java b/src/main/java/com/adyen/model/balancecontrol/JSON.java index 04464cdd3..04d9b1fe9 100644 --- a/src/main/java/com/adyen/model/balancecontrol/JSON.java +++ b/src/main/java/com/adyen/model/balancecontrol/JSON.java @@ -1,6 +1,7 @@ package com.adyen.model.balancecontrol; 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/balanceplatform/JSON.java b/src/main/java/com/adyen/model/balanceplatform/JSON.java index 776031179..234c41d1a 100644 --- a/src/main/java/com/adyen/model/balanceplatform/JSON.java +++ b/src/main/java/com/adyen/model/balanceplatform/JSON.java @@ -1,6 +1,7 @@ package com.adyen.model.balanceplatform; 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/binlookup/JSON.java b/src/main/java/com/adyen/model/binlookup/JSON.java index 88d7bdc4c..3d3c564d6 100644 --- a/src/main/java/com/adyen/model/binlookup/JSON.java +++ b/src/main/java/com/adyen/model/binlookup/JSON.java @@ -1,6 +1,7 @@ package com.adyen.model.binlookup; 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/checkout/AfterpayDetails.java b/src/main/java/com/adyen/model/checkout/AfterpayDetails.java index 0ffa5b445..fbabe090a 100644 --- a/src/main/java/com/adyen/model/checkout/AfterpayDetails.java +++ b/src/main/java/com/adyen/model/checkout/AfterpayDetails.java @@ -67,7 +67,9 @@ public enum TypeEnum { AFTERPAYTOUCH("afterpaytouch"), - AFTERPAY_B2B("afterpay_b2b"); + AFTERPAY_B2B("afterpay_b2b"), + + CLEARPAY("clearpay"); private String value; diff --git a/src/main/java/com/adyen/model/checkout/BalanceCheckRequest.java b/src/main/java/com/adyen/model/checkout/BalanceCheckRequest.java index 27e0e4cc2..fd958c33a 100644 --- a/src/main/java/com/adyen/model/checkout/BalanceCheckRequest.java +++ b/src/main/java/com/adyen/model/checkout/BalanceCheckRequest.java @@ -704,10 +704,10 @@ public BalanceCheckRequest putLocalizedShopperStatementItem(String key, String l } /** - * This field allows merchants to use dynamic shopper statement in local character sets. The local shopper statement field can be supplied in markets where localized merchant descriptors are used. Currently, Adyen only supports this in the Japanese market .The available character sets at the moment are: * Processing in Japan: **ja-Kana** The character set **ja-Kana** supports UTF-8 based Katakana and alphanumeric and special characters. Merchants can use half-width or full-width characters. An example request would be: > { \"shopperStatement\" : \"ADYEN - SELLER-A\", \"localizedShopperStatement\" : { \"ja-Kana\" : \"ADYEN - セラーA\" } } We recommend merchants to always supply the field localizedShopperStatement in addition to the field shopperStatement.It is issuer dependent whether the localized shopper statement field is supported. In the case of non-domestic transactions (e.g. US-issued cards processed in JP) the field `shopperStatement` is used to modify the statement of the shopper. Adyen handles the complexity of ensuring the correct descriptors are assigned. Please note, this field can be used for only Visa and Mastercard transactions. + * The `localizedShopperStatement` field lets you use dynamic values for your shopper statement in a local character set. If not supplied, left empty, or for cross-border transactions, **shopperStatement** is used. Adyen currently supports the ja-Kana character set for Visa and Mastercard payments in Japan using Japanese cards. This character set supports: * UTF-8 based Katakana, capital letters, numbers and special characters. * Half-width or full-width characters. * @return localizedShopperStatement **/ - @ApiModelProperty(value = "This field allows merchants to use dynamic shopper statement in local character sets. The local shopper statement field can be supplied in markets where localized merchant descriptors are used. Currently, Adyen only supports this in the Japanese market .The available character sets at the moment are: * Processing in Japan: **ja-Kana** The character set **ja-Kana** supports UTF-8 based Katakana and alphanumeric and special characters. Merchants can use half-width or full-width characters. An example request would be: > { \"shopperStatement\" : \"ADYEN - SELLER-A\", \"localizedShopperStatement\" : { \"ja-Kana\" : \"ADYEN - セラーA\" } } We recommend merchants to always supply the field localizedShopperStatement in addition to the field shopperStatement.It is issuer dependent whether the localized shopper statement field is supported. In the case of non-domestic transactions (e.g. US-issued cards processed in JP) the field `shopperStatement` is used to modify the statement of the shopper. Adyen handles the complexity of ensuring the correct descriptors are assigned. Please note, this field can be used for only Visa and Mastercard transactions.") + @ApiModelProperty(value = "The `localizedShopperStatement` field lets you use dynamic values for your shopper statement in a local character set. If not supplied, left empty, or for cross-border transactions, **shopperStatement** is used. Adyen currently supports the ja-Kana character set for Visa and Mastercard payments in Japan using Japanese cards. This character set supports: * UTF-8 based Katakana, capital letters, numbers and special characters. * Half-width or full-width characters.") @JsonProperty(JSON_PROPERTY_LOCALIZED_SHOPPER_STATEMENT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) diff --git a/src/main/java/com/adyen/model/checkout/DonationPaymentRequest.java b/src/main/java/com/adyen/model/checkout/DonationPaymentRequest.java index d7d46e73e..3991ba86e 100644 --- a/src/main/java/com/adyen/model/checkout/DonationPaymentRequest.java +++ b/src/main/java/com/adyen/model/checkout/DonationPaymentRequest.java @@ -1390,10 +1390,10 @@ public DonationPaymentRequest putLocalizedShopperStatementItem(String key, Strin } /** - * This field allows merchants to use dynamic shopper statement in local character sets. The local shopper statement field can be supplied in markets where localized merchant descriptors are used. Currently, Adyen only supports this in the Japanese market .The available character sets at the moment are: * Processing in Japan: **ja-Kana** The character set **ja-Kana** supports UTF-8 based Katakana and alphanumeric and special characters. Merchants should send the Katakana shopperStatement in full-width characters. An example request would be: > { \"shopperStatement\" : \"ADYEN - SELLER-A\", \"localizedShopperStatement\" : { \"ja-Kana\" : \"ADYEN - セラーA\" } } We recommend merchants to always supply the field localizedShopperStatement in addition to the field shopperStatement.It is issuer dependent whether the localized shopper statement field is supported. In the case of non-domestic transactions (e.g. US-issued cards processed in JP) the field `shopperStatement` is used to modify the statement of the shopper. Adyen handles the complexity of ensuring the correct descriptors are assigned. + * The `localizedShopperStatement` field lets you use dynamic values for your shopper statement in a local character set. If not supplied, left empty, or for cross-border transactions, **shopperStatement** is used. Adyen currently supports the ja-Kana character set for Visa and Mastercard payments in Japan using Japanese cards. This character set supports: * UTF-8 based Katakana, capital letters, numbers and special characters. * Half-width or full-width characters. * @return localizedShopperStatement **/ - @ApiModelProperty(value = "This field allows merchants to use dynamic shopper statement in local character sets. The local shopper statement field can be supplied in markets where localized merchant descriptors are used. Currently, Adyen only supports this in the Japanese market .The available character sets at the moment are: * Processing in Japan: **ja-Kana** The character set **ja-Kana** supports UTF-8 based Katakana and alphanumeric and special characters. Merchants should send the Katakana shopperStatement in full-width characters. An example request would be: > { \"shopperStatement\" : \"ADYEN - SELLER-A\", \"localizedShopperStatement\" : { \"ja-Kana\" : \"ADYEN - セラーA\" } } We recommend merchants to always supply the field localizedShopperStatement in addition to the field shopperStatement.It is issuer dependent whether the localized shopper statement field is supported. In the case of non-domestic transactions (e.g. US-issued cards processed in JP) the field `shopperStatement` is used to modify the statement of the shopper. Adyen handles the complexity of ensuring the correct descriptors are assigned.") + @ApiModelProperty(value = "The `localizedShopperStatement` field lets you use dynamic values for your shopper statement in a local character set. If not supplied, left empty, or for cross-border transactions, **shopperStatement** is used. Adyen currently supports the ja-Kana character set for Visa and Mastercard payments in Japan using Japanese cards. This character set supports: * UTF-8 based Katakana, capital letters, numbers and special characters. * Half-width or full-width characters.") @JsonProperty(JSON_PROPERTY_LOCALIZED_SHOPPER_STATEMENT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) diff --git a/src/main/java/com/adyen/model/checkout/JSON.java b/src/main/java/com/adyen/model/checkout/JSON.java index 93a6210f9..777cc44eb 100644 --- a/src/main/java/com/adyen/model/checkout/JSON.java +++ b/src/main/java/com/adyen/model/checkout/JSON.java @@ -1,6 +1,7 @@ package com.adyen.model.checkout; 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/checkout/PaymentDetails.java b/src/main/java/com/adyen/model/checkout/PaymentDetails.java index 22836574f..6947b9876 100644 --- a/src/main/java/com/adyen/model/checkout/PaymentDetails.java +++ b/src/main/java/com/adyen/model/checkout/PaymentDetails.java @@ -155,8 +155,6 @@ public enum TypeEnum { GOPAY_WALLET("gopay_wallet"), - POLI("poli"), - KCP_NAVERPAY("kcp_naverpay"), ONLINEBANKING_IN("onlinebanking_IN"), diff --git a/src/main/java/com/adyen/model/checkout/PaymentRequest.java b/src/main/java/com/adyen/model/checkout/PaymentRequest.java index fd2cf0d7c..862919a55 100644 --- a/src/main/java/com/adyen/model/checkout/PaymentRequest.java +++ b/src/main/java/com/adyen/model/checkout/PaymentRequest.java @@ -1303,10 +1303,10 @@ public PaymentRequest putLocalizedShopperStatementItem(String key, String locali } /** - * This field allows merchants to use dynamic shopper statement in local character sets. The local shopper statement field can be supplied in markets where localized merchant descriptors are used. Currently, Adyen only supports this in the Japanese market .The available character sets at the moment are: * Processing in Japan: **ja-Kana** The character set **ja-Kana** supports UTF-8 based Katakana and alphanumeric and special characters. Merchants should send the Katakana shopperStatement in full-width characters. An example request would be: > { \"shopperStatement\" : \"ADYEN - SELLER-A\", \"localizedShopperStatement\" : { \"ja-Kana\" : \"ADYEN - セラーA\" } } We recommend merchants to always supply the field localizedShopperStatement in addition to the field shopperStatement.It is issuer dependent whether the localized shopper statement field is supported. In the case of non-domestic transactions (e.g. US-issued cards processed in JP) the field `shopperStatement` is used to modify the statement of the shopper. Adyen handles the complexity of ensuring the correct descriptors are assigned. + * The `localizedShopperStatement` field lets you use dynamic values for your shopper statement in a local character set. If not supplied, left empty, or for cross-border transactions, **shopperStatement** is used. Adyen currently supports the ja-Kana character set for Visa and Mastercard payments in Japan using Japanese cards. This character set supports: * UTF-8 based Katakana, capital letters, numbers and special characters. * Half-width or full-width characters. * @return localizedShopperStatement **/ - @ApiModelProperty(value = "This field allows merchants to use dynamic shopper statement in local character sets. The local shopper statement field can be supplied in markets where localized merchant descriptors are used. Currently, Adyen only supports this in the Japanese market .The available character sets at the moment are: * Processing in Japan: **ja-Kana** The character set **ja-Kana** supports UTF-8 based Katakana and alphanumeric and special characters. Merchants should send the Katakana shopperStatement in full-width characters. An example request would be: > { \"shopperStatement\" : \"ADYEN - SELLER-A\", \"localizedShopperStatement\" : { \"ja-Kana\" : \"ADYEN - セラーA\" } } We recommend merchants to always supply the field localizedShopperStatement in addition to the field shopperStatement.It is issuer dependent whether the localized shopper statement field is supported. In the case of non-domestic transactions (e.g. US-issued cards processed in JP) the field `shopperStatement` is used to modify the statement of the shopper. Adyen handles the complexity of ensuring the correct descriptors are assigned.") + @ApiModelProperty(value = "The `localizedShopperStatement` field lets you use dynamic values for your shopper statement in a local character set. If not supplied, left empty, or for cross-border transactions, **shopperStatement** is used. Adyen currently supports the ja-Kana character set for Visa and Mastercard payments in Japan using Japanese cards. This character set supports: * UTF-8 based Katakana, capital letters, numbers and special characters. * Half-width or full-width characters.") @JsonProperty(JSON_PROPERTY_LOCALIZED_SHOPPER_STATEMENT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) diff --git a/src/main/java/com/adyen/model/checkout/PaymentSetupRequest.java b/src/main/java/com/adyen/model/checkout/PaymentSetupRequest.java index 5b66db531..87c12a3ca 100644 --- a/src/main/java/com/adyen/model/checkout/PaymentSetupRequest.java +++ b/src/main/java/com/adyen/model/checkout/PaymentSetupRequest.java @@ -1065,10 +1065,10 @@ public PaymentSetupRequest putLocalizedShopperStatementItem(String key, String l } /** - * This field allows merchants to use dynamic shopper statement in local character sets. The local shopper statement field can be supplied in markets where localized merchant descriptors are used. Currently, Adyen only supports this in the Japanese market .The available character sets at the moment are: * Processing in Japan: **ja-Kana** The character set **ja-Kana** supports UTF-8 based Katakana and alphanumeric and special characters. Merchants can use half-width or full-width characters. An example request would be: > { \"shopperStatement\" : \"ADYEN - SELLER-A\", \"localizedShopperStatement\" : { \"ja-Kana\" : \"ADYEN - セラーA\" } } We recommend merchants to always supply the field localizedShopperStatement in addition to the field shopperStatement.It is issuer dependent whether the localized shopper statement field is supported. In the case of non-domestic transactions (e.g. US-issued cards processed in JP) the field `shopperStatement` is used to modify the statement of the shopper. Adyen handles the complexity of ensuring the correct descriptors are assigned. Please note, this field can be used for only Visa and Mastercard transactions. + * The `localizedShopperStatement` field lets you use dynamic values for your shopper statement in a local character set. If not supplied, left empty, or for cross-border transactions, **shopperStatement** is used. Adyen currently supports the ja-Kana character set for Visa and Mastercard payments in Japan using Japanese cards. This character set supports: * UTF-8 based Katakana, capital letters, numbers and special characters. * Half-width or full-width characters. * @return localizedShopperStatement **/ - @ApiModelProperty(value = "This field allows merchants to use dynamic shopper statement in local character sets. The local shopper statement field can be supplied in markets where localized merchant descriptors are used. Currently, Adyen only supports this in the Japanese market .The available character sets at the moment are: * Processing in Japan: **ja-Kana** The character set **ja-Kana** supports UTF-8 based Katakana and alphanumeric and special characters. Merchants can use half-width or full-width characters. An example request would be: > { \"shopperStatement\" : \"ADYEN - SELLER-A\", \"localizedShopperStatement\" : { \"ja-Kana\" : \"ADYEN - セラーA\" } } We recommend merchants to always supply the field localizedShopperStatement in addition to the field shopperStatement.It is issuer dependent whether the localized shopper statement field is supported. In the case of non-domestic transactions (e.g. US-issued cards processed in JP) the field `shopperStatement` is used to modify the statement of the shopper. Adyen handles the complexity of ensuring the correct descriptors are assigned. Please note, this field can be used for only Visa and Mastercard transactions.") + @ApiModelProperty(value = "The `localizedShopperStatement` field lets you use dynamic values for your shopper statement in a local character set. If not supplied, left empty, or for cross-border transactions, **shopperStatement** is used. Adyen currently supports the ja-Kana character set for Visa and Mastercard payments in Japan using Japanese cards. This character set supports: * UTF-8 based Katakana, capital letters, numbers and special characters. * Half-width or full-width characters.") @JsonProperty(JSON_PROPERTY_LOCALIZED_SHOPPER_STATEMENT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) diff --git a/src/main/java/com/adyen/model/checkout/ThreeDSRequestData.java b/src/main/java/com/adyen/model/checkout/ThreeDSRequestData.java index a07469522..e5c3069c8 100644 --- a/src/main/java/com/adyen/model/checkout/ThreeDSRequestData.java +++ b/src/main/java/com/adyen/model/checkout/ThreeDSRequestData.java @@ -160,9 +160,9 @@ public static NativeThreeDSEnum fromValue(String value) { * The version of 3D Secure to use. Possible values: * **2.1.0** * **2.2.0** */ public enum ThreeDSVersionEnum { - _1_0("V_2_1_0"), + _1_0("2.1.0"), - _2_0("V_2_2_0"); + _2_0("2.2.0"); private String value; diff --git a/src/main/java/com/adyen/model/dataprotection/JSON.java b/src/main/java/com/adyen/model/dataprotection/JSON.java index 87a8cd6c1..e18f11333 100644 --- a/src/main/java/com/adyen/model/dataprotection/JSON.java +++ b/src/main/java/com/adyen/model/dataprotection/JSON.java @@ -1,6 +1,7 @@ package com.adyen.model.dataprotection; 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/legalentitymanagement/AcceptTermsOfServiceResponse.java b/src/main/java/com/adyen/model/legalentitymanagement/AcceptTermsOfServiceResponse.java index 4fca00179..114055906 100644 --- a/src/main/java/com/adyen/model/legalentitymanagement/AcceptTermsOfServiceResponse.java +++ b/src/main/java/com/adyen/model/legalentitymanagement/AcceptTermsOfServiceResponse.java @@ -187,10 +187,10 @@ public AcceptTermsOfServiceResponse language(String language) { } /** - * The language used for the Terms of Service document, specified by the two letter [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) language code. For example, **nl** for Dutch. + * The language used for the Terms of Service document, specified by the two-letter [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) language code. Possible value: **en** for English. * @return language **/ - @ApiModelProperty(value = "The language used for the Terms of Service document, specified by the two letter [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) language code. For example, **nl** for Dutch.") + @ApiModelProperty(value = "The language used for the Terms of Service document, specified by the two-letter [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) language code. Possible value: **en** for English.") @JsonProperty(JSON_PROPERTY_LANGUAGE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) diff --git a/src/main/java/com/adyen/model/legalentitymanagement/GetTermsOfServiceDocumentRequest.java b/src/main/java/com/adyen/model/legalentitymanagement/GetTermsOfServiceDocumentRequest.java index d85c190a4..d89badc57 100644 --- a/src/main/java/com/adyen/model/legalentitymanagement/GetTermsOfServiceDocumentRequest.java +++ b/src/main/java/com/adyen/model/legalentitymanagement/GetTermsOfServiceDocumentRequest.java @@ -96,10 +96,10 @@ public GetTermsOfServiceDocumentRequest language(String language) { } /** - * The language to be used for the Terms of Service document, specified by the two letter [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) language code. For example, **nl** for Dutch. + * The language to be used for the Terms of Service document, specified by the two-letter [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) language code. Possible value: **en** for English. * @return language **/ - @ApiModelProperty(required = true, value = "The language to be used for the Terms of Service document, specified by the two letter [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) language code. For example, **nl** for Dutch.") + @ApiModelProperty(required = true, value = "The language to be used for the Terms of Service document, specified by the two-letter [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) language code. Possible value: **en** for English.") @JsonProperty(JSON_PROPERTY_LANGUAGE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) diff --git a/src/main/java/com/adyen/model/legalentitymanagement/GetTermsOfServiceDocumentResponse.java b/src/main/java/com/adyen/model/legalentitymanagement/GetTermsOfServiceDocumentResponse.java index 9cf96710d..39964a1a3 100644 --- a/src/main/java/com/adyen/model/legalentitymanagement/GetTermsOfServiceDocumentResponse.java +++ b/src/main/java/com/adyen/model/legalentitymanagement/GetTermsOfServiceDocumentResponse.java @@ -158,10 +158,10 @@ public GetTermsOfServiceDocumentResponse language(String language) { } /** - * The language used for the Terms of Service document, specified by the two letter [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) language code. For example, **nl** for Dutch. + * The language used for the Terms of Service document, specified by the two-letter [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) language code. Possible value: **en** for English. * @return language **/ - @ApiModelProperty(value = "The language used for the Terms of Service document, specified by the two letter [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) language code. For example, **nl** for Dutch.") + @ApiModelProperty(value = "The language used for the Terms of Service document, specified by the two-letter [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) language code. Possible value: **en** for English.") @JsonProperty(JSON_PROPERTY_LANGUAGE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) diff --git a/src/main/java/com/adyen/model/legalentitymanagement/JSON.java b/src/main/java/com/adyen/model/legalentitymanagement/JSON.java index 9a7a7067f..448131ef4 100644 --- a/src/main/java/com/adyen/model/legalentitymanagement/JSON.java +++ b/src/main/java/com/adyen/model/legalentitymanagement/JSON.java @@ -1,6 +1,7 @@ package com.adyen.model.legalentitymanagement; 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/management/JSON.java b/src/main/java/com/adyen/model/management/JSON.java index 20b126290..9c23033b9 100644 --- a/src/main/java/com/adyen/model/management/JSON.java +++ b/src/main/java/com/adyen/model/management/JSON.java @@ -1,6 +1,7 @@ package com.adyen.model.management; 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/marketpayaccount/AbstractOpenApiSchema.java b/src/main/java/com/adyen/model/marketpayaccount/AbstractOpenApiSchema.java new file mode 100644 index 000000000..831e9a927 --- /dev/null +++ b/src/main/java/com/adyen/model/marketpayaccount/AbstractOpenApiSchema.java @@ -0,0 +1,148 @@ +/* + * Account API + * This API is used for the classic integration. If you are just starting your implementation, refer to our [new integration guide](https://docs.adyen.com/marketplaces-and-platforms) instead. The Account API provides endpoints for managing account-related entities on your platform. These related entities include account holders, accounts, bank accounts, shareholders, and verification-related documents. The management operations include actions such as creation, retrieval, updating, and deletion of them. For more information, refer to our [documentation](https://docs.adyen.com/marketplaces-and-platforms/classic). ## Authentication Your Adyen contact will provide your API credential and an API key. To connect to the API, add an `X-API-Key` header with the API key as the value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: YOUR_API_KEY\" \\ ... ``` Alternatively, you can use the username and password to connect to the API using basic authentication. For example: ``` curl -U \"ws@MarketPlace.YOUR_PLATFORM_ACCOUNT\":\"YOUR_WS_PASSWORD\" \\ -H \"Content-Type: application/json\" \\ ... ``` When going live, you need to generate new web service user credentials to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning The Account API supports [versioning](https://docs.adyen.com/development-resources/versioning) using a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://cal-test.adyen.com/cal/services/Account/v6/createAccountHolder ``` + * + * The version of the OpenAPI document: 6 + * + * + * 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.marketpayaccount; + +import java.util.Objects; +import java.lang.reflect.Type; +import java.util.Map; +import jakarta.ws.rs.core.GenericType; + +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Abstract class for oneOf,anyOf schemas defined in OpenAPI spec + */ + +public abstract class AbstractOpenApiSchema { + + // store the actual instance of the schema/object + private Object instance; + + // is nullable + private Boolean isNullable; + + // schema type (e.g. oneOf, anyOf) + private final String schemaType; + + public AbstractOpenApiSchema(String schemaType, Boolean isNullable) { + this.schemaType = schemaType; + this.isNullable = isNullable; + } + + /** + * Get the list of oneOf/anyOf composed schemas allowed to be stored in this object + * + * @return an instance of the actual schema/object + */ + public abstract Map getSchemas(); + + /** + * Get the actual instance + * + * @return an instance of the actual schema/object + */ + @JsonValue + public Object getActualInstance() {return instance;} + + /** + * Set the actual instance + * + * @param instance the actual instance of the schema/object + */ + public void setActualInstance(Object instance) {this.instance = instance;} + + /** + * Get the instant recursively when the schemas defined in oneOf/anyof happen to be oneOf/anyOf schema as well + * + * @return an instance of the actual schema/object + */ + public Object getActualInstanceRecursively() { + return getActualInstanceRecursively(this); + } + + private Object getActualInstanceRecursively(AbstractOpenApiSchema object) { + if (object.getActualInstance() == null) { + return null; + } else if (object.getActualInstance() instanceof AbstractOpenApiSchema) { + return getActualInstanceRecursively((AbstractOpenApiSchema)object.getActualInstance()); + } else { + return object.getActualInstance(); + } + } + + /** + * Get the schema type (e.g. anyOf, oneOf) + * + * @return the schema type + */ + public String getSchemaType() { + return schemaType; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ").append(getClass()).append(" {\n"); + sb.append(" instance: ").append(toIndentedString(instance)).append("\n"); + sb.append(" isNullable: ").append(toIndentedString(isNullable)).append("\n"); + sb.append(" schemaType: ").append(toIndentedString(schemaType)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AbstractOpenApiSchema a = (AbstractOpenApiSchema) o; + return Objects.equals(this.instance, a.instance) && + Objects.equals(this.isNullable, a.isNullable) && + Objects.equals(this.schemaType, a.schemaType); + } + + @Override + public int hashCode() { + return Objects.hash(instance, isNullable, schemaType); + } + + /** + * Is nullable + * + * @return true if it's nullable + */ + public Boolean isNullable() { + if (Boolean.TRUE.equals(isNullable)) { + return Boolean.TRUE; + } else { + return Boolean.FALSE; + } + } + + + +} diff --git a/src/main/java/com/adyen/model/marketpayaccount/Account.java b/src/main/java/com/adyen/model/marketpayaccount/Account.java new file mode 100644 index 000000000..be6d15fed --- /dev/null +++ b/src/main/java/com/adyen/model/marketpayaccount/Account.java @@ -0,0 +1,457 @@ +/* + * Account API + * This API is used for the classic integration. If you are just starting your implementation, refer to our [new integration guide](https://docs.adyen.com/marketplaces-and-platforms) instead. The Account API provides endpoints for managing account-related entities on your platform. These related entities include account holders, accounts, bank accounts, shareholders, and verification-related documents. The management operations include actions such as creation, retrieval, updating, and deletion of them. For more information, refer to our [documentation](https://docs.adyen.com/marketplaces-and-platforms/classic). ## Authentication Your Adyen contact will provide your API credential and an API key. To connect to the API, add an `X-API-Key` header with the API key as the value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: YOUR_API_KEY\" \\ ... ``` Alternatively, you can use the username and password to connect to the API using basic authentication. For example: ``` curl -U \"ws@MarketPlace.YOUR_PLATFORM_ACCOUNT\":\"YOUR_WS_PASSWORD\" \\ -H \"Content-Type: application/json\" \\ ... ``` When going live, you need to generate new web service user credentials to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning The Account API supports [versioning](https://docs.adyen.com/development-resources/versioning) using a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://cal-test.adyen.com/cal/services/Account/v6/createAccountHolder ``` + * + * The version of the OpenAPI document: 6 + * + * + * 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.marketpayaccount; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.adyen.model.marketpayaccount.PayoutScheduleResponse; +import com.fasterxml.jackson.annotation.JsonInclude; +import 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; + + +/** + * Account + */ +@JsonPropertyOrder({ + Account.JSON_PROPERTY_ACCOUNT_CODE, + Account.JSON_PROPERTY_BANK_ACCOUNT_U_U_I_D, + Account.JSON_PROPERTY_BENEFICIARY_ACCOUNT, + Account.JSON_PROPERTY_BENEFICIARY_MERCHANT_REFERENCE, + Account.JSON_PROPERTY_DESCRIPTION, + Account.JSON_PROPERTY_METADATA, + Account.JSON_PROPERTY_PAYOUT_METHOD_CODE, + Account.JSON_PROPERTY_PAYOUT_SCHEDULE, + Account.JSON_PROPERTY_PAYOUT_SPEED, + Account.JSON_PROPERTY_STATUS +}) + +public class Account { + public static final String JSON_PROPERTY_ACCOUNT_CODE = "accountCode"; + private String accountCode; + + public static final String JSON_PROPERTY_BANK_ACCOUNT_U_U_I_D = "bankAccountUUID"; + private String bankAccountUUID; + + public static final String JSON_PROPERTY_BENEFICIARY_ACCOUNT = "beneficiaryAccount"; + private String beneficiaryAccount; + + public static final String JSON_PROPERTY_BENEFICIARY_MERCHANT_REFERENCE = "beneficiaryMerchantReference"; + private String beneficiaryMerchantReference; + + public static final String JSON_PROPERTY_DESCRIPTION = "description"; + private String description; + + public static final String JSON_PROPERTY_METADATA = "metadata"; + private Map metadata = null; + + public static final String JSON_PROPERTY_PAYOUT_METHOD_CODE = "payoutMethodCode"; + private String payoutMethodCode; + + public static final String JSON_PROPERTY_PAYOUT_SCHEDULE = "payoutSchedule"; + private PayoutScheduleResponse payoutSchedule; + + /** + * Speed with which payouts for this account are processed. Permitted values: `STANDARD`, `SAME_DAY`. + */ + public enum PayoutSpeedEnum { + INSTANT("INSTANT"), + + SAME_DAY("SAME_DAY"), + + STANDARD("STANDARD"); + + private String value; + + PayoutSpeedEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static PayoutSpeedEnum fromValue(String value) { + for (PayoutSpeedEnum b : PayoutSpeedEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_PAYOUT_SPEED = "payoutSpeed"; + private PayoutSpeedEnum payoutSpeed; + + public static final String JSON_PROPERTY_STATUS = "status"; + private String status; + + public Account() { + } + + public Account accountCode(String accountCode) { + this.accountCode = accountCode; + return this; + } + + /** + * The code of the account. + * @return accountCode + **/ + @ApiModelProperty(value = "The code of the account.") + @JsonProperty(JSON_PROPERTY_ACCOUNT_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getAccountCode() { + return accountCode; + } + + + @JsonProperty(JSON_PROPERTY_ACCOUNT_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAccountCode(String accountCode) { + this.accountCode = accountCode; + } + + + public Account bankAccountUUID(String bankAccountUUID) { + this.bankAccountUUID = bankAccountUUID; + return this; + } + + /** + * The bankAccountUUID of the bank account held by the account holder to couple the account with. Scheduled payouts in currencies matching the currency of this bank account will be sent to this bank account. Payouts in different currencies will be sent to a matching bank account of the account holder. + * @return bankAccountUUID + **/ + @ApiModelProperty(value = "The bankAccountUUID of the bank account held by the account holder to couple the account with. Scheduled payouts in currencies matching the currency of this bank account will be sent to this bank account. Payouts in different currencies will be sent to a matching bank account of the account holder.") + @JsonProperty(JSON_PROPERTY_BANK_ACCOUNT_U_U_I_D) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getBankAccountUUID() { + return bankAccountUUID; + } + + + @JsonProperty(JSON_PROPERTY_BANK_ACCOUNT_U_U_I_D) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setBankAccountUUID(String bankAccountUUID) { + this.bankAccountUUID = bankAccountUUID; + } + + + public Account beneficiaryAccount(String beneficiaryAccount) { + this.beneficiaryAccount = beneficiaryAccount; + return this; + } + + /** + * The beneficiary of the account. + * @return beneficiaryAccount + **/ + @ApiModelProperty(value = "The beneficiary of the account.") + @JsonProperty(JSON_PROPERTY_BENEFICIARY_ACCOUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getBeneficiaryAccount() { + return beneficiaryAccount; + } + + + @JsonProperty(JSON_PROPERTY_BENEFICIARY_ACCOUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setBeneficiaryAccount(String beneficiaryAccount) { + this.beneficiaryAccount = beneficiaryAccount; + } + + + public Account beneficiaryMerchantReference(String beneficiaryMerchantReference) { + this.beneficiaryMerchantReference = beneficiaryMerchantReference; + return this; + } + + /** + * The reason that a beneficiary has been set up for this account. This may have been supplied during the setup of a beneficiary at the discretion of the executing user. + * @return beneficiaryMerchantReference + **/ + @ApiModelProperty(value = "The reason that a beneficiary has been set up for this account. This may have been supplied during the setup of a beneficiary at the discretion of the executing user.") + @JsonProperty(JSON_PROPERTY_BENEFICIARY_MERCHANT_REFERENCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getBeneficiaryMerchantReference() { + return beneficiaryMerchantReference; + } + + + @JsonProperty(JSON_PROPERTY_BENEFICIARY_MERCHANT_REFERENCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setBeneficiaryMerchantReference(String beneficiaryMerchantReference) { + this.beneficiaryMerchantReference = beneficiaryMerchantReference; + } + + + public Account description(String description) { + this.description = description; + return this; + } + + /** + * A description of the account. + * @return description + **/ + @ApiModelProperty(value = "A description of the account.") + @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 Account metadata(Map metadata) { + this.metadata = metadata; + return this; + } + + public Account putMetadataItem(String key, String metadataItem) { + if (this.metadata == null) { + this.metadata = new HashMap<>(); + } + this.metadata.put(key, metadataItem); + return this; + } + + /** + * A set of key and value pairs for general use by the merchant. The keys do not have specific names and may be used for storing miscellaneous data as desired. > Note that during an update of metadata, the omission of existing key-value pairs will result in the deletion of those key-value pairs. + * @return metadata + **/ + @ApiModelProperty(value = "A set of key and value pairs for general use by the merchant. The keys do not have specific names and may be used for storing miscellaneous data as desired. > Note that during an update of metadata, the omission of existing key-value pairs will result in the deletion of those key-value pairs.") + @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 Account payoutMethodCode(String payoutMethodCode) { + this.payoutMethodCode = payoutMethodCode; + return this; + } + + /** + * The payout method code held by the account holder to couple the account with. Scheduled card payouts will be sent using this payout method code. + * @return payoutMethodCode + **/ + @ApiModelProperty(value = "The payout method code held by the account holder to couple the account with. Scheduled card payouts will be sent using this payout method code.") + @JsonProperty(JSON_PROPERTY_PAYOUT_METHOD_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getPayoutMethodCode() { + return payoutMethodCode; + } + + + @JsonProperty(JSON_PROPERTY_PAYOUT_METHOD_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPayoutMethodCode(String payoutMethodCode) { + this.payoutMethodCode = payoutMethodCode; + } + + + public Account payoutSchedule(PayoutScheduleResponse payoutSchedule) { + this.payoutSchedule = payoutSchedule; + return this; + } + + /** + * Get payoutSchedule + * @return payoutSchedule + **/ + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_PAYOUT_SCHEDULE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public PayoutScheduleResponse getPayoutSchedule() { + return payoutSchedule; + } + + + @JsonProperty(JSON_PROPERTY_PAYOUT_SCHEDULE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPayoutSchedule(PayoutScheduleResponse payoutSchedule) { + this.payoutSchedule = payoutSchedule; + } + + + public Account payoutSpeed(PayoutSpeedEnum payoutSpeed) { + this.payoutSpeed = payoutSpeed; + return this; + } + + /** + * Speed with which payouts for this account are processed. Permitted values: `STANDARD`, `SAME_DAY`. + * @return payoutSpeed + **/ + @ApiModelProperty(value = "Speed with which payouts for this account are processed. Permitted values: `STANDARD`, `SAME_DAY`.") + @JsonProperty(JSON_PROPERTY_PAYOUT_SPEED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public PayoutSpeedEnum getPayoutSpeed() { + return payoutSpeed; + } + + + @JsonProperty(JSON_PROPERTY_PAYOUT_SPEED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPayoutSpeed(PayoutSpeedEnum payoutSpeed) { + this.payoutSpeed = payoutSpeed; + } + + + public Account status(String status) { + this.status = status; + return this; + } + + /** + * The status of the account. Possible values: `Active`, `Inactive`, `Suspended`, `Closed`. + * @return status + **/ + @ApiModelProperty(value = "The status of the account. Possible values: `Active`, `Inactive`, `Suspended`, `Closed`.") + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setStatus(String status) { + this.status = status; + } + + + /** + * Return true if this Account object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Account account = (Account) o; + return Objects.equals(this.accountCode, account.accountCode) && + Objects.equals(this.bankAccountUUID, account.bankAccountUUID) && + Objects.equals(this.beneficiaryAccount, account.beneficiaryAccount) && + Objects.equals(this.beneficiaryMerchantReference, account.beneficiaryMerchantReference) && + Objects.equals(this.description, account.description) && + Objects.equals(this.metadata, account.metadata) && + Objects.equals(this.payoutMethodCode, account.payoutMethodCode) && + Objects.equals(this.payoutSchedule, account.payoutSchedule) && + Objects.equals(this.payoutSpeed, account.payoutSpeed) && + Objects.equals(this.status, account.status); + } + + @Override + public int hashCode() { + return Objects.hash(accountCode, bankAccountUUID, beneficiaryAccount, beneficiaryMerchantReference, description, metadata, payoutMethodCode, payoutSchedule, payoutSpeed, status); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Account {\n"); + sb.append(" accountCode: ").append(toIndentedString(accountCode)).append("\n"); + sb.append(" bankAccountUUID: ").append(toIndentedString(bankAccountUUID)).append("\n"); + sb.append(" beneficiaryAccount: ").append(toIndentedString(beneficiaryAccount)).append("\n"); + sb.append(" beneficiaryMerchantReference: ").append(toIndentedString(beneficiaryMerchantReference)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" metadata: ").append(toIndentedString(metadata)).append("\n"); + sb.append(" payoutMethodCode: ").append(toIndentedString(payoutMethodCode)).append("\n"); + sb.append(" payoutSchedule: ").append(toIndentedString(payoutSchedule)).append("\n"); + sb.append(" payoutSpeed: ").append(toIndentedString(payoutSpeed)).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 Account given an JSON string + * + * @param jsonString JSON string + * @return An instance of Account + * @throws JsonProcessingException if the JSON string is invalid with respect to Account + */ + public static Account fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, Account.class); + } +/** + * Convert an instance of Account 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/marketpayaccount/AccountEvent.java b/src/main/java/com/adyen/model/marketpayaccount/AccountEvent.java new file mode 100644 index 000000000..c2086bfc0 --- /dev/null +++ b/src/main/java/com/adyen/model/marketpayaccount/AccountEvent.java @@ -0,0 +1,227 @@ +/* + * Account API + * This API is used for the classic integration. If you are just starting your implementation, refer to our [new integration guide](https://docs.adyen.com/marketplaces-and-platforms) instead. The Account API provides endpoints for managing account-related entities on your platform. These related entities include account holders, accounts, bank accounts, shareholders, and verification-related documents. The management operations include actions such as creation, retrieval, updating, and deletion of them. For more information, refer to our [documentation](https://docs.adyen.com/marketplaces-and-platforms/classic). ## Authentication Your Adyen contact will provide your API credential and an API key. To connect to the API, add an `X-API-Key` header with the API key as the value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: YOUR_API_KEY\" \\ ... ``` Alternatively, you can use the username and password to connect to the API using basic authentication. For example: ``` curl -U \"ws@MarketPlace.YOUR_PLATFORM_ACCOUNT\":\"YOUR_WS_PASSWORD\" \\ -H \"Content-Type: application/json\" \\ ... ``` When going live, you need to generate new web service user credentials to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning The Account API supports [versioning](https://docs.adyen.com/development-resources/versioning) using a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://cal-test.adyen.com/cal/services/Account/v6/createAccountHolder ``` + * + * The version of the OpenAPI document: 6 + * + * + * 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.marketpayaccount; + +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.time.OffsetDateTime; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.core.JsonProcessingException; + + +/** + * AccountEvent + */ +@JsonPropertyOrder({ + AccountEvent.JSON_PROPERTY_EVENT, + AccountEvent.JSON_PROPERTY_EXECUTION_DATE, + AccountEvent.JSON_PROPERTY_REASON +}) + +public class AccountEvent { + /** + * The event. >Permitted values: `InactivateAccount`, `RefundNotPaidOutTransfers`. For more information, refer to [Verification checks](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process). + */ + public enum EventEnum { + INACTIVATEACCOUNT("InactivateAccount"), + + REFUNDNOTPAIDOUTTRANSFERS("RefundNotPaidOutTransfers"); + + private String value; + + EventEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EventEnum fromValue(String value) { + for (EventEnum b : EventEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_EVENT = "event"; + private EventEnum event; + + public static final String JSON_PROPERTY_EXECUTION_DATE = "executionDate"; + private OffsetDateTime executionDate; + + public static final String JSON_PROPERTY_REASON = "reason"; + private String reason; + + public AccountEvent() { + } + + public AccountEvent event(EventEnum event) { + this.event = event; + return this; + } + + /** + * The event. >Permitted values: `InactivateAccount`, `RefundNotPaidOutTransfers`. For more information, refer to [Verification checks](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process). + * @return event + **/ + @ApiModelProperty(value = "The event. >Permitted values: `InactivateAccount`, `RefundNotPaidOutTransfers`. For more information, refer to [Verification checks](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process).") + @JsonProperty(JSON_PROPERTY_EVENT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public EventEnum getEvent() { + return event; + } + + + @JsonProperty(JSON_PROPERTY_EVENT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEvent(EventEnum event) { + this.event = event; + } + + + public AccountEvent executionDate(OffsetDateTime executionDate) { + this.executionDate = executionDate; + return this; + } + + /** + * The date on which the event will take place. + * @return executionDate + **/ + @ApiModelProperty(value = "The date on which the event will take place.") + @JsonProperty(JSON_PROPERTY_EXECUTION_DATE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public OffsetDateTime getExecutionDate() { + return executionDate; + } + + + @JsonProperty(JSON_PROPERTY_EXECUTION_DATE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setExecutionDate(OffsetDateTime executionDate) { + this.executionDate = executionDate; + } + + + public AccountEvent reason(String reason) { + this.reason = reason; + return this; + } + + /** + * The reason why this event has been created. + * @return reason + **/ + @ApiModelProperty(value = "The reason why this event has been created.") + @JsonProperty(JSON_PROPERTY_REASON) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getReason() { + return reason; + } + + + @JsonProperty(JSON_PROPERTY_REASON) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setReason(String reason) { + this.reason = reason; + } + + + /** + * Return true if this AccountEvent object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AccountEvent accountEvent = (AccountEvent) o; + return Objects.equals(this.event, accountEvent.event) && + Objects.equals(this.executionDate, accountEvent.executionDate) && + Objects.equals(this.reason, accountEvent.reason); + } + + @Override + public int hashCode() { + return Objects.hash(event, executionDate, reason); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AccountEvent {\n"); + sb.append(" event: ").append(toIndentedString(event)).append("\n"); + sb.append(" executionDate: ").append(toIndentedString(executionDate)).append("\n"); + sb.append(" reason: ").append(toIndentedString(reason)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +/** + * Create an instance of AccountEvent given an JSON string + * + * @param jsonString JSON string + * @return An instance of AccountEvent + * @throws JsonProcessingException if the JSON string is invalid with respect to AccountEvent + */ + public static AccountEvent fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, AccountEvent.class); + } +/** + * Convert an instance of AccountEvent 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/marketpayaccount/AccountHolderDetails.java b/src/main/java/com/adyen/model/marketpayaccount/AccountHolderDetails.java new file mode 100644 index 000000000..009fd60e5 --- /dev/null +++ b/src/main/java/com/adyen/model/marketpayaccount/AccountHolderDetails.java @@ -0,0 +1,614 @@ +/* + * Account API + * This API is used for the classic integration. If you are just starting your implementation, refer to our [new integration guide](https://docs.adyen.com/marketplaces-and-platforms) instead. The Account API provides endpoints for managing account-related entities on your platform. These related entities include account holders, accounts, bank accounts, shareholders, and verification-related documents. The management operations include actions such as creation, retrieval, updating, and deletion of them. For more information, refer to our [documentation](https://docs.adyen.com/marketplaces-and-platforms/classic). ## Authentication Your Adyen contact will provide your API credential and an API key. To connect to the API, add an `X-API-Key` header with the API key as the value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: YOUR_API_KEY\" \\ ... ``` Alternatively, you can use the username and password to connect to the API using basic authentication. For example: ``` curl -U \"ws@MarketPlace.YOUR_PLATFORM_ACCOUNT\":\"YOUR_WS_PASSWORD\" \\ -H \"Content-Type: application/json\" \\ ... ``` When going live, you need to generate new web service user credentials to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning The Account API supports [versioning](https://docs.adyen.com/development-resources/versioning) using a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://cal-test.adyen.com/cal/services/Account/v6/createAccountHolder ``` + * + * The version of the OpenAPI document: 6 + * + * + * 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.marketpayaccount; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.adyen.model.marketpayaccount.BankAccountDetail; +import com.adyen.model.marketpayaccount.BusinessDetails; +import com.adyen.model.marketpayaccount.IndividualDetails; +import com.adyen.model.marketpayaccount.LegalArrangementDetail; +import com.adyen.model.marketpayaccount.PayoutMethod; +import com.adyen.model.marketpayaccount.StoreDetail; +import com.adyen.model.marketpayaccount.ViasAddress; +import com.fasterxml.jackson.annotation.JsonInclude; +import 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.HashMap; +import java.util.List; +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.core.JsonProcessingException; + + +/** + * AccountHolderDetails + */ +@JsonPropertyOrder({ + AccountHolderDetails.JSON_PROPERTY_ADDRESS, + AccountHolderDetails.JSON_PROPERTY_BANK_ACCOUNT_DETAILS, + AccountHolderDetails.JSON_PROPERTY_BANK_AGGREGATOR_DATA_REFERENCE, + AccountHolderDetails.JSON_PROPERTY_BUSINESS_DETAILS, + AccountHolderDetails.JSON_PROPERTY_EMAIL, + AccountHolderDetails.JSON_PROPERTY_FULL_PHONE_NUMBER, + AccountHolderDetails.JSON_PROPERTY_INDIVIDUAL_DETAILS, + AccountHolderDetails.JSON_PROPERTY_LAST_REVIEW_DATE, + AccountHolderDetails.JSON_PROPERTY_LEGAL_ARRANGEMENTS, + AccountHolderDetails.JSON_PROPERTY_MERCHANT_CATEGORY_CODE, + AccountHolderDetails.JSON_PROPERTY_METADATA, + AccountHolderDetails.JSON_PROPERTY_PAYOUT_METHODS, + AccountHolderDetails.JSON_PROPERTY_PRINCIPAL_BUSINESS_ADDRESS, + AccountHolderDetails.JSON_PROPERTY_STORE_DETAILS, + AccountHolderDetails.JSON_PROPERTY_WEB_ADDRESS +}) + +public class AccountHolderDetails { + public static final String JSON_PROPERTY_ADDRESS = "address"; + private ViasAddress address; + + public static final String JSON_PROPERTY_BANK_ACCOUNT_DETAILS = "bankAccountDetails"; + private List bankAccountDetails = null; + + public static final String JSON_PROPERTY_BANK_AGGREGATOR_DATA_REFERENCE = "bankAggregatorDataReference"; + private String bankAggregatorDataReference; + + public static final String JSON_PROPERTY_BUSINESS_DETAILS = "businessDetails"; + private BusinessDetails businessDetails; + + public static final String JSON_PROPERTY_EMAIL = "email"; + private String email; + + public static final String JSON_PROPERTY_FULL_PHONE_NUMBER = "fullPhoneNumber"; + private String fullPhoneNumber; + + public static final String JSON_PROPERTY_INDIVIDUAL_DETAILS = "individualDetails"; + private IndividualDetails individualDetails; + + public static final String JSON_PROPERTY_LAST_REVIEW_DATE = "lastReviewDate"; + private String lastReviewDate; + + public static final String JSON_PROPERTY_LEGAL_ARRANGEMENTS = "legalArrangements"; + private List legalArrangements = null; + + public static final String JSON_PROPERTY_MERCHANT_CATEGORY_CODE = "merchantCategoryCode"; + private String merchantCategoryCode; + + public static final String JSON_PROPERTY_METADATA = "metadata"; + private Map metadata = null; + + public static final String JSON_PROPERTY_PAYOUT_METHODS = "payoutMethods"; + private List payoutMethods = null; + + public static final String JSON_PROPERTY_PRINCIPAL_BUSINESS_ADDRESS = "principalBusinessAddress"; + private ViasAddress principalBusinessAddress; + + public static final String JSON_PROPERTY_STORE_DETAILS = "storeDetails"; + private List storeDetails = null; + + public static final String JSON_PROPERTY_WEB_ADDRESS = "webAddress"; + private String webAddress; + + public AccountHolderDetails() { + } + + public AccountHolderDetails address(ViasAddress address) { + this.address = address; + return this; + } + + /** + * Get address + * @return address + **/ + @ApiModelProperty(required = true, value = "") + @JsonProperty(JSON_PROPERTY_ADDRESS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public ViasAddress getAddress() { + return address; + } + + + @JsonProperty(JSON_PROPERTY_ADDRESS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAddress(ViasAddress address) { + this.address = address; + } + + + public AccountHolderDetails bankAccountDetails(List bankAccountDetails) { + this.bankAccountDetails = bankAccountDetails; + return this; + } + + public AccountHolderDetails addBankAccountDetailsItem(BankAccountDetail bankAccountDetailsItem) { + if (this.bankAccountDetails == null) { + this.bankAccountDetails = new ArrayList<>(); + } + this.bankAccountDetails.add(bankAccountDetailsItem); + return this; + } + + /** + * Array of bank accounts associated with the account holder. For details about the required `bankAccountDetail` fields, see [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information). + * @return bankAccountDetails + **/ + @ApiModelProperty(value = "Array of bank accounts associated with the account holder. For details about the required `bankAccountDetail` fields, see [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information).") + @JsonProperty(JSON_PROPERTY_BANK_ACCOUNT_DETAILS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getBankAccountDetails() { + return bankAccountDetails; + } + + + @JsonProperty(JSON_PROPERTY_BANK_ACCOUNT_DETAILS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setBankAccountDetails(List bankAccountDetails) { + this.bankAccountDetails = bankAccountDetails; + } + + + public AccountHolderDetails bankAggregatorDataReference(String bankAggregatorDataReference) { + this.bankAggregatorDataReference = bankAggregatorDataReference; + return this; + } + + /** + * The opaque reference value returned by the Adyen API during bank account login. + * @return bankAggregatorDataReference + **/ + @ApiModelProperty(value = "The opaque reference value returned by the Adyen API during bank account login.") + @JsonProperty(JSON_PROPERTY_BANK_AGGREGATOR_DATA_REFERENCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getBankAggregatorDataReference() { + return bankAggregatorDataReference; + } + + + @JsonProperty(JSON_PROPERTY_BANK_AGGREGATOR_DATA_REFERENCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setBankAggregatorDataReference(String bankAggregatorDataReference) { + this.bankAggregatorDataReference = bankAggregatorDataReference; + } + + + public AccountHolderDetails businessDetails(BusinessDetails businessDetails) { + this.businessDetails = businessDetails; + return this; + } + + /** + * Get businessDetails + * @return businessDetails + **/ + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_BUSINESS_DETAILS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public BusinessDetails getBusinessDetails() { + return businessDetails; + } + + + @JsonProperty(JSON_PROPERTY_BUSINESS_DETAILS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setBusinessDetails(BusinessDetails businessDetails) { + this.businessDetails = businessDetails; + } + + + public AccountHolderDetails email(String email) { + this.email = email; + return this; + } + + /** + * The email address of the account holder. + * @return email + **/ + @ApiModelProperty(value = "The email address of the account holder.") + @JsonProperty(JSON_PROPERTY_EMAIL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getEmail() { + return email; + } + + + @JsonProperty(JSON_PROPERTY_EMAIL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEmail(String email) { + this.email = email; + } + + + public AccountHolderDetails fullPhoneNumber(String fullPhoneNumber) { + this.fullPhoneNumber = fullPhoneNumber; + return this; + } + + /** + * The phone number of the account holder provided as a single string. It will be handled as a landline phone. **Examples:** \"0031 6 11 22 33 44\", \"+316/1122-3344\", \"(0031) 611223344\" + * @return fullPhoneNumber + **/ + @ApiModelProperty(value = "The phone number of the account holder provided as a single string. It will be handled as a landline phone. **Examples:** \"0031 6 11 22 33 44\", \"+316/1122-3344\", \"(0031) 611223344\"") + @JsonProperty(JSON_PROPERTY_FULL_PHONE_NUMBER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getFullPhoneNumber() { + return fullPhoneNumber; + } + + + @JsonProperty(JSON_PROPERTY_FULL_PHONE_NUMBER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setFullPhoneNumber(String fullPhoneNumber) { + this.fullPhoneNumber = fullPhoneNumber; + } + + + public AccountHolderDetails individualDetails(IndividualDetails individualDetails) { + this.individualDetails = individualDetails; + return this; + } + + /** + * Get individualDetails + * @return individualDetails + **/ + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_INDIVIDUAL_DETAILS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public IndividualDetails getIndividualDetails() { + return individualDetails; + } + + + @JsonProperty(JSON_PROPERTY_INDIVIDUAL_DETAILS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setIndividualDetails(IndividualDetails individualDetails) { + this.individualDetails = individualDetails; + } + + + public AccountHolderDetails lastReviewDate(String lastReviewDate) { + this.lastReviewDate = lastReviewDate; + return this; + } + + /** + * Date when you last reviewed the account holder's information, in ISO-8601 YYYY-MM-DD format. For example, **2020-01-31**. + * @return lastReviewDate + **/ + @ApiModelProperty(value = "Date when you last reviewed the account holder's information, in ISO-8601 YYYY-MM-DD format. For example, **2020-01-31**.") + @JsonProperty(JSON_PROPERTY_LAST_REVIEW_DATE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getLastReviewDate() { + return lastReviewDate; + } + + + @JsonProperty(JSON_PROPERTY_LAST_REVIEW_DATE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setLastReviewDate(String lastReviewDate) { + this.lastReviewDate = lastReviewDate; + } + + + public AccountHolderDetails legalArrangements(List legalArrangements) { + this.legalArrangements = legalArrangements; + return this; + } + + public AccountHolderDetails addLegalArrangementsItem(LegalArrangementDetail legalArrangementsItem) { + if (this.legalArrangements == null) { + this.legalArrangements = new ArrayList<>(); + } + this.legalArrangements.add(legalArrangementsItem); + return this; + } + + /** + * An array containing information about the account holder's [legal arrangements](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/legal-arrangements). + * @return legalArrangements + **/ + @ApiModelProperty(value = "An array containing information about the account holder's [legal arrangements](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/legal-arrangements).") + @JsonProperty(JSON_PROPERTY_LEGAL_ARRANGEMENTS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getLegalArrangements() { + return legalArrangements; + } + + + @JsonProperty(JSON_PROPERTY_LEGAL_ARRANGEMENTS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setLegalArrangements(List legalArrangements) { + this.legalArrangements = legalArrangements; + } + + + public AccountHolderDetails merchantCategoryCode(String merchantCategoryCode) { + this.merchantCategoryCode = merchantCategoryCode; + return this; + } + + /** + * The Merchant Category Code of the account holder. > If not specified in the request, this will be derived from the platform account (which is configured by Adyen). + * @return merchantCategoryCode + **/ + @ApiModelProperty(value = "The Merchant Category Code of the account holder. > If not specified in the request, this will be derived from the platform account (which is configured by Adyen).") + @JsonProperty(JSON_PROPERTY_MERCHANT_CATEGORY_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getMerchantCategoryCode() { + return merchantCategoryCode; + } + + + @JsonProperty(JSON_PROPERTY_MERCHANT_CATEGORY_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMerchantCategoryCode(String merchantCategoryCode) { + this.merchantCategoryCode = merchantCategoryCode; + } + + + public AccountHolderDetails metadata(Map metadata) { + this.metadata = metadata; + return this; + } + + public AccountHolderDetails putMetadataItem(String key, String metadataItem) { + if (this.metadata == null) { + this.metadata = new HashMap<>(); + } + this.metadata.put(key, metadataItem); + return this; + } + + /** + * A set of key and value pairs for general use by the account holder or merchant. The keys do not have specific names and may be used for storing miscellaneous data as desired. > The values being stored have a maximum length of eighty (80) characters and will be truncated if necessary. > Note that during an update of metadata, the omission of existing key-value pairs will result in the deletion of those key-value pairs. + * @return metadata + **/ + @ApiModelProperty(value = "A set of key and value pairs for general use by the account holder or merchant. The keys do not have specific names and may be used for storing miscellaneous data as desired. > The values being stored have a maximum length of eighty (80) characters and will be truncated if necessary. > Note that during an update of metadata, the omission of existing key-value pairs will result in the deletion of those key-value pairs.") + @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 AccountHolderDetails payoutMethods(List payoutMethods) { + this.payoutMethods = payoutMethods; + return this; + } + + public AccountHolderDetails addPayoutMethodsItem(PayoutMethod payoutMethodsItem) { + if (this.payoutMethods == null) { + this.payoutMethods = new ArrayList<>(); + } + this.payoutMethods.add(payoutMethodsItem); + return this; + } + + /** + * Array of tokenized card details associated with the account holder. For details about how you can use the tokens to pay out, refer to [Pay out to cards](https://docs.adyen.com/marketplaces-and-platforms/classic/payout-to-cards). + * @return payoutMethods + **/ + @ApiModelProperty(value = "Array of tokenized card details associated with the account holder. For details about how you can use the tokens to pay out, refer to [Pay out to cards](https://docs.adyen.com/marketplaces-and-platforms/classic/payout-to-cards).") + @JsonProperty(JSON_PROPERTY_PAYOUT_METHODS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getPayoutMethods() { + return payoutMethods; + } + + + @JsonProperty(JSON_PROPERTY_PAYOUT_METHODS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPayoutMethods(List payoutMethods) { + this.payoutMethods = payoutMethods; + } + + + public AccountHolderDetails principalBusinessAddress(ViasAddress principalBusinessAddress) { + this.principalBusinessAddress = principalBusinessAddress; + return this; + } + + /** + * Get principalBusinessAddress + * @return principalBusinessAddress + **/ + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_PRINCIPAL_BUSINESS_ADDRESS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public ViasAddress getPrincipalBusinessAddress() { + return principalBusinessAddress; + } + + + @JsonProperty(JSON_PROPERTY_PRINCIPAL_BUSINESS_ADDRESS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPrincipalBusinessAddress(ViasAddress principalBusinessAddress) { + this.principalBusinessAddress = principalBusinessAddress; + } + + + public AccountHolderDetails storeDetails(List storeDetails) { + this.storeDetails = storeDetails; + return this; + } + + public AccountHolderDetails addStoreDetailsItem(StoreDetail storeDetailsItem) { + if (this.storeDetails == null) { + this.storeDetails = new ArrayList<>(); + } + this.storeDetails.add(storeDetailsItem); + return this; + } + + /** + * Array of stores associated with the account holder. Required when onboarding account holders that have an Adyen [point of sale](https://docs.adyen.com/marketplaces-and-platforms/classic/platforms-for-pos). + * @return storeDetails + **/ + @ApiModelProperty(value = "Array of stores associated with the account holder. Required when onboarding account holders that have an Adyen [point of sale](https://docs.adyen.com/marketplaces-and-platforms/classic/platforms-for-pos).") + @JsonProperty(JSON_PROPERTY_STORE_DETAILS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getStoreDetails() { + return storeDetails; + } + + + @JsonProperty(JSON_PROPERTY_STORE_DETAILS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setStoreDetails(List storeDetails) { + this.storeDetails = storeDetails; + } + + + public AccountHolderDetails webAddress(String webAddress) { + this.webAddress = webAddress; + return this; + } + + /** + * The URL of the website of the account holder. + * @return webAddress + **/ + @ApiModelProperty(value = "The URL of the website of the account holder.") + @JsonProperty(JSON_PROPERTY_WEB_ADDRESS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getWebAddress() { + return webAddress; + } + + + @JsonProperty(JSON_PROPERTY_WEB_ADDRESS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setWebAddress(String webAddress) { + this.webAddress = webAddress; + } + + + /** + * Return true if this AccountHolderDetails object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AccountHolderDetails accountHolderDetails = (AccountHolderDetails) o; + return Objects.equals(this.address, accountHolderDetails.address) && + Objects.equals(this.bankAccountDetails, accountHolderDetails.bankAccountDetails) && + Objects.equals(this.bankAggregatorDataReference, accountHolderDetails.bankAggregatorDataReference) && + Objects.equals(this.businessDetails, accountHolderDetails.businessDetails) && + Objects.equals(this.email, accountHolderDetails.email) && + Objects.equals(this.fullPhoneNumber, accountHolderDetails.fullPhoneNumber) && + Objects.equals(this.individualDetails, accountHolderDetails.individualDetails) && + Objects.equals(this.lastReviewDate, accountHolderDetails.lastReviewDate) && + Objects.equals(this.legalArrangements, accountHolderDetails.legalArrangements) && + Objects.equals(this.merchantCategoryCode, accountHolderDetails.merchantCategoryCode) && + Objects.equals(this.metadata, accountHolderDetails.metadata) && + Objects.equals(this.payoutMethods, accountHolderDetails.payoutMethods) && + Objects.equals(this.principalBusinessAddress, accountHolderDetails.principalBusinessAddress) && + Objects.equals(this.storeDetails, accountHolderDetails.storeDetails) && + Objects.equals(this.webAddress, accountHolderDetails.webAddress); + } + + @Override + public int hashCode() { + return Objects.hash(address, bankAccountDetails, bankAggregatorDataReference, businessDetails, email, fullPhoneNumber, individualDetails, lastReviewDate, legalArrangements, merchantCategoryCode, metadata, payoutMethods, principalBusinessAddress, storeDetails, webAddress); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AccountHolderDetails {\n"); + sb.append(" address: ").append(toIndentedString(address)).append("\n"); + sb.append(" bankAccountDetails: ").append(toIndentedString(bankAccountDetails)).append("\n"); + sb.append(" bankAggregatorDataReference: ").append(toIndentedString(bankAggregatorDataReference)).append("\n"); + sb.append(" businessDetails: ").append(toIndentedString(businessDetails)).append("\n"); + sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append(" fullPhoneNumber: ").append(toIndentedString(fullPhoneNumber)).append("\n"); + sb.append(" individualDetails: ").append(toIndentedString(individualDetails)).append("\n"); + sb.append(" lastReviewDate: ").append(toIndentedString(lastReviewDate)).append("\n"); + sb.append(" legalArrangements: ").append(toIndentedString(legalArrangements)).append("\n"); + sb.append(" merchantCategoryCode: ").append(toIndentedString(merchantCategoryCode)).append("\n"); + sb.append(" metadata: ").append(toIndentedString(metadata)).append("\n"); + sb.append(" payoutMethods: ").append(toIndentedString(payoutMethods)).append("\n"); + sb.append(" principalBusinessAddress: ").append(toIndentedString(principalBusinessAddress)).append("\n"); + sb.append(" storeDetails: ").append(toIndentedString(storeDetails)).append("\n"); + sb.append(" webAddress: ").append(toIndentedString(webAddress)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line 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 AccountHolderDetails given an JSON string + * + * @param jsonString JSON string + * @return An instance of AccountHolderDetails + * @throws JsonProcessingException if the JSON string is invalid with respect to AccountHolderDetails + */ + public static AccountHolderDetails fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, AccountHolderDetails.class); + } +/** + * Convert an instance of AccountHolderDetails 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/marketpayaccount/AccountHolderStatus.java b/src/main/java/com/adyen/model/marketpayaccount/AccountHolderStatus.java new file mode 100644 index 000000000..a231d23f1 --- /dev/null +++ b/src/main/java/com/adyen/model/marketpayaccount/AccountHolderStatus.java @@ -0,0 +1,305 @@ +/* + * Account API + * This API is used for the classic integration. If you are just starting your implementation, refer to our [new integration guide](https://docs.adyen.com/marketplaces-and-platforms) instead. The Account API provides endpoints for managing account-related entities on your platform. These related entities include account holders, accounts, bank accounts, shareholders, and verification-related documents. The management operations include actions such as creation, retrieval, updating, and deletion of them. For more information, refer to our [documentation](https://docs.adyen.com/marketplaces-and-platforms/classic). ## Authentication Your Adyen contact will provide your API credential and an API key. To connect to the API, add an `X-API-Key` header with the API key as the value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: YOUR_API_KEY\" \\ ... ``` Alternatively, you can use the username and password to connect to the API using basic authentication. For example: ``` curl -U \"ws@MarketPlace.YOUR_PLATFORM_ACCOUNT\":\"YOUR_WS_PASSWORD\" \\ -H \"Content-Type: application/json\" \\ ... ``` When going live, you need to generate new web service user credentials to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning The Account API supports [versioning](https://docs.adyen.com/development-resources/versioning) using a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://cal-test.adyen.com/cal/services/Account/v6/createAccountHolder ``` + * + * The version of the OpenAPI document: 6 + * + * + * 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.marketpayaccount; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.adyen.model.marketpayaccount.AccountEvent; +import com.adyen.model.marketpayaccount.AccountPayoutState; +import com.adyen.model.marketpayaccount.AccountProcessingState; +import com.fasterxml.jackson.annotation.JsonInclude; +import 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; + + +/** + * AccountHolderStatus + */ +@JsonPropertyOrder({ + AccountHolderStatus.JSON_PROPERTY_EVENTS, + AccountHolderStatus.JSON_PROPERTY_PAYOUT_STATE, + AccountHolderStatus.JSON_PROPERTY_PROCESSING_STATE, + AccountHolderStatus.JSON_PROPERTY_STATUS, + AccountHolderStatus.JSON_PROPERTY_STATUS_REASON +}) + +public class AccountHolderStatus { + public static final String JSON_PROPERTY_EVENTS = "events"; + private List events = null; + + public static final String JSON_PROPERTY_PAYOUT_STATE = "payoutState"; + private AccountPayoutState payoutState; + + public static final String JSON_PROPERTY_PROCESSING_STATE = "processingState"; + private AccountProcessingState processingState; + + /** + * The status of the account holder. >Permitted values: `Active`, `Inactive`, `Suspended`, `Closed`. + */ + public enum StatusEnum { + ACTIVE("Active"), + + CLOSED("Closed"), + + INACTIVE("Inactive"), + + SUSPENDED("Suspended"); + + 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_STATUS_REASON = "statusReason"; + private String statusReason; + + public AccountHolderStatus() { + } + + public AccountHolderStatus events(List events) { + this.events = events; + return this; + } + + public AccountHolderStatus addEventsItem(AccountEvent eventsItem) { + if (this.events == null) { + this.events = new ArrayList<>(); + } + this.events.add(eventsItem); + return this; + } + + /** + * A list of events scheduled for the account holder. + * @return events + **/ + @ApiModelProperty(value = "A list of events scheduled for the account holder.") + @JsonProperty(JSON_PROPERTY_EVENTS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getEvents() { + return events; + } + + + @JsonProperty(JSON_PROPERTY_EVENTS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEvents(List events) { + this.events = events; + } + + + public AccountHolderStatus payoutState(AccountPayoutState payoutState) { + this.payoutState = payoutState; + return this; + } + + /** + * Get payoutState + * @return payoutState + **/ + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_PAYOUT_STATE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public AccountPayoutState getPayoutState() { + return payoutState; + } + + + @JsonProperty(JSON_PROPERTY_PAYOUT_STATE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPayoutState(AccountPayoutState payoutState) { + this.payoutState = payoutState; + } + + + public AccountHolderStatus processingState(AccountProcessingState processingState) { + this.processingState = processingState; + return this; + } + + /** + * Get processingState + * @return processingState + **/ + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_PROCESSING_STATE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public AccountProcessingState getProcessingState() { + return processingState; + } + + + @JsonProperty(JSON_PROPERTY_PROCESSING_STATE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setProcessingState(AccountProcessingState processingState) { + this.processingState = processingState; + } + + + public AccountHolderStatus status(StatusEnum status) { + this.status = status; + return this; + } + + /** + * The status of the account holder. >Permitted values: `Active`, `Inactive`, `Suspended`, `Closed`. + * @return status + **/ + @ApiModelProperty(required = true, value = "The status of the account holder. >Permitted values: `Active`, `Inactive`, `Suspended`, `Closed`.") + @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 AccountHolderStatus statusReason(String statusReason) { + this.statusReason = statusReason; + return this; + } + + /** + * The reason why the status was assigned to the account holder. + * @return statusReason + **/ + @ApiModelProperty(value = "The reason why the status was assigned to the account holder.") + @JsonProperty(JSON_PROPERTY_STATUS_REASON) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getStatusReason() { + return statusReason; + } + + + @JsonProperty(JSON_PROPERTY_STATUS_REASON) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setStatusReason(String statusReason) { + this.statusReason = statusReason; + } + + + /** + * Return true if this AccountHolderStatus object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AccountHolderStatus accountHolderStatus = (AccountHolderStatus) o; + return Objects.equals(this.events, accountHolderStatus.events) && + Objects.equals(this.payoutState, accountHolderStatus.payoutState) && + Objects.equals(this.processingState, accountHolderStatus.processingState) && + Objects.equals(this.status, accountHolderStatus.status) && + Objects.equals(this.statusReason, accountHolderStatus.statusReason); + } + + @Override + public int hashCode() { + return Objects.hash(events, payoutState, processingState, status, statusReason); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AccountHolderStatus {\n"); + sb.append(" events: ").append(toIndentedString(events)).append("\n"); + sb.append(" payoutState: ").append(toIndentedString(payoutState)).append("\n"); + sb.append(" processingState: ").append(toIndentedString(processingState)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" statusReason: ").append(toIndentedString(statusReason)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line 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 AccountHolderStatus given an JSON string + * + * @param jsonString JSON string + * @return An instance of AccountHolderStatus + * @throws JsonProcessingException if the JSON string is invalid with respect to AccountHolderStatus + */ + public static AccountHolderStatus fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, AccountHolderStatus.class); + } +/** + * Convert an instance of AccountHolderStatus 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/marketpayaccount/AccountPayoutState.java b/src/main/java/com/adyen/model/marketpayaccount/AccountPayoutState.java new file mode 100644 index 000000000..9f4e31a3c --- /dev/null +++ b/src/main/java/com/adyen/model/marketpayaccount/AccountPayoutState.java @@ -0,0 +1,285 @@ +/* + * Account API + * This API is used for the classic integration. If you are just starting your implementation, refer to our [new integration guide](https://docs.adyen.com/marketplaces-and-platforms) instead. The Account API provides endpoints for managing account-related entities on your platform. These related entities include account holders, accounts, bank accounts, shareholders, and verification-related documents. The management operations include actions such as creation, retrieval, updating, and deletion of them. For more information, refer to our [documentation](https://docs.adyen.com/marketplaces-and-platforms/classic). ## Authentication Your Adyen contact will provide your API credential and an API key. To connect to the API, add an `X-API-Key` header with the API key as the value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: YOUR_API_KEY\" \\ ... ``` Alternatively, you can use the username and password to connect to the API using basic authentication. For example: ``` curl -U \"ws@MarketPlace.YOUR_PLATFORM_ACCOUNT\":\"YOUR_WS_PASSWORD\" \\ -H \"Content-Type: application/json\" \\ ... ``` When going live, you need to generate new web service user credentials to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning The Account API supports [versioning](https://docs.adyen.com/development-resources/versioning) using a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://cal-test.adyen.com/cal/services/Account/v6/createAccountHolder ``` + * + * The version of the OpenAPI document: 6 + * + * + * 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.marketpayaccount; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.adyen.model.marketpayaccount.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; + + +/** + * AccountPayoutState + */ +@JsonPropertyOrder({ + AccountPayoutState.JSON_PROPERTY_ALLOW_PAYOUT, + AccountPayoutState.JSON_PROPERTY_DISABLE_REASON, + AccountPayoutState.JSON_PROPERTY_DISABLED, + AccountPayoutState.JSON_PROPERTY_NOT_ALLOWED_REASON, + AccountPayoutState.JSON_PROPERTY_PAYOUT_LIMIT, + AccountPayoutState.JSON_PROPERTY_TIER_NUMBER +}) + +public class AccountPayoutState { + public static final String JSON_PROPERTY_ALLOW_PAYOUT = "allowPayout"; + private Boolean allowPayout; + + public static final String JSON_PROPERTY_DISABLE_REASON = "disableReason"; + private String disableReason; + + public static final String JSON_PROPERTY_DISABLED = "disabled"; + private Boolean disabled; + + public static final String JSON_PROPERTY_NOT_ALLOWED_REASON = "notAllowedReason"; + private String notAllowedReason; + + public static final String JSON_PROPERTY_PAYOUT_LIMIT = "payoutLimit"; + private Amount payoutLimit; + + public static final String JSON_PROPERTY_TIER_NUMBER = "tierNumber"; + private Integer tierNumber; + + public AccountPayoutState() { + } + + public AccountPayoutState allowPayout(Boolean allowPayout) { + this.allowPayout = allowPayout; + return this; + } + + /** + * Indicates whether payouts are allowed. This field is the overarching payout status, and is the aggregate of multiple conditions (e.g., KYC status, disabled flag, etc). If this field is false, no payouts will be permitted for any of the account holder's accounts. If this field is true, payouts will be permitted for any of the account holder's accounts. + * @return allowPayout + **/ + @ApiModelProperty(value = "Indicates whether payouts are allowed. This field is the overarching payout status, and is the aggregate of multiple conditions (e.g., KYC status, disabled flag, etc). If this field is false, no payouts will be permitted for any of the account holder's accounts. If this field is true, payouts will be permitted for any of the account holder's accounts.") + @JsonProperty(JSON_PROPERTY_ALLOW_PAYOUT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getAllowPayout() { + return allowPayout; + } + + + @JsonProperty(JSON_PROPERTY_ALLOW_PAYOUT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAllowPayout(Boolean allowPayout) { + this.allowPayout = allowPayout; + } + + + public AccountPayoutState disableReason(String disableReason) { + this.disableReason = disableReason; + return this; + } + + /** + * The reason why payouts (to all of the account holder's accounts) have been disabled (by the platform). If the `disabled` field is true, this field can be used to explain why. + * @return disableReason + **/ + @ApiModelProperty(value = "The reason why payouts (to all of the account holder's accounts) have been disabled (by the platform). If the `disabled` field is true, this field can be used to explain why.") + @JsonProperty(JSON_PROPERTY_DISABLE_REASON) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getDisableReason() { + return disableReason; + } + + + @JsonProperty(JSON_PROPERTY_DISABLE_REASON) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDisableReason(String disableReason) { + this.disableReason = disableReason; + } + + + public AccountPayoutState disabled(Boolean disabled) { + this.disabled = disabled; + return this; + } + + /** + * Indicates whether payouts have been disabled (by the platform) for all of the account holder's accounts. A platform may enable and disable this field at their discretion. If this field is true, `allowPayout` will be false and no payouts will be permitted for any of the account holder's accounts. If this field is false, `allowPayout` may or may not be enabled, depending on other factors. + * @return disabled + **/ + @ApiModelProperty(value = "Indicates whether payouts have been disabled (by the platform) for all of the account holder's accounts. A platform may enable and disable this field at their discretion. If this field is true, `allowPayout` will be false and no payouts will be permitted for any of the account holder's accounts. If this field is false, `allowPayout` may or may not be enabled, depending on other factors.") + @JsonProperty(JSON_PROPERTY_DISABLED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getDisabled() { + return disabled; + } + + + @JsonProperty(JSON_PROPERTY_DISABLED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDisabled(Boolean disabled) { + this.disabled = disabled; + } + + + public AccountPayoutState notAllowedReason(String notAllowedReason) { + this.notAllowedReason = notAllowedReason; + return this; + } + + /** + * The reason why payouts (to all of the account holder's accounts) have been disabled (by Adyen). If payouts have been disabled by Adyen, this field will explain why. If this field is blank, payouts have not been disabled by Adyen. + * @return notAllowedReason + **/ + @ApiModelProperty(value = "The reason why payouts (to all of the account holder's accounts) have been disabled (by Adyen). If payouts have been disabled by Adyen, this field will explain why. If this field is blank, payouts have not been disabled by Adyen.") + @JsonProperty(JSON_PROPERTY_NOT_ALLOWED_REASON) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getNotAllowedReason() { + return notAllowedReason; + } + + + @JsonProperty(JSON_PROPERTY_NOT_ALLOWED_REASON) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setNotAllowedReason(String notAllowedReason) { + this.notAllowedReason = notAllowedReason; + } + + + public AccountPayoutState payoutLimit(Amount payoutLimit) { + this.payoutLimit = payoutLimit; + return this; + } + + /** + * Get payoutLimit + * @return payoutLimit + **/ + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_PAYOUT_LIMIT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Amount getPayoutLimit() { + return payoutLimit; + } + + + @JsonProperty(JSON_PROPERTY_PAYOUT_LIMIT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPayoutLimit(Amount payoutLimit) { + this.payoutLimit = payoutLimit; + } + + + public AccountPayoutState tierNumber(Integer tierNumber) { + this.tierNumber = tierNumber; + return this; + } + + /** + * The payout tier that the account holder occupies. + * @return tierNumber + **/ + @ApiModelProperty(value = "The payout tier that the account holder occupies.") + @JsonProperty(JSON_PROPERTY_TIER_NUMBER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Integer getTierNumber() { + return tierNumber; + } + + + @JsonProperty(JSON_PROPERTY_TIER_NUMBER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTierNumber(Integer tierNumber) { + this.tierNumber = tierNumber; + } + + + /** + * Return true if this AccountPayoutState object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AccountPayoutState accountPayoutState = (AccountPayoutState) o; + return Objects.equals(this.allowPayout, accountPayoutState.allowPayout) && + Objects.equals(this.disableReason, accountPayoutState.disableReason) && + Objects.equals(this.disabled, accountPayoutState.disabled) && + Objects.equals(this.notAllowedReason, accountPayoutState.notAllowedReason) && + Objects.equals(this.payoutLimit, accountPayoutState.payoutLimit) && + Objects.equals(this.tierNumber, accountPayoutState.tierNumber); + } + + @Override + public int hashCode() { + return Objects.hash(allowPayout, disableReason, disabled, notAllowedReason, payoutLimit, tierNumber); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AccountPayoutState {\n"); + sb.append(" allowPayout: ").append(toIndentedString(allowPayout)).append("\n"); + sb.append(" disableReason: ").append(toIndentedString(disableReason)).append("\n"); + sb.append(" disabled: ").append(toIndentedString(disabled)).append("\n"); + sb.append(" notAllowedReason: ").append(toIndentedString(notAllowedReason)).append("\n"); + sb.append(" payoutLimit: ").append(toIndentedString(payoutLimit)).append("\n"); + sb.append(" tierNumber: ").append(toIndentedString(tierNumber)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line 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 AccountPayoutState given an JSON string + * + * @param jsonString JSON string + * @return An instance of AccountPayoutState + * @throws JsonProcessingException if the JSON string is invalid with respect to AccountPayoutState + */ + public static AccountPayoutState fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, AccountPayoutState.class); + } +/** + * Convert an instance of AccountPayoutState 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/marketpayaccount/AccountProcessingState.java b/src/main/java/com/adyen/model/marketpayaccount/AccountProcessingState.java new file mode 100644 index 000000000..a6d32daa7 --- /dev/null +++ b/src/main/java/com/adyen/model/marketpayaccount/AccountProcessingState.java @@ -0,0 +1,254 @@ +/* + * Account API + * This API is used for the classic integration. If you are just starting your implementation, refer to our [new integration guide](https://docs.adyen.com/marketplaces-and-platforms) instead. The Account API provides endpoints for managing account-related entities on your platform. These related entities include account holders, accounts, bank accounts, shareholders, and verification-related documents. The management operations include actions such as creation, retrieval, updating, and deletion of them. For more information, refer to our [documentation](https://docs.adyen.com/marketplaces-and-platforms/classic). ## Authentication Your Adyen contact will provide your API credential and an API key. To connect to the API, add an `X-API-Key` header with the API key as the value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: YOUR_API_KEY\" \\ ... ``` Alternatively, you can use the username and password to connect to the API using basic authentication. For example: ``` curl -U \"ws@MarketPlace.YOUR_PLATFORM_ACCOUNT\":\"YOUR_WS_PASSWORD\" \\ -H \"Content-Type: application/json\" \\ ... ``` When going live, you need to generate new web service user credentials to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning The Account API supports [versioning](https://docs.adyen.com/development-resources/versioning) using a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://cal-test.adyen.com/cal/services/Account/v6/createAccountHolder ``` + * + * The version of the OpenAPI document: 6 + * + * + * 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.marketpayaccount; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.adyen.model.marketpayaccount.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; + + +/** + * AccountProcessingState + */ +@JsonPropertyOrder({ + AccountProcessingState.JSON_PROPERTY_DISABLE_REASON, + AccountProcessingState.JSON_PROPERTY_DISABLED, + AccountProcessingState.JSON_PROPERTY_PROCESSED_FROM, + AccountProcessingState.JSON_PROPERTY_PROCESSED_TO, + AccountProcessingState.JSON_PROPERTY_TIER_NUMBER +}) + +public class AccountProcessingState { + public static final String JSON_PROPERTY_DISABLE_REASON = "disableReason"; + private String disableReason; + + public static final String JSON_PROPERTY_DISABLED = "disabled"; + private Boolean disabled; + + public static final String JSON_PROPERTY_PROCESSED_FROM = "processedFrom"; + private Amount processedFrom; + + public static final String JSON_PROPERTY_PROCESSED_TO = "processedTo"; + private Amount processedTo; + + public static final String JSON_PROPERTY_TIER_NUMBER = "tierNumber"; + private Integer tierNumber; + + public AccountProcessingState() { + } + + public AccountProcessingState disableReason(String disableReason) { + this.disableReason = disableReason; + return this; + } + + /** + * The reason why processing has been disabled. + * @return disableReason + **/ + @ApiModelProperty(value = "The reason why processing has been disabled.") + @JsonProperty(JSON_PROPERTY_DISABLE_REASON) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getDisableReason() { + return disableReason; + } + + + @JsonProperty(JSON_PROPERTY_DISABLE_REASON) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDisableReason(String disableReason) { + this.disableReason = disableReason; + } + + + public AccountProcessingState disabled(Boolean disabled) { + this.disabled = disabled; + return this; + } + + /** + * Indicates whether the processing of payments is allowed. + * @return disabled + **/ + @ApiModelProperty(value = "Indicates whether the processing of payments is allowed.") + @JsonProperty(JSON_PROPERTY_DISABLED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getDisabled() { + return disabled; + } + + + @JsonProperty(JSON_PROPERTY_DISABLED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDisabled(Boolean disabled) { + this.disabled = disabled; + } + + + public AccountProcessingState processedFrom(Amount processedFrom) { + this.processedFrom = processedFrom; + return this; + } + + /** + * Get processedFrom + * @return processedFrom + **/ + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_PROCESSED_FROM) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Amount getProcessedFrom() { + return processedFrom; + } + + + @JsonProperty(JSON_PROPERTY_PROCESSED_FROM) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setProcessedFrom(Amount processedFrom) { + this.processedFrom = processedFrom; + } + + + public AccountProcessingState processedTo(Amount processedTo) { + this.processedTo = processedTo; + return this; + } + + /** + * Get processedTo + * @return processedTo + **/ + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_PROCESSED_TO) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Amount getProcessedTo() { + return processedTo; + } + + + @JsonProperty(JSON_PROPERTY_PROCESSED_TO) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setProcessedTo(Amount processedTo) { + this.processedTo = processedTo; + } + + + public AccountProcessingState tierNumber(Integer tierNumber) { + this.tierNumber = tierNumber; + return this; + } + + /** + * The processing tier that the account holder occupies. + * @return tierNumber + **/ + @ApiModelProperty(value = "The processing tier that the account holder occupies.") + @JsonProperty(JSON_PROPERTY_TIER_NUMBER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Integer getTierNumber() { + return tierNumber; + } + + + @JsonProperty(JSON_PROPERTY_TIER_NUMBER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTierNumber(Integer tierNumber) { + this.tierNumber = tierNumber; + } + + + /** + * Return true if this AccountProcessingState object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AccountProcessingState accountProcessingState = (AccountProcessingState) o; + return Objects.equals(this.disableReason, accountProcessingState.disableReason) && + Objects.equals(this.disabled, accountProcessingState.disabled) && + Objects.equals(this.processedFrom, accountProcessingState.processedFrom) && + Objects.equals(this.processedTo, accountProcessingState.processedTo) && + Objects.equals(this.tierNumber, accountProcessingState.tierNumber); + } + + @Override + public int hashCode() { + return Objects.hash(disableReason, disabled, processedFrom, processedTo, tierNumber); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AccountProcessingState {\n"); + sb.append(" disableReason: ").append(toIndentedString(disableReason)).append("\n"); + sb.append(" disabled: ").append(toIndentedString(disabled)).append("\n"); + sb.append(" processedFrom: ").append(toIndentedString(processedFrom)).append("\n"); + sb.append(" processedTo: ").append(toIndentedString(processedTo)).append("\n"); + sb.append(" tierNumber: ").append(toIndentedString(tierNumber)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line 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 AccountProcessingState given an JSON string + * + * @param jsonString JSON string + * @return An instance of AccountProcessingState + * @throws JsonProcessingException if the JSON string is invalid with respect to AccountProcessingState + */ + public static AccountProcessingState fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, AccountProcessingState.class); + } +/** + * Convert an instance of AccountProcessingState 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/marketpayaccount/Amount.java b/src/main/java/com/adyen/model/marketpayaccount/Amount.java new file mode 100644 index 000000000..fafa2ae62 --- /dev/null +++ b/src/main/java/com/adyen/model/marketpayaccount/Amount.java @@ -0,0 +1,160 @@ +/* + * Account API + * This API is used for the classic integration. If you are just starting your implementation, refer to our [new integration guide](https://docs.adyen.com/marketplaces-and-platforms) instead. The Account API provides endpoints for managing account-related entities on your platform. These related entities include account holders, accounts, bank accounts, shareholders, and verification-related documents. The management operations include actions such as creation, retrieval, updating, and deletion of them. For more information, refer to our [documentation](https://docs.adyen.com/marketplaces-and-platforms/classic). ## Authentication Your Adyen contact will provide your API credential and an API key. To connect to the API, add an `X-API-Key` header with the API key as the value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: YOUR_API_KEY\" \\ ... ``` Alternatively, you can use the username and password to connect to the API using basic authentication. For example: ``` curl -U \"ws@MarketPlace.YOUR_PLATFORM_ACCOUNT\":\"YOUR_WS_PASSWORD\" \\ -H \"Content-Type: application/json\" \\ ... ``` When going live, you need to generate new web service user credentials to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning The Account API supports [versioning](https://docs.adyen.com/development-resources/versioning) using a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://cal-test.adyen.com/cal/services/Account/v6/createAccountHolder ``` + * + * The version of the OpenAPI document: 6 + * + * + * 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.marketpayaccount; + +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; + + +/** + * Amount + */ +@JsonPropertyOrder({ + Amount.JSON_PROPERTY_CURRENCY, + Amount.JSON_PROPERTY_VALUE +}) + +public class Amount { + public static final String JSON_PROPERTY_CURRENCY = "currency"; + private String currency; + + public static final String JSON_PROPERTY_VALUE = "value"; + private Long value; + + public Amount() { + } + + public Amount currency(String currency) { + this.currency = currency; + return this; + } + + /** + * The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes). + * @return currency + **/ + @ApiModelProperty(required = true, value = "The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes).") + @JsonProperty(JSON_PROPERTY_CURRENCY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getCurrency() { + return currency; + } + + + @JsonProperty(JSON_PROPERTY_CURRENCY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCurrency(String currency) { + this.currency = currency; + } + + + public Amount value(Long value) { + this.value = value; + return this; + } + + /** + * The amount of the transaction, in [minor units](https://docs.adyen.com/development-resources/currency-codes). + * @return value + **/ + @ApiModelProperty(required = true, value = "The amount of the transaction, in [minor units](https://docs.adyen.com/development-resources/currency-codes).") + @JsonProperty(JSON_PROPERTY_VALUE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Long getValue() { + return value; + } + + + @JsonProperty(JSON_PROPERTY_VALUE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setValue(Long value) { + this.value = value; + } + + + /** + * Return true if this Amount object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Amount amount = (Amount) o; + return Objects.equals(this.currency, amount.currency) && + Objects.equals(this.value, amount.value); + } + + @Override + public int hashCode() { + return Objects.hash(currency, value); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Amount {\n"); + sb.append(" currency: ").append(toIndentedString(currency)).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 Amount given an JSON string + * + * @param jsonString JSON string + * @return An instance of Amount + * @throws JsonProcessingException if the JSON string is invalid with respect to Amount + */ + public static Amount fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, Amount.class); + } +/** + * Convert an instance of Amount 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/marketpayaccount/BankAccountDetail.java b/src/main/java/com/adyen/model/marketpayaccount/BankAccountDetail.java new file mode 100644 index 000000000..c7b0648a8 --- /dev/null +++ b/src/main/java/com/adyen/model/marketpayaccount/BankAccountDetail.java @@ -0,0 +1,907 @@ +/* + * Account API + * This API is used for the classic integration. If you are just starting your implementation, refer to our [new integration guide](https://docs.adyen.com/marketplaces-and-platforms) instead. The Account API provides endpoints for managing account-related entities on your platform. These related entities include account holders, accounts, bank accounts, shareholders, and verification-related documents. The management operations include actions such as creation, retrieval, updating, and deletion of them. For more information, refer to our [documentation](https://docs.adyen.com/marketplaces-and-platforms/classic). ## Authentication Your Adyen contact will provide your API credential and an API key. To connect to the API, add an `X-API-Key` header with the API key as the value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: YOUR_API_KEY\" \\ ... ``` Alternatively, you can use the username and password to connect to the API using basic authentication. For example: ``` curl -U \"ws@MarketPlace.YOUR_PLATFORM_ACCOUNT\":\"YOUR_WS_PASSWORD\" \\ -H \"Content-Type: application/json\" \\ ... ``` When going live, you need to generate new web service user credentials to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning The Account API supports [versioning](https://docs.adyen.com/development-resources/versioning) using a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://cal-test.adyen.com/cal/services/Account/v6/createAccountHolder ``` + * + * The version of the OpenAPI document: 6 + * + * + * 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.marketpayaccount; + +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; + + +/** + * BankAccountDetail + */ +@JsonPropertyOrder({ + BankAccountDetail.JSON_PROPERTY_ACCOUNT_NUMBER, + BankAccountDetail.JSON_PROPERTY_ACCOUNT_TYPE, + BankAccountDetail.JSON_PROPERTY_BANK_ACCOUNT_NAME, + BankAccountDetail.JSON_PROPERTY_BANK_ACCOUNT_REFERENCE, + BankAccountDetail.JSON_PROPERTY_BANK_ACCOUNT_U_U_I_D, + BankAccountDetail.JSON_PROPERTY_BANK_BIC_SWIFT, + BankAccountDetail.JSON_PROPERTY_BANK_CITY, + BankAccountDetail.JSON_PROPERTY_BANK_CODE, + BankAccountDetail.JSON_PROPERTY_BANK_NAME, + BankAccountDetail.JSON_PROPERTY_BRANCH_CODE, + BankAccountDetail.JSON_PROPERTY_CHECK_CODE, + BankAccountDetail.JSON_PROPERTY_COUNTRY_CODE, + BankAccountDetail.JSON_PROPERTY_CURRENCY_CODE, + BankAccountDetail.JSON_PROPERTY_IBAN, + BankAccountDetail.JSON_PROPERTY_OWNER_CITY, + BankAccountDetail.JSON_PROPERTY_OWNER_COUNTRY_CODE, + BankAccountDetail.JSON_PROPERTY_OWNER_DATE_OF_BIRTH, + BankAccountDetail.JSON_PROPERTY_OWNER_HOUSE_NUMBER_OR_NAME, + BankAccountDetail.JSON_PROPERTY_OWNER_NAME, + BankAccountDetail.JSON_PROPERTY_OWNER_NATIONALITY, + BankAccountDetail.JSON_PROPERTY_OWNER_POSTAL_CODE, + BankAccountDetail.JSON_PROPERTY_OWNER_STATE, + BankAccountDetail.JSON_PROPERTY_OWNER_STREET, + BankAccountDetail.JSON_PROPERTY_PRIMARY_ACCOUNT, + BankAccountDetail.JSON_PROPERTY_TAX_ID, + BankAccountDetail.JSON_PROPERTY_URL_FOR_VERIFICATION +}) + +public class BankAccountDetail { + public static final String JSON_PROPERTY_ACCOUNT_NUMBER = "accountNumber"; + private String accountNumber; + + public static final String JSON_PROPERTY_ACCOUNT_TYPE = "accountType"; + private String accountType; + + public static final String JSON_PROPERTY_BANK_ACCOUNT_NAME = "bankAccountName"; + private String bankAccountName; + + public static final String JSON_PROPERTY_BANK_ACCOUNT_REFERENCE = "bankAccountReference"; + private String bankAccountReference; + + public static final String JSON_PROPERTY_BANK_ACCOUNT_U_U_I_D = "bankAccountUUID"; + private String bankAccountUUID; + + public static final String JSON_PROPERTY_BANK_BIC_SWIFT = "bankBicSwift"; + private String bankBicSwift; + + public static final String JSON_PROPERTY_BANK_CITY = "bankCity"; + private String bankCity; + + public static final String JSON_PROPERTY_BANK_CODE = "bankCode"; + private String bankCode; + + public static final String JSON_PROPERTY_BANK_NAME = "bankName"; + private String bankName; + + public static final String JSON_PROPERTY_BRANCH_CODE = "branchCode"; + private String branchCode; + + public static final String JSON_PROPERTY_CHECK_CODE = "checkCode"; + private String checkCode; + + public static final String JSON_PROPERTY_COUNTRY_CODE = "countryCode"; + private String countryCode; + + public static final String JSON_PROPERTY_CURRENCY_CODE = "currencyCode"; + private String currencyCode; + + public static final String JSON_PROPERTY_IBAN = "iban"; + private String iban; + + public static final String JSON_PROPERTY_OWNER_CITY = "ownerCity"; + private String ownerCity; + + public static final String JSON_PROPERTY_OWNER_COUNTRY_CODE = "ownerCountryCode"; + private String ownerCountryCode; + + public static final String JSON_PROPERTY_OWNER_DATE_OF_BIRTH = "ownerDateOfBirth"; + private String ownerDateOfBirth; + + public static final String JSON_PROPERTY_OWNER_HOUSE_NUMBER_OR_NAME = "ownerHouseNumberOrName"; + private String ownerHouseNumberOrName; + + public static final String JSON_PROPERTY_OWNER_NAME = "ownerName"; + private String ownerName; + + public static final String JSON_PROPERTY_OWNER_NATIONALITY = "ownerNationality"; + private String ownerNationality; + + public static final String JSON_PROPERTY_OWNER_POSTAL_CODE = "ownerPostalCode"; + private String ownerPostalCode; + + public static final String JSON_PROPERTY_OWNER_STATE = "ownerState"; + private String ownerState; + + public static final String JSON_PROPERTY_OWNER_STREET = "ownerStreet"; + private String ownerStreet; + + public static final String JSON_PROPERTY_PRIMARY_ACCOUNT = "primaryAccount"; + private Boolean primaryAccount; + + public static final String JSON_PROPERTY_TAX_ID = "taxId"; + private String taxId; + + public static final String JSON_PROPERTY_URL_FOR_VERIFICATION = "urlForVerification"; + private String urlForVerification; + + public BankAccountDetail() { + } + + public BankAccountDetail accountNumber(String accountNumber) { + this.accountNumber = accountNumber; + return this; + } + + /** + * The bank account number (without separators). >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements. + * @return accountNumber + **/ + @ApiModelProperty(value = "The bank account number (without separators). >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements.") + @JsonProperty(JSON_PROPERTY_ACCOUNT_NUMBER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getAccountNumber() { + return accountNumber; + } + + + @JsonProperty(JSON_PROPERTY_ACCOUNT_NUMBER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAccountNumber(String accountNumber) { + this.accountNumber = accountNumber; + } + + + public BankAccountDetail accountType(String accountType) { + this.accountType = accountType; + return this; + } + + /** + * The type of bank account. Only applicable to bank accounts held in the USA. The permitted values are: `checking`, `savings`. >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements. + * @return accountType + **/ + @ApiModelProperty(value = "The type of bank account. Only applicable to bank accounts held in the USA. The permitted values are: `checking`, `savings`. >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements.") + @JsonProperty(JSON_PROPERTY_ACCOUNT_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getAccountType() { + return accountType; + } + + + @JsonProperty(JSON_PROPERTY_ACCOUNT_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAccountType(String accountType) { + this.accountType = accountType; + } + + + public BankAccountDetail bankAccountName(String bankAccountName) { + this.bankAccountName = bankAccountName; + return this; + } + + /** + * The name of the bank account. + * @return bankAccountName + **/ + @ApiModelProperty(value = "The name of the bank account.") + @JsonProperty(JSON_PROPERTY_BANK_ACCOUNT_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getBankAccountName() { + return bankAccountName; + } + + + @JsonProperty(JSON_PROPERTY_BANK_ACCOUNT_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setBankAccountName(String bankAccountName) { + this.bankAccountName = bankAccountName; + } + + + public BankAccountDetail bankAccountReference(String bankAccountReference) { + this.bankAccountReference = bankAccountReference; + return this; + } + + /** + * Merchant reference to the bank account. + * @return bankAccountReference + **/ + @ApiModelProperty(value = "Merchant reference to the bank account.") + @JsonProperty(JSON_PROPERTY_BANK_ACCOUNT_REFERENCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getBankAccountReference() { + return bankAccountReference; + } + + + @JsonProperty(JSON_PROPERTY_BANK_ACCOUNT_REFERENCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setBankAccountReference(String bankAccountReference) { + this.bankAccountReference = bankAccountReference; + } + + + public BankAccountDetail bankAccountUUID(String bankAccountUUID) { + this.bankAccountUUID = bankAccountUUID; + return this; + } + + /** + * The unique identifier (UUID) of the Bank Account. >If, during an account holder create or update request, this field is left blank (but other fields provided), a new Bank Account will be created with a procedurally-generated UUID. >If, during an account holder create request, a UUID is provided, the creation of the Bank Account will fail while the creation of the account holder will continue. >If, during an account holder update request, a UUID that is not correlated with an existing Bank Account is provided, the update of the account holder will fail. >If, during an account holder update request, a UUID that is correlated with an existing Bank Account is provided, the existing Bank Account will be updated. + * @return bankAccountUUID + **/ + @ApiModelProperty(value = "The unique identifier (UUID) of the Bank Account. >If, during an account holder create or update request, this field is left blank (but other fields provided), a new Bank Account will be created with a procedurally-generated UUID. >If, during an account holder create request, a UUID is provided, the creation of the Bank Account will fail while the creation of the account holder will continue. >If, during an account holder update request, a UUID that is not correlated with an existing Bank Account is provided, the update of the account holder will fail. >If, during an account holder update request, a UUID that is correlated with an existing Bank Account is provided, the existing Bank Account will be updated. ") + @JsonProperty(JSON_PROPERTY_BANK_ACCOUNT_U_U_I_D) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getBankAccountUUID() { + return bankAccountUUID; + } + + + @JsonProperty(JSON_PROPERTY_BANK_ACCOUNT_U_U_I_D) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setBankAccountUUID(String bankAccountUUID) { + this.bankAccountUUID = bankAccountUUID; + } + + + public BankAccountDetail bankBicSwift(String bankBicSwift) { + this.bankBicSwift = bankBicSwift; + return this; + } + + /** + * The bank identifier code. >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements. + * @return bankBicSwift + **/ + @ApiModelProperty(value = "The bank identifier code. >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements.") + @JsonProperty(JSON_PROPERTY_BANK_BIC_SWIFT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getBankBicSwift() { + return bankBicSwift; + } + + + @JsonProperty(JSON_PROPERTY_BANK_BIC_SWIFT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setBankBicSwift(String bankBicSwift) { + this.bankBicSwift = bankBicSwift; + } + + + public BankAccountDetail bankCity(String bankCity) { + this.bankCity = bankCity; + return this; + } + + /** + * The city in which the bank branch is located. >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements. + * @return bankCity + **/ + @ApiModelProperty(value = "The city in which the bank branch is located. >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements.") + @JsonProperty(JSON_PROPERTY_BANK_CITY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getBankCity() { + return bankCity; + } + + + @JsonProperty(JSON_PROPERTY_BANK_CITY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setBankCity(String bankCity) { + this.bankCity = bankCity; + } + + + public BankAccountDetail bankCode(String bankCode) { + this.bankCode = bankCode; + return this; + } + + /** + * The bank code of the banking institution with which the bank account is registered. >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements. + * @return bankCode + **/ + @ApiModelProperty(value = "The bank code of the banking institution with which the bank account is registered. >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements.") + @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 BankAccountDetail bankName(String bankName) { + this.bankName = bankName; + return this; + } + + /** + * The name of the banking institution with which the bank account is held. >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements. + * @return bankName + **/ + @ApiModelProperty(value = "The name of the banking institution with which the bank account is held. >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements.") + @JsonProperty(JSON_PROPERTY_BANK_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getBankName() { + return bankName; + } + + + @JsonProperty(JSON_PROPERTY_BANK_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setBankName(String bankName) { + this.bankName = bankName; + } + + + public BankAccountDetail branchCode(String branchCode) { + this.branchCode = branchCode; + return this; + } + + /** + * The branch code of the branch under which the bank account is registered. The value to be specified in this parameter depends on the country of the bank account: * United States - Routing number * United Kingdom - Sort code * Germany - Bankleitzahl >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements. + * @return branchCode + **/ + @ApiModelProperty(value = "The branch code of the branch under which the bank account is registered. The value to be specified in this parameter depends on the country of the bank account: * United States - Routing number * United Kingdom - Sort code * Germany - Bankleitzahl >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements.") + @JsonProperty(JSON_PROPERTY_BRANCH_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getBranchCode() { + return branchCode; + } + + + @JsonProperty(JSON_PROPERTY_BRANCH_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setBranchCode(String branchCode) { + this.branchCode = branchCode; + } + + + public BankAccountDetail checkCode(String checkCode) { + this.checkCode = checkCode; + return this; + } + + /** + * The check code of the bank account. >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements. + * @return checkCode + **/ + @ApiModelProperty(value = "The check code of the bank account. >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements.") + @JsonProperty(JSON_PROPERTY_CHECK_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getCheckCode() { + return checkCode; + } + + + @JsonProperty(JSON_PROPERTY_CHECK_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCheckCode(String checkCode) { + this.checkCode = checkCode; + } + + + public BankAccountDetail countryCode(String countryCode) { + this.countryCode = countryCode; + return this; + } + + /** + * The two-letter country code in which the bank account is registered. >The permitted country codes are defined in ISO-3166-1 alpha-2 (e.g. 'NL'). >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements. + * @return countryCode + **/ + @ApiModelProperty(value = "The two-letter country code in which the bank account is registered. >The permitted country codes are defined in ISO-3166-1 alpha-2 (e.g. 'NL'). >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements.") + @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 BankAccountDetail currencyCode(String currencyCode) { + this.currencyCode = currencyCode; + return this; + } + + /** + * The currency in which the bank account deals. >The permitted currency codes are defined in ISO-4217 (e.g. 'EUR'). + * @return currencyCode + **/ + @ApiModelProperty(value = "The currency in which the bank account deals. >The permitted currency codes are defined in ISO-4217 (e.g. 'EUR'). ") + @JsonProperty(JSON_PROPERTY_CURRENCY_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getCurrencyCode() { + return currencyCode; + } + + + @JsonProperty(JSON_PROPERTY_CURRENCY_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCurrencyCode(String currencyCode) { + this.currencyCode = currencyCode; + } + + + public BankAccountDetail iban(String iban) { + this.iban = iban; + return this; + } + + /** + * The international bank account number. >The IBAN standard is defined in ISO-13616. >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements. + * @return iban + **/ + @ApiModelProperty(value = "The international bank account number. >The IBAN standard is defined in ISO-13616. >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements.") + @JsonProperty(JSON_PROPERTY_IBAN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getIban() { + return iban; + } + + + @JsonProperty(JSON_PROPERTY_IBAN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setIban(String iban) { + this.iban = iban; + } + + + public BankAccountDetail ownerCity(String ownerCity) { + this.ownerCity = ownerCity; + return this; + } + + /** + * The city of residence of the bank account owner. >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements. + * @return ownerCity + **/ + @ApiModelProperty(value = "The city of residence of the bank account owner. >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements.") + @JsonProperty(JSON_PROPERTY_OWNER_CITY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getOwnerCity() { + return ownerCity; + } + + + @JsonProperty(JSON_PROPERTY_OWNER_CITY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setOwnerCity(String ownerCity) { + this.ownerCity = ownerCity; + } + + + public BankAccountDetail ownerCountryCode(String ownerCountryCode) { + this.ownerCountryCode = ownerCountryCode; + return this; + } + + /** + * The country code of the country of residence of the bank account owner. >The permitted country codes are defined in ISO-3166-1 alpha-2 (e.g. 'NL'). >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements. + * @return ownerCountryCode + **/ + @ApiModelProperty(value = "The country code of the country of residence of the bank account owner. >The permitted country codes are defined in ISO-3166-1 alpha-2 (e.g. 'NL'). >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements.") + @JsonProperty(JSON_PROPERTY_OWNER_COUNTRY_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getOwnerCountryCode() { + return ownerCountryCode; + } + + + @JsonProperty(JSON_PROPERTY_OWNER_COUNTRY_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setOwnerCountryCode(String ownerCountryCode) { + this.ownerCountryCode = ownerCountryCode; + } + + + public BankAccountDetail ownerDateOfBirth(String ownerDateOfBirth) { + this.ownerDateOfBirth = ownerDateOfBirth; + return this; + } + + /** + * The date of birth of the bank account owner. The date should be in ISO-8601 format yyyy-mm-dd (e.g. 2000-01-31). + * @return ownerDateOfBirth + * @deprecated + **/ + @Deprecated + @ApiModelProperty(value = "The date of birth of the bank account owner. The date should be in ISO-8601 format yyyy-mm-dd (e.g. 2000-01-31).") + @JsonProperty(JSON_PROPERTY_OWNER_DATE_OF_BIRTH) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getOwnerDateOfBirth() { + return ownerDateOfBirth; + } + + + @Deprecated + @JsonProperty(JSON_PROPERTY_OWNER_DATE_OF_BIRTH) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setOwnerDateOfBirth(String ownerDateOfBirth) { + this.ownerDateOfBirth = ownerDateOfBirth; + } + + + public BankAccountDetail ownerHouseNumberOrName(String ownerHouseNumberOrName) { + this.ownerHouseNumberOrName = ownerHouseNumberOrName; + return this; + } + + /** + * The house name or number of the residence of the bank account owner. >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements. + * @return ownerHouseNumberOrName + **/ + @ApiModelProperty(value = "The house name or number of the residence of the bank account owner. >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements.") + @JsonProperty(JSON_PROPERTY_OWNER_HOUSE_NUMBER_OR_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getOwnerHouseNumberOrName() { + return ownerHouseNumberOrName; + } + + + @JsonProperty(JSON_PROPERTY_OWNER_HOUSE_NUMBER_OR_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setOwnerHouseNumberOrName(String ownerHouseNumberOrName) { + this.ownerHouseNumberOrName = ownerHouseNumberOrName; + } + + + public BankAccountDetail ownerName(String ownerName) { + this.ownerName = ownerName; + return this; + } + + /** + * The name of the bank account owner. >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements. + * @return ownerName + **/ + @ApiModelProperty(value = "The name of the bank account owner. >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements.") + @JsonProperty(JSON_PROPERTY_OWNER_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getOwnerName() { + return ownerName; + } + + + @JsonProperty(JSON_PROPERTY_OWNER_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setOwnerName(String ownerName) { + this.ownerName = ownerName; + } + + + public BankAccountDetail ownerNationality(String ownerNationality) { + this.ownerNationality = ownerNationality; + return this; + } + + /** + * The country code of the country of nationality of the bank account owner. >The permitted country codes are defined in ISO-3166-1 alpha-2 (e.g. 'NL'). >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements. + * @return ownerNationality + **/ + @ApiModelProperty(value = "The country code of the country of nationality of the bank account owner. >The permitted country codes are defined in ISO-3166-1 alpha-2 (e.g. 'NL'). >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements.") + @JsonProperty(JSON_PROPERTY_OWNER_NATIONALITY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getOwnerNationality() { + return ownerNationality; + } + + + @JsonProperty(JSON_PROPERTY_OWNER_NATIONALITY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setOwnerNationality(String ownerNationality) { + this.ownerNationality = ownerNationality; + } + + + public BankAccountDetail ownerPostalCode(String ownerPostalCode) { + this.ownerPostalCode = ownerPostalCode; + return this; + } + + /** + * The postal code of the residence of the bank account owner. >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements. + * @return ownerPostalCode + **/ + @ApiModelProperty(value = "The postal code of the residence of the bank account owner. >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements.") + @JsonProperty(JSON_PROPERTY_OWNER_POSTAL_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getOwnerPostalCode() { + return ownerPostalCode; + } + + + @JsonProperty(JSON_PROPERTY_OWNER_POSTAL_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setOwnerPostalCode(String ownerPostalCode) { + this.ownerPostalCode = ownerPostalCode; + } + + + public BankAccountDetail ownerState(String ownerState) { + this.ownerState = ownerState; + return this; + } + + /** + * The state of residence of the bank account owner. >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements. + * @return ownerState + **/ + @ApiModelProperty(value = "The state of residence of the bank account owner. >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements.") + @JsonProperty(JSON_PROPERTY_OWNER_STATE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getOwnerState() { + return ownerState; + } + + + @JsonProperty(JSON_PROPERTY_OWNER_STATE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setOwnerState(String ownerState) { + this.ownerState = ownerState; + } + + + public BankAccountDetail ownerStreet(String ownerStreet) { + this.ownerStreet = ownerStreet; + return this; + } + + /** + * The street name of the residence of the bank account owner. >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements. + * @return ownerStreet + **/ + @ApiModelProperty(value = "The street name of the residence of the bank account owner. >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements.") + @JsonProperty(JSON_PROPERTY_OWNER_STREET) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getOwnerStreet() { + return ownerStreet; + } + + + @JsonProperty(JSON_PROPERTY_OWNER_STREET) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setOwnerStreet(String ownerStreet) { + this.ownerStreet = ownerStreet; + } + + + public BankAccountDetail primaryAccount(Boolean primaryAccount) { + this.primaryAccount = primaryAccount; + return this; + } + + /** + * If set to true, the bank account is a primary account. + * @return primaryAccount + **/ + @ApiModelProperty(value = "If set to true, the bank account is a primary account.") + @JsonProperty(JSON_PROPERTY_PRIMARY_ACCOUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getPrimaryAccount() { + return primaryAccount; + } + + + @JsonProperty(JSON_PROPERTY_PRIMARY_ACCOUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPrimaryAccount(Boolean primaryAccount) { + this.primaryAccount = primaryAccount; + } + + + public BankAccountDetail taxId(String taxId) { + this.taxId = taxId; + return this; + } + + /** + * The tax ID number. >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements. + * @return taxId + **/ + @ApiModelProperty(value = "The tax ID number. >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements.") + @JsonProperty(JSON_PROPERTY_TAX_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getTaxId() { + return taxId; + } + + + @JsonProperty(JSON_PROPERTY_TAX_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTaxId(String taxId) { + this.taxId = taxId; + } + + + public BankAccountDetail urlForVerification(String urlForVerification) { + this.urlForVerification = urlForVerification; + return this; + } + + /** + * The URL to be used for bank account verification. This may be generated on bank account creation. >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements. + * @return urlForVerification + **/ + @ApiModelProperty(value = "The URL to be used for bank account verification. This may be generated on bank account creation. >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements.") + @JsonProperty(JSON_PROPERTY_URL_FOR_VERIFICATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getUrlForVerification() { + return urlForVerification; + } + + + @JsonProperty(JSON_PROPERTY_URL_FOR_VERIFICATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setUrlForVerification(String urlForVerification) { + this.urlForVerification = urlForVerification; + } + + + /** + * Return true if this BankAccountDetail object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + BankAccountDetail bankAccountDetail = (BankAccountDetail) o; + return Objects.equals(this.accountNumber, bankAccountDetail.accountNumber) && + Objects.equals(this.accountType, bankAccountDetail.accountType) && + Objects.equals(this.bankAccountName, bankAccountDetail.bankAccountName) && + Objects.equals(this.bankAccountReference, bankAccountDetail.bankAccountReference) && + Objects.equals(this.bankAccountUUID, bankAccountDetail.bankAccountUUID) && + Objects.equals(this.bankBicSwift, bankAccountDetail.bankBicSwift) && + Objects.equals(this.bankCity, bankAccountDetail.bankCity) && + Objects.equals(this.bankCode, bankAccountDetail.bankCode) && + Objects.equals(this.bankName, bankAccountDetail.bankName) && + Objects.equals(this.branchCode, bankAccountDetail.branchCode) && + Objects.equals(this.checkCode, bankAccountDetail.checkCode) && + Objects.equals(this.countryCode, bankAccountDetail.countryCode) && + Objects.equals(this.currencyCode, bankAccountDetail.currencyCode) && + Objects.equals(this.iban, bankAccountDetail.iban) && + Objects.equals(this.ownerCity, bankAccountDetail.ownerCity) && + Objects.equals(this.ownerCountryCode, bankAccountDetail.ownerCountryCode) && + Objects.equals(this.ownerDateOfBirth, bankAccountDetail.ownerDateOfBirth) && + Objects.equals(this.ownerHouseNumberOrName, bankAccountDetail.ownerHouseNumberOrName) && + Objects.equals(this.ownerName, bankAccountDetail.ownerName) && + Objects.equals(this.ownerNationality, bankAccountDetail.ownerNationality) && + Objects.equals(this.ownerPostalCode, bankAccountDetail.ownerPostalCode) && + Objects.equals(this.ownerState, bankAccountDetail.ownerState) && + Objects.equals(this.ownerStreet, bankAccountDetail.ownerStreet) && + Objects.equals(this.primaryAccount, bankAccountDetail.primaryAccount) && + Objects.equals(this.taxId, bankAccountDetail.taxId) && + Objects.equals(this.urlForVerification, bankAccountDetail.urlForVerification); + } + + @Override + public int hashCode() { + return Objects.hash(accountNumber, accountType, bankAccountName, bankAccountReference, bankAccountUUID, bankBicSwift, bankCity, bankCode, bankName, branchCode, checkCode, countryCode, currencyCode, iban, ownerCity, ownerCountryCode, ownerDateOfBirth, ownerHouseNumberOrName, ownerName, ownerNationality, ownerPostalCode, ownerState, ownerStreet, primaryAccount, taxId, urlForVerification); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class BankAccountDetail {\n"); + sb.append(" accountNumber: ").append(toIndentedString(accountNumber)).append("\n"); + sb.append(" accountType: ").append(toIndentedString(accountType)).append("\n"); + sb.append(" bankAccountName: ").append(toIndentedString(bankAccountName)).append("\n"); + sb.append(" bankAccountReference: ").append(toIndentedString(bankAccountReference)).append("\n"); + sb.append(" bankAccountUUID: ").append(toIndentedString(bankAccountUUID)).append("\n"); + sb.append(" bankBicSwift: ").append(toIndentedString(bankBicSwift)).append("\n"); + sb.append(" bankCity: ").append(toIndentedString(bankCity)).append("\n"); + sb.append(" bankCode: ").append(toIndentedString(bankCode)).append("\n"); + sb.append(" bankName: ").append(toIndentedString(bankName)).append("\n"); + sb.append(" branchCode: ").append(toIndentedString(branchCode)).append("\n"); + sb.append(" checkCode: ").append(toIndentedString(checkCode)).append("\n"); + sb.append(" countryCode: ").append(toIndentedString(countryCode)).append("\n"); + sb.append(" currencyCode: ").append(toIndentedString(currencyCode)).append("\n"); + sb.append(" iban: ").append(toIndentedString(iban)).append("\n"); + sb.append(" ownerCity: ").append(toIndentedString(ownerCity)).append("\n"); + sb.append(" ownerCountryCode: ").append(toIndentedString(ownerCountryCode)).append("\n"); + sb.append(" ownerDateOfBirth: ").append(toIndentedString(ownerDateOfBirth)).append("\n"); + sb.append(" ownerHouseNumberOrName: ").append(toIndentedString(ownerHouseNumberOrName)).append("\n"); + sb.append(" ownerName: ").append(toIndentedString(ownerName)).append("\n"); + sb.append(" ownerNationality: ").append(toIndentedString(ownerNationality)).append("\n"); + sb.append(" ownerPostalCode: ").append(toIndentedString(ownerPostalCode)).append("\n"); + sb.append(" ownerState: ").append(toIndentedString(ownerState)).append("\n"); + sb.append(" ownerStreet: ").append(toIndentedString(ownerStreet)).append("\n"); + sb.append(" primaryAccount: ").append(toIndentedString(primaryAccount)).append("\n"); + sb.append(" taxId: ").append(toIndentedString(taxId)).append("\n"); + sb.append(" urlForVerification: ").append(toIndentedString(urlForVerification)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line 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 BankAccountDetail given an JSON string + * + * @param jsonString JSON string + * @return An instance of BankAccountDetail + * @throws JsonProcessingException if the JSON string is invalid with respect to BankAccountDetail + */ + public static BankAccountDetail fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, BankAccountDetail.class); + } +/** + * Convert an instance of BankAccountDetail 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/marketpayaccount/BusinessDetails.java b/src/main/java/com/adyen/model/marketpayaccount/BusinessDetails.java new file mode 100644 index 000000000..7b8c45787 --- /dev/null +++ b/src/main/java/com/adyen/model/marketpayaccount/BusinessDetails.java @@ -0,0 +1,437 @@ +/* + * Account API + * This API is used for the classic integration. If you are just starting your implementation, refer to our [new integration guide](https://docs.adyen.com/marketplaces-and-platforms) instead. The Account API provides endpoints for managing account-related entities on your platform. These related entities include account holders, accounts, bank accounts, shareholders, and verification-related documents. The management operations include actions such as creation, retrieval, updating, and deletion of them. For more information, refer to our [documentation](https://docs.adyen.com/marketplaces-and-platforms/classic). ## Authentication Your Adyen contact will provide your API credential and an API key. To connect to the API, add an `X-API-Key` header with the API key as the value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: YOUR_API_KEY\" \\ ... ``` Alternatively, you can use the username and password to connect to the API using basic authentication. For example: ``` curl -U \"ws@MarketPlace.YOUR_PLATFORM_ACCOUNT\":\"YOUR_WS_PASSWORD\" \\ -H \"Content-Type: application/json\" \\ ... ``` When going live, you need to generate new web service user credentials to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning The Account API supports [versioning](https://docs.adyen.com/development-resources/versioning) using a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://cal-test.adyen.com/cal/services/Account/v6/createAccountHolder ``` + * + * The version of the OpenAPI document: 6 + * + * + * 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.marketpayaccount; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.adyen.model.marketpayaccount.ShareholderContact; +import com.adyen.model.marketpayaccount.SignatoryContact; +import com.adyen.model.marketpayaccount.UltimateParentCompany; +import com.fasterxml.jackson.annotation.JsonInclude; +import 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; + + +/** + * BusinessDetails + */ +@JsonPropertyOrder({ + BusinessDetails.JSON_PROPERTY_DOING_BUSINESS_AS, + BusinessDetails.JSON_PROPERTY_LEGAL_BUSINESS_NAME, + BusinessDetails.JSON_PROPERTY_LISTED_ULTIMATE_PARENT_COMPANY, + BusinessDetails.JSON_PROPERTY_REGISTRATION_NUMBER, + BusinessDetails.JSON_PROPERTY_SHAREHOLDERS, + BusinessDetails.JSON_PROPERTY_SIGNATORIES, + BusinessDetails.JSON_PROPERTY_STOCK_EXCHANGE, + BusinessDetails.JSON_PROPERTY_STOCK_NUMBER, + BusinessDetails.JSON_PROPERTY_STOCK_TICKER, + BusinessDetails.JSON_PROPERTY_TAX_ID +}) + +public class BusinessDetails { + public static final String JSON_PROPERTY_DOING_BUSINESS_AS = "doingBusinessAs"; + private String doingBusinessAs; + + public static final String JSON_PROPERTY_LEGAL_BUSINESS_NAME = "legalBusinessName"; + private String legalBusinessName; + + public static final String JSON_PROPERTY_LISTED_ULTIMATE_PARENT_COMPANY = "listedUltimateParentCompany"; + private List listedUltimateParentCompany = null; + + public static final String JSON_PROPERTY_REGISTRATION_NUMBER = "registrationNumber"; + private String registrationNumber; + + public static final String JSON_PROPERTY_SHAREHOLDERS = "shareholders"; + private List shareholders = null; + + public static final String JSON_PROPERTY_SIGNATORIES = "signatories"; + private List signatories = null; + + public static final String JSON_PROPERTY_STOCK_EXCHANGE = "stockExchange"; + private String stockExchange; + + public static final String JSON_PROPERTY_STOCK_NUMBER = "stockNumber"; + private String stockNumber; + + public static final String JSON_PROPERTY_STOCK_TICKER = "stockTicker"; + private String stockTicker; + + public static final String JSON_PROPERTY_TAX_ID = "taxId"; + private String taxId; + + public BusinessDetails() { + } + + public BusinessDetails doingBusinessAs(String doingBusinessAs) { + this.doingBusinessAs = doingBusinessAs; + return this; + } + + /** + * The registered name of the company (if it differs from the legal name of the company). + * @return doingBusinessAs + **/ + @ApiModelProperty(value = "The registered name of the company (if it differs from the legal name of the company).") + @JsonProperty(JSON_PROPERTY_DOING_BUSINESS_AS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getDoingBusinessAs() { + return doingBusinessAs; + } + + + @JsonProperty(JSON_PROPERTY_DOING_BUSINESS_AS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDoingBusinessAs(String doingBusinessAs) { + this.doingBusinessAs = doingBusinessAs; + } + + + public BusinessDetails legalBusinessName(String legalBusinessName) { + this.legalBusinessName = legalBusinessName; + return this; + } + + /** + * The legal name of the company. + * @return legalBusinessName + **/ + @ApiModelProperty(value = "The legal name of the company.") + @JsonProperty(JSON_PROPERTY_LEGAL_BUSINESS_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getLegalBusinessName() { + return legalBusinessName; + } + + + @JsonProperty(JSON_PROPERTY_LEGAL_BUSINESS_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setLegalBusinessName(String legalBusinessName) { + this.legalBusinessName = legalBusinessName; + } + + + public BusinessDetails listedUltimateParentCompany(List listedUltimateParentCompany) { + this.listedUltimateParentCompany = listedUltimateParentCompany; + return this; + } + + public BusinessDetails addListedUltimateParentCompanyItem(UltimateParentCompany listedUltimateParentCompanyItem) { + if (this.listedUltimateParentCompany == null) { + this.listedUltimateParentCompany = new ArrayList<>(); + } + this.listedUltimateParentCompany.add(listedUltimateParentCompanyItem); + return this; + } + + /** + * Information about the parent public company. Required if the account holder is 100% owned by a publicly listed company. + * @return listedUltimateParentCompany + **/ + @ApiModelProperty(value = "Information about the parent public company. Required if the account holder is 100% owned by a publicly listed company.") + @JsonProperty(JSON_PROPERTY_LISTED_ULTIMATE_PARENT_COMPANY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getListedUltimateParentCompany() { + return listedUltimateParentCompany; + } + + + @JsonProperty(JSON_PROPERTY_LISTED_ULTIMATE_PARENT_COMPANY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setListedUltimateParentCompany(List listedUltimateParentCompany) { + this.listedUltimateParentCompany = listedUltimateParentCompany; + } + + + public BusinessDetails registrationNumber(String registrationNumber) { + this.registrationNumber = registrationNumber; + return this; + } + + /** + * The registration number of the company. + * @return registrationNumber + **/ + @ApiModelProperty(value = "The registration number of the company.") + @JsonProperty(JSON_PROPERTY_REGISTRATION_NUMBER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getRegistrationNumber() { + return registrationNumber; + } + + + @JsonProperty(JSON_PROPERTY_REGISTRATION_NUMBER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setRegistrationNumber(String registrationNumber) { + this.registrationNumber = registrationNumber; + } + + + public BusinessDetails shareholders(List shareholders) { + this.shareholders = shareholders; + return this; + } + + public BusinessDetails addShareholdersItem(ShareholderContact shareholdersItem) { + if (this.shareholders == null) { + this.shareholders = new ArrayList<>(); + } + this.shareholders.add(shareholdersItem); + return this; + } + + /** + * Array containing information about individuals associated with the account holder either through ownership or control. For details about how you can identify them, refer to [our verification guide](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process#identify-ubos). + * @return shareholders + **/ + @ApiModelProperty(value = "Array containing information about individuals associated with the account holder either through ownership or control. For details about how you can identify them, refer to [our verification guide](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process#identify-ubos).") + @JsonProperty(JSON_PROPERTY_SHAREHOLDERS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getShareholders() { + return shareholders; + } + + + @JsonProperty(JSON_PROPERTY_SHAREHOLDERS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setShareholders(List shareholders) { + this.shareholders = shareholders; + } + + + public BusinessDetails signatories(List signatories) { + this.signatories = signatories; + return this; + } + + public BusinessDetails addSignatoriesItem(SignatoryContact signatoriesItem) { + if (this.signatories == null) { + this.signatories = new ArrayList<>(); + } + this.signatories.add(signatoriesItem); + return this; + } + + /** + * Signatories associated with the company. Each array entry should represent one signatory. + * @return signatories + **/ + @ApiModelProperty(value = "Signatories associated with the company. Each array entry should represent one signatory.") + @JsonProperty(JSON_PROPERTY_SIGNATORIES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getSignatories() { + return signatories; + } + + + @JsonProperty(JSON_PROPERTY_SIGNATORIES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSignatories(List signatories) { + this.signatories = signatories; + } + + + public BusinessDetails stockExchange(String stockExchange) { + this.stockExchange = stockExchange; + return this; + } + + /** + * Market Identifier Code (MIC). + * @return stockExchange + **/ + @ApiModelProperty(value = "Market Identifier Code (MIC).") + @JsonProperty(JSON_PROPERTY_STOCK_EXCHANGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getStockExchange() { + return stockExchange; + } + + + @JsonProperty(JSON_PROPERTY_STOCK_EXCHANGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setStockExchange(String stockExchange) { + this.stockExchange = stockExchange; + } + + + public BusinessDetails stockNumber(String stockNumber) { + this.stockNumber = stockNumber; + return this; + } + + /** + * International Securities Identification Number (ISIN). + * @return stockNumber + **/ + @ApiModelProperty(value = "International Securities Identification Number (ISIN).") + @JsonProperty(JSON_PROPERTY_STOCK_NUMBER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getStockNumber() { + return stockNumber; + } + + + @JsonProperty(JSON_PROPERTY_STOCK_NUMBER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setStockNumber(String stockNumber) { + this.stockNumber = stockNumber; + } + + + public BusinessDetails stockTicker(String stockTicker) { + this.stockTicker = stockTicker; + return this; + } + + /** + * Stock Ticker symbol. + * @return stockTicker + **/ + @ApiModelProperty(value = "Stock Ticker symbol.") + @JsonProperty(JSON_PROPERTY_STOCK_TICKER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getStockTicker() { + return stockTicker; + } + + + @JsonProperty(JSON_PROPERTY_STOCK_TICKER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setStockTicker(String stockTicker) { + this.stockTicker = stockTicker; + } + + + public BusinessDetails taxId(String taxId) { + this.taxId = taxId; + return this; + } + + /** + * The tax ID of the company. + * @return taxId + **/ + @ApiModelProperty(value = "The tax ID of the company.") + @JsonProperty(JSON_PROPERTY_TAX_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getTaxId() { + return taxId; + } + + + @JsonProperty(JSON_PROPERTY_TAX_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTaxId(String taxId) { + this.taxId = taxId; + } + + + /** + * Return true if this BusinessDetails object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + BusinessDetails businessDetails = (BusinessDetails) o; + return Objects.equals(this.doingBusinessAs, businessDetails.doingBusinessAs) && + Objects.equals(this.legalBusinessName, businessDetails.legalBusinessName) && + Objects.equals(this.listedUltimateParentCompany, businessDetails.listedUltimateParentCompany) && + Objects.equals(this.registrationNumber, businessDetails.registrationNumber) && + Objects.equals(this.shareholders, businessDetails.shareholders) && + Objects.equals(this.signatories, businessDetails.signatories) && + Objects.equals(this.stockExchange, businessDetails.stockExchange) && + Objects.equals(this.stockNumber, businessDetails.stockNumber) && + Objects.equals(this.stockTicker, businessDetails.stockTicker) && + Objects.equals(this.taxId, businessDetails.taxId); + } + + @Override + public int hashCode() { + return Objects.hash(doingBusinessAs, legalBusinessName, listedUltimateParentCompany, registrationNumber, shareholders, signatories, stockExchange, stockNumber, stockTicker, taxId); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class BusinessDetails {\n"); + sb.append(" doingBusinessAs: ").append(toIndentedString(doingBusinessAs)).append("\n"); + sb.append(" legalBusinessName: ").append(toIndentedString(legalBusinessName)).append("\n"); + sb.append(" listedUltimateParentCompany: ").append(toIndentedString(listedUltimateParentCompany)).append("\n"); + sb.append(" registrationNumber: ").append(toIndentedString(registrationNumber)).append("\n"); + sb.append(" shareholders: ").append(toIndentedString(shareholders)).append("\n"); + sb.append(" signatories: ").append(toIndentedString(signatories)).append("\n"); + sb.append(" stockExchange: ").append(toIndentedString(stockExchange)).append("\n"); + sb.append(" stockNumber: ").append(toIndentedString(stockNumber)).append("\n"); + sb.append(" stockTicker: ").append(toIndentedString(stockTicker)).append("\n"); + sb.append(" taxId: ").append(toIndentedString(taxId)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +/** + * Create an instance of BusinessDetails given an JSON string + * + * @param jsonString JSON string + * @return An instance of BusinessDetails + * @throws JsonProcessingException if the JSON string is invalid with respect to BusinessDetails + */ + public static BusinessDetails fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, BusinessDetails.class); + } +/** + * Convert an instance of BusinessDetails 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/marketpayaccount/CloseAccountHolderRequest.java b/src/main/java/com/adyen/model/marketpayaccount/CloseAccountHolderRequest.java new file mode 100644 index 000000000..63266e9ff --- /dev/null +++ b/src/main/java/com/adyen/model/marketpayaccount/CloseAccountHolderRequest.java @@ -0,0 +1,129 @@ +/* + * Account API + * This API is used for the classic integration. If you are just starting your implementation, refer to our [new integration guide](https://docs.adyen.com/marketplaces-and-platforms) instead. The Account API provides endpoints for managing account-related entities on your platform. These related entities include account holders, accounts, bank accounts, shareholders, and verification-related documents. The management operations include actions such as creation, retrieval, updating, and deletion of them. For more information, refer to our [documentation](https://docs.adyen.com/marketplaces-and-platforms/classic). ## Authentication Your Adyen contact will provide your API credential and an API key. To connect to the API, add an `X-API-Key` header with the API key as the value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: YOUR_API_KEY\" \\ ... ``` Alternatively, you can use the username and password to connect to the API using basic authentication. For example: ``` curl -U \"ws@MarketPlace.YOUR_PLATFORM_ACCOUNT\":\"YOUR_WS_PASSWORD\" \\ -H \"Content-Type: application/json\" \\ ... ``` When going live, you need to generate new web service user credentials to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning The Account API supports [versioning](https://docs.adyen.com/development-resources/versioning) using a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://cal-test.adyen.com/cal/services/Account/v6/createAccountHolder ``` + * + * The version of the OpenAPI document: 6 + * + * + * 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.marketpayaccount; + +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; + + +/** + * CloseAccountHolderRequest + */ +@JsonPropertyOrder({ + CloseAccountHolderRequest.JSON_PROPERTY_ACCOUNT_HOLDER_CODE +}) + +public class CloseAccountHolderRequest { + public static final String JSON_PROPERTY_ACCOUNT_HOLDER_CODE = "accountHolderCode"; + private String accountHolderCode; + + public CloseAccountHolderRequest() { + } + + public CloseAccountHolderRequest accountHolderCode(String accountHolderCode) { + this.accountHolderCode = accountHolderCode; + return this; + } + + /** + * The code of the Account Holder to be closed. + * @return accountHolderCode + **/ + @ApiModelProperty(required = true, value = "The code of the Account Holder to be closed.") + @JsonProperty(JSON_PROPERTY_ACCOUNT_HOLDER_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getAccountHolderCode() { + return accountHolderCode; + } + + + @JsonProperty(JSON_PROPERTY_ACCOUNT_HOLDER_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAccountHolderCode(String accountHolderCode) { + this.accountHolderCode = accountHolderCode; + } + + + /** + * Return true if this CloseAccountHolderRequest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CloseAccountHolderRequest closeAccountHolderRequest = (CloseAccountHolderRequest) o; + return Objects.equals(this.accountHolderCode, closeAccountHolderRequest.accountHolderCode); + } + + @Override + public int hashCode() { + return Objects.hash(accountHolderCode); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CloseAccountHolderRequest {\n"); + sb.append(" accountHolderCode: ").append(toIndentedString(accountHolderCode)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line 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 CloseAccountHolderRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of CloseAccountHolderRequest + * @throws JsonProcessingException if the JSON string is invalid with respect to CloseAccountHolderRequest + */ + public static CloseAccountHolderRequest fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, CloseAccountHolderRequest.class); + } +/** + * Convert an instance of CloseAccountHolderRequest 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/marketpayaccount/CloseAccountHolderResponse.java b/src/main/java/com/adyen/model/marketpayaccount/CloseAccountHolderResponse.java new file mode 100644 index 000000000..5bb138bc1 --- /dev/null +++ b/src/main/java/com/adyen/model/marketpayaccount/CloseAccountHolderResponse.java @@ -0,0 +1,234 @@ +/* + * Account API + * This API is used for the classic integration. If you are just starting your implementation, refer to our [new integration guide](https://docs.adyen.com/marketplaces-and-platforms) instead. The Account API provides endpoints for managing account-related entities on your platform. These related entities include account holders, accounts, bank accounts, shareholders, and verification-related documents. The management operations include actions such as creation, retrieval, updating, and deletion of them. For more information, refer to our [documentation](https://docs.adyen.com/marketplaces-and-platforms/classic). ## Authentication Your Adyen contact will provide your API credential and an API key. To connect to the API, add an `X-API-Key` header with the API key as the value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: YOUR_API_KEY\" \\ ... ``` Alternatively, you can use the username and password to connect to the API using basic authentication. For example: ``` curl -U \"ws@MarketPlace.YOUR_PLATFORM_ACCOUNT\":\"YOUR_WS_PASSWORD\" \\ -H \"Content-Type: application/json\" \\ ... ``` When going live, you need to generate new web service user credentials to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning The Account API supports [versioning](https://docs.adyen.com/development-resources/versioning) using a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://cal-test.adyen.com/cal/services/Account/v6/createAccountHolder ``` + * + * The version of the OpenAPI document: 6 + * + * + * 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.marketpayaccount; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.adyen.model.marketpayaccount.AccountHolderStatus; +import com.adyen.model.marketpayaccount.ErrorFieldType; +import com.fasterxml.jackson.annotation.JsonInclude; +import 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; + + +/** + * CloseAccountHolderResponse + */ +@JsonPropertyOrder({ + CloseAccountHolderResponse.JSON_PROPERTY_ACCOUNT_HOLDER_STATUS, + CloseAccountHolderResponse.JSON_PROPERTY_INVALID_FIELDS, + CloseAccountHolderResponse.JSON_PROPERTY_PSP_REFERENCE, + CloseAccountHolderResponse.JSON_PROPERTY_RESULT_CODE +}) + +public class CloseAccountHolderResponse { + public static final String JSON_PROPERTY_ACCOUNT_HOLDER_STATUS = "accountHolderStatus"; + private AccountHolderStatus accountHolderStatus; + + public static final String JSON_PROPERTY_INVALID_FIELDS = "invalidFields"; + private List invalidFields = null; + + public static final String JSON_PROPERTY_PSP_REFERENCE = "pspReference"; + private String pspReference; + + public static final String JSON_PROPERTY_RESULT_CODE = "resultCode"; + private String resultCode; + + public CloseAccountHolderResponse() { + } + + public CloseAccountHolderResponse accountHolderStatus(AccountHolderStatus accountHolderStatus) { + this.accountHolderStatus = accountHolderStatus; + return this; + } + + /** + * Get accountHolderStatus + * @return accountHolderStatus + **/ + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_ACCOUNT_HOLDER_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public AccountHolderStatus getAccountHolderStatus() { + return accountHolderStatus; + } + + + @JsonProperty(JSON_PROPERTY_ACCOUNT_HOLDER_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAccountHolderStatus(AccountHolderStatus accountHolderStatus) { + this.accountHolderStatus = accountHolderStatus; + } + + + public CloseAccountHolderResponse invalidFields(List invalidFields) { + this.invalidFields = invalidFields; + return this; + } + + public CloseAccountHolderResponse addInvalidFieldsItem(ErrorFieldType invalidFieldsItem) { + if (this.invalidFields == null) { + this.invalidFields = new ArrayList<>(); + } + this.invalidFields.add(invalidFieldsItem); + return this; + } + + /** + * Contains field validation errors that would prevent requests from being processed. + * @return invalidFields + **/ + @ApiModelProperty(value = "Contains field validation errors that would prevent requests from being processed.") + @JsonProperty(JSON_PROPERTY_INVALID_FIELDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getInvalidFields() { + return invalidFields; + } + + + @JsonProperty(JSON_PROPERTY_INVALID_FIELDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setInvalidFields(List invalidFields) { + this.invalidFields = invalidFields; + } + + + public CloseAccountHolderResponse pspReference(String pspReference) { + this.pspReference = pspReference; + return this; + } + + /** + * The reference of a request. Can be used to uniquely identify the request. + * @return pspReference + **/ + @ApiModelProperty(value = "The reference of a request. Can be used to uniquely identify the request.") + @JsonProperty(JSON_PROPERTY_PSP_REFERENCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getPspReference() { + return pspReference; + } + + + @JsonProperty(JSON_PROPERTY_PSP_REFERENCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPspReference(String pspReference) { + this.pspReference = pspReference; + } + + + public CloseAccountHolderResponse resultCode(String resultCode) { + this.resultCode = resultCode; + return this; + } + + /** + * The result code. + * @return resultCode + **/ + @ApiModelProperty(value = "The result code.") + @JsonProperty(JSON_PROPERTY_RESULT_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getResultCode() { + return resultCode; + } + + + @JsonProperty(JSON_PROPERTY_RESULT_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setResultCode(String resultCode) { + this.resultCode = resultCode; + } + + + /** + * Return true if this CloseAccountHolderResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CloseAccountHolderResponse closeAccountHolderResponse = (CloseAccountHolderResponse) o; + return Objects.equals(this.accountHolderStatus, closeAccountHolderResponse.accountHolderStatus) && + Objects.equals(this.invalidFields, closeAccountHolderResponse.invalidFields) && + Objects.equals(this.pspReference, closeAccountHolderResponse.pspReference) && + Objects.equals(this.resultCode, closeAccountHolderResponse.resultCode); + } + + @Override + public int hashCode() { + return Objects.hash(accountHolderStatus, invalidFields, pspReference, resultCode); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CloseAccountHolderResponse {\n"); + sb.append(" accountHolderStatus: ").append(toIndentedString(accountHolderStatus)).append("\n"); + sb.append(" invalidFields: ").append(toIndentedString(invalidFields)).append("\n"); + sb.append(" pspReference: ").append(toIndentedString(pspReference)).append("\n"); + sb.append(" resultCode: ").append(toIndentedString(resultCode)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line 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 CloseAccountHolderResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of CloseAccountHolderResponse + * @throws JsonProcessingException if the JSON string is invalid with respect to CloseAccountHolderResponse + */ + public static CloseAccountHolderResponse fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, CloseAccountHolderResponse.class); + } +/** + * Convert an instance of CloseAccountHolderResponse 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/marketpayaccount/CloseAccountRequest.java b/src/main/java/com/adyen/model/marketpayaccount/CloseAccountRequest.java new file mode 100644 index 000000000..71a3981fa --- /dev/null +++ b/src/main/java/com/adyen/model/marketpayaccount/CloseAccountRequest.java @@ -0,0 +1,129 @@ +/* + * Account API + * This API is used for the classic integration. If you are just starting your implementation, refer to our [new integration guide](https://docs.adyen.com/marketplaces-and-platforms) instead. The Account API provides endpoints for managing account-related entities on your platform. These related entities include account holders, accounts, bank accounts, shareholders, and verification-related documents. The management operations include actions such as creation, retrieval, updating, and deletion of them. For more information, refer to our [documentation](https://docs.adyen.com/marketplaces-and-platforms/classic). ## Authentication Your Adyen contact will provide your API credential and an API key. To connect to the API, add an `X-API-Key` header with the API key as the value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: YOUR_API_KEY\" \\ ... ``` Alternatively, you can use the username and password to connect to the API using basic authentication. For example: ``` curl -U \"ws@MarketPlace.YOUR_PLATFORM_ACCOUNT\":\"YOUR_WS_PASSWORD\" \\ -H \"Content-Type: application/json\" \\ ... ``` When going live, you need to generate new web service user credentials to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning The Account API supports [versioning](https://docs.adyen.com/development-resources/versioning) using a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://cal-test.adyen.com/cal/services/Account/v6/createAccountHolder ``` + * + * The version of the OpenAPI document: 6 + * + * + * 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.marketpayaccount; + +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; + + +/** + * CloseAccountRequest + */ +@JsonPropertyOrder({ + CloseAccountRequest.JSON_PROPERTY_ACCOUNT_CODE +}) + +public class CloseAccountRequest { + public static final String JSON_PROPERTY_ACCOUNT_CODE = "accountCode"; + private String accountCode; + + public CloseAccountRequest() { + } + + public CloseAccountRequest accountCode(String accountCode) { + this.accountCode = accountCode; + return this; + } + + /** + * The code of account to be closed. + * @return accountCode + **/ + @ApiModelProperty(required = true, value = "The code of account to be closed.") + @JsonProperty(JSON_PROPERTY_ACCOUNT_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getAccountCode() { + return accountCode; + } + + + @JsonProperty(JSON_PROPERTY_ACCOUNT_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAccountCode(String accountCode) { + this.accountCode = accountCode; + } + + + /** + * Return true if this CloseAccountRequest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CloseAccountRequest closeAccountRequest = (CloseAccountRequest) o; + return Objects.equals(this.accountCode, closeAccountRequest.accountCode); + } + + @Override + public int hashCode() { + return Objects.hash(accountCode); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CloseAccountRequest {\n"); + sb.append(" accountCode: ").append(toIndentedString(accountCode)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line 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 CloseAccountRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of CloseAccountRequest + * @throws JsonProcessingException if the JSON string is invalid with respect to CloseAccountRequest + */ + public static CloseAccountRequest fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, CloseAccountRequest.class); + } +/** + * Convert an instance of CloseAccountRequest 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/marketpayaccount/CloseAccountResponse.java b/src/main/java/com/adyen/model/marketpayaccount/CloseAccountResponse.java new file mode 100644 index 000000000..012604eda --- /dev/null +++ b/src/main/java/com/adyen/model/marketpayaccount/CloseAccountResponse.java @@ -0,0 +1,303 @@ +/* + * Account API + * This API is used for the classic integration. If you are just starting your implementation, refer to our [new integration guide](https://docs.adyen.com/marketplaces-and-platforms) instead. The Account API provides endpoints for managing account-related entities on your platform. These related entities include account holders, accounts, bank accounts, shareholders, and verification-related documents. The management operations include actions such as creation, retrieval, updating, and deletion of them. For more information, refer to our [documentation](https://docs.adyen.com/marketplaces-and-platforms/classic). ## Authentication Your Adyen contact will provide your API credential and an API key. To connect to the API, add an `X-API-Key` header with the API key as the value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: YOUR_API_KEY\" \\ ... ``` Alternatively, you can use the username and password to connect to the API using basic authentication. For example: ``` curl -U \"ws@MarketPlace.YOUR_PLATFORM_ACCOUNT\":\"YOUR_WS_PASSWORD\" \\ -H \"Content-Type: application/json\" \\ ... ``` When going live, you need to generate new web service user credentials to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning The Account API supports [versioning](https://docs.adyen.com/development-resources/versioning) using a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://cal-test.adyen.com/cal/services/Account/v6/createAccountHolder ``` + * + * The version of the OpenAPI document: 6 + * + * + * 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.marketpayaccount; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.adyen.model.marketpayaccount.ErrorFieldType; +import com.fasterxml.jackson.annotation.JsonInclude; +import 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; + + +/** + * CloseAccountResponse + */ +@JsonPropertyOrder({ + CloseAccountResponse.JSON_PROPERTY_ACCOUNT_CODE, + CloseAccountResponse.JSON_PROPERTY_INVALID_FIELDS, + CloseAccountResponse.JSON_PROPERTY_PSP_REFERENCE, + CloseAccountResponse.JSON_PROPERTY_RESULT_CODE, + CloseAccountResponse.JSON_PROPERTY_STATUS +}) + +public class CloseAccountResponse { + public static final String JSON_PROPERTY_ACCOUNT_CODE = "accountCode"; + private String accountCode; + + public static final String JSON_PROPERTY_INVALID_FIELDS = "invalidFields"; + private List invalidFields = null; + + public static final String JSON_PROPERTY_PSP_REFERENCE = "pspReference"; + private String pspReference; + + public static final String JSON_PROPERTY_RESULT_CODE = "resultCode"; + private String resultCode; + + /** + * The new status of the account. >Permitted values: `Active`, `Inactive`, `Suspended`, `Closed`. + */ + public enum StatusEnum { + ACTIVE("Active"), + + CLOSED("Closed"), + + INACTIVE("Inactive"), + + SUSPENDED("Suspended"); + + 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 CloseAccountResponse() { + } + + public CloseAccountResponse accountCode(String accountCode) { + this.accountCode = accountCode; + return this; + } + + /** + * The account code of the account that is closed. + * @return accountCode + **/ + @ApiModelProperty(value = "The account code of the account that is closed.") + @JsonProperty(JSON_PROPERTY_ACCOUNT_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getAccountCode() { + return accountCode; + } + + + @JsonProperty(JSON_PROPERTY_ACCOUNT_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAccountCode(String accountCode) { + this.accountCode = accountCode; + } + + + public CloseAccountResponse invalidFields(List invalidFields) { + this.invalidFields = invalidFields; + return this; + } + + public CloseAccountResponse addInvalidFieldsItem(ErrorFieldType invalidFieldsItem) { + if (this.invalidFields == null) { + this.invalidFields = new ArrayList<>(); + } + this.invalidFields.add(invalidFieldsItem); + return this; + } + + /** + * Contains field validation errors that would prevent requests from being processed. + * @return invalidFields + **/ + @ApiModelProperty(value = "Contains field validation errors that would prevent requests from being processed.") + @JsonProperty(JSON_PROPERTY_INVALID_FIELDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getInvalidFields() { + return invalidFields; + } + + + @JsonProperty(JSON_PROPERTY_INVALID_FIELDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setInvalidFields(List invalidFields) { + this.invalidFields = invalidFields; + } + + + public CloseAccountResponse pspReference(String pspReference) { + this.pspReference = pspReference; + return this; + } + + /** + * The reference of a request. Can be used to uniquely identify the request. + * @return pspReference + **/ + @ApiModelProperty(value = "The reference of a request. Can be used to uniquely identify the request.") + @JsonProperty(JSON_PROPERTY_PSP_REFERENCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getPspReference() { + return pspReference; + } + + + @JsonProperty(JSON_PROPERTY_PSP_REFERENCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPspReference(String pspReference) { + this.pspReference = pspReference; + } + + + public CloseAccountResponse resultCode(String resultCode) { + this.resultCode = resultCode; + return this; + } + + /** + * The result code. + * @return resultCode + **/ + @ApiModelProperty(value = "The result code.") + @JsonProperty(JSON_PROPERTY_RESULT_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getResultCode() { + return resultCode; + } + + + @JsonProperty(JSON_PROPERTY_RESULT_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setResultCode(String resultCode) { + this.resultCode = resultCode; + } + + + public CloseAccountResponse status(StatusEnum status) { + this.status = status; + return this; + } + + /** + * The new status of the account. >Permitted values: `Active`, `Inactive`, `Suspended`, `Closed`. + * @return status + **/ + @ApiModelProperty(value = "The new status of the account. >Permitted values: `Active`, `Inactive`, `Suspended`, `Closed`.") + @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 CloseAccountResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CloseAccountResponse closeAccountResponse = (CloseAccountResponse) o; + return Objects.equals(this.accountCode, closeAccountResponse.accountCode) && + Objects.equals(this.invalidFields, closeAccountResponse.invalidFields) && + Objects.equals(this.pspReference, closeAccountResponse.pspReference) && + Objects.equals(this.resultCode, closeAccountResponse.resultCode) && + Objects.equals(this.status, closeAccountResponse.status); + } + + @Override + public int hashCode() { + return Objects.hash(accountCode, invalidFields, pspReference, resultCode, status); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CloseAccountResponse {\n"); + sb.append(" accountCode: ").append(toIndentedString(accountCode)).append("\n"); + sb.append(" invalidFields: ").append(toIndentedString(invalidFields)).append("\n"); + sb.append(" pspReference: ").append(toIndentedString(pspReference)).append("\n"); + sb.append(" resultCode: ").append(toIndentedString(resultCode)).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 CloseAccountResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of CloseAccountResponse + * @throws JsonProcessingException if the JSON string is invalid with respect to CloseAccountResponse + */ + public static CloseAccountResponse fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, CloseAccountResponse.class); + } +/** + * Convert an instance of CloseAccountResponse 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/marketpayaccount/CloseStoresRequest.java b/src/main/java/com/adyen/model/marketpayaccount/CloseStoresRequest.java new file mode 100644 index 000000000..1d959996c --- /dev/null +++ b/src/main/java/com/adyen/model/marketpayaccount/CloseStoresRequest.java @@ -0,0 +1,167 @@ +/* + * Account API + * This API is used for the classic integration. If you are just starting your implementation, refer to our [new integration guide](https://docs.adyen.com/marketplaces-and-platforms) instead. The Account API provides endpoints for managing account-related entities on your platform. These related entities include account holders, accounts, bank accounts, shareholders, and verification-related documents. The management operations include actions such as creation, retrieval, updating, and deletion of them. For more information, refer to our [documentation](https://docs.adyen.com/marketplaces-and-platforms/classic). ## Authentication Your Adyen contact will provide your API credential and an API key. To connect to the API, add an `X-API-Key` header with the API key as the value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: YOUR_API_KEY\" \\ ... ``` Alternatively, you can use the username and password to connect to the API using basic authentication. For example: ``` curl -U \"ws@MarketPlace.YOUR_PLATFORM_ACCOUNT\":\"YOUR_WS_PASSWORD\" \\ -H \"Content-Type: application/json\" \\ ... ``` When going live, you need to generate new web service user credentials to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning The Account API supports [versioning](https://docs.adyen.com/development-resources/versioning) using a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://cal-test.adyen.com/cal/services/Account/v6/createAccountHolder ``` + * + * The version of the OpenAPI document: 6 + * + * + * 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.marketpayaccount; + +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.ArrayList; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.core.JsonProcessingException; + + +/** + * CloseStoresRequest + */ +@JsonPropertyOrder({ + CloseStoresRequest.JSON_PROPERTY_ACCOUNT_HOLDER_CODE, + CloseStoresRequest.JSON_PROPERTY_STORES +}) + +public class CloseStoresRequest { + public static final String JSON_PROPERTY_ACCOUNT_HOLDER_CODE = "accountHolderCode"; + private String accountHolderCode; + + public static final String JSON_PROPERTY_STORES = "stores"; + private List stores = new ArrayList<>(); + + public CloseStoresRequest() { + } + + public CloseStoresRequest accountHolderCode(String accountHolderCode) { + this.accountHolderCode = accountHolderCode; + return this; + } + + /** + * The code of the account holder. + * @return accountHolderCode + **/ + @ApiModelProperty(required = true, value = "The code of the account holder.") + @JsonProperty(JSON_PROPERTY_ACCOUNT_HOLDER_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getAccountHolderCode() { + return accountHolderCode; + } + + + @JsonProperty(JSON_PROPERTY_ACCOUNT_HOLDER_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAccountHolderCode(String accountHolderCode) { + this.accountHolderCode = accountHolderCode; + } + + + public CloseStoresRequest stores(List stores) { + this.stores = stores; + return this; + } + + public CloseStoresRequest addStoresItem(String storesItem) { + this.stores.add(storesItem); + return this; + } + + /** + * List of stores to be closed. + * @return stores + **/ + @ApiModelProperty(required = true, value = "List of stores to be closed.") + @JsonProperty(JSON_PROPERTY_STORES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getStores() { + return stores; + } + + + @JsonProperty(JSON_PROPERTY_STORES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setStores(List stores) { + this.stores = stores; + } + + + /** + * Return true if this CloseStoresRequest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CloseStoresRequest closeStoresRequest = (CloseStoresRequest) o; + return Objects.equals(this.accountHolderCode, closeStoresRequest.accountHolderCode) && + Objects.equals(this.stores, closeStoresRequest.stores); + } + + @Override + public int hashCode() { + return Objects.hash(accountHolderCode, stores); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CloseStoresRequest {\n"); + sb.append(" accountHolderCode: ").append(toIndentedString(accountHolderCode)).append("\n"); + sb.append(" stores: ").append(toIndentedString(stores)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line 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 CloseStoresRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of CloseStoresRequest + * @throws JsonProcessingException if the JSON string is invalid with respect to CloseStoresRequest + */ + public static CloseStoresRequest fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, CloseStoresRequest.class); + } +/** + * Convert an instance of CloseStoresRequest 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/marketpayaccount/CreateAccountHolderRequest.java b/src/main/java/com/adyen/model/marketpayaccount/CreateAccountHolderRequest.java new file mode 100644 index 000000000..4c9721d77 --- /dev/null +++ b/src/main/java/com/adyen/model/marketpayaccount/CreateAccountHolderRequest.java @@ -0,0 +1,391 @@ +/* + * Account API + * This API is used for the classic integration. If you are just starting your implementation, refer to our [new integration guide](https://docs.adyen.com/marketplaces-and-platforms) instead. The Account API provides endpoints for managing account-related entities on your platform. These related entities include account holders, accounts, bank accounts, shareholders, and verification-related documents. The management operations include actions such as creation, retrieval, updating, and deletion of them. For more information, refer to our [documentation](https://docs.adyen.com/marketplaces-and-platforms/classic). ## Authentication Your Adyen contact will provide your API credential and an API key. To connect to the API, add an `X-API-Key` header with the API key as the value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: YOUR_API_KEY\" \\ ... ``` Alternatively, you can use the username and password to connect to the API using basic authentication. For example: ``` curl -U \"ws@MarketPlace.YOUR_PLATFORM_ACCOUNT\":\"YOUR_WS_PASSWORD\" \\ -H \"Content-Type: application/json\" \\ ... ``` When going live, you need to generate new web service user credentials to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning The Account API supports [versioning](https://docs.adyen.com/development-resources/versioning) using a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://cal-test.adyen.com/cal/services/Account/v6/createAccountHolder ``` + * + * The version of the OpenAPI document: 6 + * + * + * 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.marketpayaccount; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.adyen.model.marketpayaccount.AccountHolderDetails; +import com.fasterxml.jackson.annotation.JsonInclude; +import 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; + + +/** + * CreateAccountHolderRequest + */ +@JsonPropertyOrder({ + CreateAccountHolderRequest.JSON_PROPERTY_ACCOUNT_HOLDER_CODE, + CreateAccountHolderRequest.JSON_PROPERTY_ACCOUNT_HOLDER_DETAILS, + CreateAccountHolderRequest.JSON_PROPERTY_CREATE_DEFAULT_ACCOUNT, + CreateAccountHolderRequest.JSON_PROPERTY_DESCRIPTION, + CreateAccountHolderRequest.JSON_PROPERTY_LEGAL_ENTITY, + CreateAccountHolderRequest.JSON_PROPERTY_PRIMARY_CURRENCY, + CreateAccountHolderRequest.JSON_PROPERTY_PROCESSING_TIER, + CreateAccountHolderRequest.JSON_PROPERTY_VERIFICATION_PROFILE +}) + +public class CreateAccountHolderRequest { + public static final String JSON_PROPERTY_ACCOUNT_HOLDER_CODE = "accountHolderCode"; + private String accountHolderCode; + + public static final String JSON_PROPERTY_ACCOUNT_HOLDER_DETAILS = "accountHolderDetails"; + private AccountHolderDetails accountHolderDetails; + + public static final String JSON_PROPERTY_CREATE_DEFAULT_ACCOUNT = "createDefaultAccount"; + private Boolean createDefaultAccount; + + public static final String JSON_PROPERTY_DESCRIPTION = "description"; + private String description; + + /** + * The legal entity type of the account holder. This determines the information that should be provided in the request. Possible values: **Business**, **Individual**, or **NonProfit**. * If set to **Business** or **NonProfit**, then `accountHolderDetails.businessDetails` must be provided, with at least one entry in the `accountHolderDetails.businessDetails.shareholders` list. * If set to **Individual**, then `accountHolderDetails.individualDetails` must be provided. + */ + public enum LegalEntityEnum { + BUSINESS("Business"), + + INDIVIDUAL("Individual"), + + NONPROFIT("NonProfit"), + + PARTNERSHIP("Partnership"), + + PUBLICCOMPANY("PublicCompany"); + + private String value; + + LegalEntityEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static LegalEntityEnum fromValue(String value) { + for (LegalEntityEnum b : LegalEntityEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_LEGAL_ENTITY = "legalEntity"; + private LegalEntityEnum legalEntity; + + public static final String JSON_PROPERTY_PRIMARY_CURRENCY = "primaryCurrency"; + private String primaryCurrency; + + public static final String JSON_PROPERTY_PROCESSING_TIER = "processingTier"; + private Integer processingTier; + + public static final String JSON_PROPERTY_VERIFICATION_PROFILE = "verificationProfile"; + private String verificationProfile; + + public CreateAccountHolderRequest() { + } + + public CreateAccountHolderRequest accountHolderCode(String accountHolderCode) { + this.accountHolderCode = accountHolderCode; + return this; + } + + /** + * Your unique identifier for the prospective account holder. The length must be between three (3) and fifty (50) characters long. Only letters, digits, and hyphens (-) are allowed. + * @return accountHolderCode + **/ + @ApiModelProperty(required = true, value = "Your unique identifier for the prospective account holder. The length must be between three (3) and fifty (50) characters long. Only letters, digits, and hyphens (-) are allowed.") + @JsonProperty(JSON_PROPERTY_ACCOUNT_HOLDER_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getAccountHolderCode() { + return accountHolderCode; + } + + + @JsonProperty(JSON_PROPERTY_ACCOUNT_HOLDER_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAccountHolderCode(String accountHolderCode) { + this.accountHolderCode = accountHolderCode; + } + + + public CreateAccountHolderRequest accountHolderDetails(AccountHolderDetails accountHolderDetails) { + this.accountHolderDetails = accountHolderDetails; + return this; + } + + /** + * Get accountHolderDetails + * @return accountHolderDetails + **/ + @ApiModelProperty(required = true, value = "") + @JsonProperty(JSON_PROPERTY_ACCOUNT_HOLDER_DETAILS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public AccountHolderDetails getAccountHolderDetails() { + return accountHolderDetails; + } + + + @JsonProperty(JSON_PROPERTY_ACCOUNT_HOLDER_DETAILS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAccountHolderDetails(AccountHolderDetails accountHolderDetails) { + this.accountHolderDetails = accountHolderDetails; + } + + + public CreateAccountHolderRequest createDefaultAccount(Boolean createDefaultAccount) { + this.createDefaultAccount = createDefaultAccount; + return this; + } + + /** + * If set to **true**, an account with the default options is automatically created for the account holder. By default, this field is set to **true**. + * @return createDefaultAccount + **/ + @ApiModelProperty(value = "If set to **true**, an account with the default options is automatically created for the account holder. By default, this field is set to **true**.") + @JsonProperty(JSON_PROPERTY_CREATE_DEFAULT_ACCOUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getCreateDefaultAccount() { + return createDefaultAccount; + } + + + @JsonProperty(JSON_PROPERTY_CREATE_DEFAULT_ACCOUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCreateDefaultAccount(Boolean createDefaultAccount) { + this.createDefaultAccount = createDefaultAccount; + } + + + public CreateAccountHolderRequest description(String description) { + this.description = description; + return this; + } + + /** + * A description of the prospective account holder, maximum 256 characters. You can use alphanumeric characters (A-Z, a-z, 0-9), white spaces, and underscores `_`. + * @return description + **/ + @ApiModelProperty(value = "A description of the prospective account holder, maximum 256 characters. You can use alphanumeric characters (A-Z, a-z, 0-9), white spaces, and underscores `_`.") + @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 CreateAccountHolderRequest legalEntity(LegalEntityEnum legalEntity) { + this.legalEntity = legalEntity; + return this; + } + + /** + * The legal entity type of the account holder. This determines the information that should be provided in the request. Possible values: **Business**, **Individual**, or **NonProfit**. * If set to **Business** or **NonProfit**, then `accountHolderDetails.businessDetails` must be provided, with at least one entry in the `accountHolderDetails.businessDetails.shareholders` list. * If set to **Individual**, then `accountHolderDetails.individualDetails` must be provided. + * @return legalEntity + **/ + @ApiModelProperty(required = true, value = "The legal entity type of the account holder. This determines the information that should be provided in the request. Possible values: **Business**, **Individual**, or **NonProfit**. * If set to **Business** or **NonProfit**, then `accountHolderDetails.businessDetails` must be provided, with at least one entry in the `accountHolderDetails.businessDetails.shareholders` list. * If set to **Individual**, then `accountHolderDetails.individualDetails` must be provided.") + @JsonProperty(JSON_PROPERTY_LEGAL_ENTITY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public LegalEntityEnum getLegalEntity() { + return legalEntity; + } + + + @JsonProperty(JSON_PROPERTY_LEGAL_ENTITY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setLegalEntity(LegalEntityEnum legalEntity) { + this.legalEntity = legalEntity; + } + + + public CreateAccountHolderRequest primaryCurrency(String primaryCurrency) { + this.primaryCurrency = primaryCurrency; + return this; + } + + /** + * The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes), with which the prospective account holder primarily deals. + * @return primaryCurrency + * @deprecated + **/ + @Deprecated + @ApiModelProperty(value = "The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes), with which the prospective account holder primarily deals.") + @JsonProperty(JSON_PROPERTY_PRIMARY_CURRENCY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getPrimaryCurrency() { + return primaryCurrency; + } + + + @Deprecated + @JsonProperty(JSON_PROPERTY_PRIMARY_CURRENCY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPrimaryCurrency(String primaryCurrency) { + this.primaryCurrency = primaryCurrency; + } + + + public CreateAccountHolderRequest processingTier(Integer processingTier) { + this.processingTier = processingTier; + return this; + } + + /** + * The starting [processing tier](https://docs.adyen.com/marketplaces-and-platforms/classic/onboarding-and-verification/precheck-kyc-information) for the prospective account holder. + * @return processingTier + **/ + @ApiModelProperty(value = "The starting [processing tier](https://docs.adyen.com/marketplaces-and-platforms/classic/onboarding-and-verification/precheck-kyc-information) for the prospective account holder.") + @JsonProperty(JSON_PROPERTY_PROCESSING_TIER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Integer getProcessingTier() { + return processingTier; + } + + + @JsonProperty(JSON_PROPERTY_PROCESSING_TIER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setProcessingTier(Integer processingTier) { + this.processingTier = processingTier; + } + + + public CreateAccountHolderRequest verificationProfile(String verificationProfile) { + this.verificationProfile = verificationProfile; + return this; + } + + /** + * The identifier of the profile that applies to this entity. + * @return verificationProfile + **/ + @ApiModelProperty(value = "The identifier of the profile that applies to this entity.") + @JsonProperty(JSON_PROPERTY_VERIFICATION_PROFILE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getVerificationProfile() { + return verificationProfile; + } + + + @JsonProperty(JSON_PROPERTY_VERIFICATION_PROFILE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setVerificationProfile(String verificationProfile) { + this.verificationProfile = verificationProfile; + } + + + /** + * Return true if this CreateAccountHolderRequest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateAccountHolderRequest createAccountHolderRequest = (CreateAccountHolderRequest) o; + return Objects.equals(this.accountHolderCode, createAccountHolderRequest.accountHolderCode) && + Objects.equals(this.accountHolderDetails, createAccountHolderRequest.accountHolderDetails) && + Objects.equals(this.createDefaultAccount, createAccountHolderRequest.createDefaultAccount) && + Objects.equals(this.description, createAccountHolderRequest.description) && + Objects.equals(this.legalEntity, createAccountHolderRequest.legalEntity) && + Objects.equals(this.primaryCurrency, createAccountHolderRequest.primaryCurrency) && + Objects.equals(this.processingTier, createAccountHolderRequest.processingTier) && + Objects.equals(this.verificationProfile, createAccountHolderRequest.verificationProfile); + } + + @Override + public int hashCode() { + return Objects.hash(accountHolderCode, accountHolderDetails, createDefaultAccount, description, legalEntity, primaryCurrency, processingTier, verificationProfile); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateAccountHolderRequest {\n"); + sb.append(" accountHolderCode: ").append(toIndentedString(accountHolderCode)).append("\n"); + sb.append(" accountHolderDetails: ").append(toIndentedString(accountHolderDetails)).append("\n"); + sb.append(" createDefaultAccount: ").append(toIndentedString(createDefaultAccount)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" legalEntity: ").append(toIndentedString(legalEntity)).append("\n"); + sb.append(" primaryCurrency: ").append(toIndentedString(primaryCurrency)).append("\n"); + sb.append(" processingTier: ").append(toIndentedString(processingTier)).append("\n"); + sb.append(" verificationProfile: ").append(toIndentedString(verificationProfile)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line 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 CreateAccountHolderRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of CreateAccountHolderRequest + * @throws JsonProcessingException if the JSON string is invalid with respect to CreateAccountHolderRequest + */ + public static CreateAccountHolderRequest fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, CreateAccountHolderRequest.class); + } +/** + * Convert an instance of CreateAccountHolderRequest 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/marketpayaccount/CreateAccountHolderResponse.java b/src/main/java/com/adyen/model/marketpayaccount/CreateAccountHolderResponse.java new file mode 100644 index 000000000..deafbdd4f --- /dev/null +++ b/src/main/java/com/adyen/model/marketpayaccount/CreateAccountHolderResponse.java @@ -0,0 +1,528 @@ +/* + * Account API + * This API is used for the classic integration. If you are just starting your implementation, refer to our [new integration guide](https://docs.adyen.com/marketplaces-and-platforms) instead. The Account API provides endpoints for managing account-related entities on your platform. These related entities include account holders, accounts, bank accounts, shareholders, and verification-related documents. The management operations include actions such as creation, retrieval, updating, and deletion of them. For more information, refer to our [documentation](https://docs.adyen.com/marketplaces-and-platforms/classic). ## Authentication Your Adyen contact will provide your API credential and an API key. To connect to the API, add an `X-API-Key` header with the API key as the value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: YOUR_API_KEY\" \\ ... ``` Alternatively, you can use the username and password to connect to the API using basic authentication. For example: ``` curl -U \"ws@MarketPlace.YOUR_PLATFORM_ACCOUNT\":\"YOUR_WS_PASSWORD\" \\ -H \"Content-Type: application/json\" \\ ... ``` When going live, you need to generate new web service user credentials to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning The Account API supports [versioning](https://docs.adyen.com/development-resources/versioning) using a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://cal-test.adyen.com/cal/services/Account/v6/createAccountHolder ``` + * + * The version of the OpenAPI document: 6 + * + * + * 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.marketpayaccount; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.adyen.model.marketpayaccount.AccountHolderDetails; +import com.adyen.model.marketpayaccount.AccountHolderStatus; +import com.adyen.model.marketpayaccount.ErrorFieldType; +import com.adyen.model.marketpayaccount.KYCVerificationResult; +import com.fasterxml.jackson.annotation.JsonInclude; +import 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; + + +/** + * CreateAccountHolderResponse + */ +@JsonPropertyOrder({ + CreateAccountHolderResponse.JSON_PROPERTY_ACCOUNT_CODE, + CreateAccountHolderResponse.JSON_PROPERTY_ACCOUNT_HOLDER_CODE, + CreateAccountHolderResponse.JSON_PROPERTY_ACCOUNT_HOLDER_DETAILS, + CreateAccountHolderResponse.JSON_PROPERTY_ACCOUNT_HOLDER_STATUS, + CreateAccountHolderResponse.JSON_PROPERTY_DESCRIPTION, + CreateAccountHolderResponse.JSON_PROPERTY_INVALID_FIELDS, + CreateAccountHolderResponse.JSON_PROPERTY_LEGAL_ENTITY, + CreateAccountHolderResponse.JSON_PROPERTY_PRIMARY_CURRENCY, + CreateAccountHolderResponse.JSON_PROPERTY_PSP_REFERENCE, + CreateAccountHolderResponse.JSON_PROPERTY_RESULT_CODE, + CreateAccountHolderResponse.JSON_PROPERTY_VERIFICATION, + CreateAccountHolderResponse.JSON_PROPERTY_VERIFICATION_PROFILE +}) + +public class CreateAccountHolderResponse { + public static final String JSON_PROPERTY_ACCOUNT_CODE = "accountCode"; + private String accountCode; + + public static final String JSON_PROPERTY_ACCOUNT_HOLDER_CODE = "accountHolderCode"; + private String accountHolderCode; + + public static final String JSON_PROPERTY_ACCOUNT_HOLDER_DETAILS = "accountHolderDetails"; + private AccountHolderDetails accountHolderDetails; + + public static final String JSON_PROPERTY_ACCOUNT_HOLDER_STATUS = "accountHolderStatus"; + private AccountHolderStatus accountHolderStatus; + + public static final String JSON_PROPERTY_DESCRIPTION = "description"; + private String description; + + public static final String JSON_PROPERTY_INVALID_FIELDS = "invalidFields"; + private List invalidFields = null; + + /** + * The type of legal entity of the new account holder. + */ + public enum LegalEntityEnum { + BUSINESS("Business"), + + INDIVIDUAL("Individual"), + + NONPROFIT("NonProfit"), + + PARTNERSHIP("Partnership"), + + PUBLICCOMPANY("PublicCompany"); + + private String value; + + LegalEntityEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static LegalEntityEnum fromValue(String value) { + for (LegalEntityEnum b : LegalEntityEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_LEGAL_ENTITY = "legalEntity"; + private LegalEntityEnum legalEntity; + + public static final String JSON_PROPERTY_PRIMARY_CURRENCY = "primaryCurrency"; + private String primaryCurrency; + + public static final String JSON_PROPERTY_PSP_REFERENCE = "pspReference"; + private String pspReference; + + public static final String JSON_PROPERTY_RESULT_CODE = "resultCode"; + private String resultCode; + + public static final String JSON_PROPERTY_VERIFICATION = "verification"; + private KYCVerificationResult verification; + + public static final String JSON_PROPERTY_VERIFICATION_PROFILE = "verificationProfile"; + private String verificationProfile; + + public CreateAccountHolderResponse() { + } + + public CreateAccountHolderResponse accountCode(String accountCode) { + this.accountCode = accountCode; + return this; + } + + /** + * The code of a new account created for the account holder. + * @return accountCode + **/ + @ApiModelProperty(value = "The code of a new account created for the account holder.") + @JsonProperty(JSON_PROPERTY_ACCOUNT_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getAccountCode() { + return accountCode; + } + + + @JsonProperty(JSON_PROPERTY_ACCOUNT_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAccountCode(String accountCode) { + this.accountCode = accountCode; + } + + + public CreateAccountHolderResponse accountHolderCode(String accountHolderCode) { + this.accountHolderCode = accountHolderCode; + return this; + } + + /** + * The code of the new account holder. + * @return accountHolderCode + **/ + @ApiModelProperty(value = "The code of the new account holder.") + @JsonProperty(JSON_PROPERTY_ACCOUNT_HOLDER_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getAccountHolderCode() { + return accountHolderCode; + } + + + @JsonProperty(JSON_PROPERTY_ACCOUNT_HOLDER_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAccountHolderCode(String accountHolderCode) { + this.accountHolderCode = accountHolderCode; + } + + + public CreateAccountHolderResponse accountHolderDetails(AccountHolderDetails accountHolderDetails) { + this.accountHolderDetails = accountHolderDetails; + return this; + } + + /** + * Get accountHolderDetails + * @return accountHolderDetails + **/ + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_ACCOUNT_HOLDER_DETAILS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public AccountHolderDetails getAccountHolderDetails() { + return accountHolderDetails; + } + + + @JsonProperty(JSON_PROPERTY_ACCOUNT_HOLDER_DETAILS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAccountHolderDetails(AccountHolderDetails accountHolderDetails) { + this.accountHolderDetails = accountHolderDetails; + } + + + public CreateAccountHolderResponse accountHolderStatus(AccountHolderStatus accountHolderStatus) { + this.accountHolderStatus = accountHolderStatus; + return this; + } + + /** + * Get accountHolderStatus + * @return accountHolderStatus + **/ + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_ACCOUNT_HOLDER_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public AccountHolderStatus getAccountHolderStatus() { + return accountHolderStatus; + } + + + @JsonProperty(JSON_PROPERTY_ACCOUNT_HOLDER_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAccountHolderStatus(AccountHolderStatus accountHolderStatus) { + this.accountHolderStatus = accountHolderStatus; + } + + + public CreateAccountHolderResponse description(String description) { + this.description = description; + return this; + } + + /** + * The description of the new account holder. + * @return description + **/ + @ApiModelProperty(value = "The description of the new account holder.") + @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 CreateAccountHolderResponse invalidFields(List invalidFields) { + this.invalidFields = invalidFields; + return this; + } + + public CreateAccountHolderResponse addInvalidFieldsItem(ErrorFieldType invalidFieldsItem) { + if (this.invalidFields == null) { + this.invalidFields = new ArrayList<>(); + } + this.invalidFields.add(invalidFieldsItem); + return this; + } + + /** + * A list of fields that caused the `/createAccountHolder` request to fail. + * @return invalidFields + **/ + @ApiModelProperty(value = "A list of fields that caused the `/createAccountHolder` request to fail.") + @JsonProperty(JSON_PROPERTY_INVALID_FIELDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getInvalidFields() { + return invalidFields; + } + + + @JsonProperty(JSON_PROPERTY_INVALID_FIELDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setInvalidFields(List invalidFields) { + this.invalidFields = invalidFields; + } + + + public CreateAccountHolderResponse legalEntity(LegalEntityEnum legalEntity) { + this.legalEntity = legalEntity; + return this; + } + + /** + * The type of legal entity of the new account holder. + * @return legalEntity + **/ + @ApiModelProperty(value = "The type of legal entity of the new account holder.") + @JsonProperty(JSON_PROPERTY_LEGAL_ENTITY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public LegalEntityEnum getLegalEntity() { + return legalEntity; + } + + + @JsonProperty(JSON_PROPERTY_LEGAL_ENTITY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setLegalEntity(LegalEntityEnum legalEntity) { + this.legalEntity = legalEntity; + } + + + public CreateAccountHolderResponse primaryCurrency(String primaryCurrency) { + this.primaryCurrency = primaryCurrency; + return this; + } + + /** + * The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes), with which the prospective account holder primarily deals. + * @return primaryCurrency + * @deprecated + **/ + @Deprecated + @ApiModelProperty(value = "The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes), with which the prospective account holder primarily deals.") + @JsonProperty(JSON_PROPERTY_PRIMARY_CURRENCY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getPrimaryCurrency() { + return primaryCurrency; + } + + + @Deprecated + @JsonProperty(JSON_PROPERTY_PRIMARY_CURRENCY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPrimaryCurrency(String primaryCurrency) { + this.primaryCurrency = primaryCurrency; + } + + + public CreateAccountHolderResponse pspReference(String pspReference) { + this.pspReference = pspReference; + return this; + } + + /** + * The reference of a request. Can be used to uniquely identify the request. + * @return pspReference + **/ + @ApiModelProperty(value = "The reference of a request. Can be used to uniquely identify the request.") + @JsonProperty(JSON_PROPERTY_PSP_REFERENCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getPspReference() { + return pspReference; + } + + + @JsonProperty(JSON_PROPERTY_PSP_REFERENCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPspReference(String pspReference) { + this.pspReference = pspReference; + } + + + public CreateAccountHolderResponse resultCode(String resultCode) { + this.resultCode = resultCode; + return this; + } + + /** + * The result code. + * @return resultCode + **/ + @ApiModelProperty(value = "The result code.") + @JsonProperty(JSON_PROPERTY_RESULT_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getResultCode() { + return resultCode; + } + + + @JsonProperty(JSON_PROPERTY_RESULT_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setResultCode(String resultCode) { + this.resultCode = resultCode; + } + + + public CreateAccountHolderResponse verification(KYCVerificationResult verification) { + this.verification = verification; + return this; + } + + /** + * Get verification + * @return verification + **/ + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_VERIFICATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public KYCVerificationResult getVerification() { + return verification; + } + + + @JsonProperty(JSON_PROPERTY_VERIFICATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setVerification(KYCVerificationResult verification) { + this.verification = verification; + } + + + public CreateAccountHolderResponse verificationProfile(String verificationProfile) { + this.verificationProfile = verificationProfile; + return this; + } + + /** + * The identifier of the profile that applies to this entity. + * @return verificationProfile + **/ + @ApiModelProperty(value = "The identifier of the profile that applies to this entity.") + @JsonProperty(JSON_PROPERTY_VERIFICATION_PROFILE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getVerificationProfile() { + return verificationProfile; + } + + + @JsonProperty(JSON_PROPERTY_VERIFICATION_PROFILE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setVerificationProfile(String verificationProfile) { + this.verificationProfile = verificationProfile; + } + + + /** + * Return true if this CreateAccountHolderResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateAccountHolderResponse createAccountHolderResponse = (CreateAccountHolderResponse) o; + return Objects.equals(this.accountCode, createAccountHolderResponse.accountCode) && + Objects.equals(this.accountHolderCode, createAccountHolderResponse.accountHolderCode) && + Objects.equals(this.accountHolderDetails, createAccountHolderResponse.accountHolderDetails) && + Objects.equals(this.accountHolderStatus, createAccountHolderResponse.accountHolderStatus) && + Objects.equals(this.description, createAccountHolderResponse.description) && + Objects.equals(this.invalidFields, createAccountHolderResponse.invalidFields) && + Objects.equals(this.legalEntity, createAccountHolderResponse.legalEntity) && + Objects.equals(this.primaryCurrency, createAccountHolderResponse.primaryCurrency) && + Objects.equals(this.pspReference, createAccountHolderResponse.pspReference) && + Objects.equals(this.resultCode, createAccountHolderResponse.resultCode) && + Objects.equals(this.verification, createAccountHolderResponse.verification) && + Objects.equals(this.verificationProfile, createAccountHolderResponse.verificationProfile); + } + + @Override + public int hashCode() { + return Objects.hash(accountCode, accountHolderCode, accountHolderDetails, accountHolderStatus, description, invalidFields, legalEntity, primaryCurrency, pspReference, resultCode, verification, verificationProfile); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateAccountHolderResponse {\n"); + sb.append(" accountCode: ").append(toIndentedString(accountCode)).append("\n"); + sb.append(" accountHolderCode: ").append(toIndentedString(accountHolderCode)).append("\n"); + sb.append(" accountHolderDetails: ").append(toIndentedString(accountHolderDetails)).append("\n"); + sb.append(" accountHolderStatus: ").append(toIndentedString(accountHolderStatus)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" invalidFields: ").append(toIndentedString(invalidFields)).append("\n"); + sb.append(" legalEntity: ").append(toIndentedString(legalEntity)).append("\n"); + sb.append(" primaryCurrency: ").append(toIndentedString(primaryCurrency)).append("\n"); + sb.append(" pspReference: ").append(toIndentedString(pspReference)).append("\n"); + sb.append(" resultCode: ").append(toIndentedString(resultCode)).append("\n"); + sb.append(" verification: ").append(toIndentedString(verification)).append("\n"); + sb.append(" verificationProfile: ").append(toIndentedString(verificationProfile)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line 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 CreateAccountHolderResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of CreateAccountHolderResponse + * @throws JsonProcessingException if the JSON string is invalid with respect to CreateAccountHolderResponse + */ + public static CreateAccountHolderResponse fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, CreateAccountHolderResponse.class); + } +/** + * Convert an instance of CreateAccountHolderResponse 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/marketpayaccount/CreateAccountRequest.java b/src/main/java/com/adyen/model/marketpayaccount/CreateAccountRequest.java new file mode 100644 index 000000000..4805b7c85 --- /dev/null +++ b/src/main/java/com/adyen/model/marketpayaccount/CreateAccountRequest.java @@ -0,0 +1,455 @@ +/* + * Account API + * This API is used for the classic integration. If you are just starting your implementation, refer to our [new integration guide](https://docs.adyen.com/marketplaces-and-platforms) instead. The Account API provides endpoints for managing account-related entities on your platform. These related entities include account holders, accounts, bank accounts, shareholders, and verification-related documents. The management operations include actions such as creation, retrieval, updating, and deletion of them. For more information, refer to our [documentation](https://docs.adyen.com/marketplaces-and-platforms/classic). ## Authentication Your Adyen contact will provide your API credential and an API key. To connect to the API, add an `X-API-Key` header with the API key as the value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: YOUR_API_KEY\" \\ ... ``` Alternatively, you can use the username and password to connect to the API using basic authentication. For example: ``` curl -U \"ws@MarketPlace.YOUR_PLATFORM_ACCOUNT\":\"YOUR_WS_PASSWORD\" \\ -H \"Content-Type: application/json\" \\ ... ``` When going live, you need to generate new web service user credentials to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning The Account API supports [versioning](https://docs.adyen.com/development-resources/versioning) using a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://cal-test.adyen.com/cal/services/Account/v6/createAccountHolder ``` + * + * The version of the OpenAPI document: 6 + * + * + * 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.marketpayaccount; + +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; + + +/** + * CreateAccountRequest + */ +@JsonPropertyOrder({ + CreateAccountRequest.JSON_PROPERTY_ACCOUNT_HOLDER_CODE, + CreateAccountRequest.JSON_PROPERTY_BANK_ACCOUNT_U_U_I_D, + CreateAccountRequest.JSON_PROPERTY_DESCRIPTION, + CreateAccountRequest.JSON_PROPERTY_METADATA, + CreateAccountRequest.JSON_PROPERTY_PAYOUT_METHOD_CODE, + CreateAccountRequest.JSON_PROPERTY_PAYOUT_SCHEDULE, + CreateAccountRequest.JSON_PROPERTY_PAYOUT_SCHEDULE_REASON, + CreateAccountRequest.JSON_PROPERTY_PAYOUT_SPEED +}) + +public class CreateAccountRequest { + public static final String JSON_PROPERTY_ACCOUNT_HOLDER_CODE = "accountHolderCode"; + private String accountHolderCode; + + public static final String JSON_PROPERTY_BANK_ACCOUNT_U_U_I_D = "bankAccountUUID"; + private String bankAccountUUID; + + public static final String JSON_PROPERTY_DESCRIPTION = "description"; + private String description; + + public static final String JSON_PROPERTY_METADATA = "metadata"; + private Map metadata = null; + + public static final String JSON_PROPERTY_PAYOUT_METHOD_CODE = "payoutMethodCode"; + private String payoutMethodCode; + + /** + * The payout schedule of the prospective account. >Permitted values: `DEFAULT`, `HOLD`, `DAILY`, `WEEKLY`, `MONTHLY`. + */ + public enum PayoutScheduleEnum { + BIWEEKLY_ON_1ST_AND_15TH_AT_MIDNIGHT("BIWEEKLY_ON_1ST_AND_15TH_AT_MIDNIGHT"), + + DAILY("DAILY"), + + DAILY_AU("DAILY_AU"), + + DAILY_EU("DAILY_EU"), + + DAILY_SG("DAILY_SG"), + + DAILY_US("DAILY_US"), + + HOLD("HOLD"), + + MONTHLY("MONTHLY"), + + WEEKLY("WEEKLY"), + + WEEKLY_MON_TO_FRI_AU("WEEKLY_MON_TO_FRI_AU"), + + WEEKLY_MON_TO_FRI_EU("WEEKLY_MON_TO_FRI_EU"), + + WEEKLY_MON_TO_FRI_US("WEEKLY_MON_TO_FRI_US"), + + WEEKLY_ON_TUE_FRI_MIDNIGHT("WEEKLY_ON_TUE_FRI_MIDNIGHT"), + + WEEKLY_SUN_TO_THU_AU("WEEKLY_SUN_TO_THU_AU"), + + WEEKLY_SUN_TO_THU_US("WEEKLY_SUN_TO_THU_US"); + + private String value; + + PayoutScheduleEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static PayoutScheduleEnum fromValue(String value) { + for (PayoutScheduleEnum b : PayoutScheduleEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_PAYOUT_SCHEDULE = "payoutSchedule"; + private PayoutScheduleEnum payoutSchedule; + + public static final String JSON_PROPERTY_PAYOUT_SCHEDULE_REASON = "payoutScheduleReason"; + private String payoutScheduleReason; + + /** + * Speed with which payouts for this account are processed. Permitted values: `STANDARD`, `SAME_DAY`. + */ + public enum PayoutSpeedEnum { + INSTANT("INSTANT"), + + SAME_DAY("SAME_DAY"), + + STANDARD("STANDARD"); + + private String value; + + PayoutSpeedEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static PayoutSpeedEnum fromValue(String value) { + for (PayoutSpeedEnum b : PayoutSpeedEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_PAYOUT_SPEED = "payoutSpeed"; + private PayoutSpeedEnum payoutSpeed = PayoutSpeedEnum.STANDARD; + + public CreateAccountRequest() { + } + + public CreateAccountRequest accountHolderCode(String accountHolderCode) { + this.accountHolderCode = accountHolderCode; + return this; + } + + /** + * The code of Account Holder under which to create the account. + * @return accountHolderCode + **/ + @ApiModelProperty(required = true, value = "The code of Account Holder under which to create the account.") + @JsonProperty(JSON_PROPERTY_ACCOUNT_HOLDER_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getAccountHolderCode() { + return accountHolderCode; + } + + + @JsonProperty(JSON_PROPERTY_ACCOUNT_HOLDER_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAccountHolderCode(String accountHolderCode) { + this.accountHolderCode = accountHolderCode; + } + + + public CreateAccountRequest bankAccountUUID(String bankAccountUUID) { + this.bankAccountUUID = bankAccountUUID; + return this; + } + + /** + * The bankAccountUUID of the bank account held by the account holder to couple the account with. Scheduled payouts in currencies matching the currency of this bank account will be sent to this bank account. Payouts in different currencies will be sent to a matching bank account of the account holder. + * @return bankAccountUUID + **/ + @ApiModelProperty(value = "The bankAccountUUID of the bank account held by the account holder to couple the account with. Scheduled payouts in currencies matching the currency of this bank account will be sent to this bank account. Payouts in different currencies will be sent to a matching bank account of the account holder.") + @JsonProperty(JSON_PROPERTY_BANK_ACCOUNT_U_U_I_D) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getBankAccountUUID() { + return bankAccountUUID; + } + + + @JsonProperty(JSON_PROPERTY_BANK_ACCOUNT_U_U_I_D) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setBankAccountUUID(String bankAccountUUID) { + this.bankAccountUUID = bankAccountUUID; + } + + + public CreateAccountRequest description(String description) { + this.description = description; + return this; + } + + /** + * A description of the account, maximum 256 characters. You can use alphanumeric characters (A-Z, a-z, 0-9), white spaces, and underscores `_`. + * @return description + **/ + @ApiModelProperty(value = "A description of the account, maximum 256 characters. You can use alphanumeric characters (A-Z, a-z, 0-9), white spaces, and underscores `_`.") + @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 CreateAccountRequest metadata(Map metadata) { + this.metadata = metadata; + return this; + } + + public CreateAccountRequest putMetadataItem(String key, String metadataItem) { + if (this.metadata == null) { + this.metadata = new HashMap<>(); + } + this.metadata.put(key, metadataItem); + return this; + } + + /** + * A set of key and value pairs for general use by the merchant. The keys do not have specific names and may be used for storing miscellaneous data as desired. > Note that during an update of metadata, the omission of existing key-value pairs will result in the deletion of those key-value pairs. + * @return metadata + **/ + @ApiModelProperty(value = "A set of key and value pairs for general use by the merchant. The keys do not have specific names and may be used for storing miscellaneous data as desired. > Note that during an update of metadata, the omission of existing key-value pairs will result in the deletion of those key-value pairs.") + @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 CreateAccountRequest payoutMethodCode(String payoutMethodCode) { + this.payoutMethodCode = payoutMethodCode; + return this; + } + + /** + * The payout method code held by the account holder to couple the account with. Scheduled card payouts will be sent using this payout method code. + * @return payoutMethodCode + **/ + @ApiModelProperty(value = "The payout method code held by the account holder to couple the account with. Scheduled card payouts will be sent using this payout method code.") + @JsonProperty(JSON_PROPERTY_PAYOUT_METHOD_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getPayoutMethodCode() { + return payoutMethodCode; + } + + + @JsonProperty(JSON_PROPERTY_PAYOUT_METHOD_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPayoutMethodCode(String payoutMethodCode) { + this.payoutMethodCode = payoutMethodCode; + } + + + public CreateAccountRequest payoutSchedule(PayoutScheduleEnum payoutSchedule) { + this.payoutSchedule = payoutSchedule; + return this; + } + + /** + * The payout schedule of the prospective account. >Permitted values: `DEFAULT`, `HOLD`, `DAILY`, `WEEKLY`, `MONTHLY`. + * @return payoutSchedule + **/ + @ApiModelProperty(value = "The payout schedule of the prospective account. >Permitted values: `DEFAULT`, `HOLD`, `DAILY`, `WEEKLY`, `MONTHLY`.") + @JsonProperty(JSON_PROPERTY_PAYOUT_SCHEDULE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public PayoutScheduleEnum getPayoutSchedule() { + return payoutSchedule; + } + + + @JsonProperty(JSON_PROPERTY_PAYOUT_SCHEDULE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPayoutSchedule(PayoutScheduleEnum payoutSchedule) { + this.payoutSchedule = payoutSchedule; + } + + + public CreateAccountRequest payoutScheduleReason(String payoutScheduleReason) { + this.payoutScheduleReason = payoutScheduleReason; + return this; + } + + /** + * The reason for the payout schedule choice. >Required if the payoutSchedule is `HOLD`. + * @return payoutScheduleReason + **/ + @ApiModelProperty(value = "The reason for the payout schedule choice. >Required if the payoutSchedule is `HOLD`.") + @JsonProperty(JSON_PROPERTY_PAYOUT_SCHEDULE_REASON) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getPayoutScheduleReason() { + return payoutScheduleReason; + } + + + @JsonProperty(JSON_PROPERTY_PAYOUT_SCHEDULE_REASON) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPayoutScheduleReason(String payoutScheduleReason) { + this.payoutScheduleReason = payoutScheduleReason; + } + + + public CreateAccountRequest payoutSpeed(PayoutSpeedEnum payoutSpeed) { + this.payoutSpeed = payoutSpeed; + return this; + } + + /** + * Speed with which payouts for this account are processed. Permitted values: `STANDARD`, `SAME_DAY`. + * @return payoutSpeed + **/ + @ApiModelProperty(value = "Speed with which payouts for this account are processed. Permitted values: `STANDARD`, `SAME_DAY`.") + @JsonProperty(JSON_PROPERTY_PAYOUT_SPEED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public PayoutSpeedEnum getPayoutSpeed() { + return payoutSpeed; + } + + + @JsonProperty(JSON_PROPERTY_PAYOUT_SPEED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPayoutSpeed(PayoutSpeedEnum payoutSpeed) { + this.payoutSpeed = payoutSpeed; + } + + + /** + * Return true if this CreateAccountRequest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateAccountRequest createAccountRequest = (CreateAccountRequest) o; + return Objects.equals(this.accountHolderCode, createAccountRequest.accountHolderCode) && + Objects.equals(this.bankAccountUUID, createAccountRequest.bankAccountUUID) && + Objects.equals(this.description, createAccountRequest.description) && + Objects.equals(this.metadata, createAccountRequest.metadata) && + Objects.equals(this.payoutMethodCode, createAccountRequest.payoutMethodCode) && + Objects.equals(this.payoutSchedule, createAccountRequest.payoutSchedule) && + Objects.equals(this.payoutScheduleReason, createAccountRequest.payoutScheduleReason) && + Objects.equals(this.payoutSpeed, createAccountRequest.payoutSpeed); + } + + @Override + public int hashCode() { + return Objects.hash(accountHolderCode, bankAccountUUID, description, metadata, payoutMethodCode, payoutSchedule, payoutScheduleReason, payoutSpeed); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateAccountRequest {\n"); + sb.append(" accountHolderCode: ").append(toIndentedString(accountHolderCode)).append("\n"); + sb.append(" bankAccountUUID: ").append(toIndentedString(bankAccountUUID)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" metadata: ").append(toIndentedString(metadata)).append("\n"); + sb.append(" payoutMethodCode: ").append(toIndentedString(payoutMethodCode)).append("\n"); + sb.append(" payoutSchedule: ").append(toIndentedString(payoutSchedule)).append("\n"); + sb.append(" payoutScheduleReason: ").append(toIndentedString(payoutScheduleReason)).append("\n"); + sb.append(" payoutSpeed: ").append(toIndentedString(payoutSpeed)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line 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 CreateAccountRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of CreateAccountRequest + * @throws JsonProcessingException if the JSON string is invalid with respect to CreateAccountRequest + */ + public static CreateAccountRequest fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, CreateAccountRequest.class); + } +/** + * Convert an instance of CreateAccountRequest 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/marketpayaccount/CreateAccountResponse.java b/src/main/java/com/adyen/model/marketpayaccount/CreateAccountResponse.java new file mode 100644 index 000000000..930d3f4ac --- /dev/null +++ b/src/main/java/com/adyen/model/marketpayaccount/CreateAccountResponse.java @@ -0,0 +1,568 @@ +/* + * Account API + * This API is used for the classic integration. If you are just starting your implementation, refer to our [new integration guide](https://docs.adyen.com/marketplaces-and-platforms) instead. The Account API provides endpoints for managing account-related entities on your platform. These related entities include account holders, accounts, bank accounts, shareholders, and verification-related documents. The management operations include actions such as creation, retrieval, updating, and deletion of them. For more information, refer to our [documentation](https://docs.adyen.com/marketplaces-and-platforms/classic). ## Authentication Your Adyen contact will provide your API credential and an API key. To connect to the API, add an `X-API-Key` header with the API key as the value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: YOUR_API_KEY\" \\ ... ``` Alternatively, you can use the username and password to connect to the API using basic authentication. For example: ``` curl -U \"ws@MarketPlace.YOUR_PLATFORM_ACCOUNT\":\"YOUR_WS_PASSWORD\" \\ -H \"Content-Type: application/json\" \\ ... ``` When going live, you need to generate new web service user credentials to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning The Account API supports [versioning](https://docs.adyen.com/development-resources/versioning) using a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://cal-test.adyen.com/cal/services/Account/v6/createAccountHolder ``` + * + * The version of the OpenAPI document: 6 + * + * + * 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.marketpayaccount; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.adyen.model.marketpayaccount.ErrorFieldType; +import com.adyen.model.marketpayaccount.PayoutScheduleResponse; +import com.fasterxml.jackson.annotation.JsonInclude; +import 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.HashMap; +import java.util.List; +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.core.JsonProcessingException; + + +/** + * CreateAccountResponse + */ +@JsonPropertyOrder({ + CreateAccountResponse.JSON_PROPERTY_ACCOUNT_CODE, + CreateAccountResponse.JSON_PROPERTY_ACCOUNT_HOLDER_CODE, + CreateAccountResponse.JSON_PROPERTY_BANK_ACCOUNT_U_U_I_D, + CreateAccountResponse.JSON_PROPERTY_DESCRIPTION, + CreateAccountResponse.JSON_PROPERTY_INVALID_FIELDS, + CreateAccountResponse.JSON_PROPERTY_METADATA, + CreateAccountResponse.JSON_PROPERTY_PAYOUT_METHOD_CODE, + CreateAccountResponse.JSON_PROPERTY_PAYOUT_SCHEDULE, + CreateAccountResponse.JSON_PROPERTY_PAYOUT_SPEED, + CreateAccountResponse.JSON_PROPERTY_PSP_REFERENCE, + CreateAccountResponse.JSON_PROPERTY_RESULT_CODE, + CreateAccountResponse.JSON_PROPERTY_STATUS +}) + +public class CreateAccountResponse { + public static final String JSON_PROPERTY_ACCOUNT_CODE = "accountCode"; + private String accountCode; + + public static final String JSON_PROPERTY_ACCOUNT_HOLDER_CODE = "accountHolderCode"; + private String accountHolderCode; + + public static final String JSON_PROPERTY_BANK_ACCOUNT_U_U_I_D = "bankAccountUUID"; + private String bankAccountUUID; + + public static final String JSON_PROPERTY_DESCRIPTION = "description"; + private String description; + + public static final String JSON_PROPERTY_INVALID_FIELDS = "invalidFields"; + private List invalidFields = null; + + public static final String JSON_PROPERTY_METADATA = "metadata"; + private Map metadata = null; + + public static final String JSON_PROPERTY_PAYOUT_METHOD_CODE = "payoutMethodCode"; + private String payoutMethodCode; + + public static final String JSON_PROPERTY_PAYOUT_SCHEDULE = "payoutSchedule"; + private PayoutScheduleResponse payoutSchedule; + + /** + * Speed with which payouts for this account are processed. Permitted values: `STANDARD`, `SAME_DAY`. + */ + public enum PayoutSpeedEnum { + INSTANT("INSTANT"), + + SAME_DAY("SAME_DAY"), + + STANDARD("STANDARD"); + + private String value; + + PayoutSpeedEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static PayoutSpeedEnum fromValue(String value) { + for (PayoutSpeedEnum b : PayoutSpeedEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_PAYOUT_SPEED = "payoutSpeed"; + private PayoutSpeedEnum payoutSpeed; + + public static final String JSON_PROPERTY_PSP_REFERENCE = "pspReference"; + private String pspReference; + + public static final String JSON_PROPERTY_RESULT_CODE = "resultCode"; + private String resultCode; + + /** + * The status of the account. >Permitted values: `Active`. + */ + public enum StatusEnum { + ACTIVE("Active"), + + CLOSED("Closed"), + + INACTIVE("Inactive"), + + SUSPENDED("Suspended"); + + 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 CreateAccountResponse() { + } + + public CreateAccountResponse accountCode(String accountCode) { + this.accountCode = accountCode; + return this; + } + + /** + * The code of the new account. + * @return accountCode + **/ + @ApiModelProperty(value = "The code of the new account.") + @JsonProperty(JSON_PROPERTY_ACCOUNT_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getAccountCode() { + return accountCode; + } + + + @JsonProperty(JSON_PROPERTY_ACCOUNT_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAccountCode(String accountCode) { + this.accountCode = accountCode; + } + + + public CreateAccountResponse accountHolderCode(String accountHolderCode) { + this.accountHolderCode = accountHolderCode; + return this; + } + + /** + * The code of the account holder. + * @return accountHolderCode + **/ + @ApiModelProperty(value = "The code of the account holder.") + @JsonProperty(JSON_PROPERTY_ACCOUNT_HOLDER_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getAccountHolderCode() { + return accountHolderCode; + } + + + @JsonProperty(JSON_PROPERTY_ACCOUNT_HOLDER_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAccountHolderCode(String accountHolderCode) { + this.accountHolderCode = accountHolderCode; + } + + + public CreateAccountResponse bankAccountUUID(String bankAccountUUID) { + this.bankAccountUUID = bankAccountUUID; + return this; + } + + /** + * The bankAccountUUID of the bank account held by the account holder to couple the account with. Scheduled payouts in currencies matching the currency of this bank account will be sent to this bank account. Payouts in different currencies will be sent to a matching bank account of the account holder. + * @return bankAccountUUID + **/ + @ApiModelProperty(value = "The bankAccountUUID of the bank account held by the account holder to couple the account with. Scheduled payouts in currencies matching the currency of this bank account will be sent to this bank account. Payouts in different currencies will be sent to a matching bank account of the account holder.") + @JsonProperty(JSON_PROPERTY_BANK_ACCOUNT_U_U_I_D) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getBankAccountUUID() { + return bankAccountUUID; + } + + + @JsonProperty(JSON_PROPERTY_BANK_ACCOUNT_U_U_I_D) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setBankAccountUUID(String bankAccountUUID) { + this.bankAccountUUID = bankAccountUUID; + } + + + public CreateAccountResponse description(String description) { + this.description = description; + return this; + } + + /** + * The description of the account. + * @return description + **/ + @ApiModelProperty(value = "The description of the account.") + @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 CreateAccountResponse invalidFields(List invalidFields) { + this.invalidFields = invalidFields; + return this; + } + + public CreateAccountResponse addInvalidFieldsItem(ErrorFieldType invalidFieldsItem) { + if (this.invalidFields == null) { + this.invalidFields = new ArrayList<>(); + } + this.invalidFields.add(invalidFieldsItem); + return this; + } + + /** + * A list of fields that caused the `/createAccount` request to fail. + * @return invalidFields + **/ + @ApiModelProperty(value = "A list of fields that caused the `/createAccount` request to fail.") + @JsonProperty(JSON_PROPERTY_INVALID_FIELDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getInvalidFields() { + return invalidFields; + } + + + @JsonProperty(JSON_PROPERTY_INVALID_FIELDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setInvalidFields(List invalidFields) { + this.invalidFields = invalidFields; + } + + + public CreateAccountResponse metadata(Map metadata) { + this.metadata = metadata; + return this; + } + + public CreateAccountResponse putMetadataItem(String key, String metadataItem) { + if (this.metadata == null) { + this.metadata = new HashMap<>(); + } + this.metadata.put(key, metadataItem); + return this; + } + + /** + * A set of key and value pairs containing metadata. + * @return metadata + **/ + @ApiModelProperty(value = "A set of key and value pairs containing metadata.") + @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 CreateAccountResponse payoutMethodCode(String payoutMethodCode) { + this.payoutMethodCode = payoutMethodCode; + return this; + } + + /** + * The payout method code held by the account holder to couple the account with. Scheduled card payouts will be sent using this payout method code. + * @return payoutMethodCode + **/ + @ApiModelProperty(value = "The payout method code held by the account holder to couple the account with. Scheduled card payouts will be sent using this payout method code.") + @JsonProperty(JSON_PROPERTY_PAYOUT_METHOD_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getPayoutMethodCode() { + return payoutMethodCode; + } + + + @JsonProperty(JSON_PROPERTY_PAYOUT_METHOD_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPayoutMethodCode(String payoutMethodCode) { + this.payoutMethodCode = payoutMethodCode; + } + + + public CreateAccountResponse payoutSchedule(PayoutScheduleResponse payoutSchedule) { + this.payoutSchedule = payoutSchedule; + return this; + } + + /** + * Get payoutSchedule + * @return payoutSchedule + **/ + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_PAYOUT_SCHEDULE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public PayoutScheduleResponse getPayoutSchedule() { + return payoutSchedule; + } + + + @JsonProperty(JSON_PROPERTY_PAYOUT_SCHEDULE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPayoutSchedule(PayoutScheduleResponse payoutSchedule) { + this.payoutSchedule = payoutSchedule; + } + + + public CreateAccountResponse payoutSpeed(PayoutSpeedEnum payoutSpeed) { + this.payoutSpeed = payoutSpeed; + return this; + } + + /** + * Speed with which payouts for this account are processed. Permitted values: `STANDARD`, `SAME_DAY`. + * @return payoutSpeed + **/ + @ApiModelProperty(value = "Speed with which payouts for this account are processed. Permitted values: `STANDARD`, `SAME_DAY`.") + @JsonProperty(JSON_PROPERTY_PAYOUT_SPEED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public PayoutSpeedEnum getPayoutSpeed() { + return payoutSpeed; + } + + + @JsonProperty(JSON_PROPERTY_PAYOUT_SPEED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPayoutSpeed(PayoutSpeedEnum payoutSpeed) { + this.payoutSpeed = payoutSpeed; + } + + + public CreateAccountResponse pspReference(String pspReference) { + this.pspReference = pspReference; + return this; + } + + /** + * The reference of a request. Can be used to uniquely identify the request. + * @return pspReference + **/ + @ApiModelProperty(value = "The reference of a request. Can be used to uniquely identify the request.") + @JsonProperty(JSON_PROPERTY_PSP_REFERENCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getPspReference() { + return pspReference; + } + + + @JsonProperty(JSON_PROPERTY_PSP_REFERENCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPspReference(String pspReference) { + this.pspReference = pspReference; + } + + + public CreateAccountResponse resultCode(String resultCode) { + this.resultCode = resultCode; + return this; + } + + /** + * The result code. + * @return resultCode + **/ + @ApiModelProperty(value = "The result code.") + @JsonProperty(JSON_PROPERTY_RESULT_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getResultCode() { + return resultCode; + } + + + @JsonProperty(JSON_PROPERTY_RESULT_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setResultCode(String resultCode) { + this.resultCode = resultCode; + } + + + public CreateAccountResponse status(StatusEnum status) { + this.status = status; + return this; + } + + /** + * The status of the account. >Permitted values: `Active`. + * @return status + **/ + @ApiModelProperty(value = "The status of the account. >Permitted values: `Active`.") + @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 CreateAccountResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateAccountResponse createAccountResponse = (CreateAccountResponse) o; + return Objects.equals(this.accountCode, createAccountResponse.accountCode) && + Objects.equals(this.accountHolderCode, createAccountResponse.accountHolderCode) && + Objects.equals(this.bankAccountUUID, createAccountResponse.bankAccountUUID) && + Objects.equals(this.description, createAccountResponse.description) && + Objects.equals(this.invalidFields, createAccountResponse.invalidFields) && + Objects.equals(this.metadata, createAccountResponse.metadata) && + Objects.equals(this.payoutMethodCode, createAccountResponse.payoutMethodCode) && + Objects.equals(this.payoutSchedule, createAccountResponse.payoutSchedule) && + Objects.equals(this.payoutSpeed, createAccountResponse.payoutSpeed) && + Objects.equals(this.pspReference, createAccountResponse.pspReference) && + Objects.equals(this.resultCode, createAccountResponse.resultCode) && + Objects.equals(this.status, createAccountResponse.status); + } + + @Override + public int hashCode() { + return Objects.hash(accountCode, accountHolderCode, bankAccountUUID, description, invalidFields, metadata, payoutMethodCode, payoutSchedule, payoutSpeed, pspReference, resultCode, status); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateAccountResponse {\n"); + sb.append(" accountCode: ").append(toIndentedString(accountCode)).append("\n"); + sb.append(" accountHolderCode: ").append(toIndentedString(accountHolderCode)).append("\n"); + sb.append(" bankAccountUUID: ").append(toIndentedString(bankAccountUUID)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" invalidFields: ").append(toIndentedString(invalidFields)).append("\n"); + sb.append(" metadata: ").append(toIndentedString(metadata)).append("\n"); + sb.append(" payoutMethodCode: ").append(toIndentedString(payoutMethodCode)).append("\n"); + sb.append(" payoutSchedule: ").append(toIndentedString(payoutSchedule)).append("\n"); + sb.append(" payoutSpeed: ").append(toIndentedString(payoutSpeed)).append("\n"); + sb.append(" pspReference: ").append(toIndentedString(pspReference)).append("\n"); + sb.append(" resultCode: ").append(toIndentedString(resultCode)).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 CreateAccountResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of CreateAccountResponse + * @throws JsonProcessingException if the JSON string is invalid with respect to CreateAccountResponse + */ + public static CreateAccountResponse fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, CreateAccountResponse.class); + } +/** + * Convert an instance of CreateAccountResponse 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/marketpayaccount/DeleteBankAccountRequest.java b/src/main/java/com/adyen/model/marketpayaccount/DeleteBankAccountRequest.java new file mode 100644 index 000000000..b53750250 --- /dev/null +++ b/src/main/java/com/adyen/model/marketpayaccount/DeleteBankAccountRequest.java @@ -0,0 +1,167 @@ +/* + * Account API + * This API is used for the classic integration. If you are just starting your implementation, refer to our [new integration guide](https://docs.adyen.com/marketplaces-and-platforms) instead. The Account API provides endpoints for managing account-related entities on your platform. These related entities include account holders, accounts, bank accounts, shareholders, and verification-related documents. The management operations include actions such as creation, retrieval, updating, and deletion of them. For more information, refer to our [documentation](https://docs.adyen.com/marketplaces-and-platforms/classic). ## Authentication Your Adyen contact will provide your API credential and an API key. To connect to the API, add an `X-API-Key` header with the API key as the value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: YOUR_API_KEY\" \\ ... ``` Alternatively, you can use the username and password to connect to the API using basic authentication. For example: ``` curl -U \"ws@MarketPlace.YOUR_PLATFORM_ACCOUNT\":\"YOUR_WS_PASSWORD\" \\ -H \"Content-Type: application/json\" \\ ... ``` When going live, you need to generate new web service user credentials to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning The Account API supports [versioning](https://docs.adyen.com/development-resources/versioning) using a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://cal-test.adyen.com/cal/services/Account/v6/createAccountHolder ``` + * + * The version of the OpenAPI document: 6 + * + * + * 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.marketpayaccount; + +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.ArrayList; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.core.JsonProcessingException; + + +/** + * DeleteBankAccountRequest + */ +@JsonPropertyOrder({ + DeleteBankAccountRequest.JSON_PROPERTY_ACCOUNT_HOLDER_CODE, + DeleteBankAccountRequest.JSON_PROPERTY_BANK_ACCOUNT_U_U_I_DS +}) + +public class DeleteBankAccountRequest { + public static final String JSON_PROPERTY_ACCOUNT_HOLDER_CODE = "accountHolderCode"; + private String accountHolderCode; + + public static final String JSON_PROPERTY_BANK_ACCOUNT_U_U_I_DS = "bankAccountUUIDs"; + private List bankAccountUUIDs = new ArrayList<>(); + + public DeleteBankAccountRequest() { + } + + public DeleteBankAccountRequest accountHolderCode(String accountHolderCode) { + this.accountHolderCode = accountHolderCode; + return this; + } + + /** + * The code of the Account Holder from which to delete the Bank Account(s). + * @return accountHolderCode + **/ + @ApiModelProperty(required = true, value = "The code of the Account Holder from which to delete the Bank Account(s).") + @JsonProperty(JSON_PROPERTY_ACCOUNT_HOLDER_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getAccountHolderCode() { + return accountHolderCode; + } + + + @JsonProperty(JSON_PROPERTY_ACCOUNT_HOLDER_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAccountHolderCode(String accountHolderCode) { + this.accountHolderCode = accountHolderCode; + } + + + public DeleteBankAccountRequest bankAccountUUIDs(List bankAccountUUIDs) { + this.bankAccountUUIDs = bankAccountUUIDs; + return this; + } + + public DeleteBankAccountRequest addBankAccountUUIDsItem(String bankAccountUUIDsItem) { + this.bankAccountUUIDs.add(bankAccountUUIDsItem); + return this; + } + + /** + * The code(s) of the Bank Accounts to be deleted. + * @return bankAccountUUIDs + **/ + @ApiModelProperty(required = true, value = "The code(s) of the Bank Accounts to be deleted.") + @JsonProperty(JSON_PROPERTY_BANK_ACCOUNT_U_U_I_DS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getBankAccountUUIDs() { + return bankAccountUUIDs; + } + + + @JsonProperty(JSON_PROPERTY_BANK_ACCOUNT_U_U_I_DS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setBankAccountUUIDs(List bankAccountUUIDs) { + this.bankAccountUUIDs = bankAccountUUIDs; + } + + + /** + * Return true if this DeleteBankAccountRequest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DeleteBankAccountRequest deleteBankAccountRequest = (DeleteBankAccountRequest) o; + return Objects.equals(this.accountHolderCode, deleteBankAccountRequest.accountHolderCode) && + Objects.equals(this.bankAccountUUIDs, deleteBankAccountRequest.bankAccountUUIDs); + } + + @Override + public int hashCode() { + return Objects.hash(accountHolderCode, bankAccountUUIDs); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DeleteBankAccountRequest {\n"); + sb.append(" accountHolderCode: ").append(toIndentedString(accountHolderCode)).append("\n"); + sb.append(" bankAccountUUIDs: ").append(toIndentedString(bankAccountUUIDs)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line 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 DeleteBankAccountRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of DeleteBankAccountRequest + * @throws JsonProcessingException if the JSON string is invalid with respect to DeleteBankAccountRequest + */ + public static DeleteBankAccountRequest fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, DeleteBankAccountRequest.class); + } +/** + * Convert an instance of DeleteBankAccountRequest 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/marketpayaccount/DeleteLegalArrangementRequest.java b/src/main/java/com/adyen/model/marketpayaccount/DeleteLegalArrangementRequest.java new file mode 100644 index 000000000..c96c53589 --- /dev/null +++ b/src/main/java/com/adyen/model/marketpayaccount/DeleteLegalArrangementRequest.java @@ -0,0 +1,168 @@ +/* + * Account API + * This API is used for the classic integration. If you are just starting your implementation, refer to our [new integration guide](https://docs.adyen.com/marketplaces-and-platforms) instead. The Account API provides endpoints for managing account-related entities on your platform. These related entities include account holders, accounts, bank accounts, shareholders, and verification-related documents. The management operations include actions such as creation, retrieval, updating, and deletion of them. For more information, refer to our [documentation](https://docs.adyen.com/marketplaces-and-platforms/classic). ## Authentication Your Adyen contact will provide your API credential and an API key. To connect to the API, add an `X-API-Key` header with the API key as the value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: YOUR_API_KEY\" \\ ... ``` Alternatively, you can use the username and password to connect to the API using basic authentication. For example: ``` curl -U \"ws@MarketPlace.YOUR_PLATFORM_ACCOUNT\":\"YOUR_WS_PASSWORD\" \\ -H \"Content-Type: application/json\" \\ ... ``` When going live, you need to generate new web service user credentials to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning The Account API supports [versioning](https://docs.adyen.com/development-resources/versioning) using a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://cal-test.adyen.com/cal/services/Account/v6/createAccountHolder ``` + * + * The version of the OpenAPI document: 6 + * + * + * 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.marketpayaccount; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.adyen.model.marketpayaccount.LegalArrangementRequest; +import com.fasterxml.jackson.annotation.JsonInclude; +import 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; + + +/** + * DeleteLegalArrangementRequest + */ +@JsonPropertyOrder({ + DeleteLegalArrangementRequest.JSON_PROPERTY_ACCOUNT_HOLDER_CODE, + DeleteLegalArrangementRequest.JSON_PROPERTY_LEGAL_ARRANGEMENTS +}) + +public class DeleteLegalArrangementRequest { + public static final String JSON_PROPERTY_ACCOUNT_HOLDER_CODE = "accountHolderCode"; + private String accountHolderCode; + + public static final String JSON_PROPERTY_LEGAL_ARRANGEMENTS = "legalArrangements"; + private List legalArrangements = new ArrayList<>(); + + public DeleteLegalArrangementRequest() { + } + + public DeleteLegalArrangementRequest accountHolderCode(String accountHolderCode) { + this.accountHolderCode = accountHolderCode; + return this; + } + + /** + * The code of the account holder. + * @return accountHolderCode + **/ + @ApiModelProperty(required = true, value = "The code of the account holder.") + @JsonProperty(JSON_PROPERTY_ACCOUNT_HOLDER_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getAccountHolderCode() { + return accountHolderCode; + } + + + @JsonProperty(JSON_PROPERTY_ACCOUNT_HOLDER_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAccountHolderCode(String accountHolderCode) { + this.accountHolderCode = accountHolderCode; + } + + + public DeleteLegalArrangementRequest legalArrangements(List legalArrangements) { + this.legalArrangements = legalArrangements; + return this; + } + + public DeleteLegalArrangementRequest addLegalArrangementsItem(LegalArrangementRequest legalArrangementsItem) { + this.legalArrangements.add(legalArrangementsItem); + return this; + } + + /** + * List of legal arrangements. + * @return legalArrangements + **/ + @ApiModelProperty(required = true, value = "List of legal arrangements.") + @JsonProperty(JSON_PROPERTY_LEGAL_ARRANGEMENTS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getLegalArrangements() { + return legalArrangements; + } + + + @JsonProperty(JSON_PROPERTY_LEGAL_ARRANGEMENTS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setLegalArrangements(List legalArrangements) { + this.legalArrangements = legalArrangements; + } + + + /** + * Return true if this DeleteLegalArrangementRequest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DeleteLegalArrangementRequest deleteLegalArrangementRequest = (DeleteLegalArrangementRequest) o; + return Objects.equals(this.accountHolderCode, deleteLegalArrangementRequest.accountHolderCode) && + Objects.equals(this.legalArrangements, deleteLegalArrangementRequest.legalArrangements); + } + + @Override + public int hashCode() { + return Objects.hash(accountHolderCode, legalArrangements); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DeleteLegalArrangementRequest {\n"); + sb.append(" accountHolderCode: ").append(toIndentedString(accountHolderCode)).append("\n"); + sb.append(" legalArrangements: ").append(toIndentedString(legalArrangements)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line 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 DeleteLegalArrangementRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of DeleteLegalArrangementRequest + * @throws JsonProcessingException if the JSON string is invalid with respect to DeleteLegalArrangementRequest + */ + public static DeleteLegalArrangementRequest fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, DeleteLegalArrangementRequest.class); + } +/** + * Convert an instance of DeleteLegalArrangementRequest 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/marketpayaccount/DeletePayoutMethodRequest.java b/src/main/java/com/adyen/model/marketpayaccount/DeletePayoutMethodRequest.java new file mode 100644 index 000000000..54e9be9d8 --- /dev/null +++ b/src/main/java/com/adyen/model/marketpayaccount/DeletePayoutMethodRequest.java @@ -0,0 +1,167 @@ +/* + * Account API + * This API is used for the classic integration. If you are just starting your implementation, refer to our [new integration guide](https://docs.adyen.com/marketplaces-and-platforms) instead. The Account API provides endpoints for managing account-related entities on your platform. These related entities include account holders, accounts, bank accounts, shareholders, and verification-related documents. The management operations include actions such as creation, retrieval, updating, and deletion of them. For more information, refer to our [documentation](https://docs.adyen.com/marketplaces-and-platforms/classic). ## Authentication Your Adyen contact will provide your API credential and an API key. To connect to the API, add an `X-API-Key` header with the API key as the value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: YOUR_API_KEY\" \\ ... ``` Alternatively, you can use the username and password to connect to the API using basic authentication. For example: ``` curl -U \"ws@MarketPlace.YOUR_PLATFORM_ACCOUNT\":\"YOUR_WS_PASSWORD\" \\ -H \"Content-Type: application/json\" \\ ... ``` When going live, you need to generate new web service user credentials to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning The Account API supports [versioning](https://docs.adyen.com/development-resources/versioning) using a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://cal-test.adyen.com/cal/services/Account/v6/createAccountHolder ``` + * + * The version of the OpenAPI document: 6 + * + * + * 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.marketpayaccount; + +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.ArrayList; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.core.JsonProcessingException; + + +/** + * DeletePayoutMethodRequest + */ +@JsonPropertyOrder({ + DeletePayoutMethodRequest.JSON_PROPERTY_ACCOUNT_HOLDER_CODE, + DeletePayoutMethodRequest.JSON_PROPERTY_PAYOUT_METHOD_CODES +}) + +public class DeletePayoutMethodRequest { + public static final String JSON_PROPERTY_ACCOUNT_HOLDER_CODE = "accountHolderCode"; + private String accountHolderCode; + + public static final String JSON_PROPERTY_PAYOUT_METHOD_CODES = "payoutMethodCodes"; + private List payoutMethodCodes = new ArrayList<>(); + + public DeletePayoutMethodRequest() { + } + + public DeletePayoutMethodRequest accountHolderCode(String accountHolderCode) { + this.accountHolderCode = accountHolderCode; + return this; + } + + /** + * The code of the account holder, from which to delete the payout methods. + * @return accountHolderCode + **/ + @ApiModelProperty(required = true, value = "The code of the account holder, from which to delete the payout methods.") + @JsonProperty(JSON_PROPERTY_ACCOUNT_HOLDER_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getAccountHolderCode() { + return accountHolderCode; + } + + + @JsonProperty(JSON_PROPERTY_ACCOUNT_HOLDER_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAccountHolderCode(String accountHolderCode) { + this.accountHolderCode = accountHolderCode; + } + + + public DeletePayoutMethodRequest payoutMethodCodes(List payoutMethodCodes) { + this.payoutMethodCodes = payoutMethodCodes; + return this; + } + + public DeletePayoutMethodRequest addPayoutMethodCodesItem(String payoutMethodCodesItem) { + this.payoutMethodCodes.add(payoutMethodCodesItem); + return this; + } + + /** + * The codes of the payout methods to be deleted. + * @return payoutMethodCodes + **/ + @ApiModelProperty(required = true, value = "The codes of the payout methods to be deleted.") + @JsonProperty(JSON_PROPERTY_PAYOUT_METHOD_CODES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getPayoutMethodCodes() { + return payoutMethodCodes; + } + + + @JsonProperty(JSON_PROPERTY_PAYOUT_METHOD_CODES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPayoutMethodCodes(List payoutMethodCodes) { + this.payoutMethodCodes = payoutMethodCodes; + } + + + /** + * Return true if this DeletePayoutMethodRequest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DeletePayoutMethodRequest deletePayoutMethodRequest = (DeletePayoutMethodRequest) o; + return Objects.equals(this.accountHolderCode, deletePayoutMethodRequest.accountHolderCode) && + Objects.equals(this.payoutMethodCodes, deletePayoutMethodRequest.payoutMethodCodes); + } + + @Override + public int hashCode() { + return Objects.hash(accountHolderCode, payoutMethodCodes); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DeletePayoutMethodRequest {\n"); + sb.append(" accountHolderCode: ").append(toIndentedString(accountHolderCode)).append("\n"); + sb.append(" payoutMethodCodes: ").append(toIndentedString(payoutMethodCodes)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line 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 DeletePayoutMethodRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of DeletePayoutMethodRequest + * @throws JsonProcessingException if the JSON string is invalid with respect to DeletePayoutMethodRequest + */ + public static DeletePayoutMethodRequest fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, DeletePayoutMethodRequest.class); + } +/** + * Convert an instance of DeletePayoutMethodRequest 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/marketpayaccount/DeleteShareholderRequest.java b/src/main/java/com/adyen/model/marketpayaccount/DeleteShareholderRequest.java new file mode 100644 index 000000000..eed53bd75 --- /dev/null +++ b/src/main/java/com/adyen/model/marketpayaccount/DeleteShareholderRequest.java @@ -0,0 +1,167 @@ +/* + * Account API + * This API is used for the classic integration. If you are just starting your implementation, refer to our [new integration guide](https://docs.adyen.com/marketplaces-and-platforms) instead. The Account API provides endpoints for managing account-related entities on your platform. These related entities include account holders, accounts, bank accounts, shareholders, and verification-related documents. The management operations include actions such as creation, retrieval, updating, and deletion of them. For more information, refer to our [documentation](https://docs.adyen.com/marketplaces-and-platforms/classic). ## Authentication Your Adyen contact will provide your API credential and an API key. To connect to the API, add an `X-API-Key` header with the API key as the value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: YOUR_API_KEY\" \\ ... ``` Alternatively, you can use the username and password to connect to the API using basic authentication. For example: ``` curl -U \"ws@MarketPlace.YOUR_PLATFORM_ACCOUNT\":\"YOUR_WS_PASSWORD\" \\ -H \"Content-Type: application/json\" \\ ... ``` When going live, you need to generate new web service user credentials to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning The Account API supports [versioning](https://docs.adyen.com/development-resources/versioning) using a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://cal-test.adyen.com/cal/services/Account/v6/createAccountHolder ``` + * + * The version of the OpenAPI document: 6 + * + * + * 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.marketpayaccount; + +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.ArrayList; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.core.JsonProcessingException; + + +/** + * DeleteShareholderRequest + */ +@JsonPropertyOrder({ + DeleteShareholderRequest.JSON_PROPERTY_ACCOUNT_HOLDER_CODE, + DeleteShareholderRequest.JSON_PROPERTY_SHAREHOLDER_CODES +}) + +public class DeleteShareholderRequest { + public static final String JSON_PROPERTY_ACCOUNT_HOLDER_CODE = "accountHolderCode"; + private String accountHolderCode; + + public static final String JSON_PROPERTY_SHAREHOLDER_CODES = "shareholderCodes"; + private List shareholderCodes = new ArrayList<>(); + + public DeleteShareholderRequest() { + } + + public DeleteShareholderRequest accountHolderCode(String accountHolderCode) { + this.accountHolderCode = accountHolderCode; + return this; + } + + /** + * The code of the Account Holder from which to delete the Shareholders. + * @return accountHolderCode + **/ + @ApiModelProperty(required = true, value = "The code of the Account Holder from which to delete the Shareholders.") + @JsonProperty(JSON_PROPERTY_ACCOUNT_HOLDER_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getAccountHolderCode() { + return accountHolderCode; + } + + + @JsonProperty(JSON_PROPERTY_ACCOUNT_HOLDER_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAccountHolderCode(String accountHolderCode) { + this.accountHolderCode = accountHolderCode; + } + + + public DeleteShareholderRequest shareholderCodes(List shareholderCodes) { + this.shareholderCodes = shareholderCodes; + return this; + } + + public DeleteShareholderRequest addShareholderCodesItem(String shareholderCodesItem) { + this.shareholderCodes.add(shareholderCodesItem); + return this; + } + + /** + * The code(s) of the Shareholders to be deleted. + * @return shareholderCodes + **/ + @ApiModelProperty(required = true, value = "The code(s) of the Shareholders to be deleted.") + @JsonProperty(JSON_PROPERTY_SHAREHOLDER_CODES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getShareholderCodes() { + return shareholderCodes; + } + + + @JsonProperty(JSON_PROPERTY_SHAREHOLDER_CODES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setShareholderCodes(List shareholderCodes) { + this.shareholderCodes = shareholderCodes; + } + + + /** + * Return true if this DeleteShareholderRequest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DeleteShareholderRequest deleteShareholderRequest = (DeleteShareholderRequest) o; + return Objects.equals(this.accountHolderCode, deleteShareholderRequest.accountHolderCode) && + Objects.equals(this.shareholderCodes, deleteShareholderRequest.shareholderCodes); + } + + @Override + public int hashCode() { + return Objects.hash(accountHolderCode, shareholderCodes); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DeleteShareholderRequest {\n"); + sb.append(" accountHolderCode: ").append(toIndentedString(accountHolderCode)).append("\n"); + sb.append(" shareholderCodes: ").append(toIndentedString(shareholderCodes)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line 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 DeleteShareholderRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of DeleteShareholderRequest + * @throws JsonProcessingException if the JSON string is invalid with respect to DeleteShareholderRequest + */ + public static DeleteShareholderRequest fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, DeleteShareholderRequest.class); + } +/** + * Convert an instance of DeleteShareholderRequest 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/marketpayaccount/DeleteSignatoriesRequest.java b/src/main/java/com/adyen/model/marketpayaccount/DeleteSignatoriesRequest.java new file mode 100644 index 000000000..348271c6b --- /dev/null +++ b/src/main/java/com/adyen/model/marketpayaccount/DeleteSignatoriesRequest.java @@ -0,0 +1,167 @@ +/* + * Account API + * This API is used for the classic integration. If you are just starting your implementation, refer to our [new integration guide](https://docs.adyen.com/marketplaces-and-platforms) instead. The Account API provides endpoints for managing account-related entities on your platform. These related entities include account holders, accounts, bank accounts, shareholders, and verification-related documents. The management operations include actions such as creation, retrieval, updating, and deletion of them. For more information, refer to our [documentation](https://docs.adyen.com/marketplaces-and-platforms/classic). ## Authentication Your Adyen contact will provide your API credential and an API key. To connect to the API, add an `X-API-Key` header with the API key as the value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: YOUR_API_KEY\" \\ ... ``` Alternatively, you can use the username and password to connect to the API using basic authentication. For example: ``` curl -U \"ws@MarketPlace.YOUR_PLATFORM_ACCOUNT\":\"YOUR_WS_PASSWORD\" \\ -H \"Content-Type: application/json\" \\ ... ``` When going live, you need to generate new web service user credentials to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning The Account API supports [versioning](https://docs.adyen.com/development-resources/versioning) using a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://cal-test.adyen.com/cal/services/Account/v6/createAccountHolder ``` + * + * The version of the OpenAPI document: 6 + * + * + * 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.marketpayaccount; + +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.ArrayList; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.core.JsonProcessingException; + + +/** + * DeleteSignatoriesRequest + */ +@JsonPropertyOrder({ + DeleteSignatoriesRequest.JSON_PROPERTY_ACCOUNT_HOLDER_CODE, + DeleteSignatoriesRequest.JSON_PROPERTY_SIGNATORY_CODES +}) + +public class DeleteSignatoriesRequest { + public static final String JSON_PROPERTY_ACCOUNT_HOLDER_CODE = "accountHolderCode"; + private String accountHolderCode; + + public static final String JSON_PROPERTY_SIGNATORY_CODES = "signatoryCodes"; + private List signatoryCodes = new ArrayList<>(); + + public DeleteSignatoriesRequest() { + } + + public DeleteSignatoriesRequest accountHolderCode(String accountHolderCode) { + this.accountHolderCode = accountHolderCode; + return this; + } + + /** + * The code of the account holder from which to delete the signatories. + * @return accountHolderCode + **/ + @ApiModelProperty(required = true, value = "The code of the account holder from which to delete the signatories.") + @JsonProperty(JSON_PROPERTY_ACCOUNT_HOLDER_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getAccountHolderCode() { + return accountHolderCode; + } + + + @JsonProperty(JSON_PROPERTY_ACCOUNT_HOLDER_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAccountHolderCode(String accountHolderCode) { + this.accountHolderCode = accountHolderCode; + } + + + public DeleteSignatoriesRequest signatoryCodes(List signatoryCodes) { + this.signatoryCodes = signatoryCodes; + return this; + } + + public DeleteSignatoriesRequest addSignatoryCodesItem(String signatoryCodesItem) { + this.signatoryCodes.add(signatoryCodesItem); + return this; + } + + /** + * Array of codes of the signatories to be deleted. + * @return signatoryCodes + **/ + @ApiModelProperty(required = true, value = "Array of codes of the signatories to be deleted.") + @JsonProperty(JSON_PROPERTY_SIGNATORY_CODES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getSignatoryCodes() { + return signatoryCodes; + } + + + @JsonProperty(JSON_PROPERTY_SIGNATORY_CODES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSignatoryCodes(List signatoryCodes) { + this.signatoryCodes = signatoryCodes; + } + + + /** + * Return true if this DeleteSignatoriesRequest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DeleteSignatoriesRequest deleteSignatoriesRequest = (DeleteSignatoriesRequest) o; + return Objects.equals(this.accountHolderCode, deleteSignatoriesRequest.accountHolderCode) && + Objects.equals(this.signatoryCodes, deleteSignatoriesRequest.signatoryCodes); + } + + @Override + public int hashCode() { + return Objects.hash(accountHolderCode, signatoryCodes); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DeleteSignatoriesRequest {\n"); + sb.append(" accountHolderCode: ").append(toIndentedString(accountHolderCode)).append("\n"); + sb.append(" signatoryCodes: ").append(toIndentedString(signatoryCodes)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line 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 DeleteSignatoriesRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of DeleteSignatoriesRequest + * @throws JsonProcessingException if the JSON string is invalid with respect to DeleteSignatoriesRequest + */ + public static DeleteSignatoriesRequest fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, DeleteSignatoriesRequest.class); + } +/** + * Convert an instance of DeleteSignatoriesRequest 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/marketpayaccount/DocumentDetail.java b/src/main/java/com/adyen/model/marketpayaccount/DocumentDetail.java new file mode 100644 index 000000000..274874811 --- /dev/null +++ b/src/main/java/com/adyen/model/marketpayaccount/DocumentDetail.java @@ -0,0 +1,436 @@ +/* + * Account API + * This API is used for the classic integration. If you are just starting your implementation, refer to our [new integration guide](https://docs.adyen.com/marketplaces-and-platforms) instead. The Account API provides endpoints for managing account-related entities on your platform. These related entities include account holders, accounts, bank accounts, shareholders, and verification-related documents. The management operations include actions such as creation, retrieval, updating, and deletion of them. For more information, refer to our [documentation](https://docs.adyen.com/marketplaces-and-platforms/classic). ## Authentication Your Adyen contact will provide your API credential and an API key. To connect to the API, add an `X-API-Key` header with the API key as the value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: YOUR_API_KEY\" \\ ... ``` Alternatively, you can use the username and password to connect to the API using basic authentication. For example: ``` curl -U \"ws@MarketPlace.YOUR_PLATFORM_ACCOUNT\":\"YOUR_WS_PASSWORD\" \\ -H \"Content-Type: application/json\" \\ ... ``` When going live, you need to generate new web service user credentials to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning The Account API supports [versioning](https://docs.adyen.com/development-resources/versioning) using a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://cal-test.adyen.com/cal/services/Account/v6/createAccountHolder ``` + * + * The version of the OpenAPI document: 6 + * + * + * 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.marketpayaccount; + +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; + + +/** + * DocumentDetail + */ +@JsonPropertyOrder({ + DocumentDetail.JSON_PROPERTY_ACCOUNT_HOLDER_CODE, + DocumentDetail.JSON_PROPERTY_BANK_ACCOUNT_U_U_I_D, + DocumentDetail.JSON_PROPERTY_DESCRIPTION, + DocumentDetail.JSON_PROPERTY_DOCUMENT_TYPE, + DocumentDetail.JSON_PROPERTY_FILENAME, + DocumentDetail.JSON_PROPERTY_LEGAL_ARRANGEMENT_CODE, + DocumentDetail.JSON_PROPERTY_LEGAL_ARRANGEMENT_ENTITY_CODE, + DocumentDetail.JSON_PROPERTY_SHAREHOLDER_CODE, + DocumentDetail.JSON_PROPERTY_SIGNATORY_CODE +}) + +public class DocumentDetail { + public static final String JSON_PROPERTY_ACCOUNT_HOLDER_CODE = "accountHolderCode"; + private String accountHolderCode; + + public static final String JSON_PROPERTY_BANK_ACCOUNT_U_U_I_D = "bankAccountUUID"; + private String bankAccountUUID; + + public static final String JSON_PROPERTY_DESCRIPTION = "description"; + private String description; + + /** + * The type of the document. Refer to [Verification checks](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-checks) for details on when each document type should be submitted and for the accepted file formats. Permitted values: * **BANK_STATEMENT**: A file containing a bank statement or other document proving ownership of a specific bank account. * **COMPANY_REGISTRATION_SCREENING** (Supported from v5 and later): A file containing a company registration document. * **CONSTITUTIONAL_DOCUMENT**: A file containing information about the account holder's legal arrangement. * **PASSPORT**: A file containing the identity page(s) of a passport. * **ID_CARD_FRONT**: A file containing only the front of the ID card. In order for a document to be usable, both the **ID_CARD_FRONT** and **ID_CARD_BACK** must be submitted. * **ID_CARD_BACK**: A file containing only the back of the ID card. In order for a document to be usable, both the **ID_CARD_FRONT** and **ID_CARD_BACK** must be submitted. * **DRIVING_LICENCE_FRONT**: A file containing only the front of the driving licence. In order for a document to be usable, both the **DRIVING_LICENCE_FRONT** and **DRIVING_LICENCE_BACK** must be submitted. * **DRIVING_LICENCE_BACK**: A file containing only the back of the driving licence. In order for a document to be usable, both the **DRIVING_LICENCE_FRONT** and **DRIVING_LICENCE_FRONT** must be submitted. + */ + public enum DocumentTypeEnum { + BANK_STATEMENT("BANK_STATEMENT"), + + BSN("BSN"), + + COMPANY_REGISTRATION_SCREENING("COMPANY_REGISTRATION_SCREENING"), + + CONSTITUTIONAL_DOCUMENT("CONSTITUTIONAL_DOCUMENT"), + + DRIVING_LICENCE("DRIVING_LICENCE"), + + DRIVING_LICENCE_BACK("DRIVING_LICENCE_BACK"), + + DRIVING_LICENCE_FRONT("DRIVING_LICENCE_FRONT"), + + ID_CARD("ID_CARD"), + + ID_CARD_BACK("ID_CARD_BACK"), + + ID_CARD_FRONT("ID_CARD_FRONT"), + + PASSPORT("PASSPORT"), + + PROOF_OF_RESIDENCY("PROOF_OF_RESIDENCY"), + + SSN("SSN"), + + SUPPORTING_DOCUMENTS("SUPPORTING_DOCUMENTS"); + + private String value; + + DocumentTypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static DocumentTypeEnum fromValue(String value) { + for (DocumentTypeEnum b : DocumentTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_DOCUMENT_TYPE = "documentType"; + private DocumentTypeEnum documentType; + + public static final String JSON_PROPERTY_FILENAME = "filename"; + private String filename; + + public static final String JSON_PROPERTY_LEGAL_ARRANGEMENT_CODE = "legalArrangementCode"; + private String legalArrangementCode; + + public static final String JSON_PROPERTY_LEGAL_ARRANGEMENT_ENTITY_CODE = "legalArrangementEntityCode"; + private String legalArrangementEntityCode; + + public static final String JSON_PROPERTY_SHAREHOLDER_CODE = "shareholderCode"; + private String shareholderCode; + + public static final String JSON_PROPERTY_SIGNATORY_CODE = "signatoryCode"; + private String signatoryCode; + + public DocumentDetail() { + } + + public DocumentDetail accountHolderCode(String accountHolderCode) { + this.accountHolderCode = accountHolderCode; + return this; + } + + /** + * The code of account holder, to which the document applies. + * @return accountHolderCode + **/ + @ApiModelProperty(value = "The code of account holder, to which the document applies.") + @JsonProperty(JSON_PROPERTY_ACCOUNT_HOLDER_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getAccountHolderCode() { + return accountHolderCode; + } + + + @JsonProperty(JSON_PROPERTY_ACCOUNT_HOLDER_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAccountHolderCode(String accountHolderCode) { + this.accountHolderCode = accountHolderCode; + } + + + public DocumentDetail bankAccountUUID(String bankAccountUUID) { + this.bankAccountUUID = bankAccountUUID; + return this; + } + + /** + * The Adyen-generated [`bankAccountUUID`](https://docs.adyen.com/api-explorer/#/Account/latest/post/createAccountHolder__resParam_accountHolderDetails-bankAccountDetails-bankAccountUUID) to which the document must be linked. Refer to [Bank account check](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-checks/bank-account-check#uploading-a-bank-statement) for details on when a document should be submitted. >Required if the `documentType` is **BANK_STATEMENT**, where a document is being submitted in order to verify a bank account. + * @return bankAccountUUID + **/ + @ApiModelProperty(value = "The Adyen-generated [`bankAccountUUID`](https://docs.adyen.com/api-explorer/#/Account/latest/post/createAccountHolder__resParam_accountHolderDetails-bankAccountDetails-bankAccountUUID) to which the document must be linked. Refer to [Bank account check](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-checks/bank-account-check#uploading-a-bank-statement) for details on when a document should be submitted. >Required if the `documentType` is **BANK_STATEMENT**, where a document is being submitted in order to verify a bank account. ") + @JsonProperty(JSON_PROPERTY_BANK_ACCOUNT_U_U_I_D) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getBankAccountUUID() { + return bankAccountUUID; + } + + + @JsonProperty(JSON_PROPERTY_BANK_ACCOUNT_U_U_I_D) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setBankAccountUUID(String bankAccountUUID) { + this.bankAccountUUID = bankAccountUUID; + } + + + public DocumentDetail description(String description) { + this.description = description; + return this; + } + + /** + * Description of the document. + * @return description + **/ + @ApiModelProperty(value = "Description of the document.") + @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 DocumentDetail documentType(DocumentTypeEnum documentType) { + this.documentType = documentType; + return this; + } + + /** + * The type of the document. Refer to [Verification checks](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-checks) for details on when each document type should be submitted and for the accepted file formats. Permitted values: * **BANK_STATEMENT**: A file containing a bank statement or other document proving ownership of a specific bank account. * **COMPANY_REGISTRATION_SCREENING** (Supported from v5 and later): A file containing a company registration document. * **CONSTITUTIONAL_DOCUMENT**: A file containing information about the account holder's legal arrangement. * **PASSPORT**: A file containing the identity page(s) of a passport. * **ID_CARD_FRONT**: A file containing only the front of the ID card. In order for a document to be usable, both the **ID_CARD_FRONT** and **ID_CARD_BACK** must be submitted. * **ID_CARD_BACK**: A file containing only the back of the ID card. In order for a document to be usable, both the **ID_CARD_FRONT** and **ID_CARD_BACK** must be submitted. * **DRIVING_LICENCE_FRONT**: A file containing only the front of the driving licence. In order for a document to be usable, both the **DRIVING_LICENCE_FRONT** and **DRIVING_LICENCE_BACK** must be submitted. * **DRIVING_LICENCE_BACK**: A file containing only the back of the driving licence. In order for a document to be usable, both the **DRIVING_LICENCE_FRONT** and **DRIVING_LICENCE_FRONT** must be submitted. + * @return documentType + **/ + @ApiModelProperty(required = true, value = "The type of the document. Refer to [Verification checks](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-checks) for details on when each document type should be submitted and for the accepted file formats. Permitted values: * **BANK_STATEMENT**: A file containing a bank statement or other document proving ownership of a specific bank account. * **COMPANY_REGISTRATION_SCREENING** (Supported from v5 and later): A file containing a company registration document. * **CONSTITUTIONAL_DOCUMENT**: A file containing information about the account holder's legal arrangement. * **PASSPORT**: A file containing the identity page(s) of a passport. * **ID_CARD_FRONT**: A file containing only the front of the ID card. In order for a document to be usable, both the **ID_CARD_FRONT** and **ID_CARD_BACK** must be submitted. * **ID_CARD_BACK**: A file containing only the back of the ID card. In order for a document to be usable, both the **ID_CARD_FRONT** and **ID_CARD_BACK** must be submitted. * **DRIVING_LICENCE_FRONT**: A file containing only the front of the driving licence. In order for a document to be usable, both the **DRIVING_LICENCE_FRONT** and **DRIVING_LICENCE_BACK** must be submitted. * **DRIVING_LICENCE_BACK**: A file containing only the back of the driving licence. In order for a document to be usable, both the **DRIVING_LICENCE_FRONT** and **DRIVING_LICENCE_FRONT** must be submitted. ") + @JsonProperty(JSON_PROPERTY_DOCUMENT_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public DocumentTypeEnum getDocumentType() { + return documentType; + } + + + @JsonProperty(JSON_PROPERTY_DOCUMENT_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDocumentType(DocumentTypeEnum documentType) { + this.documentType = documentType; + } + + + public DocumentDetail filename(String filename) { + this.filename = filename; + return this; + } + + /** + * Filename of the document. + * @return filename + **/ + @ApiModelProperty(value = "Filename of the document.") + @JsonProperty(JSON_PROPERTY_FILENAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getFilename() { + return filename; + } + + + @JsonProperty(JSON_PROPERTY_FILENAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setFilename(String filename) { + this.filename = filename; + } + + + public DocumentDetail legalArrangementCode(String legalArrangementCode) { + this.legalArrangementCode = legalArrangementCode; + return this; + } + + /** + * The Adyen-generated [`legalArrangementCode`](https://docs.adyen.com/api-explorer/#/Account/latest/post/createAccountHolder__resParam_accountHolderDetails-legalArrangements-legalArrangementCode) to which the document must be linked. + * @return legalArrangementCode + **/ + @ApiModelProperty(value = "The Adyen-generated [`legalArrangementCode`](https://docs.adyen.com/api-explorer/#/Account/latest/post/createAccountHolder__resParam_accountHolderDetails-legalArrangements-legalArrangementCode) to which the document must be linked.") + @JsonProperty(JSON_PROPERTY_LEGAL_ARRANGEMENT_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getLegalArrangementCode() { + return legalArrangementCode; + } + + + @JsonProperty(JSON_PROPERTY_LEGAL_ARRANGEMENT_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setLegalArrangementCode(String legalArrangementCode) { + this.legalArrangementCode = legalArrangementCode; + } + + + public DocumentDetail legalArrangementEntityCode(String legalArrangementEntityCode) { + this.legalArrangementEntityCode = legalArrangementEntityCode; + return this; + } + + /** + * The Adyen-generated [`legalArrangementEntityCode`](https://docs.adyen.com/api-explorer/#/Account/v6/post/createAccountHolder__resParam_accountHolderDetails-legalArrangements-legalArrangementEntities-legalArrangementEntityCode) to which the document must be linked. + * @return legalArrangementEntityCode + **/ + @ApiModelProperty(value = "The Adyen-generated [`legalArrangementEntityCode`](https://docs.adyen.com/api-explorer/#/Account/v6/post/createAccountHolder__resParam_accountHolderDetails-legalArrangements-legalArrangementEntities-legalArrangementEntityCode) to which the document must be linked.") + @JsonProperty(JSON_PROPERTY_LEGAL_ARRANGEMENT_ENTITY_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getLegalArrangementEntityCode() { + return legalArrangementEntityCode; + } + + + @JsonProperty(JSON_PROPERTY_LEGAL_ARRANGEMENT_ENTITY_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setLegalArrangementEntityCode(String legalArrangementEntityCode) { + this.legalArrangementEntityCode = legalArrangementEntityCode; + } + + + public DocumentDetail shareholderCode(String shareholderCode) { + this.shareholderCode = shareholderCode; + return this; + } + + /** + * The Adyen-generated [`shareholderCode`](https://docs.adyen.com/api-explorer/#/Account/latest/post/createAccountHolder__resParam_accountHolderDetails-businessDetails-shareholders-shareholderCode) to which the document must be linked. Refer to [Verification checks](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-checks) for details on when a document should be submitted. >Required if the account holder has a `legalEntity` of type **Business** and the `documentType` is either **PASSPORT**, **ID_CARD_FRONT**, **ID_CARD_BACK**, **DRIVING_LICENCE_FRONT**, or **DRIVING_LICENCE_BACK**. + * @return shareholderCode + **/ + @ApiModelProperty(value = "The Adyen-generated [`shareholderCode`](https://docs.adyen.com/api-explorer/#/Account/latest/post/createAccountHolder__resParam_accountHolderDetails-businessDetails-shareholders-shareholderCode) to which the document must be linked. Refer to [Verification checks](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-checks) for details on when a document should be submitted. >Required if the account holder has a `legalEntity` of type **Business** and the `documentType` is either **PASSPORT**, **ID_CARD_FRONT**, **ID_CARD_BACK**, **DRIVING_LICENCE_FRONT**, or **DRIVING_LICENCE_BACK**. ") + @JsonProperty(JSON_PROPERTY_SHAREHOLDER_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getShareholderCode() { + return shareholderCode; + } + + + @JsonProperty(JSON_PROPERTY_SHAREHOLDER_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setShareholderCode(String shareholderCode) { + this.shareholderCode = shareholderCode; + } + + + public DocumentDetail signatoryCode(String signatoryCode) { + this.signatoryCode = signatoryCode; + return this; + } + + /** + * The Adyen-generated [`signatoryCode`](https://docs.adyen.com/api-explorer/#/Account/v6/post/createAccountHolder__resParam_accountHolderDetails-businessDetails-signatories-signatoryCode) to which the document must be linked. + * @return signatoryCode + **/ + @ApiModelProperty(value = "The Adyen-generated [`signatoryCode`](https://docs.adyen.com/api-explorer/#/Account/v6/post/createAccountHolder__resParam_accountHolderDetails-businessDetails-signatories-signatoryCode) to which the document must be linked.") + @JsonProperty(JSON_PROPERTY_SIGNATORY_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getSignatoryCode() { + return signatoryCode; + } + + + @JsonProperty(JSON_PROPERTY_SIGNATORY_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSignatoryCode(String signatoryCode) { + this.signatoryCode = signatoryCode; + } + + + /** + * Return true if this DocumentDetail object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DocumentDetail documentDetail = (DocumentDetail) o; + return Objects.equals(this.accountHolderCode, documentDetail.accountHolderCode) && + Objects.equals(this.bankAccountUUID, documentDetail.bankAccountUUID) && + Objects.equals(this.description, documentDetail.description) && + Objects.equals(this.documentType, documentDetail.documentType) && + Objects.equals(this.filename, documentDetail.filename) && + Objects.equals(this.legalArrangementCode, documentDetail.legalArrangementCode) && + Objects.equals(this.legalArrangementEntityCode, documentDetail.legalArrangementEntityCode) && + Objects.equals(this.shareholderCode, documentDetail.shareholderCode) && + Objects.equals(this.signatoryCode, documentDetail.signatoryCode); + } + + @Override + public int hashCode() { + return Objects.hash(accountHolderCode, bankAccountUUID, description, documentType, filename, legalArrangementCode, legalArrangementEntityCode, shareholderCode, signatoryCode); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DocumentDetail {\n"); + sb.append(" accountHolderCode: ").append(toIndentedString(accountHolderCode)).append("\n"); + sb.append(" bankAccountUUID: ").append(toIndentedString(bankAccountUUID)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" documentType: ").append(toIndentedString(documentType)).append("\n"); + sb.append(" filename: ").append(toIndentedString(filename)).append("\n"); + sb.append(" legalArrangementCode: ").append(toIndentedString(legalArrangementCode)).append("\n"); + sb.append(" legalArrangementEntityCode: ").append(toIndentedString(legalArrangementEntityCode)).append("\n"); + sb.append(" shareholderCode: ").append(toIndentedString(shareholderCode)).append("\n"); + sb.append(" signatoryCode: ").append(toIndentedString(signatoryCode)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line 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 DocumentDetail given an JSON string + * + * @param jsonString JSON string + * @return An instance of DocumentDetail + * @throws JsonProcessingException if the JSON string is invalid with respect to DocumentDetail + */ + public static DocumentDetail fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, DocumentDetail.class); + } +/** + * Convert an instance of DocumentDetail 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/marketpayaccount/ErrorFieldType.java b/src/main/java/com/adyen/model/marketpayaccount/ErrorFieldType.java new file mode 100644 index 000000000..329a84c79 --- /dev/null +++ b/src/main/java/com/adyen/model/marketpayaccount/ErrorFieldType.java @@ -0,0 +1,192 @@ +/* + * Account API + * This API is used for the classic integration. If you are just starting your implementation, refer to our [new integration guide](https://docs.adyen.com/marketplaces-and-platforms) instead. The Account API provides endpoints for managing account-related entities on your platform. These related entities include account holders, accounts, bank accounts, shareholders, and verification-related documents. The management operations include actions such as creation, retrieval, updating, and deletion of them. For more information, refer to our [documentation](https://docs.adyen.com/marketplaces-and-platforms/classic). ## Authentication Your Adyen contact will provide your API credential and an API key. To connect to the API, add an `X-API-Key` header with the API key as the value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: YOUR_API_KEY\" \\ ... ``` Alternatively, you can use the username and password to connect to the API using basic authentication. For example: ``` curl -U \"ws@MarketPlace.YOUR_PLATFORM_ACCOUNT\":\"YOUR_WS_PASSWORD\" \\ -H \"Content-Type: application/json\" \\ ... ``` When going live, you need to generate new web service user credentials to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning The Account API supports [versioning](https://docs.adyen.com/development-resources/versioning) using a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://cal-test.adyen.com/cal/services/Account/v6/createAccountHolder ``` + * + * The version of the OpenAPI document: 6 + * + * + * 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.marketpayaccount; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.adyen.model.marketpayaccount.FieldType; +import com.fasterxml.jackson.annotation.JsonInclude; +import 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; + + +/** + * ErrorFieldType + */ +@JsonPropertyOrder({ + ErrorFieldType.JSON_PROPERTY_ERROR_CODE, + ErrorFieldType.JSON_PROPERTY_ERROR_DESCRIPTION, + ErrorFieldType.JSON_PROPERTY_FIELD_TYPE +}) + +public class ErrorFieldType { + public static final String JSON_PROPERTY_ERROR_CODE = "errorCode"; + private Integer errorCode; + + public static final String JSON_PROPERTY_ERROR_DESCRIPTION = "errorDescription"; + private String errorDescription; + + public static final String JSON_PROPERTY_FIELD_TYPE = "fieldType"; + private FieldType fieldType; + + public ErrorFieldType() { + } + + public ErrorFieldType errorCode(Integer errorCode) { + this.errorCode = errorCode; + return this; + } + + /** + * The validation error code. + * @return errorCode + **/ + @ApiModelProperty(value = "The validation error code.") + @JsonProperty(JSON_PROPERTY_ERROR_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Integer getErrorCode() { + return errorCode; + } + + + @JsonProperty(JSON_PROPERTY_ERROR_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setErrorCode(Integer errorCode) { + this.errorCode = errorCode; + } + + + public ErrorFieldType errorDescription(String errorDescription) { + this.errorDescription = errorDescription; + return this; + } + + /** + * A description of the validation error. + * @return errorDescription + **/ + @ApiModelProperty(value = "A description of the validation error.") + @JsonProperty(JSON_PROPERTY_ERROR_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getErrorDescription() { + return errorDescription; + } + + + @JsonProperty(JSON_PROPERTY_ERROR_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setErrorDescription(String errorDescription) { + this.errorDescription = errorDescription; + } + + + public ErrorFieldType fieldType(FieldType fieldType) { + this.fieldType = fieldType; + return this; + } + + /** + * Get fieldType + * @return fieldType + **/ + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_FIELD_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public FieldType getFieldType() { + return fieldType; + } + + + @JsonProperty(JSON_PROPERTY_FIELD_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setFieldType(FieldType fieldType) { + this.fieldType = fieldType; + } + + + /** + * Return true if this ErrorFieldType object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ErrorFieldType errorFieldType = (ErrorFieldType) o; + return Objects.equals(this.errorCode, errorFieldType.errorCode) && + Objects.equals(this.errorDescription, errorFieldType.errorDescription) && + Objects.equals(this.fieldType, errorFieldType.fieldType); + } + + @Override + public int hashCode() { + return Objects.hash(errorCode, errorDescription, fieldType); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ErrorFieldType {\n"); + sb.append(" errorCode: ").append(toIndentedString(errorCode)).append("\n"); + sb.append(" errorDescription: ").append(toIndentedString(errorDescription)).append("\n"); + sb.append(" fieldType: ").append(toIndentedString(fieldType)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line 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 ErrorFieldType given an JSON string + * + * @param jsonString JSON string + * @return An instance of ErrorFieldType + * @throws JsonProcessingException if the JSON string is invalid with respect to ErrorFieldType + */ + public static ErrorFieldType fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, ErrorFieldType.class); + } +/** + * Convert an instance of ErrorFieldType 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/marketpayaccount/FieldType.java b/src/main/java/com/adyen/model/marketpayaccount/FieldType.java new file mode 100644 index 000000000..f39b8d8d0 --- /dev/null +++ b/src/main/java/com/adyen/model/marketpayaccount/FieldType.java @@ -0,0 +1,546 @@ +/* + * Account API + * This API is used for the classic integration. If you are just starting your implementation, refer to our [new integration guide](https://docs.adyen.com/marketplaces-and-platforms) instead. The Account API provides endpoints for managing account-related entities on your platform. These related entities include account holders, accounts, bank accounts, shareholders, and verification-related documents. The management operations include actions such as creation, retrieval, updating, and deletion of them. For more information, refer to our [documentation](https://docs.adyen.com/marketplaces-and-platforms/classic). ## Authentication Your Adyen contact will provide your API credential and an API key. To connect to the API, add an `X-API-Key` header with the API key as the value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: YOUR_API_KEY\" \\ ... ``` Alternatively, you can use the username and password to connect to the API using basic authentication. For example: ``` curl -U \"ws@MarketPlace.YOUR_PLATFORM_ACCOUNT\":\"YOUR_WS_PASSWORD\" \\ -H \"Content-Type: application/json\" \\ ... ``` When going live, you need to generate new web service user credentials to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning The Account API supports [versioning](https://docs.adyen.com/development-resources/versioning) using a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://cal-test.adyen.com/cal/services/Account/v6/createAccountHolder ``` + * + * The version of the OpenAPI document: 6 + * + * + * 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.marketpayaccount; + +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; + + +/** + * FieldType + */ +@JsonPropertyOrder({ + FieldType.JSON_PROPERTY_FIELD, + FieldType.JSON_PROPERTY_FIELD_NAME, + FieldType.JSON_PROPERTY_SHAREHOLDER_CODE +}) + +public class FieldType { + public static final String JSON_PROPERTY_FIELD = "field"; + private String field; + + /** + * The type of the field. + */ + public enum FieldNameEnum { + ACCOUNTCODE("accountCode"), + + ACCOUNTHOLDERCODE("accountHolderCode"), + + ACCOUNTHOLDERDETAILS("accountHolderDetails"), + + ACCOUNTNUMBER("accountNumber"), + + ACCOUNTSTATETYPE("accountStateType"), + + ACCOUNTSTATUS("accountStatus"), + + ACCOUNTTYPE("accountType"), + + ADDRESS("address"), + + BALANCEACCOUNT("balanceAccount"), + + BALANCEACCOUNTACTIVE("balanceAccountActive"), + + BALANCEACCOUNTCODE("balanceAccountCode"), + + BALANCEACCOUNTID("balanceAccountId"), + + BANKACCOUNT("bankAccount"), + + BANKACCOUNTCODE("bankAccountCode"), + + BANKACCOUNTNAME("bankAccountName"), + + BANKACCOUNTUUID("bankAccountUUID"), + + BANKBICSWIFT("bankBicSwift"), + + BANKCITY("bankCity"), + + BANKCODE("bankCode"), + + BANKNAME("bankName"), + + BANKSTATEMENT("bankStatement"), + + BRANCHCODE("branchCode"), + + BUSINESSCONTACT("businessContact"), + + CARDTOKEN("cardToken"), + + CHECKCODE("checkCode"), + + CITY("city"), + + COMPANYREGISTRATION("companyRegistration"), + + CONSTITUTIONALDOCUMENT("constitutionalDocument"), + + CONTROLLER("controller"), + + COUNTRY("country"), + + COUNTRYCODE("countryCode"), + + CURRENCY("currency"), + + CURRENCYCODE("currencyCode"), + + DATEOFBIRTH("dateOfBirth"), + + DESCRIPTION("description"), + + DESTINATIONACCOUNTCODE("destinationAccountCode"), + + DOCUMENT("document"), + + DOCUMENTCONTENT("documentContent"), + + DOCUMENTEXPIRATIONDATE("documentExpirationDate"), + + DOCUMENTISSUERCOUNTRY("documentIssuerCountry"), + + DOCUMENTISSUERSTATE("documentIssuerState"), + + DOCUMENTNAME("documentName"), + + DOCUMENTNUMBER("documentNumber"), + + DOCUMENTTYPE("documentType"), + + DOINGBUSINESSAS("doingBusinessAs"), + + DRIVINGLICENCE("drivingLicence"), + + DRIVINGLICENCEBACK("drivingLicenceBack"), + + DRIVINGLICENCEFRONT("drivingLicenceFront"), + + DRIVINGLICENSE("drivingLicense"), + + EMAIL("email"), + + FIRSTNAME("firstName"), + + FORMTYPE("formType"), + + FULLPHONENUMBER("fullPhoneNumber"), + + GENDER("gender"), + + HOPWEBSERVICEUSER("hopWebserviceUser"), + + HOUSENUMBERORNAME("houseNumberOrName"), + + IBAN("iban"), + + IDCARD("idCard"), + + IDCARDBACK("idCardBack"), + + IDCARDFRONT("idCardFront"), + + IDNUMBER("idNumber"), + + IDENTITYDOCUMENT("identityDocument"), + + INDIVIDUALDETAILS("individualDetails"), + + INFIX("infix"), + + JOBTITLE("jobTitle"), + + LASTNAME("lastName"), + + LASTREVIEWDATE("lastReviewDate"), + + LEGALARRANGEMENT("legalArrangement"), + + LEGALARRANGEMENTCODE("legalArrangementCode"), + + LEGALARRANGEMENTENTITY("legalArrangementEntity"), + + LEGALARRANGEMENTENTITYCODE("legalArrangementEntityCode"), + + LEGALARRANGEMENTLEGALFORM("legalArrangementLegalForm"), + + LEGALARRANGEMENTMEMBER("legalArrangementMember"), + + LEGALARRANGEMENTMEMBERS("legalArrangementMembers"), + + LEGALARRANGEMENTNAME("legalArrangementName"), + + LEGALARRANGEMENTREFERENCE("legalArrangementReference"), + + LEGALARRANGEMENTREGISTRATIONNUMBER("legalArrangementRegistrationNumber"), + + LEGALARRANGEMENTTAXNUMBER("legalArrangementTaxNumber"), + + LEGALARRANGEMENTTYPE("legalArrangementType"), + + LEGALBUSINESSNAME("legalBusinessName"), + + LEGALENTITY("legalEntity"), + + LEGALENTITYTYPE("legalEntityType"), + + LOGO("logo"), + + MERCHANTACCOUNT("merchantAccount"), + + MERCHANTCATEGORYCODE("merchantCategoryCode"), + + MERCHANTHOUSENUMBER("merchantHouseNumber"), + + MERCHANTREFERENCE("merchantReference"), + + MICRODEPOSIT("microDeposit"), + + NAME("name"), + + NATIONALITY("nationality"), + + ORIGINALREFERENCE("originalReference"), + + OWNERCITY("ownerCity"), + + OWNERCOUNTRYCODE("ownerCountryCode"), + + OWNERDATEOFBIRTH("ownerDateOfBirth"), + + OWNERHOUSENUMBERORNAME("ownerHouseNumberOrName"), + + OWNERNAME("ownerName"), + + OWNERPOSTALCODE("ownerPostalCode"), + + OWNERSTATE("ownerState"), + + OWNERSTREET("ownerStreet"), + + PASSPORT("passport"), + + PASSPORTNUMBER("passportNumber"), + + PAYOUTMETHOD("payoutMethod"), + + PAYOUTMETHODCODE("payoutMethodCode"), + + PAYOUTSCHEDULE("payoutSchedule"), + + PCISELFASSESSMENT("pciSelfAssessment"), + + PERSONALDATA("personalData"), + + PHONECOUNTRYCODE("phoneCountryCode"), + + PHONENUMBER("phoneNumber"), + + POSTALCODE("postalCode"), + + PRIMARYCURRENCY("primaryCurrency"), + + REASON("reason"), + + REGISTRATIONNUMBER("registrationNumber"), + + RETURNURL("returnUrl"), + + SCHEDULE("schedule"), + + SHAREHOLDER("shareholder"), + + SHAREHOLDERCODE("shareholderCode"), + + SHAREHOLDERCODEANDSIGNATORYCODE("shareholderCodeAndSignatoryCode"), + + SHAREHOLDERCODEORSIGNATORYCODE("shareholderCodeOrSignatoryCode"), + + SHAREHOLDERTYPE("shareholderType"), + + SHAREHOLDERTYPES("shareholderTypes"), + + SHOPPERINTERACTION("shopperInteraction"), + + SIGNATORY("signatory"), + + SIGNATORYCODE("signatoryCode"), + + SOCIALSECURITYNUMBER("socialSecurityNumber"), + + SOURCEACCOUNTCODE("sourceAccountCode"), + + SPLITACCOUNT("splitAccount"), + + SPLITCONFIGURATIONUUID("splitConfigurationUUID"), + + SPLITCURRENCY("splitCurrency"), + + SPLITVALUE("splitValue"), + + SPLITS("splits"), + + STATEORPROVINCE("stateOrProvince"), + + STATUS("status"), + + STOCKEXCHANGE("stockExchange"), + + STOCKNUMBER("stockNumber"), + + STOCKTICKER("stockTicker"), + + STORE("store"), + + STOREDETAIL("storeDetail"), + + STORENAME("storeName"), + + STOREREFERENCE("storeReference"), + + STREET("street"), + + TAXID("taxId"), + + TIER("tier"), + + TIERNUMBER("tierNumber"), + + TRANSFERCODE("transferCode"), + + ULTIMATEPARENTCOMPANY("ultimateParentCompany"), + + ULTIMATEPARENTCOMPANYADDRESSDETAILS("ultimateParentCompanyAddressDetails"), + + ULTIMATEPARENTCOMPANYADDRESSDETAILSCOUNTRY("ultimateParentCompanyAddressDetailsCountry"), + + ULTIMATEPARENTCOMPANYBUSINESSDETAILS("ultimateParentCompanyBusinessDetails"), + + ULTIMATEPARENTCOMPANYBUSINESSDETAILSLEGALBUSINESSNAME("ultimateParentCompanyBusinessDetailsLegalBusinessName"), + + ULTIMATEPARENTCOMPANYBUSINESSDETAILSREGISTRATIONNUMBER("ultimateParentCompanyBusinessDetailsRegistrationNumber"), + + ULTIMATEPARENTCOMPANYCODE("ultimateParentCompanyCode"), + + ULTIMATEPARENTCOMPANYSTOCKEXCHANGE("ultimateParentCompanyStockExchange"), + + ULTIMATEPARENTCOMPANYSTOCKNUMBER("ultimateParentCompanyStockNumber"), + + ULTIMATEPARENTCOMPANYSTOCKNUMBERORSTOCKTICKER("ultimateParentCompanyStockNumberOrStockTicker"), + + ULTIMATEPARENTCOMPANYSTOCKTICKER("ultimateParentCompanyStockTicker"), + + UNKNOWN("unknown"), + + VALUE("value"), + + VERIFICATIONTYPE("verificationType"), + + VIRTUALACCOUNT("virtualAccount"), + + VISANUMBER("visaNumber"), + + WEBADDRESS("webAddress"), + + YEAR("year"); + + private String value; + + FieldNameEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static FieldNameEnum fromValue(String value) { + for (FieldNameEnum b : FieldNameEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_FIELD_NAME = "fieldName"; + private FieldNameEnum fieldName; + + public static final String JSON_PROPERTY_SHAREHOLDER_CODE = "shareholderCode"; + private String shareholderCode; + + public FieldType() { + } + + public FieldType field(String field) { + this.field = field; + return this; + } + + /** + * The full name of the property. + * @return field + **/ + @ApiModelProperty(value = "The full name of the property.") + @JsonProperty(JSON_PROPERTY_FIELD) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getField() { + return field; + } + + + @JsonProperty(JSON_PROPERTY_FIELD) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setField(String field) { + this.field = field; + } + + + public FieldType fieldName(FieldNameEnum fieldName) { + this.fieldName = fieldName; + return this; + } + + /** + * The type of the field. + * @return fieldName + **/ + @ApiModelProperty(value = "The type of the field.") + @JsonProperty(JSON_PROPERTY_FIELD_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public FieldNameEnum getFieldName() { + return fieldName; + } + + + @JsonProperty(JSON_PROPERTY_FIELD_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setFieldName(FieldNameEnum fieldName) { + this.fieldName = fieldName; + } + + + public FieldType shareholderCode(String shareholderCode) { + this.shareholderCode = shareholderCode; + return this; + } + + /** + * The code of the shareholder that the field belongs to. If empty, the field belongs to an account holder. + * @return shareholderCode + **/ + @ApiModelProperty(value = "The code of the shareholder that the field belongs to. If empty, the field belongs to an account holder.") + @JsonProperty(JSON_PROPERTY_SHAREHOLDER_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getShareholderCode() { + return shareholderCode; + } + + + @JsonProperty(JSON_PROPERTY_SHAREHOLDER_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setShareholderCode(String shareholderCode) { + this.shareholderCode = shareholderCode; + } + + + /** + * Return true if this FieldType object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FieldType fieldType = (FieldType) o; + return Objects.equals(this.field, fieldType.field) && + Objects.equals(this.fieldName, fieldType.fieldName) && + Objects.equals(this.shareholderCode, fieldType.shareholderCode); + } + + @Override + public int hashCode() { + return Objects.hash(field, fieldName, shareholderCode); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FieldType {\n"); + sb.append(" field: ").append(toIndentedString(field)).append("\n"); + sb.append(" fieldName: ").append(toIndentedString(fieldName)).append("\n"); + sb.append(" shareholderCode: ").append(toIndentedString(shareholderCode)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line 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 FieldType given an JSON string + * + * @param jsonString JSON string + * @return An instance of FieldType + * @throws JsonProcessingException if the JSON string is invalid with respect to FieldType + */ + public static FieldType fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, FieldType.class); + } +/** + * Convert an instance of FieldType 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/marketpayaccount/GenericResponse.java b/src/main/java/com/adyen/model/marketpayaccount/GenericResponse.java new file mode 100644 index 000000000..133c3da38 --- /dev/null +++ b/src/main/java/com/adyen/model/marketpayaccount/GenericResponse.java @@ -0,0 +1,202 @@ +/* + * Account API + * This API is used for the classic integration. If you are just starting your implementation, refer to our [new integration guide](https://docs.adyen.com/marketplaces-and-platforms) instead. The Account API provides endpoints for managing account-related entities on your platform. These related entities include account holders, accounts, bank accounts, shareholders, and verification-related documents. The management operations include actions such as creation, retrieval, updating, and deletion of them. For more information, refer to our [documentation](https://docs.adyen.com/marketplaces-and-platforms/classic). ## Authentication Your Adyen contact will provide your API credential and an API key. To connect to the API, add an `X-API-Key` header with the API key as the value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: YOUR_API_KEY\" \\ ... ``` Alternatively, you can use the username and password to connect to the API using basic authentication. For example: ``` curl -U \"ws@MarketPlace.YOUR_PLATFORM_ACCOUNT\":\"YOUR_WS_PASSWORD\" \\ -H \"Content-Type: application/json\" \\ ... ``` When going live, you need to generate new web service user credentials to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning The Account API supports [versioning](https://docs.adyen.com/development-resources/versioning) using a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://cal-test.adyen.com/cal/services/Account/v6/createAccountHolder ``` + * + * The version of the OpenAPI document: 6 + * + * + * 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.marketpayaccount; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.adyen.model.marketpayaccount.ErrorFieldType; +import com.fasterxml.jackson.annotation.JsonInclude; +import 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; + + +/** + * GenericResponse + */ +@JsonPropertyOrder({ + GenericResponse.JSON_PROPERTY_INVALID_FIELDS, + GenericResponse.JSON_PROPERTY_PSP_REFERENCE, + GenericResponse.JSON_PROPERTY_RESULT_CODE +}) + +public class GenericResponse { + public static final String JSON_PROPERTY_INVALID_FIELDS = "invalidFields"; + private List invalidFields = null; + + public static final String JSON_PROPERTY_PSP_REFERENCE = "pspReference"; + private String pspReference; + + public static final String JSON_PROPERTY_RESULT_CODE = "resultCode"; + private String resultCode; + + public GenericResponse() { + } + + public GenericResponse invalidFields(List invalidFields) { + this.invalidFields = invalidFields; + return this; + } + + public GenericResponse addInvalidFieldsItem(ErrorFieldType invalidFieldsItem) { + if (this.invalidFields == null) { + this.invalidFields = new ArrayList<>(); + } + this.invalidFields.add(invalidFieldsItem); + return this; + } + + /** + * Contains field validation errors that would prevent requests from being processed. + * @return invalidFields + **/ + @ApiModelProperty(value = "Contains field validation errors that would prevent requests from being processed.") + @JsonProperty(JSON_PROPERTY_INVALID_FIELDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getInvalidFields() { + return invalidFields; + } + + + @JsonProperty(JSON_PROPERTY_INVALID_FIELDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setInvalidFields(List invalidFields) { + this.invalidFields = invalidFields; + } + + + public GenericResponse pspReference(String pspReference) { + this.pspReference = pspReference; + return this; + } + + /** + * The reference of a request. Can be used to uniquely identify the request. + * @return pspReference + **/ + @ApiModelProperty(value = "The reference of a request. Can be used to uniquely identify the request.") + @JsonProperty(JSON_PROPERTY_PSP_REFERENCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getPspReference() { + return pspReference; + } + + + @JsonProperty(JSON_PROPERTY_PSP_REFERENCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPspReference(String pspReference) { + this.pspReference = pspReference; + } + + + public GenericResponse resultCode(String resultCode) { + this.resultCode = resultCode; + return this; + } + + /** + * The result code. + * @return resultCode + **/ + @ApiModelProperty(value = "The result code.") + @JsonProperty(JSON_PROPERTY_RESULT_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getResultCode() { + return resultCode; + } + + + @JsonProperty(JSON_PROPERTY_RESULT_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setResultCode(String resultCode) { + this.resultCode = resultCode; + } + + + /** + * Return true if this GenericResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GenericResponse genericResponse = (GenericResponse) o; + return Objects.equals(this.invalidFields, genericResponse.invalidFields) && + Objects.equals(this.pspReference, genericResponse.pspReference) && + Objects.equals(this.resultCode, genericResponse.resultCode); + } + + @Override + public int hashCode() { + return Objects.hash(invalidFields, pspReference, resultCode); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GenericResponse {\n"); + sb.append(" invalidFields: ").append(toIndentedString(invalidFields)).append("\n"); + sb.append(" pspReference: ").append(toIndentedString(pspReference)).append("\n"); + sb.append(" resultCode: ").append(toIndentedString(resultCode)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line 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 GenericResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of GenericResponse + * @throws JsonProcessingException if the JSON string is invalid with respect to GenericResponse + */ + public static GenericResponse fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, GenericResponse.class); + } +/** + * Convert an instance of GenericResponse 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/marketpayaccount/GetAccountHolderRequest.java b/src/main/java/com/adyen/model/marketpayaccount/GetAccountHolderRequest.java new file mode 100644 index 000000000..27b4b08c1 --- /dev/null +++ b/src/main/java/com/adyen/model/marketpayaccount/GetAccountHolderRequest.java @@ -0,0 +1,191 @@ +/* + * Account API + * This API is used for the classic integration. If you are just starting your implementation, refer to our [new integration guide](https://docs.adyen.com/marketplaces-and-platforms) instead. The Account API provides endpoints for managing account-related entities on your platform. These related entities include account holders, accounts, bank accounts, shareholders, and verification-related documents. The management operations include actions such as creation, retrieval, updating, and deletion of them. For more information, refer to our [documentation](https://docs.adyen.com/marketplaces-and-platforms/classic). ## Authentication Your Adyen contact will provide your API credential and an API key. To connect to the API, add an `X-API-Key` header with the API key as the value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: YOUR_API_KEY\" \\ ... ``` Alternatively, you can use the username and password to connect to the API using basic authentication. For example: ``` curl -U \"ws@MarketPlace.YOUR_PLATFORM_ACCOUNT\":\"YOUR_WS_PASSWORD\" \\ -H \"Content-Type: application/json\" \\ ... ``` When going live, you need to generate new web service user credentials to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning The Account API supports [versioning](https://docs.adyen.com/development-resources/versioning) using a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://cal-test.adyen.com/cal/services/Account/v6/createAccountHolder ``` + * + * The version of the OpenAPI document: 6 + * + * + * 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.marketpayaccount; + +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; + + +/** + * GetAccountHolderRequest + */ +@JsonPropertyOrder({ + GetAccountHolderRequest.JSON_PROPERTY_ACCOUNT_CODE, + GetAccountHolderRequest.JSON_PROPERTY_ACCOUNT_HOLDER_CODE, + GetAccountHolderRequest.JSON_PROPERTY_SHOW_DETAILS +}) + +public class GetAccountHolderRequest { + public static final String JSON_PROPERTY_ACCOUNT_CODE = "accountCode"; + private String accountCode; + + public static final String JSON_PROPERTY_ACCOUNT_HOLDER_CODE = "accountHolderCode"; + private String accountHolderCode; + + public static final String JSON_PROPERTY_SHOW_DETAILS = "showDetails"; + private Boolean showDetails; + + public GetAccountHolderRequest() { + } + + public GetAccountHolderRequest accountCode(String accountCode) { + this.accountCode = accountCode; + return this; + } + + /** + * The code of the account of which to retrieve the details. > Required if no `accountHolderCode` is provided. + * @return accountCode + **/ + @ApiModelProperty(value = "The code of the account of which to retrieve the details. > Required if no `accountHolderCode` is provided.") + @JsonProperty(JSON_PROPERTY_ACCOUNT_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getAccountCode() { + return accountCode; + } + + + @JsonProperty(JSON_PROPERTY_ACCOUNT_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAccountCode(String accountCode) { + this.accountCode = accountCode; + } + + + public GetAccountHolderRequest accountHolderCode(String accountHolderCode) { + this.accountHolderCode = accountHolderCode; + return this; + } + + /** + * The code of the account holder of which to retrieve the details. > Required if no `accountCode` is provided. + * @return accountHolderCode + **/ + @ApiModelProperty(value = "The code of the account holder of which to retrieve the details. > Required if no `accountCode` is provided.") + @JsonProperty(JSON_PROPERTY_ACCOUNT_HOLDER_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getAccountHolderCode() { + return accountHolderCode; + } + + + @JsonProperty(JSON_PROPERTY_ACCOUNT_HOLDER_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAccountHolderCode(String accountHolderCode) { + this.accountHolderCode = accountHolderCode; + } + + + public GetAccountHolderRequest showDetails(Boolean showDetails) { + this.showDetails = showDetails; + return this; + } + + /** + * True if the request should return the account holder details + * @return showDetails + **/ + @ApiModelProperty(value = "True if the request should return the account holder details") + @JsonProperty(JSON_PROPERTY_SHOW_DETAILS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getShowDetails() { + return showDetails; + } + + + @JsonProperty(JSON_PROPERTY_SHOW_DETAILS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setShowDetails(Boolean showDetails) { + this.showDetails = showDetails; + } + + + /** + * Return true if this GetAccountHolderRequest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetAccountHolderRequest getAccountHolderRequest = (GetAccountHolderRequest) o; + return Objects.equals(this.accountCode, getAccountHolderRequest.accountCode) && + Objects.equals(this.accountHolderCode, getAccountHolderRequest.accountHolderCode) && + Objects.equals(this.showDetails, getAccountHolderRequest.showDetails); + } + + @Override + public int hashCode() { + return Objects.hash(accountCode, accountHolderCode, showDetails); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetAccountHolderRequest {\n"); + sb.append(" accountCode: ").append(toIndentedString(accountCode)).append("\n"); + sb.append(" accountHolderCode: ").append(toIndentedString(accountHolderCode)).append("\n"); + sb.append(" showDetails: ").append(toIndentedString(showDetails)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line 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 GetAccountHolderRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of GetAccountHolderRequest + * @throws JsonProcessingException if the JSON string is invalid with respect to GetAccountHolderRequest + */ + public static GetAccountHolderRequest fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, GetAccountHolderRequest.class); + } +/** + * Convert an instance of GetAccountHolderRequest 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/marketpayaccount/GetAccountHolderResponse.java b/src/main/java/com/adyen/model/marketpayaccount/GetAccountHolderResponse.java new file mode 100644 index 000000000..71a7abf9e --- /dev/null +++ b/src/main/java/com/adyen/model/marketpayaccount/GetAccountHolderResponse.java @@ -0,0 +1,598 @@ +/* + * Account API + * This API is used for the classic integration. If you are just starting your implementation, refer to our [new integration guide](https://docs.adyen.com/marketplaces-and-platforms) instead. The Account API provides endpoints for managing account-related entities on your platform. These related entities include account holders, accounts, bank accounts, shareholders, and verification-related documents. The management operations include actions such as creation, retrieval, updating, and deletion of them. For more information, refer to our [documentation](https://docs.adyen.com/marketplaces-and-platforms/classic). ## Authentication Your Adyen contact will provide your API credential and an API key. To connect to the API, add an `X-API-Key` header with the API key as the value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: YOUR_API_KEY\" \\ ... ``` Alternatively, you can use the username and password to connect to the API using basic authentication. For example: ``` curl -U \"ws@MarketPlace.YOUR_PLATFORM_ACCOUNT\":\"YOUR_WS_PASSWORD\" \\ -H \"Content-Type: application/json\" \\ ... ``` When going live, you need to generate new web service user credentials to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning The Account API supports [versioning](https://docs.adyen.com/development-resources/versioning) using a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://cal-test.adyen.com/cal/services/Account/v6/createAccountHolder ``` + * + * The version of the OpenAPI document: 6 + * + * + * 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.marketpayaccount; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.adyen.model.marketpayaccount.Account; +import com.adyen.model.marketpayaccount.AccountHolderDetails; +import com.adyen.model.marketpayaccount.AccountHolderStatus; +import com.adyen.model.marketpayaccount.ErrorFieldType; +import com.adyen.model.marketpayaccount.KYCVerificationResult; +import com.adyen.model.marketpayaccount.MigrationData; +import com.fasterxml.jackson.annotation.JsonInclude; +import 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 java.util.ArrayList; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.core.JsonProcessingException; + + +/** + * GetAccountHolderResponse + */ +@JsonPropertyOrder({ + GetAccountHolderResponse.JSON_PROPERTY_ACCOUNT_HOLDER_CODE, + GetAccountHolderResponse.JSON_PROPERTY_ACCOUNT_HOLDER_DETAILS, + GetAccountHolderResponse.JSON_PROPERTY_ACCOUNT_HOLDER_STATUS, + GetAccountHolderResponse.JSON_PROPERTY_ACCOUNTS, + GetAccountHolderResponse.JSON_PROPERTY_DESCRIPTION, + GetAccountHolderResponse.JSON_PROPERTY_INVALID_FIELDS, + GetAccountHolderResponse.JSON_PROPERTY_LEGAL_ENTITY, + GetAccountHolderResponse.JSON_PROPERTY_MIGRATION_DATA, + GetAccountHolderResponse.JSON_PROPERTY_PRIMARY_CURRENCY, + GetAccountHolderResponse.JSON_PROPERTY_PSP_REFERENCE, + GetAccountHolderResponse.JSON_PROPERTY_RESULT_CODE, + GetAccountHolderResponse.JSON_PROPERTY_SYSTEM_UP_TO_DATE_TIME, + GetAccountHolderResponse.JSON_PROPERTY_VERIFICATION, + GetAccountHolderResponse.JSON_PROPERTY_VERIFICATION_PROFILE +}) + +public class GetAccountHolderResponse { + public static final String JSON_PROPERTY_ACCOUNT_HOLDER_CODE = "accountHolderCode"; + private String accountHolderCode; + + public static final String JSON_PROPERTY_ACCOUNT_HOLDER_DETAILS = "accountHolderDetails"; + private AccountHolderDetails accountHolderDetails; + + public static final String JSON_PROPERTY_ACCOUNT_HOLDER_STATUS = "accountHolderStatus"; + private AccountHolderStatus accountHolderStatus; + + public static final String JSON_PROPERTY_ACCOUNTS = "accounts"; + private List accounts = null; + + public static final String JSON_PROPERTY_DESCRIPTION = "description"; + private String description; + + public static final String JSON_PROPERTY_INVALID_FIELDS = "invalidFields"; + private List invalidFields = null; + + /** + * The legal entity of the account holder. + */ + public enum LegalEntityEnum { + BUSINESS("Business"), + + INDIVIDUAL("Individual"), + + NONPROFIT("NonProfit"), + + PARTNERSHIP("Partnership"), + + PUBLICCOMPANY("PublicCompany"); + + private String value; + + LegalEntityEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static LegalEntityEnum fromValue(String value) { + for (LegalEntityEnum b : LegalEntityEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_LEGAL_ENTITY = "legalEntity"; + private LegalEntityEnum legalEntity; + + public static final String JSON_PROPERTY_MIGRATION_DATA = "migrationData"; + private MigrationData migrationData; + + public static final String JSON_PROPERTY_PRIMARY_CURRENCY = "primaryCurrency"; + private String primaryCurrency; + + public static final String JSON_PROPERTY_PSP_REFERENCE = "pspReference"; + private String pspReference; + + public static final String JSON_PROPERTY_RESULT_CODE = "resultCode"; + private String resultCode; + + public static final String JSON_PROPERTY_SYSTEM_UP_TO_DATE_TIME = "systemUpToDateTime"; + private OffsetDateTime systemUpToDateTime; + + public static final String JSON_PROPERTY_VERIFICATION = "verification"; + private KYCVerificationResult verification; + + public static final String JSON_PROPERTY_VERIFICATION_PROFILE = "verificationProfile"; + private String verificationProfile; + + public GetAccountHolderResponse() { + } + + public GetAccountHolderResponse accountHolderCode(String accountHolderCode) { + this.accountHolderCode = accountHolderCode; + return this; + } + + /** + * The code of the account holder. + * @return accountHolderCode + **/ + @ApiModelProperty(value = "The code of the account holder.") + @JsonProperty(JSON_PROPERTY_ACCOUNT_HOLDER_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getAccountHolderCode() { + return accountHolderCode; + } + + + @JsonProperty(JSON_PROPERTY_ACCOUNT_HOLDER_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAccountHolderCode(String accountHolderCode) { + this.accountHolderCode = accountHolderCode; + } + + + public GetAccountHolderResponse accountHolderDetails(AccountHolderDetails accountHolderDetails) { + this.accountHolderDetails = accountHolderDetails; + return this; + } + + /** + * Get accountHolderDetails + * @return accountHolderDetails + **/ + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_ACCOUNT_HOLDER_DETAILS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public AccountHolderDetails getAccountHolderDetails() { + return accountHolderDetails; + } + + + @JsonProperty(JSON_PROPERTY_ACCOUNT_HOLDER_DETAILS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAccountHolderDetails(AccountHolderDetails accountHolderDetails) { + this.accountHolderDetails = accountHolderDetails; + } + + + public GetAccountHolderResponse accountHolderStatus(AccountHolderStatus accountHolderStatus) { + this.accountHolderStatus = accountHolderStatus; + return this; + } + + /** + * Get accountHolderStatus + * @return accountHolderStatus + **/ + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_ACCOUNT_HOLDER_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public AccountHolderStatus getAccountHolderStatus() { + return accountHolderStatus; + } + + + @JsonProperty(JSON_PROPERTY_ACCOUNT_HOLDER_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAccountHolderStatus(AccountHolderStatus accountHolderStatus) { + this.accountHolderStatus = accountHolderStatus; + } + + + public GetAccountHolderResponse accounts(List accounts) { + this.accounts = accounts; + return this; + } + + public GetAccountHolderResponse addAccountsItem(Account accountsItem) { + if (this.accounts == null) { + this.accounts = new ArrayList<>(); + } + this.accounts.add(accountsItem); + return this; + } + + /** + * A list of the accounts under the account holder. + * @return accounts + **/ + @ApiModelProperty(value = "A list of the accounts under the account holder.") + @JsonProperty(JSON_PROPERTY_ACCOUNTS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getAccounts() { + return accounts; + } + + + @JsonProperty(JSON_PROPERTY_ACCOUNTS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAccounts(List accounts) { + this.accounts = accounts; + } + + + public GetAccountHolderResponse description(String description) { + this.description = description; + return this; + } + + /** + * The description of the account holder. + * @return description + **/ + @ApiModelProperty(value = "The description of the account holder.") + @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 GetAccountHolderResponse invalidFields(List invalidFields) { + this.invalidFields = invalidFields; + return this; + } + + public GetAccountHolderResponse addInvalidFieldsItem(ErrorFieldType invalidFieldsItem) { + if (this.invalidFields == null) { + this.invalidFields = new ArrayList<>(); + } + this.invalidFields.add(invalidFieldsItem); + return this; + } + + /** + * Contains field validation errors that would prevent requests from being processed. + * @return invalidFields + **/ + @ApiModelProperty(value = "Contains field validation errors that would prevent requests from being processed.") + @JsonProperty(JSON_PROPERTY_INVALID_FIELDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getInvalidFields() { + return invalidFields; + } + + + @JsonProperty(JSON_PROPERTY_INVALID_FIELDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setInvalidFields(List invalidFields) { + this.invalidFields = invalidFields; + } + + + public GetAccountHolderResponse legalEntity(LegalEntityEnum legalEntity) { + this.legalEntity = legalEntity; + return this; + } + + /** + * The legal entity of the account holder. + * @return legalEntity + **/ + @ApiModelProperty(value = "The legal entity of the account holder.") + @JsonProperty(JSON_PROPERTY_LEGAL_ENTITY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public LegalEntityEnum getLegalEntity() { + return legalEntity; + } + + + @JsonProperty(JSON_PROPERTY_LEGAL_ENTITY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setLegalEntity(LegalEntityEnum legalEntity) { + this.legalEntity = legalEntity; + } + + + public GetAccountHolderResponse migrationData(MigrationData migrationData) { + this.migrationData = migrationData; + return this; + } + + /** + * Get migrationData + * @return migrationData + **/ + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_MIGRATION_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public MigrationData getMigrationData() { + return migrationData; + } + + + @JsonProperty(JSON_PROPERTY_MIGRATION_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMigrationData(MigrationData migrationData) { + this.migrationData = migrationData; + } + + + public GetAccountHolderResponse primaryCurrency(String primaryCurrency) { + this.primaryCurrency = primaryCurrency; + return this; + } + + /** + * The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes), with which the prospective account holder primarily deals. + * @return primaryCurrency + **/ + @ApiModelProperty(value = "The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes), with which the prospective account holder primarily deals.") + @JsonProperty(JSON_PROPERTY_PRIMARY_CURRENCY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getPrimaryCurrency() { + return primaryCurrency; + } + + + @JsonProperty(JSON_PROPERTY_PRIMARY_CURRENCY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPrimaryCurrency(String primaryCurrency) { + this.primaryCurrency = primaryCurrency; + } + + + public GetAccountHolderResponse pspReference(String pspReference) { + this.pspReference = pspReference; + return this; + } + + /** + * The reference of a request. Can be used to uniquely identify the request. + * @return pspReference + **/ + @ApiModelProperty(value = "The reference of a request. Can be used to uniquely identify the request.") + @JsonProperty(JSON_PROPERTY_PSP_REFERENCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getPspReference() { + return pspReference; + } + + + @JsonProperty(JSON_PROPERTY_PSP_REFERENCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPspReference(String pspReference) { + this.pspReference = pspReference; + } + + + public GetAccountHolderResponse resultCode(String resultCode) { + this.resultCode = resultCode; + return this; + } + + /** + * The result code. + * @return resultCode + **/ + @ApiModelProperty(value = "The result code.") + @JsonProperty(JSON_PROPERTY_RESULT_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getResultCode() { + return resultCode; + } + + + @JsonProperty(JSON_PROPERTY_RESULT_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setResultCode(String resultCode) { + this.resultCode = resultCode; + } + + + public GetAccountHolderResponse systemUpToDateTime(OffsetDateTime systemUpToDateTime) { + this.systemUpToDateTime = systemUpToDateTime; + return this; + } + + /** + * The time that shows how up to date is the information in the response. + * @return systemUpToDateTime + **/ + @ApiModelProperty(value = "The time that shows how up to date is the information in the response.") + @JsonProperty(JSON_PROPERTY_SYSTEM_UP_TO_DATE_TIME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public OffsetDateTime getSystemUpToDateTime() { + return systemUpToDateTime; + } + + + @JsonProperty(JSON_PROPERTY_SYSTEM_UP_TO_DATE_TIME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSystemUpToDateTime(OffsetDateTime systemUpToDateTime) { + this.systemUpToDateTime = systemUpToDateTime; + } + + + public GetAccountHolderResponse verification(KYCVerificationResult verification) { + this.verification = verification; + return this; + } + + /** + * Get verification + * @return verification + **/ + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_VERIFICATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public KYCVerificationResult getVerification() { + return verification; + } + + + @JsonProperty(JSON_PROPERTY_VERIFICATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setVerification(KYCVerificationResult verification) { + this.verification = verification; + } + + + public GetAccountHolderResponse verificationProfile(String verificationProfile) { + this.verificationProfile = verificationProfile; + return this; + } + + /** + * The identifier of the profile that applies to this entity. + * @return verificationProfile + **/ + @ApiModelProperty(value = "The identifier of the profile that applies to this entity.") + @JsonProperty(JSON_PROPERTY_VERIFICATION_PROFILE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getVerificationProfile() { + return verificationProfile; + } + + + @JsonProperty(JSON_PROPERTY_VERIFICATION_PROFILE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setVerificationProfile(String verificationProfile) { + this.verificationProfile = verificationProfile; + } + + + /** + * Return true if this GetAccountHolderResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetAccountHolderResponse getAccountHolderResponse = (GetAccountHolderResponse) o; + return Objects.equals(this.accountHolderCode, getAccountHolderResponse.accountHolderCode) && + Objects.equals(this.accountHolderDetails, getAccountHolderResponse.accountHolderDetails) && + Objects.equals(this.accountHolderStatus, getAccountHolderResponse.accountHolderStatus) && + Objects.equals(this.accounts, getAccountHolderResponse.accounts) && + Objects.equals(this.description, getAccountHolderResponse.description) && + Objects.equals(this.invalidFields, getAccountHolderResponse.invalidFields) && + Objects.equals(this.legalEntity, getAccountHolderResponse.legalEntity) && + Objects.equals(this.migrationData, getAccountHolderResponse.migrationData) && + Objects.equals(this.primaryCurrency, getAccountHolderResponse.primaryCurrency) && + Objects.equals(this.pspReference, getAccountHolderResponse.pspReference) && + Objects.equals(this.resultCode, getAccountHolderResponse.resultCode) && + Objects.equals(this.systemUpToDateTime, getAccountHolderResponse.systemUpToDateTime) && + Objects.equals(this.verification, getAccountHolderResponse.verification) && + Objects.equals(this.verificationProfile, getAccountHolderResponse.verificationProfile); + } + + @Override + public int hashCode() { + return Objects.hash(accountHolderCode, accountHolderDetails, accountHolderStatus, accounts, description, invalidFields, legalEntity, migrationData, primaryCurrency, pspReference, resultCode, systemUpToDateTime, verification, verificationProfile); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetAccountHolderResponse {\n"); + sb.append(" accountHolderCode: ").append(toIndentedString(accountHolderCode)).append("\n"); + sb.append(" accountHolderDetails: ").append(toIndentedString(accountHolderDetails)).append("\n"); + sb.append(" accountHolderStatus: ").append(toIndentedString(accountHolderStatus)).append("\n"); + sb.append(" accounts: ").append(toIndentedString(accounts)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" invalidFields: ").append(toIndentedString(invalidFields)).append("\n"); + sb.append(" legalEntity: ").append(toIndentedString(legalEntity)).append("\n"); + sb.append(" migrationData: ").append(toIndentedString(migrationData)).append("\n"); + sb.append(" primaryCurrency: ").append(toIndentedString(primaryCurrency)).append("\n"); + sb.append(" pspReference: ").append(toIndentedString(pspReference)).append("\n"); + sb.append(" resultCode: ").append(toIndentedString(resultCode)).append("\n"); + sb.append(" systemUpToDateTime: ").append(toIndentedString(systemUpToDateTime)).append("\n"); + sb.append(" verification: ").append(toIndentedString(verification)).append("\n"); + sb.append(" verificationProfile: ").append(toIndentedString(verificationProfile)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line 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 GetAccountHolderResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of GetAccountHolderResponse + * @throws JsonProcessingException if the JSON string is invalid with respect to GetAccountHolderResponse + */ + public static GetAccountHolderResponse fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, GetAccountHolderResponse.class); + } +/** + * Convert an instance of GetAccountHolderResponse 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/marketpayaccount/GetAccountHolderStatusResponse.java b/src/main/java/com/adyen/model/marketpayaccount/GetAccountHolderStatusResponse.java new file mode 100644 index 000000000..5e107845c --- /dev/null +++ b/src/main/java/com/adyen/model/marketpayaccount/GetAccountHolderStatusResponse.java @@ -0,0 +1,265 @@ +/* + * Account API + * This API is used for the classic integration. If you are just starting your implementation, refer to our [new integration guide](https://docs.adyen.com/marketplaces-and-platforms) instead. The Account API provides endpoints for managing account-related entities on your platform. These related entities include account holders, accounts, bank accounts, shareholders, and verification-related documents. The management operations include actions such as creation, retrieval, updating, and deletion of them. For more information, refer to our [documentation](https://docs.adyen.com/marketplaces-and-platforms/classic). ## Authentication Your Adyen contact will provide your API credential and an API key. To connect to the API, add an `X-API-Key` header with the API key as the value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: YOUR_API_KEY\" \\ ... ``` Alternatively, you can use the username and password to connect to the API using basic authentication. For example: ``` curl -U \"ws@MarketPlace.YOUR_PLATFORM_ACCOUNT\":\"YOUR_WS_PASSWORD\" \\ -H \"Content-Type: application/json\" \\ ... ``` When going live, you need to generate new web service user credentials to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning The Account API supports [versioning](https://docs.adyen.com/development-resources/versioning) using a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://cal-test.adyen.com/cal/services/Account/v6/createAccountHolder ``` + * + * The version of the OpenAPI document: 6 + * + * + * 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.marketpayaccount; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.adyen.model.marketpayaccount.AccountHolderStatus; +import com.adyen.model.marketpayaccount.ErrorFieldType; +import com.fasterxml.jackson.annotation.JsonInclude; +import 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; + + +/** + * GetAccountHolderStatusResponse + */ +@JsonPropertyOrder({ + GetAccountHolderStatusResponse.JSON_PROPERTY_ACCOUNT_HOLDER_CODE, + GetAccountHolderStatusResponse.JSON_PROPERTY_ACCOUNT_HOLDER_STATUS, + GetAccountHolderStatusResponse.JSON_PROPERTY_INVALID_FIELDS, + GetAccountHolderStatusResponse.JSON_PROPERTY_PSP_REFERENCE, + GetAccountHolderStatusResponse.JSON_PROPERTY_RESULT_CODE +}) + +public class GetAccountHolderStatusResponse { + public static final String JSON_PROPERTY_ACCOUNT_HOLDER_CODE = "accountHolderCode"; + private String accountHolderCode; + + public static final String JSON_PROPERTY_ACCOUNT_HOLDER_STATUS = "accountHolderStatus"; + private AccountHolderStatus accountHolderStatus; + + public static final String JSON_PROPERTY_INVALID_FIELDS = "invalidFields"; + private List invalidFields = null; + + public static final String JSON_PROPERTY_PSP_REFERENCE = "pspReference"; + private String pspReference; + + public static final String JSON_PROPERTY_RESULT_CODE = "resultCode"; + private String resultCode; + + public GetAccountHolderStatusResponse() { + } + + public GetAccountHolderStatusResponse accountHolderCode(String accountHolderCode) { + this.accountHolderCode = accountHolderCode; + return this; + } + + /** + * The code of the Account Holder. + * @return accountHolderCode + **/ + @ApiModelProperty(value = "The code of the Account Holder.") + @JsonProperty(JSON_PROPERTY_ACCOUNT_HOLDER_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getAccountHolderCode() { + return accountHolderCode; + } + + + @JsonProperty(JSON_PROPERTY_ACCOUNT_HOLDER_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAccountHolderCode(String accountHolderCode) { + this.accountHolderCode = accountHolderCode; + } + + + public GetAccountHolderStatusResponse accountHolderStatus(AccountHolderStatus accountHolderStatus) { + this.accountHolderStatus = accountHolderStatus; + return this; + } + + /** + * Get accountHolderStatus + * @return accountHolderStatus + **/ + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_ACCOUNT_HOLDER_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public AccountHolderStatus getAccountHolderStatus() { + return accountHolderStatus; + } + + + @JsonProperty(JSON_PROPERTY_ACCOUNT_HOLDER_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAccountHolderStatus(AccountHolderStatus accountHolderStatus) { + this.accountHolderStatus = accountHolderStatus; + } + + + public GetAccountHolderStatusResponse invalidFields(List invalidFields) { + this.invalidFields = invalidFields; + return this; + } + + public GetAccountHolderStatusResponse addInvalidFieldsItem(ErrorFieldType invalidFieldsItem) { + if (this.invalidFields == null) { + this.invalidFields = new ArrayList<>(); + } + this.invalidFields.add(invalidFieldsItem); + return this; + } + + /** + * Contains field validation errors that would prevent requests from being processed. + * @return invalidFields + **/ + @ApiModelProperty(value = "Contains field validation errors that would prevent requests from being processed.") + @JsonProperty(JSON_PROPERTY_INVALID_FIELDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getInvalidFields() { + return invalidFields; + } + + + @JsonProperty(JSON_PROPERTY_INVALID_FIELDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setInvalidFields(List invalidFields) { + this.invalidFields = invalidFields; + } + + + public GetAccountHolderStatusResponse pspReference(String pspReference) { + this.pspReference = pspReference; + return this; + } + + /** + * The reference of a request. Can be used to uniquely identify the request. + * @return pspReference + **/ + @ApiModelProperty(value = "The reference of a request. Can be used to uniquely identify the request.") + @JsonProperty(JSON_PROPERTY_PSP_REFERENCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getPspReference() { + return pspReference; + } + + + @JsonProperty(JSON_PROPERTY_PSP_REFERENCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPspReference(String pspReference) { + this.pspReference = pspReference; + } + + + public GetAccountHolderStatusResponse resultCode(String resultCode) { + this.resultCode = resultCode; + return this; + } + + /** + * The result code. + * @return resultCode + **/ + @ApiModelProperty(value = "The result code.") + @JsonProperty(JSON_PROPERTY_RESULT_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getResultCode() { + return resultCode; + } + + + @JsonProperty(JSON_PROPERTY_RESULT_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setResultCode(String resultCode) { + this.resultCode = resultCode; + } + + + /** + * Return true if this GetAccountHolderStatusResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetAccountHolderStatusResponse getAccountHolderStatusResponse = (GetAccountHolderStatusResponse) o; + return Objects.equals(this.accountHolderCode, getAccountHolderStatusResponse.accountHolderCode) && + Objects.equals(this.accountHolderStatus, getAccountHolderStatusResponse.accountHolderStatus) && + Objects.equals(this.invalidFields, getAccountHolderStatusResponse.invalidFields) && + Objects.equals(this.pspReference, getAccountHolderStatusResponse.pspReference) && + Objects.equals(this.resultCode, getAccountHolderStatusResponse.resultCode); + } + + @Override + public int hashCode() { + return Objects.hash(accountHolderCode, accountHolderStatus, invalidFields, pspReference, resultCode); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetAccountHolderStatusResponse {\n"); + sb.append(" accountHolderCode: ").append(toIndentedString(accountHolderCode)).append("\n"); + sb.append(" accountHolderStatus: ").append(toIndentedString(accountHolderStatus)).append("\n"); + sb.append(" invalidFields: ").append(toIndentedString(invalidFields)).append("\n"); + sb.append(" pspReference: ").append(toIndentedString(pspReference)).append("\n"); + sb.append(" resultCode: ").append(toIndentedString(resultCode)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line 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 GetAccountHolderStatusResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of GetAccountHolderStatusResponse + * @throws JsonProcessingException if the JSON string is invalid with respect to GetAccountHolderStatusResponse + */ + public static GetAccountHolderStatusResponse fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, GetAccountHolderStatusResponse.class); + } +/** + * Convert an instance of GetAccountHolderStatusResponse 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/marketpayaccount/GetTaxFormRequest.java b/src/main/java/com/adyen/model/marketpayaccount/GetTaxFormRequest.java new file mode 100644 index 000000000..ff5de6cd8 --- /dev/null +++ b/src/main/java/com/adyen/model/marketpayaccount/GetTaxFormRequest.java @@ -0,0 +1,191 @@ +/* + * Account API + * This API is used for the classic integration. If you are just starting your implementation, refer to our [new integration guide](https://docs.adyen.com/marketplaces-and-platforms) instead. The Account API provides endpoints for managing account-related entities on your platform. These related entities include account holders, accounts, bank accounts, shareholders, and verification-related documents. The management operations include actions such as creation, retrieval, updating, and deletion of them. For more information, refer to our [documentation](https://docs.adyen.com/marketplaces-and-platforms/classic). ## Authentication Your Adyen contact will provide your API credential and an API key. To connect to the API, add an `X-API-Key` header with the API key as the value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: YOUR_API_KEY\" \\ ... ``` Alternatively, you can use the username and password to connect to the API using basic authentication. For example: ``` curl -U \"ws@MarketPlace.YOUR_PLATFORM_ACCOUNT\":\"YOUR_WS_PASSWORD\" \\ -H \"Content-Type: application/json\" \\ ... ``` When going live, you need to generate new web service user credentials to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning The Account API supports [versioning](https://docs.adyen.com/development-resources/versioning) using a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://cal-test.adyen.com/cal/services/Account/v6/createAccountHolder ``` + * + * The version of the OpenAPI document: 6 + * + * + * 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.marketpayaccount; + +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; + + +/** + * GetTaxFormRequest + */ +@JsonPropertyOrder({ + GetTaxFormRequest.JSON_PROPERTY_ACCOUNT_HOLDER_CODE, + GetTaxFormRequest.JSON_PROPERTY_FORM_TYPE, + GetTaxFormRequest.JSON_PROPERTY_YEAR +}) + +public class GetTaxFormRequest { + public static final String JSON_PROPERTY_ACCOUNT_HOLDER_CODE = "accountHolderCode"; + private String accountHolderCode; + + public static final String JSON_PROPERTY_FORM_TYPE = "formType"; + private String formType; + + public static final String JSON_PROPERTY_YEAR = "year"; + private Integer year; + + public GetTaxFormRequest() { + } + + public GetTaxFormRequest accountHolderCode(String accountHolderCode) { + this.accountHolderCode = accountHolderCode; + return this; + } + + /** + * The account holder code you provided when you created the account holder. + * @return accountHolderCode + **/ + @ApiModelProperty(required = true, value = "The account holder code you provided when you created the account holder.") + @JsonProperty(JSON_PROPERTY_ACCOUNT_HOLDER_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getAccountHolderCode() { + return accountHolderCode; + } + + + @JsonProperty(JSON_PROPERTY_ACCOUNT_HOLDER_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAccountHolderCode(String accountHolderCode) { + this.accountHolderCode = accountHolderCode; + } + + + public GetTaxFormRequest formType(String formType) { + this.formType = formType; + return this; + } + + /** + * Type of the requested tax form. For example, 1099-K. + * @return formType + **/ + @ApiModelProperty(required = true, value = "Type of the requested tax form. For example, 1099-K.") + @JsonProperty(JSON_PROPERTY_FORM_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getFormType() { + return formType; + } + + + @JsonProperty(JSON_PROPERTY_FORM_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setFormType(String formType) { + this.formType = formType; + } + + + public GetTaxFormRequest year(Integer year) { + this.year = year; + return this; + } + + /** + * Applicable tax year in the YYYY format. + * @return year + **/ + @ApiModelProperty(required = true, value = "Applicable tax year in the YYYY format.") + @JsonProperty(JSON_PROPERTY_YEAR) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Integer getYear() { + return year; + } + + + @JsonProperty(JSON_PROPERTY_YEAR) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setYear(Integer year) { + this.year = year; + } + + + /** + * Return true if this GetTaxFormRequest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetTaxFormRequest getTaxFormRequest = (GetTaxFormRequest) o; + return Objects.equals(this.accountHolderCode, getTaxFormRequest.accountHolderCode) && + Objects.equals(this.formType, getTaxFormRequest.formType) && + Objects.equals(this.year, getTaxFormRequest.year); + } + + @Override + public int hashCode() { + return Objects.hash(accountHolderCode, formType, year); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetTaxFormRequest {\n"); + sb.append(" accountHolderCode: ").append(toIndentedString(accountHolderCode)).append("\n"); + sb.append(" formType: ").append(toIndentedString(formType)).append("\n"); + sb.append(" year: ").append(toIndentedString(year)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line 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 GetTaxFormRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of GetTaxFormRequest + * @throws JsonProcessingException if the JSON string is invalid with respect to GetTaxFormRequest + */ + public static GetTaxFormRequest fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, GetTaxFormRequest.class); + } +/** + * Convert an instance of GetTaxFormRequest 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/marketpayaccount/GetTaxFormResponse.java b/src/main/java/com/adyen/model/marketpayaccount/GetTaxFormResponse.java new file mode 100644 index 000000000..a854a6f88 --- /dev/null +++ b/src/main/java/com/adyen/model/marketpayaccount/GetTaxFormResponse.java @@ -0,0 +1,264 @@ +/* + * Account API + * This API is used for the classic integration. If you are just starting your implementation, refer to our [new integration guide](https://docs.adyen.com/marketplaces-and-platforms) instead. The Account API provides endpoints for managing account-related entities on your platform. These related entities include account holders, accounts, bank accounts, shareholders, and verification-related documents. The management operations include actions such as creation, retrieval, updating, and deletion of them. For more information, refer to our [documentation](https://docs.adyen.com/marketplaces-and-platforms/classic). ## Authentication Your Adyen contact will provide your API credential and an API key. To connect to the API, add an `X-API-Key` header with the API key as the value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: YOUR_API_KEY\" \\ ... ``` Alternatively, you can use the username and password to connect to the API using basic authentication. For example: ``` curl -U \"ws@MarketPlace.YOUR_PLATFORM_ACCOUNT\":\"YOUR_WS_PASSWORD\" \\ -H \"Content-Type: application/json\" \\ ... ``` When going live, you need to generate new web service user credentials to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning The Account API supports [versioning](https://docs.adyen.com/development-resources/versioning) using a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://cal-test.adyen.com/cal/services/Account/v6/createAccountHolder ``` + * + * The version of the OpenAPI document: 6 + * + * + * 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.marketpayaccount; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.adyen.model.marketpayaccount.ErrorFieldType; +import com.fasterxml.jackson.annotation.JsonInclude; +import 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; + + +/** + * GetTaxFormResponse + */ +@JsonPropertyOrder({ + GetTaxFormResponse.JSON_PROPERTY_CONTENT, + GetTaxFormResponse.JSON_PROPERTY_CONTENT_TYPE, + GetTaxFormResponse.JSON_PROPERTY_INVALID_FIELDS, + GetTaxFormResponse.JSON_PROPERTY_PSP_REFERENCE, + GetTaxFormResponse.JSON_PROPERTY_RESULT_CODE +}) + +public class GetTaxFormResponse { + public static final String JSON_PROPERTY_CONTENT = "content"; + private byte[] content; + + public static final String JSON_PROPERTY_CONTENT_TYPE = "contentType"; + private String contentType; + + public static final String JSON_PROPERTY_INVALID_FIELDS = "invalidFields"; + private List invalidFields = null; + + public static final String JSON_PROPERTY_PSP_REFERENCE = "pspReference"; + private String pspReference; + + public static final String JSON_PROPERTY_RESULT_CODE = "resultCode"; + private String resultCode; + + public GetTaxFormResponse() { + } + + public GetTaxFormResponse content(byte[] content) { + this.content = content; + return this; + } + + /** + * The content of the tax form in the Base64 binary format. + * @return content + **/ + @ApiModelProperty(value = "The content of the tax form in the Base64 binary 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(String contentType) { + this.contentType = contentType; + return this; + } + + /** + * The content type of the tax form. + * @return contentType + **/ + @ApiModelProperty(value = "The content type of the tax form.") + @JsonProperty(JSON_PROPERTY_CONTENT_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getContentType() { + return contentType; + } + + + @JsonProperty(JSON_PROPERTY_CONTENT_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setContentType(String contentType) { + this.contentType = contentType; + } + + + public GetTaxFormResponse invalidFields(List invalidFields) { + this.invalidFields = invalidFields; + return this; + } + + public GetTaxFormResponse addInvalidFieldsItem(ErrorFieldType invalidFieldsItem) { + if (this.invalidFields == null) { + this.invalidFields = new ArrayList<>(); + } + this.invalidFields.add(invalidFieldsItem); + return this; + } + + /** + * Contains field validation errors that would prevent requests from being processed. + * @return invalidFields + **/ + @ApiModelProperty(value = "Contains field validation errors that would prevent requests from being processed.") + @JsonProperty(JSON_PROPERTY_INVALID_FIELDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getInvalidFields() { + return invalidFields; + } + + + @JsonProperty(JSON_PROPERTY_INVALID_FIELDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setInvalidFields(List invalidFields) { + this.invalidFields = invalidFields; + } + + + public GetTaxFormResponse pspReference(String pspReference) { + this.pspReference = pspReference; + return this; + } + + /** + * The reference of a request. Can be used to uniquely identify the request. + * @return pspReference + **/ + @ApiModelProperty(value = "The reference of a request. Can be used to uniquely identify the request.") + @JsonProperty(JSON_PROPERTY_PSP_REFERENCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getPspReference() { + return pspReference; + } + + + @JsonProperty(JSON_PROPERTY_PSP_REFERENCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPspReference(String pspReference) { + this.pspReference = pspReference; + } + + + public GetTaxFormResponse resultCode(String resultCode) { + this.resultCode = resultCode; + return this; + } + + /** + * The result code. + * @return resultCode + **/ + @ApiModelProperty(value = "The result code.") + @JsonProperty(JSON_PROPERTY_RESULT_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getResultCode() { + return resultCode; + } + + + @JsonProperty(JSON_PROPERTY_RESULT_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setResultCode(String resultCode) { + this.resultCode = resultCode; + } + + + /** + * 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) && + Objects.equals(this.invalidFields, getTaxFormResponse.invalidFields) && + Objects.equals(this.pspReference, getTaxFormResponse.pspReference) && + Objects.equals(this.resultCode, getTaxFormResponse.resultCode); + } + + @Override + public int hashCode() { + return Objects.hash(Arrays.hashCode(content), contentType, invalidFields, pspReference, resultCode); + } + + @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(" invalidFields: ").append(toIndentedString(invalidFields)).append("\n"); + sb.append(" pspReference: ").append(toIndentedString(pspReference)).append("\n"); + sb.append(" resultCode: ").append(toIndentedString(resultCode)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line 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/marketpayaccount/GetUploadedDocumentsRequest.java b/src/main/java/com/adyen/model/marketpayaccount/GetUploadedDocumentsRequest.java new file mode 100644 index 000000000..e7be24d90 --- /dev/null +++ b/src/main/java/com/adyen/model/marketpayaccount/GetUploadedDocumentsRequest.java @@ -0,0 +1,191 @@ +/* + * Account API + * This API is used for the classic integration. If you are just starting your implementation, refer to our [new integration guide](https://docs.adyen.com/marketplaces-and-platforms) instead. The Account API provides endpoints for managing account-related entities on your platform. These related entities include account holders, accounts, bank accounts, shareholders, and verification-related documents. The management operations include actions such as creation, retrieval, updating, and deletion of them. For more information, refer to our [documentation](https://docs.adyen.com/marketplaces-and-platforms/classic). ## Authentication Your Adyen contact will provide your API credential and an API key. To connect to the API, add an `X-API-Key` header with the API key as the value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: YOUR_API_KEY\" \\ ... ``` Alternatively, you can use the username and password to connect to the API using basic authentication. For example: ``` curl -U \"ws@MarketPlace.YOUR_PLATFORM_ACCOUNT\":\"YOUR_WS_PASSWORD\" \\ -H \"Content-Type: application/json\" \\ ... ``` When going live, you need to generate new web service user credentials to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning The Account API supports [versioning](https://docs.adyen.com/development-resources/versioning) using a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://cal-test.adyen.com/cal/services/Account/v6/createAccountHolder ``` + * + * The version of the OpenAPI document: 6 + * + * + * 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.marketpayaccount; + +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; + + +/** + * GetUploadedDocumentsRequest + */ +@JsonPropertyOrder({ + GetUploadedDocumentsRequest.JSON_PROPERTY_ACCOUNT_HOLDER_CODE, + GetUploadedDocumentsRequest.JSON_PROPERTY_BANK_ACCOUNT_U_U_I_D, + GetUploadedDocumentsRequest.JSON_PROPERTY_SHAREHOLDER_CODE +}) + +public class GetUploadedDocumentsRequest { + public static final String JSON_PROPERTY_ACCOUNT_HOLDER_CODE = "accountHolderCode"; + private String accountHolderCode; + + public static final String JSON_PROPERTY_BANK_ACCOUNT_U_U_I_D = "bankAccountUUID"; + private String bankAccountUUID; + + public static final String JSON_PROPERTY_SHAREHOLDER_CODE = "shareholderCode"; + private String shareholderCode; + + public GetUploadedDocumentsRequest() { + } + + public GetUploadedDocumentsRequest accountHolderCode(String accountHolderCode) { + this.accountHolderCode = accountHolderCode; + return this; + } + + /** + * The code of the Account Holder for which to retrieve the documents. + * @return accountHolderCode + **/ + @ApiModelProperty(required = true, value = "The code of the Account Holder for which to retrieve the documents.") + @JsonProperty(JSON_PROPERTY_ACCOUNT_HOLDER_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getAccountHolderCode() { + return accountHolderCode; + } + + + @JsonProperty(JSON_PROPERTY_ACCOUNT_HOLDER_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAccountHolderCode(String accountHolderCode) { + this.accountHolderCode = accountHolderCode; + } + + + public GetUploadedDocumentsRequest bankAccountUUID(String bankAccountUUID) { + this.bankAccountUUID = bankAccountUUID; + return this; + } + + /** + * The code of the Bank Account for which to retrieve the documents. + * @return bankAccountUUID + **/ + @ApiModelProperty(value = "The code of the Bank Account for which to retrieve the documents.") + @JsonProperty(JSON_PROPERTY_BANK_ACCOUNT_U_U_I_D) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getBankAccountUUID() { + return bankAccountUUID; + } + + + @JsonProperty(JSON_PROPERTY_BANK_ACCOUNT_U_U_I_D) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setBankAccountUUID(String bankAccountUUID) { + this.bankAccountUUID = bankAccountUUID; + } + + + public GetUploadedDocumentsRequest shareholderCode(String shareholderCode) { + this.shareholderCode = shareholderCode; + return this; + } + + /** + * The code of the Shareholder for which to retrieve the documents. + * @return shareholderCode + **/ + @ApiModelProperty(value = "The code of the Shareholder for which to retrieve the documents.") + @JsonProperty(JSON_PROPERTY_SHAREHOLDER_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getShareholderCode() { + return shareholderCode; + } + + + @JsonProperty(JSON_PROPERTY_SHAREHOLDER_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setShareholderCode(String shareholderCode) { + this.shareholderCode = shareholderCode; + } + + + /** + * Return true if this GetUploadedDocumentsRequest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetUploadedDocumentsRequest getUploadedDocumentsRequest = (GetUploadedDocumentsRequest) o; + return Objects.equals(this.accountHolderCode, getUploadedDocumentsRequest.accountHolderCode) && + Objects.equals(this.bankAccountUUID, getUploadedDocumentsRequest.bankAccountUUID) && + Objects.equals(this.shareholderCode, getUploadedDocumentsRequest.shareholderCode); + } + + @Override + public int hashCode() { + return Objects.hash(accountHolderCode, bankAccountUUID, shareholderCode); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetUploadedDocumentsRequest {\n"); + sb.append(" accountHolderCode: ").append(toIndentedString(accountHolderCode)).append("\n"); + sb.append(" bankAccountUUID: ").append(toIndentedString(bankAccountUUID)).append("\n"); + sb.append(" shareholderCode: ").append(toIndentedString(shareholderCode)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line 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 GetUploadedDocumentsRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of GetUploadedDocumentsRequest + * @throws JsonProcessingException if the JSON string is invalid with respect to GetUploadedDocumentsRequest + */ + public static GetUploadedDocumentsRequest fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, GetUploadedDocumentsRequest.class); + } +/** + * Convert an instance of GetUploadedDocumentsRequest 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/marketpayaccount/GetUploadedDocumentsResponse.java b/src/main/java/com/adyen/model/marketpayaccount/GetUploadedDocumentsResponse.java new file mode 100644 index 000000000..9c8cc4626 --- /dev/null +++ b/src/main/java/com/adyen/model/marketpayaccount/GetUploadedDocumentsResponse.java @@ -0,0 +1,242 @@ +/* + * Account API + * This API is used for the classic integration. If you are just starting your implementation, refer to our [new integration guide](https://docs.adyen.com/marketplaces-and-platforms) instead. The Account API provides endpoints for managing account-related entities on your platform. These related entities include account holders, accounts, bank accounts, shareholders, and verification-related documents. The management operations include actions such as creation, retrieval, updating, and deletion of them. For more information, refer to our [documentation](https://docs.adyen.com/marketplaces-and-platforms/classic). ## Authentication Your Adyen contact will provide your API credential and an API key. To connect to the API, add an `X-API-Key` header with the API key as the value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: YOUR_API_KEY\" \\ ... ``` Alternatively, you can use the username and password to connect to the API using basic authentication. For example: ``` curl -U \"ws@MarketPlace.YOUR_PLATFORM_ACCOUNT\":\"YOUR_WS_PASSWORD\" \\ -H \"Content-Type: application/json\" \\ ... ``` When going live, you need to generate new web service user credentials to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning The Account API supports [versioning](https://docs.adyen.com/development-resources/versioning) using a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://cal-test.adyen.com/cal/services/Account/v6/createAccountHolder ``` + * + * The version of the OpenAPI document: 6 + * + * + * 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.marketpayaccount; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.adyen.model.marketpayaccount.DocumentDetail; +import com.adyen.model.marketpayaccount.ErrorFieldType; +import com.fasterxml.jackson.annotation.JsonInclude; +import 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; + + +/** + * GetUploadedDocumentsResponse + */ +@JsonPropertyOrder({ + GetUploadedDocumentsResponse.JSON_PROPERTY_DOCUMENT_DETAILS, + GetUploadedDocumentsResponse.JSON_PROPERTY_INVALID_FIELDS, + GetUploadedDocumentsResponse.JSON_PROPERTY_PSP_REFERENCE, + GetUploadedDocumentsResponse.JSON_PROPERTY_RESULT_CODE +}) + +public class GetUploadedDocumentsResponse { + public static final String JSON_PROPERTY_DOCUMENT_DETAILS = "documentDetails"; + private List documentDetails = null; + + public static final String JSON_PROPERTY_INVALID_FIELDS = "invalidFields"; + private List invalidFields = null; + + public static final String JSON_PROPERTY_PSP_REFERENCE = "pspReference"; + private String pspReference; + + public static final String JSON_PROPERTY_RESULT_CODE = "resultCode"; + private String resultCode; + + public GetUploadedDocumentsResponse() { + } + + public GetUploadedDocumentsResponse documentDetails(List documentDetails) { + this.documentDetails = documentDetails; + return this; + } + + public GetUploadedDocumentsResponse addDocumentDetailsItem(DocumentDetail documentDetailsItem) { + if (this.documentDetails == null) { + this.documentDetails = new ArrayList<>(); + } + this.documentDetails.add(documentDetailsItem); + return this; + } + + /** + * A list of the documents and their details. + * @return documentDetails + **/ + @ApiModelProperty(value = "A list of the documents and their details.") + @JsonProperty(JSON_PROPERTY_DOCUMENT_DETAILS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getDocumentDetails() { + return documentDetails; + } + + + @JsonProperty(JSON_PROPERTY_DOCUMENT_DETAILS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDocumentDetails(List documentDetails) { + this.documentDetails = documentDetails; + } + + + public GetUploadedDocumentsResponse invalidFields(List invalidFields) { + this.invalidFields = invalidFields; + return this; + } + + public GetUploadedDocumentsResponse addInvalidFieldsItem(ErrorFieldType invalidFieldsItem) { + if (this.invalidFields == null) { + this.invalidFields = new ArrayList<>(); + } + this.invalidFields.add(invalidFieldsItem); + return this; + } + + /** + * Contains field validation errors that would prevent requests from being processed. + * @return invalidFields + **/ + @ApiModelProperty(value = "Contains field validation errors that would prevent requests from being processed.") + @JsonProperty(JSON_PROPERTY_INVALID_FIELDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getInvalidFields() { + return invalidFields; + } + + + @JsonProperty(JSON_PROPERTY_INVALID_FIELDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setInvalidFields(List invalidFields) { + this.invalidFields = invalidFields; + } + + + public GetUploadedDocumentsResponse pspReference(String pspReference) { + this.pspReference = pspReference; + return this; + } + + /** + * The reference of a request. Can be used to uniquely identify the request. + * @return pspReference + **/ + @ApiModelProperty(value = "The reference of a request. Can be used to uniquely identify the request.") + @JsonProperty(JSON_PROPERTY_PSP_REFERENCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getPspReference() { + return pspReference; + } + + + @JsonProperty(JSON_PROPERTY_PSP_REFERENCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPspReference(String pspReference) { + this.pspReference = pspReference; + } + + + public GetUploadedDocumentsResponse resultCode(String resultCode) { + this.resultCode = resultCode; + return this; + } + + /** + * The result code. + * @return resultCode + **/ + @ApiModelProperty(value = "The result code.") + @JsonProperty(JSON_PROPERTY_RESULT_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getResultCode() { + return resultCode; + } + + + @JsonProperty(JSON_PROPERTY_RESULT_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setResultCode(String resultCode) { + this.resultCode = resultCode; + } + + + /** + * Return true if this GetUploadedDocumentsResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetUploadedDocumentsResponse getUploadedDocumentsResponse = (GetUploadedDocumentsResponse) o; + return Objects.equals(this.documentDetails, getUploadedDocumentsResponse.documentDetails) && + Objects.equals(this.invalidFields, getUploadedDocumentsResponse.invalidFields) && + Objects.equals(this.pspReference, getUploadedDocumentsResponse.pspReference) && + Objects.equals(this.resultCode, getUploadedDocumentsResponse.resultCode); + } + + @Override + public int hashCode() { + return Objects.hash(documentDetails, invalidFields, pspReference, resultCode); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetUploadedDocumentsResponse {\n"); + sb.append(" documentDetails: ").append(toIndentedString(documentDetails)).append("\n"); + sb.append(" invalidFields: ").append(toIndentedString(invalidFields)).append("\n"); + sb.append(" pspReference: ").append(toIndentedString(pspReference)).append("\n"); + sb.append(" resultCode: ").append(toIndentedString(resultCode)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line 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 GetUploadedDocumentsResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of GetUploadedDocumentsResponse + * @throws JsonProcessingException if the JSON string is invalid with respect to GetUploadedDocumentsResponse + */ + public static GetUploadedDocumentsResponse fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, GetUploadedDocumentsResponse.class); + } +/** + * Convert an instance of GetUploadedDocumentsResponse 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/marketpayaccount/IndividualDetails.java b/src/main/java/com/adyen/model/marketpayaccount/IndividualDetails.java new file mode 100644 index 000000000..3703fb7b3 --- /dev/null +++ b/src/main/java/com/adyen/model/marketpayaccount/IndividualDetails.java @@ -0,0 +1,162 @@ +/* + * Account API + * This API is used for the classic integration. If you are just starting your implementation, refer to our [new integration guide](https://docs.adyen.com/marketplaces-and-platforms) instead. The Account API provides endpoints for managing account-related entities on your platform. These related entities include account holders, accounts, bank accounts, shareholders, and verification-related documents. The management operations include actions such as creation, retrieval, updating, and deletion of them. For more information, refer to our [documentation](https://docs.adyen.com/marketplaces-and-platforms/classic). ## Authentication Your Adyen contact will provide your API credential and an API key. To connect to the API, add an `X-API-Key` header with the API key as the value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: YOUR_API_KEY\" \\ ... ``` Alternatively, you can use the username and password to connect to the API using basic authentication. For example: ``` curl -U \"ws@MarketPlace.YOUR_PLATFORM_ACCOUNT\":\"YOUR_WS_PASSWORD\" \\ -H \"Content-Type: application/json\" \\ ... ``` When going live, you need to generate new web service user credentials to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning The Account API supports [versioning](https://docs.adyen.com/development-resources/versioning) using a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://cal-test.adyen.com/cal/services/Account/v6/createAccountHolder ``` + * + * The version of the OpenAPI document: 6 + * + * + * 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.marketpayaccount; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.adyen.model.marketpayaccount.ViasName; +import com.adyen.model.marketpayaccount.ViasPersonalData; +import com.fasterxml.jackson.annotation.JsonInclude; +import 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; + + +/** + * IndividualDetails + */ +@JsonPropertyOrder({ + IndividualDetails.JSON_PROPERTY_NAME, + IndividualDetails.JSON_PROPERTY_PERSONAL_DATA +}) + +public class IndividualDetails { + public static final String JSON_PROPERTY_NAME = "name"; + private ViasName name; + + public static final String JSON_PROPERTY_PERSONAL_DATA = "personalData"; + private ViasPersonalData personalData; + + public IndividualDetails() { + } + + public IndividualDetails name(ViasName name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + **/ + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public ViasName getName() { + return name; + } + + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setName(ViasName name) { + this.name = name; + } + + + public IndividualDetails personalData(ViasPersonalData personalData) { + this.personalData = personalData; + return this; + } + + /** + * Get personalData + * @return personalData + **/ + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_PERSONAL_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public ViasPersonalData getPersonalData() { + return personalData; + } + + + @JsonProperty(JSON_PROPERTY_PERSONAL_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPersonalData(ViasPersonalData personalData) { + this.personalData = personalData; + } + + + /** + * Return true if this IndividualDetails object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IndividualDetails individualDetails = (IndividualDetails) o; + return Objects.equals(this.name, individualDetails.name) && + Objects.equals(this.personalData, individualDetails.personalData); + } + + @Override + public int hashCode() { + return Objects.hash(name, personalData); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IndividualDetails {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" personalData: ").append(toIndentedString(personalData)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line 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 IndividualDetails given an JSON string + * + * @param jsonString JSON string + * @return An instance of IndividualDetails + * @throws JsonProcessingException if the JSON string is invalid with respect to IndividualDetails + */ + public static IndividualDetails fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, IndividualDetails.class); + } +/** + * Convert an instance of IndividualDetails 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/marketpayaccount/JSON.java b/src/main/java/com/adyen/model/marketpayaccount/JSON.java new file mode 100644 index 000000000..e5f55d033 --- /dev/null +++ b/src/main/java/com/adyen/model/marketpayaccount/JSON.java @@ -0,0 +1,253 @@ +package com.adyen.model.marketpayaccount; + +import com.adyen.serializer.ByteArrayDeserializer; +import com.adyen.serializer.ByteArraySerializer; +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.*; +import com.fasterxml.jackson.databind.json.JsonMapper; +import com.fasterxml.jackson.databind.module.SimpleModule; +import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule; +import com.adyen.model.marketpayaccount.*; + +import java.text.DateFormat; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Map; +import java.util.Set; +import jakarta.ws.rs.core.GenericType; +import jakarta.ws.rs.ext.ContextResolver; + +public class JSON implements ContextResolver { + private static ObjectMapper mapper; + + public JSON() { + mapper = new ObjectMapper(); + mapper.setSerializationInclusion(JsonInclude.Include.NON_NULL); + JsonMapper.builder().configure(MapperFeature.ALLOW_COERCION_OF_SCALARS, false); + mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); + mapper.configure(DeserializationFeature.FAIL_ON_INVALID_SUBTYPE, true); + mapper.disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS); + mapper.disable(DeserializationFeature.ADJUST_DATES_TO_CONTEXT_TIME_ZONE); + mapper.enable(SerializationFeature.WRITE_ENUMS_USING_TO_STRING); + mapper.enable(DeserializationFeature.READ_ENUMS_USING_TO_STRING); + mapper.registerModule(new JavaTimeModule()); + // Custom ByteSerializer + SimpleModule simpleModule = new SimpleModule(); + simpleModule.addSerializer(byte[].class, new ByteArraySerializer()); + simpleModule.addDeserializer(byte[].class, new ByteArrayDeserializer()); + mapper.registerModule(simpleModule); + } + + /** + * Set the date format for JSON (de)serialization with Date properties. + * @param dateFormat Date format + */ + public void setDateFormat(DateFormat dateFormat) { + mapper.setDateFormat(dateFormat); + } + + @Override + public ObjectMapper getContext(Class type) { + return mapper; + } + + /** + * Get the object mapper + * + * @return object mapper + */ + public static ObjectMapper getMapper() { return mapper; } + + /** + * Returns the target model class that should be used to deserialize the input data. + * The discriminator mappings are used to determine the target model class. + * + * @param node The input data. + * @param modelClass The class that contains the discriminator mappings. + */ + public static Class getClassForElement(JsonNode node, Class modelClass) { + ClassDiscriminatorMapping cdm = modelDiscriminators.get(modelClass); + if (cdm != null) { + return cdm.getClassForElement(node, new HashSet>()); + } + return null; + } + + /** + * Helper class to register the discriminator mappings. + */ + private static class ClassDiscriminatorMapping { + // The model class name. + Class modelClass; + // The name of the discriminator property. + String discriminatorName; + // The discriminator mappings for a model class. + Map> discriminatorMappings; + + // Constructs a new class discriminator. + ClassDiscriminatorMapping(Class cls, String propertyName, Map> mappings) { + modelClass = cls; + discriminatorName = propertyName; + discriminatorMappings = new HashMap>(); + if (mappings != null) { + discriminatorMappings.putAll(mappings); + } + } + + // Return the name of the discriminator property for this model class. + String getDiscriminatorPropertyName() { + return discriminatorName; + } + + // Return the discriminator value or null if the discriminator is not + // present in the payload. + String getDiscriminatorValue(JsonNode node) { + // Determine the value of the discriminator property in the input data. + if (discriminatorName != null) { + // Get the value of the discriminator property, if present in the input payload. + node = node.get(discriminatorName); + if (node != null && node.isValueNode()) { + String discrValue = node.asText(); + if (discrValue != null) { + return discrValue; + } + } + } + return null; + } + + /** + * Returns the target model class that should be used to deserialize the input data. + * This function can be invoked for anyOf/oneOf composed models with discriminator mappings. + * The discriminator mappings are used to determine the target model class. + * + * @param node The input data. + * @param visitedClasses The set of classes that have already been visited. + */ + Class getClassForElement(JsonNode node, Set> visitedClasses) { + if (visitedClasses.contains(modelClass)) { + // Class has already been visited. + return null; + } + // Determine the value of the discriminator property in the input data. + String discrValue = getDiscriminatorValue(node); + if (discrValue == null) { + return null; + } + Class cls = discriminatorMappings.get(discrValue); + // It may not be sufficient to return this cls directly because that target class + // may itself be a composed schema, possibly with its own discriminator. + visitedClasses.add(modelClass); + for (Class childClass : discriminatorMappings.values()) { + ClassDiscriminatorMapping childCdm = modelDiscriminators.get(childClass); + if (childCdm == null) { + continue; + } + if (!discriminatorName.equals(childCdm.discriminatorName)) { + discrValue = getDiscriminatorValue(node); + if (discrValue == null) { + continue; + } + } + if (childCdm != null) { + // Recursively traverse the discriminator mappings. + Class childDiscr = childCdm.getClassForElement(node, visitedClasses); + if (childDiscr != null) { + return childDiscr; + } + } + } + return cls; + } + } + + /** + * Returns true if inst is an instance of modelClass in the OpenAPI model hierarchy. + * + * The Java class hierarchy is not implemented the same way as the OpenAPI model hierarchy, + * so it's not possible to use the instanceof keyword. + * + * @param modelClass A OpenAPI model class. + * @param inst The instance object. + */ + public static boolean isInstanceOf(Class modelClass, Object inst, Set> visitedClasses) { + if (modelClass.isInstance(inst)) { + // This handles the 'allOf' use case with single parent inheritance. + return true; + } + if (visitedClasses.contains(modelClass)) { + // This is to prevent infinite recursion when the composed schemas have + // a circular dependency. + return false; + } + visitedClasses.add(modelClass); + + // Traverse the oneOf/anyOf composed schemas. + Map descendants = modelDescendants.get(modelClass); + if (descendants != null) { + for (GenericType childType : descendants.values()) { + if (isInstanceOf(childType.getRawType(), inst, visitedClasses)) { + return true; + } + } + } + return false; + } + + /** + * A map of discriminators for all model classes. + */ + private static Map, ClassDiscriminatorMapping> modelDiscriminators = new HashMap, ClassDiscriminatorMapping>(); + + /** + * A map of oneOf/anyOf descendants for each model class. + */ + private static Map, Map> modelDescendants = new HashMap, Map>(); + + /** + * Register a model class discriminator. + * + * @param modelClass the model class + * @param discriminatorPropertyName the name of the discriminator property + * @param mappings a map with the discriminator mappings. + */ + public static void registerDiscriminator(Class modelClass, String discriminatorPropertyName, Map> mappings) { + ClassDiscriminatorMapping m = new ClassDiscriminatorMapping(modelClass, discriminatorPropertyName, mappings); + modelDiscriminators.put(modelClass, m); + } + + /** + * Register the oneOf/anyOf descendants of the modelClass. + * + * @param modelClass the model class + * @param descendants a map of oneOf/anyOf descendants. + */ + public static void registerDescendants(Class modelClass, Map descendants) { + modelDescendants.put(modelClass, descendants); + } + + private static JSON json; + + static + { + json = new JSON(); + } + + /** + * Get the default JSON instance. + * + * @return the default JSON instance + */ + public static JSON getDefault() { + return json; + } + + /** + * Set the default JSON instance. + * + * @param json JSON instance to be used + */ + public static void setDefault(JSON json) { + JSON.json = json; + } +} diff --git a/src/main/java/com/adyen/model/marketpayaccount/KYCCheckResult.java b/src/main/java/com/adyen/model/marketpayaccount/KYCCheckResult.java new file mode 100644 index 000000000..42f089b19 --- /dev/null +++ b/src/main/java/com/adyen/model/marketpayaccount/KYCCheckResult.java @@ -0,0 +1,140 @@ +/* + * Account API + * This API is used for the classic integration. If you are just starting your implementation, refer to our [new integration guide](https://docs.adyen.com/marketplaces-and-platforms) instead. The Account API provides endpoints for managing account-related entities on your platform. These related entities include account holders, accounts, bank accounts, shareholders, and verification-related documents. The management operations include actions such as creation, retrieval, updating, and deletion of them. For more information, refer to our [documentation](https://docs.adyen.com/marketplaces-and-platforms/classic). ## Authentication Your Adyen contact will provide your API credential and an API key. To connect to the API, add an `X-API-Key` header with the API key as the value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: YOUR_API_KEY\" \\ ... ``` Alternatively, you can use the username and password to connect to the API using basic authentication. For example: ``` curl -U \"ws@MarketPlace.YOUR_PLATFORM_ACCOUNT\":\"YOUR_WS_PASSWORD\" \\ -H \"Content-Type: application/json\" \\ ... ``` When going live, you need to generate new web service user credentials to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning The Account API supports [versioning](https://docs.adyen.com/development-resources/versioning) using a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://cal-test.adyen.com/cal/services/Account/v6/createAccountHolder ``` + * + * The version of the OpenAPI document: 6 + * + * + * 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.marketpayaccount; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.adyen.model.marketpayaccount.KYCCheckStatusData; +import com.fasterxml.jackson.annotation.JsonInclude; +import 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; + + +/** + * KYCCheckResult + */ +@JsonPropertyOrder({ + KYCCheckResult.JSON_PROPERTY_CHECKS +}) + +public class KYCCheckResult { + public static final String JSON_PROPERTY_CHECKS = "checks"; + private List checks = null; + + public KYCCheckResult() { + } + + public KYCCheckResult checks(List checks) { + this.checks = checks; + return this; + } + + public KYCCheckResult addChecksItem(KYCCheckStatusData checksItem) { + if (this.checks == null) { + this.checks = new ArrayList<>(); + } + this.checks.add(checksItem); + return this; + } + + /** + * A list of the checks and their statuses. + * @return checks + **/ + @ApiModelProperty(value = "A list of the checks and their statuses.") + @JsonProperty(JSON_PROPERTY_CHECKS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getChecks() { + return checks; + } + + + @JsonProperty(JSON_PROPERTY_CHECKS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setChecks(List checks) { + this.checks = checks; + } + + + /** + * Return true if this KYCCheckResult object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + KYCCheckResult kyCCheckResult = (KYCCheckResult) o; + return Objects.equals(this.checks, kyCCheckResult.checks); + } + + @Override + public int hashCode() { + return Objects.hash(checks); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class KYCCheckResult {\n"); + sb.append(" checks: ").append(toIndentedString(checks)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line 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 KYCCheckResult given an JSON string + * + * @param jsonString JSON string + * @return An instance of KYCCheckResult + * @throws JsonProcessingException if the JSON string is invalid with respect to KYCCheckResult + */ + public static KYCCheckResult fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, KYCCheckResult.class); + } +/** + * Convert an instance of KYCCheckResult 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/marketpayaccount/KYCCheckStatusData.java b/src/main/java/com/adyen/model/marketpayaccount/KYCCheckStatusData.java new file mode 100644 index 000000000..c7f6837af --- /dev/null +++ b/src/main/java/com/adyen/model/marketpayaccount/KYCCheckStatusData.java @@ -0,0 +1,331 @@ +/* + * Account API + * This API is used for the classic integration. If you are just starting your implementation, refer to our [new integration guide](https://docs.adyen.com/marketplaces-and-platforms) instead. The Account API provides endpoints for managing account-related entities on your platform. These related entities include account holders, accounts, bank accounts, shareholders, and verification-related documents. The management operations include actions such as creation, retrieval, updating, and deletion of them. For more information, refer to our [documentation](https://docs.adyen.com/marketplaces-and-platforms/classic). ## Authentication Your Adyen contact will provide your API credential and an API key. To connect to the API, add an `X-API-Key` header with the API key as the value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: YOUR_API_KEY\" \\ ... ``` Alternatively, you can use the username and password to connect to the API using basic authentication. For example: ``` curl -U \"ws@MarketPlace.YOUR_PLATFORM_ACCOUNT\":\"YOUR_WS_PASSWORD\" \\ -H \"Content-Type: application/json\" \\ ... ``` When going live, you need to generate new web service user credentials to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning The Account API supports [versioning](https://docs.adyen.com/development-resources/versioning) using a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://cal-test.adyen.com/cal/services/Account/v6/createAccountHolder ``` + * + * The version of the OpenAPI document: 6 + * + * + * 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.marketpayaccount; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.adyen.model.marketpayaccount.KYCCheckSummary; +import com.fasterxml.jackson.annotation.JsonInclude; +import 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; + + +/** + * KYCCheckStatusData + */ +@JsonPropertyOrder({ + KYCCheckStatusData.JSON_PROPERTY_REQUIRED_FIELDS, + KYCCheckStatusData.JSON_PROPERTY_STATUS, + KYCCheckStatusData.JSON_PROPERTY_SUMMARY, + KYCCheckStatusData.JSON_PROPERTY_TYPE +}) + +public class KYCCheckStatusData { + public static final String JSON_PROPERTY_REQUIRED_FIELDS = "requiredFields"; + private List requiredFields = null; + + /** + * The status of the check. Possible values: **AWAITING_DATA** , **DATA_PROVIDED**, **FAILED**, **INVALID_DATA**, **PASSED**, **PENDING**, **RETRY_LIMIT_REACHED**. + */ + public enum StatusEnum { + AWAITING_DATA("AWAITING_DATA"), + + DATA_PROVIDED("DATA_PROVIDED"), + + FAILED("FAILED"), + + INVALID_DATA("INVALID_DATA"), + + PASSED("PASSED"), + + PENDING("PENDING"), + + PENDING_REVIEW("PENDING_REVIEW"), + + RETRY_LIMIT_REACHED("RETRY_LIMIT_REACHED"), + + UNCHECKED("UNCHECKED"); + + 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_SUMMARY = "summary"; + private KYCCheckSummary summary; + + /** + * The type of check. Possible values: * **BANK_ACCOUNT_VERIFICATION**: Used in v5 and earlier. Replaced by **PAYOUT_METHOD_VERIFICATION** in v6 and later. * **COMPANY_VERIFICATION** * **CARD_VERIFICATION** * **IDENTITY_VERIFICATION** * **LEGAL_ARRANGEMENT_VERIFICATION** * **NONPROFIT_VERIFICATION** * **PASSPORT_VERIFICATION** * **PAYOUT_METHOD_VERIFICATION**: Used in v6 and later. * **PCI_VERIFICATION** + */ + public enum TypeEnum { + BANK_ACCOUNT_VERIFICATION("BANK_ACCOUNT_VERIFICATION"), + + CARD_VERIFICATION("CARD_VERIFICATION"), + + COMPANY_VERIFICATION("COMPANY_VERIFICATION"), + + IDENTITY_VERIFICATION("IDENTITY_VERIFICATION"), + + LEGAL_ARRANGEMENT_VERIFICATION("LEGAL_ARRANGEMENT_VERIFICATION"), + + NONPROFIT_VERIFICATION("NONPROFIT_VERIFICATION"), + + PASSPORT_VERIFICATION("PASSPORT_VERIFICATION"), + + PAYOUT_METHOD_VERIFICATION("PAYOUT_METHOD_VERIFICATION"), + + PCI_VERIFICATION("PCI_VERIFICATION"); + + 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 KYCCheckStatusData() { + } + + public KYCCheckStatusData requiredFields(List requiredFields) { + this.requiredFields = requiredFields; + return this; + } + + public KYCCheckStatusData addRequiredFieldsItem(String requiredFieldsItem) { + if (this.requiredFields == null) { + this.requiredFields = new ArrayList<>(); + } + this.requiredFields.add(requiredFieldsItem); + return this; + } + + /** + * A list of the fields required for execution of the check. + * @return requiredFields + **/ + @ApiModelProperty(value = "A list of the fields required for execution of the check.") + @JsonProperty(JSON_PROPERTY_REQUIRED_FIELDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getRequiredFields() { + return requiredFields; + } + + + @JsonProperty(JSON_PROPERTY_REQUIRED_FIELDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setRequiredFields(List requiredFields) { + this.requiredFields = requiredFields; + } + + + public KYCCheckStatusData status(StatusEnum status) { + this.status = status; + return this; + } + + /** + * The status of the check. Possible values: **AWAITING_DATA** , **DATA_PROVIDED**, **FAILED**, **INVALID_DATA**, **PASSED**, **PENDING**, **RETRY_LIMIT_REACHED**. + * @return status + **/ + @ApiModelProperty(required = true, value = "The status of the check. Possible values: **AWAITING_DATA** , **DATA_PROVIDED**, **FAILED**, **INVALID_DATA**, **PASSED**, **PENDING**, **RETRY_LIMIT_REACHED**.") + @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 KYCCheckStatusData summary(KYCCheckSummary summary) { + this.summary = summary; + return this; + } + + /** + * Get summary + * @return summary + **/ + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_SUMMARY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public KYCCheckSummary getSummary() { + return summary; + } + + + @JsonProperty(JSON_PROPERTY_SUMMARY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSummary(KYCCheckSummary summary) { + this.summary = summary; + } + + + public KYCCheckStatusData type(TypeEnum type) { + this.type = type; + return this; + } + + /** + * The type of check. Possible values: * **BANK_ACCOUNT_VERIFICATION**: Used in v5 and earlier. Replaced by **PAYOUT_METHOD_VERIFICATION** in v6 and later. * **COMPANY_VERIFICATION** * **CARD_VERIFICATION** * **IDENTITY_VERIFICATION** * **LEGAL_ARRANGEMENT_VERIFICATION** * **NONPROFIT_VERIFICATION** * **PASSPORT_VERIFICATION** * **PAYOUT_METHOD_VERIFICATION**: Used in v6 and later. * **PCI_VERIFICATION** + * @return type + **/ + @ApiModelProperty(required = true, value = "The type of check. Possible values: * **BANK_ACCOUNT_VERIFICATION**: Used in v5 and earlier. Replaced by **PAYOUT_METHOD_VERIFICATION** in v6 and later. * **COMPANY_VERIFICATION** * **CARD_VERIFICATION** * **IDENTITY_VERIFICATION** * **LEGAL_ARRANGEMENT_VERIFICATION** * **NONPROFIT_VERIFICATION** * **PASSPORT_VERIFICATION** * **PAYOUT_METHOD_VERIFICATION**: Used in v6 and later. * **PCI_VERIFICATION**") + @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 KYCCheckStatusData object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + KYCCheckStatusData kyCCheckStatusData = (KYCCheckStatusData) o; + return Objects.equals(this.requiredFields, kyCCheckStatusData.requiredFields) && + Objects.equals(this.status, kyCCheckStatusData.status) && + Objects.equals(this.summary, kyCCheckStatusData.summary) && + Objects.equals(this.type, kyCCheckStatusData.type); + } + + @Override + public int hashCode() { + return Objects.hash(requiredFields, status, summary, type); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class KYCCheckStatusData {\n"); + sb.append(" requiredFields: ").append(toIndentedString(requiredFields)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" summary: ").append(toIndentedString(summary)).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 KYCCheckStatusData given an JSON string + * + * @param jsonString JSON string + * @return An instance of KYCCheckStatusData + * @throws JsonProcessingException if the JSON string is invalid with respect to KYCCheckStatusData + */ + public static KYCCheckStatusData fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, KYCCheckStatusData.class); + } +/** + * Convert an instance of KYCCheckStatusData 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/marketpayaccount/KYCCheckSummary.java b/src/main/java/com/adyen/model/marketpayaccount/KYCCheckSummary.java new file mode 100644 index 000000000..316a24cdc --- /dev/null +++ b/src/main/java/com/adyen/model/marketpayaccount/KYCCheckSummary.java @@ -0,0 +1,160 @@ +/* + * Account API + * This API is used for the classic integration. If you are just starting your implementation, refer to our [new integration guide](https://docs.adyen.com/marketplaces-and-platforms) instead. The Account API provides endpoints for managing account-related entities on your platform. These related entities include account holders, accounts, bank accounts, shareholders, and verification-related documents. The management operations include actions such as creation, retrieval, updating, and deletion of them. For more information, refer to our [documentation](https://docs.adyen.com/marketplaces-and-platforms/classic). ## Authentication Your Adyen contact will provide your API credential and an API key. To connect to the API, add an `X-API-Key` header with the API key as the value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: YOUR_API_KEY\" \\ ... ``` Alternatively, you can use the username and password to connect to the API using basic authentication. For example: ``` curl -U \"ws@MarketPlace.YOUR_PLATFORM_ACCOUNT\":\"YOUR_WS_PASSWORD\" \\ -H \"Content-Type: application/json\" \\ ... ``` When going live, you need to generate new web service user credentials to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning The Account API supports [versioning](https://docs.adyen.com/development-resources/versioning) using a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://cal-test.adyen.com/cal/services/Account/v6/createAccountHolder ``` + * + * The version of the OpenAPI document: 6 + * + * + * 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.marketpayaccount; + +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; + + +/** + * KYCCheckSummary + */ +@JsonPropertyOrder({ + KYCCheckSummary.JSON_PROPERTY_KYC_CHECK_CODE, + KYCCheckSummary.JSON_PROPERTY_KYC_CHECK_DESCRIPTION +}) + +public class KYCCheckSummary { + public static final String JSON_PROPERTY_KYC_CHECK_CODE = "kycCheckCode"; + private Integer kycCheckCode; + + public static final String JSON_PROPERTY_KYC_CHECK_DESCRIPTION = "kycCheckDescription"; + private String kycCheckDescription; + + public KYCCheckSummary() { + } + + public KYCCheckSummary kycCheckCode(Integer kycCheckCode) { + this.kycCheckCode = kycCheckCode; + return this; + } + + /** + * The code of the check. For possible values, refer to [Verification codes](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/verification-codes). + * @return kycCheckCode + **/ + @ApiModelProperty(value = "The code of the check. For possible values, refer to [Verification codes](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/verification-codes).") + @JsonProperty(JSON_PROPERTY_KYC_CHECK_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Integer getKycCheckCode() { + return kycCheckCode; + } + + + @JsonProperty(JSON_PROPERTY_KYC_CHECK_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setKycCheckCode(Integer kycCheckCode) { + this.kycCheckCode = kycCheckCode; + } + + + public KYCCheckSummary kycCheckDescription(String kycCheckDescription) { + this.kycCheckDescription = kycCheckDescription; + return this; + } + + /** + * A description of the check. + * @return kycCheckDescription + **/ + @ApiModelProperty(value = "A description of the check.") + @JsonProperty(JSON_PROPERTY_KYC_CHECK_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getKycCheckDescription() { + return kycCheckDescription; + } + + + @JsonProperty(JSON_PROPERTY_KYC_CHECK_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setKycCheckDescription(String kycCheckDescription) { + this.kycCheckDescription = kycCheckDescription; + } + + + /** + * Return true if this KYCCheckSummary object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + KYCCheckSummary kyCCheckSummary = (KYCCheckSummary) o; + return Objects.equals(this.kycCheckCode, kyCCheckSummary.kycCheckCode) && + Objects.equals(this.kycCheckDescription, kyCCheckSummary.kycCheckDescription); + } + + @Override + public int hashCode() { + return Objects.hash(kycCheckCode, kycCheckDescription); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class KYCCheckSummary {\n"); + sb.append(" kycCheckCode: ").append(toIndentedString(kycCheckCode)).append("\n"); + sb.append(" kycCheckDescription: ").append(toIndentedString(kycCheckDescription)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line 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 KYCCheckSummary given an JSON string + * + * @param jsonString JSON string + * @return An instance of KYCCheckSummary + * @throws JsonProcessingException if the JSON string is invalid with respect to KYCCheckSummary + */ + public static KYCCheckSummary fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, KYCCheckSummary.class); + } +/** + * Convert an instance of KYCCheckSummary 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/marketpayaccount/KYCLegalArrangementCheckResult.java b/src/main/java/com/adyen/model/marketpayaccount/KYCLegalArrangementCheckResult.java new file mode 100644 index 000000000..804948e87 --- /dev/null +++ b/src/main/java/com/adyen/model/marketpayaccount/KYCLegalArrangementCheckResult.java @@ -0,0 +1,171 @@ +/* + * Account API + * This API is used for the classic integration. If you are just starting your implementation, refer to our [new integration guide](https://docs.adyen.com/marketplaces-and-platforms) instead. The Account API provides endpoints for managing account-related entities on your platform. These related entities include account holders, accounts, bank accounts, shareholders, and verification-related documents. The management operations include actions such as creation, retrieval, updating, and deletion of them. For more information, refer to our [documentation](https://docs.adyen.com/marketplaces-and-platforms/classic). ## Authentication Your Adyen contact will provide your API credential and an API key. To connect to the API, add an `X-API-Key` header with the API key as the value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: YOUR_API_KEY\" \\ ... ``` Alternatively, you can use the username and password to connect to the API using basic authentication. For example: ``` curl -U \"ws@MarketPlace.YOUR_PLATFORM_ACCOUNT\":\"YOUR_WS_PASSWORD\" \\ -H \"Content-Type: application/json\" \\ ... ``` When going live, you need to generate new web service user credentials to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning The Account API supports [versioning](https://docs.adyen.com/development-resources/versioning) using a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://cal-test.adyen.com/cal/services/Account/v6/createAccountHolder ``` + * + * The version of the OpenAPI document: 6 + * + * + * 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.marketpayaccount; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.adyen.model.marketpayaccount.KYCCheckStatusData; +import com.fasterxml.jackson.annotation.JsonInclude; +import 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; + + +/** + * KYCLegalArrangementCheckResult + */ +@JsonPropertyOrder({ + KYCLegalArrangementCheckResult.JSON_PROPERTY_CHECKS, + KYCLegalArrangementCheckResult.JSON_PROPERTY_LEGAL_ARRANGEMENT_CODE +}) + +public class KYCLegalArrangementCheckResult { + public static final String JSON_PROPERTY_CHECKS = "checks"; + private List checks = null; + + public static final String JSON_PROPERTY_LEGAL_ARRANGEMENT_CODE = "legalArrangementCode"; + private String legalArrangementCode; + + public KYCLegalArrangementCheckResult() { + } + + public KYCLegalArrangementCheckResult checks(List checks) { + this.checks = checks; + return this; + } + + public KYCLegalArrangementCheckResult addChecksItem(KYCCheckStatusData checksItem) { + if (this.checks == null) { + this.checks = new ArrayList<>(); + } + this.checks.add(checksItem); + return this; + } + + /** + * A list of the checks and their statuses. + * @return checks + **/ + @ApiModelProperty(value = "A list of the checks and their statuses.") + @JsonProperty(JSON_PROPERTY_CHECKS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getChecks() { + return checks; + } + + + @JsonProperty(JSON_PROPERTY_CHECKS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setChecks(List checks) { + this.checks = checks; + } + + + public KYCLegalArrangementCheckResult legalArrangementCode(String legalArrangementCode) { + this.legalArrangementCode = legalArrangementCode; + return this; + } + + /** + * The unique ID of the legal arrangement to which the check applies. + * @return legalArrangementCode + **/ + @ApiModelProperty(value = "The unique ID of the legal arrangement to which the check applies.") + @JsonProperty(JSON_PROPERTY_LEGAL_ARRANGEMENT_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getLegalArrangementCode() { + return legalArrangementCode; + } + + + @JsonProperty(JSON_PROPERTY_LEGAL_ARRANGEMENT_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setLegalArrangementCode(String legalArrangementCode) { + this.legalArrangementCode = legalArrangementCode; + } + + + /** + * Return true if this KYCLegalArrangementCheckResult object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + KYCLegalArrangementCheckResult kyCLegalArrangementCheckResult = (KYCLegalArrangementCheckResult) o; + return Objects.equals(this.checks, kyCLegalArrangementCheckResult.checks) && + Objects.equals(this.legalArrangementCode, kyCLegalArrangementCheckResult.legalArrangementCode); + } + + @Override + public int hashCode() { + return Objects.hash(checks, legalArrangementCode); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class KYCLegalArrangementCheckResult {\n"); + sb.append(" checks: ").append(toIndentedString(checks)).append("\n"); + sb.append(" legalArrangementCode: ").append(toIndentedString(legalArrangementCode)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line 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 KYCLegalArrangementCheckResult given an JSON string + * + * @param jsonString JSON string + * @return An instance of KYCLegalArrangementCheckResult + * @throws JsonProcessingException if the JSON string is invalid with respect to KYCLegalArrangementCheckResult + */ + public static KYCLegalArrangementCheckResult fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, KYCLegalArrangementCheckResult.class); + } +/** + * Convert an instance of KYCLegalArrangementCheckResult 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/marketpayaccount/KYCLegalArrangementEntityCheckResult.java b/src/main/java/com/adyen/model/marketpayaccount/KYCLegalArrangementEntityCheckResult.java new file mode 100644 index 000000000..f1e2109b5 --- /dev/null +++ b/src/main/java/com/adyen/model/marketpayaccount/KYCLegalArrangementEntityCheckResult.java @@ -0,0 +1,202 @@ +/* + * Account API + * This API is used for the classic integration. If you are just starting your implementation, refer to our [new integration guide](https://docs.adyen.com/marketplaces-and-platforms) instead. The Account API provides endpoints for managing account-related entities on your platform. These related entities include account holders, accounts, bank accounts, shareholders, and verification-related documents. The management operations include actions such as creation, retrieval, updating, and deletion of them. For more information, refer to our [documentation](https://docs.adyen.com/marketplaces-and-platforms/classic). ## Authentication Your Adyen contact will provide your API credential and an API key. To connect to the API, add an `X-API-Key` header with the API key as the value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: YOUR_API_KEY\" \\ ... ``` Alternatively, you can use the username and password to connect to the API using basic authentication. For example: ``` curl -U \"ws@MarketPlace.YOUR_PLATFORM_ACCOUNT\":\"YOUR_WS_PASSWORD\" \\ -H \"Content-Type: application/json\" \\ ... ``` When going live, you need to generate new web service user credentials to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning The Account API supports [versioning](https://docs.adyen.com/development-resources/versioning) using a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://cal-test.adyen.com/cal/services/Account/v6/createAccountHolder ``` + * + * The version of the OpenAPI document: 6 + * + * + * 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.marketpayaccount; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.adyen.model.marketpayaccount.KYCCheckStatusData; +import com.fasterxml.jackson.annotation.JsonInclude; +import 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; + + +/** + * KYCLegalArrangementEntityCheckResult + */ +@JsonPropertyOrder({ + KYCLegalArrangementEntityCheckResult.JSON_PROPERTY_CHECKS, + KYCLegalArrangementEntityCheckResult.JSON_PROPERTY_LEGAL_ARRANGEMENT_CODE, + KYCLegalArrangementEntityCheckResult.JSON_PROPERTY_LEGAL_ARRANGEMENT_ENTITY_CODE +}) + +public class KYCLegalArrangementEntityCheckResult { + public static final String JSON_PROPERTY_CHECKS = "checks"; + private List checks = null; + + public static final String JSON_PROPERTY_LEGAL_ARRANGEMENT_CODE = "legalArrangementCode"; + private String legalArrangementCode; + + public static final String JSON_PROPERTY_LEGAL_ARRANGEMENT_ENTITY_CODE = "legalArrangementEntityCode"; + private String legalArrangementEntityCode; + + public KYCLegalArrangementEntityCheckResult() { + } + + public KYCLegalArrangementEntityCheckResult checks(List checks) { + this.checks = checks; + return this; + } + + public KYCLegalArrangementEntityCheckResult addChecksItem(KYCCheckStatusData checksItem) { + if (this.checks == null) { + this.checks = new ArrayList<>(); + } + this.checks.add(checksItem); + return this; + } + + /** + * A list of the checks and their statuses. + * @return checks + **/ + @ApiModelProperty(value = "A list of the checks and their statuses.") + @JsonProperty(JSON_PROPERTY_CHECKS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getChecks() { + return checks; + } + + + @JsonProperty(JSON_PROPERTY_CHECKS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setChecks(List checks) { + this.checks = checks; + } + + + public KYCLegalArrangementEntityCheckResult legalArrangementCode(String legalArrangementCode) { + this.legalArrangementCode = legalArrangementCode; + return this; + } + + /** + * The unique ID of the legal arrangement to which the entity belongs. + * @return legalArrangementCode + **/ + @ApiModelProperty(value = "The unique ID of the legal arrangement to which the entity belongs.") + @JsonProperty(JSON_PROPERTY_LEGAL_ARRANGEMENT_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getLegalArrangementCode() { + return legalArrangementCode; + } + + + @JsonProperty(JSON_PROPERTY_LEGAL_ARRANGEMENT_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setLegalArrangementCode(String legalArrangementCode) { + this.legalArrangementCode = legalArrangementCode; + } + + + public KYCLegalArrangementEntityCheckResult legalArrangementEntityCode(String legalArrangementEntityCode) { + this.legalArrangementEntityCode = legalArrangementEntityCode; + return this; + } + + /** + * The unique ID of the legal arrangement entity to which the check applies. + * @return legalArrangementEntityCode + **/ + @ApiModelProperty(value = "The unique ID of the legal arrangement entity to which the check applies.") + @JsonProperty(JSON_PROPERTY_LEGAL_ARRANGEMENT_ENTITY_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getLegalArrangementEntityCode() { + return legalArrangementEntityCode; + } + + + @JsonProperty(JSON_PROPERTY_LEGAL_ARRANGEMENT_ENTITY_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setLegalArrangementEntityCode(String legalArrangementEntityCode) { + this.legalArrangementEntityCode = legalArrangementEntityCode; + } + + + /** + * Return true if this KYCLegalArrangementEntityCheckResult object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + KYCLegalArrangementEntityCheckResult kyCLegalArrangementEntityCheckResult = (KYCLegalArrangementEntityCheckResult) o; + return Objects.equals(this.checks, kyCLegalArrangementEntityCheckResult.checks) && + Objects.equals(this.legalArrangementCode, kyCLegalArrangementEntityCheckResult.legalArrangementCode) && + Objects.equals(this.legalArrangementEntityCode, kyCLegalArrangementEntityCheckResult.legalArrangementEntityCode); + } + + @Override + public int hashCode() { + return Objects.hash(checks, legalArrangementCode, legalArrangementEntityCode); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class KYCLegalArrangementEntityCheckResult {\n"); + sb.append(" checks: ").append(toIndentedString(checks)).append("\n"); + sb.append(" legalArrangementCode: ").append(toIndentedString(legalArrangementCode)).append("\n"); + sb.append(" legalArrangementEntityCode: ").append(toIndentedString(legalArrangementEntityCode)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line 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 KYCLegalArrangementEntityCheckResult given an JSON string + * + * @param jsonString JSON string + * @return An instance of KYCLegalArrangementEntityCheckResult + * @throws JsonProcessingException if the JSON string is invalid with respect to KYCLegalArrangementEntityCheckResult + */ + public static KYCLegalArrangementEntityCheckResult fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, KYCLegalArrangementEntityCheckResult.class); + } +/** + * Convert an instance of KYCLegalArrangementEntityCheckResult 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/marketpayaccount/KYCPayoutMethodCheckResult.java b/src/main/java/com/adyen/model/marketpayaccount/KYCPayoutMethodCheckResult.java new file mode 100644 index 000000000..c4dd24f1a --- /dev/null +++ b/src/main/java/com/adyen/model/marketpayaccount/KYCPayoutMethodCheckResult.java @@ -0,0 +1,171 @@ +/* + * Account API + * This API is used for the classic integration. If you are just starting your implementation, refer to our [new integration guide](https://docs.adyen.com/marketplaces-and-platforms) instead. The Account API provides endpoints for managing account-related entities on your platform. These related entities include account holders, accounts, bank accounts, shareholders, and verification-related documents. The management operations include actions such as creation, retrieval, updating, and deletion of them. For more information, refer to our [documentation](https://docs.adyen.com/marketplaces-and-platforms/classic). ## Authentication Your Adyen contact will provide your API credential and an API key. To connect to the API, add an `X-API-Key` header with the API key as the value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: YOUR_API_KEY\" \\ ... ``` Alternatively, you can use the username and password to connect to the API using basic authentication. For example: ``` curl -U \"ws@MarketPlace.YOUR_PLATFORM_ACCOUNT\":\"YOUR_WS_PASSWORD\" \\ -H \"Content-Type: application/json\" \\ ... ``` When going live, you need to generate new web service user credentials to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning The Account API supports [versioning](https://docs.adyen.com/development-resources/versioning) using a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://cal-test.adyen.com/cal/services/Account/v6/createAccountHolder ``` + * + * The version of the OpenAPI document: 6 + * + * + * 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.marketpayaccount; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.adyen.model.marketpayaccount.KYCCheckStatusData; +import com.fasterxml.jackson.annotation.JsonInclude; +import 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; + + +/** + * KYCPayoutMethodCheckResult + */ +@JsonPropertyOrder({ + KYCPayoutMethodCheckResult.JSON_PROPERTY_CHECKS, + KYCPayoutMethodCheckResult.JSON_PROPERTY_PAYOUT_METHOD_CODE +}) + +public class KYCPayoutMethodCheckResult { + public static final String JSON_PROPERTY_CHECKS = "checks"; + private List checks = null; + + public static final String JSON_PROPERTY_PAYOUT_METHOD_CODE = "payoutMethodCode"; + private String payoutMethodCode; + + public KYCPayoutMethodCheckResult() { + } + + public KYCPayoutMethodCheckResult checks(List checks) { + this.checks = checks; + return this; + } + + public KYCPayoutMethodCheckResult addChecksItem(KYCCheckStatusData checksItem) { + if (this.checks == null) { + this.checks = new ArrayList<>(); + } + this.checks.add(checksItem); + return this; + } + + /** + * A list of the checks and their statuses. + * @return checks + **/ + @ApiModelProperty(value = "A list of the checks and their statuses.") + @JsonProperty(JSON_PROPERTY_CHECKS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getChecks() { + return checks; + } + + + @JsonProperty(JSON_PROPERTY_CHECKS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setChecks(List checks) { + this.checks = checks; + } + + + public KYCPayoutMethodCheckResult payoutMethodCode(String payoutMethodCode) { + this.payoutMethodCode = payoutMethodCode; + return this; + } + + /** + * The unique ID of the payoput method to which the check applies. + * @return payoutMethodCode + **/ + @ApiModelProperty(value = "The unique ID of the payoput method to which the check applies.") + @JsonProperty(JSON_PROPERTY_PAYOUT_METHOD_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getPayoutMethodCode() { + return payoutMethodCode; + } + + + @JsonProperty(JSON_PROPERTY_PAYOUT_METHOD_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPayoutMethodCode(String payoutMethodCode) { + this.payoutMethodCode = payoutMethodCode; + } + + + /** + * Return true if this KYCPayoutMethodCheckResult object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + KYCPayoutMethodCheckResult kyCPayoutMethodCheckResult = (KYCPayoutMethodCheckResult) o; + return Objects.equals(this.checks, kyCPayoutMethodCheckResult.checks) && + Objects.equals(this.payoutMethodCode, kyCPayoutMethodCheckResult.payoutMethodCode); + } + + @Override + public int hashCode() { + return Objects.hash(checks, payoutMethodCode); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class KYCPayoutMethodCheckResult {\n"); + sb.append(" checks: ").append(toIndentedString(checks)).append("\n"); + sb.append(" payoutMethodCode: ").append(toIndentedString(payoutMethodCode)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line 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 KYCPayoutMethodCheckResult given an JSON string + * + * @param jsonString JSON string + * @return An instance of KYCPayoutMethodCheckResult + * @throws JsonProcessingException if the JSON string is invalid with respect to KYCPayoutMethodCheckResult + */ + public static KYCPayoutMethodCheckResult fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, KYCPayoutMethodCheckResult.class); + } +/** + * Convert an instance of KYCPayoutMethodCheckResult 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/marketpayaccount/KYCShareholderCheckResult.java b/src/main/java/com/adyen/model/marketpayaccount/KYCShareholderCheckResult.java new file mode 100644 index 000000000..c720baf6b --- /dev/null +++ b/src/main/java/com/adyen/model/marketpayaccount/KYCShareholderCheckResult.java @@ -0,0 +1,233 @@ +/* + * Account API + * This API is used for the classic integration. If you are just starting your implementation, refer to our [new integration guide](https://docs.adyen.com/marketplaces-and-platforms) instead. The Account API provides endpoints for managing account-related entities on your platform. These related entities include account holders, accounts, bank accounts, shareholders, and verification-related documents. The management operations include actions such as creation, retrieval, updating, and deletion of them. For more information, refer to our [documentation](https://docs.adyen.com/marketplaces-and-platforms/classic). ## Authentication Your Adyen contact will provide your API credential and an API key. To connect to the API, add an `X-API-Key` header with the API key as the value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: YOUR_API_KEY\" \\ ... ``` Alternatively, you can use the username and password to connect to the API using basic authentication. For example: ``` curl -U \"ws@MarketPlace.YOUR_PLATFORM_ACCOUNT\":\"YOUR_WS_PASSWORD\" \\ -H \"Content-Type: application/json\" \\ ... ``` When going live, you need to generate new web service user credentials to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning The Account API supports [versioning](https://docs.adyen.com/development-resources/versioning) using a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://cal-test.adyen.com/cal/services/Account/v6/createAccountHolder ``` + * + * The version of the OpenAPI document: 6 + * + * + * 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.marketpayaccount; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.adyen.model.marketpayaccount.KYCCheckStatusData; +import com.fasterxml.jackson.annotation.JsonInclude; +import 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; + + +/** + * KYCShareholderCheckResult + */ +@JsonPropertyOrder({ + KYCShareholderCheckResult.JSON_PROPERTY_CHECKS, + KYCShareholderCheckResult.JSON_PROPERTY_LEGAL_ARRANGEMENT_CODE, + KYCShareholderCheckResult.JSON_PROPERTY_LEGAL_ARRANGEMENT_ENTITY_CODE, + KYCShareholderCheckResult.JSON_PROPERTY_SHAREHOLDER_CODE +}) + +public class KYCShareholderCheckResult { + public static final String JSON_PROPERTY_CHECKS = "checks"; + private List checks = null; + + public static final String JSON_PROPERTY_LEGAL_ARRANGEMENT_CODE = "legalArrangementCode"; + private String legalArrangementCode; + + public static final String JSON_PROPERTY_LEGAL_ARRANGEMENT_ENTITY_CODE = "legalArrangementEntityCode"; + private String legalArrangementEntityCode; + + public static final String JSON_PROPERTY_SHAREHOLDER_CODE = "shareholderCode"; + private String shareholderCode; + + public KYCShareholderCheckResult() { + } + + public KYCShareholderCheckResult checks(List checks) { + this.checks = checks; + return this; + } + + public KYCShareholderCheckResult addChecksItem(KYCCheckStatusData checksItem) { + if (this.checks == null) { + this.checks = new ArrayList<>(); + } + this.checks.add(checksItem); + return this; + } + + /** + * A list of the checks and their statuses. + * @return checks + **/ + @ApiModelProperty(value = "A list of the checks and their statuses.") + @JsonProperty(JSON_PROPERTY_CHECKS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getChecks() { + return checks; + } + + + @JsonProperty(JSON_PROPERTY_CHECKS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setChecks(List checks) { + this.checks = checks; + } + + + public KYCShareholderCheckResult legalArrangementCode(String legalArrangementCode) { + this.legalArrangementCode = legalArrangementCode; + return this; + } + + /** + * The unique ID of the legal arrangement to which the shareholder belongs, if applicable. + * @return legalArrangementCode + **/ + @ApiModelProperty(value = "The unique ID of the legal arrangement to which the shareholder belongs, if applicable.") + @JsonProperty(JSON_PROPERTY_LEGAL_ARRANGEMENT_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getLegalArrangementCode() { + return legalArrangementCode; + } + + + @JsonProperty(JSON_PROPERTY_LEGAL_ARRANGEMENT_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setLegalArrangementCode(String legalArrangementCode) { + this.legalArrangementCode = legalArrangementCode; + } + + + public KYCShareholderCheckResult legalArrangementEntityCode(String legalArrangementEntityCode) { + this.legalArrangementEntityCode = legalArrangementEntityCode; + return this; + } + + /** + * The unique ID of the legal arrangement entity to which the shareholder belongs, if applicable. + * @return legalArrangementEntityCode + **/ + @ApiModelProperty(value = "The unique ID of the legal arrangement entity to which the shareholder belongs, if applicable.") + @JsonProperty(JSON_PROPERTY_LEGAL_ARRANGEMENT_ENTITY_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getLegalArrangementEntityCode() { + return legalArrangementEntityCode; + } + + + @JsonProperty(JSON_PROPERTY_LEGAL_ARRANGEMENT_ENTITY_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setLegalArrangementEntityCode(String legalArrangementEntityCode) { + this.legalArrangementEntityCode = legalArrangementEntityCode; + } + + + public KYCShareholderCheckResult shareholderCode(String shareholderCode) { + this.shareholderCode = shareholderCode; + return this; + } + + /** + * The code of the shareholder to which the check applies. + * @return shareholderCode + **/ + @ApiModelProperty(value = "The code of the shareholder to which the check applies.") + @JsonProperty(JSON_PROPERTY_SHAREHOLDER_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getShareholderCode() { + return shareholderCode; + } + + + @JsonProperty(JSON_PROPERTY_SHAREHOLDER_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setShareholderCode(String shareholderCode) { + this.shareholderCode = shareholderCode; + } + + + /** + * Return true if this KYCShareholderCheckResult object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + KYCShareholderCheckResult kyCShareholderCheckResult = (KYCShareholderCheckResult) o; + return Objects.equals(this.checks, kyCShareholderCheckResult.checks) && + Objects.equals(this.legalArrangementCode, kyCShareholderCheckResult.legalArrangementCode) && + Objects.equals(this.legalArrangementEntityCode, kyCShareholderCheckResult.legalArrangementEntityCode) && + Objects.equals(this.shareholderCode, kyCShareholderCheckResult.shareholderCode); + } + + @Override + public int hashCode() { + return Objects.hash(checks, legalArrangementCode, legalArrangementEntityCode, shareholderCode); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class KYCShareholderCheckResult {\n"); + sb.append(" checks: ").append(toIndentedString(checks)).append("\n"); + sb.append(" legalArrangementCode: ").append(toIndentedString(legalArrangementCode)).append("\n"); + sb.append(" legalArrangementEntityCode: ").append(toIndentedString(legalArrangementEntityCode)).append("\n"); + sb.append(" shareholderCode: ").append(toIndentedString(shareholderCode)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line 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 KYCShareholderCheckResult given an JSON string + * + * @param jsonString JSON string + * @return An instance of KYCShareholderCheckResult + * @throws JsonProcessingException if the JSON string is invalid with respect to KYCShareholderCheckResult + */ + public static KYCShareholderCheckResult fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, KYCShareholderCheckResult.class); + } +/** + * Convert an instance of KYCShareholderCheckResult 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/marketpayaccount/KYCSignatoryCheckResult.java b/src/main/java/com/adyen/model/marketpayaccount/KYCSignatoryCheckResult.java new file mode 100644 index 000000000..2e54e2b8d --- /dev/null +++ b/src/main/java/com/adyen/model/marketpayaccount/KYCSignatoryCheckResult.java @@ -0,0 +1,171 @@ +/* + * Account API + * This API is used for the classic integration. If you are just starting your implementation, refer to our [new integration guide](https://docs.adyen.com/marketplaces-and-platforms) instead. The Account API provides endpoints for managing account-related entities on your platform. These related entities include account holders, accounts, bank accounts, shareholders, and verification-related documents. The management operations include actions such as creation, retrieval, updating, and deletion of them. For more information, refer to our [documentation](https://docs.adyen.com/marketplaces-and-platforms/classic). ## Authentication Your Adyen contact will provide your API credential and an API key. To connect to the API, add an `X-API-Key` header with the API key as the value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: YOUR_API_KEY\" \\ ... ``` Alternatively, you can use the username and password to connect to the API using basic authentication. For example: ``` curl -U \"ws@MarketPlace.YOUR_PLATFORM_ACCOUNT\":\"YOUR_WS_PASSWORD\" \\ -H \"Content-Type: application/json\" \\ ... ``` When going live, you need to generate new web service user credentials to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning The Account API supports [versioning](https://docs.adyen.com/development-resources/versioning) using a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://cal-test.adyen.com/cal/services/Account/v6/createAccountHolder ``` + * + * The version of the OpenAPI document: 6 + * + * + * 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.marketpayaccount; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.adyen.model.marketpayaccount.KYCCheckStatusData; +import com.fasterxml.jackson.annotation.JsonInclude; +import 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; + + +/** + * KYCSignatoryCheckResult + */ +@JsonPropertyOrder({ + KYCSignatoryCheckResult.JSON_PROPERTY_CHECKS, + KYCSignatoryCheckResult.JSON_PROPERTY_SIGNATORY_CODE +}) + +public class KYCSignatoryCheckResult { + public static final String JSON_PROPERTY_CHECKS = "checks"; + private List checks = null; + + public static final String JSON_PROPERTY_SIGNATORY_CODE = "signatoryCode"; + private String signatoryCode; + + public KYCSignatoryCheckResult() { + } + + public KYCSignatoryCheckResult checks(List checks) { + this.checks = checks; + return this; + } + + public KYCSignatoryCheckResult addChecksItem(KYCCheckStatusData checksItem) { + if (this.checks == null) { + this.checks = new ArrayList<>(); + } + this.checks.add(checksItem); + return this; + } + + /** + * A list of the checks and their statuses. + * @return checks + **/ + @ApiModelProperty(value = "A list of the checks and their statuses.") + @JsonProperty(JSON_PROPERTY_CHECKS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getChecks() { + return checks; + } + + + @JsonProperty(JSON_PROPERTY_CHECKS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setChecks(List checks) { + this.checks = checks; + } + + + public KYCSignatoryCheckResult signatoryCode(String signatoryCode) { + this.signatoryCode = signatoryCode; + return this; + } + + /** + * The code of the signatory to which the check applies. + * @return signatoryCode + **/ + @ApiModelProperty(value = "The code of the signatory to which the check applies.") + @JsonProperty(JSON_PROPERTY_SIGNATORY_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getSignatoryCode() { + return signatoryCode; + } + + + @JsonProperty(JSON_PROPERTY_SIGNATORY_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSignatoryCode(String signatoryCode) { + this.signatoryCode = signatoryCode; + } + + + /** + * Return true if this KYCSignatoryCheckResult object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + KYCSignatoryCheckResult kyCSignatoryCheckResult = (KYCSignatoryCheckResult) o; + return Objects.equals(this.checks, kyCSignatoryCheckResult.checks) && + Objects.equals(this.signatoryCode, kyCSignatoryCheckResult.signatoryCode); + } + + @Override + public int hashCode() { + return Objects.hash(checks, signatoryCode); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class KYCSignatoryCheckResult {\n"); + sb.append(" checks: ").append(toIndentedString(checks)).append("\n"); + sb.append(" signatoryCode: ").append(toIndentedString(signatoryCode)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line 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 KYCSignatoryCheckResult given an JSON string + * + * @param jsonString JSON string + * @return An instance of KYCSignatoryCheckResult + * @throws JsonProcessingException if the JSON string is invalid with respect to KYCSignatoryCheckResult + */ + public static KYCSignatoryCheckResult fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, KYCSignatoryCheckResult.class); + } +/** + * Convert an instance of KYCSignatoryCheckResult 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/marketpayaccount/KYCUltimateParentCompanyCheckResult.java b/src/main/java/com/adyen/model/marketpayaccount/KYCUltimateParentCompanyCheckResult.java new file mode 100644 index 000000000..bab767426 --- /dev/null +++ b/src/main/java/com/adyen/model/marketpayaccount/KYCUltimateParentCompanyCheckResult.java @@ -0,0 +1,171 @@ +/* + * Account API + * This API is used for the classic integration. If you are just starting your implementation, refer to our [new integration guide](https://docs.adyen.com/marketplaces-and-platforms) instead. The Account API provides endpoints for managing account-related entities on your platform. These related entities include account holders, accounts, bank accounts, shareholders, and verification-related documents. The management operations include actions such as creation, retrieval, updating, and deletion of them. For more information, refer to our [documentation](https://docs.adyen.com/marketplaces-and-platforms/classic). ## Authentication Your Adyen contact will provide your API credential and an API key. To connect to the API, add an `X-API-Key` header with the API key as the value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: YOUR_API_KEY\" \\ ... ``` Alternatively, you can use the username and password to connect to the API using basic authentication. For example: ``` curl -U \"ws@MarketPlace.YOUR_PLATFORM_ACCOUNT\":\"YOUR_WS_PASSWORD\" \\ -H \"Content-Type: application/json\" \\ ... ``` When going live, you need to generate new web service user credentials to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning The Account API supports [versioning](https://docs.adyen.com/development-resources/versioning) using a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://cal-test.adyen.com/cal/services/Account/v6/createAccountHolder ``` + * + * The version of the OpenAPI document: 6 + * + * + * 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.marketpayaccount; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.adyen.model.marketpayaccount.KYCCheckStatusData; +import com.fasterxml.jackson.annotation.JsonInclude; +import 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; + + +/** + * KYCUltimateParentCompanyCheckResult + */ +@JsonPropertyOrder({ + KYCUltimateParentCompanyCheckResult.JSON_PROPERTY_CHECKS, + KYCUltimateParentCompanyCheckResult.JSON_PROPERTY_ULTIMATE_PARENT_COMPANY_CODE +}) + +public class KYCUltimateParentCompanyCheckResult { + public static final String JSON_PROPERTY_CHECKS = "checks"; + private List checks = null; + + public static final String JSON_PROPERTY_ULTIMATE_PARENT_COMPANY_CODE = "ultimateParentCompanyCode"; + private String ultimateParentCompanyCode; + + public KYCUltimateParentCompanyCheckResult() { + } + + public KYCUltimateParentCompanyCheckResult checks(List checks) { + this.checks = checks; + return this; + } + + public KYCUltimateParentCompanyCheckResult addChecksItem(KYCCheckStatusData checksItem) { + if (this.checks == null) { + this.checks = new ArrayList<>(); + } + this.checks.add(checksItem); + return this; + } + + /** + * A list of the checks and their statuses. + * @return checks + **/ + @ApiModelProperty(value = "A list of the checks and their statuses.") + @JsonProperty(JSON_PROPERTY_CHECKS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getChecks() { + return checks; + } + + + @JsonProperty(JSON_PROPERTY_CHECKS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setChecks(List checks) { + this.checks = checks; + } + + + public KYCUltimateParentCompanyCheckResult ultimateParentCompanyCode(String ultimateParentCompanyCode) { + this.ultimateParentCompanyCode = ultimateParentCompanyCode; + return this; + } + + /** + * The code of the Ultimate Parent Company to which the check applies. + * @return ultimateParentCompanyCode + **/ + @ApiModelProperty(value = "The code of the Ultimate Parent Company to which the check applies.") + @JsonProperty(JSON_PROPERTY_ULTIMATE_PARENT_COMPANY_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getUltimateParentCompanyCode() { + return ultimateParentCompanyCode; + } + + + @JsonProperty(JSON_PROPERTY_ULTIMATE_PARENT_COMPANY_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setUltimateParentCompanyCode(String ultimateParentCompanyCode) { + this.ultimateParentCompanyCode = ultimateParentCompanyCode; + } + + + /** + * Return true if this KYCUltimateParentCompanyCheckResult object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + KYCUltimateParentCompanyCheckResult kyCUltimateParentCompanyCheckResult = (KYCUltimateParentCompanyCheckResult) o; + return Objects.equals(this.checks, kyCUltimateParentCompanyCheckResult.checks) && + Objects.equals(this.ultimateParentCompanyCode, kyCUltimateParentCompanyCheckResult.ultimateParentCompanyCode); + } + + @Override + public int hashCode() { + return Objects.hash(checks, ultimateParentCompanyCode); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class KYCUltimateParentCompanyCheckResult {\n"); + sb.append(" checks: ").append(toIndentedString(checks)).append("\n"); + sb.append(" ultimateParentCompanyCode: ").append(toIndentedString(ultimateParentCompanyCode)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line 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 KYCUltimateParentCompanyCheckResult given an JSON string + * + * @param jsonString JSON string + * @return An instance of KYCUltimateParentCompanyCheckResult + * @throws JsonProcessingException if the JSON string is invalid with respect to KYCUltimateParentCompanyCheckResult + */ + public static KYCUltimateParentCompanyCheckResult fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, KYCUltimateParentCompanyCheckResult.class); + } +/** + * Convert an instance of KYCUltimateParentCompanyCheckResult 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/marketpayaccount/KYCVerificationResult.java b/src/main/java/com/adyen/model/marketpayaccount/KYCVerificationResult.java new file mode 100644 index 000000000..23240d0c9 --- /dev/null +++ b/src/main/java/com/adyen/model/marketpayaccount/KYCVerificationResult.java @@ -0,0 +1,372 @@ +/* + * Account API + * This API is used for the classic integration. If you are just starting your implementation, refer to our [new integration guide](https://docs.adyen.com/marketplaces-and-platforms) instead. The Account API provides endpoints for managing account-related entities on your platform. These related entities include account holders, accounts, bank accounts, shareholders, and verification-related documents. The management operations include actions such as creation, retrieval, updating, and deletion of them. For more information, refer to our [documentation](https://docs.adyen.com/marketplaces-and-platforms/classic). ## Authentication Your Adyen contact will provide your API credential and an API key. To connect to the API, add an `X-API-Key` header with the API key as the value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: YOUR_API_KEY\" \\ ... ``` Alternatively, you can use the username and password to connect to the API using basic authentication. For example: ``` curl -U \"ws@MarketPlace.YOUR_PLATFORM_ACCOUNT\":\"YOUR_WS_PASSWORD\" \\ -H \"Content-Type: application/json\" \\ ... ``` When going live, you need to generate new web service user credentials to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning The Account API supports [versioning](https://docs.adyen.com/development-resources/versioning) using a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://cal-test.adyen.com/cal/services/Account/v6/createAccountHolder ``` + * + * The version of the OpenAPI document: 6 + * + * + * 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.marketpayaccount; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.adyen.model.marketpayaccount.KYCCheckResult; +import com.adyen.model.marketpayaccount.KYCLegalArrangementCheckResult; +import com.adyen.model.marketpayaccount.KYCLegalArrangementEntityCheckResult; +import com.adyen.model.marketpayaccount.KYCPayoutMethodCheckResult; +import com.adyen.model.marketpayaccount.KYCShareholderCheckResult; +import com.adyen.model.marketpayaccount.KYCSignatoryCheckResult; +import com.adyen.model.marketpayaccount.KYCUltimateParentCompanyCheckResult; +import com.fasterxml.jackson.annotation.JsonInclude; +import 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; + + +/** + * KYCVerificationResult + */ +@JsonPropertyOrder({ + KYCVerificationResult.JSON_PROPERTY_ACCOUNT_HOLDER, + KYCVerificationResult.JSON_PROPERTY_LEGAL_ARRANGEMENTS, + KYCVerificationResult.JSON_PROPERTY_LEGAL_ARRANGEMENTS_ENTITIES, + KYCVerificationResult.JSON_PROPERTY_PAYOUT_METHODS, + KYCVerificationResult.JSON_PROPERTY_SHAREHOLDERS, + KYCVerificationResult.JSON_PROPERTY_SIGNATORIES, + KYCVerificationResult.JSON_PROPERTY_ULTIMATE_PARENT_COMPANY +}) + +public class KYCVerificationResult { + public static final String JSON_PROPERTY_ACCOUNT_HOLDER = "accountHolder"; + private KYCCheckResult accountHolder; + + public static final String JSON_PROPERTY_LEGAL_ARRANGEMENTS = "legalArrangements"; + private List legalArrangements = null; + + public static final String JSON_PROPERTY_LEGAL_ARRANGEMENTS_ENTITIES = "legalArrangementsEntities"; + private List legalArrangementsEntities = null; + + public static final String JSON_PROPERTY_PAYOUT_METHODS = "payoutMethods"; + private List payoutMethods = null; + + public static final String JSON_PROPERTY_SHAREHOLDERS = "shareholders"; + private List shareholders = null; + + public static final String JSON_PROPERTY_SIGNATORIES = "signatories"; + private List signatories = null; + + public static final String JSON_PROPERTY_ULTIMATE_PARENT_COMPANY = "ultimateParentCompany"; + private List ultimateParentCompany = null; + + public KYCVerificationResult() { + } + + public KYCVerificationResult accountHolder(KYCCheckResult accountHolder) { + this.accountHolder = accountHolder; + return this; + } + + /** + * Get accountHolder + * @return accountHolder + **/ + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_ACCOUNT_HOLDER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public KYCCheckResult getAccountHolder() { + return accountHolder; + } + + + @JsonProperty(JSON_PROPERTY_ACCOUNT_HOLDER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAccountHolder(KYCCheckResult accountHolder) { + this.accountHolder = accountHolder; + } + + + public KYCVerificationResult legalArrangements(List legalArrangements) { + this.legalArrangements = legalArrangements; + return this; + } + + public KYCVerificationResult addLegalArrangementsItem(KYCLegalArrangementCheckResult legalArrangementsItem) { + if (this.legalArrangements == null) { + this.legalArrangements = new ArrayList<>(); + } + this.legalArrangements.add(legalArrangementsItem); + return this; + } + + /** + * The results of the checks on the legal arrangements. + * @return legalArrangements + **/ + @ApiModelProperty(value = "The results of the checks on the legal arrangements.") + @JsonProperty(JSON_PROPERTY_LEGAL_ARRANGEMENTS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getLegalArrangements() { + return legalArrangements; + } + + + @JsonProperty(JSON_PROPERTY_LEGAL_ARRANGEMENTS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setLegalArrangements(List legalArrangements) { + this.legalArrangements = legalArrangements; + } + + + public KYCVerificationResult legalArrangementsEntities(List legalArrangementsEntities) { + this.legalArrangementsEntities = legalArrangementsEntities; + return this; + } + + public KYCVerificationResult addLegalArrangementsEntitiesItem(KYCLegalArrangementEntityCheckResult legalArrangementsEntitiesItem) { + if (this.legalArrangementsEntities == null) { + this.legalArrangementsEntities = new ArrayList<>(); + } + this.legalArrangementsEntities.add(legalArrangementsEntitiesItem); + return this; + } + + /** + * The results of the checks on the legal arrangement entities. + * @return legalArrangementsEntities + **/ + @ApiModelProperty(value = "The results of the checks on the legal arrangement entities.") + @JsonProperty(JSON_PROPERTY_LEGAL_ARRANGEMENTS_ENTITIES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getLegalArrangementsEntities() { + return legalArrangementsEntities; + } + + + @JsonProperty(JSON_PROPERTY_LEGAL_ARRANGEMENTS_ENTITIES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setLegalArrangementsEntities(List legalArrangementsEntities) { + this.legalArrangementsEntities = legalArrangementsEntities; + } + + + public KYCVerificationResult payoutMethods(List payoutMethods) { + this.payoutMethods = payoutMethods; + return this; + } + + public KYCVerificationResult addPayoutMethodsItem(KYCPayoutMethodCheckResult payoutMethodsItem) { + if (this.payoutMethods == null) { + this.payoutMethods = new ArrayList<>(); + } + this.payoutMethods.add(payoutMethodsItem); + return this; + } + + /** + * The results of the checks on the payout methods. + * @return payoutMethods + **/ + @ApiModelProperty(value = "The results of the checks on the payout methods.") + @JsonProperty(JSON_PROPERTY_PAYOUT_METHODS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getPayoutMethods() { + return payoutMethods; + } + + + @JsonProperty(JSON_PROPERTY_PAYOUT_METHODS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPayoutMethods(List payoutMethods) { + this.payoutMethods = payoutMethods; + } + + + public KYCVerificationResult shareholders(List shareholders) { + this.shareholders = shareholders; + return this; + } + + public KYCVerificationResult addShareholdersItem(KYCShareholderCheckResult shareholdersItem) { + if (this.shareholders == null) { + this.shareholders = new ArrayList<>(); + } + this.shareholders.add(shareholdersItem); + return this; + } + + /** + * The results of the checks on the shareholders. + * @return shareholders + **/ + @ApiModelProperty(value = "The results of the checks on the shareholders.") + @JsonProperty(JSON_PROPERTY_SHAREHOLDERS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getShareholders() { + return shareholders; + } + + + @JsonProperty(JSON_PROPERTY_SHAREHOLDERS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setShareholders(List shareholders) { + this.shareholders = shareholders; + } + + + public KYCVerificationResult signatories(List signatories) { + this.signatories = signatories; + return this; + } + + public KYCVerificationResult addSignatoriesItem(KYCSignatoryCheckResult signatoriesItem) { + if (this.signatories == null) { + this.signatories = new ArrayList<>(); + } + this.signatories.add(signatoriesItem); + return this; + } + + /** + * The results of the checks on the signatories. + * @return signatories + **/ + @ApiModelProperty(value = "The results of the checks on the signatories.") + @JsonProperty(JSON_PROPERTY_SIGNATORIES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getSignatories() { + return signatories; + } + + + @JsonProperty(JSON_PROPERTY_SIGNATORIES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSignatories(List signatories) { + this.signatories = signatories; + } + + + public KYCVerificationResult ultimateParentCompany(List ultimateParentCompany) { + this.ultimateParentCompany = ultimateParentCompany; + return this; + } + + public KYCVerificationResult addUltimateParentCompanyItem(KYCUltimateParentCompanyCheckResult ultimateParentCompanyItem) { + if (this.ultimateParentCompany == null) { + this.ultimateParentCompany = new ArrayList<>(); + } + this.ultimateParentCompany.add(ultimateParentCompanyItem); + return this; + } + + /** + * The result of the check on the Ultimate Parent Company. + * @return ultimateParentCompany + **/ + @ApiModelProperty(value = "The result of the check on the Ultimate Parent Company.") + @JsonProperty(JSON_PROPERTY_ULTIMATE_PARENT_COMPANY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getUltimateParentCompany() { + return ultimateParentCompany; + } + + + @JsonProperty(JSON_PROPERTY_ULTIMATE_PARENT_COMPANY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setUltimateParentCompany(List ultimateParentCompany) { + this.ultimateParentCompany = ultimateParentCompany; + } + + + /** + * Return true if this KYCVerificationResult object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + KYCVerificationResult kyCVerificationResult = (KYCVerificationResult) o; + return Objects.equals(this.accountHolder, kyCVerificationResult.accountHolder) && + Objects.equals(this.legalArrangements, kyCVerificationResult.legalArrangements) && + Objects.equals(this.legalArrangementsEntities, kyCVerificationResult.legalArrangementsEntities) && + Objects.equals(this.payoutMethods, kyCVerificationResult.payoutMethods) && + Objects.equals(this.shareholders, kyCVerificationResult.shareholders) && + Objects.equals(this.signatories, kyCVerificationResult.signatories) && + Objects.equals(this.ultimateParentCompany, kyCVerificationResult.ultimateParentCompany); + } + + @Override + public int hashCode() { + return Objects.hash(accountHolder, legalArrangements, legalArrangementsEntities, payoutMethods, shareholders, signatories, ultimateParentCompany); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class KYCVerificationResult {\n"); + sb.append(" accountHolder: ").append(toIndentedString(accountHolder)).append("\n"); + sb.append(" legalArrangements: ").append(toIndentedString(legalArrangements)).append("\n"); + sb.append(" legalArrangementsEntities: ").append(toIndentedString(legalArrangementsEntities)).append("\n"); + sb.append(" payoutMethods: ").append(toIndentedString(payoutMethods)).append("\n"); + sb.append(" shareholders: ").append(toIndentedString(shareholders)).append("\n"); + sb.append(" signatories: ").append(toIndentedString(signatories)).append("\n"); + sb.append(" ultimateParentCompany: ").append(toIndentedString(ultimateParentCompany)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line 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 KYCVerificationResult given an JSON string + * + * @param jsonString JSON string + * @return An instance of KYCVerificationResult + * @throws JsonProcessingException if the JSON string is invalid with respect to KYCVerificationResult + */ + public static KYCVerificationResult fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, KYCVerificationResult.class); + } +/** + * Convert an instance of KYCVerificationResult 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/marketpayaccount/LegalArrangementDetail.java b/src/main/java/com/adyen/model/marketpayaccount/LegalArrangementDetail.java new file mode 100644 index 000000000..616b7d60d --- /dev/null +++ b/src/main/java/com/adyen/model/marketpayaccount/LegalArrangementDetail.java @@ -0,0 +1,495 @@ +/* + * Account API + * This API is used for the classic integration. If you are just starting your implementation, refer to our [new integration guide](https://docs.adyen.com/marketplaces-and-platforms) instead. The Account API provides endpoints for managing account-related entities on your platform. These related entities include account holders, accounts, bank accounts, shareholders, and verification-related documents. The management operations include actions such as creation, retrieval, updating, and deletion of them. For more information, refer to our [documentation](https://docs.adyen.com/marketplaces-and-platforms/classic). ## Authentication Your Adyen contact will provide your API credential and an API key. To connect to the API, add an `X-API-Key` header with the API key as the value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: YOUR_API_KEY\" \\ ... ``` Alternatively, you can use the username and password to connect to the API using basic authentication. For example: ``` curl -U \"ws@MarketPlace.YOUR_PLATFORM_ACCOUNT\":\"YOUR_WS_PASSWORD\" \\ -H \"Content-Type: application/json\" \\ ... ``` When going live, you need to generate new web service user credentials to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning The Account API supports [versioning](https://docs.adyen.com/development-resources/versioning) using a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://cal-test.adyen.com/cal/services/Account/v6/createAccountHolder ``` + * + * The version of the OpenAPI document: 6 + * + * + * 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.marketpayaccount; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.adyen.model.marketpayaccount.LegalArrangementEntityDetail; +import com.adyen.model.marketpayaccount.ViasAddress; +import com.fasterxml.jackson.annotation.JsonInclude; +import 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; + + +/** + * LegalArrangementDetail + */ +@JsonPropertyOrder({ + LegalArrangementDetail.JSON_PROPERTY_ADDRESS, + LegalArrangementDetail.JSON_PROPERTY_LEGAL_ARRANGEMENT_CODE, + LegalArrangementDetail.JSON_PROPERTY_LEGAL_ARRANGEMENT_ENTITIES, + LegalArrangementDetail.JSON_PROPERTY_LEGAL_ARRANGEMENT_REFERENCE, + LegalArrangementDetail.JSON_PROPERTY_LEGAL_FORM, + LegalArrangementDetail.JSON_PROPERTY_NAME, + LegalArrangementDetail.JSON_PROPERTY_REGISTRATION_NUMBER, + LegalArrangementDetail.JSON_PROPERTY_TAX_NUMBER, + LegalArrangementDetail.JSON_PROPERTY_TYPE +}) + +public class LegalArrangementDetail { + public static final String JSON_PROPERTY_ADDRESS = "address"; + private ViasAddress address; + + public static final String JSON_PROPERTY_LEGAL_ARRANGEMENT_CODE = "legalArrangementCode"; + private String legalArrangementCode; + + public static final String JSON_PROPERTY_LEGAL_ARRANGEMENT_ENTITIES = "legalArrangementEntities"; + private List legalArrangementEntities = null; + + public static final String JSON_PROPERTY_LEGAL_ARRANGEMENT_REFERENCE = "legalArrangementReference"; + private String legalArrangementReference; + + /** + * The form of legal arrangement. Required if `type` is **Trust** or **Partnership**. The possible values depend on the `type`. - For `type` **Trust**: **CashManagementTrust**, **CorporateUnitTrust**, **DeceasedEstate**, **DiscretionaryInvestmentTrust**, **DiscretionaryServicesManagementTrust**, **DiscretionaryTradingTrust**, **FirstHomeSaverAccountsTrust**, **FixedTrust**, **FixedUnitTrust**, **HybridTrust**, **ListedPublicUnitTrust**, **OtherTrust**, **PooledSuperannuationTrust**, **PublicTradingTrust**, or **UnlistedPublicUnitTrust**. - For `type` **Partnership**: **LimitedPartnership**, **FamilyPartnership**, or **OtherPartnership** + */ + public enum LegalFormEnum { + CASHMANAGEMENTTRUST("CashManagementTrust"), + + CORPORATEUNITTRUST("CorporateUnitTrust"), + + DECEASEDESTATE("DeceasedEstate"), + + DISCRETIONARYINVESTMENTTRUST("DiscretionaryInvestmentTrust"), + + DISCRETIONARYSERVICESMANAGEMENTTRUST("DiscretionaryServicesManagementTrust"), + + DISCRETIONARYTRADINGTRUST("DiscretionaryTradingTrust"), + + FIRSTHOMESAVERACCOUNTSTRUST("FirstHomeSaverAccountsTrust"), + + FIXEDTRUST("FixedTrust"), + + FIXEDUNITTRUST("FixedUnitTrust"), + + HYBRIDTRUST("HybridTrust"), + + LISTEDPUBLICUNITTRUST("ListedPublicUnitTrust"), + + OTHERTRUST("OtherTrust"), + + POOLEDSUPERANNUATIONTRUST("PooledSuperannuationTrust"), + + PUBLICTRADINGTRUST("PublicTradingTrust"), + + UNLISTEDPUBLICUNITTRUST("UnlistedPublicUnitTrust"), + + LIMITEDPARTNERSHIP("LimitedPartnership"), + + FAMILYPARTNERSHIP("FamilyPartnership"), + + OTHERPARTNERSHIP("OtherPartnership"); + + private String value; + + LegalFormEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static LegalFormEnum fromValue(String value) { + for (LegalFormEnum b : LegalFormEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_LEGAL_FORM = "legalForm"; + private LegalFormEnum legalForm; + + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public static final String JSON_PROPERTY_REGISTRATION_NUMBER = "registrationNumber"; + private String registrationNumber; + + public static final String JSON_PROPERTY_TAX_NUMBER = "taxNumber"; + private String taxNumber; + + /** + * The [type of legal arrangement](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/legal-arrangements#types-of-legal-arrangements). Possible values: - **Association** - **Partnership** - **SoleProprietorship** - **Trust** + */ + public enum TypeEnum { + ASSOCIATION("Association"), + + PARTNERSHIP("Partnership"), + + SOLEPROPRIETORSHIP("SoleProprietorship"), + + TRUST("Trust"); + + 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 LegalArrangementDetail() { + } + + public LegalArrangementDetail address(ViasAddress address) { + this.address = address; + return this; + } + + /** + * Get address + * @return address + **/ + @ApiModelProperty(required = true, value = "") + @JsonProperty(JSON_PROPERTY_ADDRESS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public ViasAddress getAddress() { + return address; + } + + + @JsonProperty(JSON_PROPERTY_ADDRESS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAddress(ViasAddress address) { + this.address = address; + } + + + public LegalArrangementDetail legalArrangementCode(String legalArrangementCode) { + this.legalArrangementCode = legalArrangementCode; + return this; + } + + /** + * Adyen-generated unique alphanumeric identifier (UUID) for the entry, returned in the response when you create a legal arrangement. Use only when updating an account holder. If you include this field when creating an account holder, the request will fail. + * @return legalArrangementCode + **/ + @ApiModelProperty(value = "Adyen-generated unique alphanumeric identifier (UUID) for the entry, returned in the response when you create a legal arrangement. Use only when updating an account holder. If you include this field when creating an account holder, the request will fail.") + @JsonProperty(JSON_PROPERTY_LEGAL_ARRANGEMENT_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getLegalArrangementCode() { + return legalArrangementCode; + } + + + @JsonProperty(JSON_PROPERTY_LEGAL_ARRANGEMENT_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setLegalArrangementCode(String legalArrangementCode) { + this.legalArrangementCode = legalArrangementCode; + } + + + public LegalArrangementDetail legalArrangementEntities(List legalArrangementEntities) { + this.legalArrangementEntities = legalArrangementEntities; + return this; + } + + public LegalArrangementDetail addLegalArrangementEntitiesItem(LegalArrangementEntityDetail legalArrangementEntitiesItem) { + if (this.legalArrangementEntities == null) { + this.legalArrangementEntities = new ArrayList<>(); + } + this.legalArrangementEntities.add(legalArrangementEntitiesItem); + return this; + } + + /** + * An array containing information about other entities that are part of the legal arrangement. + * @return legalArrangementEntities + **/ + @ApiModelProperty(value = "An array containing information about other entities that are part of the legal arrangement.") + @JsonProperty(JSON_PROPERTY_LEGAL_ARRANGEMENT_ENTITIES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getLegalArrangementEntities() { + return legalArrangementEntities; + } + + + @JsonProperty(JSON_PROPERTY_LEGAL_ARRANGEMENT_ENTITIES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setLegalArrangementEntities(List legalArrangementEntities) { + this.legalArrangementEntities = legalArrangementEntities; + } + + + public LegalArrangementDetail legalArrangementReference(String legalArrangementReference) { + this.legalArrangementReference = legalArrangementReference; + return this; + } + + /** + * Your reference for the legal arrangement. Must be between 3 to 128 characters. + * @return legalArrangementReference + **/ + @ApiModelProperty(value = "Your reference for the legal arrangement. Must be between 3 to 128 characters.") + @JsonProperty(JSON_PROPERTY_LEGAL_ARRANGEMENT_REFERENCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getLegalArrangementReference() { + return legalArrangementReference; + } + + + @JsonProperty(JSON_PROPERTY_LEGAL_ARRANGEMENT_REFERENCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setLegalArrangementReference(String legalArrangementReference) { + this.legalArrangementReference = legalArrangementReference; + } + + + public LegalArrangementDetail legalForm(LegalFormEnum legalForm) { + this.legalForm = legalForm; + return this; + } + + /** + * The form of legal arrangement. Required if `type` is **Trust** or **Partnership**. The possible values depend on the `type`. - For `type` **Trust**: **CashManagementTrust**, **CorporateUnitTrust**, **DeceasedEstate**, **DiscretionaryInvestmentTrust**, **DiscretionaryServicesManagementTrust**, **DiscretionaryTradingTrust**, **FirstHomeSaverAccountsTrust**, **FixedTrust**, **FixedUnitTrust**, **HybridTrust**, **ListedPublicUnitTrust**, **OtherTrust**, **PooledSuperannuationTrust**, **PublicTradingTrust**, or **UnlistedPublicUnitTrust**. - For `type` **Partnership**: **LimitedPartnership**, **FamilyPartnership**, or **OtherPartnership** + * @return legalForm + **/ + @ApiModelProperty(value = "The form of legal arrangement. Required if `type` is **Trust** or **Partnership**. The possible values depend on the `type`. - For `type` **Trust**: **CashManagementTrust**, **CorporateUnitTrust**, **DeceasedEstate**, **DiscretionaryInvestmentTrust**, **DiscretionaryServicesManagementTrust**, **DiscretionaryTradingTrust**, **FirstHomeSaverAccountsTrust**, **FixedTrust**, **FixedUnitTrust**, **HybridTrust**, **ListedPublicUnitTrust**, **OtherTrust**, **PooledSuperannuationTrust**, **PublicTradingTrust**, or **UnlistedPublicUnitTrust**. - For `type` **Partnership**: **LimitedPartnership**, **FamilyPartnership**, or **OtherPartnership**") + @JsonProperty(JSON_PROPERTY_LEGAL_FORM) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public LegalFormEnum getLegalForm() { + return legalForm; + } + + + @JsonProperty(JSON_PROPERTY_LEGAL_FORM) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setLegalForm(LegalFormEnum legalForm) { + this.legalForm = legalForm; + } + + + public LegalArrangementDetail name(String name) { + this.name = name; + return this; + } + + /** + * The legal name of the legal arrangement. Minimum length: 3 characters. + * @return name + **/ + @ApiModelProperty(required = true, value = "The legal name of the legal arrangement. Minimum length: 3 characters.") + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getName() { + return name; + } + + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setName(String name) { + this.name = name; + } + + + public LegalArrangementDetail registrationNumber(String registrationNumber) { + this.registrationNumber = registrationNumber; + return this; + } + + /** + * The registration number of the legal arrangement. + * @return registrationNumber + **/ + @ApiModelProperty(value = "The registration number of the legal arrangement.") + @JsonProperty(JSON_PROPERTY_REGISTRATION_NUMBER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getRegistrationNumber() { + return registrationNumber; + } + + + @JsonProperty(JSON_PROPERTY_REGISTRATION_NUMBER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setRegistrationNumber(String registrationNumber) { + this.registrationNumber = registrationNumber; + } + + + public LegalArrangementDetail taxNumber(String taxNumber) { + this.taxNumber = taxNumber; + return this; + } + + /** + * The tax identification number of the legal arrangement. + * @return taxNumber + **/ + @ApiModelProperty(value = "The tax identification number of the legal arrangement.") + @JsonProperty(JSON_PROPERTY_TAX_NUMBER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getTaxNumber() { + return taxNumber; + } + + + @JsonProperty(JSON_PROPERTY_TAX_NUMBER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTaxNumber(String taxNumber) { + this.taxNumber = taxNumber; + } + + + public LegalArrangementDetail type(TypeEnum type) { + this.type = type; + return this; + } + + /** + * The [type of legal arrangement](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/legal-arrangements#types-of-legal-arrangements). Possible values: - **Association** - **Partnership** - **SoleProprietorship** - **Trust** + * @return type + **/ + @ApiModelProperty(required = true, value = "The [type of legal arrangement](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/legal-arrangements#types-of-legal-arrangements). Possible values: - **Association** - **Partnership** - **SoleProprietorship** - **Trust** ") + @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 LegalArrangementDetail object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LegalArrangementDetail legalArrangementDetail = (LegalArrangementDetail) o; + return Objects.equals(this.address, legalArrangementDetail.address) && + Objects.equals(this.legalArrangementCode, legalArrangementDetail.legalArrangementCode) && + Objects.equals(this.legalArrangementEntities, legalArrangementDetail.legalArrangementEntities) && + Objects.equals(this.legalArrangementReference, legalArrangementDetail.legalArrangementReference) && + Objects.equals(this.legalForm, legalArrangementDetail.legalForm) && + Objects.equals(this.name, legalArrangementDetail.name) && + Objects.equals(this.registrationNumber, legalArrangementDetail.registrationNumber) && + Objects.equals(this.taxNumber, legalArrangementDetail.taxNumber) && + Objects.equals(this.type, legalArrangementDetail.type); + } + + @Override + public int hashCode() { + return Objects.hash(address, legalArrangementCode, legalArrangementEntities, legalArrangementReference, legalForm, name, registrationNumber, taxNumber, type); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LegalArrangementDetail {\n"); + sb.append(" address: ").append(toIndentedString(address)).append("\n"); + sb.append(" legalArrangementCode: ").append(toIndentedString(legalArrangementCode)).append("\n"); + sb.append(" legalArrangementEntities: ").append(toIndentedString(legalArrangementEntities)).append("\n"); + sb.append(" legalArrangementReference: ").append(toIndentedString(legalArrangementReference)).append("\n"); + sb.append(" legalForm: ").append(toIndentedString(legalForm)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" registrationNumber: ").append(toIndentedString(registrationNumber)).append("\n"); + sb.append(" taxNumber: ").append(toIndentedString(taxNumber)).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 LegalArrangementDetail given an JSON string + * + * @param jsonString JSON string + * @return An instance of LegalArrangementDetail + * @throws JsonProcessingException if the JSON string is invalid with respect to LegalArrangementDetail + */ + public static LegalArrangementDetail fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, LegalArrangementDetail.class); + } +/** + * Convert an instance of LegalArrangementDetail 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/marketpayaccount/LegalArrangementEntityDetail.java b/src/main/java/com/adyen/model/marketpayaccount/LegalArrangementEntityDetail.java new file mode 100644 index 000000000..1ccc43eb9 --- /dev/null +++ b/src/main/java/com/adyen/model/marketpayaccount/LegalArrangementEntityDetail.java @@ -0,0 +1,539 @@ +/* + * Account API + * This API is used for the classic integration. If you are just starting your implementation, refer to our [new integration guide](https://docs.adyen.com/marketplaces-and-platforms) instead. The Account API provides endpoints for managing account-related entities on your platform. These related entities include account holders, accounts, bank accounts, shareholders, and verification-related documents. The management operations include actions such as creation, retrieval, updating, and deletion of them. For more information, refer to our [documentation](https://docs.adyen.com/marketplaces-and-platforms/classic). ## Authentication Your Adyen contact will provide your API credential and an API key. To connect to the API, add an `X-API-Key` header with the API key as the value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: YOUR_API_KEY\" \\ ... ``` Alternatively, you can use the username and password to connect to the API using basic authentication. For example: ``` curl -U \"ws@MarketPlace.YOUR_PLATFORM_ACCOUNT\":\"YOUR_WS_PASSWORD\" \\ -H \"Content-Type: application/json\" \\ ... ``` When going live, you need to generate new web service user credentials to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning The Account API supports [versioning](https://docs.adyen.com/development-resources/versioning) using a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://cal-test.adyen.com/cal/services/Account/v6/createAccountHolder ``` + * + * The version of the OpenAPI document: 6 + * + * + * 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.marketpayaccount; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.adyen.model.marketpayaccount.BusinessDetails; +import com.adyen.model.marketpayaccount.IndividualDetails; +import com.adyen.model.marketpayaccount.ViasAddress; +import com.adyen.model.marketpayaccount.ViasPhoneNumber; +import com.fasterxml.jackson.annotation.JsonInclude; +import 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; + + +/** + * LegalArrangementEntityDetail + */ +@JsonPropertyOrder({ + LegalArrangementEntityDetail.JSON_PROPERTY_ADDRESS, + LegalArrangementEntityDetail.JSON_PROPERTY_BUSINESS_DETAILS, + LegalArrangementEntityDetail.JSON_PROPERTY_EMAIL, + LegalArrangementEntityDetail.JSON_PROPERTY_FULL_PHONE_NUMBER, + LegalArrangementEntityDetail.JSON_PROPERTY_INDIVIDUAL_DETAILS, + LegalArrangementEntityDetail.JSON_PROPERTY_LEGAL_ARRANGEMENT_ENTITY_CODE, + LegalArrangementEntityDetail.JSON_PROPERTY_LEGAL_ARRANGEMENT_ENTITY_REFERENCE, + LegalArrangementEntityDetail.JSON_PROPERTY_LEGAL_ARRANGEMENT_MEMBERS, + LegalArrangementEntityDetail.JSON_PROPERTY_LEGAL_ENTITY_TYPE, + LegalArrangementEntityDetail.JSON_PROPERTY_PHONE_NUMBER, + LegalArrangementEntityDetail.JSON_PROPERTY_WEB_ADDRESS +}) + +public class LegalArrangementEntityDetail { + public static final String JSON_PROPERTY_ADDRESS = "address"; + private ViasAddress address; + + public static final String JSON_PROPERTY_BUSINESS_DETAILS = "businessDetails"; + private BusinessDetails businessDetails; + + public static final String JSON_PROPERTY_EMAIL = "email"; + private String email; + + public static final String JSON_PROPERTY_FULL_PHONE_NUMBER = "fullPhoneNumber"; + private String fullPhoneNumber; + + public static final String JSON_PROPERTY_INDIVIDUAL_DETAILS = "individualDetails"; + private IndividualDetails individualDetails; + + public static final String JSON_PROPERTY_LEGAL_ARRANGEMENT_ENTITY_CODE = "legalArrangementEntityCode"; + private String legalArrangementEntityCode; + + public static final String JSON_PROPERTY_LEGAL_ARRANGEMENT_ENTITY_REFERENCE = "legalArrangementEntityReference"; + private String legalArrangementEntityReference; + + /** + * Gets or Sets legalArrangementMembers + */ + public enum LegalArrangementMembersEnum { + BENEFICIARY("Beneficiary"), + + CONTROLLINGPERSON("ControllingPerson"), + + PARTNER("Partner"), + + PROTECTOR("Protector"), + + SETTLOR("Settlor"), + + SHAREHOLDER("Shareholder"), + + TRUSTEE("Trustee"); + + private String value; + + LegalArrangementMembersEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static LegalArrangementMembersEnum fromValue(String value) { + for (LegalArrangementMembersEnum b : LegalArrangementMembersEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_LEGAL_ARRANGEMENT_MEMBERS = "legalArrangementMembers"; + private List legalArrangementMembers = null; + + /** + * The legal entity type. Possible values: **Business**, **Individual**, **NonProfit**, **PublicCompany**, or **Partnership**. + */ + public enum LegalEntityTypeEnum { + BUSINESS("Business"), + + INDIVIDUAL("Individual"), + + NONPROFIT("NonProfit"), + + PARTNERSHIP("Partnership"), + + PUBLICCOMPANY("PublicCompany"); + + private String value; + + LegalEntityTypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static LegalEntityTypeEnum fromValue(String value) { + for (LegalEntityTypeEnum b : LegalEntityTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_LEGAL_ENTITY_TYPE = "legalEntityType"; + private LegalEntityTypeEnum legalEntityType; + + public static final String JSON_PROPERTY_PHONE_NUMBER = "phoneNumber"; + private ViasPhoneNumber phoneNumber; + + public static final String JSON_PROPERTY_WEB_ADDRESS = "webAddress"; + private String webAddress; + + public LegalArrangementEntityDetail() { + } + + public LegalArrangementEntityDetail address(ViasAddress address) { + this.address = address; + return this; + } + + /** + * Get address + * @return address + **/ + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_ADDRESS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public ViasAddress getAddress() { + return address; + } + + + @JsonProperty(JSON_PROPERTY_ADDRESS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAddress(ViasAddress address) { + this.address = address; + } + + + public LegalArrangementEntityDetail businessDetails(BusinessDetails businessDetails) { + this.businessDetails = businessDetails; + return this; + } + + /** + * Get businessDetails + * @return businessDetails + **/ + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_BUSINESS_DETAILS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public BusinessDetails getBusinessDetails() { + return businessDetails; + } + + + @JsonProperty(JSON_PROPERTY_BUSINESS_DETAILS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setBusinessDetails(BusinessDetails businessDetails) { + this.businessDetails = businessDetails; + } + + + public LegalArrangementEntityDetail email(String email) { + this.email = email; + return this; + } + + /** + * The e-mail address of the entity. + * @return email + **/ + @ApiModelProperty(value = "The e-mail address of the entity.") + @JsonProperty(JSON_PROPERTY_EMAIL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getEmail() { + return email; + } + + + @JsonProperty(JSON_PROPERTY_EMAIL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEmail(String email) { + this.email = email; + } + + + public LegalArrangementEntityDetail fullPhoneNumber(String fullPhoneNumber) { + this.fullPhoneNumber = fullPhoneNumber; + return this; + } + + /** + * The phone number of the contact provided as a single string. It will be handled as a landline phone. **Examples:** \"0031 6 11 22 33 44\", \"+316/1122-3344\", \"(0031) 611223344\" + * @return fullPhoneNumber + **/ + @ApiModelProperty(value = "The phone number of the contact provided as a single string. It will be handled as a landline phone. **Examples:** \"0031 6 11 22 33 44\", \"+316/1122-3344\", \"(0031) 611223344\"") + @JsonProperty(JSON_PROPERTY_FULL_PHONE_NUMBER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getFullPhoneNumber() { + return fullPhoneNumber; + } + + + @JsonProperty(JSON_PROPERTY_FULL_PHONE_NUMBER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setFullPhoneNumber(String fullPhoneNumber) { + this.fullPhoneNumber = fullPhoneNumber; + } + + + public LegalArrangementEntityDetail individualDetails(IndividualDetails individualDetails) { + this.individualDetails = individualDetails; + return this; + } + + /** + * Get individualDetails + * @return individualDetails + **/ + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_INDIVIDUAL_DETAILS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public IndividualDetails getIndividualDetails() { + return individualDetails; + } + + + @JsonProperty(JSON_PROPERTY_INDIVIDUAL_DETAILS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setIndividualDetails(IndividualDetails individualDetails) { + this.individualDetails = individualDetails; + } + + + public LegalArrangementEntityDetail legalArrangementEntityCode(String legalArrangementEntityCode) { + this.legalArrangementEntityCode = legalArrangementEntityCode; + return this; + } + + /** + * Adyen-generated unique alphanumeric identifier (UUID) for the entry, returned in the response when you create a legal arrangement entity. Use only when updating an account holder. If you include this field when creating an account holder, the request will fail. + * @return legalArrangementEntityCode + **/ + @ApiModelProperty(value = "Adyen-generated unique alphanumeric identifier (UUID) for the entry, returned in the response when you create a legal arrangement entity. Use only when updating an account holder. If you include this field when creating an account holder, the request will fail.") + @JsonProperty(JSON_PROPERTY_LEGAL_ARRANGEMENT_ENTITY_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getLegalArrangementEntityCode() { + return legalArrangementEntityCode; + } + + + @JsonProperty(JSON_PROPERTY_LEGAL_ARRANGEMENT_ENTITY_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setLegalArrangementEntityCode(String legalArrangementEntityCode) { + this.legalArrangementEntityCode = legalArrangementEntityCode; + } + + + public LegalArrangementEntityDetail legalArrangementEntityReference(String legalArrangementEntityReference) { + this.legalArrangementEntityReference = legalArrangementEntityReference; + return this; + } + + /** + * Your reference for the legal arrangement entity. + * @return legalArrangementEntityReference + **/ + @ApiModelProperty(value = "Your reference for the legal arrangement entity.") + @JsonProperty(JSON_PROPERTY_LEGAL_ARRANGEMENT_ENTITY_REFERENCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getLegalArrangementEntityReference() { + return legalArrangementEntityReference; + } + + + @JsonProperty(JSON_PROPERTY_LEGAL_ARRANGEMENT_ENTITY_REFERENCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setLegalArrangementEntityReference(String legalArrangementEntityReference) { + this.legalArrangementEntityReference = legalArrangementEntityReference; + } + + + public LegalArrangementEntityDetail legalArrangementMembers(List legalArrangementMembers) { + this.legalArrangementMembers = legalArrangementMembers; + return this; + } + + public LegalArrangementEntityDetail addLegalArrangementMembersItem(LegalArrangementMembersEnum legalArrangementMembersItem) { + if (this.legalArrangementMembers == null) { + this.legalArrangementMembers = new ArrayList<>(); + } + this.legalArrangementMembers.add(legalArrangementMembersItem); + return this; + } + + /** + * An array containing the roles of the entity in the legal arrangement. The possible values depend on the legal arrangement `type`. - For `type` **Association**: **ControllingPerson** and **Shareholder**. - For `type` **Partnership**: **Partner** and **Shareholder**. - For `type` **Trust**: **Trustee**, **Settlor**, **Protector**, **Beneficiary**, and **Shareholder**. + * @return legalArrangementMembers + **/ + @ApiModelProperty(value = "An array containing the roles of the entity in the legal arrangement. The possible values depend on the legal arrangement `type`. - For `type` **Association**: **ControllingPerson** and **Shareholder**. - For `type` **Partnership**: **Partner** and **Shareholder**. - For `type` **Trust**: **Trustee**, **Settlor**, **Protector**, **Beneficiary**, and **Shareholder**. ") + @JsonProperty(JSON_PROPERTY_LEGAL_ARRANGEMENT_MEMBERS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getLegalArrangementMembers() { + return legalArrangementMembers; + } + + + @JsonProperty(JSON_PROPERTY_LEGAL_ARRANGEMENT_MEMBERS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setLegalArrangementMembers(List legalArrangementMembers) { + this.legalArrangementMembers = legalArrangementMembers; + } + + + public LegalArrangementEntityDetail legalEntityType(LegalEntityTypeEnum legalEntityType) { + this.legalEntityType = legalEntityType; + return this; + } + + /** + * The legal entity type. Possible values: **Business**, **Individual**, **NonProfit**, **PublicCompany**, or **Partnership**. + * @return legalEntityType + **/ + @ApiModelProperty(value = "The legal entity type. Possible values: **Business**, **Individual**, **NonProfit**, **PublicCompany**, or **Partnership**. ") + @JsonProperty(JSON_PROPERTY_LEGAL_ENTITY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public LegalEntityTypeEnum getLegalEntityType() { + return legalEntityType; + } + + + @JsonProperty(JSON_PROPERTY_LEGAL_ENTITY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setLegalEntityType(LegalEntityTypeEnum legalEntityType) { + this.legalEntityType = legalEntityType; + } + + + public LegalArrangementEntityDetail phoneNumber(ViasPhoneNumber phoneNumber) { + this.phoneNumber = phoneNumber; + return this; + } + + /** + * Get phoneNumber + * @return phoneNumber + **/ + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_PHONE_NUMBER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public ViasPhoneNumber getPhoneNumber() { + return phoneNumber; + } + + + @JsonProperty(JSON_PROPERTY_PHONE_NUMBER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPhoneNumber(ViasPhoneNumber phoneNumber) { + this.phoneNumber = phoneNumber; + } + + + public LegalArrangementEntityDetail webAddress(String webAddress) { + this.webAddress = webAddress; + return this; + } + + /** + * The URL of the website of the contact. + * @return webAddress + **/ + @ApiModelProperty(value = "The URL of the website of the contact.") + @JsonProperty(JSON_PROPERTY_WEB_ADDRESS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getWebAddress() { + return webAddress; + } + + + @JsonProperty(JSON_PROPERTY_WEB_ADDRESS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setWebAddress(String webAddress) { + this.webAddress = webAddress; + } + + + /** + * Return true if this LegalArrangementEntityDetail object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LegalArrangementEntityDetail legalArrangementEntityDetail = (LegalArrangementEntityDetail) o; + return Objects.equals(this.address, legalArrangementEntityDetail.address) && + Objects.equals(this.businessDetails, legalArrangementEntityDetail.businessDetails) && + Objects.equals(this.email, legalArrangementEntityDetail.email) && + Objects.equals(this.fullPhoneNumber, legalArrangementEntityDetail.fullPhoneNumber) && + Objects.equals(this.individualDetails, legalArrangementEntityDetail.individualDetails) && + Objects.equals(this.legalArrangementEntityCode, legalArrangementEntityDetail.legalArrangementEntityCode) && + Objects.equals(this.legalArrangementEntityReference, legalArrangementEntityDetail.legalArrangementEntityReference) && + Objects.equals(this.legalArrangementMembers, legalArrangementEntityDetail.legalArrangementMembers) && + Objects.equals(this.legalEntityType, legalArrangementEntityDetail.legalEntityType) && + Objects.equals(this.phoneNumber, legalArrangementEntityDetail.phoneNumber) && + Objects.equals(this.webAddress, legalArrangementEntityDetail.webAddress); + } + + @Override + public int hashCode() { + return Objects.hash(address, businessDetails, email, fullPhoneNumber, individualDetails, legalArrangementEntityCode, legalArrangementEntityReference, legalArrangementMembers, legalEntityType, phoneNumber, webAddress); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LegalArrangementEntityDetail {\n"); + sb.append(" address: ").append(toIndentedString(address)).append("\n"); + sb.append(" businessDetails: ").append(toIndentedString(businessDetails)).append("\n"); + sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append(" fullPhoneNumber: ").append(toIndentedString(fullPhoneNumber)).append("\n"); + sb.append(" individualDetails: ").append(toIndentedString(individualDetails)).append("\n"); + sb.append(" legalArrangementEntityCode: ").append(toIndentedString(legalArrangementEntityCode)).append("\n"); + sb.append(" legalArrangementEntityReference: ").append(toIndentedString(legalArrangementEntityReference)).append("\n"); + sb.append(" legalArrangementMembers: ").append(toIndentedString(legalArrangementMembers)).append("\n"); + sb.append(" legalEntityType: ").append(toIndentedString(legalEntityType)).append("\n"); + sb.append(" phoneNumber: ").append(toIndentedString(phoneNumber)).append("\n"); + sb.append(" webAddress: ").append(toIndentedString(webAddress)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line 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 LegalArrangementEntityDetail given an JSON string + * + * @param jsonString JSON string + * @return An instance of LegalArrangementEntityDetail + * @throws JsonProcessingException if the JSON string is invalid with respect to LegalArrangementEntityDetail + */ + public static LegalArrangementEntityDetail fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, LegalArrangementEntityDetail.class); + } +/** + * Convert an instance of LegalArrangementEntityDetail 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/marketpayaccount/LegalArrangementRequest.java b/src/main/java/com/adyen/model/marketpayaccount/LegalArrangementRequest.java new file mode 100644 index 000000000..a73595722 --- /dev/null +++ b/src/main/java/com/adyen/model/marketpayaccount/LegalArrangementRequest.java @@ -0,0 +1,170 @@ +/* + * Account API + * This API is used for the classic integration. If you are just starting your implementation, refer to our [new integration guide](https://docs.adyen.com/marketplaces-and-platforms) instead. The Account API provides endpoints for managing account-related entities on your platform. These related entities include account holders, accounts, bank accounts, shareholders, and verification-related documents. The management operations include actions such as creation, retrieval, updating, and deletion of them. For more information, refer to our [documentation](https://docs.adyen.com/marketplaces-and-platforms/classic). ## Authentication Your Adyen contact will provide your API credential and an API key. To connect to the API, add an `X-API-Key` header with the API key as the value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: YOUR_API_KEY\" \\ ... ``` Alternatively, you can use the username and password to connect to the API using basic authentication. For example: ``` curl -U \"ws@MarketPlace.YOUR_PLATFORM_ACCOUNT\":\"YOUR_WS_PASSWORD\" \\ -H \"Content-Type: application/json\" \\ ... ``` When going live, you need to generate new web service user credentials to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning The Account API supports [versioning](https://docs.adyen.com/development-resources/versioning) using a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://cal-test.adyen.com/cal/services/Account/v6/createAccountHolder ``` + * + * The version of the OpenAPI document: 6 + * + * + * 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.marketpayaccount; + +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.ArrayList; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.core.JsonProcessingException; + + +/** + * LegalArrangementRequest + */ +@JsonPropertyOrder({ + LegalArrangementRequest.JSON_PROPERTY_LEGAL_ARRANGEMENT_CODE, + LegalArrangementRequest.JSON_PROPERTY_LEGAL_ARRANGEMENT_ENTITY_CODES +}) + +public class LegalArrangementRequest { + public static final String JSON_PROPERTY_LEGAL_ARRANGEMENT_CODE = "legalArrangementCode"; + private String legalArrangementCode; + + public static final String JSON_PROPERTY_LEGAL_ARRANGEMENT_ENTITY_CODES = "legalArrangementEntityCodes"; + private List legalArrangementEntityCodes = null; + + public LegalArrangementRequest() { + } + + public LegalArrangementRequest legalArrangementCode(String legalArrangementCode) { + this.legalArrangementCode = legalArrangementCode; + return this; + } + + /** + * The code of the legal arrangement to be deleted. If you also send `legalArrangementEntityCodes`, only the entities listed will be deleted. + * @return legalArrangementCode + **/ + @ApiModelProperty(required = true, value = "The code of the legal arrangement to be deleted. If you also send `legalArrangementEntityCodes`, only the entities listed will be deleted.") + @JsonProperty(JSON_PROPERTY_LEGAL_ARRANGEMENT_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getLegalArrangementCode() { + return legalArrangementCode; + } + + + @JsonProperty(JSON_PROPERTY_LEGAL_ARRANGEMENT_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setLegalArrangementCode(String legalArrangementCode) { + this.legalArrangementCode = legalArrangementCode; + } + + + public LegalArrangementRequest legalArrangementEntityCodes(List legalArrangementEntityCodes) { + this.legalArrangementEntityCodes = legalArrangementEntityCodes; + return this; + } + + public LegalArrangementRequest addLegalArrangementEntityCodesItem(String legalArrangementEntityCodesItem) { + if (this.legalArrangementEntityCodes == null) { + this.legalArrangementEntityCodes = new ArrayList<>(); + } + this.legalArrangementEntityCodes.add(legalArrangementEntityCodesItem); + return this; + } + + /** + * List of legal arrangement entities to be deleted. + * @return legalArrangementEntityCodes + **/ + @ApiModelProperty(value = "List of legal arrangement entities to be deleted.") + @JsonProperty(JSON_PROPERTY_LEGAL_ARRANGEMENT_ENTITY_CODES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getLegalArrangementEntityCodes() { + return legalArrangementEntityCodes; + } + + + @JsonProperty(JSON_PROPERTY_LEGAL_ARRANGEMENT_ENTITY_CODES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setLegalArrangementEntityCodes(List legalArrangementEntityCodes) { + this.legalArrangementEntityCodes = legalArrangementEntityCodes; + } + + + /** + * Return true if this LegalArrangementRequest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LegalArrangementRequest legalArrangementRequest = (LegalArrangementRequest) o; + return Objects.equals(this.legalArrangementCode, legalArrangementRequest.legalArrangementCode) && + Objects.equals(this.legalArrangementEntityCodes, legalArrangementRequest.legalArrangementEntityCodes); + } + + @Override + public int hashCode() { + return Objects.hash(legalArrangementCode, legalArrangementEntityCodes); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LegalArrangementRequest {\n"); + sb.append(" legalArrangementCode: ").append(toIndentedString(legalArrangementCode)).append("\n"); + sb.append(" legalArrangementEntityCodes: ").append(toIndentedString(legalArrangementEntityCodes)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line 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 LegalArrangementRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of LegalArrangementRequest + * @throws JsonProcessingException if the JSON string is invalid with respect to LegalArrangementRequest + */ + public static LegalArrangementRequest fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, LegalArrangementRequest.class); + } +/** + * Convert an instance of LegalArrangementRequest 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/marketpayaccount/MigratedAccounts.java b/src/main/java/com/adyen/model/marketpayaccount/MigratedAccounts.java new file mode 100644 index 000000000..81b7acc17 --- /dev/null +++ b/src/main/java/com/adyen/model/marketpayaccount/MigratedAccounts.java @@ -0,0 +1,160 @@ +/* + * Account API + * This API is used for the classic integration. If you are just starting your implementation, refer to our [new integration guide](https://docs.adyen.com/marketplaces-and-platforms) instead. The Account API provides endpoints for managing account-related entities on your platform. These related entities include account holders, accounts, bank accounts, shareholders, and verification-related documents. The management operations include actions such as creation, retrieval, updating, and deletion of them. For more information, refer to our [documentation](https://docs.adyen.com/marketplaces-and-platforms/classic). ## Authentication Your Adyen contact will provide your API credential and an API key. To connect to the API, add an `X-API-Key` header with the API key as the value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: YOUR_API_KEY\" \\ ... ``` Alternatively, you can use the username and password to connect to the API using basic authentication. For example: ``` curl -U \"ws@MarketPlace.YOUR_PLATFORM_ACCOUNT\":\"YOUR_WS_PASSWORD\" \\ -H \"Content-Type: application/json\" \\ ... ``` When going live, you need to generate new web service user credentials to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning The Account API supports [versioning](https://docs.adyen.com/development-resources/versioning) using a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://cal-test.adyen.com/cal/services/Account/v6/createAccountHolder ``` + * + * The version of the OpenAPI document: 6 + * + * + * 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.marketpayaccount; + +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; + + +/** + * MigratedAccounts + */ +@JsonPropertyOrder({ + MigratedAccounts.JSON_PROPERTY_BALANCE_ACCOUNT_ID, + MigratedAccounts.JSON_PROPERTY_VIRTUAL_ACCOUNT_CODE +}) + +public class MigratedAccounts { + public static final String JSON_PROPERTY_BALANCE_ACCOUNT_ID = "balanceAccountId"; + private String balanceAccountId; + + public static final String JSON_PROPERTY_VIRTUAL_ACCOUNT_CODE = "virtualAccountCode"; + private String virtualAccountCode; + + public MigratedAccounts() { + } + + public MigratedAccounts balanceAccountId(String balanceAccountId) { + this.balanceAccountId = balanceAccountId; + return this; + } + + /** + * The unique identifier of the account of the migrated account holder in the balance platform. + * @return balanceAccountId + **/ + @ApiModelProperty(value = "The unique identifier of the account of the migrated account holder in the balance platform.") + @JsonProperty(JSON_PROPERTY_BALANCE_ACCOUNT_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getBalanceAccountId() { + return balanceAccountId; + } + + + @JsonProperty(JSON_PROPERTY_BALANCE_ACCOUNT_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setBalanceAccountId(String balanceAccountId) { + this.balanceAccountId = balanceAccountId; + } + + + public MigratedAccounts virtualAccountCode(String virtualAccountCode) { + this.virtualAccountCode = virtualAccountCode; + return this; + } + + /** + * The unique identifier of the account of the migrated account holder in the classic integration. + * @return virtualAccountCode + **/ + @ApiModelProperty(value = "The unique identifier of the account of the migrated account holder in the classic integration.") + @JsonProperty(JSON_PROPERTY_VIRTUAL_ACCOUNT_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getVirtualAccountCode() { + return virtualAccountCode; + } + + + @JsonProperty(JSON_PROPERTY_VIRTUAL_ACCOUNT_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setVirtualAccountCode(String virtualAccountCode) { + this.virtualAccountCode = virtualAccountCode; + } + + + /** + * Return true if this MigratedAccounts object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + MigratedAccounts migratedAccounts = (MigratedAccounts) o; + return Objects.equals(this.balanceAccountId, migratedAccounts.balanceAccountId) && + Objects.equals(this.virtualAccountCode, migratedAccounts.virtualAccountCode); + } + + @Override + public int hashCode() { + return Objects.hash(balanceAccountId, virtualAccountCode); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class MigratedAccounts {\n"); + sb.append(" balanceAccountId: ").append(toIndentedString(balanceAccountId)).append("\n"); + sb.append(" virtualAccountCode: ").append(toIndentedString(virtualAccountCode)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line 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 MigratedAccounts given an JSON string + * + * @param jsonString JSON string + * @return An instance of MigratedAccounts + * @throws JsonProcessingException if the JSON string is invalid with respect to MigratedAccounts + */ + public static MigratedAccounts fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, MigratedAccounts.class); + } +/** + * Convert an instance of MigratedAccounts 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/marketpayaccount/MigratedShareholders.java b/src/main/java/com/adyen/model/marketpayaccount/MigratedShareholders.java new file mode 100644 index 000000000..2ad5979bc --- /dev/null +++ b/src/main/java/com/adyen/model/marketpayaccount/MigratedShareholders.java @@ -0,0 +1,160 @@ +/* + * Account API + * This API is used for the classic integration. If you are just starting your implementation, refer to our [new integration guide](https://docs.adyen.com/marketplaces-and-platforms) instead. The Account API provides endpoints for managing account-related entities on your platform. These related entities include account holders, accounts, bank accounts, shareholders, and verification-related documents. The management operations include actions such as creation, retrieval, updating, and deletion of them. For more information, refer to our [documentation](https://docs.adyen.com/marketplaces-and-platforms/classic). ## Authentication Your Adyen contact will provide your API credential and an API key. To connect to the API, add an `X-API-Key` header with the API key as the value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: YOUR_API_KEY\" \\ ... ``` Alternatively, you can use the username and password to connect to the API using basic authentication. For example: ``` curl -U \"ws@MarketPlace.YOUR_PLATFORM_ACCOUNT\":\"YOUR_WS_PASSWORD\" \\ -H \"Content-Type: application/json\" \\ ... ``` When going live, you need to generate new web service user credentials to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning The Account API supports [versioning](https://docs.adyen.com/development-resources/versioning) using a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://cal-test.adyen.com/cal/services/Account/v6/createAccountHolder ``` + * + * The version of the OpenAPI document: 6 + * + * + * 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.marketpayaccount; + +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; + + +/** + * MigratedShareholders + */ +@JsonPropertyOrder({ + MigratedShareholders.JSON_PROPERTY_LEGAL_ENTITY_CODE, + MigratedShareholders.JSON_PROPERTY_SHAREHOLDER_CODE +}) + +public class MigratedShareholders { + public static final String JSON_PROPERTY_LEGAL_ENTITY_CODE = "legalEntityCode"; + private String legalEntityCode; + + public static final String JSON_PROPERTY_SHAREHOLDER_CODE = "shareholderCode"; + private String shareholderCode; + + public MigratedShareholders() { + } + + public MigratedShareholders legalEntityCode(String legalEntityCode) { + this.legalEntityCode = legalEntityCode; + return this; + } + + /** + * The unique identifier of the legal entity of that shareholder in the balance platform. + * @return legalEntityCode + **/ + @ApiModelProperty(value = "The unique identifier of the legal entity of that shareholder in the balance platform.") + @JsonProperty(JSON_PROPERTY_LEGAL_ENTITY_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getLegalEntityCode() { + return legalEntityCode; + } + + + @JsonProperty(JSON_PROPERTY_LEGAL_ENTITY_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setLegalEntityCode(String legalEntityCode) { + this.legalEntityCode = legalEntityCode; + } + + + public MigratedShareholders shareholderCode(String shareholderCode) { + this.shareholderCode = shareholderCode; + return this; + } + + /** + * The unique identifier of the account of the migrated shareholder in the classic integration. + * @return shareholderCode + **/ + @ApiModelProperty(value = "The unique identifier of the account of the migrated shareholder in the classic integration.") + @JsonProperty(JSON_PROPERTY_SHAREHOLDER_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getShareholderCode() { + return shareholderCode; + } + + + @JsonProperty(JSON_PROPERTY_SHAREHOLDER_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setShareholderCode(String shareholderCode) { + this.shareholderCode = shareholderCode; + } + + + /** + * Return true if this MigratedShareholders object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + MigratedShareholders migratedShareholders = (MigratedShareholders) o; + return Objects.equals(this.legalEntityCode, migratedShareholders.legalEntityCode) && + Objects.equals(this.shareholderCode, migratedShareholders.shareholderCode); + } + + @Override + public int hashCode() { + return Objects.hash(legalEntityCode, shareholderCode); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class MigratedShareholders {\n"); + sb.append(" legalEntityCode: ").append(toIndentedString(legalEntityCode)).append("\n"); + sb.append(" shareholderCode: ").append(toIndentedString(shareholderCode)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line 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 MigratedShareholders given an JSON string + * + * @param jsonString JSON string + * @return An instance of MigratedShareholders + * @throws JsonProcessingException if the JSON string is invalid with respect to MigratedShareholders + */ + public static MigratedShareholders fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, MigratedShareholders.class); + } +/** + * Convert an instance of MigratedShareholders 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/marketpayaccount/MigratedStores.java b/src/main/java/com/adyen/model/marketpayaccount/MigratedStores.java new file mode 100644 index 000000000..703964527 --- /dev/null +++ b/src/main/java/com/adyen/model/marketpayaccount/MigratedStores.java @@ -0,0 +1,222 @@ +/* + * Account API + * This API is used for the classic integration. If you are just starting your implementation, refer to our [new integration guide](https://docs.adyen.com/marketplaces-and-platforms) instead. The Account API provides endpoints for managing account-related entities on your platform. These related entities include account holders, accounts, bank accounts, shareholders, and verification-related documents. The management operations include actions such as creation, retrieval, updating, and deletion of them. For more information, refer to our [documentation](https://docs.adyen.com/marketplaces-and-platforms/classic). ## Authentication Your Adyen contact will provide your API credential and an API key. To connect to the API, add an `X-API-Key` header with the API key as the value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: YOUR_API_KEY\" \\ ... ``` Alternatively, you can use the username and password to connect to the API using basic authentication. For example: ``` curl -U \"ws@MarketPlace.YOUR_PLATFORM_ACCOUNT\":\"YOUR_WS_PASSWORD\" \\ -H \"Content-Type: application/json\" \\ ... ``` When going live, you need to generate new web service user credentials to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning The Account API supports [versioning](https://docs.adyen.com/development-resources/versioning) using a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://cal-test.adyen.com/cal/services/Account/v6/createAccountHolder ``` + * + * The version of the OpenAPI document: 6 + * + * + * 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.marketpayaccount; + +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; + + +/** + * MigratedStores + */ +@JsonPropertyOrder({ + MigratedStores.JSON_PROPERTY_BUSINESS_LINE_ID, + MigratedStores.JSON_PROPERTY_STORE_CODE, + MigratedStores.JSON_PROPERTY_STORE_ID, + MigratedStores.JSON_PROPERTY_STORE_REFERENCE +}) + +public class MigratedStores { + public static final String JSON_PROPERTY_BUSINESS_LINE_ID = "businessLineId"; + private String businessLineId; + + public static final String JSON_PROPERTY_STORE_CODE = "storeCode"; + private String storeCode; + + public static final String JSON_PROPERTY_STORE_ID = "storeId"; + private String storeId; + + public static final String JSON_PROPERTY_STORE_REFERENCE = "storeReference"; + private String storeReference; + + public MigratedStores() { + } + + public MigratedStores businessLineId(String businessLineId) { + this.businessLineId = businessLineId; + return this; + } + + /** + * The unique identifier of the business line associated with the migrated account holder in the balance platform. + * @return businessLineId + **/ + @ApiModelProperty(value = "The unique identifier of the business line associated with the migrated account holder in the balance platform.") + @JsonProperty(JSON_PROPERTY_BUSINESS_LINE_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getBusinessLineId() { + return businessLineId; + } + + + @JsonProperty(JSON_PROPERTY_BUSINESS_LINE_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setBusinessLineId(String businessLineId) { + this.businessLineId = businessLineId; + } + + + public MigratedStores storeCode(String storeCode) { + this.storeCode = storeCode; + return this; + } + + /** + * The unique identifier of the store associated with the migrated account holder in the classic integration. + * @return storeCode + **/ + @ApiModelProperty(value = "The unique identifier of the store associated with the migrated account holder in the classic integration.") + @JsonProperty(JSON_PROPERTY_STORE_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getStoreCode() { + return storeCode; + } + + + @JsonProperty(JSON_PROPERTY_STORE_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setStoreCode(String storeCode) { + this.storeCode = storeCode; + } + + + public MigratedStores storeId(String storeId) { + this.storeId = storeId; + return this; + } + + /** + * The unique identifier of the store associated with the migrated account holder in the balance platform. + * @return storeId + **/ + @ApiModelProperty(value = "The unique identifier of the store associated with the migrated account holder in the balance platform.") + @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; + } + + + public MigratedStores storeReference(String storeReference) { + this.storeReference = storeReference; + return this; + } + + /** + * Your reference for the store in the classic integration. The [Customer Area](https://ca-test.adyen.com/) uses this value for the store description. + * @return storeReference + **/ + @ApiModelProperty(value = "Your reference for the store in the classic integration. The [Customer Area](https://ca-test.adyen.com/) uses this value for the store description.") + @JsonProperty(JSON_PROPERTY_STORE_REFERENCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getStoreReference() { + return storeReference; + } + + + @JsonProperty(JSON_PROPERTY_STORE_REFERENCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setStoreReference(String storeReference) { + this.storeReference = storeReference; + } + + + /** + * Return true if this MigratedStores object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + MigratedStores migratedStores = (MigratedStores) o; + return Objects.equals(this.businessLineId, migratedStores.businessLineId) && + Objects.equals(this.storeCode, migratedStores.storeCode) && + Objects.equals(this.storeId, migratedStores.storeId) && + Objects.equals(this.storeReference, migratedStores.storeReference); + } + + @Override + public int hashCode() { + return Objects.hash(businessLineId, storeCode, storeId, storeReference); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class MigratedStores {\n"); + sb.append(" businessLineId: ").append(toIndentedString(businessLineId)).append("\n"); + sb.append(" storeCode: ").append(toIndentedString(storeCode)).append("\n"); + sb.append(" storeId: ").append(toIndentedString(storeId)).append("\n"); + sb.append(" storeReference: ").append(toIndentedString(storeReference)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line 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 MigratedStores given an JSON string + * + * @param jsonString JSON string + * @return An instance of MigratedStores + * @throws JsonProcessingException if the JSON string is invalid with respect to MigratedStores + */ + public static MigratedStores fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, MigratedStores.class); + } +/** + * Convert an instance of MigratedStores 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/marketpayaccount/MigrationData.java b/src/main/java/com/adyen/model/marketpayaccount/MigrationData.java new file mode 100644 index 000000000..c5a1b0cbf --- /dev/null +++ b/src/main/java/com/adyen/model/marketpayaccount/MigrationData.java @@ -0,0 +1,345 @@ +/* + * Account API + * This API is used for the classic integration. If you are just starting your implementation, refer to our [new integration guide](https://docs.adyen.com/marketplaces-and-platforms) instead. The Account API provides endpoints for managing account-related entities on your platform. These related entities include account holders, accounts, bank accounts, shareholders, and verification-related documents. The management operations include actions such as creation, retrieval, updating, and deletion of them. For more information, refer to our [documentation](https://docs.adyen.com/marketplaces-and-platforms/classic). ## Authentication Your Adyen contact will provide your API credential and an API key. To connect to the API, add an `X-API-Key` header with the API key as the value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: YOUR_API_KEY\" \\ ... ``` Alternatively, you can use the username and password to connect to the API using basic authentication. For example: ``` curl -U \"ws@MarketPlace.YOUR_PLATFORM_ACCOUNT\":\"YOUR_WS_PASSWORD\" \\ -H \"Content-Type: application/json\" \\ ... ``` When going live, you need to generate new web service user credentials to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning The Account API supports [versioning](https://docs.adyen.com/development-resources/versioning) using a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://cal-test.adyen.com/cal/services/Account/v6/createAccountHolder ``` + * + * The version of the OpenAPI document: 6 + * + * + * 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.marketpayaccount; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.adyen.model.marketpayaccount.MigratedAccounts; +import com.adyen.model.marketpayaccount.MigratedShareholders; +import com.adyen.model.marketpayaccount.MigratedStores; +import com.fasterxml.jackson.annotation.JsonInclude; +import 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 java.util.ArrayList; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.core.JsonProcessingException; + + +/** + * MigrationData + */ +@JsonPropertyOrder({ + MigrationData.JSON_PROPERTY_ACCOUNT_HOLDER_ID, + MigrationData.JSON_PROPERTY_BALANCE_PLATFORM, + MigrationData.JSON_PROPERTY_MIGRATED, + MigrationData.JSON_PROPERTY_MIGRATED_ACCOUNTS, + MigrationData.JSON_PROPERTY_MIGRATED_SHAREHOLDERS, + MigrationData.JSON_PROPERTY_MIGRATED_STORES, + MigrationData.JSON_PROPERTY_MIGRATION_DATE +}) + +public class MigrationData { + public static final String JSON_PROPERTY_ACCOUNT_HOLDER_ID = "accountHolderId"; + private String accountHolderId; + + public static final String JSON_PROPERTY_BALANCE_PLATFORM = "balancePlatform"; + private String balancePlatform; + + public static final String JSON_PROPERTY_MIGRATED = "migrated"; + private Boolean migrated; + + public static final String JSON_PROPERTY_MIGRATED_ACCOUNTS = "migratedAccounts"; + private List migratedAccounts = null; + + public static final String JSON_PROPERTY_MIGRATED_SHAREHOLDERS = "migratedShareholders"; + private List migratedShareholders = null; + + public static final String JSON_PROPERTY_MIGRATED_STORES = "migratedStores"; + private List migratedStores = null; + + public static final String JSON_PROPERTY_MIGRATION_DATE = "migrationDate"; + private OffsetDateTime migrationDate; + + public MigrationData() { + } + + public MigrationData accountHolderId(String accountHolderId) { + this.accountHolderId = accountHolderId; + return this; + } + + /** + * The unique identifier of the account holder in the balance platform. + * @return accountHolderId + **/ + @ApiModelProperty(value = "The unique identifier of the account holder in the balance platform.") + @JsonProperty(JSON_PROPERTY_ACCOUNT_HOLDER_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getAccountHolderId() { + return accountHolderId; + } + + + @JsonProperty(JSON_PROPERTY_ACCOUNT_HOLDER_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAccountHolderId(String accountHolderId) { + this.accountHolderId = accountHolderId; + } + + + public MigrationData balancePlatform(String balancePlatform) { + this.balancePlatform = balancePlatform; + return this; + } + + /** + * The unique identifier of the balance platfrom to which the account holder was migrated. + * @return balancePlatform + **/ + @ApiModelProperty(value = "The unique identifier of the balance platfrom to which the account holder was migrated.") + @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 MigrationData migrated(Boolean migrated) { + this.migrated = migrated; + return this; + } + + /** + * Set to **true** if the account holder has been migrated. + * @return migrated + **/ + @ApiModelProperty(value = "Set to **true** if the account holder has been migrated.") + @JsonProperty(JSON_PROPERTY_MIGRATED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getMigrated() { + return migrated; + } + + + @JsonProperty(JSON_PROPERTY_MIGRATED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMigrated(Boolean migrated) { + this.migrated = migrated; + } + + + public MigrationData migratedAccounts(List migratedAccounts) { + this.migratedAccounts = migratedAccounts; + return this; + } + + public MigrationData addMigratedAccountsItem(MigratedAccounts migratedAccountsItem) { + if (this.migratedAccounts == null) { + this.migratedAccounts = new ArrayList<>(); + } + this.migratedAccounts.add(migratedAccountsItem); + return this; + } + + /** + * Contains the mapping of virtual account codes (classic integration) to the balance account codes (balance platform) associated with the migrated account holder. + * @return migratedAccounts + **/ + @ApiModelProperty(value = "Contains the mapping of virtual account codes (classic integration) to the balance account codes (balance platform) associated with the migrated account holder.") + @JsonProperty(JSON_PROPERTY_MIGRATED_ACCOUNTS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getMigratedAccounts() { + return migratedAccounts; + } + + + @JsonProperty(JSON_PROPERTY_MIGRATED_ACCOUNTS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMigratedAccounts(List migratedAccounts) { + this.migratedAccounts = migratedAccounts; + } + + + public MigrationData migratedShareholders(List migratedShareholders) { + this.migratedShareholders = migratedShareholders; + return this; + } + + public MigrationData addMigratedShareholdersItem(MigratedShareholders migratedShareholdersItem) { + if (this.migratedShareholders == null) { + this.migratedShareholders = new ArrayList<>(); + } + this.migratedShareholders.add(migratedShareholdersItem); + return this; + } + + /** + * Contains the mapping of shareholders associated with the migrated legal entities. + * @return migratedShareholders + **/ + @ApiModelProperty(value = "Contains the mapping of shareholders associated with the migrated legal entities.") + @JsonProperty(JSON_PROPERTY_MIGRATED_SHAREHOLDERS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getMigratedShareholders() { + return migratedShareholders; + } + + + @JsonProperty(JSON_PROPERTY_MIGRATED_SHAREHOLDERS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMigratedShareholders(List migratedShareholders) { + this.migratedShareholders = migratedShareholders; + } + + + public MigrationData migratedStores(List migratedStores) { + this.migratedStores = migratedStores; + return this; + } + + public MigrationData addMigratedStoresItem(MigratedStores migratedStoresItem) { + if (this.migratedStores == null) { + this.migratedStores = new ArrayList<>(); + } + this.migratedStores.add(migratedStoresItem); + return this; + } + + /** + * Contains the mapping of business lines and stores associated with the migrated account holder. + * @return migratedStores + **/ + @ApiModelProperty(value = "Contains the mapping of business lines and stores associated with the migrated account holder.") + @JsonProperty(JSON_PROPERTY_MIGRATED_STORES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getMigratedStores() { + return migratedStores; + } + + + @JsonProperty(JSON_PROPERTY_MIGRATED_STORES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMigratedStores(List migratedStores) { + this.migratedStores = migratedStores; + } + + + public MigrationData migrationDate(OffsetDateTime migrationDate) { + this.migrationDate = migrationDate; + return this; + } + + /** + * The date when account holder was migrated. + * @return migrationDate + **/ + @ApiModelProperty(value = "The date when account holder was migrated.") + @JsonProperty(JSON_PROPERTY_MIGRATION_DATE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public OffsetDateTime getMigrationDate() { + return migrationDate; + } + + + @JsonProperty(JSON_PROPERTY_MIGRATION_DATE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMigrationDate(OffsetDateTime migrationDate) { + this.migrationDate = migrationDate; + } + + + /** + * Return true if this MigrationData object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + MigrationData migrationData = (MigrationData) o; + return Objects.equals(this.accountHolderId, migrationData.accountHolderId) && + Objects.equals(this.balancePlatform, migrationData.balancePlatform) && + Objects.equals(this.migrated, migrationData.migrated) && + Objects.equals(this.migratedAccounts, migrationData.migratedAccounts) && + Objects.equals(this.migratedShareholders, migrationData.migratedShareholders) && + Objects.equals(this.migratedStores, migrationData.migratedStores) && + Objects.equals(this.migrationDate, migrationData.migrationDate); + } + + @Override + public int hashCode() { + return Objects.hash(accountHolderId, balancePlatform, migrated, migratedAccounts, migratedShareholders, migratedStores, migrationDate); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class MigrationData {\n"); + sb.append(" accountHolderId: ").append(toIndentedString(accountHolderId)).append("\n"); + sb.append(" balancePlatform: ").append(toIndentedString(balancePlatform)).append("\n"); + sb.append(" migrated: ").append(toIndentedString(migrated)).append("\n"); + sb.append(" migratedAccounts: ").append(toIndentedString(migratedAccounts)).append("\n"); + sb.append(" migratedShareholders: ").append(toIndentedString(migratedShareholders)).append("\n"); + sb.append(" migratedStores: ").append(toIndentedString(migratedStores)).append("\n"); + sb.append(" migrationDate: ").append(toIndentedString(migrationDate)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line 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 MigrationData given an JSON string + * + * @param jsonString JSON string + * @return An instance of MigrationData + * @throws JsonProcessingException if the JSON string is invalid with respect to MigrationData + */ + public static MigrationData fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, MigrationData.class); + } +/** + * Convert an instance of MigrationData 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/marketpayaccount/PayoutMethod.java b/src/main/java/com/adyen/model/marketpayaccount/PayoutMethod.java new file mode 100644 index 000000000..c7c02f3d4 --- /dev/null +++ b/src/main/java/com/adyen/model/marketpayaccount/PayoutMethod.java @@ -0,0 +1,253 @@ +/* + * Account API + * This API is used for the classic integration. If you are just starting your implementation, refer to our [new integration guide](https://docs.adyen.com/marketplaces-and-platforms) instead. The Account API provides endpoints for managing account-related entities on your platform. These related entities include account holders, accounts, bank accounts, shareholders, and verification-related documents. The management operations include actions such as creation, retrieval, updating, and deletion of them. For more information, refer to our [documentation](https://docs.adyen.com/marketplaces-and-platforms/classic). ## Authentication Your Adyen contact will provide your API credential and an API key. To connect to the API, add an `X-API-Key` header with the API key as the value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: YOUR_API_KEY\" \\ ... ``` Alternatively, you can use the username and password to connect to the API using basic authentication. For example: ``` curl -U \"ws@MarketPlace.YOUR_PLATFORM_ACCOUNT\":\"YOUR_WS_PASSWORD\" \\ -H \"Content-Type: application/json\" \\ ... ``` When going live, you need to generate new web service user credentials to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning The Account API supports [versioning](https://docs.adyen.com/development-resources/versioning) using a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://cal-test.adyen.com/cal/services/Account/v6/createAccountHolder ``` + * + * The version of the OpenAPI document: 6 + * + * + * 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.marketpayaccount; + +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; + + +/** + * PayoutMethod + */ +@JsonPropertyOrder({ + PayoutMethod.JSON_PROPERTY_MERCHANT_ACCOUNT, + PayoutMethod.JSON_PROPERTY_PAYOUT_METHOD_CODE, + PayoutMethod.JSON_PROPERTY_PAYOUT_METHOD_REFERENCE, + PayoutMethod.JSON_PROPERTY_RECURRING_DETAIL_REFERENCE, + PayoutMethod.JSON_PROPERTY_SHOPPER_REFERENCE +}) + +public class PayoutMethod { + public static final String JSON_PROPERTY_MERCHANT_ACCOUNT = "merchantAccount"; + private String merchantAccount; + + public static final String JSON_PROPERTY_PAYOUT_METHOD_CODE = "payoutMethodCode"; + private String payoutMethodCode; + + public static final String JSON_PROPERTY_PAYOUT_METHOD_REFERENCE = "payoutMethodReference"; + private String payoutMethodReference; + + public static final String JSON_PROPERTY_RECURRING_DETAIL_REFERENCE = "recurringDetailReference"; + private String recurringDetailReference; + + public static final String JSON_PROPERTY_SHOPPER_REFERENCE = "shopperReference"; + private String shopperReference; + + public PayoutMethod() { + } + + public PayoutMethod merchantAccount(String merchantAccount) { + this.merchantAccount = merchantAccount; + return this; + } + + /** + * The [`merchantAccount`](https://docs.adyen.com/api-explorer/#/CheckoutService/latest/post/payments__reqParam_merchantAccount) you used in the `/payments` request when you [saved the account holder's card details](https://docs.adyen.com/marketplaces-and-platforms/classic/payouts/manual-payout/payout-to-cards#check-and-store). + * @return merchantAccount + **/ + @ApiModelProperty(required = true, value = "The [`merchantAccount`](https://docs.adyen.com/api-explorer/#/CheckoutService/latest/post/payments__reqParam_merchantAccount) you used in the `/payments` request when you [saved the account holder's card details](https://docs.adyen.com/marketplaces-and-platforms/classic/payouts/manual-payout/payout-to-cards#check-and-store).") + @JsonProperty(JSON_PROPERTY_MERCHANT_ACCOUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getMerchantAccount() { + return merchantAccount; + } + + + @JsonProperty(JSON_PROPERTY_MERCHANT_ACCOUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMerchantAccount(String merchantAccount) { + this.merchantAccount = merchantAccount; + } + + + public PayoutMethod payoutMethodCode(String payoutMethodCode) { + this.payoutMethodCode = payoutMethodCode; + return this; + } + + /** + * Adyen-generated unique alphanumeric identifier (UUID) for the payout method, returned in the response when you create a payout method. Required when updating an existing payout method in an `/updateAccountHolder` request. + * @return payoutMethodCode + **/ + @ApiModelProperty(value = "Adyen-generated unique alphanumeric identifier (UUID) for the payout method, returned in the response when you create a payout method. Required when updating an existing payout method in an `/updateAccountHolder` request.") + @JsonProperty(JSON_PROPERTY_PAYOUT_METHOD_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getPayoutMethodCode() { + return payoutMethodCode; + } + + + @JsonProperty(JSON_PROPERTY_PAYOUT_METHOD_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPayoutMethodCode(String payoutMethodCode) { + this.payoutMethodCode = payoutMethodCode; + } + + + public PayoutMethod payoutMethodReference(String payoutMethodReference) { + this.payoutMethodReference = payoutMethodReference; + return this; + } + + /** + * Your reference for the payout method. + * @return payoutMethodReference + **/ + @ApiModelProperty(value = "Your reference for the payout method.") + @JsonProperty(JSON_PROPERTY_PAYOUT_METHOD_REFERENCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getPayoutMethodReference() { + return payoutMethodReference; + } + + + @JsonProperty(JSON_PROPERTY_PAYOUT_METHOD_REFERENCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPayoutMethodReference(String payoutMethodReference) { + this.payoutMethodReference = payoutMethodReference; + } + + + public PayoutMethod recurringDetailReference(String recurringDetailReference) { + this.recurringDetailReference = recurringDetailReference; + return this; + } + + /** + * The [`recurringDetailReference`](https://docs.adyen.com/api-explorer/#/CheckoutService/latest/post/payments__resParam_additionalData-ResponseAdditionalDataCommon-recurring-recurringDetailReference) returned in the `/payments` response when you [saved the account holder's card details](https://docs.adyen.com/marketplaces-and-platforms/classic/payouts/manual-payout/payout-to-cards#check-and-store). + * @return recurringDetailReference + **/ + @ApiModelProperty(required = true, value = "The [`recurringDetailReference`](https://docs.adyen.com/api-explorer/#/CheckoutService/latest/post/payments__resParam_additionalData-ResponseAdditionalDataCommon-recurring-recurringDetailReference) returned in the `/payments` response when you [saved the account holder's card details](https://docs.adyen.com/marketplaces-and-platforms/classic/payouts/manual-payout/payout-to-cards#check-and-store).") + @JsonProperty(JSON_PROPERTY_RECURRING_DETAIL_REFERENCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getRecurringDetailReference() { + return recurringDetailReference; + } + + + @JsonProperty(JSON_PROPERTY_RECURRING_DETAIL_REFERENCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setRecurringDetailReference(String recurringDetailReference) { + this.recurringDetailReference = recurringDetailReference; + } + + + public PayoutMethod shopperReference(String shopperReference) { + this.shopperReference = shopperReference; + return this; + } + + /** + * The [`shopperReference`](https://docs.adyen.com/api-explorer/#/CheckoutService/latest/post/payments__reqParam_shopperReference) you sent in the `/payments` request when you [saved the account holder's card details](https://docs.adyen.com/marketplaces-and-platforms/classic/payouts/manual-payout/payout-to-cards#check-and-store). + * @return shopperReference + **/ + @ApiModelProperty(required = true, value = "The [`shopperReference`](https://docs.adyen.com/api-explorer/#/CheckoutService/latest/post/payments__reqParam_shopperReference) you sent in the `/payments` request when you [saved the account holder's card details](https://docs.adyen.com/marketplaces-and-platforms/classic/payouts/manual-payout/payout-to-cards#check-and-store).") + @JsonProperty(JSON_PROPERTY_SHOPPER_REFERENCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getShopperReference() { + return shopperReference; + } + + + @JsonProperty(JSON_PROPERTY_SHOPPER_REFERENCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setShopperReference(String shopperReference) { + this.shopperReference = shopperReference; + } + + + /** + * Return true if this PayoutMethod object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PayoutMethod payoutMethod = (PayoutMethod) o; + return Objects.equals(this.merchantAccount, payoutMethod.merchantAccount) && + Objects.equals(this.payoutMethodCode, payoutMethod.payoutMethodCode) && + Objects.equals(this.payoutMethodReference, payoutMethod.payoutMethodReference) && + Objects.equals(this.recurringDetailReference, payoutMethod.recurringDetailReference) && + Objects.equals(this.shopperReference, payoutMethod.shopperReference); + } + + @Override + public int hashCode() { + return Objects.hash(merchantAccount, payoutMethodCode, payoutMethodReference, recurringDetailReference, shopperReference); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PayoutMethod {\n"); + sb.append(" merchantAccount: ").append(toIndentedString(merchantAccount)).append("\n"); + sb.append(" payoutMethodCode: ").append(toIndentedString(payoutMethodCode)).append("\n"); + sb.append(" payoutMethodReference: ").append(toIndentedString(payoutMethodReference)).append("\n"); + sb.append(" recurringDetailReference: ").append(toIndentedString(recurringDetailReference)).append("\n"); + sb.append(" shopperReference: ").append(toIndentedString(shopperReference)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line 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 PayoutMethod given an JSON string + * + * @param jsonString JSON string + * @return An instance of PayoutMethod + * @throws JsonProcessingException if the JSON string is invalid with respect to PayoutMethod + */ + public static PayoutMethod fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, PayoutMethod.class); + } +/** + * Convert an instance of PayoutMethod 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/marketpayaccount/PayoutScheduleResponse.java b/src/main/java/com/adyen/model/marketpayaccount/PayoutScheduleResponse.java new file mode 100644 index 000000000..258932f53 --- /dev/null +++ b/src/main/java/com/adyen/model/marketpayaccount/PayoutScheduleResponse.java @@ -0,0 +1,222 @@ +/* + * Account API + * This API is used for the classic integration. If you are just starting your implementation, refer to our [new integration guide](https://docs.adyen.com/marketplaces-and-platforms) instead. The Account API provides endpoints for managing account-related entities on your platform. These related entities include account holders, accounts, bank accounts, shareholders, and verification-related documents. The management operations include actions such as creation, retrieval, updating, and deletion of them. For more information, refer to our [documentation](https://docs.adyen.com/marketplaces-and-platforms/classic). ## Authentication Your Adyen contact will provide your API credential and an API key. To connect to the API, add an `X-API-Key` header with the API key as the value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: YOUR_API_KEY\" \\ ... ``` Alternatively, you can use the username and password to connect to the API using basic authentication. For example: ``` curl -U \"ws@MarketPlace.YOUR_PLATFORM_ACCOUNT\":\"YOUR_WS_PASSWORD\" \\ -H \"Content-Type: application/json\" \\ ... ``` When going live, you need to generate new web service user credentials to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning The Account API supports [versioning](https://docs.adyen.com/development-resources/versioning) using a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://cal-test.adyen.com/cal/services/Account/v6/createAccountHolder ``` + * + * The version of the OpenAPI document: 6 + * + * + * 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.marketpayaccount; + +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.time.OffsetDateTime; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.core.JsonProcessingException; + + +/** + * PayoutScheduleResponse + */ +@JsonPropertyOrder({ + PayoutScheduleResponse.JSON_PROPERTY_NEXT_SCHEDULED_PAYOUT, + PayoutScheduleResponse.JSON_PROPERTY_SCHEDULE +}) + +public class PayoutScheduleResponse { + public static final String JSON_PROPERTY_NEXT_SCHEDULED_PAYOUT = "nextScheduledPayout"; + private OffsetDateTime nextScheduledPayout; + + /** + * 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 { + BIWEEKLY_ON_1ST_AND_15TH_AT_MIDNIGHT("BIWEEKLY_ON_1ST_AND_15TH_AT_MIDNIGHT"), + + DAILY("DAILY"), + + DAILY_AU("DAILY_AU"), + + DAILY_EU("DAILY_EU"), + + DAILY_SG("DAILY_SG"), + + DAILY_US("DAILY_US"), + + HOLD("HOLD"), + + MONTHLY("MONTHLY"), + + WEEKLY("WEEKLY"), + + WEEKLY_MON_TO_FRI_AU("WEEKLY_MON_TO_FRI_AU"), + + WEEKLY_MON_TO_FRI_EU("WEEKLY_MON_TO_FRI_EU"), + + WEEKLY_MON_TO_FRI_US("WEEKLY_MON_TO_FRI_US"), + + WEEKLY_ON_TUE_FRI_MIDNIGHT("WEEKLY_ON_TUE_FRI_MIDNIGHT"), + + WEEKLY_SUN_TO_THU_AU("WEEKLY_SUN_TO_THU_AU"), + + WEEKLY_SUN_TO_THU_US("WEEKLY_SUN_TO_THU_US"); + + private String value; + + ScheduleEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static ScheduleEnum fromValue(String value) { + for (ScheduleEnum b : ScheduleEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_SCHEDULE = "schedule"; + private ScheduleEnum schedule; + + public PayoutScheduleResponse() { + } + + public PayoutScheduleResponse nextScheduledPayout(OffsetDateTime nextScheduledPayout) { + this.nextScheduledPayout = nextScheduledPayout; + return this; + } + + /** + * The date of the next scheduled payout. + * @return nextScheduledPayout + **/ + @ApiModelProperty(value = "The date of the next scheduled payout.") + @JsonProperty(JSON_PROPERTY_NEXT_SCHEDULED_PAYOUT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public OffsetDateTime getNextScheduledPayout() { + return nextScheduledPayout; + } + + + @JsonProperty(JSON_PROPERTY_NEXT_SCHEDULED_PAYOUT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setNextScheduledPayout(OffsetDateTime nextScheduledPayout) { + this.nextScheduledPayout = nextScheduledPayout; + } + + + public PayoutScheduleResponse schedule(ScheduleEnum schedule) { + this.schedule = schedule; + return this; + } + + /** + * 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`. + * @return schedule + **/ + @ApiModelProperty(value = "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`.") + @JsonProperty(JSON_PROPERTY_SCHEDULE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public ScheduleEnum getSchedule() { + return schedule; + } + + + @JsonProperty(JSON_PROPERTY_SCHEDULE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSchedule(ScheduleEnum schedule) { + this.schedule = schedule; + } + + + /** + * Return true if this PayoutScheduleResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PayoutScheduleResponse payoutScheduleResponse = (PayoutScheduleResponse) o; + return Objects.equals(this.nextScheduledPayout, payoutScheduleResponse.nextScheduledPayout) && + Objects.equals(this.schedule, payoutScheduleResponse.schedule); + } + + @Override + public int hashCode() { + return Objects.hash(nextScheduledPayout, schedule); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PayoutScheduleResponse {\n"); + sb.append(" nextScheduledPayout: ").append(toIndentedString(nextScheduledPayout)).append("\n"); + sb.append(" schedule: ").append(toIndentedString(schedule)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +/** + * Create an instance of PayoutScheduleResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of PayoutScheduleResponse + * @throws JsonProcessingException if the JSON string is invalid with respect to PayoutScheduleResponse + */ + public static PayoutScheduleResponse fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, PayoutScheduleResponse.class); + } +/** + * Convert an instance of PayoutScheduleResponse 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/marketpayaccount/PerformVerificationRequest.java b/src/main/java/com/adyen/model/marketpayaccount/PerformVerificationRequest.java new file mode 100644 index 000000000..c2299adf4 --- /dev/null +++ b/src/main/java/com/adyen/model/marketpayaccount/PerformVerificationRequest.java @@ -0,0 +1,234 @@ +/* + * Account API + * This API is used for the classic integration. If you are just starting your implementation, refer to our [new integration guide](https://docs.adyen.com/marketplaces-and-platforms) instead. The Account API provides endpoints for managing account-related entities on your platform. These related entities include account holders, accounts, bank accounts, shareholders, and verification-related documents. The management operations include actions such as creation, retrieval, updating, and deletion of them. For more information, refer to our [documentation](https://docs.adyen.com/marketplaces-and-platforms/classic). ## Authentication Your Adyen contact will provide your API credential and an API key. To connect to the API, add an `X-API-Key` header with the API key as the value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: YOUR_API_KEY\" \\ ... ``` Alternatively, you can use the username and password to connect to the API using basic authentication. For example: ``` curl -U \"ws@MarketPlace.YOUR_PLATFORM_ACCOUNT\":\"YOUR_WS_PASSWORD\" \\ -H \"Content-Type: application/json\" \\ ... ``` When going live, you need to generate new web service user credentials to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning The Account API supports [versioning](https://docs.adyen.com/development-resources/versioning) using a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://cal-test.adyen.com/cal/services/Account/v6/createAccountHolder ``` + * + * The version of the OpenAPI document: 6 + * + * + * 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.marketpayaccount; + +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; + + +/** + * PerformVerificationRequest + */ +@JsonPropertyOrder({ + PerformVerificationRequest.JSON_PROPERTY_ACCOUNT_HOLDER_CODE, + PerformVerificationRequest.JSON_PROPERTY_ACCOUNT_STATE_TYPE, + PerformVerificationRequest.JSON_PROPERTY_TIER +}) + +public class PerformVerificationRequest { + public static final String JSON_PROPERTY_ACCOUNT_HOLDER_CODE = "accountHolderCode"; + private String accountHolderCode; + + /** + * The state required for the account holder. > Permitted values: `Processing`, `Payout`. + */ + public enum AccountStateTypeEnum { + LIMITEDPAYOUT("LimitedPayout"), + + LIMITEDPROCESSING("LimitedProcessing"), + + LIMITLESSPAYOUT("LimitlessPayout"), + + LIMITLESSPROCESSING("LimitlessProcessing"), + + PAYOUT("Payout"), + + PROCESSING("Processing"); + + private String value; + + AccountStateTypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static AccountStateTypeEnum fromValue(String value) { + for (AccountStateTypeEnum b : AccountStateTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_ACCOUNT_STATE_TYPE = "accountStateType"; + private AccountStateTypeEnum accountStateType; + + public static final String JSON_PROPERTY_TIER = "tier"; + private Integer tier; + + public PerformVerificationRequest() { + } + + public PerformVerificationRequest accountHolderCode(String accountHolderCode) { + this.accountHolderCode = accountHolderCode; + return this; + } + + /** + * The code of the account holder to verify. + * @return accountHolderCode + **/ + @ApiModelProperty(required = true, value = "The code of the account holder to verify.") + @JsonProperty(JSON_PROPERTY_ACCOUNT_HOLDER_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getAccountHolderCode() { + return accountHolderCode; + } + + + @JsonProperty(JSON_PROPERTY_ACCOUNT_HOLDER_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAccountHolderCode(String accountHolderCode) { + this.accountHolderCode = accountHolderCode; + } + + + public PerformVerificationRequest accountStateType(AccountStateTypeEnum accountStateType) { + this.accountStateType = accountStateType; + return this; + } + + /** + * The state required for the account holder. > Permitted values: `Processing`, `Payout`. + * @return accountStateType + **/ + @ApiModelProperty(required = true, value = "The state required for the account holder. > Permitted values: `Processing`, `Payout`.") + @JsonProperty(JSON_PROPERTY_ACCOUNT_STATE_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public AccountStateTypeEnum getAccountStateType() { + return accountStateType; + } + + + @JsonProperty(JSON_PROPERTY_ACCOUNT_STATE_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAccountStateType(AccountStateTypeEnum accountStateType) { + this.accountStateType = accountStateType; + } + + + public PerformVerificationRequest tier(Integer tier) { + this.tier = tier; + return this; + } + + /** + * The tier required for the account holder. + * @return tier + **/ + @ApiModelProperty(required = true, value = "The tier required for the account holder.") + @JsonProperty(JSON_PROPERTY_TIER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Integer getTier() { + return tier; + } + + + @JsonProperty(JSON_PROPERTY_TIER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTier(Integer tier) { + this.tier = tier; + } + + + /** + * Return true if this PerformVerificationRequest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PerformVerificationRequest performVerificationRequest = (PerformVerificationRequest) o; + return Objects.equals(this.accountHolderCode, performVerificationRequest.accountHolderCode) && + Objects.equals(this.accountStateType, performVerificationRequest.accountStateType) && + Objects.equals(this.tier, performVerificationRequest.tier); + } + + @Override + public int hashCode() { + return Objects.hash(accountHolderCode, accountStateType, tier); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PerformVerificationRequest {\n"); + sb.append(" accountHolderCode: ").append(toIndentedString(accountHolderCode)).append("\n"); + sb.append(" accountStateType: ").append(toIndentedString(accountStateType)).append("\n"); + sb.append(" tier: ").append(toIndentedString(tier)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line 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 PerformVerificationRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of PerformVerificationRequest + * @throws JsonProcessingException if the JSON string is invalid with respect to PerformVerificationRequest + */ + public static PerformVerificationRequest fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, PerformVerificationRequest.class); + } +/** + * Convert an instance of PerformVerificationRequest 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/marketpayaccount/PersonalDocumentData.java b/src/main/java/com/adyen/model/marketpayaccount/PersonalDocumentData.java new file mode 100644 index 000000000..1680d49be --- /dev/null +++ b/src/main/java/com/adyen/model/marketpayaccount/PersonalDocumentData.java @@ -0,0 +1,294 @@ +/* + * Account API + * This API is used for the classic integration. If you are just starting your implementation, refer to our [new integration guide](https://docs.adyen.com/marketplaces-and-platforms) instead. The Account API provides endpoints for managing account-related entities on your platform. These related entities include account holders, accounts, bank accounts, shareholders, and verification-related documents. The management operations include actions such as creation, retrieval, updating, and deletion of them. For more information, refer to our [documentation](https://docs.adyen.com/marketplaces-and-platforms/classic). ## Authentication Your Adyen contact will provide your API credential and an API key. To connect to the API, add an `X-API-Key` header with the API key as the value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: YOUR_API_KEY\" \\ ... ``` Alternatively, you can use the username and password to connect to the API using basic authentication. For example: ``` curl -U \"ws@MarketPlace.YOUR_PLATFORM_ACCOUNT\":\"YOUR_WS_PASSWORD\" \\ -H \"Content-Type: application/json\" \\ ... ``` When going live, you need to generate new web service user credentials to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning The Account API supports [versioning](https://docs.adyen.com/development-resources/versioning) using a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://cal-test.adyen.com/cal/services/Account/v6/createAccountHolder ``` + * + * The version of the OpenAPI document: 6 + * + * + * 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.marketpayaccount; + +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; + + +/** + * PersonalDocumentData + */ +@JsonPropertyOrder({ + PersonalDocumentData.JSON_PROPERTY_EXPIRATION_DATE, + PersonalDocumentData.JSON_PROPERTY_ISSUER_COUNTRY, + PersonalDocumentData.JSON_PROPERTY_ISSUER_STATE, + PersonalDocumentData.JSON_PROPERTY_NUMBER, + PersonalDocumentData.JSON_PROPERTY_TYPE +}) + +public class PersonalDocumentData { + public static final String JSON_PROPERTY_EXPIRATION_DATE = "expirationDate"; + private String expirationDate; + + public static final String JSON_PROPERTY_ISSUER_COUNTRY = "issuerCountry"; + private String issuerCountry; + + public static final String JSON_PROPERTY_ISSUER_STATE = "issuerState"; + private String issuerState; + + public static final String JSON_PROPERTY_NUMBER = "number"; + private String number; + + /** + * The type of the document. Possible values: **ID**, **DRIVINGLICENSE**, **PASSPORT**, **SOCIALSECURITY**, **VISA**. To delete an existing entry for a document `type`, send only the `type` field in your request. + */ + public enum TypeEnum { + DRIVINGLICENSE("DRIVINGLICENSE"), + + ID("ID"), + + PASSPORT("PASSPORT"), + + SOCIALSECURITY("SOCIALSECURITY"), + + VISA("VISA"); + + 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 PersonalDocumentData() { + } + + public PersonalDocumentData expirationDate(String expirationDate) { + this.expirationDate = expirationDate; + return this; + } + + /** + * The expiry date of the document, in ISO-8601 YYYY-MM-DD format. For example, **2000-01-31**. + * @return expirationDate + **/ + @ApiModelProperty(value = "The expiry date of the document, in ISO-8601 YYYY-MM-DD format. For example, **2000-01-31**.") + @JsonProperty(JSON_PROPERTY_EXPIRATION_DATE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getExpirationDate() { + return expirationDate; + } + + + @JsonProperty(JSON_PROPERTY_EXPIRATION_DATE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setExpirationDate(String expirationDate) { + this.expirationDate = expirationDate; + } + + + public PersonalDocumentData issuerCountry(String issuerCountry) { + this.issuerCountry = issuerCountry; + return this; + } + + /** + * The country where the document was issued, in the two-character [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format. For example, **NL**. + * @return issuerCountry + **/ + @ApiModelProperty(value = "The country where the document was issued, in the two-character [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format. For example, **NL**.") + @JsonProperty(JSON_PROPERTY_ISSUER_COUNTRY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getIssuerCountry() { + return issuerCountry; + } + + + @JsonProperty(JSON_PROPERTY_ISSUER_COUNTRY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setIssuerCountry(String issuerCountry) { + this.issuerCountry = issuerCountry; + } + + + public PersonalDocumentData issuerState(String issuerState) { + this.issuerState = issuerState; + return this; + } + + /** + * The state where the document was issued (if applicable). + * @return issuerState + **/ + @ApiModelProperty(value = "The state where the document was issued (if applicable).") + @JsonProperty(JSON_PROPERTY_ISSUER_STATE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getIssuerState() { + return issuerState; + } + + + @JsonProperty(JSON_PROPERTY_ISSUER_STATE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setIssuerState(String issuerState) { + this.issuerState = issuerState; + } + + + public PersonalDocumentData number(String number) { + this.number = number; + return this; + } + + /** + * The number in the document. + * @return number + **/ + @ApiModelProperty(value = "The number in the document.") + @JsonProperty(JSON_PROPERTY_NUMBER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getNumber() { + return number; + } + + + @JsonProperty(JSON_PROPERTY_NUMBER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setNumber(String number) { + this.number = number; + } + + + public PersonalDocumentData type(TypeEnum type) { + this.type = type; + return this; + } + + /** + * The type of the document. Possible values: **ID**, **DRIVINGLICENSE**, **PASSPORT**, **SOCIALSECURITY**, **VISA**. To delete an existing entry for a document `type`, send only the `type` field in your request. + * @return type + **/ + @ApiModelProperty(required = true, value = "The type of the document. Possible values: **ID**, **DRIVINGLICENSE**, **PASSPORT**, **SOCIALSECURITY**, **VISA**. To delete an existing entry for a document `type`, send only the `type` field in your request. ") + @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 PersonalDocumentData object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PersonalDocumentData personalDocumentData = (PersonalDocumentData) o; + return Objects.equals(this.expirationDate, personalDocumentData.expirationDate) && + Objects.equals(this.issuerCountry, personalDocumentData.issuerCountry) && + Objects.equals(this.issuerState, personalDocumentData.issuerState) && + Objects.equals(this.number, personalDocumentData.number) && + Objects.equals(this.type, personalDocumentData.type); + } + + @Override + public int hashCode() { + return Objects.hash(expirationDate, issuerCountry, issuerState, number, type); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PersonalDocumentData {\n"); + sb.append(" expirationDate: ").append(toIndentedString(expirationDate)).append("\n"); + sb.append(" issuerCountry: ").append(toIndentedString(issuerCountry)).append("\n"); + sb.append(" issuerState: ").append(toIndentedString(issuerState)).append("\n"); + sb.append(" number: ").append(toIndentedString(number)).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 PersonalDocumentData given an JSON string + * + * @param jsonString JSON string + * @return An instance of PersonalDocumentData + * @throws JsonProcessingException if the JSON string is invalid with respect to PersonalDocumentData + */ + public static PersonalDocumentData fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, PersonalDocumentData.class); + } +/** + * Convert an instance of PersonalDocumentData 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/marketpayaccount/ServiceError.java b/src/main/java/com/adyen/model/marketpayaccount/ServiceError.java new file mode 100644 index 000000000..da0c91f02 --- /dev/null +++ b/src/main/java/com/adyen/model/marketpayaccount/ServiceError.java @@ -0,0 +1,253 @@ +/* + * Account API + * This API is used for the classic integration. If you are just starting your implementation, refer to our [new integration guide](https://docs.adyen.com/marketplaces-and-platforms) instead. The Account API provides endpoints for managing account-related entities on your platform. These related entities include account holders, accounts, bank accounts, shareholders, and verification-related documents. The management operations include actions such as creation, retrieval, updating, and deletion of them. For more information, refer to our [documentation](https://docs.adyen.com/marketplaces-and-platforms/classic). ## Authentication Your Adyen contact will provide your API credential and an API key. To connect to the API, add an `X-API-Key` header with the API key as the value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: YOUR_API_KEY\" \\ ... ``` Alternatively, you can use the username and password to connect to the API using basic authentication. For example: ``` curl -U \"ws@MarketPlace.YOUR_PLATFORM_ACCOUNT\":\"YOUR_WS_PASSWORD\" \\ -H \"Content-Type: application/json\" \\ ... ``` When going live, you need to generate new web service user credentials to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning The Account API supports [versioning](https://docs.adyen.com/development-resources/versioning) using a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://cal-test.adyen.com/cal/services/Account/v6/createAccountHolder ``` + * + * The version of the OpenAPI document: 6 + * + * + * 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.marketpayaccount; + +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; + + +/** + * ServiceError + */ +@JsonPropertyOrder({ + ServiceError.JSON_PROPERTY_ERROR_CODE, + ServiceError.JSON_PROPERTY_ERROR_TYPE, + ServiceError.JSON_PROPERTY_MESSAGE, + ServiceError.JSON_PROPERTY_PSP_REFERENCE, + ServiceError.JSON_PROPERTY_STATUS +}) + +public class ServiceError { + public static final String JSON_PROPERTY_ERROR_CODE = "errorCode"; + private String errorCode; + + public static final String JSON_PROPERTY_ERROR_TYPE = "errorType"; + private String errorType; + + public static final String JSON_PROPERTY_MESSAGE = "message"; + private String message; + + public static final String JSON_PROPERTY_PSP_REFERENCE = "pspReference"; + private String pspReference; + + public static final String JSON_PROPERTY_STATUS = "status"; + private Integer status; + + public ServiceError() { + } + + public ServiceError errorCode(String errorCode) { + this.errorCode = errorCode; + return this; + } + + /** + * The error code mapped to the error message. + * @return errorCode + **/ + @ApiModelProperty(value = "The error code mapped to the error message.") + @JsonProperty(JSON_PROPERTY_ERROR_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getErrorCode() { + return errorCode; + } + + + @JsonProperty(JSON_PROPERTY_ERROR_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setErrorCode(String errorCode) { + this.errorCode = errorCode; + } + + + public ServiceError errorType(String errorType) { + this.errorType = errorType; + return this; + } + + /** + * The category of the error. + * @return errorType + **/ + @ApiModelProperty(value = "The category of the error.") + @JsonProperty(JSON_PROPERTY_ERROR_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getErrorType() { + return errorType; + } + + + @JsonProperty(JSON_PROPERTY_ERROR_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setErrorType(String errorType) { + this.errorType = errorType; + } + + + public ServiceError message(String message) { + this.message = message; + return this; + } + + /** + * A short explanation of the issue. + * @return message + **/ + @ApiModelProperty(value = "A short explanation of the issue.") + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getMessage() { + return message; + } + + + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMessage(String message) { + this.message = message; + } + + + public ServiceError pspReference(String pspReference) { + this.pspReference = pspReference; + return this; + } + + /** + * The PSP reference of the payment. + * @return pspReference + **/ + @ApiModelProperty(value = "The PSP reference of the payment.") + @JsonProperty(JSON_PROPERTY_PSP_REFERENCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getPspReference() { + return pspReference; + } + + + @JsonProperty(JSON_PROPERTY_PSP_REFERENCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPspReference(String pspReference) { + this.pspReference = pspReference; + } + + + public ServiceError status(Integer status) { + this.status = status; + return this; + } + + /** + * The HTTP response status. + * @return status + **/ + @ApiModelProperty(value = "The HTTP response status.") + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Integer getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setStatus(Integer status) { + this.status = status; + } + + + /** + * Return true if this ServiceError object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ServiceError serviceError = (ServiceError) o; + return Objects.equals(this.errorCode, serviceError.errorCode) && + Objects.equals(this.errorType, serviceError.errorType) && + Objects.equals(this.message, serviceError.message) && + Objects.equals(this.pspReference, serviceError.pspReference) && + Objects.equals(this.status, serviceError.status); + } + + @Override + public int hashCode() { + return Objects.hash(errorCode, errorType, message, pspReference, status); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ServiceError {\n"); + sb.append(" errorCode: ").append(toIndentedString(errorCode)).append("\n"); + sb.append(" errorType: ").append(toIndentedString(errorType)).append("\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append(" pspReference: ").append(toIndentedString(pspReference)).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 ServiceError given an JSON string + * + * @param jsonString JSON string + * @return An instance of ServiceError + * @throws JsonProcessingException if the JSON string is invalid with respect to ServiceError + */ + public static ServiceError fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, ServiceError.class); + } +/** + * Convert an instance of ServiceError 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/marketpayaccount/ShareholderContact.java b/src/main/java/com/adyen/model/marketpayaccount/ShareholderContact.java new file mode 100644 index 000000000..a1d8ffda8 --- /dev/null +++ b/src/main/java/com/adyen/model/marketpayaccount/ShareholderContact.java @@ -0,0 +1,480 @@ +/* + * Account API + * This API is used for the classic integration. If you are just starting your implementation, refer to our [new integration guide](https://docs.adyen.com/marketplaces-and-platforms) instead. The Account API provides endpoints for managing account-related entities on your platform. These related entities include account holders, accounts, bank accounts, shareholders, and verification-related documents. The management operations include actions such as creation, retrieval, updating, and deletion of them. For more information, refer to our [documentation](https://docs.adyen.com/marketplaces-and-platforms/classic). ## Authentication Your Adyen contact will provide your API credential and an API key. To connect to the API, add an `X-API-Key` header with the API key as the value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: YOUR_API_KEY\" \\ ... ``` Alternatively, you can use the username and password to connect to the API using basic authentication. For example: ``` curl -U \"ws@MarketPlace.YOUR_PLATFORM_ACCOUNT\":\"YOUR_WS_PASSWORD\" \\ -H \"Content-Type: application/json\" \\ ... ``` When going live, you need to generate new web service user credentials to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning The Account API supports [versioning](https://docs.adyen.com/development-resources/versioning) using a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://cal-test.adyen.com/cal/services/Account/v6/createAccountHolder ``` + * + * The version of the OpenAPI document: 6 + * + * + * 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.marketpayaccount; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.adyen.model.marketpayaccount.ViasAddress; +import com.adyen.model.marketpayaccount.ViasName; +import com.adyen.model.marketpayaccount.ViasPersonalData; +import com.adyen.model.marketpayaccount.ViasPhoneNumber; +import com.fasterxml.jackson.annotation.JsonInclude; +import 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; + + +/** + * ShareholderContact + */ +@JsonPropertyOrder({ + ShareholderContact.JSON_PROPERTY_ADDRESS, + ShareholderContact.JSON_PROPERTY_EMAIL, + ShareholderContact.JSON_PROPERTY_FULL_PHONE_NUMBER, + ShareholderContact.JSON_PROPERTY_JOB_TITLE, + ShareholderContact.JSON_PROPERTY_NAME, + ShareholderContact.JSON_PROPERTY_PERSONAL_DATA, + ShareholderContact.JSON_PROPERTY_PHONE_NUMBER, + ShareholderContact.JSON_PROPERTY_SHAREHOLDER_CODE, + ShareholderContact.JSON_PROPERTY_SHAREHOLDER_REFERENCE, + ShareholderContact.JSON_PROPERTY_SHAREHOLDER_TYPE, + ShareholderContact.JSON_PROPERTY_WEB_ADDRESS +}) + +public class ShareholderContact { + public static final String JSON_PROPERTY_ADDRESS = "address"; + private ViasAddress address; + + public static final String JSON_PROPERTY_EMAIL = "email"; + private String email; + + public static final String JSON_PROPERTY_FULL_PHONE_NUMBER = "fullPhoneNumber"; + private String fullPhoneNumber; + + public static final String JSON_PROPERTY_JOB_TITLE = "jobTitle"; + private String jobTitle; + + public static final String JSON_PROPERTY_NAME = "name"; + private ViasName name; + + public static final String JSON_PROPERTY_PERSONAL_DATA = "personalData"; + private ViasPersonalData personalData; + + public static final String JSON_PROPERTY_PHONE_NUMBER = "phoneNumber"; + private ViasPhoneNumber phoneNumber; + + public static final String JSON_PROPERTY_SHAREHOLDER_CODE = "shareholderCode"; + private String shareholderCode; + + public static final String JSON_PROPERTY_SHAREHOLDER_REFERENCE = "shareholderReference"; + private String shareholderReference; + + /** + * Specifies how the person is associated with the account holder. Possible values: * **Owner**: Individuals who directly or indirectly own 25% or more of a company. * **Controller**: Individuals who are members of senior management staff responsible for managing a company or organization. + */ + public enum ShareholderTypeEnum { + CONTROLLER("Controller"), + + OWNER("Owner"), + + SIGNATORY("Signatory"); + + private String value; + + ShareholderTypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static ShareholderTypeEnum fromValue(String value) { + for (ShareholderTypeEnum b : ShareholderTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_SHAREHOLDER_TYPE = "shareholderType"; + private ShareholderTypeEnum shareholderType; + + public static final String JSON_PROPERTY_WEB_ADDRESS = "webAddress"; + private String webAddress; + + public ShareholderContact() { + } + + public ShareholderContact address(ViasAddress address) { + this.address = address; + return this; + } + + /** + * Get address + * @return address + **/ + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_ADDRESS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public ViasAddress getAddress() { + return address; + } + + + @JsonProperty(JSON_PROPERTY_ADDRESS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAddress(ViasAddress address) { + this.address = address; + } + + + public ShareholderContact email(String email) { + this.email = email; + return this; + } + + /** + * The e-mail address of the person. + * @return email + **/ + @ApiModelProperty(value = "The e-mail address of the person.") + @JsonProperty(JSON_PROPERTY_EMAIL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getEmail() { + return email; + } + + + @JsonProperty(JSON_PROPERTY_EMAIL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEmail(String email) { + this.email = email; + } + + + public ShareholderContact fullPhoneNumber(String fullPhoneNumber) { + this.fullPhoneNumber = fullPhoneNumber; + return this; + } + + /** + * The phone number of the person provided as a single string. It will be handled as a landline phone. Examples: \"0031 6 11 22 33 44\", \"+316/1122-3344\", \"(0031) 611223344\" + * @return fullPhoneNumber + **/ + @ApiModelProperty(value = "The phone number of the person provided as a single string. It will be handled as a landline phone. Examples: \"0031 6 11 22 33 44\", \"+316/1122-3344\", \"(0031) 611223344\"") + @JsonProperty(JSON_PROPERTY_FULL_PHONE_NUMBER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getFullPhoneNumber() { + return fullPhoneNumber; + } + + + @JsonProperty(JSON_PROPERTY_FULL_PHONE_NUMBER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setFullPhoneNumber(String fullPhoneNumber) { + this.fullPhoneNumber = fullPhoneNumber; + } + + + public ShareholderContact jobTitle(String jobTitle) { + this.jobTitle = jobTitle; + return this; + } + + /** + * Job title of the person. Required when the `shareholderType` is **Controller**. Example values: **Chief Executive Officer**, **Chief Financial Officer**, **Chief Operating Officer**, **President**, **Vice President**, **Executive President**, **Managing Member**, **Partner**, **Treasurer**, **Director**, or **Other**. + * @return jobTitle + **/ + @ApiModelProperty(value = "Job title of the person. Required when the `shareholderType` is **Controller**. Example values: **Chief Executive Officer**, **Chief Financial Officer**, **Chief Operating Officer**, **President**, **Vice President**, **Executive President**, **Managing Member**, **Partner**, **Treasurer**, **Director**, or **Other**.") + @JsonProperty(JSON_PROPERTY_JOB_TITLE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getJobTitle() { + return jobTitle; + } + + + @JsonProperty(JSON_PROPERTY_JOB_TITLE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setJobTitle(String jobTitle) { + this.jobTitle = jobTitle; + } + + + public ShareholderContact name(ViasName name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + **/ + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public ViasName getName() { + return name; + } + + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setName(ViasName name) { + this.name = name; + } + + + public ShareholderContact personalData(ViasPersonalData personalData) { + this.personalData = personalData; + return this; + } + + /** + * Get personalData + * @return personalData + **/ + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_PERSONAL_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public ViasPersonalData getPersonalData() { + return personalData; + } + + + @JsonProperty(JSON_PROPERTY_PERSONAL_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPersonalData(ViasPersonalData personalData) { + this.personalData = personalData; + } + + + public ShareholderContact phoneNumber(ViasPhoneNumber phoneNumber) { + this.phoneNumber = phoneNumber; + return this; + } + + /** + * Get phoneNumber + * @return phoneNumber + **/ + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_PHONE_NUMBER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public ViasPhoneNumber getPhoneNumber() { + return phoneNumber; + } + + + @JsonProperty(JSON_PROPERTY_PHONE_NUMBER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPhoneNumber(ViasPhoneNumber phoneNumber) { + this.phoneNumber = phoneNumber; + } + + + public ShareholderContact shareholderCode(String shareholderCode) { + this.shareholderCode = shareholderCode; + return this; + } + + /** + * The unique identifier (UUID) of the shareholder entry. >**If, during an Account Holder create or update request, this field is left blank (but other fields provided), a new Shareholder will be created with a procedurally-generated UUID.** >**If, during an Account Holder create request, a UUID is provided, the creation of Account Holder will fail with a validation Error..** >**If, during an Account Holder update request, a UUID that is not correlated with an existing Shareholder is provided, the update of the Shareholder will fail.** >**If, during an Account Holder update request, a UUID that is correlated with an existing Shareholder is provided, the existing Shareholder will be updated.** + * @return shareholderCode + **/ + @ApiModelProperty(value = "The unique identifier (UUID) of the shareholder entry. >**If, during an Account Holder create or update request, this field is left blank (but other fields provided), a new Shareholder will be created with a procedurally-generated UUID.** >**If, during an Account Holder create request, a UUID is provided, the creation of Account Holder will fail with a validation Error..** >**If, during an Account Holder update request, a UUID that is not correlated with an existing Shareholder is provided, the update of the Shareholder will fail.** >**If, during an Account Holder update request, a UUID that is correlated with an existing Shareholder is provided, the existing Shareholder will be updated.** ") + @JsonProperty(JSON_PROPERTY_SHAREHOLDER_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getShareholderCode() { + return shareholderCode; + } + + + @JsonProperty(JSON_PROPERTY_SHAREHOLDER_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setShareholderCode(String shareholderCode) { + this.shareholderCode = shareholderCode; + } + + + public ShareholderContact shareholderReference(String shareholderReference) { + this.shareholderReference = shareholderReference; + return this; + } + + /** + * Your reference for the shareholder entry. + * @return shareholderReference + **/ + @ApiModelProperty(value = "Your reference for the shareholder entry.") + @JsonProperty(JSON_PROPERTY_SHAREHOLDER_REFERENCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getShareholderReference() { + return shareholderReference; + } + + + @JsonProperty(JSON_PROPERTY_SHAREHOLDER_REFERENCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setShareholderReference(String shareholderReference) { + this.shareholderReference = shareholderReference; + } + + + public ShareholderContact shareholderType(ShareholderTypeEnum shareholderType) { + this.shareholderType = shareholderType; + return this; + } + + /** + * Specifies how the person is associated with the account holder. Possible values: * **Owner**: Individuals who directly or indirectly own 25% or more of a company. * **Controller**: Individuals who are members of senior management staff responsible for managing a company or organization. + * @return shareholderType + **/ + @ApiModelProperty(value = "Specifies how the person is associated with the account holder. Possible values: * **Owner**: Individuals who directly or indirectly own 25% or more of a company. * **Controller**: Individuals who are members of senior management staff responsible for managing a company or organization.") + @JsonProperty(JSON_PROPERTY_SHAREHOLDER_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public ShareholderTypeEnum getShareholderType() { + return shareholderType; + } + + + @JsonProperty(JSON_PROPERTY_SHAREHOLDER_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setShareholderType(ShareholderTypeEnum shareholderType) { + this.shareholderType = shareholderType; + } + + + public ShareholderContact webAddress(String webAddress) { + this.webAddress = webAddress; + return this; + } + + /** + * The URL of the person's website. + * @return webAddress + **/ + @ApiModelProperty(value = "The URL of the person's website.") + @JsonProperty(JSON_PROPERTY_WEB_ADDRESS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getWebAddress() { + return webAddress; + } + + + @JsonProperty(JSON_PROPERTY_WEB_ADDRESS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setWebAddress(String webAddress) { + this.webAddress = webAddress; + } + + + /** + * Return true if this ShareholderContact object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ShareholderContact shareholderContact = (ShareholderContact) o; + return Objects.equals(this.address, shareholderContact.address) && + Objects.equals(this.email, shareholderContact.email) && + Objects.equals(this.fullPhoneNumber, shareholderContact.fullPhoneNumber) && + Objects.equals(this.jobTitle, shareholderContact.jobTitle) && + Objects.equals(this.name, shareholderContact.name) && + Objects.equals(this.personalData, shareholderContact.personalData) && + Objects.equals(this.phoneNumber, shareholderContact.phoneNumber) && + Objects.equals(this.shareholderCode, shareholderContact.shareholderCode) && + Objects.equals(this.shareholderReference, shareholderContact.shareholderReference) && + Objects.equals(this.shareholderType, shareholderContact.shareholderType) && + Objects.equals(this.webAddress, shareholderContact.webAddress); + } + + @Override + public int hashCode() { + return Objects.hash(address, email, fullPhoneNumber, jobTitle, name, personalData, phoneNumber, shareholderCode, shareholderReference, shareholderType, webAddress); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ShareholderContact {\n"); + sb.append(" address: ").append(toIndentedString(address)).append("\n"); + sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append(" fullPhoneNumber: ").append(toIndentedString(fullPhoneNumber)).append("\n"); + sb.append(" jobTitle: ").append(toIndentedString(jobTitle)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" personalData: ").append(toIndentedString(personalData)).append("\n"); + sb.append(" phoneNumber: ").append(toIndentedString(phoneNumber)).append("\n"); + sb.append(" shareholderCode: ").append(toIndentedString(shareholderCode)).append("\n"); + sb.append(" shareholderReference: ").append(toIndentedString(shareholderReference)).append("\n"); + sb.append(" shareholderType: ").append(toIndentedString(shareholderType)).append("\n"); + sb.append(" webAddress: ").append(toIndentedString(webAddress)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line 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 ShareholderContact given an JSON string + * + * @param jsonString JSON string + * @return An instance of ShareholderContact + * @throws JsonProcessingException if the JSON string is invalid with respect to ShareholderContact + */ + public static ShareholderContact fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, ShareholderContact.class); + } +/** + * Convert an instance of ShareholderContact 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/marketpayaccount/SignatoryContact.java b/src/main/java/com/adyen/model/marketpayaccount/SignatoryContact.java new file mode 100644 index 000000000..3bbc6b803 --- /dev/null +++ b/src/main/java/com/adyen/model/marketpayaccount/SignatoryContact.java @@ -0,0 +1,412 @@ +/* + * Account API + * This API is used for the classic integration. If you are just starting your implementation, refer to our [new integration guide](https://docs.adyen.com/marketplaces-and-platforms) instead. The Account API provides endpoints for managing account-related entities on your platform. These related entities include account holders, accounts, bank accounts, shareholders, and verification-related documents. The management operations include actions such as creation, retrieval, updating, and deletion of them. For more information, refer to our [documentation](https://docs.adyen.com/marketplaces-and-platforms/classic). ## Authentication Your Adyen contact will provide your API credential and an API key. To connect to the API, add an `X-API-Key` header with the API key as the value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: YOUR_API_KEY\" \\ ... ``` Alternatively, you can use the username and password to connect to the API using basic authentication. For example: ``` curl -U \"ws@MarketPlace.YOUR_PLATFORM_ACCOUNT\":\"YOUR_WS_PASSWORD\" \\ -H \"Content-Type: application/json\" \\ ... ``` When going live, you need to generate new web service user credentials to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning The Account API supports [versioning](https://docs.adyen.com/development-resources/versioning) using a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://cal-test.adyen.com/cal/services/Account/v6/createAccountHolder ``` + * + * The version of the OpenAPI document: 6 + * + * + * 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.marketpayaccount; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.adyen.model.marketpayaccount.ViasAddress; +import com.adyen.model.marketpayaccount.ViasName; +import com.adyen.model.marketpayaccount.ViasPersonalData; +import com.adyen.model.marketpayaccount.ViasPhoneNumber; +import com.fasterxml.jackson.annotation.JsonInclude; +import 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; + + +/** + * SignatoryContact + */ +@JsonPropertyOrder({ + SignatoryContact.JSON_PROPERTY_ADDRESS, + SignatoryContact.JSON_PROPERTY_EMAIL, + SignatoryContact.JSON_PROPERTY_FULL_PHONE_NUMBER, + SignatoryContact.JSON_PROPERTY_JOB_TITLE, + SignatoryContact.JSON_PROPERTY_NAME, + SignatoryContact.JSON_PROPERTY_PERSONAL_DATA, + SignatoryContact.JSON_PROPERTY_PHONE_NUMBER, + SignatoryContact.JSON_PROPERTY_SIGNATORY_CODE, + SignatoryContact.JSON_PROPERTY_SIGNATORY_REFERENCE, + SignatoryContact.JSON_PROPERTY_WEB_ADDRESS +}) + +public class SignatoryContact { + public static final String JSON_PROPERTY_ADDRESS = "address"; + private ViasAddress address; + + public static final String JSON_PROPERTY_EMAIL = "email"; + private String email; + + public static final String JSON_PROPERTY_FULL_PHONE_NUMBER = "fullPhoneNumber"; + private String fullPhoneNumber; + + public static final String JSON_PROPERTY_JOB_TITLE = "jobTitle"; + private String jobTitle; + + public static final String JSON_PROPERTY_NAME = "name"; + private ViasName name; + + public static final String JSON_PROPERTY_PERSONAL_DATA = "personalData"; + private ViasPersonalData personalData; + + public static final String JSON_PROPERTY_PHONE_NUMBER = "phoneNumber"; + private ViasPhoneNumber phoneNumber; + + public static final String JSON_PROPERTY_SIGNATORY_CODE = "signatoryCode"; + private String signatoryCode; + + public static final String JSON_PROPERTY_SIGNATORY_REFERENCE = "signatoryReference"; + private String signatoryReference; + + public static final String JSON_PROPERTY_WEB_ADDRESS = "webAddress"; + private String webAddress; + + public SignatoryContact() { + } + + public SignatoryContact address(ViasAddress address) { + this.address = address; + return this; + } + + /** + * Get address + * @return address + **/ + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_ADDRESS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public ViasAddress getAddress() { + return address; + } + + + @JsonProperty(JSON_PROPERTY_ADDRESS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAddress(ViasAddress address) { + this.address = address; + } + + + public SignatoryContact email(String email) { + this.email = email; + return this; + } + + /** + * The e-mail address of the person. + * @return email + **/ + @ApiModelProperty(value = "The e-mail address of the person.") + @JsonProperty(JSON_PROPERTY_EMAIL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getEmail() { + return email; + } + + + @JsonProperty(JSON_PROPERTY_EMAIL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEmail(String email) { + this.email = email; + } + + + public SignatoryContact fullPhoneNumber(String fullPhoneNumber) { + this.fullPhoneNumber = fullPhoneNumber; + return this; + } + + /** + * The phone number of the person provided as a single string. It will be handled as a landline phone. Examples: \"0031 6 11 22 33 44\", \"+316/1122-3344\", \"(0031) 611223344\" + * @return fullPhoneNumber + **/ + @ApiModelProperty(value = "The phone number of the person provided as a single string. It will be handled as a landline phone. Examples: \"0031 6 11 22 33 44\", \"+316/1122-3344\", \"(0031) 611223344\"") + @JsonProperty(JSON_PROPERTY_FULL_PHONE_NUMBER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getFullPhoneNumber() { + return fullPhoneNumber; + } + + + @JsonProperty(JSON_PROPERTY_FULL_PHONE_NUMBER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setFullPhoneNumber(String fullPhoneNumber) { + this.fullPhoneNumber = fullPhoneNumber; + } + + + public SignatoryContact jobTitle(String jobTitle) { + this.jobTitle = jobTitle; + return this; + } + + /** + * Job title of the signatory. Example values: **Chief Executive Officer**, **Chief Financial Officer**, **Chief Operating Officer**, **President**, **Vice President**, **Executive President**, **Managing Member**, **Partner**, **Treasurer**, **Director**, or **Other**. + * @return jobTitle + **/ + @ApiModelProperty(value = "Job title of the signatory. Example values: **Chief Executive Officer**, **Chief Financial Officer**, **Chief Operating Officer**, **President**, **Vice President**, **Executive President**, **Managing Member**, **Partner**, **Treasurer**, **Director**, or **Other**.") + @JsonProperty(JSON_PROPERTY_JOB_TITLE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getJobTitle() { + return jobTitle; + } + + + @JsonProperty(JSON_PROPERTY_JOB_TITLE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setJobTitle(String jobTitle) { + this.jobTitle = jobTitle; + } + + + public SignatoryContact name(ViasName name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + **/ + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public ViasName getName() { + return name; + } + + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setName(ViasName name) { + this.name = name; + } + + + public SignatoryContact personalData(ViasPersonalData personalData) { + this.personalData = personalData; + return this; + } + + /** + * Get personalData + * @return personalData + **/ + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_PERSONAL_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public ViasPersonalData getPersonalData() { + return personalData; + } + + + @JsonProperty(JSON_PROPERTY_PERSONAL_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPersonalData(ViasPersonalData personalData) { + this.personalData = personalData; + } + + + public SignatoryContact phoneNumber(ViasPhoneNumber phoneNumber) { + this.phoneNumber = phoneNumber; + return this; + } + + /** + * Get phoneNumber + * @return phoneNumber + **/ + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_PHONE_NUMBER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public ViasPhoneNumber getPhoneNumber() { + return phoneNumber; + } + + + @JsonProperty(JSON_PROPERTY_PHONE_NUMBER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPhoneNumber(ViasPhoneNumber phoneNumber) { + this.phoneNumber = phoneNumber; + } + + + public SignatoryContact signatoryCode(String signatoryCode) { + this.signatoryCode = signatoryCode; + return this; + } + + /** + * The unique identifier (UUID) of the signatory. >**If, during an Account Holder create or update request, this field is left blank (but other fields provided), a new Signatory will be created with a procedurally-generated UUID.** >**If, during an Account Holder create request, a UUID is provided, the creation of the Signatory will fail while the creation of the Account Holder will continue.** >**If, during an Account Holder update request, a UUID that is not correlated with an existing Signatory is provided, the update of the Signatory will fail.** >**If, during an Account Holder update request, a UUID that is correlated with an existing Signatory is provided, the existing Signatory will be updated.** + * @return signatoryCode + **/ + @ApiModelProperty(value = "The unique identifier (UUID) of the signatory. >**If, during an Account Holder create or update request, this field is left blank (but other fields provided), a new Signatory will be created with a procedurally-generated UUID.** >**If, during an Account Holder create request, a UUID is provided, the creation of the Signatory will fail while the creation of the Account Holder will continue.** >**If, during an Account Holder update request, a UUID that is not correlated with an existing Signatory is provided, the update of the Signatory will fail.** >**If, during an Account Holder update request, a UUID that is correlated with an existing Signatory is provided, the existing Signatory will be updated.** ") + @JsonProperty(JSON_PROPERTY_SIGNATORY_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getSignatoryCode() { + return signatoryCode; + } + + + @JsonProperty(JSON_PROPERTY_SIGNATORY_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSignatoryCode(String signatoryCode) { + this.signatoryCode = signatoryCode; + } + + + public SignatoryContact signatoryReference(String signatoryReference) { + this.signatoryReference = signatoryReference; + return this; + } + + /** + * Your reference for the signatory. + * @return signatoryReference + **/ + @ApiModelProperty(value = "Your reference for the signatory.") + @JsonProperty(JSON_PROPERTY_SIGNATORY_REFERENCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getSignatoryReference() { + return signatoryReference; + } + + + @JsonProperty(JSON_PROPERTY_SIGNATORY_REFERENCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSignatoryReference(String signatoryReference) { + this.signatoryReference = signatoryReference; + } + + + public SignatoryContact webAddress(String webAddress) { + this.webAddress = webAddress; + return this; + } + + /** + * The URL of the person's website. + * @return webAddress + **/ + @ApiModelProperty(value = "The URL of the person's website.") + @JsonProperty(JSON_PROPERTY_WEB_ADDRESS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getWebAddress() { + return webAddress; + } + + + @JsonProperty(JSON_PROPERTY_WEB_ADDRESS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setWebAddress(String webAddress) { + this.webAddress = webAddress; + } + + + /** + * Return true if this SignatoryContact object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SignatoryContact signatoryContact = (SignatoryContact) o; + return Objects.equals(this.address, signatoryContact.address) && + Objects.equals(this.email, signatoryContact.email) && + Objects.equals(this.fullPhoneNumber, signatoryContact.fullPhoneNumber) && + Objects.equals(this.jobTitle, signatoryContact.jobTitle) && + Objects.equals(this.name, signatoryContact.name) && + Objects.equals(this.personalData, signatoryContact.personalData) && + Objects.equals(this.phoneNumber, signatoryContact.phoneNumber) && + Objects.equals(this.signatoryCode, signatoryContact.signatoryCode) && + Objects.equals(this.signatoryReference, signatoryContact.signatoryReference) && + Objects.equals(this.webAddress, signatoryContact.webAddress); + } + + @Override + public int hashCode() { + return Objects.hash(address, email, fullPhoneNumber, jobTitle, name, personalData, phoneNumber, signatoryCode, signatoryReference, webAddress); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SignatoryContact {\n"); + sb.append(" address: ").append(toIndentedString(address)).append("\n"); + sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append(" fullPhoneNumber: ").append(toIndentedString(fullPhoneNumber)).append("\n"); + sb.append(" jobTitle: ").append(toIndentedString(jobTitle)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" personalData: ").append(toIndentedString(personalData)).append("\n"); + sb.append(" phoneNumber: ").append(toIndentedString(phoneNumber)).append("\n"); + sb.append(" signatoryCode: ").append(toIndentedString(signatoryCode)).append("\n"); + sb.append(" signatoryReference: ").append(toIndentedString(signatoryReference)).append("\n"); + sb.append(" webAddress: ").append(toIndentedString(webAddress)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line 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 SignatoryContact given an JSON string + * + * @param jsonString JSON string + * @return An instance of SignatoryContact + * @throws JsonProcessingException if the JSON string is invalid with respect to SignatoryContact + */ + public static SignatoryContact fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, SignatoryContact.class); + } +/** + * Convert an instance of SignatoryContact 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/marketpayaccount/StoreDetail.java b/src/main/java/com/adyen/model/marketpayaccount/StoreDetail.java new file mode 100644 index 000000000..92af4ddab --- /dev/null +++ b/src/main/java/com/adyen/model/marketpayaccount/StoreDetail.java @@ -0,0 +1,641 @@ +/* + * Account API + * This API is used for the classic integration. If you are just starting your implementation, refer to our [new integration guide](https://docs.adyen.com/marketplaces-and-platforms) instead. The Account API provides endpoints for managing account-related entities on your platform. These related entities include account holders, accounts, bank accounts, shareholders, and verification-related documents. The management operations include actions such as creation, retrieval, updating, and deletion of them. For more information, refer to our [documentation](https://docs.adyen.com/marketplaces-and-platforms/classic). ## Authentication Your Adyen contact will provide your API credential and an API key. To connect to the API, add an `X-API-Key` header with the API key as the value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: YOUR_API_KEY\" \\ ... ``` Alternatively, you can use the username and password to connect to the API using basic authentication. For example: ``` curl -U \"ws@MarketPlace.YOUR_PLATFORM_ACCOUNT\":\"YOUR_WS_PASSWORD\" \\ -H \"Content-Type: application/json\" \\ ... ``` When going live, you need to generate new web service user credentials to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning The Account API supports [versioning](https://docs.adyen.com/development-resources/versioning) using a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://cal-test.adyen.com/cal/services/Account/v6/createAccountHolder ``` + * + * The version of the OpenAPI document: 6 + * + * + * 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.marketpayaccount; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.adyen.model.marketpayaccount.ViasAddress; +import com.adyen.model.marketpayaccount.ViasPhoneNumber; +import com.fasterxml.jackson.annotation.JsonInclude; +import 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; + + +/** + * StoreDetail + */ +@JsonPropertyOrder({ + StoreDetail.JSON_PROPERTY_ADDRESS, + StoreDetail.JSON_PROPERTY_FULL_PHONE_NUMBER, + StoreDetail.JSON_PROPERTY_LOGO, + StoreDetail.JSON_PROPERTY_MERCHANT_ACCOUNT, + StoreDetail.JSON_PROPERTY_MERCHANT_CATEGORY_CODE, + StoreDetail.JSON_PROPERTY_MERCHANT_HOUSE_NUMBER, + StoreDetail.JSON_PROPERTY_PHONE_NUMBER, + StoreDetail.JSON_PROPERTY_SHOPPER_INTERACTION, + StoreDetail.JSON_PROPERTY_SPLIT_CONFIGURATION_U_U_I_D, + StoreDetail.JSON_PROPERTY_STATUS, + StoreDetail.JSON_PROPERTY_STORE, + StoreDetail.JSON_PROPERTY_STORE_NAME, + StoreDetail.JSON_PROPERTY_STORE_REFERENCE, + StoreDetail.JSON_PROPERTY_VIRTUAL_ACCOUNT, + StoreDetail.JSON_PROPERTY_WEB_ADDRESS +}) + +public class StoreDetail { + public static final String JSON_PROPERTY_ADDRESS = "address"; + private ViasAddress address; + + public static final String JSON_PROPERTY_FULL_PHONE_NUMBER = "fullPhoneNumber"; + private String fullPhoneNumber; + + public static final String JSON_PROPERTY_LOGO = "logo"; + private String logo; + + public static final String JSON_PROPERTY_MERCHANT_ACCOUNT = "merchantAccount"; + private String merchantAccount; + + public static final String JSON_PROPERTY_MERCHANT_CATEGORY_CODE = "merchantCategoryCode"; + private String merchantCategoryCode; + + public static final String JSON_PROPERTY_MERCHANT_HOUSE_NUMBER = "merchantHouseNumber"; + private String merchantHouseNumber; + + public static final String JSON_PROPERTY_PHONE_NUMBER = "phoneNumber"; + private ViasPhoneNumber phoneNumber; + + /** + * The sales channel. Possible values: **Ecommerce**, **POS**. + */ + public enum ShopperInteractionEnum { + ECOMMERCE("Ecommerce"), + + POS("POS"); + + private String value; + + ShopperInteractionEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static ShopperInteractionEnum fromValue(String value) { + for (ShopperInteractionEnum b : ShopperInteractionEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_SHOPPER_INTERACTION = "shopperInteraction"; + private ShopperInteractionEnum shopperInteraction; + + public static final String JSON_PROPERTY_SPLIT_CONFIGURATION_U_U_I_D = "splitConfigurationUUID"; + private String splitConfigurationUUID; + + /** + * The status of the store. Possible values: **Pending**, **Active**, **Inactive**, **InactiveWithModifications**, **Closed**. + */ + public enum StatusEnum { + ACTIVE("Active"), + + CLOSED("Closed"), + + INACTIVE("Inactive"), + + INACTIVEWITHMODIFICATIONS("InactiveWithModifications"), + + PENDING("Pending"); + + 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 = "store"; + private String store; + + public static final String JSON_PROPERTY_STORE_NAME = "storeName"; + private String storeName; + + public static final String JSON_PROPERTY_STORE_REFERENCE = "storeReference"; + private String storeReference; + + public static final String JSON_PROPERTY_VIRTUAL_ACCOUNT = "virtualAccount"; + private String virtualAccount; + + public static final String JSON_PROPERTY_WEB_ADDRESS = "webAddress"; + private String webAddress; + + public StoreDetail() { + } + + public StoreDetail address(ViasAddress address) { + this.address = address; + return this; + } + + /** + * Get address + * @return address + **/ + @ApiModelProperty(required = true, value = "") + @JsonProperty(JSON_PROPERTY_ADDRESS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public ViasAddress getAddress() { + return address; + } + + + @JsonProperty(JSON_PROPERTY_ADDRESS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAddress(ViasAddress address) { + this.address = address; + } + + + public StoreDetail fullPhoneNumber(String fullPhoneNumber) { + this.fullPhoneNumber = fullPhoneNumber; + return this; + } + + /** + * The phone number of the store provided as a single string. It will be handled as a landline phone. Examples: \"0031 6 11 22 33 44\", \"+316/1122-3344\", \"(0031) 611223344\" + * @return fullPhoneNumber + **/ + @ApiModelProperty(value = "The phone number of the store provided as a single string. It will be handled as a landline phone. Examples: \"0031 6 11 22 33 44\", \"+316/1122-3344\", \"(0031) 611223344\"") + @JsonProperty(JSON_PROPERTY_FULL_PHONE_NUMBER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getFullPhoneNumber() { + return fullPhoneNumber; + } + + + @JsonProperty(JSON_PROPERTY_FULL_PHONE_NUMBER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setFullPhoneNumber(String fullPhoneNumber) { + this.fullPhoneNumber = fullPhoneNumber; + } + + + public StoreDetail logo(String logo) { + this.logo = logo; + return this; + } + + /** + * Store logo for payment method setup. + * @return logo + **/ + @ApiModelProperty(value = "Store logo for payment method setup.") + @JsonProperty(JSON_PROPERTY_LOGO) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getLogo() { + return logo; + } + + + @JsonProperty(JSON_PROPERTY_LOGO) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setLogo(String logo) { + this.logo = logo; + } + + + public StoreDetail merchantAccount(String merchantAccount) { + this.merchantAccount = merchantAccount; + return this; + } + + /** + * The merchant account to which the store belongs. + * @return merchantAccount + **/ + @ApiModelProperty(required = true, value = "The merchant account to which the store belongs.") + @JsonProperty(JSON_PROPERTY_MERCHANT_ACCOUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getMerchantAccount() { + return merchantAccount; + } + + + @JsonProperty(JSON_PROPERTY_MERCHANT_ACCOUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMerchantAccount(String merchantAccount) { + this.merchantAccount = merchantAccount; + } + + + public StoreDetail merchantCategoryCode(String merchantCategoryCode) { + this.merchantCategoryCode = merchantCategoryCode; + return this; + } + + /** + * The merchant category code (MCC) that classifies the business of the account holder. + * @return merchantCategoryCode + **/ + @ApiModelProperty(required = true, value = "The merchant category code (MCC) that classifies the business of the account holder.") + @JsonProperty(JSON_PROPERTY_MERCHANT_CATEGORY_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getMerchantCategoryCode() { + return merchantCategoryCode; + } + + + @JsonProperty(JSON_PROPERTY_MERCHANT_CATEGORY_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMerchantCategoryCode(String merchantCategoryCode) { + this.merchantCategoryCode = merchantCategoryCode; + } + + + public StoreDetail merchantHouseNumber(String merchantHouseNumber) { + this.merchantHouseNumber = merchantHouseNumber; + return this; + } + + /** + * Merchant house number for payment method setup. + * @return merchantHouseNumber + **/ + @ApiModelProperty(value = "Merchant house number for payment method setup.") + @JsonProperty(JSON_PROPERTY_MERCHANT_HOUSE_NUMBER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getMerchantHouseNumber() { + return merchantHouseNumber; + } + + + @JsonProperty(JSON_PROPERTY_MERCHANT_HOUSE_NUMBER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMerchantHouseNumber(String merchantHouseNumber) { + this.merchantHouseNumber = merchantHouseNumber; + } + + + public StoreDetail phoneNumber(ViasPhoneNumber phoneNumber) { + this.phoneNumber = phoneNumber; + return this; + } + + /** + * Get phoneNumber + * @return phoneNumber + **/ + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_PHONE_NUMBER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public ViasPhoneNumber getPhoneNumber() { + return phoneNumber; + } + + + @JsonProperty(JSON_PROPERTY_PHONE_NUMBER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPhoneNumber(ViasPhoneNumber phoneNumber) { + this.phoneNumber = phoneNumber; + } + + + public StoreDetail shopperInteraction(ShopperInteractionEnum shopperInteraction) { + this.shopperInteraction = shopperInteraction; + return this; + } + + /** + * The sales channel. Possible values: **Ecommerce**, **POS**. + * @return shopperInteraction + **/ + @ApiModelProperty(value = "The sales channel. Possible values: **Ecommerce**, **POS**.") + @JsonProperty(JSON_PROPERTY_SHOPPER_INTERACTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public ShopperInteractionEnum getShopperInteraction() { + return shopperInteraction; + } + + + @JsonProperty(JSON_PROPERTY_SHOPPER_INTERACTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setShopperInteraction(ShopperInteractionEnum shopperInteraction) { + this.shopperInteraction = shopperInteraction; + } + + + public StoreDetail splitConfigurationUUID(String splitConfigurationUUID) { + this.splitConfigurationUUID = splitConfigurationUUID; + return this; + } + + /** + * The unique reference for the split configuration, returned when you configure splits in your Customer Area. When this is provided, the `virtualAccount` is also required. Adyen uses the configuration and the `virtualAccount` to split funds between accounts in your platform. + * @return splitConfigurationUUID + **/ + @ApiModelProperty(value = "The unique reference for the split configuration, returned when you configure splits in your Customer Area. When this is provided, the `virtualAccount` is also required. Adyen uses the configuration and the `virtualAccount` to split funds between accounts in your platform.") + @JsonProperty(JSON_PROPERTY_SPLIT_CONFIGURATION_U_U_I_D) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getSplitConfigurationUUID() { + return splitConfigurationUUID; + } + + + @JsonProperty(JSON_PROPERTY_SPLIT_CONFIGURATION_U_U_I_D) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSplitConfigurationUUID(String splitConfigurationUUID) { + this.splitConfigurationUUID = splitConfigurationUUID; + } + + + public StoreDetail status(StatusEnum status) { + this.status = status; + return this; + } + + /** + * The status of the store. Possible values: **Pending**, **Active**, **Inactive**, **InactiveWithModifications**, **Closed**. + * @return status + **/ + @ApiModelProperty(value = "The status of the store. Possible values: **Pending**, **Active**, **Inactive**, **InactiveWithModifications**, **Closed**.") + @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 StoreDetail store(String store) { + this.store = store; + return this; + } + + /** + * Adyen-generated unique alphanumeric identifier (UUID) for the store, returned in the response when you create a store. Required when updating an existing store in an `/updateAccountHolder` request. + * @return store + **/ + @ApiModelProperty(value = "Adyen-generated unique alphanumeric identifier (UUID) for the store, returned in the response when you create a store. Required when updating an existing store in an `/updateAccountHolder` request.") + @JsonProperty(JSON_PROPERTY_STORE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getStore() { + return store; + } + + + @JsonProperty(JSON_PROPERTY_STORE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setStore(String store) { + this.store = store; + } + + + public StoreDetail storeName(String storeName) { + this.storeName = storeName; + return this; + } + + /** + * The name of the account holder's store. This value is shown in shopper statements. * Length: Between 3 to 22 characters * The following characters are *not* supported: **:;}{$#@!|<>%^*+=\\\\** + * @return storeName + **/ + @ApiModelProperty(value = "The name of the account holder's store. This value is shown in shopper statements. * Length: Between 3 to 22 characters * The following characters are *not* supported: **:;}{$#@!|<>%^*+=\\\\**") + @JsonProperty(JSON_PROPERTY_STORE_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getStoreName() { + return storeName; + } + + + @JsonProperty(JSON_PROPERTY_STORE_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setStoreName(String storeName) { + this.storeName = storeName; + } + + + public StoreDetail storeReference(String storeReference) { + this.storeReference = storeReference; + return this; + } + + /** + * Your unique identifier for the store. The Customer Area also uses this value for the store description. * Length: Between 3 to 128 characters * The following characters are *not* supported: **:;}{$#@!|<>%^*+=\\\\** + * @return storeReference + **/ + @ApiModelProperty(value = "Your unique identifier for the store. The Customer Area also uses this value for the store description. * Length: Between 3 to 128 characters * The following characters are *not* supported: **:;}{$#@!|<>%^*+=\\\\**") + @JsonProperty(JSON_PROPERTY_STORE_REFERENCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getStoreReference() { + return storeReference; + } + + + @JsonProperty(JSON_PROPERTY_STORE_REFERENCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setStoreReference(String storeReference) { + this.storeReference = storeReference; + } + + + public StoreDetail virtualAccount(String virtualAccount) { + this.virtualAccount = virtualAccount; + return this; + } + + /** + * The account holder's `accountCode` where the split amount will be sent. Required when you provide the `splitConfigurationUUID`. + * @return virtualAccount + **/ + @ApiModelProperty(value = "The account holder's `accountCode` where the split amount will be sent. Required when you provide the `splitConfigurationUUID`.") + @JsonProperty(JSON_PROPERTY_VIRTUAL_ACCOUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getVirtualAccount() { + return virtualAccount; + } + + + @JsonProperty(JSON_PROPERTY_VIRTUAL_ACCOUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setVirtualAccount(String virtualAccount) { + this.virtualAccount = virtualAccount; + } + + + public StoreDetail webAddress(String webAddress) { + this.webAddress = webAddress; + return this; + } + + /** + * URL of the ecommerce store. + * @return webAddress + **/ + @ApiModelProperty(value = "URL of the ecommerce store.") + @JsonProperty(JSON_PROPERTY_WEB_ADDRESS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getWebAddress() { + return webAddress; + } + + + @JsonProperty(JSON_PROPERTY_WEB_ADDRESS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setWebAddress(String webAddress) { + this.webAddress = webAddress; + } + + + /** + * Return true if this StoreDetail object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + StoreDetail storeDetail = (StoreDetail) o; + return Objects.equals(this.address, storeDetail.address) && + Objects.equals(this.fullPhoneNumber, storeDetail.fullPhoneNumber) && + Objects.equals(this.logo, storeDetail.logo) && + Objects.equals(this.merchantAccount, storeDetail.merchantAccount) && + Objects.equals(this.merchantCategoryCode, storeDetail.merchantCategoryCode) && + Objects.equals(this.merchantHouseNumber, storeDetail.merchantHouseNumber) && + Objects.equals(this.phoneNumber, storeDetail.phoneNumber) && + Objects.equals(this.shopperInteraction, storeDetail.shopperInteraction) && + Objects.equals(this.splitConfigurationUUID, storeDetail.splitConfigurationUUID) && + Objects.equals(this.status, storeDetail.status) && + Objects.equals(this.store, storeDetail.store) && + Objects.equals(this.storeName, storeDetail.storeName) && + Objects.equals(this.storeReference, storeDetail.storeReference) && + Objects.equals(this.virtualAccount, storeDetail.virtualAccount) && + Objects.equals(this.webAddress, storeDetail.webAddress); + } + + @Override + public int hashCode() { + return Objects.hash(address, fullPhoneNumber, logo, merchantAccount, merchantCategoryCode, merchantHouseNumber, phoneNumber, shopperInteraction, splitConfigurationUUID, status, store, storeName, storeReference, virtualAccount, webAddress); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class StoreDetail {\n"); + sb.append(" address: ").append(toIndentedString(address)).append("\n"); + sb.append(" fullPhoneNumber: ").append(toIndentedString(fullPhoneNumber)).append("\n"); + sb.append(" logo: ").append(toIndentedString(logo)).append("\n"); + sb.append(" merchantAccount: ").append(toIndentedString(merchantAccount)).append("\n"); + sb.append(" merchantCategoryCode: ").append(toIndentedString(merchantCategoryCode)).append("\n"); + sb.append(" merchantHouseNumber: ").append(toIndentedString(merchantHouseNumber)).append("\n"); + sb.append(" phoneNumber: ").append(toIndentedString(phoneNumber)).append("\n"); + sb.append(" shopperInteraction: ").append(toIndentedString(shopperInteraction)).append("\n"); + sb.append(" splitConfigurationUUID: ").append(toIndentedString(splitConfigurationUUID)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" store: ").append(toIndentedString(store)).append("\n"); + sb.append(" storeName: ").append(toIndentedString(storeName)).append("\n"); + sb.append(" storeReference: ").append(toIndentedString(storeReference)).append("\n"); + sb.append(" virtualAccount: ").append(toIndentedString(virtualAccount)).append("\n"); + sb.append(" webAddress: ").append(toIndentedString(webAddress)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line 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 StoreDetail given an JSON string + * + * @param jsonString JSON string + * @return An instance of StoreDetail + * @throws JsonProcessingException if the JSON string is invalid with respect to StoreDetail + */ + public static StoreDetail fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, StoreDetail.class); + } +/** + * Convert an instance of StoreDetail 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/marketpayaccount/SuspendAccountHolderRequest.java b/src/main/java/com/adyen/model/marketpayaccount/SuspendAccountHolderRequest.java new file mode 100644 index 000000000..9cef79ad2 --- /dev/null +++ b/src/main/java/com/adyen/model/marketpayaccount/SuspendAccountHolderRequest.java @@ -0,0 +1,129 @@ +/* + * Account API + * This API is used for the classic integration. If you are just starting your implementation, refer to our [new integration guide](https://docs.adyen.com/marketplaces-and-platforms) instead. The Account API provides endpoints for managing account-related entities on your platform. These related entities include account holders, accounts, bank accounts, shareholders, and verification-related documents. The management operations include actions such as creation, retrieval, updating, and deletion of them. For more information, refer to our [documentation](https://docs.adyen.com/marketplaces-and-platforms/classic). ## Authentication Your Adyen contact will provide your API credential and an API key. To connect to the API, add an `X-API-Key` header with the API key as the value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: YOUR_API_KEY\" \\ ... ``` Alternatively, you can use the username and password to connect to the API using basic authentication. For example: ``` curl -U \"ws@MarketPlace.YOUR_PLATFORM_ACCOUNT\":\"YOUR_WS_PASSWORD\" \\ -H \"Content-Type: application/json\" \\ ... ``` When going live, you need to generate new web service user credentials to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning The Account API supports [versioning](https://docs.adyen.com/development-resources/versioning) using a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://cal-test.adyen.com/cal/services/Account/v6/createAccountHolder ``` + * + * The version of the OpenAPI document: 6 + * + * + * 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.marketpayaccount; + +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; + + +/** + * SuspendAccountHolderRequest + */ +@JsonPropertyOrder({ + SuspendAccountHolderRequest.JSON_PROPERTY_ACCOUNT_HOLDER_CODE +}) + +public class SuspendAccountHolderRequest { + public static final String JSON_PROPERTY_ACCOUNT_HOLDER_CODE = "accountHolderCode"; + private String accountHolderCode; + + public SuspendAccountHolderRequest() { + } + + public SuspendAccountHolderRequest accountHolderCode(String accountHolderCode) { + this.accountHolderCode = accountHolderCode; + return this; + } + + /** + * The code of the account holder to be suspended. + * @return accountHolderCode + **/ + @ApiModelProperty(required = true, value = "The code of the account holder to be suspended.") + @JsonProperty(JSON_PROPERTY_ACCOUNT_HOLDER_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getAccountHolderCode() { + return accountHolderCode; + } + + + @JsonProperty(JSON_PROPERTY_ACCOUNT_HOLDER_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAccountHolderCode(String accountHolderCode) { + this.accountHolderCode = accountHolderCode; + } + + + /** + * Return true if this SuspendAccountHolderRequest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SuspendAccountHolderRequest suspendAccountHolderRequest = (SuspendAccountHolderRequest) o; + return Objects.equals(this.accountHolderCode, suspendAccountHolderRequest.accountHolderCode); + } + + @Override + public int hashCode() { + return Objects.hash(accountHolderCode); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SuspendAccountHolderRequest {\n"); + sb.append(" accountHolderCode: ").append(toIndentedString(accountHolderCode)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line 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 SuspendAccountHolderRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of SuspendAccountHolderRequest + * @throws JsonProcessingException if the JSON string is invalid with respect to SuspendAccountHolderRequest + */ + public static SuspendAccountHolderRequest fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, SuspendAccountHolderRequest.class); + } +/** + * Convert an instance of SuspendAccountHolderRequest 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/marketpayaccount/SuspendAccountHolderResponse.java b/src/main/java/com/adyen/model/marketpayaccount/SuspendAccountHolderResponse.java new file mode 100644 index 000000000..b163d915d --- /dev/null +++ b/src/main/java/com/adyen/model/marketpayaccount/SuspendAccountHolderResponse.java @@ -0,0 +1,234 @@ +/* + * Account API + * This API is used for the classic integration. If you are just starting your implementation, refer to our [new integration guide](https://docs.adyen.com/marketplaces-and-platforms) instead. The Account API provides endpoints for managing account-related entities on your platform. These related entities include account holders, accounts, bank accounts, shareholders, and verification-related documents. The management operations include actions such as creation, retrieval, updating, and deletion of them. For more information, refer to our [documentation](https://docs.adyen.com/marketplaces-and-platforms/classic). ## Authentication Your Adyen contact will provide your API credential and an API key. To connect to the API, add an `X-API-Key` header with the API key as the value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: YOUR_API_KEY\" \\ ... ``` Alternatively, you can use the username and password to connect to the API using basic authentication. For example: ``` curl -U \"ws@MarketPlace.YOUR_PLATFORM_ACCOUNT\":\"YOUR_WS_PASSWORD\" \\ -H \"Content-Type: application/json\" \\ ... ``` When going live, you need to generate new web service user credentials to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning The Account API supports [versioning](https://docs.adyen.com/development-resources/versioning) using a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://cal-test.adyen.com/cal/services/Account/v6/createAccountHolder ``` + * + * The version of the OpenAPI document: 6 + * + * + * 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.marketpayaccount; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.adyen.model.marketpayaccount.AccountHolderStatus; +import com.adyen.model.marketpayaccount.ErrorFieldType; +import com.fasterxml.jackson.annotation.JsonInclude; +import 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; + + +/** + * SuspendAccountHolderResponse + */ +@JsonPropertyOrder({ + SuspendAccountHolderResponse.JSON_PROPERTY_ACCOUNT_HOLDER_STATUS, + SuspendAccountHolderResponse.JSON_PROPERTY_INVALID_FIELDS, + SuspendAccountHolderResponse.JSON_PROPERTY_PSP_REFERENCE, + SuspendAccountHolderResponse.JSON_PROPERTY_RESULT_CODE +}) + +public class SuspendAccountHolderResponse { + public static final String JSON_PROPERTY_ACCOUNT_HOLDER_STATUS = "accountHolderStatus"; + private AccountHolderStatus accountHolderStatus; + + public static final String JSON_PROPERTY_INVALID_FIELDS = "invalidFields"; + private List invalidFields = null; + + public static final String JSON_PROPERTY_PSP_REFERENCE = "pspReference"; + private String pspReference; + + public static final String JSON_PROPERTY_RESULT_CODE = "resultCode"; + private String resultCode; + + public SuspendAccountHolderResponse() { + } + + public SuspendAccountHolderResponse accountHolderStatus(AccountHolderStatus accountHolderStatus) { + this.accountHolderStatus = accountHolderStatus; + return this; + } + + /** + * Get accountHolderStatus + * @return accountHolderStatus + **/ + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_ACCOUNT_HOLDER_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public AccountHolderStatus getAccountHolderStatus() { + return accountHolderStatus; + } + + + @JsonProperty(JSON_PROPERTY_ACCOUNT_HOLDER_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAccountHolderStatus(AccountHolderStatus accountHolderStatus) { + this.accountHolderStatus = accountHolderStatus; + } + + + public SuspendAccountHolderResponse invalidFields(List invalidFields) { + this.invalidFields = invalidFields; + return this; + } + + public SuspendAccountHolderResponse addInvalidFieldsItem(ErrorFieldType invalidFieldsItem) { + if (this.invalidFields == null) { + this.invalidFields = new ArrayList<>(); + } + this.invalidFields.add(invalidFieldsItem); + return this; + } + + /** + * Contains field validation errors that would prevent requests from being processed. + * @return invalidFields + **/ + @ApiModelProperty(value = "Contains field validation errors that would prevent requests from being processed.") + @JsonProperty(JSON_PROPERTY_INVALID_FIELDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getInvalidFields() { + return invalidFields; + } + + + @JsonProperty(JSON_PROPERTY_INVALID_FIELDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setInvalidFields(List invalidFields) { + this.invalidFields = invalidFields; + } + + + public SuspendAccountHolderResponse pspReference(String pspReference) { + this.pspReference = pspReference; + return this; + } + + /** + * The reference of a request. Can be used to uniquely identify the request. + * @return pspReference + **/ + @ApiModelProperty(value = "The reference of a request. Can be used to uniquely identify the request.") + @JsonProperty(JSON_PROPERTY_PSP_REFERENCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getPspReference() { + return pspReference; + } + + + @JsonProperty(JSON_PROPERTY_PSP_REFERENCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPspReference(String pspReference) { + this.pspReference = pspReference; + } + + + public SuspendAccountHolderResponse resultCode(String resultCode) { + this.resultCode = resultCode; + return this; + } + + /** + * The result code. + * @return resultCode + **/ + @ApiModelProperty(value = "The result code.") + @JsonProperty(JSON_PROPERTY_RESULT_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getResultCode() { + return resultCode; + } + + + @JsonProperty(JSON_PROPERTY_RESULT_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setResultCode(String resultCode) { + this.resultCode = resultCode; + } + + + /** + * Return true if this SuspendAccountHolderResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SuspendAccountHolderResponse suspendAccountHolderResponse = (SuspendAccountHolderResponse) o; + return Objects.equals(this.accountHolderStatus, suspendAccountHolderResponse.accountHolderStatus) && + Objects.equals(this.invalidFields, suspendAccountHolderResponse.invalidFields) && + Objects.equals(this.pspReference, suspendAccountHolderResponse.pspReference) && + Objects.equals(this.resultCode, suspendAccountHolderResponse.resultCode); + } + + @Override + public int hashCode() { + return Objects.hash(accountHolderStatus, invalidFields, pspReference, resultCode); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SuspendAccountHolderResponse {\n"); + sb.append(" accountHolderStatus: ").append(toIndentedString(accountHolderStatus)).append("\n"); + sb.append(" invalidFields: ").append(toIndentedString(invalidFields)).append("\n"); + sb.append(" pspReference: ").append(toIndentedString(pspReference)).append("\n"); + sb.append(" resultCode: ").append(toIndentedString(resultCode)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line 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 SuspendAccountHolderResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of SuspendAccountHolderResponse + * @throws JsonProcessingException if the JSON string is invalid with respect to SuspendAccountHolderResponse + */ + public static SuspendAccountHolderResponse fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, SuspendAccountHolderResponse.class); + } +/** + * Convert an instance of SuspendAccountHolderResponse 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/marketpayaccount/UltimateParentCompany.java b/src/main/java/com/adyen/model/marketpayaccount/UltimateParentCompany.java new file mode 100644 index 000000000..293dc43c3 --- /dev/null +++ b/src/main/java/com/adyen/model/marketpayaccount/UltimateParentCompany.java @@ -0,0 +1,193 @@ +/* + * Account API + * This API is used for the classic integration. If you are just starting your implementation, refer to our [new integration guide](https://docs.adyen.com/marketplaces-and-platforms) instead. The Account API provides endpoints for managing account-related entities on your platform. These related entities include account holders, accounts, bank accounts, shareholders, and verification-related documents. The management operations include actions such as creation, retrieval, updating, and deletion of them. For more information, refer to our [documentation](https://docs.adyen.com/marketplaces-and-platforms/classic). ## Authentication Your Adyen contact will provide your API credential and an API key. To connect to the API, add an `X-API-Key` header with the API key as the value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: YOUR_API_KEY\" \\ ... ``` Alternatively, you can use the username and password to connect to the API using basic authentication. For example: ``` curl -U \"ws@MarketPlace.YOUR_PLATFORM_ACCOUNT\":\"YOUR_WS_PASSWORD\" \\ -H \"Content-Type: application/json\" \\ ... ``` When going live, you need to generate new web service user credentials to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning The Account API supports [versioning](https://docs.adyen.com/development-resources/versioning) using a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://cal-test.adyen.com/cal/services/Account/v6/createAccountHolder ``` + * + * The version of the OpenAPI document: 6 + * + * + * 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.marketpayaccount; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.adyen.model.marketpayaccount.UltimateParentCompanyBusinessDetails; +import com.adyen.model.marketpayaccount.ViasAddress; +import com.fasterxml.jackson.annotation.JsonInclude; +import 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; + + +/** + * UltimateParentCompany + */ +@JsonPropertyOrder({ + UltimateParentCompany.JSON_PROPERTY_ADDRESS, + UltimateParentCompany.JSON_PROPERTY_BUSINESS_DETAILS, + UltimateParentCompany.JSON_PROPERTY_ULTIMATE_PARENT_COMPANY_CODE +}) + +public class UltimateParentCompany { + public static final String JSON_PROPERTY_ADDRESS = "address"; + private ViasAddress address; + + public static final String JSON_PROPERTY_BUSINESS_DETAILS = "businessDetails"; + private UltimateParentCompanyBusinessDetails businessDetails; + + public static final String JSON_PROPERTY_ULTIMATE_PARENT_COMPANY_CODE = "ultimateParentCompanyCode"; + private String ultimateParentCompanyCode; + + public UltimateParentCompany() { + } + + public UltimateParentCompany address(ViasAddress address) { + this.address = address; + return this; + } + + /** + * Get address + * @return address + **/ + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_ADDRESS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public ViasAddress getAddress() { + return address; + } + + + @JsonProperty(JSON_PROPERTY_ADDRESS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAddress(ViasAddress address) { + this.address = address; + } + + + public UltimateParentCompany businessDetails(UltimateParentCompanyBusinessDetails businessDetails) { + this.businessDetails = businessDetails; + return this; + } + + /** + * Get businessDetails + * @return businessDetails + **/ + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_BUSINESS_DETAILS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public UltimateParentCompanyBusinessDetails getBusinessDetails() { + return businessDetails; + } + + + @JsonProperty(JSON_PROPERTY_BUSINESS_DETAILS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setBusinessDetails(UltimateParentCompanyBusinessDetails businessDetails) { + this.businessDetails = businessDetails; + } + + + public UltimateParentCompany ultimateParentCompanyCode(String ultimateParentCompanyCode) { + this.ultimateParentCompanyCode = ultimateParentCompanyCode; + return this; + } + + /** + * Adyen-generated unique alphanumeric identifier (UUID) for the entry, returned in the response when you create an ultimate parent company. Required when updating an existing entry in an `/updateAccountHolder` request. + * @return ultimateParentCompanyCode + **/ + @ApiModelProperty(value = "Adyen-generated unique alphanumeric identifier (UUID) for the entry, returned in the response when you create an ultimate parent company. Required when updating an existing entry in an `/updateAccountHolder` request.") + @JsonProperty(JSON_PROPERTY_ULTIMATE_PARENT_COMPANY_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getUltimateParentCompanyCode() { + return ultimateParentCompanyCode; + } + + + @JsonProperty(JSON_PROPERTY_ULTIMATE_PARENT_COMPANY_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setUltimateParentCompanyCode(String ultimateParentCompanyCode) { + this.ultimateParentCompanyCode = ultimateParentCompanyCode; + } + + + /** + * Return true if this UltimateParentCompany object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UltimateParentCompany ultimateParentCompany = (UltimateParentCompany) o; + return Objects.equals(this.address, ultimateParentCompany.address) && + Objects.equals(this.businessDetails, ultimateParentCompany.businessDetails) && + Objects.equals(this.ultimateParentCompanyCode, ultimateParentCompany.ultimateParentCompanyCode); + } + + @Override + public int hashCode() { + return Objects.hash(address, businessDetails, ultimateParentCompanyCode); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UltimateParentCompany {\n"); + sb.append(" address: ").append(toIndentedString(address)).append("\n"); + sb.append(" businessDetails: ").append(toIndentedString(businessDetails)).append("\n"); + sb.append(" ultimateParentCompanyCode: ").append(toIndentedString(ultimateParentCompanyCode)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line 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 UltimateParentCompany given an JSON string + * + * @param jsonString JSON string + * @return An instance of UltimateParentCompany + * @throws JsonProcessingException if the JSON string is invalid with respect to UltimateParentCompany + */ + public static UltimateParentCompany fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, UltimateParentCompany.class); + } +/** + * Convert an instance of UltimateParentCompany 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/marketpayaccount/UltimateParentCompanyBusinessDetails.java b/src/main/java/com/adyen/model/marketpayaccount/UltimateParentCompanyBusinessDetails.java new file mode 100644 index 000000000..9409ef145 --- /dev/null +++ b/src/main/java/com/adyen/model/marketpayaccount/UltimateParentCompanyBusinessDetails.java @@ -0,0 +1,253 @@ +/* + * Account API + * This API is used for the classic integration. If you are just starting your implementation, refer to our [new integration guide](https://docs.adyen.com/marketplaces-and-platforms) instead. The Account API provides endpoints for managing account-related entities on your platform. These related entities include account holders, accounts, bank accounts, shareholders, and verification-related documents. The management operations include actions such as creation, retrieval, updating, and deletion of them. For more information, refer to our [documentation](https://docs.adyen.com/marketplaces-and-platforms/classic). ## Authentication Your Adyen contact will provide your API credential and an API key. To connect to the API, add an `X-API-Key` header with the API key as the value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: YOUR_API_KEY\" \\ ... ``` Alternatively, you can use the username and password to connect to the API using basic authentication. For example: ``` curl -U \"ws@MarketPlace.YOUR_PLATFORM_ACCOUNT\":\"YOUR_WS_PASSWORD\" \\ -H \"Content-Type: application/json\" \\ ... ``` When going live, you need to generate new web service user credentials to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning The Account API supports [versioning](https://docs.adyen.com/development-resources/versioning) using a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://cal-test.adyen.com/cal/services/Account/v6/createAccountHolder ``` + * + * The version of the OpenAPI document: 6 + * + * + * 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.marketpayaccount; + +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; + + +/** + * UltimateParentCompanyBusinessDetails + */ +@JsonPropertyOrder({ + UltimateParentCompanyBusinessDetails.JSON_PROPERTY_LEGAL_BUSINESS_NAME, + UltimateParentCompanyBusinessDetails.JSON_PROPERTY_REGISTRATION_NUMBER, + UltimateParentCompanyBusinessDetails.JSON_PROPERTY_STOCK_EXCHANGE, + UltimateParentCompanyBusinessDetails.JSON_PROPERTY_STOCK_NUMBER, + UltimateParentCompanyBusinessDetails.JSON_PROPERTY_STOCK_TICKER +}) + +public class UltimateParentCompanyBusinessDetails { + public static final String JSON_PROPERTY_LEGAL_BUSINESS_NAME = "legalBusinessName"; + private String legalBusinessName; + + public static final String JSON_PROPERTY_REGISTRATION_NUMBER = "registrationNumber"; + private String registrationNumber; + + public static final String JSON_PROPERTY_STOCK_EXCHANGE = "stockExchange"; + private String stockExchange; + + public static final String JSON_PROPERTY_STOCK_NUMBER = "stockNumber"; + private String stockNumber; + + public static final String JSON_PROPERTY_STOCK_TICKER = "stockTicker"; + private String stockTicker; + + public UltimateParentCompanyBusinessDetails() { + } + + public UltimateParentCompanyBusinessDetails legalBusinessName(String legalBusinessName) { + this.legalBusinessName = legalBusinessName; + return this; + } + + /** + * The legal name of the company. + * @return legalBusinessName + **/ + @ApiModelProperty(value = "The legal name of the company.") + @JsonProperty(JSON_PROPERTY_LEGAL_BUSINESS_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getLegalBusinessName() { + return legalBusinessName; + } + + + @JsonProperty(JSON_PROPERTY_LEGAL_BUSINESS_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setLegalBusinessName(String legalBusinessName) { + this.legalBusinessName = legalBusinessName; + } + + + public UltimateParentCompanyBusinessDetails registrationNumber(String registrationNumber) { + this.registrationNumber = registrationNumber; + return this; + } + + /** + * The registration number of the company. + * @return registrationNumber + **/ + @ApiModelProperty(value = "The registration number of the company.") + @JsonProperty(JSON_PROPERTY_REGISTRATION_NUMBER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getRegistrationNumber() { + return registrationNumber; + } + + + @JsonProperty(JSON_PROPERTY_REGISTRATION_NUMBER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setRegistrationNumber(String registrationNumber) { + this.registrationNumber = registrationNumber; + } + + + public UltimateParentCompanyBusinessDetails stockExchange(String stockExchange) { + this.stockExchange = stockExchange; + return this; + } + + /** + * Market Identifier Code (MIC). + * @return stockExchange + **/ + @ApiModelProperty(value = "Market Identifier Code (MIC).") + @JsonProperty(JSON_PROPERTY_STOCK_EXCHANGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getStockExchange() { + return stockExchange; + } + + + @JsonProperty(JSON_PROPERTY_STOCK_EXCHANGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setStockExchange(String stockExchange) { + this.stockExchange = stockExchange; + } + + + public UltimateParentCompanyBusinessDetails stockNumber(String stockNumber) { + this.stockNumber = stockNumber; + return this; + } + + /** + * International Securities Identification Number (ISIN). + * @return stockNumber + **/ + @ApiModelProperty(value = "International Securities Identification Number (ISIN).") + @JsonProperty(JSON_PROPERTY_STOCK_NUMBER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getStockNumber() { + return stockNumber; + } + + + @JsonProperty(JSON_PROPERTY_STOCK_NUMBER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setStockNumber(String stockNumber) { + this.stockNumber = stockNumber; + } + + + public UltimateParentCompanyBusinessDetails stockTicker(String stockTicker) { + this.stockTicker = stockTicker; + return this; + } + + /** + * Stock Ticker symbol. + * @return stockTicker + **/ + @ApiModelProperty(value = "Stock Ticker symbol.") + @JsonProperty(JSON_PROPERTY_STOCK_TICKER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getStockTicker() { + return stockTicker; + } + + + @JsonProperty(JSON_PROPERTY_STOCK_TICKER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setStockTicker(String stockTicker) { + this.stockTicker = stockTicker; + } + + + /** + * Return true if this UltimateParentCompanyBusinessDetails object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UltimateParentCompanyBusinessDetails ultimateParentCompanyBusinessDetails = (UltimateParentCompanyBusinessDetails) o; + return Objects.equals(this.legalBusinessName, ultimateParentCompanyBusinessDetails.legalBusinessName) && + Objects.equals(this.registrationNumber, ultimateParentCompanyBusinessDetails.registrationNumber) && + Objects.equals(this.stockExchange, ultimateParentCompanyBusinessDetails.stockExchange) && + Objects.equals(this.stockNumber, ultimateParentCompanyBusinessDetails.stockNumber) && + Objects.equals(this.stockTicker, ultimateParentCompanyBusinessDetails.stockTicker); + } + + @Override + public int hashCode() { + return Objects.hash(legalBusinessName, registrationNumber, stockExchange, stockNumber, stockTicker); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UltimateParentCompanyBusinessDetails {\n"); + sb.append(" legalBusinessName: ").append(toIndentedString(legalBusinessName)).append("\n"); + sb.append(" registrationNumber: ").append(toIndentedString(registrationNumber)).append("\n"); + sb.append(" stockExchange: ").append(toIndentedString(stockExchange)).append("\n"); + sb.append(" stockNumber: ").append(toIndentedString(stockNumber)).append("\n"); + sb.append(" stockTicker: ").append(toIndentedString(stockTicker)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line 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 UltimateParentCompanyBusinessDetails given an JSON string + * + * @param jsonString JSON string + * @return An instance of UltimateParentCompanyBusinessDetails + * @throws JsonProcessingException if the JSON string is invalid with respect to UltimateParentCompanyBusinessDetails + */ + public static UltimateParentCompanyBusinessDetails fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, UltimateParentCompanyBusinessDetails.class); + } +/** + * Convert an instance of UltimateParentCompanyBusinessDetails 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/marketpayaccount/UnSuspendAccountHolderRequest.java b/src/main/java/com/adyen/model/marketpayaccount/UnSuspendAccountHolderRequest.java new file mode 100644 index 000000000..d5adf71ae --- /dev/null +++ b/src/main/java/com/adyen/model/marketpayaccount/UnSuspendAccountHolderRequest.java @@ -0,0 +1,129 @@ +/* + * Account API + * This API is used for the classic integration. If you are just starting your implementation, refer to our [new integration guide](https://docs.adyen.com/marketplaces-and-platforms) instead. The Account API provides endpoints for managing account-related entities on your platform. These related entities include account holders, accounts, bank accounts, shareholders, and verification-related documents. The management operations include actions such as creation, retrieval, updating, and deletion of them. For more information, refer to our [documentation](https://docs.adyen.com/marketplaces-and-platforms/classic). ## Authentication Your Adyen contact will provide your API credential and an API key. To connect to the API, add an `X-API-Key` header with the API key as the value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: YOUR_API_KEY\" \\ ... ``` Alternatively, you can use the username and password to connect to the API using basic authentication. For example: ``` curl -U \"ws@MarketPlace.YOUR_PLATFORM_ACCOUNT\":\"YOUR_WS_PASSWORD\" \\ -H \"Content-Type: application/json\" \\ ... ``` When going live, you need to generate new web service user credentials to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning The Account API supports [versioning](https://docs.adyen.com/development-resources/versioning) using a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://cal-test.adyen.com/cal/services/Account/v6/createAccountHolder ``` + * + * The version of the OpenAPI document: 6 + * + * + * 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.marketpayaccount; + +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; + + +/** + * UnSuspendAccountHolderRequest + */ +@JsonPropertyOrder({ + UnSuspendAccountHolderRequest.JSON_PROPERTY_ACCOUNT_HOLDER_CODE +}) + +public class UnSuspendAccountHolderRequest { + public static final String JSON_PROPERTY_ACCOUNT_HOLDER_CODE = "accountHolderCode"; + private String accountHolderCode; + + public UnSuspendAccountHolderRequest() { + } + + public UnSuspendAccountHolderRequest accountHolderCode(String accountHolderCode) { + this.accountHolderCode = accountHolderCode; + return this; + } + + /** + * The code of the account holder to be reinstated. + * @return accountHolderCode + **/ + @ApiModelProperty(required = true, value = "The code of the account holder to be reinstated.") + @JsonProperty(JSON_PROPERTY_ACCOUNT_HOLDER_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getAccountHolderCode() { + return accountHolderCode; + } + + + @JsonProperty(JSON_PROPERTY_ACCOUNT_HOLDER_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAccountHolderCode(String accountHolderCode) { + this.accountHolderCode = accountHolderCode; + } + + + /** + * Return true if this UnSuspendAccountHolderRequest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UnSuspendAccountHolderRequest unSuspendAccountHolderRequest = (UnSuspendAccountHolderRequest) o; + return Objects.equals(this.accountHolderCode, unSuspendAccountHolderRequest.accountHolderCode); + } + + @Override + public int hashCode() { + return Objects.hash(accountHolderCode); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UnSuspendAccountHolderRequest {\n"); + sb.append(" accountHolderCode: ").append(toIndentedString(accountHolderCode)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line 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 UnSuspendAccountHolderRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of UnSuspendAccountHolderRequest + * @throws JsonProcessingException if the JSON string is invalid with respect to UnSuspendAccountHolderRequest + */ + public static UnSuspendAccountHolderRequest fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, UnSuspendAccountHolderRequest.class); + } +/** + * Convert an instance of UnSuspendAccountHolderRequest 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/marketpayaccount/UnSuspendAccountHolderResponse.java b/src/main/java/com/adyen/model/marketpayaccount/UnSuspendAccountHolderResponse.java new file mode 100644 index 000000000..ae8d9c578 --- /dev/null +++ b/src/main/java/com/adyen/model/marketpayaccount/UnSuspendAccountHolderResponse.java @@ -0,0 +1,234 @@ +/* + * Account API + * This API is used for the classic integration. If you are just starting your implementation, refer to our [new integration guide](https://docs.adyen.com/marketplaces-and-platforms) instead. The Account API provides endpoints for managing account-related entities on your platform. These related entities include account holders, accounts, bank accounts, shareholders, and verification-related documents. The management operations include actions such as creation, retrieval, updating, and deletion of them. For more information, refer to our [documentation](https://docs.adyen.com/marketplaces-and-platforms/classic). ## Authentication Your Adyen contact will provide your API credential and an API key. To connect to the API, add an `X-API-Key` header with the API key as the value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: YOUR_API_KEY\" \\ ... ``` Alternatively, you can use the username and password to connect to the API using basic authentication. For example: ``` curl -U \"ws@MarketPlace.YOUR_PLATFORM_ACCOUNT\":\"YOUR_WS_PASSWORD\" \\ -H \"Content-Type: application/json\" \\ ... ``` When going live, you need to generate new web service user credentials to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning The Account API supports [versioning](https://docs.adyen.com/development-resources/versioning) using a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://cal-test.adyen.com/cal/services/Account/v6/createAccountHolder ``` + * + * The version of the OpenAPI document: 6 + * + * + * 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.marketpayaccount; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.adyen.model.marketpayaccount.AccountHolderStatus; +import com.adyen.model.marketpayaccount.ErrorFieldType; +import com.fasterxml.jackson.annotation.JsonInclude; +import 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; + + +/** + * UnSuspendAccountHolderResponse + */ +@JsonPropertyOrder({ + UnSuspendAccountHolderResponse.JSON_PROPERTY_ACCOUNT_HOLDER_STATUS, + UnSuspendAccountHolderResponse.JSON_PROPERTY_INVALID_FIELDS, + UnSuspendAccountHolderResponse.JSON_PROPERTY_PSP_REFERENCE, + UnSuspendAccountHolderResponse.JSON_PROPERTY_RESULT_CODE +}) + +public class UnSuspendAccountHolderResponse { + public static final String JSON_PROPERTY_ACCOUNT_HOLDER_STATUS = "accountHolderStatus"; + private AccountHolderStatus accountHolderStatus; + + public static final String JSON_PROPERTY_INVALID_FIELDS = "invalidFields"; + private List invalidFields = null; + + public static final String JSON_PROPERTY_PSP_REFERENCE = "pspReference"; + private String pspReference; + + public static final String JSON_PROPERTY_RESULT_CODE = "resultCode"; + private String resultCode; + + public UnSuspendAccountHolderResponse() { + } + + public UnSuspendAccountHolderResponse accountHolderStatus(AccountHolderStatus accountHolderStatus) { + this.accountHolderStatus = accountHolderStatus; + return this; + } + + /** + * Get accountHolderStatus + * @return accountHolderStatus + **/ + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_ACCOUNT_HOLDER_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public AccountHolderStatus getAccountHolderStatus() { + return accountHolderStatus; + } + + + @JsonProperty(JSON_PROPERTY_ACCOUNT_HOLDER_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAccountHolderStatus(AccountHolderStatus accountHolderStatus) { + this.accountHolderStatus = accountHolderStatus; + } + + + public UnSuspendAccountHolderResponse invalidFields(List invalidFields) { + this.invalidFields = invalidFields; + return this; + } + + public UnSuspendAccountHolderResponse addInvalidFieldsItem(ErrorFieldType invalidFieldsItem) { + if (this.invalidFields == null) { + this.invalidFields = new ArrayList<>(); + } + this.invalidFields.add(invalidFieldsItem); + return this; + } + + /** + * Contains field validation errors that would prevent requests from being processed. + * @return invalidFields + **/ + @ApiModelProperty(value = "Contains field validation errors that would prevent requests from being processed.") + @JsonProperty(JSON_PROPERTY_INVALID_FIELDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getInvalidFields() { + return invalidFields; + } + + + @JsonProperty(JSON_PROPERTY_INVALID_FIELDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setInvalidFields(List invalidFields) { + this.invalidFields = invalidFields; + } + + + public UnSuspendAccountHolderResponse pspReference(String pspReference) { + this.pspReference = pspReference; + return this; + } + + /** + * The reference of a request. Can be used to uniquely identify the request. + * @return pspReference + **/ + @ApiModelProperty(value = "The reference of a request. Can be used to uniquely identify the request.") + @JsonProperty(JSON_PROPERTY_PSP_REFERENCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getPspReference() { + return pspReference; + } + + + @JsonProperty(JSON_PROPERTY_PSP_REFERENCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPspReference(String pspReference) { + this.pspReference = pspReference; + } + + + public UnSuspendAccountHolderResponse resultCode(String resultCode) { + this.resultCode = resultCode; + return this; + } + + /** + * The result code. + * @return resultCode + **/ + @ApiModelProperty(value = "The result code.") + @JsonProperty(JSON_PROPERTY_RESULT_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getResultCode() { + return resultCode; + } + + + @JsonProperty(JSON_PROPERTY_RESULT_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setResultCode(String resultCode) { + this.resultCode = resultCode; + } + + + /** + * Return true if this UnSuspendAccountHolderResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UnSuspendAccountHolderResponse unSuspendAccountHolderResponse = (UnSuspendAccountHolderResponse) o; + return Objects.equals(this.accountHolderStatus, unSuspendAccountHolderResponse.accountHolderStatus) && + Objects.equals(this.invalidFields, unSuspendAccountHolderResponse.invalidFields) && + Objects.equals(this.pspReference, unSuspendAccountHolderResponse.pspReference) && + Objects.equals(this.resultCode, unSuspendAccountHolderResponse.resultCode); + } + + @Override + public int hashCode() { + return Objects.hash(accountHolderStatus, invalidFields, pspReference, resultCode); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UnSuspendAccountHolderResponse {\n"); + sb.append(" accountHolderStatus: ").append(toIndentedString(accountHolderStatus)).append("\n"); + sb.append(" invalidFields: ").append(toIndentedString(invalidFields)).append("\n"); + sb.append(" pspReference: ").append(toIndentedString(pspReference)).append("\n"); + sb.append(" resultCode: ").append(toIndentedString(resultCode)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line 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 UnSuspendAccountHolderResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of UnSuspendAccountHolderResponse + * @throws JsonProcessingException if the JSON string is invalid with respect to UnSuspendAccountHolderResponse + */ + public static UnSuspendAccountHolderResponse fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, UnSuspendAccountHolderResponse.class); + } +/** + * Convert an instance of UnSuspendAccountHolderResponse 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/marketpayaccount/UpdateAccountHolderRequest.java b/src/main/java/com/adyen/model/marketpayaccount/UpdateAccountHolderRequest.java new file mode 100644 index 000000000..9af3f7a1d --- /dev/null +++ b/src/main/java/com/adyen/model/marketpayaccount/UpdateAccountHolderRequest.java @@ -0,0 +1,360 @@ +/* + * Account API + * This API is used for the classic integration. If you are just starting your implementation, refer to our [new integration guide](https://docs.adyen.com/marketplaces-and-platforms) instead. The Account API provides endpoints for managing account-related entities on your platform. These related entities include account holders, accounts, bank accounts, shareholders, and verification-related documents. The management operations include actions such as creation, retrieval, updating, and deletion of them. For more information, refer to our [documentation](https://docs.adyen.com/marketplaces-and-platforms/classic). ## Authentication Your Adyen contact will provide your API credential and an API key. To connect to the API, add an `X-API-Key` header with the API key as the value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: YOUR_API_KEY\" \\ ... ``` Alternatively, you can use the username and password to connect to the API using basic authentication. For example: ``` curl -U \"ws@MarketPlace.YOUR_PLATFORM_ACCOUNT\":\"YOUR_WS_PASSWORD\" \\ -H \"Content-Type: application/json\" \\ ... ``` When going live, you need to generate new web service user credentials to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning The Account API supports [versioning](https://docs.adyen.com/development-resources/versioning) using a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://cal-test.adyen.com/cal/services/Account/v6/createAccountHolder ``` + * + * The version of the OpenAPI document: 6 + * + * + * 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.marketpayaccount; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.adyen.model.marketpayaccount.AccountHolderDetails; +import com.fasterxml.jackson.annotation.JsonInclude; +import 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; + + +/** + * UpdateAccountHolderRequest + */ +@JsonPropertyOrder({ + UpdateAccountHolderRequest.JSON_PROPERTY_ACCOUNT_HOLDER_CODE, + UpdateAccountHolderRequest.JSON_PROPERTY_ACCOUNT_HOLDER_DETAILS, + UpdateAccountHolderRequest.JSON_PROPERTY_DESCRIPTION, + UpdateAccountHolderRequest.JSON_PROPERTY_LEGAL_ENTITY, + UpdateAccountHolderRequest.JSON_PROPERTY_PRIMARY_CURRENCY, + UpdateAccountHolderRequest.JSON_PROPERTY_PROCESSING_TIER, + UpdateAccountHolderRequest.JSON_PROPERTY_VERIFICATION_PROFILE +}) + +public class UpdateAccountHolderRequest { + public static final String JSON_PROPERTY_ACCOUNT_HOLDER_CODE = "accountHolderCode"; + private String accountHolderCode; + + public static final String JSON_PROPERTY_ACCOUNT_HOLDER_DETAILS = "accountHolderDetails"; + private AccountHolderDetails accountHolderDetails; + + public static final String JSON_PROPERTY_DESCRIPTION = "description"; + private String description; + + /** + * The legal entity type of the account holder. This determines the information that should be provided in the request. Possible values: **Business**, **Individual**, or **NonProfit**. * If set to **Business** or **NonProfit**, then `accountHolderDetails.businessDetails` must be provided, with at least one entry in the `accountHolderDetails.businessDetails.shareholders` list. * If set to **Individual**, then `accountHolderDetails.individualDetails` must be provided. + */ + public enum LegalEntityEnum { + BUSINESS("Business"), + + INDIVIDUAL("Individual"), + + NONPROFIT("NonProfit"), + + PARTNERSHIP("Partnership"), + + PUBLICCOMPANY("PublicCompany"); + + private String value; + + LegalEntityEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static LegalEntityEnum fromValue(String value) { + for (LegalEntityEnum b : LegalEntityEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_LEGAL_ENTITY = "legalEntity"; + private LegalEntityEnum legalEntity; + + public static final String JSON_PROPERTY_PRIMARY_CURRENCY = "primaryCurrency"; + private String primaryCurrency; + + public static final String JSON_PROPERTY_PROCESSING_TIER = "processingTier"; + private Integer processingTier; + + public static final String JSON_PROPERTY_VERIFICATION_PROFILE = "verificationProfile"; + private String verificationProfile; + + public UpdateAccountHolderRequest() { + } + + public UpdateAccountHolderRequest accountHolderCode(String accountHolderCode) { + this.accountHolderCode = accountHolderCode; + return this; + } + + /** + * The code of the Account Holder to be updated. + * @return accountHolderCode + **/ + @ApiModelProperty(required = true, value = "The code of the Account Holder to be updated.") + @JsonProperty(JSON_PROPERTY_ACCOUNT_HOLDER_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getAccountHolderCode() { + return accountHolderCode; + } + + + @JsonProperty(JSON_PROPERTY_ACCOUNT_HOLDER_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAccountHolderCode(String accountHolderCode) { + this.accountHolderCode = accountHolderCode; + } + + + public UpdateAccountHolderRequest accountHolderDetails(AccountHolderDetails accountHolderDetails) { + this.accountHolderDetails = accountHolderDetails; + return this; + } + + /** + * Get accountHolderDetails + * @return accountHolderDetails + **/ + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_ACCOUNT_HOLDER_DETAILS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public AccountHolderDetails getAccountHolderDetails() { + return accountHolderDetails; + } + + + @JsonProperty(JSON_PROPERTY_ACCOUNT_HOLDER_DETAILS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAccountHolderDetails(AccountHolderDetails accountHolderDetails) { + this.accountHolderDetails = accountHolderDetails; + } + + + public UpdateAccountHolderRequest description(String description) { + this.description = description; + return this; + } + + /** + * A description of the account holder, maximum 256 characters. You can use alphanumeric characters (A-Z, a-z, 0-9), white spaces, and underscores `_`. + * @return description + **/ + @ApiModelProperty(value = "A description of the account holder, maximum 256 characters. You can use alphanumeric characters (A-Z, a-z, 0-9), white spaces, and underscores `_`.") + @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 UpdateAccountHolderRequest legalEntity(LegalEntityEnum legalEntity) { + this.legalEntity = legalEntity; + return this; + } + + /** + * The legal entity type of the account holder. This determines the information that should be provided in the request. Possible values: **Business**, **Individual**, or **NonProfit**. * If set to **Business** or **NonProfit**, then `accountHolderDetails.businessDetails` must be provided, with at least one entry in the `accountHolderDetails.businessDetails.shareholders` list. * If set to **Individual**, then `accountHolderDetails.individualDetails` must be provided. + * @return legalEntity + **/ + @ApiModelProperty(value = "The legal entity type of the account holder. This determines the information that should be provided in the request. Possible values: **Business**, **Individual**, or **NonProfit**. * If set to **Business** or **NonProfit**, then `accountHolderDetails.businessDetails` must be provided, with at least one entry in the `accountHolderDetails.businessDetails.shareholders` list. * If set to **Individual**, then `accountHolderDetails.individualDetails` must be provided.") + @JsonProperty(JSON_PROPERTY_LEGAL_ENTITY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public LegalEntityEnum getLegalEntity() { + return legalEntity; + } + + + @JsonProperty(JSON_PROPERTY_LEGAL_ENTITY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setLegalEntity(LegalEntityEnum legalEntity) { + this.legalEntity = legalEntity; + } + + + public UpdateAccountHolderRequest primaryCurrency(String primaryCurrency) { + this.primaryCurrency = primaryCurrency; + return this; + } + + /** + * The primary three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes), to which the account holder should be updated. + * @return primaryCurrency + * @deprecated + **/ + @Deprecated + @ApiModelProperty(value = "The primary three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes), to which the account holder should be updated.") + @JsonProperty(JSON_PROPERTY_PRIMARY_CURRENCY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getPrimaryCurrency() { + return primaryCurrency; + } + + + @Deprecated + @JsonProperty(JSON_PROPERTY_PRIMARY_CURRENCY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPrimaryCurrency(String primaryCurrency) { + this.primaryCurrency = primaryCurrency; + } + + + public UpdateAccountHolderRequest processingTier(Integer processingTier) { + this.processingTier = processingTier; + return this; + } + + /** + * The processing tier to which the Account Holder should be updated. >The processing tier can not be lowered through this request. >Required if accountHolderDetails are not provided. + * @return processingTier + **/ + @ApiModelProperty(value = "The processing tier to which the Account Holder should be updated. >The processing tier can not be lowered through this request. >Required if accountHolderDetails are not provided.") + @JsonProperty(JSON_PROPERTY_PROCESSING_TIER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Integer getProcessingTier() { + return processingTier; + } + + + @JsonProperty(JSON_PROPERTY_PROCESSING_TIER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setProcessingTier(Integer processingTier) { + this.processingTier = processingTier; + } + + + public UpdateAccountHolderRequest verificationProfile(String verificationProfile) { + this.verificationProfile = verificationProfile; + return this; + } + + /** + * The identifier of the profile that applies to this entity. + * @return verificationProfile + **/ + @ApiModelProperty(value = "The identifier of the profile that applies to this entity.") + @JsonProperty(JSON_PROPERTY_VERIFICATION_PROFILE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getVerificationProfile() { + return verificationProfile; + } + + + @JsonProperty(JSON_PROPERTY_VERIFICATION_PROFILE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setVerificationProfile(String verificationProfile) { + this.verificationProfile = verificationProfile; + } + + + /** + * Return true if this UpdateAccountHolderRequest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UpdateAccountHolderRequest updateAccountHolderRequest = (UpdateAccountHolderRequest) o; + return Objects.equals(this.accountHolderCode, updateAccountHolderRequest.accountHolderCode) && + Objects.equals(this.accountHolderDetails, updateAccountHolderRequest.accountHolderDetails) && + Objects.equals(this.description, updateAccountHolderRequest.description) && + Objects.equals(this.legalEntity, updateAccountHolderRequest.legalEntity) && + Objects.equals(this.primaryCurrency, updateAccountHolderRequest.primaryCurrency) && + Objects.equals(this.processingTier, updateAccountHolderRequest.processingTier) && + Objects.equals(this.verificationProfile, updateAccountHolderRequest.verificationProfile); + } + + @Override + public int hashCode() { + return Objects.hash(accountHolderCode, accountHolderDetails, description, legalEntity, primaryCurrency, processingTier, verificationProfile); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UpdateAccountHolderRequest {\n"); + sb.append(" accountHolderCode: ").append(toIndentedString(accountHolderCode)).append("\n"); + sb.append(" accountHolderDetails: ").append(toIndentedString(accountHolderDetails)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" legalEntity: ").append(toIndentedString(legalEntity)).append("\n"); + sb.append(" primaryCurrency: ").append(toIndentedString(primaryCurrency)).append("\n"); + sb.append(" processingTier: ").append(toIndentedString(processingTier)).append("\n"); + sb.append(" verificationProfile: ").append(toIndentedString(verificationProfile)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line 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 UpdateAccountHolderRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of UpdateAccountHolderRequest + * @throws JsonProcessingException if the JSON string is invalid with respect to UpdateAccountHolderRequest + */ + public static UpdateAccountHolderRequest fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, UpdateAccountHolderRequest.class); + } +/** + * Convert an instance of UpdateAccountHolderRequest 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/marketpayaccount/UpdateAccountHolderResponse.java b/src/main/java/com/adyen/model/marketpayaccount/UpdateAccountHolderResponse.java new file mode 100644 index 000000000..58534ff79 --- /dev/null +++ b/src/main/java/com/adyen/model/marketpayaccount/UpdateAccountHolderResponse.java @@ -0,0 +1,497 @@ +/* + * Account API + * This API is used for the classic integration. If you are just starting your implementation, refer to our [new integration guide](https://docs.adyen.com/marketplaces-and-platforms) instead. The Account API provides endpoints for managing account-related entities on your platform. These related entities include account holders, accounts, bank accounts, shareholders, and verification-related documents. The management operations include actions such as creation, retrieval, updating, and deletion of them. For more information, refer to our [documentation](https://docs.adyen.com/marketplaces-and-platforms/classic). ## Authentication Your Adyen contact will provide your API credential and an API key. To connect to the API, add an `X-API-Key` header with the API key as the value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: YOUR_API_KEY\" \\ ... ``` Alternatively, you can use the username and password to connect to the API using basic authentication. For example: ``` curl -U \"ws@MarketPlace.YOUR_PLATFORM_ACCOUNT\":\"YOUR_WS_PASSWORD\" \\ -H \"Content-Type: application/json\" \\ ... ``` When going live, you need to generate new web service user credentials to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning The Account API supports [versioning](https://docs.adyen.com/development-resources/versioning) using a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://cal-test.adyen.com/cal/services/Account/v6/createAccountHolder ``` + * + * The version of the OpenAPI document: 6 + * + * + * 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.marketpayaccount; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.adyen.model.marketpayaccount.AccountHolderDetails; +import com.adyen.model.marketpayaccount.AccountHolderStatus; +import com.adyen.model.marketpayaccount.ErrorFieldType; +import com.adyen.model.marketpayaccount.KYCVerificationResult; +import com.fasterxml.jackson.annotation.JsonInclude; +import 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; + + +/** + * UpdateAccountHolderResponse + */ +@JsonPropertyOrder({ + UpdateAccountHolderResponse.JSON_PROPERTY_ACCOUNT_HOLDER_CODE, + UpdateAccountHolderResponse.JSON_PROPERTY_ACCOUNT_HOLDER_DETAILS, + UpdateAccountHolderResponse.JSON_PROPERTY_ACCOUNT_HOLDER_STATUS, + UpdateAccountHolderResponse.JSON_PROPERTY_DESCRIPTION, + UpdateAccountHolderResponse.JSON_PROPERTY_INVALID_FIELDS, + UpdateAccountHolderResponse.JSON_PROPERTY_LEGAL_ENTITY, + UpdateAccountHolderResponse.JSON_PROPERTY_PRIMARY_CURRENCY, + UpdateAccountHolderResponse.JSON_PROPERTY_PSP_REFERENCE, + UpdateAccountHolderResponse.JSON_PROPERTY_RESULT_CODE, + UpdateAccountHolderResponse.JSON_PROPERTY_VERIFICATION, + UpdateAccountHolderResponse.JSON_PROPERTY_VERIFICATION_PROFILE +}) + +public class UpdateAccountHolderResponse { + public static final String JSON_PROPERTY_ACCOUNT_HOLDER_CODE = "accountHolderCode"; + private String accountHolderCode; + + public static final String JSON_PROPERTY_ACCOUNT_HOLDER_DETAILS = "accountHolderDetails"; + private AccountHolderDetails accountHolderDetails; + + public static final String JSON_PROPERTY_ACCOUNT_HOLDER_STATUS = "accountHolderStatus"; + private AccountHolderStatus accountHolderStatus; + + public static final String JSON_PROPERTY_DESCRIPTION = "description"; + private String description; + + public static final String JSON_PROPERTY_INVALID_FIELDS = "invalidFields"; + private List invalidFields = null; + + /** + * The legal entity of the account holder. + */ + public enum LegalEntityEnum { + BUSINESS("Business"), + + INDIVIDUAL("Individual"), + + NONPROFIT("NonProfit"), + + PARTNERSHIP("Partnership"), + + PUBLICCOMPANY("PublicCompany"); + + private String value; + + LegalEntityEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static LegalEntityEnum fromValue(String value) { + for (LegalEntityEnum b : LegalEntityEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_LEGAL_ENTITY = "legalEntity"; + private LegalEntityEnum legalEntity; + + public static final String JSON_PROPERTY_PRIMARY_CURRENCY = "primaryCurrency"; + private String primaryCurrency; + + public static final String JSON_PROPERTY_PSP_REFERENCE = "pspReference"; + private String pspReference; + + public static final String JSON_PROPERTY_RESULT_CODE = "resultCode"; + private String resultCode; + + public static final String JSON_PROPERTY_VERIFICATION = "verification"; + private KYCVerificationResult verification; + + public static final String JSON_PROPERTY_VERIFICATION_PROFILE = "verificationProfile"; + private String verificationProfile; + + public UpdateAccountHolderResponse() { + } + + public UpdateAccountHolderResponse accountHolderCode(String accountHolderCode) { + this.accountHolderCode = accountHolderCode; + return this; + } + + /** + * The code of the account holder. + * @return accountHolderCode + **/ + @ApiModelProperty(value = "The code of the account holder.") + @JsonProperty(JSON_PROPERTY_ACCOUNT_HOLDER_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getAccountHolderCode() { + return accountHolderCode; + } + + + @JsonProperty(JSON_PROPERTY_ACCOUNT_HOLDER_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAccountHolderCode(String accountHolderCode) { + this.accountHolderCode = accountHolderCode; + } + + + public UpdateAccountHolderResponse accountHolderDetails(AccountHolderDetails accountHolderDetails) { + this.accountHolderDetails = accountHolderDetails; + return this; + } + + /** + * Get accountHolderDetails + * @return accountHolderDetails + **/ + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_ACCOUNT_HOLDER_DETAILS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public AccountHolderDetails getAccountHolderDetails() { + return accountHolderDetails; + } + + + @JsonProperty(JSON_PROPERTY_ACCOUNT_HOLDER_DETAILS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAccountHolderDetails(AccountHolderDetails accountHolderDetails) { + this.accountHolderDetails = accountHolderDetails; + } + + + public UpdateAccountHolderResponse accountHolderStatus(AccountHolderStatus accountHolderStatus) { + this.accountHolderStatus = accountHolderStatus; + return this; + } + + /** + * Get accountHolderStatus + * @return accountHolderStatus + **/ + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_ACCOUNT_HOLDER_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public AccountHolderStatus getAccountHolderStatus() { + return accountHolderStatus; + } + + + @JsonProperty(JSON_PROPERTY_ACCOUNT_HOLDER_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAccountHolderStatus(AccountHolderStatus accountHolderStatus) { + this.accountHolderStatus = accountHolderStatus; + } + + + public UpdateAccountHolderResponse description(String description) { + this.description = description; + return this; + } + + /** + * The description of the account holder. + * @return description + **/ + @ApiModelProperty(value = "The description of the account holder.") + @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 UpdateAccountHolderResponse invalidFields(List invalidFields) { + this.invalidFields = invalidFields; + return this; + } + + public UpdateAccountHolderResponse addInvalidFieldsItem(ErrorFieldType invalidFieldsItem) { + if (this.invalidFields == null) { + this.invalidFields = new ArrayList<>(); + } + this.invalidFields.add(invalidFieldsItem); + return this; + } + + /** + * in case the account holder has not been updated, contains account holder fields, that did not pass the validation. + * @return invalidFields + **/ + @ApiModelProperty(value = "in case the account holder has not been updated, contains account holder fields, that did not pass the validation.") + @JsonProperty(JSON_PROPERTY_INVALID_FIELDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getInvalidFields() { + return invalidFields; + } + + + @JsonProperty(JSON_PROPERTY_INVALID_FIELDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setInvalidFields(List invalidFields) { + this.invalidFields = invalidFields; + } + + + public UpdateAccountHolderResponse legalEntity(LegalEntityEnum legalEntity) { + this.legalEntity = legalEntity; + return this; + } + + /** + * The legal entity of the account holder. + * @return legalEntity + **/ + @ApiModelProperty(value = "The legal entity of the account holder.") + @JsonProperty(JSON_PROPERTY_LEGAL_ENTITY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public LegalEntityEnum getLegalEntity() { + return legalEntity; + } + + + @JsonProperty(JSON_PROPERTY_LEGAL_ENTITY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setLegalEntity(LegalEntityEnum legalEntity) { + this.legalEntity = legalEntity; + } + + + public UpdateAccountHolderResponse primaryCurrency(String primaryCurrency) { + this.primaryCurrency = primaryCurrency; + return this; + } + + /** + * The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes), with which the prospective account holder primarily deals. + * @return primaryCurrency + * @deprecated + **/ + @Deprecated + @ApiModelProperty(value = "The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes), with which the prospective account holder primarily deals.") + @JsonProperty(JSON_PROPERTY_PRIMARY_CURRENCY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getPrimaryCurrency() { + return primaryCurrency; + } + + + @Deprecated + @JsonProperty(JSON_PROPERTY_PRIMARY_CURRENCY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPrimaryCurrency(String primaryCurrency) { + this.primaryCurrency = primaryCurrency; + } + + + public UpdateAccountHolderResponse pspReference(String pspReference) { + this.pspReference = pspReference; + return this; + } + + /** + * The reference of a request. Can be used to uniquely identify the request. + * @return pspReference + **/ + @ApiModelProperty(value = "The reference of a request. Can be used to uniquely identify the request.") + @JsonProperty(JSON_PROPERTY_PSP_REFERENCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getPspReference() { + return pspReference; + } + + + @JsonProperty(JSON_PROPERTY_PSP_REFERENCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPspReference(String pspReference) { + this.pspReference = pspReference; + } + + + public UpdateAccountHolderResponse resultCode(String resultCode) { + this.resultCode = resultCode; + return this; + } + + /** + * The result code. + * @return resultCode + **/ + @ApiModelProperty(value = "The result code.") + @JsonProperty(JSON_PROPERTY_RESULT_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getResultCode() { + return resultCode; + } + + + @JsonProperty(JSON_PROPERTY_RESULT_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setResultCode(String resultCode) { + this.resultCode = resultCode; + } + + + public UpdateAccountHolderResponse verification(KYCVerificationResult verification) { + this.verification = verification; + return this; + } + + /** + * Get verification + * @return verification + **/ + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_VERIFICATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public KYCVerificationResult getVerification() { + return verification; + } + + + @JsonProperty(JSON_PROPERTY_VERIFICATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setVerification(KYCVerificationResult verification) { + this.verification = verification; + } + + + public UpdateAccountHolderResponse verificationProfile(String verificationProfile) { + this.verificationProfile = verificationProfile; + return this; + } + + /** + * The identifier of the profile that applies to this entity. + * @return verificationProfile + **/ + @ApiModelProperty(value = "The identifier of the profile that applies to this entity.") + @JsonProperty(JSON_PROPERTY_VERIFICATION_PROFILE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getVerificationProfile() { + return verificationProfile; + } + + + @JsonProperty(JSON_PROPERTY_VERIFICATION_PROFILE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setVerificationProfile(String verificationProfile) { + this.verificationProfile = verificationProfile; + } + + + /** + * Return true if this UpdateAccountHolderResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UpdateAccountHolderResponse updateAccountHolderResponse = (UpdateAccountHolderResponse) o; + return Objects.equals(this.accountHolderCode, updateAccountHolderResponse.accountHolderCode) && + Objects.equals(this.accountHolderDetails, updateAccountHolderResponse.accountHolderDetails) && + Objects.equals(this.accountHolderStatus, updateAccountHolderResponse.accountHolderStatus) && + Objects.equals(this.description, updateAccountHolderResponse.description) && + Objects.equals(this.invalidFields, updateAccountHolderResponse.invalidFields) && + Objects.equals(this.legalEntity, updateAccountHolderResponse.legalEntity) && + Objects.equals(this.primaryCurrency, updateAccountHolderResponse.primaryCurrency) && + Objects.equals(this.pspReference, updateAccountHolderResponse.pspReference) && + Objects.equals(this.resultCode, updateAccountHolderResponse.resultCode) && + Objects.equals(this.verification, updateAccountHolderResponse.verification) && + Objects.equals(this.verificationProfile, updateAccountHolderResponse.verificationProfile); + } + + @Override + public int hashCode() { + return Objects.hash(accountHolderCode, accountHolderDetails, accountHolderStatus, description, invalidFields, legalEntity, primaryCurrency, pspReference, resultCode, verification, verificationProfile); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UpdateAccountHolderResponse {\n"); + sb.append(" accountHolderCode: ").append(toIndentedString(accountHolderCode)).append("\n"); + sb.append(" accountHolderDetails: ").append(toIndentedString(accountHolderDetails)).append("\n"); + sb.append(" accountHolderStatus: ").append(toIndentedString(accountHolderStatus)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" invalidFields: ").append(toIndentedString(invalidFields)).append("\n"); + sb.append(" legalEntity: ").append(toIndentedString(legalEntity)).append("\n"); + sb.append(" primaryCurrency: ").append(toIndentedString(primaryCurrency)).append("\n"); + sb.append(" pspReference: ").append(toIndentedString(pspReference)).append("\n"); + sb.append(" resultCode: ").append(toIndentedString(resultCode)).append("\n"); + sb.append(" verification: ").append(toIndentedString(verification)).append("\n"); + sb.append(" verificationProfile: ").append(toIndentedString(verificationProfile)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line 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 UpdateAccountHolderResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of UpdateAccountHolderResponse + * @throws JsonProcessingException if the JSON string is invalid with respect to UpdateAccountHolderResponse + */ + public static UpdateAccountHolderResponse fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, UpdateAccountHolderResponse.class); + } +/** + * Convert an instance of UpdateAccountHolderResponse 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/marketpayaccount/UpdateAccountHolderStateRequest.java b/src/main/java/com/adyen/model/marketpayaccount/UpdateAccountHolderStateRequest.java new file mode 100644 index 000000000..04e358a5f --- /dev/null +++ b/src/main/java/com/adyen/model/marketpayaccount/UpdateAccountHolderStateRequest.java @@ -0,0 +1,265 @@ +/* + * Account API + * This API is used for the classic integration. If you are just starting your implementation, refer to our [new integration guide](https://docs.adyen.com/marketplaces-and-platforms) instead. The Account API provides endpoints for managing account-related entities on your platform. These related entities include account holders, accounts, bank accounts, shareholders, and verification-related documents. The management operations include actions such as creation, retrieval, updating, and deletion of them. For more information, refer to our [documentation](https://docs.adyen.com/marketplaces-and-platforms/classic). ## Authentication Your Adyen contact will provide your API credential and an API key. To connect to the API, add an `X-API-Key` header with the API key as the value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: YOUR_API_KEY\" \\ ... ``` Alternatively, you can use the username and password to connect to the API using basic authentication. For example: ``` curl -U \"ws@MarketPlace.YOUR_PLATFORM_ACCOUNT\":\"YOUR_WS_PASSWORD\" \\ -H \"Content-Type: application/json\" \\ ... ``` When going live, you need to generate new web service user credentials to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning The Account API supports [versioning](https://docs.adyen.com/development-resources/versioning) using a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://cal-test.adyen.com/cal/services/Account/v6/createAccountHolder ``` + * + * The version of the OpenAPI document: 6 + * + * + * 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.marketpayaccount; + +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; + + +/** + * UpdateAccountHolderStateRequest + */ +@JsonPropertyOrder({ + UpdateAccountHolderStateRequest.JSON_PROPERTY_ACCOUNT_HOLDER_CODE, + UpdateAccountHolderStateRequest.JSON_PROPERTY_DISABLE, + UpdateAccountHolderStateRequest.JSON_PROPERTY_REASON, + UpdateAccountHolderStateRequest.JSON_PROPERTY_STATE_TYPE +}) + +public class UpdateAccountHolderStateRequest { + public static final String JSON_PROPERTY_ACCOUNT_HOLDER_CODE = "accountHolderCode"; + private String accountHolderCode; + + public static final String JSON_PROPERTY_DISABLE = "disable"; + private Boolean disable; + + public static final String JSON_PROPERTY_REASON = "reason"; + private String reason; + + /** + * The state to be updated. >Permitted values are: `Processing`, `Payout` + */ + public enum StateTypeEnum { + LIMITEDPAYOUT("LimitedPayout"), + + LIMITEDPROCESSING("LimitedProcessing"), + + LIMITLESSPAYOUT("LimitlessPayout"), + + LIMITLESSPROCESSING("LimitlessProcessing"), + + PAYOUT("Payout"), + + PROCESSING("Processing"); + + private String value; + + StateTypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StateTypeEnum fromValue(String value) { + for (StateTypeEnum b : StateTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_STATE_TYPE = "stateType"; + private StateTypeEnum stateType; + + public UpdateAccountHolderStateRequest() { + } + + public UpdateAccountHolderStateRequest accountHolderCode(String accountHolderCode) { + this.accountHolderCode = accountHolderCode; + return this; + } + + /** + * The code of the Account Holder on which to update the state. + * @return accountHolderCode + **/ + @ApiModelProperty(required = true, value = "The code of the Account Holder on which to update the state.") + @JsonProperty(JSON_PROPERTY_ACCOUNT_HOLDER_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getAccountHolderCode() { + return accountHolderCode; + } + + + @JsonProperty(JSON_PROPERTY_ACCOUNT_HOLDER_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAccountHolderCode(String accountHolderCode) { + this.accountHolderCode = accountHolderCode; + } + + + public UpdateAccountHolderStateRequest disable(Boolean disable) { + this.disable = disable; + return this; + } + + /** + * If true, disable the requested state. If false, enable the requested state. + * @return disable + **/ + @ApiModelProperty(required = true, value = "If true, disable the requested state. If false, enable the requested state.") + @JsonProperty(JSON_PROPERTY_DISABLE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getDisable() { + return disable; + } + + + @JsonProperty(JSON_PROPERTY_DISABLE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDisable(Boolean disable) { + this.disable = disable; + } + + + public UpdateAccountHolderStateRequest reason(String reason) { + this.reason = reason; + return this; + } + + /** + * The reason that the state is being updated. >Required if the state is being disabled. + * @return reason + **/ + @ApiModelProperty(value = "The reason that the state is being updated. >Required if the state is being disabled.") + @JsonProperty(JSON_PROPERTY_REASON) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getReason() { + return reason; + } + + + @JsonProperty(JSON_PROPERTY_REASON) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setReason(String reason) { + this.reason = reason; + } + + + public UpdateAccountHolderStateRequest stateType(StateTypeEnum stateType) { + this.stateType = stateType; + return this; + } + + /** + * The state to be updated. >Permitted values are: `Processing`, `Payout` + * @return stateType + **/ + @ApiModelProperty(required = true, value = "The state to be updated. >Permitted values are: `Processing`, `Payout`") + @JsonProperty(JSON_PROPERTY_STATE_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public StateTypeEnum getStateType() { + return stateType; + } + + + @JsonProperty(JSON_PROPERTY_STATE_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setStateType(StateTypeEnum stateType) { + this.stateType = stateType; + } + + + /** + * Return true if this UpdateAccountHolderStateRequest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UpdateAccountHolderStateRequest updateAccountHolderStateRequest = (UpdateAccountHolderStateRequest) o; + return Objects.equals(this.accountHolderCode, updateAccountHolderStateRequest.accountHolderCode) && + Objects.equals(this.disable, updateAccountHolderStateRequest.disable) && + Objects.equals(this.reason, updateAccountHolderStateRequest.reason) && + Objects.equals(this.stateType, updateAccountHolderStateRequest.stateType); + } + + @Override + public int hashCode() { + return Objects.hash(accountHolderCode, disable, reason, stateType); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UpdateAccountHolderStateRequest {\n"); + sb.append(" accountHolderCode: ").append(toIndentedString(accountHolderCode)).append("\n"); + sb.append(" disable: ").append(toIndentedString(disable)).append("\n"); + sb.append(" reason: ").append(toIndentedString(reason)).append("\n"); + sb.append(" stateType: ").append(toIndentedString(stateType)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line 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 UpdateAccountHolderStateRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of UpdateAccountHolderStateRequest + * @throws JsonProcessingException if the JSON string is invalid with respect to UpdateAccountHolderStateRequest + */ + public static UpdateAccountHolderStateRequest fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, UpdateAccountHolderStateRequest.class); + } +/** + * Convert an instance of UpdateAccountHolderStateRequest 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/marketpayaccount/UpdateAccountRequest.java b/src/main/java/com/adyen/model/marketpayaccount/UpdateAccountRequest.java new file mode 100644 index 000000000..c39f252e4 --- /dev/null +++ b/src/main/java/com/adyen/model/marketpayaccount/UpdateAccountRequest.java @@ -0,0 +1,364 @@ +/* + * Account API + * This API is used for the classic integration. If you are just starting your implementation, refer to our [new integration guide](https://docs.adyen.com/marketplaces-and-platforms) instead. The Account API provides endpoints for managing account-related entities on your platform. These related entities include account holders, accounts, bank accounts, shareholders, and verification-related documents. The management operations include actions such as creation, retrieval, updating, and deletion of them. For more information, refer to our [documentation](https://docs.adyen.com/marketplaces-and-platforms/classic). ## Authentication Your Adyen contact will provide your API credential and an API key. To connect to the API, add an `X-API-Key` header with the API key as the value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: YOUR_API_KEY\" \\ ... ``` Alternatively, you can use the username and password to connect to the API using basic authentication. For example: ``` curl -U \"ws@MarketPlace.YOUR_PLATFORM_ACCOUNT\":\"YOUR_WS_PASSWORD\" \\ -H \"Content-Type: application/json\" \\ ... ``` When going live, you need to generate new web service user credentials to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning The Account API supports [versioning](https://docs.adyen.com/development-resources/versioning) using a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://cal-test.adyen.com/cal/services/Account/v6/createAccountHolder ``` + * + * The version of the OpenAPI document: 6 + * + * + * 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.marketpayaccount; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.adyen.model.marketpayaccount.UpdatePayoutScheduleRequest; +import com.fasterxml.jackson.annotation.JsonInclude; +import 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; + + +/** + * UpdateAccountRequest + */ +@JsonPropertyOrder({ + UpdateAccountRequest.JSON_PROPERTY_ACCOUNT_CODE, + UpdateAccountRequest.JSON_PROPERTY_BANK_ACCOUNT_U_U_I_D, + UpdateAccountRequest.JSON_PROPERTY_DESCRIPTION, + UpdateAccountRequest.JSON_PROPERTY_METADATA, + UpdateAccountRequest.JSON_PROPERTY_PAYOUT_METHOD_CODE, + UpdateAccountRequest.JSON_PROPERTY_PAYOUT_SCHEDULE, + UpdateAccountRequest.JSON_PROPERTY_PAYOUT_SPEED +}) + +public class UpdateAccountRequest { + public static final String JSON_PROPERTY_ACCOUNT_CODE = "accountCode"; + private String accountCode; + + public static final String JSON_PROPERTY_BANK_ACCOUNT_U_U_I_D = "bankAccountUUID"; + private String bankAccountUUID; + + public static final String JSON_PROPERTY_DESCRIPTION = "description"; + private String description; + + public static final String JSON_PROPERTY_METADATA = "metadata"; + private Map metadata = null; + + public static final String JSON_PROPERTY_PAYOUT_METHOD_CODE = "payoutMethodCode"; + private String payoutMethodCode; + + public static final String JSON_PROPERTY_PAYOUT_SCHEDULE = "payoutSchedule"; + private UpdatePayoutScheduleRequest payoutSchedule; + + /** + * Speed with which payouts for this account are processed. Permitted values: `STANDARD`, `SAME_DAY`. + */ + public enum PayoutSpeedEnum { + INSTANT("INSTANT"), + + SAME_DAY("SAME_DAY"), + + STANDARD("STANDARD"); + + private String value; + + PayoutSpeedEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static PayoutSpeedEnum fromValue(String value) { + for (PayoutSpeedEnum b : PayoutSpeedEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_PAYOUT_SPEED = "payoutSpeed"; + private PayoutSpeedEnum payoutSpeed; + + public UpdateAccountRequest() { + } + + public UpdateAccountRequest accountCode(String accountCode) { + this.accountCode = accountCode; + return this; + } + + /** + * The code of the account to update. + * @return accountCode + **/ + @ApiModelProperty(required = true, value = "The code of the account to update.") + @JsonProperty(JSON_PROPERTY_ACCOUNT_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getAccountCode() { + return accountCode; + } + + + @JsonProperty(JSON_PROPERTY_ACCOUNT_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAccountCode(String accountCode) { + this.accountCode = accountCode; + } + + + public UpdateAccountRequest bankAccountUUID(String bankAccountUUID) { + this.bankAccountUUID = bankAccountUUID; + return this; + } + + /** + * The bankAccountUUID of the bank account held by the account holder to couple the account with. Scheduled payouts in currencies matching the currency of this bank account will be sent to this bank account. Payouts in different currencies will be sent to a matching bank account of the account holder. + * @return bankAccountUUID + **/ + @ApiModelProperty(value = "The bankAccountUUID of the bank account held by the account holder to couple the account with. Scheduled payouts in currencies matching the currency of this bank account will be sent to this bank account. Payouts in different currencies will be sent to a matching bank account of the account holder.") + @JsonProperty(JSON_PROPERTY_BANK_ACCOUNT_U_U_I_D) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getBankAccountUUID() { + return bankAccountUUID; + } + + + @JsonProperty(JSON_PROPERTY_BANK_ACCOUNT_U_U_I_D) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setBankAccountUUID(String bankAccountUUID) { + this.bankAccountUUID = bankAccountUUID; + } + + + public UpdateAccountRequest description(String description) { + this.description = description; + return this; + } + + /** + * A description of the account, maximum 256 characters.You can use alphanumeric characters (A-Z, a-z, 0-9), white spaces, and underscores `_`. + * @return description + **/ + @ApiModelProperty(value = "A description of the account, maximum 256 characters.You can use alphanumeric characters (A-Z, a-z, 0-9), white spaces, and underscores `_`.") + @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 UpdateAccountRequest metadata(Map metadata) { + this.metadata = metadata; + return this; + } + + public UpdateAccountRequest putMetadataItem(String key, String metadataItem) { + if (this.metadata == null) { + this.metadata = new HashMap<>(); + } + this.metadata.put(key, metadataItem); + return this; + } + + /** + * A set of key and value pairs for general use by the merchant. The keys do not have specific names and may be used for storing miscellaneous data as desired. > Note that during an update of metadata, the omission of existing key-value pairs will result in the deletion of those key-value pairs. + * @return metadata + **/ + @ApiModelProperty(value = "A set of key and value pairs for general use by the merchant. The keys do not have specific names and may be used for storing miscellaneous data as desired. > Note that during an update of metadata, the omission of existing key-value pairs will result in the deletion of those key-value pairs.") + @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 UpdateAccountRequest payoutMethodCode(String payoutMethodCode) { + this.payoutMethodCode = payoutMethodCode; + return this; + } + + /** + * The payout method code held by the account holder to couple the account with. Scheduled card payouts will be sent using this payout method code. + * @return payoutMethodCode + **/ + @ApiModelProperty(value = "The payout method code held by the account holder to couple the account with. Scheduled card payouts will be sent using this payout method code.") + @JsonProperty(JSON_PROPERTY_PAYOUT_METHOD_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getPayoutMethodCode() { + return payoutMethodCode; + } + + + @JsonProperty(JSON_PROPERTY_PAYOUT_METHOD_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPayoutMethodCode(String payoutMethodCode) { + this.payoutMethodCode = payoutMethodCode; + } + + + public UpdateAccountRequest payoutSchedule(UpdatePayoutScheduleRequest payoutSchedule) { + this.payoutSchedule = payoutSchedule; + return this; + } + + /** + * Get payoutSchedule + * @return payoutSchedule + **/ + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_PAYOUT_SCHEDULE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public UpdatePayoutScheduleRequest getPayoutSchedule() { + return payoutSchedule; + } + + + @JsonProperty(JSON_PROPERTY_PAYOUT_SCHEDULE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPayoutSchedule(UpdatePayoutScheduleRequest payoutSchedule) { + this.payoutSchedule = payoutSchedule; + } + + + public UpdateAccountRequest payoutSpeed(PayoutSpeedEnum payoutSpeed) { + this.payoutSpeed = payoutSpeed; + return this; + } + + /** + * Speed with which payouts for this account are processed. Permitted values: `STANDARD`, `SAME_DAY`. + * @return payoutSpeed + **/ + @ApiModelProperty(value = "Speed with which payouts for this account are processed. Permitted values: `STANDARD`, `SAME_DAY`.") + @JsonProperty(JSON_PROPERTY_PAYOUT_SPEED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public PayoutSpeedEnum getPayoutSpeed() { + return payoutSpeed; + } + + + @JsonProperty(JSON_PROPERTY_PAYOUT_SPEED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPayoutSpeed(PayoutSpeedEnum payoutSpeed) { + this.payoutSpeed = payoutSpeed; + } + + + /** + * Return true if this UpdateAccountRequest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UpdateAccountRequest updateAccountRequest = (UpdateAccountRequest) o; + return Objects.equals(this.accountCode, updateAccountRequest.accountCode) && + Objects.equals(this.bankAccountUUID, updateAccountRequest.bankAccountUUID) && + Objects.equals(this.description, updateAccountRequest.description) && + Objects.equals(this.metadata, updateAccountRequest.metadata) && + Objects.equals(this.payoutMethodCode, updateAccountRequest.payoutMethodCode) && + Objects.equals(this.payoutSchedule, updateAccountRequest.payoutSchedule) && + Objects.equals(this.payoutSpeed, updateAccountRequest.payoutSpeed); + } + + @Override + public int hashCode() { + return Objects.hash(accountCode, bankAccountUUID, description, metadata, payoutMethodCode, payoutSchedule, payoutSpeed); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UpdateAccountRequest {\n"); + sb.append(" accountCode: ").append(toIndentedString(accountCode)).append("\n"); + sb.append(" bankAccountUUID: ").append(toIndentedString(bankAccountUUID)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" metadata: ").append(toIndentedString(metadata)).append("\n"); + sb.append(" payoutMethodCode: ").append(toIndentedString(payoutMethodCode)).append("\n"); + sb.append(" payoutSchedule: ").append(toIndentedString(payoutSchedule)).append("\n"); + sb.append(" payoutSpeed: ").append(toIndentedString(payoutSpeed)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line 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 UpdateAccountRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of UpdateAccountRequest + * @throws JsonProcessingException if the JSON string is invalid with respect to UpdateAccountRequest + */ + public static UpdateAccountRequest fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, UpdateAccountRequest.class); + } +/** + * Convert an instance of UpdateAccountRequest 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/marketpayaccount/UpdateAccountResponse.java b/src/main/java/com/adyen/model/marketpayaccount/UpdateAccountResponse.java new file mode 100644 index 000000000..bdf8e24b3 --- /dev/null +++ b/src/main/java/com/adyen/model/marketpayaccount/UpdateAccountResponse.java @@ -0,0 +1,467 @@ +/* + * Account API + * This API is used for the classic integration. If you are just starting your implementation, refer to our [new integration guide](https://docs.adyen.com/marketplaces-and-platforms) instead. The Account API provides endpoints for managing account-related entities on your platform. These related entities include account holders, accounts, bank accounts, shareholders, and verification-related documents. The management operations include actions such as creation, retrieval, updating, and deletion of them. For more information, refer to our [documentation](https://docs.adyen.com/marketplaces-and-platforms/classic). ## Authentication Your Adyen contact will provide your API credential and an API key. To connect to the API, add an `X-API-Key` header with the API key as the value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: YOUR_API_KEY\" \\ ... ``` Alternatively, you can use the username and password to connect to the API using basic authentication. For example: ``` curl -U \"ws@MarketPlace.YOUR_PLATFORM_ACCOUNT\":\"YOUR_WS_PASSWORD\" \\ -H \"Content-Type: application/json\" \\ ... ``` When going live, you need to generate new web service user credentials to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning The Account API supports [versioning](https://docs.adyen.com/development-resources/versioning) using a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://cal-test.adyen.com/cal/services/Account/v6/createAccountHolder ``` + * + * The version of the OpenAPI document: 6 + * + * + * 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.marketpayaccount; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.adyen.model.marketpayaccount.ErrorFieldType; +import com.adyen.model.marketpayaccount.PayoutScheduleResponse; +import com.fasterxml.jackson.annotation.JsonInclude; +import 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.HashMap; +import java.util.List; +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.core.JsonProcessingException; + + +/** + * UpdateAccountResponse + */ +@JsonPropertyOrder({ + UpdateAccountResponse.JSON_PROPERTY_ACCOUNT_CODE, + UpdateAccountResponse.JSON_PROPERTY_BANK_ACCOUNT_U_U_I_D, + UpdateAccountResponse.JSON_PROPERTY_DESCRIPTION, + UpdateAccountResponse.JSON_PROPERTY_INVALID_FIELDS, + UpdateAccountResponse.JSON_PROPERTY_METADATA, + UpdateAccountResponse.JSON_PROPERTY_PAYOUT_METHOD_CODE, + UpdateAccountResponse.JSON_PROPERTY_PAYOUT_SCHEDULE, + UpdateAccountResponse.JSON_PROPERTY_PAYOUT_SPEED, + UpdateAccountResponse.JSON_PROPERTY_PSP_REFERENCE, + UpdateAccountResponse.JSON_PROPERTY_RESULT_CODE +}) + +public class UpdateAccountResponse { + public static final String JSON_PROPERTY_ACCOUNT_CODE = "accountCode"; + private String accountCode; + + public static final String JSON_PROPERTY_BANK_ACCOUNT_U_U_I_D = "bankAccountUUID"; + private String bankAccountUUID; + + public static final String JSON_PROPERTY_DESCRIPTION = "description"; + private String description; + + public static final String JSON_PROPERTY_INVALID_FIELDS = "invalidFields"; + private List invalidFields = null; + + public static final String JSON_PROPERTY_METADATA = "metadata"; + private Map metadata = null; + + public static final String JSON_PROPERTY_PAYOUT_METHOD_CODE = "payoutMethodCode"; + private String payoutMethodCode; + + public static final String JSON_PROPERTY_PAYOUT_SCHEDULE = "payoutSchedule"; + private PayoutScheduleResponse payoutSchedule; + + /** + * Speed with which payouts for this account are processed. Permitted values: `STANDARD`, `SAME_DAY`. + */ + public enum PayoutSpeedEnum { + INSTANT("INSTANT"), + + SAME_DAY("SAME_DAY"), + + STANDARD("STANDARD"); + + private String value; + + PayoutSpeedEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static PayoutSpeedEnum fromValue(String value) { + for (PayoutSpeedEnum b : PayoutSpeedEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_PAYOUT_SPEED = "payoutSpeed"; + private PayoutSpeedEnum payoutSpeed; + + public static final String JSON_PROPERTY_PSP_REFERENCE = "pspReference"; + private String pspReference; + + public static final String JSON_PROPERTY_RESULT_CODE = "resultCode"; + private String resultCode; + + public UpdateAccountResponse() { + } + + public UpdateAccountResponse accountCode(String accountCode) { + this.accountCode = accountCode; + return this; + } + + /** + * The code of the account. + * @return accountCode + **/ + @ApiModelProperty(required = true, value = "The code of the account.") + @JsonProperty(JSON_PROPERTY_ACCOUNT_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getAccountCode() { + return accountCode; + } + + + @JsonProperty(JSON_PROPERTY_ACCOUNT_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAccountCode(String accountCode) { + this.accountCode = accountCode; + } + + + public UpdateAccountResponse bankAccountUUID(String bankAccountUUID) { + this.bankAccountUUID = bankAccountUUID; + return this; + } + + /** + * The bankAccountUUID of the bank account held by the account holder to couple the account with. Scheduled payouts in currencies matching the currency of this bank account will be sent to this bank account. Payouts in different currencies will be sent to a matching bank account of the account holder. + * @return bankAccountUUID + **/ + @ApiModelProperty(value = "The bankAccountUUID of the bank account held by the account holder to couple the account with. Scheduled payouts in currencies matching the currency of this bank account will be sent to this bank account. Payouts in different currencies will be sent to a matching bank account of the account holder.") + @JsonProperty(JSON_PROPERTY_BANK_ACCOUNT_U_U_I_D) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getBankAccountUUID() { + return bankAccountUUID; + } + + + @JsonProperty(JSON_PROPERTY_BANK_ACCOUNT_U_U_I_D) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setBankAccountUUID(String bankAccountUUID) { + this.bankAccountUUID = bankAccountUUID; + } + + + public UpdateAccountResponse description(String description) { + this.description = description; + return this; + } + + /** + * The description of the account. + * @return description + **/ + @ApiModelProperty(value = "The description of the account.") + @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 UpdateAccountResponse invalidFields(List invalidFields) { + this.invalidFields = invalidFields; + return this; + } + + public UpdateAccountResponse addInvalidFieldsItem(ErrorFieldType invalidFieldsItem) { + if (this.invalidFields == null) { + this.invalidFields = new ArrayList<>(); + } + this.invalidFields.add(invalidFieldsItem); + return this; + } + + /** + * A list of fields that caused the `/updateAccount` request to fail. + * @return invalidFields + **/ + @ApiModelProperty(value = "A list of fields that caused the `/updateAccount` request to fail.") + @JsonProperty(JSON_PROPERTY_INVALID_FIELDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getInvalidFields() { + return invalidFields; + } + + + @JsonProperty(JSON_PROPERTY_INVALID_FIELDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setInvalidFields(List invalidFields) { + this.invalidFields = invalidFields; + } + + + public UpdateAccountResponse metadata(Map metadata) { + this.metadata = metadata; + return this; + } + + public UpdateAccountResponse putMetadataItem(String key, String metadataItem) { + if (this.metadata == null) { + this.metadata = new HashMap<>(); + } + this.metadata.put(key, metadataItem); + return this; + } + + /** + * A set of key and value pairs containing metadata. + * @return metadata + **/ + @ApiModelProperty(value = "A set of key and value pairs containing metadata.") + @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 UpdateAccountResponse payoutMethodCode(String payoutMethodCode) { + this.payoutMethodCode = payoutMethodCode; + return this; + } + + /** + * The payout method code held by the account holder to couple the account with. Scheduled card payouts will be sent using this payout method code. + * @return payoutMethodCode + **/ + @ApiModelProperty(value = "The payout method code held by the account holder to couple the account with. Scheduled card payouts will be sent using this payout method code.") + @JsonProperty(JSON_PROPERTY_PAYOUT_METHOD_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getPayoutMethodCode() { + return payoutMethodCode; + } + + + @JsonProperty(JSON_PROPERTY_PAYOUT_METHOD_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPayoutMethodCode(String payoutMethodCode) { + this.payoutMethodCode = payoutMethodCode; + } + + + public UpdateAccountResponse payoutSchedule(PayoutScheduleResponse payoutSchedule) { + this.payoutSchedule = payoutSchedule; + return this; + } + + /** + * Get payoutSchedule + * @return payoutSchedule + **/ + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_PAYOUT_SCHEDULE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public PayoutScheduleResponse getPayoutSchedule() { + return payoutSchedule; + } + + + @JsonProperty(JSON_PROPERTY_PAYOUT_SCHEDULE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPayoutSchedule(PayoutScheduleResponse payoutSchedule) { + this.payoutSchedule = payoutSchedule; + } + + + public UpdateAccountResponse payoutSpeed(PayoutSpeedEnum payoutSpeed) { + this.payoutSpeed = payoutSpeed; + return this; + } + + /** + * Speed with which payouts for this account are processed. Permitted values: `STANDARD`, `SAME_DAY`. + * @return payoutSpeed + **/ + @ApiModelProperty(value = "Speed with which payouts for this account are processed. Permitted values: `STANDARD`, `SAME_DAY`.") + @JsonProperty(JSON_PROPERTY_PAYOUT_SPEED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public PayoutSpeedEnum getPayoutSpeed() { + return payoutSpeed; + } + + + @JsonProperty(JSON_PROPERTY_PAYOUT_SPEED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPayoutSpeed(PayoutSpeedEnum payoutSpeed) { + this.payoutSpeed = payoutSpeed; + } + + + public UpdateAccountResponse pspReference(String pspReference) { + this.pspReference = pspReference; + return this; + } + + /** + * The reference of a request. Can be used to uniquely identify the request. + * @return pspReference + **/ + @ApiModelProperty(value = "The reference of a request. Can be used to uniquely identify the request.") + @JsonProperty(JSON_PROPERTY_PSP_REFERENCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getPspReference() { + return pspReference; + } + + + @JsonProperty(JSON_PROPERTY_PSP_REFERENCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPspReference(String pspReference) { + this.pspReference = pspReference; + } + + + public UpdateAccountResponse resultCode(String resultCode) { + this.resultCode = resultCode; + return this; + } + + /** + * The result code. + * @return resultCode + **/ + @ApiModelProperty(value = "The result code.") + @JsonProperty(JSON_PROPERTY_RESULT_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getResultCode() { + return resultCode; + } + + + @JsonProperty(JSON_PROPERTY_RESULT_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setResultCode(String resultCode) { + this.resultCode = resultCode; + } + + + /** + * Return true if this UpdateAccountResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UpdateAccountResponse updateAccountResponse = (UpdateAccountResponse) o; + return Objects.equals(this.accountCode, updateAccountResponse.accountCode) && + Objects.equals(this.bankAccountUUID, updateAccountResponse.bankAccountUUID) && + Objects.equals(this.description, updateAccountResponse.description) && + Objects.equals(this.invalidFields, updateAccountResponse.invalidFields) && + Objects.equals(this.metadata, updateAccountResponse.metadata) && + Objects.equals(this.payoutMethodCode, updateAccountResponse.payoutMethodCode) && + Objects.equals(this.payoutSchedule, updateAccountResponse.payoutSchedule) && + Objects.equals(this.payoutSpeed, updateAccountResponse.payoutSpeed) && + Objects.equals(this.pspReference, updateAccountResponse.pspReference) && + Objects.equals(this.resultCode, updateAccountResponse.resultCode); + } + + @Override + public int hashCode() { + return Objects.hash(accountCode, bankAccountUUID, description, invalidFields, metadata, payoutMethodCode, payoutSchedule, payoutSpeed, pspReference, resultCode); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UpdateAccountResponse {\n"); + sb.append(" accountCode: ").append(toIndentedString(accountCode)).append("\n"); + sb.append(" bankAccountUUID: ").append(toIndentedString(bankAccountUUID)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" invalidFields: ").append(toIndentedString(invalidFields)).append("\n"); + sb.append(" metadata: ").append(toIndentedString(metadata)).append("\n"); + sb.append(" payoutMethodCode: ").append(toIndentedString(payoutMethodCode)).append("\n"); + sb.append(" payoutSchedule: ").append(toIndentedString(payoutSchedule)).append("\n"); + sb.append(" payoutSpeed: ").append(toIndentedString(payoutSpeed)).append("\n"); + sb.append(" pspReference: ").append(toIndentedString(pspReference)).append("\n"); + sb.append(" resultCode: ").append(toIndentedString(resultCode)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line 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 UpdateAccountResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of UpdateAccountResponse + * @throws JsonProcessingException if the JSON string is invalid with respect to UpdateAccountResponse + */ + public static UpdateAccountResponse fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, UpdateAccountResponse.class); + } +/** + * Convert an instance of UpdateAccountResponse 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/marketpayaccount/UpdatePayoutScheduleRequest.java b/src/main/java/com/adyen/model/marketpayaccount/UpdatePayoutScheduleRequest.java new file mode 100644 index 000000000..c67ce40ef --- /dev/null +++ b/src/main/java/com/adyen/model/marketpayaccount/UpdatePayoutScheduleRequest.java @@ -0,0 +1,289 @@ +/* + * Account API + * This API is used for the classic integration. If you are just starting your implementation, refer to our [new integration guide](https://docs.adyen.com/marketplaces-and-platforms) instead. The Account API provides endpoints for managing account-related entities on your platform. These related entities include account holders, accounts, bank accounts, shareholders, and verification-related documents. The management operations include actions such as creation, retrieval, updating, and deletion of them. For more information, refer to our [documentation](https://docs.adyen.com/marketplaces-and-platforms/classic). ## Authentication Your Adyen contact will provide your API credential and an API key. To connect to the API, add an `X-API-Key` header with the API key as the value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: YOUR_API_KEY\" \\ ... ``` Alternatively, you can use the username and password to connect to the API using basic authentication. For example: ``` curl -U \"ws@MarketPlace.YOUR_PLATFORM_ACCOUNT\":\"YOUR_WS_PASSWORD\" \\ -H \"Content-Type: application/json\" \\ ... ``` When going live, you need to generate new web service user credentials to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning The Account API supports [versioning](https://docs.adyen.com/development-resources/versioning) using a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://cal-test.adyen.com/cal/services/Account/v6/createAccountHolder ``` + * + * The version of the OpenAPI document: 6 + * + * + * 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.marketpayaccount; + +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; + + +/** + * UpdatePayoutScheduleRequest + */ +@JsonPropertyOrder({ + UpdatePayoutScheduleRequest.JSON_PROPERTY_ACTION, + UpdatePayoutScheduleRequest.JSON_PROPERTY_REASON, + UpdatePayoutScheduleRequest.JSON_PROPERTY_SCHEDULE +}) + +public class UpdatePayoutScheduleRequest { + /** + * Direction on how to handle any payouts that have already been scheduled. Permitted values: * `CLOSE` will close the existing batch of payouts. * `UPDATE` will reschedule the existing batch to the new schedule. * `NOTHING` (**default**) will allow the payout to proceed. + */ + public enum ActionEnum { + CLOSE("CLOSE"), + + NOTHING("NOTHING"), + + UPDATE("UPDATE"); + + private String value; + + ActionEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static ActionEnum fromValue(String value) { + for (ActionEnum b : ActionEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_ACTION = "action"; + private ActionEnum action; + + public static final String JSON_PROPERTY_REASON = "reason"; + private String reason; + + /** + * The payout schedule to which the account is to be updated. Permitted values: `DAILY`, `DAILY_US`, `DAILY_EU`, `DAILY_AU`, `DAILY_SG`, `WEEKLY`, `WEEKLY_ON_TUE_FRI_MIDNIGHT`, `BIWEEKLY_ON_1ST_AND_15TH_AT_MIDNIGHT`, `MONTHLY`, `HOLD`. `HOLD` will prevent scheduled payouts from happening but will still allow manual payouts to occur. + */ + public enum ScheduleEnum { + BIWEEKLY_ON_1ST_AND_15TH_AT_MIDNIGHT("BIWEEKLY_ON_1ST_AND_15TH_AT_MIDNIGHT"), + + DAILY("DAILY"), + + DAILY_AU("DAILY_AU"), + + DAILY_EU("DAILY_EU"), + + DAILY_SG("DAILY_SG"), + + DAILY_US("DAILY_US"), + + HOLD("HOLD"), + + MONTHLY("MONTHLY"), + + WEEKLY("WEEKLY"), + + WEEKLY_MON_TO_FRI_AU("WEEKLY_MON_TO_FRI_AU"), + + WEEKLY_MON_TO_FRI_EU("WEEKLY_MON_TO_FRI_EU"), + + WEEKLY_MON_TO_FRI_US("WEEKLY_MON_TO_FRI_US"), + + WEEKLY_ON_TUE_FRI_MIDNIGHT("WEEKLY_ON_TUE_FRI_MIDNIGHT"), + + WEEKLY_SUN_TO_THU_AU("WEEKLY_SUN_TO_THU_AU"), + + WEEKLY_SUN_TO_THU_US("WEEKLY_SUN_TO_THU_US"); + + private String value; + + ScheduleEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static ScheduleEnum fromValue(String value) { + for (ScheduleEnum b : ScheduleEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_SCHEDULE = "schedule"; + private ScheduleEnum schedule; + + public UpdatePayoutScheduleRequest() { + } + + public UpdatePayoutScheduleRequest action(ActionEnum action) { + this.action = action; + return this; + } + + /** + * Direction on how to handle any payouts that have already been scheduled. Permitted values: * `CLOSE` will close the existing batch of payouts. * `UPDATE` will reschedule the existing batch to the new schedule. * `NOTHING` (**default**) will allow the payout to proceed. + * @return action + **/ + @ApiModelProperty(value = "Direction on how to handle any payouts that have already been scheduled. Permitted values: * `CLOSE` will close the existing batch of payouts. * `UPDATE` will reschedule the existing batch to the new schedule. * `NOTHING` (**default**) will allow the payout to proceed.") + @JsonProperty(JSON_PROPERTY_ACTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public ActionEnum getAction() { + return action; + } + + + @JsonProperty(JSON_PROPERTY_ACTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAction(ActionEnum action) { + this.action = action; + } + + + public UpdatePayoutScheduleRequest reason(String reason) { + this.reason = reason; + return this; + } + + /** + * The reason for the payout schedule update. > This field is required when the `schedule` parameter is set to `HOLD`. + * @return reason + **/ + @ApiModelProperty(value = "The reason for the payout schedule update. > This field is required when the `schedule` parameter is set to `HOLD`.") + @JsonProperty(JSON_PROPERTY_REASON) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getReason() { + return reason; + } + + + @JsonProperty(JSON_PROPERTY_REASON) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setReason(String reason) { + this.reason = reason; + } + + + public UpdatePayoutScheduleRequest schedule(ScheduleEnum schedule) { + this.schedule = schedule; + return this; + } + + /** + * The payout schedule to which the account is to be updated. Permitted values: `DAILY`, `DAILY_US`, `DAILY_EU`, `DAILY_AU`, `DAILY_SG`, `WEEKLY`, `WEEKLY_ON_TUE_FRI_MIDNIGHT`, `BIWEEKLY_ON_1ST_AND_15TH_AT_MIDNIGHT`, `MONTHLY`, `HOLD`. `HOLD` will prevent scheduled payouts from happening but will still allow manual payouts to occur. + * @return schedule + **/ + @ApiModelProperty(required = true, value = "The payout schedule to which the account is to be updated. Permitted values: `DAILY`, `DAILY_US`, `DAILY_EU`, `DAILY_AU`, `DAILY_SG`, `WEEKLY`, `WEEKLY_ON_TUE_FRI_MIDNIGHT`, `BIWEEKLY_ON_1ST_AND_15TH_AT_MIDNIGHT`, `MONTHLY`, `HOLD`. `HOLD` will prevent scheduled payouts from happening but will still allow manual payouts to occur.") + @JsonProperty(JSON_PROPERTY_SCHEDULE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public ScheduleEnum getSchedule() { + return schedule; + } + + + @JsonProperty(JSON_PROPERTY_SCHEDULE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSchedule(ScheduleEnum schedule) { + this.schedule = schedule; + } + + + /** + * Return true if this UpdatePayoutScheduleRequest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UpdatePayoutScheduleRequest updatePayoutScheduleRequest = (UpdatePayoutScheduleRequest) o; + return Objects.equals(this.action, updatePayoutScheduleRequest.action) && + Objects.equals(this.reason, updatePayoutScheduleRequest.reason) && + Objects.equals(this.schedule, updatePayoutScheduleRequest.schedule); + } + + @Override + public int hashCode() { + return Objects.hash(action, reason, schedule); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UpdatePayoutScheduleRequest {\n"); + sb.append(" action: ").append(toIndentedString(action)).append("\n"); + sb.append(" reason: ").append(toIndentedString(reason)).append("\n"); + sb.append(" schedule: ").append(toIndentedString(schedule)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +/** + * Create an instance of UpdatePayoutScheduleRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of UpdatePayoutScheduleRequest + * @throws JsonProcessingException if the JSON string is invalid with respect to UpdatePayoutScheduleRequest + */ + public static UpdatePayoutScheduleRequest fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, UpdatePayoutScheduleRequest.class); + } +/** + * Convert an instance of UpdatePayoutScheduleRequest 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/marketpayaccount/UploadDocumentRequest.java b/src/main/java/com/adyen/model/marketpayaccount/UploadDocumentRequest.java new file mode 100644 index 000000000..af91baf67 --- /dev/null +++ b/src/main/java/com/adyen/model/marketpayaccount/UploadDocumentRequest.java @@ -0,0 +1,161 @@ +/* + * Account API + * This API is used for the classic integration. If you are just starting your implementation, refer to our [new integration guide](https://docs.adyen.com/marketplaces-and-platforms) instead. The Account API provides endpoints for managing account-related entities on your platform. These related entities include account holders, accounts, bank accounts, shareholders, and verification-related documents. The management operations include actions such as creation, retrieval, updating, and deletion of them. For more information, refer to our [documentation](https://docs.adyen.com/marketplaces-and-platforms/classic). ## Authentication Your Adyen contact will provide your API credential and an API key. To connect to the API, add an `X-API-Key` header with the API key as the value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: YOUR_API_KEY\" \\ ... ``` Alternatively, you can use the username and password to connect to the API using basic authentication. For example: ``` curl -U \"ws@MarketPlace.YOUR_PLATFORM_ACCOUNT\":\"YOUR_WS_PASSWORD\" \\ -H \"Content-Type: application/json\" \\ ... ``` When going live, you need to generate new web service user credentials to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning The Account API supports [versioning](https://docs.adyen.com/development-resources/versioning) using a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://cal-test.adyen.com/cal/services/Account/v6/createAccountHolder ``` + * + * The version of the OpenAPI document: 6 + * + * + * 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.marketpayaccount; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.adyen.model.marketpayaccount.DocumentDetail; +import com.fasterxml.jackson.annotation.JsonInclude; +import 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; + + +/** + * UploadDocumentRequest + */ +@JsonPropertyOrder({ + UploadDocumentRequest.JSON_PROPERTY_DOCUMENT_CONTENT, + UploadDocumentRequest.JSON_PROPERTY_DOCUMENT_DETAIL +}) + +public class UploadDocumentRequest { + public static final String JSON_PROPERTY_DOCUMENT_CONTENT = "documentContent"; + private byte[] documentContent; + + public static final String JSON_PROPERTY_DOCUMENT_DETAIL = "documentDetail"; + private DocumentDetail documentDetail; + + public UploadDocumentRequest() { + } + + public UploadDocumentRequest documentContent(byte[] documentContent) { + this.documentContent = documentContent; + return this; + } + + /** + * The content of the document, in Base64-encoded string format. To learn about document requirements, refer to [Verification checks](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-checks). + * @return documentContent + **/ + @ApiModelProperty(required = true, value = "The content of the document, in Base64-encoded string format. To learn about document requirements, refer to [Verification checks](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-checks).") + @JsonProperty(JSON_PROPERTY_DOCUMENT_CONTENT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public byte[] getDocumentContent() { + return documentContent; + } + + + @JsonProperty(JSON_PROPERTY_DOCUMENT_CONTENT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDocumentContent(byte[] documentContent) { + this.documentContent = documentContent; + } + + + public UploadDocumentRequest documentDetail(DocumentDetail documentDetail) { + this.documentDetail = documentDetail; + return this; + } + + /** + * Get documentDetail + * @return documentDetail + **/ + @ApiModelProperty(required = true, value = "") + @JsonProperty(JSON_PROPERTY_DOCUMENT_DETAIL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public DocumentDetail getDocumentDetail() { + return documentDetail; + } + + + @JsonProperty(JSON_PROPERTY_DOCUMENT_DETAIL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDocumentDetail(DocumentDetail documentDetail) { + this.documentDetail = documentDetail; + } + + + /** + * Return true if this UploadDocumentRequest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UploadDocumentRequest uploadDocumentRequest = (UploadDocumentRequest) o; + return Arrays.equals(this.documentContent, uploadDocumentRequest.documentContent) && + Objects.equals(this.documentDetail, uploadDocumentRequest.documentDetail); + } + + @Override + public int hashCode() { + return Objects.hash(Arrays.hashCode(documentContent), documentDetail); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UploadDocumentRequest {\n"); + sb.append(" documentContent: ").append(toIndentedString(documentContent)).append("\n"); + sb.append(" documentDetail: ").append(toIndentedString(documentDetail)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line 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 UploadDocumentRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of UploadDocumentRequest + * @throws JsonProcessingException if the JSON string is invalid with respect to UploadDocumentRequest + */ + public static UploadDocumentRequest fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, UploadDocumentRequest.class); + } +/** + * Convert an instance of UploadDocumentRequest 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/marketpayaccount/ViasAddress.java b/src/main/java/com/adyen/model/marketpayaccount/ViasAddress.java new file mode 100644 index 000000000..dbc69ec48 --- /dev/null +++ b/src/main/java/com/adyen/model/marketpayaccount/ViasAddress.java @@ -0,0 +1,284 @@ +/* + * Account API + * This API is used for the classic integration. If you are just starting your implementation, refer to our [new integration guide](https://docs.adyen.com/marketplaces-and-platforms) instead. The Account API provides endpoints for managing account-related entities on your platform. These related entities include account holders, accounts, bank accounts, shareholders, and verification-related documents. The management operations include actions such as creation, retrieval, updating, and deletion of them. For more information, refer to our [documentation](https://docs.adyen.com/marketplaces-and-platforms/classic). ## Authentication Your Adyen contact will provide your API credential and an API key. To connect to the API, add an `X-API-Key` header with the API key as the value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: YOUR_API_KEY\" \\ ... ``` Alternatively, you can use the username and password to connect to the API using basic authentication. For example: ``` curl -U \"ws@MarketPlace.YOUR_PLATFORM_ACCOUNT\":\"YOUR_WS_PASSWORD\" \\ -H \"Content-Type: application/json\" \\ ... ``` When going live, you need to generate new web service user credentials to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning The Account API supports [versioning](https://docs.adyen.com/development-resources/versioning) using a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://cal-test.adyen.com/cal/services/Account/v6/createAccountHolder ``` + * + * The version of the OpenAPI document: 6 + * + * + * 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.marketpayaccount; + +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; + + +/** + * ViasAddress + */ +@JsonPropertyOrder({ + ViasAddress.JSON_PROPERTY_CITY, + ViasAddress.JSON_PROPERTY_COUNTRY, + ViasAddress.JSON_PROPERTY_HOUSE_NUMBER_OR_NAME, + ViasAddress.JSON_PROPERTY_POSTAL_CODE, + ViasAddress.JSON_PROPERTY_STATE_OR_PROVINCE, + ViasAddress.JSON_PROPERTY_STREET +}) + +public class ViasAddress { + 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 ViasAddress() { + } + + public ViasAddress city(String city) { + this.city = city; + return this; + } + + /** + * The name of the city. Required if the `houseNumberOrName`, `street`, `postalCode`, or `stateOrProvince` are provided. + * @return city + **/ + @ApiModelProperty(value = "The name of the city. Required if the `houseNumberOrName`, `street`, `postalCode`, or `stateOrProvince` are provided.") + @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 ViasAddress country(String country) { + this.country = country; + return this; + } + + /** + * The two-character country code of the address in ISO-3166-1 alpha-2 format. For example, **NL**. + * @return country + **/ + @ApiModelProperty(required = true, value = "The two-character country code of the address in ISO-3166-1 alpha-2 format. For example, **NL**.") + @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 ViasAddress houseNumberOrName(String houseNumberOrName) { + this.houseNumberOrName = houseNumberOrName; + return this; + } + + /** + * The number or name of the house. + * @return houseNumberOrName + **/ + @ApiModelProperty(value = "The number or name of the house.") + @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 ViasAddress postalCode(String postalCode) { + this.postalCode = postalCode; + return this; + } + + /** + * The postal code. Required if the `houseNumberOrName`, `street`, `city`, or `stateOrProvince` are provided. Maximum length: * 5 digits for addresses in the US. * 10 characters for all other countries. + * @return postalCode + **/ + @ApiModelProperty(value = "The postal code. Required if the `houseNumberOrName`, `street`, `city`, or `stateOrProvince` are provided. Maximum length: * 5 digits for addresses in the US. * 10 characters for 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 ViasAddress stateOrProvince(String stateOrProvince) { + this.stateOrProvince = stateOrProvince; + return this; + } + + /** + * The abbreviation of the state or province. Required if the `houseNumberOrName`, `street`, `city`, or `postalCode` are provided. Maximum length: * 2 characters for addresses in the US or Canada. * 3 characters for all other countries. + * @return stateOrProvince + **/ + @ApiModelProperty(value = "The abbreviation of the state or province. Required if the `houseNumberOrName`, `street`, `city`, or `postalCode` are provided. Maximum length: * 2 characters for addresses in the US or Canada. * 3 characters for all other countries. ") + @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 ViasAddress street(String street) { + this.street = street; + return this; + } + + /** + * The name of the street. Required if the `houseNumberOrName`, `city`, `postalCode`, or `stateOrProvince` are provided. + * @return street + **/ + @ApiModelProperty(value = "The name of the street. Required if the `houseNumberOrName`, `city`, `postalCode`, or `stateOrProvince` are provided.") + @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 ViasAddress object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ViasAddress viasAddress = (ViasAddress) o; + return Objects.equals(this.city, viasAddress.city) && + Objects.equals(this.country, viasAddress.country) && + Objects.equals(this.houseNumberOrName, viasAddress.houseNumberOrName) && + Objects.equals(this.postalCode, viasAddress.postalCode) && + Objects.equals(this.stateOrProvince, viasAddress.stateOrProvince) && + Objects.equals(this.street, viasAddress.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 ViasAddress {\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 ViasAddress given an JSON string + * + * @param jsonString JSON string + * @return An instance of ViasAddress + * @throws JsonProcessingException if the JSON string is invalid with respect to ViasAddress + */ + public static ViasAddress fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, ViasAddress.class); + } +/** + * Convert an instance of ViasAddress 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/marketpayaccount/ViasName.java b/src/main/java/com/adyen/model/marketpayaccount/ViasName.java new file mode 100644 index 000000000..ea252b6ce --- /dev/null +++ b/src/main/java/com/adyen/model/marketpayaccount/ViasName.java @@ -0,0 +1,259 @@ +/* + * Account API + * This API is used for the classic integration. If you are just starting your implementation, refer to our [new integration guide](https://docs.adyen.com/marketplaces-and-platforms) instead. The Account API provides endpoints for managing account-related entities on your platform. These related entities include account holders, accounts, bank accounts, shareholders, and verification-related documents. The management operations include actions such as creation, retrieval, updating, and deletion of them. For more information, refer to our [documentation](https://docs.adyen.com/marketplaces-and-platforms/classic). ## Authentication Your Adyen contact will provide your API credential and an API key. To connect to the API, add an `X-API-Key` header with the API key as the value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: YOUR_API_KEY\" \\ ... ``` Alternatively, you can use the username and password to connect to the API using basic authentication. For example: ``` curl -U \"ws@MarketPlace.YOUR_PLATFORM_ACCOUNT\":\"YOUR_WS_PASSWORD\" \\ -H \"Content-Type: application/json\" \\ ... ``` When going live, you need to generate new web service user credentials to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning The Account API supports [versioning](https://docs.adyen.com/development-resources/versioning) using a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://cal-test.adyen.com/cal/services/Account/v6/createAccountHolder ``` + * + * The version of the OpenAPI document: 6 + * + * + * 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.marketpayaccount; + +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; + + +/** + * ViasName + */ +@JsonPropertyOrder({ + ViasName.JSON_PROPERTY_FIRST_NAME, + ViasName.JSON_PROPERTY_GENDER, + ViasName.JSON_PROPERTY_INFIX, + ViasName.JSON_PROPERTY_LAST_NAME +}) + +public class ViasName { + public static final String JSON_PROPERTY_FIRST_NAME = "firstName"; + private String firstName; + + /** + * The gender. >The following values are permitted: `MALE`, `FEMALE`, `UNKNOWN`. + */ + public enum GenderEnum { + MALE("MALE"), + + FEMALE("FEMALE"), + + UNKNOWN("UNKNOWN"); + + private String value; + + GenderEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static GenderEnum fromValue(String value) { + for (GenderEnum b : GenderEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_GENDER = "gender"; + private GenderEnum gender; + + public static final String JSON_PROPERTY_INFIX = "infix"; + private String infix; + + public static final String JSON_PROPERTY_LAST_NAME = "lastName"; + private String lastName; + + public ViasName() { + } + + public ViasName firstName(String firstName) { + this.firstName = firstName; + return this; + } + + /** + * The first name. + * @return firstName + **/ + @ApiModelProperty(value = "The first name.") + @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 ViasName gender(GenderEnum gender) { + this.gender = gender; + return this; + } + + /** + * The gender. >The following values are permitted: `MALE`, `FEMALE`, `UNKNOWN`. + * @return gender + **/ + @ApiModelProperty(value = "The gender. >The following values are permitted: `MALE`, `FEMALE`, `UNKNOWN`.") + @JsonProperty(JSON_PROPERTY_GENDER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public GenderEnum getGender() { + return gender; + } + + + @JsonProperty(JSON_PROPERTY_GENDER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setGender(GenderEnum gender) { + this.gender = gender; + } + + + public ViasName infix(String infix) { + this.infix = infix; + return this; + } + + /** + * The name's infix, if applicable. >A maximum length of twenty (20) characters is imposed. + * @return infix + **/ + @ApiModelProperty(value = "The name's infix, if applicable. >A maximum length of twenty (20) characters is imposed.") + @JsonProperty(JSON_PROPERTY_INFIX) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getInfix() { + return infix; + } + + + @JsonProperty(JSON_PROPERTY_INFIX) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setInfix(String infix) { + this.infix = infix; + } + + + public ViasName lastName(String lastName) { + this.lastName = lastName; + return this; + } + + /** + * The last name. + * @return lastName + **/ + @ApiModelProperty(value = "The last name.") + @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; + } + + + /** + * Return true if this ViasName object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ViasName viasName = (ViasName) o; + return Objects.equals(this.firstName, viasName.firstName) && + Objects.equals(this.gender, viasName.gender) && + Objects.equals(this.infix, viasName.infix) && + Objects.equals(this.lastName, viasName.lastName); + } + + @Override + public int hashCode() { + return Objects.hash(firstName, gender, infix, lastName); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ViasName {\n"); + sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n"); + sb.append(" gender: ").append(toIndentedString(gender)).append("\n"); + sb.append(" infix: ").append(toIndentedString(infix)).append("\n"); + sb.append(" lastName: ").append(toIndentedString(lastName)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line 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 ViasName given an JSON string + * + * @param jsonString JSON string + * @return An instance of ViasName + * @throws JsonProcessingException if the JSON string is invalid with respect to ViasName + */ + public static ViasName fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, ViasName.class); + } +/** + * Convert an instance of ViasName 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/marketpayaccount/ViasPersonalData.java b/src/main/java/com/adyen/model/marketpayaccount/ViasPersonalData.java new file mode 100644 index 000000000..0942f590f --- /dev/null +++ b/src/main/java/com/adyen/model/marketpayaccount/ViasPersonalData.java @@ -0,0 +1,202 @@ +/* + * Account API + * This API is used for the classic integration. If you are just starting your implementation, refer to our [new integration guide](https://docs.adyen.com/marketplaces-and-platforms) instead. The Account API provides endpoints for managing account-related entities on your platform. These related entities include account holders, accounts, bank accounts, shareholders, and verification-related documents. The management operations include actions such as creation, retrieval, updating, and deletion of them. For more information, refer to our [documentation](https://docs.adyen.com/marketplaces-and-platforms/classic). ## Authentication Your Adyen contact will provide your API credential and an API key. To connect to the API, add an `X-API-Key` header with the API key as the value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: YOUR_API_KEY\" \\ ... ``` Alternatively, you can use the username and password to connect to the API using basic authentication. For example: ``` curl -U \"ws@MarketPlace.YOUR_PLATFORM_ACCOUNT\":\"YOUR_WS_PASSWORD\" \\ -H \"Content-Type: application/json\" \\ ... ``` When going live, you need to generate new web service user credentials to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning The Account API supports [versioning](https://docs.adyen.com/development-resources/versioning) using a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://cal-test.adyen.com/cal/services/Account/v6/createAccountHolder ``` + * + * The version of the OpenAPI document: 6 + * + * + * 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.marketpayaccount; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.adyen.model.marketpayaccount.PersonalDocumentData; +import com.fasterxml.jackson.annotation.JsonInclude; +import 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; + + +/** + * ViasPersonalData + */ +@JsonPropertyOrder({ + ViasPersonalData.JSON_PROPERTY_DATE_OF_BIRTH, + ViasPersonalData.JSON_PROPERTY_DOCUMENT_DATA, + ViasPersonalData.JSON_PROPERTY_NATIONALITY +}) + +public class ViasPersonalData { + public static final String JSON_PROPERTY_DATE_OF_BIRTH = "dateOfBirth"; + private String dateOfBirth; + + public static final String JSON_PROPERTY_DOCUMENT_DATA = "documentData"; + private List documentData = null; + + public static final String JSON_PROPERTY_NATIONALITY = "nationality"; + private String nationality; + + public ViasPersonalData() { + } + + public ViasPersonalData dateOfBirth(String dateOfBirth) { + this.dateOfBirth = dateOfBirth; + return this; + } + + /** + * The person's date of birth, in ISO-8601 YYYY-MM-DD format. For example, **2000-01-31**. + * @return dateOfBirth + **/ + @ApiModelProperty(value = "The person's date of birth, in ISO-8601 YYYY-MM-DD format. For example, **2000-01-31**.") + @JsonProperty(JSON_PROPERTY_DATE_OF_BIRTH) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getDateOfBirth() { + return dateOfBirth; + } + + + @JsonProperty(JSON_PROPERTY_DATE_OF_BIRTH) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDateOfBirth(String dateOfBirth) { + this.dateOfBirth = dateOfBirth; + } + + + public ViasPersonalData documentData(List documentData) { + this.documentData = documentData; + return this; + } + + public ViasPersonalData addDocumentDataItem(PersonalDocumentData documentDataItem) { + if (this.documentData == null) { + this.documentData = new ArrayList<>(); + } + this.documentData.add(documentDataItem); + return this; + } + + /** + * Array that contains information about the person's identification document. You can submit only one entry per document type. + * @return documentData + **/ + @ApiModelProperty(value = "Array that contains information about the person's identification document. You can submit only one entry per document type.") + @JsonProperty(JSON_PROPERTY_DOCUMENT_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getDocumentData() { + return documentData; + } + + + @JsonProperty(JSON_PROPERTY_DOCUMENT_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDocumentData(List documentData) { + this.documentData = documentData; + } + + + public ViasPersonalData nationality(String nationality) { + this.nationality = nationality; + return this; + } + + /** + * The nationality of the person represented by a two-character country code, in [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format. For example, **NL**. + * @return nationality + **/ + @ApiModelProperty(value = "The nationality of the person represented by a two-character country code, in [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format. For example, **NL**. ") + @JsonProperty(JSON_PROPERTY_NATIONALITY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getNationality() { + return nationality; + } + + + @JsonProperty(JSON_PROPERTY_NATIONALITY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setNationality(String nationality) { + this.nationality = nationality; + } + + + /** + * Return true if this ViasPersonalData object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ViasPersonalData viasPersonalData = (ViasPersonalData) o; + return Objects.equals(this.dateOfBirth, viasPersonalData.dateOfBirth) && + Objects.equals(this.documentData, viasPersonalData.documentData) && + Objects.equals(this.nationality, viasPersonalData.nationality); + } + + @Override + public int hashCode() { + return Objects.hash(dateOfBirth, documentData, nationality); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ViasPersonalData {\n"); + sb.append(" dateOfBirth: ").append(toIndentedString(dateOfBirth)).append("\n"); + sb.append(" documentData: ").append(toIndentedString(documentData)).append("\n"); + sb.append(" nationality: ").append(toIndentedString(nationality)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line 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 ViasPersonalData given an JSON string + * + * @param jsonString JSON string + * @return An instance of ViasPersonalData + * @throws JsonProcessingException if the JSON string is invalid with respect to ViasPersonalData + */ + public static ViasPersonalData fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, ViasPersonalData.class); + } +/** + * Convert an instance of ViasPersonalData 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/marketpayaccount/ViasPhoneNumber.java b/src/main/java/com/adyen/model/marketpayaccount/ViasPhoneNumber.java new file mode 100644 index 000000000..9ee180527 --- /dev/null +++ b/src/main/java/com/adyen/model/marketpayaccount/ViasPhoneNumber.java @@ -0,0 +1,230 @@ +/* + * Account API + * This API is used for the classic integration. If you are just starting your implementation, refer to our [new integration guide](https://docs.adyen.com/marketplaces-and-platforms) instead. The Account API provides endpoints for managing account-related entities on your platform. These related entities include account holders, accounts, bank accounts, shareholders, and verification-related documents. The management operations include actions such as creation, retrieval, updating, and deletion of them. For more information, refer to our [documentation](https://docs.adyen.com/marketplaces-and-platforms/classic). ## Authentication Your Adyen contact will provide your API credential and an API key. To connect to the API, add an `X-API-Key` header with the API key as the value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: YOUR_API_KEY\" \\ ... ``` Alternatively, you can use the username and password to connect to the API using basic authentication. For example: ``` curl -U \"ws@MarketPlace.YOUR_PLATFORM_ACCOUNT\":\"YOUR_WS_PASSWORD\" \\ -H \"Content-Type: application/json\" \\ ... ``` When going live, you need to generate new web service user credentials to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning The Account API supports [versioning](https://docs.adyen.com/development-resources/versioning) using a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://cal-test.adyen.com/cal/services/Account/v6/createAccountHolder ``` + * + * The version of the OpenAPI document: 6 + * + * + * 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.marketpayaccount; + +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; + + +/** + * ViasPhoneNumber + */ +@JsonPropertyOrder({ + ViasPhoneNumber.JSON_PROPERTY_PHONE_COUNTRY_CODE, + ViasPhoneNumber.JSON_PROPERTY_PHONE_NUMBER, + ViasPhoneNumber.JSON_PROPERTY_PHONE_TYPE +}) + +public class ViasPhoneNumber { + public static final String JSON_PROPERTY_PHONE_COUNTRY_CODE = "phoneCountryCode"; + private String phoneCountryCode; + + public static final String JSON_PROPERTY_PHONE_NUMBER = "phoneNumber"; + private String phoneNumber; + + /** + * The type of the phone number. >The following values are permitted: `Landline`, `Mobile`, `SIP`, `Fax`. + */ + public enum PhoneTypeEnum { + FAX("Fax"), + + LANDLINE("Landline"), + + MOBILE("Mobile"), + + SIP("SIP"); + + private String value; + + PhoneTypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static PhoneTypeEnum fromValue(String value) { + for (PhoneTypeEnum b : PhoneTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_PHONE_TYPE = "phoneType"; + private PhoneTypeEnum phoneType; + + public ViasPhoneNumber() { + } + + public ViasPhoneNumber phoneCountryCode(String phoneCountryCode) { + this.phoneCountryCode = phoneCountryCode; + return this; + } + + /** + * The two-character country code of the phone number. >The permitted country codes are defined in ISO-3166-1 alpha-2 (e.g. 'NL'). + * @return phoneCountryCode + **/ + @ApiModelProperty(value = "The two-character country code of the phone number. >The permitted country codes are defined in ISO-3166-1 alpha-2 (e.g. 'NL').") + @JsonProperty(JSON_PROPERTY_PHONE_COUNTRY_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getPhoneCountryCode() { + return phoneCountryCode; + } + + + @JsonProperty(JSON_PROPERTY_PHONE_COUNTRY_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPhoneCountryCode(String phoneCountryCode) { + this.phoneCountryCode = phoneCountryCode; + } + + + public ViasPhoneNumber phoneNumber(String phoneNumber) { + this.phoneNumber = phoneNumber; + return this; + } + + /** + * The phone number. >The inclusion of the phone number country code is not necessary. + * @return phoneNumber + **/ + @ApiModelProperty(value = "The phone number. >The inclusion of the phone number country code is not necessary.") + @JsonProperty(JSON_PROPERTY_PHONE_NUMBER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getPhoneNumber() { + return phoneNumber; + } + + + @JsonProperty(JSON_PROPERTY_PHONE_NUMBER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPhoneNumber(String phoneNumber) { + this.phoneNumber = phoneNumber; + } + + + public ViasPhoneNumber phoneType(PhoneTypeEnum phoneType) { + this.phoneType = phoneType; + return this; + } + + /** + * The type of the phone number. >The following values are permitted: `Landline`, `Mobile`, `SIP`, `Fax`. + * @return phoneType + **/ + @ApiModelProperty(value = "The type of the phone number. >The following values are permitted: `Landline`, `Mobile`, `SIP`, `Fax`.") + @JsonProperty(JSON_PROPERTY_PHONE_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public PhoneTypeEnum getPhoneType() { + return phoneType; + } + + + @JsonProperty(JSON_PROPERTY_PHONE_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPhoneType(PhoneTypeEnum phoneType) { + this.phoneType = phoneType; + } + + + /** + * Return true if this ViasPhoneNumber object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ViasPhoneNumber viasPhoneNumber = (ViasPhoneNumber) o; + return Objects.equals(this.phoneCountryCode, viasPhoneNumber.phoneCountryCode) && + Objects.equals(this.phoneNumber, viasPhoneNumber.phoneNumber) && + Objects.equals(this.phoneType, viasPhoneNumber.phoneType); + } + + @Override + public int hashCode() { + return Objects.hash(phoneCountryCode, phoneNumber, phoneType); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ViasPhoneNumber {\n"); + sb.append(" phoneCountryCode: ").append(toIndentedString(phoneCountryCode)).append("\n"); + sb.append(" phoneNumber: ").append(toIndentedString(phoneNumber)).append("\n"); + sb.append(" phoneType: ").append(toIndentedString(phoneType)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line 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 ViasPhoneNumber given an JSON string + * + * @param jsonString JSON string + * @return An instance of ViasPhoneNumber + * @throws JsonProcessingException if the JSON string is invalid with respect to ViasPhoneNumber + */ + public static ViasPhoneNumber fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, ViasPhoneNumber.class); + } +/** + * Convert an instance of ViasPhoneNumber 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/marketpayconfiguration/AbstractOpenApiSchema.java b/src/main/java/com/adyen/model/marketpayconfiguration/AbstractOpenApiSchema.java new file mode 100644 index 000000000..1d0aa6a67 --- /dev/null +++ b/src/main/java/com/adyen/model/marketpayconfiguration/AbstractOpenApiSchema.java @@ -0,0 +1,148 @@ +/* + * Notification Configuration API + * This API is used for the classic integration. If you are just starting your implementation, refer to our [new integration guide](https://docs.adyen.com/marketplaces-and-platforms) instead. The Notification Configuration API provides endpoints for setting up and testing notifications that inform you of events on your platform, for example when a verification check or a payout has been completed. For more information, refer to our [documentation](https://docs.adyen.com/marketplaces-and-platforms/classic/notifications). ## Authentication Your Adyen contact will provide your API credential and an API key. To connect to the API, add an `X-API-Key` header with the API key as the value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: YOUR_API_KEY\" \\ ... ``` Alternatively, you can use the username and password to connect to the API using basic authentication. For example: ``` curl -U \"ws@MarketPlace.YOUR_PLATFORM_ACCOUNT\":\"YOUR_WS_PASSWORD\" \\ -H \"Content-Type: application/json\" \\ ... ``` When going live, you need to generate new web service user credentials to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning The Notification Configuration API supports [versioning](https://docs.adyen.com/development-resources/versioning) using a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://cal-test.adyen.com/cal/services/Notification/v6/createNotificationConfiguration ``` + * + * The version of the OpenAPI document: 6 + * + * + * 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.marketpayconfiguration; + +import java.util.Objects; +import java.lang.reflect.Type; +import java.util.Map; +import jakarta.ws.rs.core.GenericType; + +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Abstract class for oneOf,anyOf schemas defined in OpenAPI spec + */ + +public abstract class AbstractOpenApiSchema { + + // store the actual instance of the schema/object + private Object instance; + + // is nullable + private Boolean isNullable; + + // schema type (e.g. oneOf, anyOf) + private final String schemaType; + + public AbstractOpenApiSchema(String schemaType, Boolean isNullable) { + this.schemaType = schemaType; + this.isNullable = isNullable; + } + + /** + * Get the list of oneOf/anyOf composed schemas allowed to be stored in this object + * + * @return an instance of the actual schema/object + */ + public abstract Map getSchemas(); + + /** + * Get the actual instance + * + * @return an instance of the actual schema/object + */ + @JsonValue + public Object getActualInstance() {return instance;} + + /** + * Set the actual instance + * + * @param instance the actual instance of the schema/object + */ + public void setActualInstance(Object instance) {this.instance = instance;} + + /** + * Get the instant recursively when the schemas defined in oneOf/anyof happen to be oneOf/anyOf schema as well + * + * @return an instance of the actual schema/object + */ + public Object getActualInstanceRecursively() { + return getActualInstanceRecursively(this); + } + + private Object getActualInstanceRecursively(AbstractOpenApiSchema object) { + if (object.getActualInstance() == null) { + return null; + } else if (object.getActualInstance() instanceof AbstractOpenApiSchema) { + return getActualInstanceRecursively((AbstractOpenApiSchema)object.getActualInstance()); + } else { + return object.getActualInstance(); + } + } + + /** + * Get the schema type (e.g. anyOf, oneOf) + * + * @return the schema type + */ + public String getSchemaType() { + return schemaType; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ").append(getClass()).append(" {\n"); + sb.append(" instance: ").append(toIndentedString(instance)).append("\n"); + sb.append(" isNullable: ").append(toIndentedString(isNullable)).append("\n"); + sb.append(" schemaType: ").append(toIndentedString(schemaType)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AbstractOpenApiSchema a = (AbstractOpenApiSchema) o; + return Objects.equals(this.instance, a.instance) && + Objects.equals(this.isNullable, a.isNullable) && + Objects.equals(this.schemaType, a.schemaType); + } + + @Override + public int hashCode() { + return Objects.hash(instance, isNullable, schemaType); + } + + /** + * Is nullable + * + * @return true if it's nullable + */ + public Boolean isNullable() { + if (Boolean.TRUE.equals(isNullable)) { + return Boolean.TRUE; + } else { + return Boolean.FALSE; + } + } + + + +} diff --git a/src/main/java/com/adyen/model/marketpayconfiguration/CreateNotificationConfigurationRequest.java b/src/main/java/com/adyen/model/marketpayconfiguration/CreateNotificationConfigurationRequest.java new file mode 100644 index 000000000..0a0d264b2 --- /dev/null +++ b/src/main/java/com/adyen/model/marketpayconfiguration/CreateNotificationConfigurationRequest.java @@ -0,0 +1,130 @@ +/* + * Notification Configuration API + * This API is used for the classic integration. If you are just starting your implementation, refer to our [new integration guide](https://docs.adyen.com/marketplaces-and-platforms) instead. The Notification Configuration API provides endpoints for setting up and testing notifications that inform you of events on your platform, for example when a verification check or a payout has been completed. For more information, refer to our [documentation](https://docs.adyen.com/marketplaces-and-platforms/classic/notifications). ## Authentication Your Adyen contact will provide your API credential and an API key. To connect to the API, add an `X-API-Key` header with the API key as the value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: YOUR_API_KEY\" \\ ... ``` Alternatively, you can use the username and password to connect to the API using basic authentication. For example: ``` curl -U \"ws@MarketPlace.YOUR_PLATFORM_ACCOUNT\":\"YOUR_WS_PASSWORD\" \\ -H \"Content-Type: application/json\" \\ ... ``` When going live, you need to generate new web service user credentials to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning The Notification Configuration API supports [versioning](https://docs.adyen.com/development-resources/versioning) using a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://cal-test.adyen.com/cal/services/Notification/v6/createNotificationConfiguration ``` + * + * The version of the OpenAPI document: 6 + * + * + * 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.marketpayconfiguration; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.adyen.model.marketpayconfiguration.NotificationConfigurationDetails; +import com.fasterxml.jackson.annotation.JsonInclude; +import 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; + + +/** + * CreateNotificationConfigurationRequest + */ +@JsonPropertyOrder({ + CreateNotificationConfigurationRequest.JSON_PROPERTY_CONFIGURATION_DETAILS +}) + +public class CreateNotificationConfigurationRequest { + public static final String JSON_PROPERTY_CONFIGURATION_DETAILS = "configurationDetails"; + private NotificationConfigurationDetails configurationDetails; + + public CreateNotificationConfigurationRequest() { + } + + public CreateNotificationConfigurationRequest configurationDetails(NotificationConfigurationDetails configurationDetails) { + this.configurationDetails = configurationDetails; + return this; + } + + /** + * Get configurationDetails + * @return configurationDetails + **/ + @ApiModelProperty(required = true, value = "") + @JsonProperty(JSON_PROPERTY_CONFIGURATION_DETAILS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public NotificationConfigurationDetails getConfigurationDetails() { + return configurationDetails; + } + + + @JsonProperty(JSON_PROPERTY_CONFIGURATION_DETAILS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setConfigurationDetails(NotificationConfigurationDetails configurationDetails) { + this.configurationDetails = configurationDetails; + } + + + /** + * Return true if this CreateNotificationConfigurationRequest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateNotificationConfigurationRequest createNotificationConfigurationRequest = (CreateNotificationConfigurationRequest) o; + return Objects.equals(this.configurationDetails, createNotificationConfigurationRequest.configurationDetails); + } + + @Override + public int hashCode() { + return Objects.hash(configurationDetails); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateNotificationConfigurationRequest {\n"); + sb.append(" configurationDetails: ").append(toIndentedString(configurationDetails)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line 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 CreateNotificationConfigurationRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of CreateNotificationConfigurationRequest + * @throws JsonProcessingException if the JSON string is invalid with respect to CreateNotificationConfigurationRequest + */ + public static CreateNotificationConfigurationRequest fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, CreateNotificationConfigurationRequest.class); + } +/** + * Convert an instance of CreateNotificationConfigurationRequest 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/marketpayconfiguration/DeleteNotificationConfigurationRequest.java b/src/main/java/com/adyen/model/marketpayconfiguration/DeleteNotificationConfigurationRequest.java new file mode 100644 index 000000000..e18f9647a --- /dev/null +++ b/src/main/java/com/adyen/model/marketpayconfiguration/DeleteNotificationConfigurationRequest.java @@ -0,0 +1,136 @@ +/* + * Notification Configuration API + * This API is used for the classic integration. If you are just starting your implementation, refer to our [new integration guide](https://docs.adyen.com/marketplaces-and-platforms) instead. The Notification Configuration API provides endpoints for setting up and testing notifications that inform you of events on your platform, for example when a verification check or a payout has been completed. For more information, refer to our [documentation](https://docs.adyen.com/marketplaces-and-platforms/classic/notifications). ## Authentication Your Adyen contact will provide your API credential and an API key. To connect to the API, add an `X-API-Key` header with the API key as the value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: YOUR_API_KEY\" \\ ... ``` Alternatively, you can use the username and password to connect to the API using basic authentication. For example: ``` curl -U \"ws@MarketPlace.YOUR_PLATFORM_ACCOUNT\":\"YOUR_WS_PASSWORD\" \\ -H \"Content-Type: application/json\" \\ ... ``` When going live, you need to generate new web service user credentials to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning The Notification Configuration API supports [versioning](https://docs.adyen.com/development-resources/versioning) using a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://cal-test.adyen.com/cal/services/Notification/v6/createNotificationConfiguration ``` + * + * The version of the OpenAPI document: 6 + * + * + * 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.marketpayconfiguration; + +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.ArrayList; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.core.JsonProcessingException; + + +/** + * DeleteNotificationConfigurationRequest + */ +@JsonPropertyOrder({ + DeleteNotificationConfigurationRequest.JSON_PROPERTY_NOTIFICATION_IDS +}) + +public class DeleteNotificationConfigurationRequest { + public static final String JSON_PROPERTY_NOTIFICATION_IDS = "notificationIds"; + private List notificationIds = new ArrayList<>(); + + public DeleteNotificationConfigurationRequest() { + } + + public DeleteNotificationConfigurationRequest notificationIds(List notificationIds) { + this.notificationIds = notificationIds; + return this; + } + + public DeleteNotificationConfigurationRequest addNotificationIdsItem(Long notificationIdsItem) { + this.notificationIds.add(notificationIdsItem); + return this; + } + + /** + * A list of IDs of the notification subscription configurations to be deleted. + * @return notificationIds + **/ + @ApiModelProperty(required = true, value = "A list of IDs of the notification subscription configurations to be deleted.") + @JsonProperty(JSON_PROPERTY_NOTIFICATION_IDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getNotificationIds() { + return notificationIds; + } + + + @JsonProperty(JSON_PROPERTY_NOTIFICATION_IDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setNotificationIds(List notificationIds) { + this.notificationIds = notificationIds; + } + + + /** + * Return true if this DeleteNotificationConfigurationRequest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DeleteNotificationConfigurationRequest deleteNotificationConfigurationRequest = (DeleteNotificationConfigurationRequest) o; + return Objects.equals(this.notificationIds, deleteNotificationConfigurationRequest.notificationIds); + } + + @Override + public int hashCode() { + return Objects.hash(notificationIds); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DeleteNotificationConfigurationRequest {\n"); + sb.append(" notificationIds: ").append(toIndentedString(notificationIds)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line 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 DeleteNotificationConfigurationRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of DeleteNotificationConfigurationRequest + * @throws JsonProcessingException if the JSON string is invalid with respect to DeleteNotificationConfigurationRequest + */ + public static DeleteNotificationConfigurationRequest fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, DeleteNotificationConfigurationRequest.class); + } +/** + * Convert an instance of DeleteNotificationConfigurationRequest 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/marketpayconfiguration/ErrorFieldType.java b/src/main/java/com/adyen/model/marketpayconfiguration/ErrorFieldType.java new file mode 100644 index 000000000..b9c0c1387 --- /dev/null +++ b/src/main/java/com/adyen/model/marketpayconfiguration/ErrorFieldType.java @@ -0,0 +1,192 @@ +/* + * Notification Configuration API + * This API is used for the classic integration. If you are just starting your implementation, refer to our [new integration guide](https://docs.adyen.com/marketplaces-and-platforms) instead. The Notification Configuration API provides endpoints for setting up and testing notifications that inform you of events on your platform, for example when a verification check or a payout has been completed. For more information, refer to our [documentation](https://docs.adyen.com/marketplaces-and-platforms/classic/notifications). ## Authentication Your Adyen contact will provide your API credential and an API key. To connect to the API, add an `X-API-Key` header with the API key as the value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: YOUR_API_KEY\" \\ ... ``` Alternatively, you can use the username and password to connect to the API using basic authentication. For example: ``` curl -U \"ws@MarketPlace.YOUR_PLATFORM_ACCOUNT\":\"YOUR_WS_PASSWORD\" \\ -H \"Content-Type: application/json\" \\ ... ``` When going live, you need to generate new web service user credentials to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning The Notification Configuration API supports [versioning](https://docs.adyen.com/development-resources/versioning) using a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://cal-test.adyen.com/cal/services/Notification/v6/createNotificationConfiguration ``` + * + * The version of the OpenAPI document: 6 + * + * + * 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.marketpayconfiguration; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.adyen.model.marketpayconfiguration.FieldType; +import com.fasterxml.jackson.annotation.JsonInclude; +import 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; + + +/** + * ErrorFieldType + */ +@JsonPropertyOrder({ + ErrorFieldType.JSON_PROPERTY_ERROR_CODE, + ErrorFieldType.JSON_PROPERTY_ERROR_DESCRIPTION, + ErrorFieldType.JSON_PROPERTY_FIELD_TYPE +}) + +public class ErrorFieldType { + public static final String JSON_PROPERTY_ERROR_CODE = "errorCode"; + private Integer errorCode; + + public static final String JSON_PROPERTY_ERROR_DESCRIPTION = "errorDescription"; + private String errorDescription; + + public static final String JSON_PROPERTY_FIELD_TYPE = "fieldType"; + private FieldType fieldType; + + public ErrorFieldType() { + } + + public ErrorFieldType errorCode(Integer errorCode) { + this.errorCode = errorCode; + return this; + } + + /** + * The validation error code. + * @return errorCode + **/ + @ApiModelProperty(value = "The validation error code.") + @JsonProperty(JSON_PROPERTY_ERROR_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Integer getErrorCode() { + return errorCode; + } + + + @JsonProperty(JSON_PROPERTY_ERROR_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setErrorCode(Integer errorCode) { + this.errorCode = errorCode; + } + + + public ErrorFieldType errorDescription(String errorDescription) { + this.errorDescription = errorDescription; + return this; + } + + /** + * A description of the validation error. + * @return errorDescription + **/ + @ApiModelProperty(value = "A description of the validation error.") + @JsonProperty(JSON_PROPERTY_ERROR_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getErrorDescription() { + return errorDescription; + } + + + @JsonProperty(JSON_PROPERTY_ERROR_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setErrorDescription(String errorDescription) { + this.errorDescription = errorDescription; + } + + + public ErrorFieldType fieldType(FieldType fieldType) { + this.fieldType = fieldType; + return this; + } + + /** + * Get fieldType + * @return fieldType + **/ + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_FIELD_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public FieldType getFieldType() { + return fieldType; + } + + + @JsonProperty(JSON_PROPERTY_FIELD_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setFieldType(FieldType fieldType) { + this.fieldType = fieldType; + } + + + /** + * Return true if this ErrorFieldType object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ErrorFieldType errorFieldType = (ErrorFieldType) o; + return Objects.equals(this.errorCode, errorFieldType.errorCode) && + Objects.equals(this.errorDescription, errorFieldType.errorDescription) && + Objects.equals(this.fieldType, errorFieldType.fieldType); + } + + @Override + public int hashCode() { + return Objects.hash(errorCode, errorDescription, fieldType); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ErrorFieldType {\n"); + sb.append(" errorCode: ").append(toIndentedString(errorCode)).append("\n"); + sb.append(" errorDescription: ").append(toIndentedString(errorDescription)).append("\n"); + sb.append(" fieldType: ").append(toIndentedString(fieldType)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line 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 ErrorFieldType given an JSON string + * + * @param jsonString JSON string + * @return An instance of ErrorFieldType + * @throws JsonProcessingException if the JSON string is invalid with respect to ErrorFieldType + */ + public static ErrorFieldType fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, ErrorFieldType.class); + } +/** + * Convert an instance of ErrorFieldType 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/marketpayconfiguration/ExchangeMessage.java b/src/main/java/com/adyen/model/marketpayconfiguration/ExchangeMessage.java new file mode 100644 index 000000000..510597173 --- /dev/null +++ b/src/main/java/com/adyen/model/marketpayconfiguration/ExchangeMessage.java @@ -0,0 +1,160 @@ +/* + * Notification Configuration API + * This API is used for the classic integration. If you are just starting your implementation, refer to our [new integration guide](https://docs.adyen.com/marketplaces-and-platforms) instead. The Notification Configuration API provides endpoints for setting up and testing notifications that inform you of events on your platform, for example when a verification check or a payout has been completed. For more information, refer to our [documentation](https://docs.adyen.com/marketplaces-and-platforms/classic/notifications). ## Authentication Your Adyen contact will provide your API credential and an API key. To connect to the API, add an `X-API-Key` header with the API key as the value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: YOUR_API_KEY\" \\ ... ``` Alternatively, you can use the username and password to connect to the API using basic authentication. For example: ``` curl -U \"ws@MarketPlace.YOUR_PLATFORM_ACCOUNT\":\"YOUR_WS_PASSWORD\" \\ -H \"Content-Type: application/json\" \\ ... ``` When going live, you need to generate new web service user credentials to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning The Notification Configuration API supports [versioning](https://docs.adyen.com/development-resources/versioning) using a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://cal-test.adyen.com/cal/services/Notification/v6/createNotificationConfiguration ``` + * + * The version of the OpenAPI document: 6 + * + * + * 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.marketpayconfiguration; + +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; + + +/** + * ExchangeMessage + */ +@JsonPropertyOrder({ + ExchangeMessage.JSON_PROPERTY_MESSAGE_CODE, + ExchangeMessage.JSON_PROPERTY_MESSAGE_DESCRIPTION +}) + +public class ExchangeMessage { + public static final String JSON_PROPERTY_MESSAGE_CODE = "messageCode"; + private String messageCode; + + public static final String JSON_PROPERTY_MESSAGE_DESCRIPTION = "messageDescription"; + private String messageDescription; + + public ExchangeMessage() { + } + + public ExchangeMessage messageCode(String messageCode) { + this.messageCode = messageCode; + return this; + } + + /** + * Get messageCode + * @return messageCode + **/ + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_MESSAGE_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getMessageCode() { + return messageCode; + } + + + @JsonProperty(JSON_PROPERTY_MESSAGE_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMessageCode(String messageCode) { + this.messageCode = messageCode; + } + + + public ExchangeMessage messageDescription(String messageDescription) { + this.messageDescription = messageDescription; + return this; + } + + /** + * Get messageDescription + * @return messageDescription + **/ + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_MESSAGE_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getMessageDescription() { + return messageDescription; + } + + + @JsonProperty(JSON_PROPERTY_MESSAGE_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMessageDescription(String messageDescription) { + this.messageDescription = messageDescription; + } + + + /** + * Return true if this ExchangeMessage object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ExchangeMessage exchangeMessage = (ExchangeMessage) o; + return Objects.equals(this.messageCode, exchangeMessage.messageCode) && + Objects.equals(this.messageDescription, exchangeMessage.messageDescription); + } + + @Override + public int hashCode() { + return Objects.hash(messageCode, messageDescription); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ExchangeMessage {\n"); + sb.append(" messageCode: ").append(toIndentedString(messageCode)).append("\n"); + sb.append(" messageDescription: ").append(toIndentedString(messageDescription)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line 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 ExchangeMessage given an JSON string + * + * @param jsonString JSON string + * @return An instance of ExchangeMessage + * @throws JsonProcessingException if the JSON string is invalid with respect to ExchangeMessage + */ + public static ExchangeMessage fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, ExchangeMessage.class); + } +/** + * Convert an instance of ExchangeMessage 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/marketpayconfiguration/FieldType.java b/src/main/java/com/adyen/model/marketpayconfiguration/FieldType.java new file mode 100644 index 000000000..cc26104ca --- /dev/null +++ b/src/main/java/com/adyen/model/marketpayconfiguration/FieldType.java @@ -0,0 +1,546 @@ +/* + * Notification Configuration API + * This API is used for the classic integration. If you are just starting your implementation, refer to our [new integration guide](https://docs.adyen.com/marketplaces-and-platforms) instead. The Notification Configuration API provides endpoints for setting up and testing notifications that inform you of events on your platform, for example when a verification check or a payout has been completed. For more information, refer to our [documentation](https://docs.adyen.com/marketplaces-and-platforms/classic/notifications). ## Authentication Your Adyen contact will provide your API credential and an API key. To connect to the API, add an `X-API-Key` header with the API key as the value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: YOUR_API_KEY\" \\ ... ``` Alternatively, you can use the username and password to connect to the API using basic authentication. For example: ``` curl -U \"ws@MarketPlace.YOUR_PLATFORM_ACCOUNT\":\"YOUR_WS_PASSWORD\" \\ -H \"Content-Type: application/json\" \\ ... ``` When going live, you need to generate new web service user credentials to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning The Notification Configuration API supports [versioning](https://docs.adyen.com/development-resources/versioning) using a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://cal-test.adyen.com/cal/services/Notification/v6/createNotificationConfiguration ``` + * + * The version of the OpenAPI document: 6 + * + * + * 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.marketpayconfiguration; + +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; + + +/** + * FieldType + */ +@JsonPropertyOrder({ + FieldType.JSON_PROPERTY_FIELD, + FieldType.JSON_PROPERTY_FIELD_NAME, + FieldType.JSON_PROPERTY_SHAREHOLDER_CODE +}) + +public class FieldType { + public static final String JSON_PROPERTY_FIELD = "field"; + private String field; + + /** + * The type of the field. + */ + public enum FieldNameEnum { + ACCOUNTCODE("accountCode"), + + ACCOUNTHOLDERCODE("accountHolderCode"), + + ACCOUNTHOLDERDETAILS("accountHolderDetails"), + + ACCOUNTNUMBER("accountNumber"), + + ACCOUNTSTATETYPE("accountStateType"), + + ACCOUNTSTATUS("accountStatus"), + + ACCOUNTTYPE("accountType"), + + ADDRESS("address"), + + BALANCEACCOUNT("balanceAccount"), + + BALANCEACCOUNTACTIVE("balanceAccountActive"), + + BALANCEACCOUNTCODE("balanceAccountCode"), + + BALANCEACCOUNTID("balanceAccountId"), + + BANKACCOUNT("bankAccount"), + + BANKACCOUNTCODE("bankAccountCode"), + + BANKACCOUNTNAME("bankAccountName"), + + BANKACCOUNTUUID("bankAccountUUID"), + + BANKBICSWIFT("bankBicSwift"), + + BANKCITY("bankCity"), + + BANKCODE("bankCode"), + + BANKNAME("bankName"), + + BANKSTATEMENT("bankStatement"), + + BRANCHCODE("branchCode"), + + BUSINESSCONTACT("businessContact"), + + CARDTOKEN("cardToken"), + + CHECKCODE("checkCode"), + + CITY("city"), + + COMPANYREGISTRATION("companyRegistration"), + + CONSTITUTIONALDOCUMENT("constitutionalDocument"), + + CONTROLLER("controller"), + + COUNTRY("country"), + + COUNTRYCODE("countryCode"), + + CURRENCY("currency"), + + CURRENCYCODE("currencyCode"), + + DATEOFBIRTH("dateOfBirth"), + + DESCRIPTION("description"), + + DESTINATIONACCOUNTCODE("destinationAccountCode"), + + DOCUMENT("document"), + + DOCUMENTCONTENT("documentContent"), + + DOCUMENTEXPIRATIONDATE("documentExpirationDate"), + + DOCUMENTISSUERCOUNTRY("documentIssuerCountry"), + + DOCUMENTISSUERSTATE("documentIssuerState"), + + DOCUMENTNAME("documentName"), + + DOCUMENTNUMBER("documentNumber"), + + DOCUMENTTYPE("documentType"), + + DOINGBUSINESSAS("doingBusinessAs"), + + DRIVINGLICENCE("drivingLicence"), + + DRIVINGLICENCEBACK("drivingLicenceBack"), + + DRIVINGLICENCEFRONT("drivingLicenceFront"), + + DRIVINGLICENSE("drivingLicense"), + + EMAIL("email"), + + FIRSTNAME("firstName"), + + FORMTYPE("formType"), + + FULLPHONENUMBER("fullPhoneNumber"), + + GENDER("gender"), + + HOPWEBSERVICEUSER("hopWebserviceUser"), + + HOUSENUMBERORNAME("houseNumberOrName"), + + IBAN("iban"), + + IDCARD("idCard"), + + IDCARDBACK("idCardBack"), + + IDCARDFRONT("idCardFront"), + + IDNUMBER("idNumber"), + + IDENTITYDOCUMENT("identityDocument"), + + INDIVIDUALDETAILS("individualDetails"), + + INFIX("infix"), + + JOBTITLE("jobTitle"), + + LASTNAME("lastName"), + + LASTREVIEWDATE("lastReviewDate"), + + LEGALARRANGEMENT("legalArrangement"), + + LEGALARRANGEMENTCODE("legalArrangementCode"), + + LEGALARRANGEMENTENTITY("legalArrangementEntity"), + + LEGALARRANGEMENTENTITYCODE("legalArrangementEntityCode"), + + LEGALARRANGEMENTLEGALFORM("legalArrangementLegalForm"), + + LEGALARRANGEMENTMEMBER("legalArrangementMember"), + + LEGALARRANGEMENTMEMBERS("legalArrangementMembers"), + + LEGALARRANGEMENTNAME("legalArrangementName"), + + LEGALARRANGEMENTREFERENCE("legalArrangementReference"), + + LEGALARRANGEMENTREGISTRATIONNUMBER("legalArrangementRegistrationNumber"), + + LEGALARRANGEMENTTAXNUMBER("legalArrangementTaxNumber"), + + LEGALARRANGEMENTTYPE("legalArrangementType"), + + LEGALBUSINESSNAME("legalBusinessName"), + + LEGALENTITY("legalEntity"), + + LEGALENTITYTYPE("legalEntityType"), + + LOGO("logo"), + + MERCHANTACCOUNT("merchantAccount"), + + MERCHANTCATEGORYCODE("merchantCategoryCode"), + + MERCHANTHOUSENUMBER("merchantHouseNumber"), + + MERCHANTREFERENCE("merchantReference"), + + MICRODEPOSIT("microDeposit"), + + NAME("name"), + + NATIONALITY("nationality"), + + ORIGINALREFERENCE("originalReference"), + + OWNERCITY("ownerCity"), + + OWNERCOUNTRYCODE("ownerCountryCode"), + + OWNERDATEOFBIRTH("ownerDateOfBirth"), + + OWNERHOUSENUMBERORNAME("ownerHouseNumberOrName"), + + OWNERNAME("ownerName"), + + OWNERPOSTALCODE("ownerPostalCode"), + + OWNERSTATE("ownerState"), + + OWNERSTREET("ownerStreet"), + + PASSPORT("passport"), + + PASSPORTNUMBER("passportNumber"), + + PAYOUTMETHOD("payoutMethod"), + + PAYOUTMETHODCODE("payoutMethodCode"), + + PAYOUTSCHEDULE("payoutSchedule"), + + PCISELFASSESSMENT("pciSelfAssessment"), + + PERSONALDATA("personalData"), + + PHONECOUNTRYCODE("phoneCountryCode"), + + PHONENUMBER("phoneNumber"), + + POSTALCODE("postalCode"), + + PRIMARYCURRENCY("primaryCurrency"), + + REASON("reason"), + + REGISTRATIONNUMBER("registrationNumber"), + + RETURNURL("returnUrl"), + + SCHEDULE("schedule"), + + SHAREHOLDER("shareholder"), + + SHAREHOLDERCODE("shareholderCode"), + + SHAREHOLDERCODEANDSIGNATORYCODE("shareholderCodeAndSignatoryCode"), + + SHAREHOLDERCODEORSIGNATORYCODE("shareholderCodeOrSignatoryCode"), + + SHAREHOLDERTYPE("shareholderType"), + + SHAREHOLDERTYPES("shareholderTypes"), + + SHOPPERINTERACTION("shopperInteraction"), + + SIGNATORY("signatory"), + + SIGNATORYCODE("signatoryCode"), + + SOCIALSECURITYNUMBER("socialSecurityNumber"), + + SOURCEACCOUNTCODE("sourceAccountCode"), + + SPLITACCOUNT("splitAccount"), + + SPLITCONFIGURATIONUUID("splitConfigurationUUID"), + + SPLITCURRENCY("splitCurrency"), + + SPLITVALUE("splitValue"), + + SPLITS("splits"), + + STATEORPROVINCE("stateOrProvince"), + + STATUS("status"), + + STOCKEXCHANGE("stockExchange"), + + STOCKNUMBER("stockNumber"), + + STOCKTICKER("stockTicker"), + + STORE("store"), + + STOREDETAIL("storeDetail"), + + STORENAME("storeName"), + + STOREREFERENCE("storeReference"), + + STREET("street"), + + TAXID("taxId"), + + TIER("tier"), + + TIERNUMBER("tierNumber"), + + TRANSFERCODE("transferCode"), + + ULTIMATEPARENTCOMPANY("ultimateParentCompany"), + + ULTIMATEPARENTCOMPANYADDRESSDETAILS("ultimateParentCompanyAddressDetails"), + + ULTIMATEPARENTCOMPANYADDRESSDETAILSCOUNTRY("ultimateParentCompanyAddressDetailsCountry"), + + ULTIMATEPARENTCOMPANYBUSINESSDETAILS("ultimateParentCompanyBusinessDetails"), + + ULTIMATEPARENTCOMPANYBUSINESSDETAILSLEGALBUSINESSNAME("ultimateParentCompanyBusinessDetailsLegalBusinessName"), + + ULTIMATEPARENTCOMPANYBUSINESSDETAILSREGISTRATIONNUMBER("ultimateParentCompanyBusinessDetailsRegistrationNumber"), + + ULTIMATEPARENTCOMPANYCODE("ultimateParentCompanyCode"), + + ULTIMATEPARENTCOMPANYSTOCKEXCHANGE("ultimateParentCompanyStockExchange"), + + ULTIMATEPARENTCOMPANYSTOCKNUMBER("ultimateParentCompanyStockNumber"), + + ULTIMATEPARENTCOMPANYSTOCKNUMBERORSTOCKTICKER("ultimateParentCompanyStockNumberOrStockTicker"), + + ULTIMATEPARENTCOMPANYSTOCKTICKER("ultimateParentCompanyStockTicker"), + + UNKNOWN("unknown"), + + VALUE("value"), + + VERIFICATIONTYPE("verificationType"), + + VIRTUALACCOUNT("virtualAccount"), + + VISANUMBER("visaNumber"), + + WEBADDRESS("webAddress"), + + YEAR("year"); + + private String value; + + FieldNameEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static FieldNameEnum fromValue(String value) { + for (FieldNameEnum b : FieldNameEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_FIELD_NAME = "fieldName"; + private FieldNameEnum fieldName; + + public static final String JSON_PROPERTY_SHAREHOLDER_CODE = "shareholderCode"; + private String shareholderCode; + + public FieldType() { + } + + public FieldType field(String field) { + this.field = field; + return this; + } + + /** + * The full name of the property. + * @return field + **/ + @ApiModelProperty(value = "The full name of the property.") + @JsonProperty(JSON_PROPERTY_FIELD) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getField() { + return field; + } + + + @JsonProperty(JSON_PROPERTY_FIELD) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setField(String field) { + this.field = field; + } + + + public FieldType fieldName(FieldNameEnum fieldName) { + this.fieldName = fieldName; + return this; + } + + /** + * The type of the field. + * @return fieldName + **/ + @ApiModelProperty(value = "The type of the field.") + @JsonProperty(JSON_PROPERTY_FIELD_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public FieldNameEnum getFieldName() { + return fieldName; + } + + + @JsonProperty(JSON_PROPERTY_FIELD_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setFieldName(FieldNameEnum fieldName) { + this.fieldName = fieldName; + } + + + public FieldType shareholderCode(String shareholderCode) { + this.shareholderCode = shareholderCode; + return this; + } + + /** + * The code of the shareholder that the field belongs to. If empty, the field belongs to an account holder. + * @return shareholderCode + **/ + @ApiModelProperty(value = "The code of the shareholder that the field belongs to. If empty, the field belongs to an account holder.") + @JsonProperty(JSON_PROPERTY_SHAREHOLDER_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getShareholderCode() { + return shareholderCode; + } + + + @JsonProperty(JSON_PROPERTY_SHAREHOLDER_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setShareholderCode(String shareholderCode) { + this.shareholderCode = shareholderCode; + } + + + /** + * Return true if this FieldType object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FieldType fieldType = (FieldType) o; + return Objects.equals(this.field, fieldType.field) && + Objects.equals(this.fieldName, fieldType.fieldName) && + Objects.equals(this.shareholderCode, fieldType.shareholderCode); + } + + @Override + public int hashCode() { + return Objects.hash(field, fieldName, shareholderCode); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FieldType {\n"); + sb.append(" field: ").append(toIndentedString(field)).append("\n"); + sb.append(" fieldName: ").append(toIndentedString(fieldName)).append("\n"); + sb.append(" shareholderCode: ").append(toIndentedString(shareholderCode)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line 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 FieldType given an JSON string + * + * @param jsonString JSON string + * @return An instance of FieldType + * @throws JsonProcessingException if the JSON string is invalid with respect to FieldType + */ + public static FieldType fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, FieldType.class); + } +/** + * Convert an instance of FieldType 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/marketpayconfiguration/GenericResponse.java b/src/main/java/com/adyen/model/marketpayconfiguration/GenericResponse.java new file mode 100644 index 000000000..23a8238b9 --- /dev/null +++ b/src/main/java/com/adyen/model/marketpayconfiguration/GenericResponse.java @@ -0,0 +1,202 @@ +/* + * Notification Configuration API + * This API is used for the classic integration. If you are just starting your implementation, refer to our [new integration guide](https://docs.adyen.com/marketplaces-and-platforms) instead. The Notification Configuration API provides endpoints for setting up and testing notifications that inform you of events on your platform, for example when a verification check or a payout has been completed. For more information, refer to our [documentation](https://docs.adyen.com/marketplaces-and-platforms/classic/notifications). ## Authentication Your Adyen contact will provide your API credential and an API key. To connect to the API, add an `X-API-Key` header with the API key as the value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: YOUR_API_KEY\" \\ ... ``` Alternatively, you can use the username and password to connect to the API using basic authentication. For example: ``` curl -U \"ws@MarketPlace.YOUR_PLATFORM_ACCOUNT\":\"YOUR_WS_PASSWORD\" \\ -H \"Content-Type: application/json\" \\ ... ``` When going live, you need to generate new web service user credentials to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning The Notification Configuration API supports [versioning](https://docs.adyen.com/development-resources/versioning) using a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://cal-test.adyen.com/cal/services/Notification/v6/createNotificationConfiguration ``` + * + * The version of the OpenAPI document: 6 + * + * + * 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.marketpayconfiguration; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.adyen.model.marketpayconfiguration.ErrorFieldType; +import com.fasterxml.jackson.annotation.JsonInclude; +import 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; + + +/** + * GenericResponse + */ +@JsonPropertyOrder({ + GenericResponse.JSON_PROPERTY_INVALID_FIELDS, + GenericResponse.JSON_PROPERTY_PSP_REFERENCE, + GenericResponse.JSON_PROPERTY_RESULT_CODE +}) + +public class GenericResponse { + public static final String JSON_PROPERTY_INVALID_FIELDS = "invalidFields"; + private List invalidFields = null; + + public static final String JSON_PROPERTY_PSP_REFERENCE = "pspReference"; + private String pspReference; + + public static final String JSON_PROPERTY_RESULT_CODE = "resultCode"; + private String resultCode; + + public GenericResponse() { + } + + public GenericResponse invalidFields(List invalidFields) { + this.invalidFields = invalidFields; + return this; + } + + public GenericResponse addInvalidFieldsItem(ErrorFieldType invalidFieldsItem) { + if (this.invalidFields == null) { + this.invalidFields = new ArrayList<>(); + } + this.invalidFields.add(invalidFieldsItem); + return this; + } + + /** + * Contains field validation errors that would prevent requests from being processed. + * @return invalidFields + **/ + @ApiModelProperty(value = "Contains field validation errors that would prevent requests from being processed.") + @JsonProperty(JSON_PROPERTY_INVALID_FIELDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getInvalidFields() { + return invalidFields; + } + + + @JsonProperty(JSON_PROPERTY_INVALID_FIELDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setInvalidFields(List invalidFields) { + this.invalidFields = invalidFields; + } + + + public GenericResponse pspReference(String pspReference) { + this.pspReference = pspReference; + return this; + } + + /** + * The reference of a request. Can be used to uniquely identify the request. + * @return pspReference + **/ + @ApiModelProperty(value = "The reference of a request. Can be used to uniquely identify the request.") + @JsonProperty(JSON_PROPERTY_PSP_REFERENCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getPspReference() { + return pspReference; + } + + + @JsonProperty(JSON_PROPERTY_PSP_REFERENCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPspReference(String pspReference) { + this.pspReference = pspReference; + } + + + public GenericResponse resultCode(String resultCode) { + this.resultCode = resultCode; + return this; + } + + /** + * The result code. + * @return resultCode + **/ + @ApiModelProperty(value = "The result code.") + @JsonProperty(JSON_PROPERTY_RESULT_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getResultCode() { + return resultCode; + } + + + @JsonProperty(JSON_PROPERTY_RESULT_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setResultCode(String resultCode) { + this.resultCode = resultCode; + } + + + /** + * Return true if this GenericResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GenericResponse genericResponse = (GenericResponse) o; + return Objects.equals(this.invalidFields, genericResponse.invalidFields) && + Objects.equals(this.pspReference, genericResponse.pspReference) && + Objects.equals(this.resultCode, genericResponse.resultCode); + } + + @Override + public int hashCode() { + return Objects.hash(invalidFields, pspReference, resultCode); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GenericResponse {\n"); + sb.append(" invalidFields: ").append(toIndentedString(invalidFields)).append("\n"); + sb.append(" pspReference: ").append(toIndentedString(pspReference)).append("\n"); + sb.append(" resultCode: ").append(toIndentedString(resultCode)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line 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 GenericResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of GenericResponse + * @throws JsonProcessingException if the JSON string is invalid with respect to GenericResponse + */ + public static GenericResponse fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, GenericResponse.class); + } +/** + * Convert an instance of GenericResponse 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/marketpayconfiguration/GetNotificationConfigurationListResponse.java b/src/main/java/com/adyen/model/marketpayconfiguration/GetNotificationConfigurationListResponse.java new file mode 100644 index 000000000..56458d409 --- /dev/null +++ b/src/main/java/com/adyen/model/marketpayconfiguration/GetNotificationConfigurationListResponse.java @@ -0,0 +1,242 @@ +/* + * Notification Configuration API + * This API is used for the classic integration. If you are just starting your implementation, refer to our [new integration guide](https://docs.adyen.com/marketplaces-and-platforms) instead. The Notification Configuration API provides endpoints for setting up and testing notifications that inform you of events on your platform, for example when a verification check or a payout has been completed. For more information, refer to our [documentation](https://docs.adyen.com/marketplaces-and-platforms/classic/notifications). ## Authentication Your Adyen contact will provide your API credential and an API key. To connect to the API, add an `X-API-Key` header with the API key as the value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: YOUR_API_KEY\" \\ ... ``` Alternatively, you can use the username and password to connect to the API using basic authentication. For example: ``` curl -U \"ws@MarketPlace.YOUR_PLATFORM_ACCOUNT\":\"YOUR_WS_PASSWORD\" \\ -H \"Content-Type: application/json\" \\ ... ``` When going live, you need to generate new web service user credentials to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning The Notification Configuration API supports [versioning](https://docs.adyen.com/development-resources/versioning) using a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://cal-test.adyen.com/cal/services/Notification/v6/createNotificationConfiguration ``` + * + * The version of the OpenAPI document: 6 + * + * + * 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.marketpayconfiguration; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.adyen.model.marketpayconfiguration.ErrorFieldType; +import com.adyen.model.marketpayconfiguration.NotificationConfigurationDetails; +import com.fasterxml.jackson.annotation.JsonInclude; +import 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; + + +/** + * GetNotificationConfigurationListResponse + */ +@JsonPropertyOrder({ + GetNotificationConfigurationListResponse.JSON_PROPERTY_CONFIGURATIONS, + GetNotificationConfigurationListResponse.JSON_PROPERTY_INVALID_FIELDS, + GetNotificationConfigurationListResponse.JSON_PROPERTY_PSP_REFERENCE, + GetNotificationConfigurationListResponse.JSON_PROPERTY_RESULT_CODE +}) + +public class GetNotificationConfigurationListResponse { + public static final String JSON_PROPERTY_CONFIGURATIONS = "configurations"; + private List configurations = null; + + public static final String JSON_PROPERTY_INVALID_FIELDS = "invalidFields"; + private List invalidFields = null; + + public static final String JSON_PROPERTY_PSP_REFERENCE = "pspReference"; + private String pspReference; + + public static final String JSON_PROPERTY_RESULT_CODE = "resultCode"; + private String resultCode; + + public GetNotificationConfigurationListResponse() { + } + + public GetNotificationConfigurationListResponse configurations(List configurations) { + this.configurations = configurations; + return this; + } + + public GetNotificationConfigurationListResponse addConfigurationsItem(NotificationConfigurationDetails configurationsItem) { + if (this.configurations == null) { + this.configurations = new ArrayList<>(); + } + this.configurations.add(configurationsItem); + return this; + } + + /** + * Details of the notification subscription configurations. + * @return configurations + **/ + @ApiModelProperty(value = "Details of the notification subscription configurations.") + @JsonProperty(JSON_PROPERTY_CONFIGURATIONS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getConfigurations() { + return configurations; + } + + + @JsonProperty(JSON_PROPERTY_CONFIGURATIONS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setConfigurations(List configurations) { + this.configurations = configurations; + } + + + public GetNotificationConfigurationListResponse invalidFields(List invalidFields) { + this.invalidFields = invalidFields; + return this; + } + + public GetNotificationConfigurationListResponse addInvalidFieldsItem(ErrorFieldType invalidFieldsItem) { + if (this.invalidFields == null) { + this.invalidFields = new ArrayList<>(); + } + this.invalidFields.add(invalidFieldsItem); + return this; + } + + /** + * Contains field validation errors that would prevent requests from being processed. + * @return invalidFields + **/ + @ApiModelProperty(value = "Contains field validation errors that would prevent requests from being processed.") + @JsonProperty(JSON_PROPERTY_INVALID_FIELDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getInvalidFields() { + return invalidFields; + } + + + @JsonProperty(JSON_PROPERTY_INVALID_FIELDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setInvalidFields(List invalidFields) { + this.invalidFields = invalidFields; + } + + + public GetNotificationConfigurationListResponse pspReference(String pspReference) { + this.pspReference = pspReference; + return this; + } + + /** + * The reference of a request. Can be used to uniquely identify the request. + * @return pspReference + **/ + @ApiModelProperty(value = "The reference of a request. Can be used to uniquely identify the request.") + @JsonProperty(JSON_PROPERTY_PSP_REFERENCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getPspReference() { + return pspReference; + } + + + @JsonProperty(JSON_PROPERTY_PSP_REFERENCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPspReference(String pspReference) { + this.pspReference = pspReference; + } + + + public GetNotificationConfigurationListResponse resultCode(String resultCode) { + this.resultCode = resultCode; + return this; + } + + /** + * The result code. + * @return resultCode + **/ + @ApiModelProperty(value = "The result code.") + @JsonProperty(JSON_PROPERTY_RESULT_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getResultCode() { + return resultCode; + } + + + @JsonProperty(JSON_PROPERTY_RESULT_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setResultCode(String resultCode) { + this.resultCode = resultCode; + } + + + /** + * Return true if this GetNotificationConfigurationListResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetNotificationConfigurationListResponse getNotificationConfigurationListResponse = (GetNotificationConfigurationListResponse) o; + return Objects.equals(this.configurations, getNotificationConfigurationListResponse.configurations) && + Objects.equals(this.invalidFields, getNotificationConfigurationListResponse.invalidFields) && + Objects.equals(this.pspReference, getNotificationConfigurationListResponse.pspReference) && + Objects.equals(this.resultCode, getNotificationConfigurationListResponse.resultCode); + } + + @Override + public int hashCode() { + return Objects.hash(configurations, invalidFields, pspReference, resultCode); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetNotificationConfigurationListResponse {\n"); + sb.append(" configurations: ").append(toIndentedString(configurations)).append("\n"); + sb.append(" invalidFields: ").append(toIndentedString(invalidFields)).append("\n"); + sb.append(" pspReference: ").append(toIndentedString(pspReference)).append("\n"); + sb.append(" resultCode: ").append(toIndentedString(resultCode)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line 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 GetNotificationConfigurationListResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of GetNotificationConfigurationListResponse + * @throws JsonProcessingException if the JSON string is invalid with respect to GetNotificationConfigurationListResponse + */ + public static GetNotificationConfigurationListResponse fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, GetNotificationConfigurationListResponse.class); + } +/** + * Convert an instance of GetNotificationConfigurationListResponse 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/marketpayconfiguration/GetNotificationConfigurationRequest.java b/src/main/java/com/adyen/model/marketpayconfiguration/GetNotificationConfigurationRequest.java new file mode 100644 index 000000000..a22406f21 --- /dev/null +++ b/src/main/java/com/adyen/model/marketpayconfiguration/GetNotificationConfigurationRequest.java @@ -0,0 +1,129 @@ +/* + * Notification Configuration API + * This API is used for the classic integration. If you are just starting your implementation, refer to our [new integration guide](https://docs.adyen.com/marketplaces-and-platforms) instead. The Notification Configuration API provides endpoints for setting up and testing notifications that inform you of events on your platform, for example when a verification check or a payout has been completed. For more information, refer to our [documentation](https://docs.adyen.com/marketplaces-and-platforms/classic/notifications). ## Authentication Your Adyen contact will provide your API credential and an API key. To connect to the API, add an `X-API-Key` header with the API key as the value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: YOUR_API_KEY\" \\ ... ``` Alternatively, you can use the username and password to connect to the API using basic authentication. For example: ``` curl -U \"ws@MarketPlace.YOUR_PLATFORM_ACCOUNT\":\"YOUR_WS_PASSWORD\" \\ -H \"Content-Type: application/json\" \\ ... ``` When going live, you need to generate new web service user credentials to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning The Notification Configuration API supports [versioning](https://docs.adyen.com/development-resources/versioning) using a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://cal-test.adyen.com/cal/services/Notification/v6/createNotificationConfiguration ``` + * + * The version of the OpenAPI document: 6 + * + * + * 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.marketpayconfiguration; + +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; + + +/** + * GetNotificationConfigurationRequest + */ +@JsonPropertyOrder({ + GetNotificationConfigurationRequest.JSON_PROPERTY_NOTIFICATION_ID +}) + +public class GetNotificationConfigurationRequest { + public static final String JSON_PROPERTY_NOTIFICATION_ID = "notificationId"; + private Long notificationId; + + public GetNotificationConfigurationRequest() { + } + + public GetNotificationConfigurationRequest notificationId(Long notificationId) { + this.notificationId = notificationId; + return this; + } + + /** + * The ID of the notification subscription configuration whose details are to be retrieved. + * @return notificationId + **/ + @ApiModelProperty(required = true, value = "The ID of the notification subscription configuration whose details are to be retrieved.") + @JsonProperty(JSON_PROPERTY_NOTIFICATION_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Long getNotificationId() { + return notificationId; + } + + + @JsonProperty(JSON_PROPERTY_NOTIFICATION_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setNotificationId(Long notificationId) { + this.notificationId = notificationId; + } + + + /** + * Return true if this GetNotificationConfigurationRequest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetNotificationConfigurationRequest getNotificationConfigurationRequest = (GetNotificationConfigurationRequest) o; + return Objects.equals(this.notificationId, getNotificationConfigurationRequest.notificationId); + } + + @Override + public int hashCode() { + return Objects.hash(notificationId); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetNotificationConfigurationRequest {\n"); + sb.append(" notificationId: ").append(toIndentedString(notificationId)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line 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 GetNotificationConfigurationRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of GetNotificationConfigurationRequest + * @throws JsonProcessingException if the JSON string is invalid with respect to GetNotificationConfigurationRequest + */ + public static GetNotificationConfigurationRequest fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, GetNotificationConfigurationRequest.class); + } +/** + * Convert an instance of GetNotificationConfigurationRequest 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/marketpayconfiguration/GetNotificationConfigurationResponse.java b/src/main/java/com/adyen/model/marketpayconfiguration/GetNotificationConfigurationResponse.java new file mode 100644 index 000000000..eadaaacc0 --- /dev/null +++ b/src/main/java/com/adyen/model/marketpayconfiguration/GetNotificationConfigurationResponse.java @@ -0,0 +1,234 @@ +/* + * Notification Configuration API + * This API is used for the classic integration. If you are just starting your implementation, refer to our [new integration guide](https://docs.adyen.com/marketplaces-and-platforms) instead. The Notification Configuration API provides endpoints for setting up and testing notifications that inform you of events on your platform, for example when a verification check or a payout has been completed. For more information, refer to our [documentation](https://docs.adyen.com/marketplaces-and-platforms/classic/notifications). ## Authentication Your Adyen contact will provide your API credential and an API key. To connect to the API, add an `X-API-Key` header with the API key as the value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: YOUR_API_KEY\" \\ ... ``` Alternatively, you can use the username and password to connect to the API using basic authentication. For example: ``` curl -U \"ws@MarketPlace.YOUR_PLATFORM_ACCOUNT\":\"YOUR_WS_PASSWORD\" \\ -H \"Content-Type: application/json\" \\ ... ``` When going live, you need to generate new web service user credentials to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning The Notification Configuration API supports [versioning](https://docs.adyen.com/development-resources/versioning) using a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://cal-test.adyen.com/cal/services/Notification/v6/createNotificationConfiguration ``` + * + * The version of the OpenAPI document: 6 + * + * + * 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.marketpayconfiguration; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.adyen.model.marketpayconfiguration.ErrorFieldType; +import com.adyen.model.marketpayconfiguration.NotificationConfigurationDetails; +import com.fasterxml.jackson.annotation.JsonInclude; +import 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; + + +/** + * GetNotificationConfigurationResponse + */ +@JsonPropertyOrder({ + GetNotificationConfigurationResponse.JSON_PROPERTY_CONFIGURATION_DETAILS, + GetNotificationConfigurationResponse.JSON_PROPERTY_INVALID_FIELDS, + GetNotificationConfigurationResponse.JSON_PROPERTY_PSP_REFERENCE, + GetNotificationConfigurationResponse.JSON_PROPERTY_RESULT_CODE +}) + +public class GetNotificationConfigurationResponse { + public static final String JSON_PROPERTY_CONFIGURATION_DETAILS = "configurationDetails"; + private NotificationConfigurationDetails configurationDetails; + + public static final String JSON_PROPERTY_INVALID_FIELDS = "invalidFields"; + private List invalidFields = null; + + public static final String JSON_PROPERTY_PSP_REFERENCE = "pspReference"; + private String pspReference; + + public static final String JSON_PROPERTY_RESULT_CODE = "resultCode"; + private String resultCode; + + public GetNotificationConfigurationResponse() { + } + + public GetNotificationConfigurationResponse configurationDetails(NotificationConfigurationDetails configurationDetails) { + this.configurationDetails = configurationDetails; + return this; + } + + /** + * Get configurationDetails + * @return configurationDetails + **/ + @ApiModelProperty(required = true, value = "") + @JsonProperty(JSON_PROPERTY_CONFIGURATION_DETAILS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public NotificationConfigurationDetails getConfigurationDetails() { + return configurationDetails; + } + + + @JsonProperty(JSON_PROPERTY_CONFIGURATION_DETAILS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setConfigurationDetails(NotificationConfigurationDetails configurationDetails) { + this.configurationDetails = configurationDetails; + } + + + public GetNotificationConfigurationResponse invalidFields(List invalidFields) { + this.invalidFields = invalidFields; + return this; + } + + public GetNotificationConfigurationResponse addInvalidFieldsItem(ErrorFieldType invalidFieldsItem) { + if (this.invalidFields == null) { + this.invalidFields = new ArrayList<>(); + } + this.invalidFields.add(invalidFieldsItem); + return this; + } + + /** + * Contains field validation errors that would prevent requests from being processed. + * @return invalidFields + **/ + @ApiModelProperty(value = "Contains field validation errors that would prevent requests from being processed.") + @JsonProperty(JSON_PROPERTY_INVALID_FIELDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getInvalidFields() { + return invalidFields; + } + + + @JsonProperty(JSON_PROPERTY_INVALID_FIELDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setInvalidFields(List invalidFields) { + this.invalidFields = invalidFields; + } + + + public GetNotificationConfigurationResponse pspReference(String pspReference) { + this.pspReference = pspReference; + return this; + } + + /** + * The reference of a request. Can be used to uniquely identify the request. + * @return pspReference + **/ + @ApiModelProperty(value = "The reference of a request. Can be used to uniquely identify the request.") + @JsonProperty(JSON_PROPERTY_PSP_REFERENCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getPspReference() { + return pspReference; + } + + + @JsonProperty(JSON_PROPERTY_PSP_REFERENCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPspReference(String pspReference) { + this.pspReference = pspReference; + } + + + public GetNotificationConfigurationResponse resultCode(String resultCode) { + this.resultCode = resultCode; + return this; + } + + /** + * The result code. + * @return resultCode + **/ + @ApiModelProperty(value = "The result code.") + @JsonProperty(JSON_PROPERTY_RESULT_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getResultCode() { + return resultCode; + } + + + @JsonProperty(JSON_PROPERTY_RESULT_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setResultCode(String resultCode) { + this.resultCode = resultCode; + } + + + /** + * Return true if this GetNotificationConfigurationResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetNotificationConfigurationResponse getNotificationConfigurationResponse = (GetNotificationConfigurationResponse) o; + return Objects.equals(this.configurationDetails, getNotificationConfigurationResponse.configurationDetails) && + Objects.equals(this.invalidFields, getNotificationConfigurationResponse.invalidFields) && + Objects.equals(this.pspReference, getNotificationConfigurationResponse.pspReference) && + Objects.equals(this.resultCode, getNotificationConfigurationResponse.resultCode); + } + + @Override + public int hashCode() { + return Objects.hash(configurationDetails, invalidFields, pspReference, resultCode); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetNotificationConfigurationResponse {\n"); + sb.append(" configurationDetails: ").append(toIndentedString(configurationDetails)).append("\n"); + sb.append(" invalidFields: ").append(toIndentedString(invalidFields)).append("\n"); + sb.append(" pspReference: ").append(toIndentedString(pspReference)).append("\n"); + sb.append(" resultCode: ").append(toIndentedString(resultCode)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line 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 GetNotificationConfigurationResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of GetNotificationConfigurationResponse + * @throws JsonProcessingException if the JSON string is invalid with respect to GetNotificationConfigurationResponse + */ + public static GetNotificationConfigurationResponse fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, GetNotificationConfigurationResponse.class); + } +/** + * Convert an instance of GetNotificationConfigurationResponse 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/marketpayconfiguration/JSON.java b/src/main/java/com/adyen/model/marketpayconfiguration/JSON.java new file mode 100644 index 000000000..b8f89b663 --- /dev/null +++ b/src/main/java/com/adyen/model/marketpayconfiguration/JSON.java @@ -0,0 +1,251 @@ +package com.adyen.model.marketpayconfiguration; + +import com.adyen.serializer.ByteArraySerializer; +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.*; +import com.fasterxml.jackson.databind.json.JsonMapper; +import com.fasterxml.jackson.databind.module.SimpleModule; +import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule; +import com.adyen.model.marketpayconfiguration.*; + +import java.text.DateFormat; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Map; +import java.util.Set; +import jakarta.ws.rs.core.GenericType; +import jakarta.ws.rs.ext.ContextResolver; + +public class JSON implements ContextResolver { + private static ObjectMapper mapper; + + public JSON() { + mapper = new ObjectMapper(); + mapper.setSerializationInclusion(JsonInclude.Include.NON_NULL); + JsonMapper.builder().configure(MapperFeature.ALLOW_COERCION_OF_SCALARS, false); + mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); + mapper.configure(DeserializationFeature.FAIL_ON_INVALID_SUBTYPE, true); + mapper.disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS); + mapper.disable(DeserializationFeature.ADJUST_DATES_TO_CONTEXT_TIME_ZONE); + mapper.enable(SerializationFeature.WRITE_ENUMS_USING_TO_STRING); + mapper.enable(DeserializationFeature.READ_ENUMS_USING_TO_STRING); + mapper.registerModule(new JavaTimeModule()); + // Custom ByteSerializer + SimpleModule simpleModule = new SimpleModule(); + simpleModule.addSerializer(byte[].class, new ByteArraySerializer()); + mapper.registerModule(simpleModule); + } + + /** + * Set the date format for JSON (de)serialization with Date properties. + * @param dateFormat Date format + */ + public void setDateFormat(DateFormat dateFormat) { + mapper.setDateFormat(dateFormat); + } + + @Override + public ObjectMapper getContext(Class type) { + return mapper; + } + + /** + * Get the object mapper + * + * @return object mapper + */ + public static ObjectMapper getMapper() { return mapper; } + + /** + * Returns the target model class that should be used to deserialize the input data. + * The discriminator mappings are used to determine the target model class. + * + * @param node The input data. + * @param modelClass The class that contains the discriminator mappings. + */ + public static Class getClassForElement(JsonNode node, Class modelClass) { + ClassDiscriminatorMapping cdm = modelDiscriminators.get(modelClass); + if (cdm != null) { + return cdm.getClassForElement(node, new HashSet>()); + } + return null; + } + + /** + * Helper class to register the discriminator mappings. + */ + private static class ClassDiscriminatorMapping { + // The model class name. + Class modelClass; + // The name of the discriminator property. + String discriminatorName; + // The discriminator mappings for a model class. + Map> discriminatorMappings; + + // Constructs a new class discriminator. + ClassDiscriminatorMapping(Class cls, String propertyName, Map> mappings) { + modelClass = cls; + discriminatorName = propertyName; + discriminatorMappings = new HashMap>(); + if (mappings != null) { + discriminatorMappings.putAll(mappings); + } + } + + // Return the name of the discriminator property for this model class. + String getDiscriminatorPropertyName() { + return discriminatorName; + } + + // Return the discriminator value or null if the discriminator is not + // present in the payload. + String getDiscriminatorValue(JsonNode node) { + // Determine the value of the discriminator property in the input data. + if (discriminatorName != null) { + // Get the value of the discriminator property, if present in the input payload. + node = node.get(discriminatorName); + if (node != null && node.isValueNode()) { + String discrValue = node.asText(); + if (discrValue != null) { + return discrValue; + } + } + } + return null; + } + + /** + * Returns the target model class that should be used to deserialize the input data. + * This function can be invoked for anyOf/oneOf composed models with discriminator mappings. + * The discriminator mappings are used to determine the target model class. + * + * @param node The input data. + * @param visitedClasses The set of classes that have already been visited. + */ + Class getClassForElement(JsonNode node, Set> visitedClasses) { + if (visitedClasses.contains(modelClass)) { + // Class has already been visited. + return null; + } + // Determine the value of the discriminator property in the input data. + String discrValue = getDiscriminatorValue(node); + if (discrValue == null) { + return null; + } + Class cls = discriminatorMappings.get(discrValue); + // It may not be sufficient to return this cls directly because that target class + // may itself be a composed schema, possibly with its own discriminator. + visitedClasses.add(modelClass); + for (Class childClass : discriminatorMappings.values()) { + ClassDiscriminatorMapping childCdm = modelDiscriminators.get(childClass); + if (childCdm == null) { + continue; + } + if (!discriminatorName.equals(childCdm.discriminatorName)) { + discrValue = getDiscriminatorValue(node); + if (discrValue == null) { + continue; + } + } + if (childCdm != null) { + // Recursively traverse the discriminator mappings. + Class childDiscr = childCdm.getClassForElement(node, visitedClasses); + if (childDiscr != null) { + return childDiscr; + } + } + } + return cls; + } + } + + /** + * Returns true if inst is an instance of modelClass in the OpenAPI model hierarchy. + * + * The Java class hierarchy is not implemented the same way as the OpenAPI model hierarchy, + * so it's not possible to use the instanceof keyword. + * + * @param modelClass A OpenAPI model class. + * @param inst The instance object. + */ + public static boolean isInstanceOf(Class modelClass, Object inst, Set> visitedClasses) { + if (modelClass.isInstance(inst)) { + // This handles the 'allOf' use case with single parent inheritance. + return true; + } + if (visitedClasses.contains(modelClass)) { + // This is to prevent infinite recursion when the composed schemas have + // a circular dependency. + return false; + } + visitedClasses.add(modelClass); + + // Traverse the oneOf/anyOf composed schemas. + Map descendants = modelDescendants.get(modelClass); + if (descendants != null) { + for (GenericType childType : descendants.values()) { + if (isInstanceOf(childType.getRawType(), inst, visitedClasses)) { + return true; + } + } + } + return false; + } + + /** + * A map of discriminators for all model classes. + */ + private static Map, ClassDiscriminatorMapping> modelDiscriminators = new HashMap, ClassDiscriminatorMapping>(); + + /** + * A map of oneOf/anyOf descendants for each model class. + */ + private static Map, Map> modelDescendants = new HashMap, Map>(); + + /** + * Register a model class discriminator. + * + * @param modelClass the model class + * @param discriminatorPropertyName the name of the discriminator property + * @param mappings a map with the discriminator mappings. + */ + public static void registerDiscriminator(Class modelClass, String discriminatorPropertyName, Map> mappings) { + ClassDiscriminatorMapping m = new ClassDiscriminatorMapping(modelClass, discriminatorPropertyName, mappings); + modelDiscriminators.put(modelClass, m); + } + + /** + * Register the oneOf/anyOf descendants of the modelClass. + * + * @param modelClass the model class + * @param descendants a map of oneOf/anyOf descendants. + */ + public static void registerDescendants(Class modelClass, Map descendants) { + modelDescendants.put(modelClass, descendants); + } + + private static JSON json; + + static + { + json = new JSON(); + } + + /** + * Get the default JSON instance. + * + * @return the default JSON instance + */ + public static JSON getDefault() { + return json; + } + + /** + * Set the default JSON instance. + * + * @param json JSON instance to be used + */ + public static void setDefault(JSON json) { + JSON.json = json; + } +} diff --git a/src/main/java/com/adyen/model/marketpayconfiguration/NotificationConfigurationDetails.java b/src/main/java/com/adyen/model/marketpayconfiguration/NotificationConfigurationDetails.java new file mode 100644 index 000000000..39b9d1f9f --- /dev/null +++ b/src/main/java/com/adyen/model/marketpayconfiguration/NotificationConfigurationDetails.java @@ -0,0 +1,454 @@ +/* + * Notification Configuration API + * This API is used for the classic integration. If you are just starting your implementation, refer to our [new integration guide](https://docs.adyen.com/marketplaces-and-platforms) instead. The Notification Configuration API provides endpoints for setting up and testing notifications that inform you of events on your platform, for example when a verification check or a payout has been completed. For more information, refer to our [documentation](https://docs.adyen.com/marketplaces-and-platforms/classic/notifications). ## Authentication Your Adyen contact will provide your API credential and an API key. To connect to the API, add an `X-API-Key` header with the API key as the value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: YOUR_API_KEY\" \\ ... ``` Alternatively, you can use the username and password to connect to the API using basic authentication. For example: ``` curl -U \"ws@MarketPlace.YOUR_PLATFORM_ACCOUNT\":\"YOUR_WS_PASSWORD\" \\ -H \"Content-Type: application/json\" \\ ... ``` When going live, you need to generate new web service user credentials to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning The Notification Configuration API supports [versioning](https://docs.adyen.com/development-resources/versioning) using a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://cal-test.adyen.com/cal/services/Notification/v6/createNotificationConfiguration ``` + * + * The version of the OpenAPI document: 6 + * + * + * 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.marketpayconfiguration; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.adyen.model.marketpayconfiguration.NotificationEventConfiguration; +import com.fasterxml.jackson.annotation.JsonInclude; +import 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; + + +/** + * NotificationConfigurationDetails + */ +@JsonPropertyOrder({ + NotificationConfigurationDetails.JSON_PROPERTY_ACTIVE, + NotificationConfigurationDetails.JSON_PROPERTY_API_VERSION, + NotificationConfigurationDetails.JSON_PROPERTY_DESCRIPTION, + NotificationConfigurationDetails.JSON_PROPERTY_EVENT_CONFIGS, + NotificationConfigurationDetails.JSON_PROPERTY_HMAC_SIGNATURE_KEY, + NotificationConfigurationDetails.JSON_PROPERTY_NOTIFICATION_ID, + NotificationConfigurationDetails.JSON_PROPERTY_NOTIFY_PASSWORD, + NotificationConfigurationDetails.JSON_PROPERTY_NOTIFY_U_R_L, + NotificationConfigurationDetails.JSON_PROPERTY_NOTIFY_USERNAME, + NotificationConfigurationDetails.JSON_PROPERTY_SSL_PROTOCOL +}) + +public class NotificationConfigurationDetails { + public static final String JSON_PROPERTY_ACTIVE = "active"; + private Boolean active; + + public static final String JSON_PROPERTY_API_VERSION = "apiVersion"; + private Integer apiVersion; + + public static final String JSON_PROPERTY_DESCRIPTION = "description"; + private String description; + + public static final String JSON_PROPERTY_EVENT_CONFIGS = "eventConfigs"; + private List eventConfigs = null; + + public static final String JSON_PROPERTY_HMAC_SIGNATURE_KEY = "hmacSignatureKey"; + private String hmacSignatureKey; + + public static final String JSON_PROPERTY_NOTIFICATION_ID = "notificationId"; + private Long notificationId; + + public static final String JSON_PROPERTY_NOTIFY_PASSWORD = "notifyPassword"; + private String notifyPassword; + + public static final String JSON_PROPERTY_NOTIFY_U_R_L = "notifyURL"; + private String notifyURL; + + public static final String JSON_PROPERTY_NOTIFY_USERNAME = "notifyUsername"; + private String notifyUsername; + + /** + * The SSL protocol employed by the endpoint. >Permitted values: `TLSv12`, `TLSv13`. + */ + public enum SslProtocolEnum { + TLSV12("TLSv12"), + + TLSV13("TLSv13"); + + private String value; + + SslProtocolEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static SslProtocolEnum fromValue(String value) { + for (SslProtocolEnum b : SslProtocolEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_SSL_PROTOCOL = "sslProtocol"; + private SslProtocolEnum sslProtocol; + + public NotificationConfigurationDetails() { + } + + public NotificationConfigurationDetails active(Boolean active) { + this.active = active; + return this; + } + + /** + * Indicates whether the notification subscription is active. + * @return active + **/ + @ApiModelProperty(value = "Indicates whether the notification subscription is active.") + @JsonProperty(JSON_PROPERTY_ACTIVE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getActive() { + return active; + } + + + @JsonProperty(JSON_PROPERTY_ACTIVE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setActive(Boolean active) { + this.active = active; + } + + + public NotificationConfigurationDetails apiVersion(Integer apiVersion) { + this.apiVersion = apiVersion; + return this; + } + + /** + * The version of the notification to which you are subscribing. To make sure that your integration can properly process the notification, subscribe to the same version as the API that you're using. + * @return apiVersion + **/ + @ApiModelProperty(value = "The version of the notification to which you are subscribing. To make sure that your integration can properly process the notification, subscribe to the same version as the API that you're using.") + @JsonProperty(JSON_PROPERTY_API_VERSION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Integer getApiVersion() { + return apiVersion; + } + + + @JsonProperty(JSON_PROPERTY_API_VERSION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setApiVersion(Integer apiVersion) { + this.apiVersion = apiVersion; + } + + + public NotificationConfigurationDetails description(String description) { + this.description = description; + return this; + } + + /** + * A description of the notification subscription configuration. + * @return description + **/ + @ApiModelProperty(value = "A description of the notification subscription configuration.") + @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 NotificationConfigurationDetails eventConfigs(List eventConfigs) { + this.eventConfigs = eventConfigs; + return this; + } + + public NotificationConfigurationDetails addEventConfigsItem(NotificationEventConfiguration eventConfigsItem) { + if (this.eventConfigs == null) { + this.eventConfigs = new ArrayList<>(); + } + this.eventConfigs.add(eventConfigsItem); + return this; + } + + /** + * Contains objects that define event types and their subscription settings. + * @return eventConfigs + **/ + @ApiModelProperty(value = "Contains objects that define event types and their subscription settings.") + @JsonProperty(JSON_PROPERTY_EVENT_CONFIGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getEventConfigs() { + return eventConfigs; + } + + + @JsonProperty(JSON_PROPERTY_EVENT_CONFIGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEventConfigs(List eventConfigs) { + this.eventConfigs = eventConfigs; + } + + + public NotificationConfigurationDetails hmacSignatureKey(String hmacSignatureKey) { + this.hmacSignatureKey = hmacSignatureKey; + return this; + } + + /** + * A string with which to salt the notification(s) before hashing. If this field is provided, a hash value will be included under the notification header `HmacSignature` and the hash protocol will be included under the notification header `Protocol`. A notification body along with its `hmacSignatureKey` and `Protocol` can be used to calculate a hash value; matching this hash value with the `HmacSignature` will ensure that the notification body has not been tampered with or corrupted. >Must be a 32-byte hex-encoded string (i.e. a string containing 64 hexadecimal characters; e.g. \"b0ea55c2fe60d4d1d605e9c385e0e7f7e6cafbb939ce07010f31a327a0871f27\"). The omission of this field will preclude the provision of the `HmacSignature` and `Protocol` headers in notification(s). + * @return hmacSignatureKey + **/ + @ApiModelProperty(value = "A string with which to salt the notification(s) before hashing. If this field is provided, a hash value will be included under the notification header `HmacSignature` and the hash protocol will be included under the notification header `Protocol`. A notification body along with its `hmacSignatureKey` and `Protocol` can be used to calculate a hash value; matching this hash value with the `HmacSignature` will ensure that the notification body has not been tampered with or corrupted. >Must be a 32-byte hex-encoded string (i.e. a string containing 64 hexadecimal characters; e.g. \"b0ea55c2fe60d4d1d605e9c385e0e7f7e6cafbb939ce07010f31a327a0871f27\"). The omission of this field will preclude the provision of the `HmacSignature` and `Protocol` headers in notification(s).") + @JsonProperty(JSON_PROPERTY_HMAC_SIGNATURE_KEY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getHmacSignatureKey() { + return hmacSignatureKey; + } + + + @JsonProperty(JSON_PROPERTY_HMAC_SIGNATURE_KEY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setHmacSignatureKey(String hmacSignatureKey) { + this.hmacSignatureKey = hmacSignatureKey; + } + + + public NotificationConfigurationDetails notificationId(Long notificationId) { + this.notificationId = notificationId; + return this; + } + + /** + * Adyen-generated ID for the entry, returned in the response when you create a notification configuration. Required when updating an existing configuration using [`/updateNotificationConfiguration`](https://docs.adyen.com/api-explorer/#/NotificationConfigurationService/latest/post/updateNotificationConfiguration). + * @return notificationId + **/ + @ApiModelProperty(value = "Adyen-generated ID for the entry, returned in the response when you create a notification configuration. Required when updating an existing configuration using [`/updateNotificationConfiguration`](https://docs.adyen.com/api-explorer/#/NotificationConfigurationService/latest/post/updateNotificationConfiguration).") + @JsonProperty(JSON_PROPERTY_NOTIFICATION_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Long getNotificationId() { + return notificationId; + } + + + @JsonProperty(JSON_PROPERTY_NOTIFICATION_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setNotificationId(Long notificationId) { + this.notificationId = notificationId; + } + + + public NotificationConfigurationDetails notifyPassword(String notifyPassword) { + this.notifyPassword = notifyPassword; + return this; + } + + /** + * The password to use when accessing the notifyURL with the specified username. + * @return notifyPassword + **/ + @ApiModelProperty(value = "The password to use when accessing the notifyURL with the specified username.") + @JsonProperty(JSON_PROPERTY_NOTIFY_PASSWORD) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getNotifyPassword() { + return notifyPassword; + } + + + @JsonProperty(JSON_PROPERTY_NOTIFY_PASSWORD) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setNotifyPassword(String notifyPassword) { + this.notifyPassword = notifyPassword; + } + + + public NotificationConfigurationDetails notifyURL(String notifyURL) { + this.notifyURL = notifyURL; + return this; + } + + /** + * The URL to which the notifications are to be sent. + * @return notifyURL + **/ + @ApiModelProperty(value = "The URL to which the notifications are to be sent.") + @JsonProperty(JSON_PROPERTY_NOTIFY_U_R_L) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getNotifyURL() { + return notifyURL; + } + + + @JsonProperty(JSON_PROPERTY_NOTIFY_U_R_L) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setNotifyURL(String notifyURL) { + this.notifyURL = notifyURL; + } + + + public NotificationConfigurationDetails notifyUsername(String notifyUsername) { + this.notifyUsername = notifyUsername; + return this; + } + + /** + * The username to use when accessing the notifyURL. + * @return notifyUsername + **/ + @ApiModelProperty(value = "The username to use when accessing the notifyURL.") + @JsonProperty(JSON_PROPERTY_NOTIFY_USERNAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getNotifyUsername() { + return notifyUsername; + } + + + @JsonProperty(JSON_PROPERTY_NOTIFY_USERNAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setNotifyUsername(String notifyUsername) { + this.notifyUsername = notifyUsername; + } + + + public NotificationConfigurationDetails sslProtocol(SslProtocolEnum sslProtocol) { + this.sslProtocol = sslProtocol; + return this; + } + + /** + * The SSL protocol employed by the endpoint. >Permitted values: `TLSv12`, `TLSv13`. + * @return sslProtocol + **/ + @ApiModelProperty(value = "The SSL protocol employed by the endpoint. >Permitted values: `TLSv12`, `TLSv13`.") + @JsonProperty(JSON_PROPERTY_SSL_PROTOCOL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public SslProtocolEnum getSslProtocol() { + return sslProtocol; + } + + + @JsonProperty(JSON_PROPERTY_SSL_PROTOCOL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSslProtocol(SslProtocolEnum sslProtocol) { + this.sslProtocol = sslProtocol; + } + + + /** + * Return true if this NotificationConfigurationDetails object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + NotificationConfigurationDetails notificationConfigurationDetails = (NotificationConfigurationDetails) o; + return Objects.equals(this.active, notificationConfigurationDetails.active) && + Objects.equals(this.apiVersion, notificationConfigurationDetails.apiVersion) && + Objects.equals(this.description, notificationConfigurationDetails.description) && + Objects.equals(this.eventConfigs, notificationConfigurationDetails.eventConfigs) && + Objects.equals(this.hmacSignatureKey, notificationConfigurationDetails.hmacSignatureKey) && + Objects.equals(this.notificationId, notificationConfigurationDetails.notificationId) && + Objects.equals(this.notifyPassword, notificationConfigurationDetails.notifyPassword) && + Objects.equals(this.notifyURL, notificationConfigurationDetails.notifyURL) && + Objects.equals(this.notifyUsername, notificationConfigurationDetails.notifyUsername) && + Objects.equals(this.sslProtocol, notificationConfigurationDetails.sslProtocol); + } + + @Override + public int hashCode() { + return Objects.hash(active, apiVersion, description, eventConfigs, hmacSignatureKey, notificationId, notifyPassword, notifyURL, notifyUsername, sslProtocol); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class NotificationConfigurationDetails {\n"); + sb.append(" active: ").append(toIndentedString(active)).append("\n"); + sb.append(" apiVersion: ").append(toIndentedString(apiVersion)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" eventConfigs: ").append(toIndentedString(eventConfigs)).append("\n"); + sb.append(" hmacSignatureKey: ").append(toIndentedString(hmacSignatureKey)).append("\n"); + sb.append(" notificationId: ").append(toIndentedString(notificationId)).append("\n"); + sb.append(" notifyPassword: ").append(toIndentedString(notifyPassword)).append("\n"); + sb.append(" notifyURL: ").append(toIndentedString(notifyURL)).append("\n"); + sb.append(" notifyUsername: ").append(toIndentedString(notifyUsername)).append("\n"); + sb.append(" sslProtocol: ").append(toIndentedString(sslProtocol)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line 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 NotificationConfigurationDetails given an JSON string + * + * @param jsonString JSON string + * @return An instance of NotificationConfigurationDetails + * @throws JsonProcessingException if the JSON string is invalid with respect to NotificationConfigurationDetails + */ + public static NotificationConfigurationDetails fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, NotificationConfigurationDetails.class); + } +/** + * Convert an instance of NotificationConfigurationDetails 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/marketpayconfiguration/NotificationEventConfiguration.java b/src/main/java/com/adyen/model/marketpayconfiguration/NotificationEventConfiguration.java new file mode 100644 index 000000000..3704cb8db --- /dev/null +++ b/src/main/java/com/adyen/model/marketpayconfiguration/NotificationEventConfiguration.java @@ -0,0 +1,276 @@ +/* + * Notification Configuration API + * This API is used for the classic integration. If you are just starting your implementation, refer to our [new integration guide](https://docs.adyen.com/marketplaces-and-platforms) instead. The Notification Configuration API provides endpoints for setting up and testing notifications that inform you of events on your platform, for example when a verification check or a payout has been completed. For more information, refer to our [documentation](https://docs.adyen.com/marketplaces-and-platforms/classic/notifications). ## Authentication Your Adyen contact will provide your API credential and an API key. To connect to the API, add an `X-API-Key` header with the API key as the value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: YOUR_API_KEY\" \\ ... ``` Alternatively, you can use the username and password to connect to the API using basic authentication. For example: ``` curl -U \"ws@MarketPlace.YOUR_PLATFORM_ACCOUNT\":\"YOUR_WS_PASSWORD\" \\ -H \"Content-Type: application/json\" \\ ... ``` When going live, you need to generate new web service user credentials to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning The Notification Configuration API supports [versioning](https://docs.adyen.com/development-resources/versioning) using a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://cal-test.adyen.com/cal/services/Notification/v6/createNotificationConfiguration ``` + * + * The version of the OpenAPI document: 6 + * + * + * 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.marketpayconfiguration; + +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; + + +/** + * NotificationEventConfiguration + */ +@JsonPropertyOrder({ + NotificationEventConfiguration.JSON_PROPERTY_EVENT_TYPE, + NotificationEventConfiguration.JSON_PROPERTY_INCLUDE_MODE +}) + +public class NotificationEventConfiguration { + /** + * The type of event. Possible values: **ACCOUNT_CLOSED**, **ACCOUNT_CREATED**, **ACCOUNT_FUNDS_BELOW_THRESHOLD**, **ACCOUNT_HOLDER_CREATED**, **ACCOUNT_HOLDER_LIMIT_REACHED**, **ACCOUNT_HOLDER_PAYOUT**, **ACCOUNT_HOLDER_STATUS_CHANGE**, **ACCOUNT_HOLDER_STORE_STATUS_CHANGE**, **ACCOUNT_HOLDER_UPCOMING_DEADLINE**, **ACCOUNT_HOLDER_UPDATED**, **ACCOUNT_HOLDER_VERIFICATION**, **ACCOUNT_UPDATED**, **BENEFICIARY_SETUP**, **COMPENSATE_NEGATIVE_BALANCE**, **DIRECT_DEBIT_INITIATED**, **PAYMENT_FAILURE**, **REFUND_FUNDS_TRANSFER**, **REPORT_AVAILABLE**, **SCHEDULED_REFUNDS**, **TRANSFER_FUNDS**. + */ + public enum EventTypeEnum { + ACCOUNT_CLOSED("ACCOUNT_CLOSED"), + + ACCOUNT_CREATED("ACCOUNT_CREATED"), + + ACCOUNT_FUNDS_BELOW_THRESHOLD("ACCOUNT_FUNDS_BELOW_THRESHOLD"), + + ACCOUNT_HOLDER_CREATED("ACCOUNT_HOLDER_CREATED"), + + ACCOUNT_HOLDER_LIMIT_REACHED("ACCOUNT_HOLDER_LIMIT_REACHED"), + + ACCOUNT_HOLDER_MIGRATED("ACCOUNT_HOLDER_MIGRATED"), + + ACCOUNT_HOLDER_PAYOUT("ACCOUNT_HOLDER_PAYOUT"), + + ACCOUNT_HOLDER_STATUS_CHANGE("ACCOUNT_HOLDER_STATUS_CHANGE"), + + ACCOUNT_HOLDER_STORE_STATUS_CHANGE("ACCOUNT_HOLDER_STORE_STATUS_CHANGE"), + + ACCOUNT_HOLDER_UPCOMING_DEADLINE("ACCOUNT_HOLDER_UPCOMING_DEADLINE"), + + ACCOUNT_HOLDER_UPDATED("ACCOUNT_HOLDER_UPDATED"), + + ACCOUNT_HOLDER_VERIFICATION("ACCOUNT_HOLDER_VERIFICATION"), + + ACCOUNT_UPDATED("ACCOUNT_UPDATED"), + + BENEFICIARY_SETUP("BENEFICIARY_SETUP"), + + COMPENSATE_NEGATIVE_BALANCE("COMPENSATE_NEGATIVE_BALANCE"), + + DIRECT_DEBIT_INITIATED("DIRECT_DEBIT_INITIATED"), + + FUNDS_MIGRATED("FUNDS_MIGRATED"), + + PAYMENT_FAILURE("PAYMENT_FAILURE"), + + PENDING_CREDIT("PENDING_CREDIT"), + + REFUND_FUNDS_TRANSFER("REFUND_FUNDS_TRANSFER"), + + REPORT_AVAILABLE("REPORT_AVAILABLE"), + + SCHEDULED_REFUNDS("SCHEDULED_REFUNDS"), + + SCORE_SIGNAL_TRIGGERED("SCORE_SIGNAL_TRIGGERED"), + + TRANSFER_FUNDS("TRANSFER_FUNDS"), + + TRANSFER_NOT_PAIDOUT_TRANSFERS("TRANSFER_NOT_PAIDOUT_TRANSFERS"); + + private String value; + + EventTypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EventTypeEnum fromValue(String value) { + for (EventTypeEnum b : EventTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_EVENT_TYPE = "eventType"; + private EventTypeEnum eventType; + + /** + * Indicates whether the specified `eventType` is sent to your webhook endpoint. Possible values: * **INCLUDE**: Send the specified `eventType`. * **EXCLUDE**: Send all event types except the specified `eventType` and other event types with the `includeMode` set to **EXCLUDE**. + */ + public enum IncludeModeEnum { + EXCLUDE("EXCLUDE"), + + INCLUDE("INCLUDE"); + + private String value; + + IncludeModeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static IncludeModeEnum fromValue(String value) { + for (IncludeModeEnum b : IncludeModeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_INCLUDE_MODE = "includeMode"; + private IncludeModeEnum includeMode; + + public NotificationEventConfiguration() { + } + + public NotificationEventConfiguration eventType(EventTypeEnum eventType) { + this.eventType = eventType; + return this; + } + + /** + * The type of event. Possible values: **ACCOUNT_CLOSED**, **ACCOUNT_CREATED**, **ACCOUNT_FUNDS_BELOW_THRESHOLD**, **ACCOUNT_HOLDER_CREATED**, **ACCOUNT_HOLDER_LIMIT_REACHED**, **ACCOUNT_HOLDER_PAYOUT**, **ACCOUNT_HOLDER_STATUS_CHANGE**, **ACCOUNT_HOLDER_STORE_STATUS_CHANGE**, **ACCOUNT_HOLDER_UPCOMING_DEADLINE**, **ACCOUNT_HOLDER_UPDATED**, **ACCOUNT_HOLDER_VERIFICATION**, **ACCOUNT_UPDATED**, **BENEFICIARY_SETUP**, **COMPENSATE_NEGATIVE_BALANCE**, **DIRECT_DEBIT_INITIATED**, **PAYMENT_FAILURE**, **REFUND_FUNDS_TRANSFER**, **REPORT_AVAILABLE**, **SCHEDULED_REFUNDS**, **TRANSFER_FUNDS**. + * @return eventType + **/ + @ApiModelProperty(required = true, value = "The type of event. Possible values: **ACCOUNT_CLOSED**, **ACCOUNT_CREATED**, **ACCOUNT_FUNDS_BELOW_THRESHOLD**, **ACCOUNT_HOLDER_CREATED**, **ACCOUNT_HOLDER_LIMIT_REACHED**, **ACCOUNT_HOLDER_PAYOUT**, **ACCOUNT_HOLDER_STATUS_CHANGE**, **ACCOUNT_HOLDER_STORE_STATUS_CHANGE**, **ACCOUNT_HOLDER_UPCOMING_DEADLINE**, **ACCOUNT_HOLDER_UPDATED**, **ACCOUNT_HOLDER_VERIFICATION**, **ACCOUNT_UPDATED**, **BENEFICIARY_SETUP**, **COMPENSATE_NEGATIVE_BALANCE**, **DIRECT_DEBIT_INITIATED**, **PAYMENT_FAILURE**, **REFUND_FUNDS_TRANSFER**, **REPORT_AVAILABLE**, **SCHEDULED_REFUNDS**, **TRANSFER_FUNDS**.") + @JsonProperty(JSON_PROPERTY_EVENT_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public EventTypeEnum getEventType() { + return eventType; + } + + + @JsonProperty(JSON_PROPERTY_EVENT_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEventType(EventTypeEnum eventType) { + this.eventType = eventType; + } + + + public NotificationEventConfiguration includeMode(IncludeModeEnum includeMode) { + this.includeMode = includeMode; + return this; + } + + /** + * Indicates whether the specified `eventType` is sent to your webhook endpoint. Possible values: * **INCLUDE**: Send the specified `eventType`. * **EXCLUDE**: Send all event types except the specified `eventType` and other event types with the `includeMode` set to **EXCLUDE**. + * @return includeMode + **/ + @ApiModelProperty(required = true, value = "Indicates whether the specified `eventType` is sent to your webhook endpoint. Possible values: * **INCLUDE**: Send the specified `eventType`. * **EXCLUDE**: Send all event types except the specified `eventType` and other event types with the `includeMode` set to **EXCLUDE**.") + @JsonProperty(JSON_PROPERTY_INCLUDE_MODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public IncludeModeEnum getIncludeMode() { + return includeMode; + } + + + @JsonProperty(JSON_PROPERTY_INCLUDE_MODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setIncludeMode(IncludeModeEnum includeMode) { + this.includeMode = includeMode; + } + + + /** + * Return true if this NotificationEventConfiguration object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + NotificationEventConfiguration notificationEventConfiguration = (NotificationEventConfiguration) o; + return Objects.equals(this.eventType, notificationEventConfiguration.eventType) && + Objects.equals(this.includeMode, notificationEventConfiguration.includeMode); + } + + @Override + public int hashCode() { + return Objects.hash(eventType, includeMode); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class NotificationEventConfiguration {\n"); + sb.append(" eventType: ").append(toIndentedString(eventType)).append("\n"); + sb.append(" includeMode: ").append(toIndentedString(includeMode)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line 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 NotificationEventConfiguration given an JSON string + * + * @param jsonString JSON string + * @return An instance of NotificationEventConfiguration + * @throws JsonProcessingException if the JSON string is invalid with respect to NotificationEventConfiguration + */ + public static NotificationEventConfiguration fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, NotificationEventConfiguration.class); + } +/** + * Convert an instance of NotificationEventConfiguration 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/marketpayconfiguration/ServiceError.java b/src/main/java/com/adyen/model/marketpayconfiguration/ServiceError.java new file mode 100644 index 000000000..7d89ae3f3 --- /dev/null +++ b/src/main/java/com/adyen/model/marketpayconfiguration/ServiceError.java @@ -0,0 +1,253 @@ +/* + * Notification Configuration API + * This API is used for the classic integration. If you are just starting your implementation, refer to our [new integration guide](https://docs.adyen.com/marketplaces-and-platforms) instead. The Notification Configuration API provides endpoints for setting up and testing notifications that inform you of events on your platform, for example when a verification check or a payout has been completed. For more information, refer to our [documentation](https://docs.adyen.com/marketplaces-and-platforms/classic/notifications). ## Authentication Your Adyen contact will provide your API credential and an API key. To connect to the API, add an `X-API-Key` header with the API key as the value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: YOUR_API_KEY\" \\ ... ``` Alternatively, you can use the username and password to connect to the API using basic authentication. For example: ``` curl -U \"ws@MarketPlace.YOUR_PLATFORM_ACCOUNT\":\"YOUR_WS_PASSWORD\" \\ -H \"Content-Type: application/json\" \\ ... ``` When going live, you need to generate new web service user credentials to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning The Notification Configuration API supports [versioning](https://docs.adyen.com/development-resources/versioning) using a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://cal-test.adyen.com/cal/services/Notification/v6/createNotificationConfiguration ``` + * + * The version of the OpenAPI document: 6 + * + * + * 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.marketpayconfiguration; + +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; + + +/** + * ServiceError + */ +@JsonPropertyOrder({ + ServiceError.JSON_PROPERTY_ERROR_CODE, + ServiceError.JSON_PROPERTY_ERROR_TYPE, + ServiceError.JSON_PROPERTY_MESSAGE, + ServiceError.JSON_PROPERTY_PSP_REFERENCE, + ServiceError.JSON_PROPERTY_STATUS +}) + +public class ServiceError { + public static final String JSON_PROPERTY_ERROR_CODE = "errorCode"; + private String errorCode; + + public static final String JSON_PROPERTY_ERROR_TYPE = "errorType"; + private String errorType; + + public static final String JSON_PROPERTY_MESSAGE = "message"; + private String message; + + public static final String JSON_PROPERTY_PSP_REFERENCE = "pspReference"; + private String pspReference; + + public static final String JSON_PROPERTY_STATUS = "status"; + private Integer status; + + public ServiceError() { + } + + public ServiceError errorCode(String errorCode) { + this.errorCode = errorCode; + return this; + } + + /** + * The error code mapped to the error message. + * @return errorCode + **/ + @ApiModelProperty(value = "The error code mapped to the error message.") + @JsonProperty(JSON_PROPERTY_ERROR_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getErrorCode() { + return errorCode; + } + + + @JsonProperty(JSON_PROPERTY_ERROR_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setErrorCode(String errorCode) { + this.errorCode = errorCode; + } + + + public ServiceError errorType(String errorType) { + this.errorType = errorType; + return this; + } + + /** + * The category of the error. + * @return errorType + **/ + @ApiModelProperty(value = "The category of the error.") + @JsonProperty(JSON_PROPERTY_ERROR_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getErrorType() { + return errorType; + } + + + @JsonProperty(JSON_PROPERTY_ERROR_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setErrorType(String errorType) { + this.errorType = errorType; + } + + + public ServiceError message(String message) { + this.message = message; + return this; + } + + /** + * A short explanation of the issue. + * @return message + **/ + @ApiModelProperty(value = "A short explanation of the issue.") + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getMessage() { + return message; + } + + + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMessage(String message) { + this.message = message; + } + + + public ServiceError pspReference(String pspReference) { + this.pspReference = pspReference; + return this; + } + + /** + * The PSP reference of the payment. + * @return pspReference + **/ + @ApiModelProperty(value = "The PSP reference of the payment.") + @JsonProperty(JSON_PROPERTY_PSP_REFERENCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getPspReference() { + return pspReference; + } + + + @JsonProperty(JSON_PROPERTY_PSP_REFERENCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPspReference(String pspReference) { + this.pspReference = pspReference; + } + + + public ServiceError status(Integer status) { + this.status = status; + return this; + } + + /** + * The HTTP response status. + * @return status + **/ + @ApiModelProperty(value = "The HTTP response status.") + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Integer getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setStatus(Integer status) { + this.status = status; + } + + + /** + * Return true if this ServiceError object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ServiceError serviceError = (ServiceError) o; + return Objects.equals(this.errorCode, serviceError.errorCode) && + Objects.equals(this.errorType, serviceError.errorType) && + Objects.equals(this.message, serviceError.message) && + Objects.equals(this.pspReference, serviceError.pspReference) && + Objects.equals(this.status, serviceError.status); + } + + @Override + public int hashCode() { + return Objects.hash(errorCode, errorType, message, pspReference, status); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ServiceError {\n"); + sb.append(" errorCode: ").append(toIndentedString(errorCode)).append("\n"); + sb.append(" errorType: ").append(toIndentedString(errorType)).append("\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append(" pspReference: ").append(toIndentedString(pspReference)).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 ServiceError given an JSON string + * + * @param jsonString JSON string + * @return An instance of ServiceError + * @throws JsonProcessingException if the JSON string is invalid with respect to ServiceError + */ + public static ServiceError fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, ServiceError.class); + } +/** + * Convert an instance of ServiceError 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/marketpayconfiguration/TestNotificationConfigurationRequest.java b/src/main/java/com/adyen/model/marketpayconfiguration/TestNotificationConfigurationRequest.java new file mode 100644 index 000000000..d713aedc1 --- /dev/null +++ b/src/main/java/com/adyen/model/marketpayconfiguration/TestNotificationConfigurationRequest.java @@ -0,0 +1,251 @@ +/* + * Notification Configuration API + * This API is used for the classic integration. If you are just starting your implementation, refer to our [new integration guide](https://docs.adyen.com/marketplaces-and-platforms) instead. The Notification Configuration API provides endpoints for setting up and testing notifications that inform you of events on your platform, for example when a verification check or a payout has been completed. For more information, refer to our [documentation](https://docs.adyen.com/marketplaces-and-platforms/classic/notifications). ## Authentication Your Adyen contact will provide your API credential and an API key. To connect to the API, add an `X-API-Key` header with the API key as the value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: YOUR_API_KEY\" \\ ... ``` Alternatively, you can use the username and password to connect to the API using basic authentication. For example: ``` curl -U \"ws@MarketPlace.YOUR_PLATFORM_ACCOUNT\":\"YOUR_WS_PASSWORD\" \\ -H \"Content-Type: application/json\" \\ ... ``` When going live, you need to generate new web service user credentials to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning The Notification Configuration API supports [versioning](https://docs.adyen.com/development-resources/versioning) using a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://cal-test.adyen.com/cal/services/Notification/v6/createNotificationConfiguration ``` + * + * The version of the OpenAPI document: 6 + * + * + * 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.marketpayconfiguration; + +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.ArrayList; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.core.JsonProcessingException; + + +/** + * TestNotificationConfigurationRequest + */ +@JsonPropertyOrder({ + TestNotificationConfigurationRequest.JSON_PROPERTY_EVENT_TYPES, + TestNotificationConfigurationRequest.JSON_PROPERTY_NOTIFICATION_ID +}) + +public class TestNotificationConfigurationRequest { + /** + * Gets or Sets eventTypes + */ + public enum EventTypesEnum { + ACCOUNT_CLOSED("ACCOUNT_CLOSED"), + + ACCOUNT_CREATED("ACCOUNT_CREATED"), + + ACCOUNT_FUNDS_BELOW_THRESHOLD("ACCOUNT_FUNDS_BELOW_THRESHOLD"), + + ACCOUNT_HOLDER_CREATED("ACCOUNT_HOLDER_CREATED"), + + ACCOUNT_HOLDER_LIMIT_REACHED("ACCOUNT_HOLDER_LIMIT_REACHED"), + + ACCOUNT_HOLDER_MIGRATED("ACCOUNT_HOLDER_MIGRATED"), + + ACCOUNT_HOLDER_PAYOUT("ACCOUNT_HOLDER_PAYOUT"), + + ACCOUNT_HOLDER_STATUS_CHANGE("ACCOUNT_HOLDER_STATUS_CHANGE"), + + ACCOUNT_HOLDER_STORE_STATUS_CHANGE("ACCOUNT_HOLDER_STORE_STATUS_CHANGE"), + + ACCOUNT_HOLDER_UPCOMING_DEADLINE("ACCOUNT_HOLDER_UPCOMING_DEADLINE"), + + ACCOUNT_HOLDER_UPDATED("ACCOUNT_HOLDER_UPDATED"), + + ACCOUNT_HOLDER_VERIFICATION("ACCOUNT_HOLDER_VERIFICATION"), + + ACCOUNT_UPDATED("ACCOUNT_UPDATED"), + + BENEFICIARY_SETUP("BENEFICIARY_SETUP"), + + COMPENSATE_NEGATIVE_BALANCE("COMPENSATE_NEGATIVE_BALANCE"), + + DIRECT_DEBIT_INITIATED("DIRECT_DEBIT_INITIATED"), + + FUNDS_MIGRATED("FUNDS_MIGRATED"), + + PAYMENT_FAILURE("PAYMENT_FAILURE"), + + PENDING_CREDIT("PENDING_CREDIT"), + + REFUND_FUNDS_TRANSFER("REFUND_FUNDS_TRANSFER"), + + REPORT_AVAILABLE("REPORT_AVAILABLE"), + + SCHEDULED_REFUNDS("SCHEDULED_REFUNDS"), + + SCORE_SIGNAL_TRIGGERED("SCORE_SIGNAL_TRIGGERED"), + + TRANSFER_FUNDS("TRANSFER_FUNDS"), + + TRANSFER_NOT_PAIDOUT_TRANSFERS("TRANSFER_NOT_PAIDOUT_TRANSFERS"); + + private String value; + + EventTypesEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EventTypesEnum fromValue(String value) { + for (EventTypesEnum b : EventTypesEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_EVENT_TYPES = "eventTypes"; + private List eventTypes = null; + + public static final String JSON_PROPERTY_NOTIFICATION_ID = "notificationId"; + private Long notificationId; + + public TestNotificationConfigurationRequest() { + } + + public TestNotificationConfigurationRequest eventTypes(List eventTypes) { + this.eventTypes = eventTypes; + return this; + } + + public TestNotificationConfigurationRequest addEventTypesItem(EventTypesEnum eventTypesItem) { + if (this.eventTypes == null) { + this.eventTypes = new ArrayList<>(); + } + this.eventTypes.add(eventTypesItem); + return this; + } + + /** + * The event types to test. If left blank, then all of the configured event types will be tested. >Permitted values: `ACCOUNT_HOLDER_CREATED`, `ACCOUNT_CREATED`, `ACCOUNT_UPDATED`, `ACCOUNT_HOLDER_UPDATED`, `ACCOUNT_HOLDER_STATUS_CHANGE`, `ACCOUNT_HOLDER_STORE_STATUS_CHANGE` `ACCOUNT_HOLDER_VERIFICATION`, `ACCOUNT_HOLDER_LIMIT_REACHED`, `ACCOUNT_HOLDER_PAYOUT`, `PAYMENT_FAILURE`, `SCHEDULED_REFUNDS`, `REPORT_AVAILABLE`, `TRANSFER_FUNDS`, `BENEFICIARY_SETUP`, `COMPENSATE_NEGATIVE_BALANCE`. + * @return eventTypes + **/ + @ApiModelProperty(value = "The event types to test. If left blank, then all of the configured event types will be tested. >Permitted values: `ACCOUNT_HOLDER_CREATED`, `ACCOUNT_CREATED`, `ACCOUNT_UPDATED`, `ACCOUNT_HOLDER_UPDATED`, `ACCOUNT_HOLDER_STATUS_CHANGE`, `ACCOUNT_HOLDER_STORE_STATUS_CHANGE` `ACCOUNT_HOLDER_VERIFICATION`, `ACCOUNT_HOLDER_LIMIT_REACHED`, `ACCOUNT_HOLDER_PAYOUT`, `PAYMENT_FAILURE`, `SCHEDULED_REFUNDS`, `REPORT_AVAILABLE`, `TRANSFER_FUNDS`, `BENEFICIARY_SETUP`, `COMPENSATE_NEGATIVE_BALANCE`.") + @JsonProperty(JSON_PROPERTY_EVENT_TYPES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getEventTypes() { + return eventTypes; + } + + + @JsonProperty(JSON_PROPERTY_EVENT_TYPES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEventTypes(List eventTypes) { + this.eventTypes = eventTypes; + } + + + public TestNotificationConfigurationRequest notificationId(Long notificationId) { + this.notificationId = notificationId; + return this; + } + + /** + * The ID of the notification subscription configuration to be tested. + * @return notificationId + **/ + @ApiModelProperty(required = true, value = "The ID of the notification subscription configuration to be tested.") + @JsonProperty(JSON_PROPERTY_NOTIFICATION_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Long getNotificationId() { + return notificationId; + } + + + @JsonProperty(JSON_PROPERTY_NOTIFICATION_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setNotificationId(Long notificationId) { + this.notificationId = notificationId; + } + + + /** + * Return true if this TestNotificationConfigurationRequest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TestNotificationConfigurationRequest testNotificationConfigurationRequest = (TestNotificationConfigurationRequest) o; + return Objects.equals(this.eventTypes, testNotificationConfigurationRequest.eventTypes) && + Objects.equals(this.notificationId, testNotificationConfigurationRequest.notificationId); + } + + @Override + public int hashCode() { + return Objects.hash(eventTypes, notificationId); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TestNotificationConfigurationRequest {\n"); + sb.append(" eventTypes: ").append(toIndentedString(eventTypes)).append("\n"); + sb.append(" notificationId: ").append(toIndentedString(notificationId)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line 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 TestNotificationConfigurationRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of TestNotificationConfigurationRequest + * @throws JsonProcessingException if the JSON string is invalid with respect to TestNotificationConfigurationRequest + */ + public static TestNotificationConfigurationRequest fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, TestNotificationConfigurationRequest.class); + } +/** + * Convert an instance of TestNotificationConfigurationRequest 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/marketpayconfiguration/TestNotificationConfigurationResponse.java b/src/main/java/com/adyen/model/marketpayconfiguration/TestNotificationConfigurationResponse.java new file mode 100644 index 000000000..ccca012fb --- /dev/null +++ b/src/main/java/com/adyen/model/marketpayconfiguration/TestNotificationConfigurationResponse.java @@ -0,0 +1,471 @@ +/* + * Notification Configuration API + * This API is used for the classic integration. If you are just starting your implementation, refer to our [new integration guide](https://docs.adyen.com/marketplaces-and-platforms) instead. The Notification Configuration API provides endpoints for setting up and testing notifications that inform you of events on your platform, for example when a verification check or a payout has been completed. For more information, refer to our [documentation](https://docs.adyen.com/marketplaces-and-platforms/classic/notifications). ## Authentication Your Adyen contact will provide your API credential and an API key. To connect to the API, add an `X-API-Key` header with the API key as the value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: YOUR_API_KEY\" \\ ... ``` Alternatively, you can use the username and password to connect to the API using basic authentication. For example: ``` curl -U \"ws@MarketPlace.YOUR_PLATFORM_ACCOUNT\":\"YOUR_WS_PASSWORD\" \\ -H \"Content-Type: application/json\" \\ ... ``` When going live, you need to generate new web service user credentials to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning The Notification Configuration API supports [versioning](https://docs.adyen.com/development-resources/versioning) using a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://cal-test.adyen.com/cal/services/Notification/v6/createNotificationConfiguration ``` + * + * The version of the OpenAPI document: 6 + * + * + * 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.marketpayconfiguration; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.adyen.model.marketpayconfiguration.ErrorFieldType; +import com.adyen.model.marketpayconfiguration.ExchangeMessage; +import com.fasterxml.jackson.annotation.JsonInclude; +import 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; + + +/** + * TestNotificationConfigurationResponse + */ +@JsonPropertyOrder({ + TestNotificationConfigurationResponse.JSON_PROPERTY_ERROR_MESSAGES, + TestNotificationConfigurationResponse.JSON_PROPERTY_EVENT_TYPES, + TestNotificationConfigurationResponse.JSON_PROPERTY_EXCHANGE_MESSAGES, + TestNotificationConfigurationResponse.JSON_PROPERTY_INVALID_FIELDS, + TestNotificationConfigurationResponse.JSON_PROPERTY_NOTIFICATION_ID, + TestNotificationConfigurationResponse.JSON_PROPERTY_OK_MESSAGES, + TestNotificationConfigurationResponse.JSON_PROPERTY_PSP_REFERENCE, + TestNotificationConfigurationResponse.JSON_PROPERTY_RESULT_CODE +}) + +public class TestNotificationConfigurationResponse { + public static final String JSON_PROPERTY_ERROR_MESSAGES = "errorMessages"; + private List errorMessages = null; + + /** + * Gets or Sets eventTypes + */ + public enum EventTypesEnum { + ACCOUNT_CLOSED("ACCOUNT_CLOSED"), + + ACCOUNT_CREATED("ACCOUNT_CREATED"), + + ACCOUNT_FUNDS_BELOW_THRESHOLD("ACCOUNT_FUNDS_BELOW_THRESHOLD"), + + ACCOUNT_HOLDER_CREATED("ACCOUNT_HOLDER_CREATED"), + + ACCOUNT_HOLDER_LIMIT_REACHED("ACCOUNT_HOLDER_LIMIT_REACHED"), + + ACCOUNT_HOLDER_MIGRATED("ACCOUNT_HOLDER_MIGRATED"), + + ACCOUNT_HOLDER_PAYOUT("ACCOUNT_HOLDER_PAYOUT"), + + ACCOUNT_HOLDER_STATUS_CHANGE("ACCOUNT_HOLDER_STATUS_CHANGE"), + + ACCOUNT_HOLDER_STORE_STATUS_CHANGE("ACCOUNT_HOLDER_STORE_STATUS_CHANGE"), + + ACCOUNT_HOLDER_UPCOMING_DEADLINE("ACCOUNT_HOLDER_UPCOMING_DEADLINE"), + + ACCOUNT_HOLDER_UPDATED("ACCOUNT_HOLDER_UPDATED"), + + ACCOUNT_HOLDER_VERIFICATION("ACCOUNT_HOLDER_VERIFICATION"), + + ACCOUNT_UPDATED("ACCOUNT_UPDATED"), + + BENEFICIARY_SETUP("BENEFICIARY_SETUP"), + + COMPENSATE_NEGATIVE_BALANCE("COMPENSATE_NEGATIVE_BALANCE"), + + DIRECT_DEBIT_INITIATED("DIRECT_DEBIT_INITIATED"), + + FUNDS_MIGRATED("FUNDS_MIGRATED"), + + PAYMENT_FAILURE("PAYMENT_FAILURE"), + + PENDING_CREDIT("PENDING_CREDIT"), + + REFUND_FUNDS_TRANSFER("REFUND_FUNDS_TRANSFER"), + + REPORT_AVAILABLE("REPORT_AVAILABLE"), + + SCHEDULED_REFUNDS("SCHEDULED_REFUNDS"), + + SCORE_SIGNAL_TRIGGERED("SCORE_SIGNAL_TRIGGERED"), + + TRANSFER_FUNDS("TRANSFER_FUNDS"), + + TRANSFER_NOT_PAIDOUT_TRANSFERS("TRANSFER_NOT_PAIDOUT_TRANSFERS"); + + private String value; + + EventTypesEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EventTypesEnum fromValue(String value) { + for (EventTypesEnum b : EventTypesEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_EVENT_TYPES = "eventTypes"; + private List eventTypes = null; + + public static final String JSON_PROPERTY_EXCHANGE_MESSAGES = "exchangeMessages"; + private List exchangeMessages = null; + + public static final String JSON_PROPERTY_INVALID_FIELDS = "invalidFields"; + private List invalidFields = null; + + public static final String JSON_PROPERTY_NOTIFICATION_ID = "notificationId"; + private Long notificationId; + + public static final String JSON_PROPERTY_OK_MESSAGES = "okMessages"; + private List okMessages = null; + + public static final String JSON_PROPERTY_PSP_REFERENCE = "pspReference"; + private String pspReference; + + public static final String JSON_PROPERTY_RESULT_CODE = "resultCode"; + private String resultCode; + + public TestNotificationConfigurationResponse() { + } + + public TestNotificationConfigurationResponse errorMessages(List errorMessages) { + this.errorMessages = errorMessages; + return this; + } + + public TestNotificationConfigurationResponse addErrorMessagesItem(String errorMessagesItem) { + if (this.errorMessages == null) { + this.errorMessages = new ArrayList<>(); + } + this.errorMessages.add(errorMessagesItem); + return this; + } + + /** + * Any error messages encountered. + * @return errorMessages + **/ + @ApiModelProperty(value = "Any error messages encountered.") + @JsonProperty(JSON_PROPERTY_ERROR_MESSAGES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getErrorMessages() { + return errorMessages; + } + + + @JsonProperty(JSON_PROPERTY_ERROR_MESSAGES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setErrorMessages(List errorMessages) { + this.errorMessages = errorMessages; + } + + + public TestNotificationConfigurationResponse eventTypes(List eventTypes) { + this.eventTypes = eventTypes; + return this; + } + + public TestNotificationConfigurationResponse addEventTypesItem(EventTypesEnum eventTypesItem) { + if (this.eventTypes == null) { + this.eventTypes = new ArrayList<>(); + } + this.eventTypes.add(eventTypesItem); + return this; + } + + /** + * The event types that were tested. >Permitted values: `ACCOUNT_HOLDER_CREATED`, `ACCOUNT_CREATED`, `ACCOUNT_UPDATED`, `ACCOUNT_HOLDER_UPDATED`, `ACCOUNT_HOLDER_STATUS_CHANGE`, `ACCOUNT_HOLDER_STORE_STATUS_CHANGE` `ACCOUNT_HOLDER_VERIFICATION`, `ACCOUNT_HOLDER_LIMIT_REACHED`, `ACCOUNT_HOLDER_PAYOUT`, `PAYMENT_FAILURE`, `SCHEDULED_REFUNDS`, `REPORT_AVAILABLE`, `TRANSFER_FUNDS`, `BENEFICIARY_SETUP`, `COMPENSATE_NEGATIVE_BALANCE`. + * @return eventTypes + **/ + @ApiModelProperty(value = "The event types that were tested. >Permitted values: `ACCOUNT_HOLDER_CREATED`, `ACCOUNT_CREATED`, `ACCOUNT_UPDATED`, `ACCOUNT_HOLDER_UPDATED`, `ACCOUNT_HOLDER_STATUS_CHANGE`, `ACCOUNT_HOLDER_STORE_STATUS_CHANGE` `ACCOUNT_HOLDER_VERIFICATION`, `ACCOUNT_HOLDER_LIMIT_REACHED`, `ACCOUNT_HOLDER_PAYOUT`, `PAYMENT_FAILURE`, `SCHEDULED_REFUNDS`, `REPORT_AVAILABLE`, `TRANSFER_FUNDS`, `BENEFICIARY_SETUP`, `COMPENSATE_NEGATIVE_BALANCE`.") + @JsonProperty(JSON_PROPERTY_EVENT_TYPES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getEventTypes() { + return eventTypes; + } + + + @JsonProperty(JSON_PROPERTY_EVENT_TYPES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEventTypes(List eventTypes) { + this.eventTypes = eventTypes; + } + + + public TestNotificationConfigurationResponse exchangeMessages(List exchangeMessages) { + this.exchangeMessages = exchangeMessages; + return this; + } + + public TestNotificationConfigurationResponse addExchangeMessagesItem(ExchangeMessage exchangeMessagesItem) { + if (this.exchangeMessages == null) { + this.exchangeMessages = new ArrayList<>(); + } + this.exchangeMessages.add(exchangeMessagesItem); + return this; + } + + /** + * The notification message and related response messages. + * @return exchangeMessages + **/ + @ApiModelProperty(value = "The notification message and related response messages.") + @JsonProperty(JSON_PROPERTY_EXCHANGE_MESSAGES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getExchangeMessages() { + return exchangeMessages; + } + + + @JsonProperty(JSON_PROPERTY_EXCHANGE_MESSAGES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setExchangeMessages(List exchangeMessages) { + this.exchangeMessages = exchangeMessages; + } + + + public TestNotificationConfigurationResponse invalidFields(List invalidFields) { + this.invalidFields = invalidFields; + return this; + } + + public TestNotificationConfigurationResponse addInvalidFieldsItem(ErrorFieldType invalidFieldsItem) { + if (this.invalidFields == null) { + this.invalidFields = new ArrayList<>(); + } + this.invalidFields.add(invalidFieldsItem); + return this; + } + + /** + * Contains field validation errors that would prevent requests from being processed. + * @return invalidFields + **/ + @ApiModelProperty(value = "Contains field validation errors that would prevent requests from being processed.") + @JsonProperty(JSON_PROPERTY_INVALID_FIELDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getInvalidFields() { + return invalidFields; + } + + + @JsonProperty(JSON_PROPERTY_INVALID_FIELDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setInvalidFields(List invalidFields) { + this.invalidFields = invalidFields; + } + + + public TestNotificationConfigurationResponse notificationId(Long notificationId) { + this.notificationId = notificationId; + return this; + } + + /** + * The ID of the notification subscription configuration. + * @return notificationId + **/ + @ApiModelProperty(required = true, value = "The ID of the notification subscription configuration.") + @JsonProperty(JSON_PROPERTY_NOTIFICATION_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Long getNotificationId() { + return notificationId; + } + + + @JsonProperty(JSON_PROPERTY_NOTIFICATION_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setNotificationId(Long notificationId) { + this.notificationId = notificationId; + } + + + public TestNotificationConfigurationResponse okMessages(List okMessages) { + this.okMessages = okMessages; + return this; + } + + public TestNotificationConfigurationResponse addOkMessagesItem(String okMessagesItem) { + if (this.okMessages == null) { + this.okMessages = new ArrayList<>(); + } + this.okMessages.add(okMessagesItem); + return this; + } + + /** + * A list of messages describing the testing steps. + * @return okMessages + **/ + @ApiModelProperty(value = "A list of messages describing the testing steps.") + @JsonProperty(JSON_PROPERTY_OK_MESSAGES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getOkMessages() { + return okMessages; + } + + + @JsonProperty(JSON_PROPERTY_OK_MESSAGES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setOkMessages(List okMessages) { + this.okMessages = okMessages; + } + + + public TestNotificationConfigurationResponse pspReference(String pspReference) { + this.pspReference = pspReference; + return this; + } + + /** + * The reference of a request. Can be used to uniquely identify the request. + * @return pspReference + **/ + @ApiModelProperty(value = "The reference of a request. Can be used to uniquely identify the request.") + @JsonProperty(JSON_PROPERTY_PSP_REFERENCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getPspReference() { + return pspReference; + } + + + @JsonProperty(JSON_PROPERTY_PSP_REFERENCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPspReference(String pspReference) { + this.pspReference = pspReference; + } + + + public TestNotificationConfigurationResponse resultCode(String resultCode) { + this.resultCode = resultCode; + return this; + } + + /** + * The result code. + * @return resultCode + **/ + @ApiModelProperty(value = "The result code.") + @JsonProperty(JSON_PROPERTY_RESULT_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getResultCode() { + return resultCode; + } + + + @JsonProperty(JSON_PROPERTY_RESULT_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setResultCode(String resultCode) { + this.resultCode = resultCode; + } + + + /** + * Return true if this TestNotificationConfigurationResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TestNotificationConfigurationResponse testNotificationConfigurationResponse = (TestNotificationConfigurationResponse) o; + return Objects.equals(this.errorMessages, testNotificationConfigurationResponse.errorMessages) && + Objects.equals(this.eventTypes, testNotificationConfigurationResponse.eventTypes) && + Objects.equals(this.exchangeMessages, testNotificationConfigurationResponse.exchangeMessages) && + Objects.equals(this.invalidFields, testNotificationConfigurationResponse.invalidFields) && + Objects.equals(this.notificationId, testNotificationConfigurationResponse.notificationId) && + Objects.equals(this.okMessages, testNotificationConfigurationResponse.okMessages) && + Objects.equals(this.pspReference, testNotificationConfigurationResponse.pspReference) && + Objects.equals(this.resultCode, testNotificationConfigurationResponse.resultCode); + } + + @Override + public int hashCode() { + return Objects.hash(errorMessages, eventTypes, exchangeMessages, invalidFields, notificationId, okMessages, pspReference, resultCode); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TestNotificationConfigurationResponse {\n"); + sb.append(" errorMessages: ").append(toIndentedString(errorMessages)).append("\n"); + sb.append(" eventTypes: ").append(toIndentedString(eventTypes)).append("\n"); + sb.append(" exchangeMessages: ").append(toIndentedString(exchangeMessages)).append("\n"); + sb.append(" invalidFields: ").append(toIndentedString(invalidFields)).append("\n"); + sb.append(" notificationId: ").append(toIndentedString(notificationId)).append("\n"); + sb.append(" okMessages: ").append(toIndentedString(okMessages)).append("\n"); + sb.append(" pspReference: ").append(toIndentedString(pspReference)).append("\n"); + sb.append(" resultCode: ").append(toIndentedString(resultCode)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line 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 TestNotificationConfigurationResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of TestNotificationConfigurationResponse + * @throws JsonProcessingException if the JSON string is invalid with respect to TestNotificationConfigurationResponse + */ + public static TestNotificationConfigurationResponse fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, TestNotificationConfigurationResponse.class); + } +/** + * Convert an instance of TestNotificationConfigurationResponse 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/marketpayconfiguration/UpdateNotificationConfigurationRequest.java b/src/main/java/com/adyen/model/marketpayconfiguration/UpdateNotificationConfigurationRequest.java new file mode 100644 index 000000000..d4a15a555 --- /dev/null +++ b/src/main/java/com/adyen/model/marketpayconfiguration/UpdateNotificationConfigurationRequest.java @@ -0,0 +1,130 @@ +/* + * Notification Configuration API + * This API is used for the classic integration. If you are just starting your implementation, refer to our [new integration guide](https://docs.adyen.com/marketplaces-and-platforms) instead. The Notification Configuration API provides endpoints for setting up and testing notifications that inform you of events on your platform, for example when a verification check or a payout has been completed. For more information, refer to our [documentation](https://docs.adyen.com/marketplaces-and-platforms/classic/notifications). ## Authentication Your Adyen contact will provide your API credential and an API key. To connect to the API, add an `X-API-Key` header with the API key as the value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: YOUR_API_KEY\" \\ ... ``` Alternatively, you can use the username and password to connect to the API using basic authentication. For example: ``` curl -U \"ws@MarketPlace.YOUR_PLATFORM_ACCOUNT\":\"YOUR_WS_PASSWORD\" \\ -H \"Content-Type: application/json\" \\ ... ``` When going live, you need to generate new web service user credentials to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning The Notification Configuration API supports [versioning](https://docs.adyen.com/development-resources/versioning) using a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://cal-test.adyen.com/cal/services/Notification/v6/createNotificationConfiguration ``` + * + * The version of the OpenAPI document: 6 + * + * + * 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.marketpayconfiguration; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.adyen.model.marketpayconfiguration.NotificationConfigurationDetails; +import com.fasterxml.jackson.annotation.JsonInclude; +import 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; + + +/** + * UpdateNotificationConfigurationRequest + */ +@JsonPropertyOrder({ + UpdateNotificationConfigurationRequest.JSON_PROPERTY_CONFIGURATION_DETAILS +}) + +public class UpdateNotificationConfigurationRequest { + public static final String JSON_PROPERTY_CONFIGURATION_DETAILS = "configurationDetails"; + private NotificationConfigurationDetails configurationDetails; + + public UpdateNotificationConfigurationRequest() { + } + + public UpdateNotificationConfigurationRequest configurationDetails(NotificationConfigurationDetails configurationDetails) { + this.configurationDetails = configurationDetails; + return this; + } + + /** + * Get configurationDetails + * @return configurationDetails + **/ + @ApiModelProperty(required = true, value = "") + @JsonProperty(JSON_PROPERTY_CONFIGURATION_DETAILS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public NotificationConfigurationDetails getConfigurationDetails() { + return configurationDetails; + } + + + @JsonProperty(JSON_PROPERTY_CONFIGURATION_DETAILS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setConfigurationDetails(NotificationConfigurationDetails configurationDetails) { + this.configurationDetails = configurationDetails; + } + + + /** + * Return true if this UpdateNotificationConfigurationRequest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UpdateNotificationConfigurationRequest updateNotificationConfigurationRequest = (UpdateNotificationConfigurationRequest) o; + return Objects.equals(this.configurationDetails, updateNotificationConfigurationRequest.configurationDetails); + } + + @Override + public int hashCode() { + return Objects.hash(configurationDetails); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UpdateNotificationConfigurationRequest {\n"); + sb.append(" configurationDetails: ").append(toIndentedString(configurationDetails)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line 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 UpdateNotificationConfigurationRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of UpdateNotificationConfigurationRequest + * @throws JsonProcessingException if the JSON string is invalid with respect to UpdateNotificationConfigurationRequest + */ + public static UpdateNotificationConfigurationRequest fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, UpdateNotificationConfigurationRequest.class); + } +/** + * Convert an instance of UpdateNotificationConfigurationRequest 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/marketpayfund/AbstractOpenApiSchema.java b/src/main/java/com/adyen/model/marketpayfund/AbstractOpenApiSchema.java new file mode 100644 index 000000000..fb032f049 --- /dev/null +++ b/src/main/java/com/adyen/model/marketpayfund/AbstractOpenApiSchema.java @@ -0,0 +1,148 @@ +/* + * Fund API + * This API is used for the classic integration. If you are just starting your implementation, refer to our [new integration guide](https://docs.adyen.com/marketplaces-and-platforms) instead. The Fund API provides endpoints for managing the funds in the accounts on your platform. These management operations include, for example, the transfer of funds from one account to another, the payout of funds to an account holder, and the retrieval of balances in an account. For more information, refer to our [documentation](https://docs.adyen.com/marketplaces-and-platforms/classic/). ## Authentication Your Adyen contact will provide your API credential and an API key. To connect to the API, add an `X-API-Key` header with the API key as the value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: YOUR_API_KEY\" \\ ... ``` Alternatively, you can use the username and password to connect to the API using basic authentication. For example: ``` curl -U \"ws@MarketPlace.YOUR_PLATFORM_ACCOUNT\":\"YOUR_WS_PASSWORD\" \\ -H \"Content-Type: application/json\" \\ ... ``` When going live, you need to generate new web service user credentials to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning The Fund API supports [versioning](https://docs.adyen.com/development-resources/versioning) using a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://cal-test.adyen.com/cal/services/Fund/v6/accountHolderBalance ``` + * + * The version of the OpenAPI document: 6 + * + * + * 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.marketpayfund; + +import java.util.Objects; +import java.lang.reflect.Type; +import java.util.Map; +import jakarta.ws.rs.core.GenericType; + +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Abstract class for oneOf,anyOf schemas defined in OpenAPI spec + */ + +public abstract class AbstractOpenApiSchema { + + // store the actual instance of the schema/object + private Object instance; + + // is nullable + private Boolean isNullable; + + // schema type (e.g. oneOf, anyOf) + private final String schemaType; + + public AbstractOpenApiSchema(String schemaType, Boolean isNullable) { + this.schemaType = schemaType; + this.isNullable = isNullable; + } + + /** + * Get the list of oneOf/anyOf composed schemas allowed to be stored in this object + * + * @return an instance of the actual schema/object + */ + public abstract Map getSchemas(); + + /** + * Get the actual instance + * + * @return an instance of the actual schema/object + */ + @JsonValue + public Object getActualInstance() {return instance;} + + /** + * Set the actual instance + * + * @param instance the actual instance of the schema/object + */ + public void setActualInstance(Object instance) {this.instance = instance;} + + /** + * Get the instant recursively when the schemas defined in oneOf/anyof happen to be oneOf/anyOf schema as well + * + * @return an instance of the actual schema/object + */ + public Object getActualInstanceRecursively() { + return getActualInstanceRecursively(this); + } + + private Object getActualInstanceRecursively(AbstractOpenApiSchema object) { + if (object.getActualInstance() == null) { + return null; + } else if (object.getActualInstance() instanceof AbstractOpenApiSchema) { + return getActualInstanceRecursively((AbstractOpenApiSchema)object.getActualInstance()); + } else { + return object.getActualInstance(); + } + } + + /** + * Get the schema type (e.g. anyOf, oneOf) + * + * @return the schema type + */ + public String getSchemaType() { + return schemaType; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ").append(getClass()).append(" {\n"); + sb.append(" instance: ").append(toIndentedString(instance)).append("\n"); + sb.append(" isNullable: ").append(toIndentedString(isNullable)).append("\n"); + sb.append(" schemaType: ").append(toIndentedString(schemaType)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AbstractOpenApiSchema a = (AbstractOpenApiSchema) o; + return Objects.equals(this.instance, a.instance) && + Objects.equals(this.isNullable, a.isNullable) && + Objects.equals(this.schemaType, a.schemaType); + } + + @Override + public int hashCode() { + return Objects.hash(instance, isNullable, schemaType); + } + + /** + * Is nullable + * + * @return true if it's nullable + */ + public Boolean isNullable() { + if (Boolean.TRUE.equals(isNullable)) { + return Boolean.TRUE; + } else { + return Boolean.FALSE; + } + } + + + +} diff --git a/src/main/java/com/adyen/model/marketpayfund/AccountDetailBalance.java b/src/main/java/com/adyen/model/marketpayfund/AccountDetailBalance.java new file mode 100644 index 000000000..fda87b5f0 --- /dev/null +++ b/src/main/java/com/adyen/model/marketpayfund/AccountDetailBalance.java @@ -0,0 +1,161 @@ +/* + * Fund API + * This API is used for the classic integration. If you are just starting your implementation, refer to our [new integration guide](https://docs.adyen.com/marketplaces-and-platforms) instead. The Fund API provides endpoints for managing the funds in the accounts on your platform. These management operations include, for example, the transfer of funds from one account to another, the payout of funds to an account holder, and the retrieval of balances in an account. For more information, refer to our [documentation](https://docs.adyen.com/marketplaces-and-platforms/classic/). ## Authentication Your Adyen contact will provide your API credential and an API key. To connect to the API, add an `X-API-Key` header with the API key as the value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: YOUR_API_KEY\" \\ ... ``` Alternatively, you can use the username and password to connect to the API using basic authentication. For example: ``` curl -U \"ws@MarketPlace.YOUR_PLATFORM_ACCOUNT\":\"YOUR_WS_PASSWORD\" \\ -H \"Content-Type: application/json\" \\ ... ``` When going live, you need to generate new web service user credentials to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning The Fund API supports [versioning](https://docs.adyen.com/development-resources/versioning) using a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://cal-test.adyen.com/cal/services/Fund/v6/accountHolderBalance ``` + * + * The version of the OpenAPI document: 6 + * + * + * 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.marketpayfund; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.adyen.model.marketpayfund.DetailBalance; +import com.fasterxml.jackson.annotation.JsonInclude; +import 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; + + +/** + * AccountDetailBalance + */ +@JsonPropertyOrder({ + AccountDetailBalance.JSON_PROPERTY_ACCOUNT_CODE, + AccountDetailBalance.JSON_PROPERTY_DETAIL_BALANCE +}) + +public class AccountDetailBalance { + public static final String JSON_PROPERTY_ACCOUNT_CODE = "accountCode"; + private String accountCode; + + public static final String JSON_PROPERTY_DETAIL_BALANCE = "detailBalance"; + private DetailBalance detailBalance; + + public AccountDetailBalance() { + } + + public AccountDetailBalance accountCode(String accountCode) { + this.accountCode = accountCode; + return this; + } + + /** + * The code of the account that holds the balance. + * @return accountCode + **/ + @ApiModelProperty(value = "The code of the account that holds the balance.") + @JsonProperty(JSON_PROPERTY_ACCOUNT_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getAccountCode() { + return accountCode; + } + + + @JsonProperty(JSON_PROPERTY_ACCOUNT_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAccountCode(String accountCode) { + this.accountCode = accountCode; + } + + + public AccountDetailBalance detailBalance(DetailBalance detailBalance) { + this.detailBalance = detailBalance; + return this; + } + + /** + * Get detailBalance + * @return detailBalance + **/ + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_DETAIL_BALANCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public DetailBalance getDetailBalance() { + return detailBalance; + } + + + @JsonProperty(JSON_PROPERTY_DETAIL_BALANCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDetailBalance(DetailBalance detailBalance) { + this.detailBalance = detailBalance; + } + + + /** + * Return true if this AccountDetailBalance object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AccountDetailBalance accountDetailBalance = (AccountDetailBalance) o; + return Objects.equals(this.accountCode, accountDetailBalance.accountCode) && + Objects.equals(this.detailBalance, accountDetailBalance.detailBalance); + } + + @Override + public int hashCode() { + return Objects.hash(accountCode, detailBalance); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AccountDetailBalance {\n"); + sb.append(" accountCode: ").append(toIndentedString(accountCode)).append("\n"); + sb.append(" detailBalance: ").append(toIndentedString(detailBalance)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line 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 AccountDetailBalance given an JSON string + * + * @param jsonString JSON string + * @return An instance of AccountDetailBalance + * @throws JsonProcessingException if the JSON string is invalid with respect to AccountDetailBalance + */ + public static AccountDetailBalance fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, AccountDetailBalance.class); + } +/** + * Convert an instance of AccountDetailBalance 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/marketpayfund/AccountHolderBalanceRequest.java b/src/main/java/com/adyen/model/marketpayfund/AccountHolderBalanceRequest.java new file mode 100644 index 000000000..7557bed6e --- /dev/null +++ b/src/main/java/com/adyen/model/marketpayfund/AccountHolderBalanceRequest.java @@ -0,0 +1,129 @@ +/* + * Fund API + * This API is used for the classic integration. If you are just starting your implementation, refer to our [new integration guide](https://docs.adyen.com/marketplaces-and-platforms) instead. The Fund API provides endpoints for managing the funds in the accounts on your platform. These management operations include, for example, the transfer of funds from one account to another, the payout of funds to an account holder, and the retrieval of balances in an account. For more information, refer to our [documentation](https://docs.adyen.com/marketplaces-and-platforms/classic/). ## Authentication Your Adyen contact will provide your API credential and an API key. To connect to the API, add an `X-API-Key` header with the API key as the value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: YOUR_API_KEY\" \\ ... ``` Alternatively, you can use the username and password to connect to the API using basic authentication. For example: ``` curl -U \"ws@MarketPlace.YOUR_PLATFORM_ACCOUNT\":\"YOUR_WS_PASSWORD\" \\ -H \"Content-Type: application/json\" \\ ... ``` When going live, you need to generate new web service user credentials to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning The Fund API supports [versioning](https://docs.adyen.com/development-resources/versioning) using a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://cal-test.adyen.com/cal/services/Fund/v6/accountHolderBalance ``` + * + * The version of the OpenAPI document: 6 + * + * + * 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.marketpayfund; + +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; + + +/** + * AccountHolderBalanceRequest + */ +@JsonPropertyOrder({ + AccountHolderBalanceRequest.JSON_PROPERTY_ACCOUNT_HOLDER_CODE +}) + +public class AccountHolderBalanceRequest { + public static final String JSON_PROPERTY_ACCOUNT_HOLDER_CODE = "accountHolderCode"; + private String accountHolderCode; + + public AccountHolderBalanceRequest() { + } + + public AccountHolderBalanceRequest accountHolderCode(String accountHolderCode) { + this.accountHolderCode = accountHolderCode; + return this; + } + + /** + * The code of the Account Holder of which to retrieve the balance. + * @return accountHolderCode + **/ + @ApiModelProperty(required = true, value = "The code of the Account Holder of which to retrieve the balance.") + @JsonProperty(JSON_PROPERTY_ACCOUNT_HOLDER_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getAccountHolderCode() { + return accountHolderCode; + } + + + @JsonProperty(JSON_PROPERTY_ACCOUNT_HOLDER_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAccountHolderCode(String accountHolderCode) { + this.accountHolderCode = accountHolderCode; + } + + + /** + * Return true if this AccountHolderBalanceRequest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AccountHolderBalanceRequest accountHolderBalanceRequest = (AccountHolderBalanceRequest) o; + return Objects.equals(this.accountHolderCode, accountHolderBalanceRequest.accountHolderCode); + } + + @Override + public int hashCode() { + return Objects.hash(accountHolderCode); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AccountHolderBalanceRequest {\n"); + sb.append(" accountHolderCode: ").append(toIndentedString(accountHolderCode)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line 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 AccountHolderBalanceRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of AccountHolderBalanceRequest + * @throws JsonProcessingException if the JSON string is invalid with respect to AccountHolderBalanceRequest + */ + public static AccountHolderBalanceRequest fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, AccountHolderBalanceRequest.class); + } +/** + * Convert an instance of AccountHolderBalanceRequest 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/marketpayfund/AccountHolderBalanceResponse.java b/src/main/java/com/adyen/model/marketpayfund/AccountHolderBalanceResponse.java new file mode 100644 index 000000000..935cb28df --- /dev/null +++ b/src/main/java/com/adyen/model/marketpayfund/AccountHolderBalanceResponse.java @@ -0,0 +1,274 @@ +/* + * Fund API + * This API is used for the classic integration. If you are just starting your implementation, refer to our [new integration guide](https://docs.adyen.com/marketplaces-and-platforms) instead. The Fund API provides endpoints for managing the funds in the accounts on your platform. These management operations include, for example, the transfer of funds from one account to another, the payout of funds to an account holder, and the retrieval of balances in an account. For more information, refer to our [documentation](https://docs.adyen.com/marketplaces-and-platforms/classic/). ## Authentication Your Adyen contact will provide your API credential and an API key. To connect to the API, add an `X-API-Key` header with the API key as the value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: YOUR_API_KEY\" \\ ... ``` Alternatively, you can use the username and password to connect to the API using basic authentication. For example: ``` curl -U \"ws@MarketPlace.YOUR_PLATFORM_ACCOUNT\":\"YOUR_WS_PASSWORD\" \\ -H \"Content-Type: application/json\" \\ ... ``` When going live, you need to generate new web service user credentials to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning The Fund API supports [versioning](https://docs.adyen.com/development-resources/versioning) using a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://cal-test.adyen.com/cal/services/Fund/v6/accountHolderBalance ``` + * + * The version of the OpenAPI document: 6 + * + * + * 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.marketpayfund; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.adyen.model.marketpayfund.AccountDetailBalance; +import com.adyen.model.marketpayfund.DetailBalance; +import com.adyen.model.marketpayfund.ErrorFieldType; +import com.fasterxml.jackson.annotation.JsonInclude; +import 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; + + +/** + * AccountHolderBalanceResponse + */ +@JsonPropertyOrder({ + AccountHolderBalanceResponse.JSON_PROPERTY_BALANCE_PER_ACCOUNT, + AccountHolderBalanceResponse.JSON_PROPERTY_INVALID_FIELDS, + AccountHolderBalanceResponse.JSON_PROPERTY_PSP_REFERENCE, + AccountHolderBalanceResponse.JSON_PROPERTY_RESULT_CODE, + AccountHolderBalanceResponse.JSON_PROPERTY_TOTAL_BALANCE +}) + +public class AccountHolderBalanceResponse { + public static final String JSON_PROPERTY_BALANCE_PER_ACCOUNT = "balancePerAccount"; + private List balancePerAccount = null; + + public static final String JSON_PROPERTY_INVALID_FIELDS = "invalidFields"; + private List invalidFields = null; + + public static final String JSON_PROPERTY_PSP_REFERENCE = "pspReference"; + private String pspReference; + + public static final String JSON_PROPERTY_RESULT_CODE = "resultCode"; + private String resultCode; + + public static final String JSON_PROPERTY_TOTAL_BALANCE = "totalBalance"; + private DetailBalance totalBalance; + + public AccountHolderBalanceResponse() { + } + + public AccountHolderBalanceResponse balancePerAccount(List balancePerAccount) { + this.balancePerAccount = balancePerAccount; + return this; + } + + public AccountHolderBalanceResponse addBalancePerAccountItem(AccountDetailBalance balancePerAccountItem) { + if (this.balancePerAccount == null) { + this.balancePerAccount = new ArrayList<>(); + } + this.balancePerAccount.add(balancePerAccountItem); + return this; + } + + /** + * A list of each account and their balances. + * @return balancePerAccount + **/ + @ApiModelProperty(value = "A list of each account and their balances.") + @JsonProperty(JSON_PROPERTY_BALANCE_PER_ACCOUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getBalancePerAccount() { + return balancePerAccount; + } + + + @JsonProperty(JSON_PROPERTY_BALANCE_PER_ACCOUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setBalancePerAccount(List balancePerAccount) { + this.balancePerAccount = balancePerAccount; + } + + + public AccountHolderBalanceResponse invalidFields(List invalidFields) { + this.invalidFields = invalidFields; + return this; + } + + public AccountHolderBalanceResponse addInvalidFieldsItem(ErrorFieldType invalidFieldsItem) { + if (this.invalidFields == null) { + this.invalidFields = new ArrayList<>(); + } + this.invalidFields.add(invalidFieldsItem); + return this; + } + + /** + * Contains field validation errors that would prevent requests from being processed. + * @return invalidFields + **/ + @ApiModelProperty(value = "Contains field validation errors that would prevent requests from being processed.") + @JsonProperty(JSON_PROPERTY_INVALID_FIELDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getInvalidFields() { + return invalidFields; + } + + + @JsonProperty(JSON_PROPERTY_INVALID_FIELDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setInvalidFields(List invalidFields) { + this.invalidFields = invalidFields; + } + + + public AccountHolderBalanceResponse pspReference(String pspReference) { + this.pspReference = pspReference; + return this; + } + + /** + * The reference of a request. Can be used to uniquely identify the request. + * @return pspReference + **/ + @ApiModelProperty(value = "The reference of a request. Can be used to uniquely identify the request.") + @JsonProperty(JSON_PROPERTY_PSP_REFERENCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getPspReference() { + return pspReference; + } + + + @JsonProperty(JSON_PROPERTY_PSP_REFERENCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPspReference(String pspReference) { + this.pspReference = pspReference; + } + + + public AccountHolderBalanceResponse resultCode(String resultCode) { + this.resultCode = resultCode; + return this; + } + + /** + * The result code. + * @return resultCode + **/ + @ApiModelProperty(value = "The result code.") + @JsonProperty(JSON_PROPERTY_RESULT_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getResultCode() { + return resultCode; + } + + + @JsonProperty(JSON_PROPERTY_RESULT_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setResultCode(String resultCode) { + this.resultCode = resultCode; + } + + + public AccountHolderBalanceResponse totalBalance(DetailBalance totalBalance) { + this.totalBalance = totalBalance; + return this; + } + + /** + * Get totalBalance + * @return totalBalance + **/ + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_TOTAL_BALANCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public DetailBalance getTotalBalance() { + return totalBalance; + } + + + @JsonProperty(JSON_PROPERTY_TOTAL_BALANCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTotalBalance(DetailBalance totalBalance) { + this.totalBalance = totalBalance; + } + + + /** + * Return true if this AccountHolderBalanceResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AccountHolderBalanceResponse accountHolderBalanceResponse = (AccountHolderBalanceResponse) o; + return Objects.equals(this.balancePerAccount, accountHolderBalanceResponse.balancePerAccount) && + Objects.equals(this.invalidFields, accountHolderBalanceResponse.invalidFields) && + Objects.equals(this.pspReference, accountHolderBalanceResponse.pspReference) && + Objects.equals(this.resultCode, accountHolderBalanceResponse.resultCode) && + Objects.equals(this.totalBalance, accountHolderBalanceResponse.totalBalance); + } + + @Override + public int hashCode() { + return Objects.hash(balancePerAccount, invalidFields, pspReference, resultCode, totalBalance); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AccountHolderBalanceResponse {\n"); + sb.append(" balancePerAccount: ").append(toIndentedString(balancePerAccount)).append("\n"); + sb.append(" invalidFields: ").append(toIndentedString(invalidFields)).append("\n"); + sb.append(" pspReference: ").append(toIndentedString(pspReference)).append("\n"); + sb.append(" resultCode: ").append(toIndentedString(resultCode)).append("\n"); + sb.append(" totalBalance: ").append(toIndentedString(totalBalance)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line 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 AccountHolderBalanceResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of AccountHolderBalanceResponse + * @throws JsonProcessingException if the JSON string is invalid with respect to AccountHolderBalanceResponse + */ + public static AccountHolderBalanceResponse fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, AccountHolderBalanceResponse.class); + } +/** + * Convert an instance of AccountHolderBalanceResponse 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/marketpayfund/AccountHolderTransactionListRequest.java b/src/main/java/com/adyen/model/marketpayfund/AccountHolderTransactionListRequest.java new file mode 100644 index 000000000..3fd45d5a2 --- /dev/null +++ b/src/main/java/com/adyen/model/marketpayfund/AccountHolderTransactionListRequest.java @@ -0,0 +1,331 @@ +/* + * Fund API + * This API is used for the classic integration. If you are just starting your implementation, refer to our [new integration guide](https://docs.adyen.com/marketplaces-and-platforms) instead. The Fund API provides endpoints for managing the funds in the accounts on your platform. These management operations include, for example, the transfer of funds from one account to another, the payout of funds to an account holder, and the retrieval of balances in an account. For more information, refer to our [documentation](https://docs.adyen.com/marketplaces-and-platforms/classic/). ## Authentication Your Adyen contact will provide your API credential and an API key. To connect to the API, add an `X-API-Key` header with the API key as the value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: YOUR_API_KEY\" \\ ... ``` Alternatively, you can use the username and password to connect to the API using basic authentication. For example: ``` curl -U \"ws@MarketPlace.YOUR_PLATFORM_ACCOUNT\":\"YOUR_WS_PASSWORD\" \\ -H \"Content-Type: application/json\" \\ ... ``` When going live, you need to generate new web service user credentials to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning The Fund API supports [versioning](https://docs.adyen.com/development-resources/versioning) using a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://cal-test.adyen.com/cal/services/Fund/v6/accountHolderBalance ``` + * + * The version of the OpenAPI document: 6 + * + * + * 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.marketpayfund; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.adyen.model.marketpayfund.TransactionListForAccount; +import com.fasterxml.jackson.annotation.JsonInclude; +import 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; + + +/** + * AccountHolderTransactionListRequest + */ +@JsonPropertyOrder({ + AccountHolderTransactionListRequest.JSON_PROPERTY_ACCOUNT_HOLDER_CODE, + AccountHolderTransactionListRequest.JSON_PROPERTY_TRANSACTION_LISTS_PER_ACCOUNT, + AccountHolderTransactionListRequest.JSON_PROPERTY_TRANSACTION_STATUSES +}) + +public class AccountHolderTransactionListRequest { + public static final String JSON_PROPERTY_ACCOUNT_HOLDER_CODE = "accountHolderCode"; + private String accountHolderCode; + + public static final String JSON_PROPERTY_TRANSACTION_LISTS_PER_ACCOUNT = "transactionListsPerAccount"; + private List transactionListsPerAccount = null; + + /** + * Gets or Sets transactionStatuses + */ + public enum TransactionStatusesEnum { + BALANCENOTPAIDOUTTRANSFER("BalanceNotPaidOutTransfer"), + + BALANCEPLATFORMSWEEP("BalancePlatformSweep"), + + BALANCEPLATFORMSWEEPRETURNED("BalancePlatformSweepReturned"), + + CHARGEBACK("Chargeback"), + + CHARGEBACKCORRECTION("ChargebackCorrection"), + + CHARGEBACKCORRECTIONRECEIVED("ChargebackCorrectionReceived"), + + CHARGEBACKRECEIVED("ChargebackReceived"), + + CHARGEBACKREVERSED("ChargebackReversed"), + + CHARGEBACKREVERSEDCORRECTION("ChargebackReversedCorrection"), + + CHARGEBACKREVERSEDCORRECTIONRECEIVED("ChargebackReversedCorrectionReceived"), + + CHARGEBACKREVERSEDRECEIVED("ChargebackReversedReceived"), + + CONVERTED("Converted"), + + CREDITCLOSED("CreditClosed"), + + CREDITFAILED("CreditFailed"), + + CREDITREVERSED("CreditReversed"), + + CREDITREVERSEDRECEIVED("CreditReversedReceived"), + + CREDITSUSPENDED("CreditSuspended"), + + CREDITED("Credited"), + + DEBITFAILED("DebitFailed"), + + DEBITREVERSEDRECEIVED("DebitReversedReceived"), + + DEBITED("Debited"), + + DEBITEDREVERSED("DebitedReversed"), + + DEPOSITCORRECTIONCREDITED("DepositCorrectionCredited"), + + DEPOSITCORRECTIONDEBITED("DepositCorrectionDebited"), + + FEE("Fee"), + + FUNDTRANSFER("FundTransfer"), + + FUNDTRANSFERREVERSED("FundTransferReversed"), + + INVOICEDEDUCTIONCREDITED("InvoiceDeductionCredited"), + + INVOICEDEDUCTIONDEBITED("InvoiceDeductionDebited"), + + MANUALCORRECTED("ManualCorrected"), + + MANUALCORRECTIONCREDITED("ManualCorrectionCredited"), + + MANUALCORRECTIONDEBITED("ManualCorrectionDebited"), + + MERCHANTPAYIN("MerchantPayin"), + + MERCHANTPAYINREVERSED("MerchantPayinReversed"), + + PAYOUT("Payout"), + + PAYOUTREVERSED("PayoutReversed"), + + PENDINGCREDIT("PendingCredit"), + + PENDINGDEBIT("PendingDebit"), + + PENDINGFUNDTRANSFER("PendingFundTransfer"), + + RECREDITED("ReCredited"), + + RECREDITEDRECEIVED("ReCreditedReceived"), + + SECONDCHARGEBACK("SecondChargeback"), + + SECONDCHARGEBACKCORRECTION("SecondChargebackCorrection"), + + SECONDCHARGEBACKCORRECTIONRECEIVED("SecondChargebackCorrectionReceived"), + + SECONDCHARGEBACKRECEIVED("SecondChargebackReceived"); + + private String value; + + TransactionStatusesEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TransactionStatusesEnum fromValue(String value) { + for (TransactionStatusesEnum b : TransactionStatusesEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_TRANSACTION_STATUSES = "transactionStatuses"; + private List transactionStatuses = null; + + public AccountHolderTransactionListRequest() { + } + + public AccountHolderTransactionListRequest accountHolderCode(String accountHolderCode) { + this.accountHolderCode = accountHolderCode; + return this; + } + + /** + * The code of the account holder that owns the account(s) of which retrieve the transaction list. + * @return accountHolderCode + **/ + @ApiModelProperty(required = true, value = "The code of the account holder that owns the account(s) of which retrieve the transaction list.") + @JsonProperty(JSON_PROPERTY_ACCOUNT_HOLDER_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getAccountHolderCode() { + return accountHolderCode; + } + + + @JsonProperty(JSON_PROPERTY_ACCOUNT_HOLDER_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAccountHolderCode(String accountHolderCode) { + this.accountHolderCode = accountHolderCode; + } + + + public AccountHolderTransactionListRequest transactionListsPerAccount(List transactionListsPerAccount) { + this.transactionListsPerAccount = transactionListsPerAccount; + return this; + } + + public AccountHolderTransactionListRequest addTransactionListsPerAccountItem(TransactionListForAccount transactionListsPerAccountItem) { + if (this.transactionListsPerAccount == null) { + this.transactionListsPerAccount = new ArrayList<>(); + } + this.transactionListsPerAccount.add(transactionListsPerAccountItem); + return this; + } + + /** + * A list of accounts to include in the transaction list. If left blank, the last fifty (50) transactions for all accounts of the account holder will be included. + * @return transactionListsPerAccount + **/ + @ApiModelProperty(value = "A list of accounts to include in the transaction list. If left blank, the last fifty (50) transactions for all accounts of the account holder will be included.") + @JsonProperty(JSON_PROPERTY_TRANSACTION_LISTS_PER_ACCOUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getTransactionListsPerAccount() { + return transactionListsPerAccount; + } + + + @JsonProperty(JSON_PROPERTY_TRANSACTION_LISTS_PER_ACCOUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTransactionListsPerAccount(List transactionListsPerAccount) { + this.transactionListsPerAccount = transactionListsPerAccount; + } + + + public AccountHolderTransactionListRequest transactionStatuses(List transactionStatuses) { + this.transactionStatuses = transactionStatuses; + return this; + } + + public AccountHolderTransactionListRequest addTransactionStatusesItem(TransactionStatusesEnum transactionStatusesItem) { + if (this.transactionStatuses == null) { + this.transactionStatuses = new ArrayList<>(); + } + this.transactionStatuses.add(transactionStatusesItem); + return this; + } + + /** + * A list of statuses to include in the transaction list. If left blank, all transactions will be included. >Permitted values: >* `PendingCredit` - a pending balance credit. >* `CreditFailed` - a pending credit failure; the balance will not be credited. >* `Credited` - a credited balance. >* `PendingDebit` - a pending balance debit (e.g., a refund). >* `CreditClosed` - a pending credit closed; the balance will not be credited. >* `CreditSuspended` - a pending credit closed; the balance will not be credited. >* `DebitFailed` - a pending debit failure; the balance will not be debited. >* `Debited` - a debited balance (e.g., a refund). >* `DebitReversedReceived` - a pending refund reversal. >* `DebitedReversed` - a reversed refund. >* `ChargebackReceived` - a received chargeback request. >* `Chargeback` - a processed chargeback. >* `ChargebackReversedReceived` - a pending chargeback reversal. >* `ChargebackReversed` - a reversed chargeback. >* `Converted` - converted. >* `ManualCorrected` - manual booking/adjustment by Adyen. >* `Payout` - a payout. >* `PayoutReversed` - a reversed payout. >* `PendingFundTransfer` - a pending transfer of funds from one account to another. >* `FundTransfer` - a transfer of funds from one account to another. + * @return transactionStatuses + **/ + @ApiModelProperty(value = "A list of statuses to include in the transaction list. If left blank, all transactions will be included. >Permitted values: >* `PendingCredit` - a pending balance credit. >* `CreditFailed` - a pending credit failure; the balance will not be credited. >* `Credited` - a credited balance. >* `PendingDebit` - a pending balance debit (e.g., a refund). >* `CreditClosed` - a pending credit closed; the balance will not be credited. >* `CreditSuspended` - a pending credit closed; the balance will not be credited. >* `DebitFailed` - a pending debit failure; the balance will not be debited. >* `Debited` - a debited balance (e.g., a refund). >* `DebitReversedReceived` - a pending refund reversal. >* `DebitedReversed` - a reversed refund. >* `ChargebackReceived` - a received chargeback request. >* `Chargeback` - a processed chargeback. >* `ChargebackReversedReceived` - a pending chargeback reversal. >* `ChargebackReversed` - a reversed chargeback. >* `Converted` - converted. >* `ManualCorrected` - manual booking/adjustment by Adyen. >* `Payout` - a payout. >* `PayoutReversed` - a reversed payout. >* `PendingFundTransfer` - a pending transfer of funds from one account to another. >* `FundTransfer` - a transfer of funds from one account to another.") + @JsonProperty(JSON_PROPERTY_TRANSACTION_STATUSES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getTransactionStatuses() { + return transactionStatuses; + } + + + @JsonProperty(JSON_PROPERTY_TRANSACTION_STATUSES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTransactionStatuses(List transactionStatuses) { + this.transactionStatuses = transactionStatuses; + } + + + /** + * Return true if this AccountHolderTransactionListRequest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AccountHolderTransactionListRequest accountHolderTransactionListRequest = (AccountHolderTransactionListRequest) o; + return Objects.equals(this.accountHolderCode, accountHolderTransactionListRequest.accountHolderCode) && + Objects.equals(this.transactionListsPerAccount, accountHolderTransactionListRequest.transactionListsPerAccount) && + Objects.equals(this.transactionStatuses, accountHolderTransactionListRequest.transactionStatuses); + } + + @Override + public int hashCode() { + return Objects.hash(accountHolderCode, transactionListsPerAccount, transactionStatuses); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AccountHolderTransactionListRequest {\n"); + sb.append(" accountHolderCode: ").append(toIndentedString(accountHolderCode)).append("\n"); + sb.append(" transactionListsPerAccount: ").append(toIndentedString(transactionListsPerAccount)).append("\n"); + sb.append(" transactionStatuses: ").append(toIndentedString(transactionStatuses)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line 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 AccountHolderTransactionListRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of AccountHolderTransactionListRequest + * @throws JsonProcessingException if the JSON string is invalid with respect to AccountHolderTransactionListRequest + */ + public static AccountHolderTransactionListRequest fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, AccountHolderTransactionListRequest.class); + } +/** + * Convert an instance of AccountHolderTransactionListRequest 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/marketpayfund/AccountHolderTransactionListResponse.java b/src/main/java/com/adyen/model/marketpayfund/AccountHolderTransactionListResponse.java new file mode 100644 index 000000000..ce3d1b229 --- /dev/null +++ b/src/main/java/com/adyen/model/marketpayfund/AccountHolderTransactionListResponse.java @@ -0,0 +1,242 @@ +/* + * Fund API + * This API is used for the classic integration. If you are just starting your implementation, refer to our [new integration guide](https://docs.adyen.com/marketplaces-and-platforms) instead. The Fund API provides endpoints for managing the funds in the accounts on your platform. These management operations include, for example, the transfer of funds from one account to another, the payout of funds to an account holder, and the retrieval of balances in an account. For more information, refer to our [documentation](https://docs.adyen.com/marketplaces-and-platforms/classic/). ## Authentication Your Adyen contact will provide your API credential and an API key. To connect to the API, add an `X-API-Key` header with the API key as the value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: YOUR_API_KEY\" \\ ... ``` Alternatively, you can use the username and password to connect to the API using basic authentication. For example: ``` curl -U \"ws@MarketPlace.YOUR_PLATFORM_ACCOUNT\":\"YOUR_WS_PASSWORD\" \\ -H \"Content-Type: application/json\" \\ ... ``` When going live, you need to generate new web service user credentials to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning The Fund API supports [versioning](https://docs.adyen.com/development-resources/versioning) using a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://cal-test.adyen.com/cal/services/Fund/v6/accountHolderBalance ``` + * + * The version of the OpenAPI document: 6 + * + * + * 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.marketpayfund; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.adyen.model.marketpayfund.AccountTransactionList; +import com.adyen.model.marketpayfund.ErrorFieldType; +import com.fasterxml.jackson.annotation.JsonInclude; +import 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; + + +/** + * AccountHolderTransactionListResponse + */ +@JsonPropertyOrder({ + AccountHolderTransactionListResponse.JSON_PROPERTY_ACCOUNT_TRANSACTION_LISTS, + AccountHolderTransactionListResponse.JSON_PROPERTY_INVALID_FIELDS, + AccountHolderTransactionListResponse.JSON_PROPERTY_PSP_REFERENCE, + AccountHolderTransactionListResponse.JSON_PROPERTY_RESULT_CODE +}) + +public class AccountHolderTransactionListResponse { + public static final String JSON_PROPERTY_ACCOUNT_TRANSACTION_LISTS = "accountTransactionLists"; + private List accountTransactionLists = null; + + public static final String JSON_PROPERTY_INVALID_FIELDS = "invalidFields"; + private List invalidFields = null; + + public static final String JSON_PROPERTY_PSP_REFERENCE = "pspReference"; + private String pspReference; + + public static final String JSON_PROPERTY_RESULT_CODE = "resultCode"; + private String resultCode; + + public AccountHolderTransactionListResponse() { + } + + public AccountHolderTransactionListResponse accountTransactionLists(List accountTransactionLists) { + this.accountTransactionLists = accountTransactionLists; + return this; + } + + public AccountHolderTransactionListResponse addAccountTransactionListsItem(AccountTransactionList accountTransactionListsItem) { + if (this.accountTransactionLists == null) { + this.accountTransactionLists = new ArrayList<>(); + } + this.accountTransactionLists.add(accountTransactionListsItem); + return this; + } + + /** + * A list of the transactions. + * @return accountTransactionLists + **/ + @ApiModelProperty(value = "A list of the transactions.") + @JsonProperty(JSON_PROPERTY_ACCOUNT_TRANSACTION_LISTS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getAccountTransactionLists() { + return accountTransactionLists; + } + + + @JsonProperty(JSON_PROPERTY_ACCOUNT_TRANSACTION_LISTS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAccountTransactionLists(List accountTransactionLists) { + this.accountTransactionLists = accountTransactionLists; + } + + + public AccountHolderTransactionListResponse invalidFields(List invalidFields) { + this.invalidFields = invalidFields; + return this; + } + + public AccountHolderTransactionListResponse addInvalidFieldsItem(ErrorFieldType invalidFieldsItem) { + if (this.invalidFields == null) { + this.invalidFields = new ArrayList<>(); + } + this.invalidFields.add(invalidFieldsItem); + return this; + } + + /** + * Contains field validation errors that would prevent requests from being processed. + * @return invalidFields + **/ + @ApiModelProperty(value = "Contains field validation errors that would prevent requests from being processed.") + @JsonProperty(JSON_PROPERTY_INVALID_FIELDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getInvalidFields() { + return invalidFields; + } + + + @JsonProperty(JSON_PROPERTY_INVALID_FIELDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setInvalidFields(List invalidFields) { + this.invalidFields = invalidFields; + } + + + public AccountHolderTransactionListResponse pspReference(String pspReference) { + this.pspReference = pspReference; + return this; + } + + /** + * The reference of a request. Can be used to uniquely identify the request. + * @return pspReference + **/ + @ApiModelProperty(value = "The reference of a request. Can be used to uniquely identify the request.") + @JsonProperty(JSON_PROPERTY_PSP_REFERENCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getPspReference() { + return pspReference; + } + + + @JsonProperty(JSON_PROPERTY_PSP_REFERENCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPspReference(String pspReference) { + this.pspReference = pspReference; + } + + + public AccountHolderTransactionListResponse resultCode(String resultCode) { + this.resultCode = resultCode; + return this; + } + + /** + * The result code. + * @return resultCode + **/ + @ApiModelProperty(value = "The result code.") + @JsonProperty(JSON_PROPERTY_RESULT_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getResultCode() { + return resultCode; + } + + + @JsonProperty(JSON_PROPERTY_RESULT_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setResultCode(String resultCode) { + this.resultCode = resultCode; + } + + + /** + * Return true if this AccountHolderTransactionListResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AccountHolderTransactionListResponse accountHolderTransactionListResponse = (AccountHolderTransactionListResponse) o; + return Objects.equals(this.accountTransactionLists, accountHolderTransactionListResponse.accountTransactionLists) && + Objects.equals(this.invalidFields, accountHolderTransactionListResponse.invalidFields) && + Objects.equals(this.pspReference, accountHolderTransactionListResponse.pspReference) && + Objects.equals(this.resultCode, accountHolderTransactionListResponse.resultCode); + } + + @Override + public int hashCode() { + return Objects.hash(accountTransactionLists, invalidFields, pspReference, resultCode); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AccountHolderTransactionListResponse {\n"); + sb.append(" accountTransactionLists: ").append(toIndentedString(accountTransactionLists)).append("\n"); + sb.append(" invalidFields: ").append(toIndentedString(invalidFields)).append("\n"); + sb.append(" pspReference: ").append(toIndentedString(pspReference)).append("\n"); + sb.append(" resultCode: ").append(toIndentedString(resultCode)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line 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 AccountHolderTransactionListResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of AccountHolderTransactionListResponse + * @throws JsonProcessingException if the JSON string is invalid with respect to AccountHolderTransactionListResponse + */ + public static AccountHolderTransactionListResponse fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, AccountHolderTransactionListResponse.class); + } +/** + * Convert an instance of AccountHolderTransactionListResponse 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/marketpayfund/AccountTransactionList.java b/src/main/java/com/adyen/model/marketpayfund/AccountTransactionList.java new file mode 100644 index 000000000..ec6b93bb4 --- /dev/null +++ b/src/main/java/com/adyen/model/marketpayfund/AccountTransactionList.java @@ -0,0 +1,202 @@ +/* + * Fund API + * This API is used for the classic integration. If you are just starting your implementation, refer to our [new integration guide](https://docs.adyen.com/marketplaces-and-platforms) instead. The Fund API provides endpoints for managing the funds in the accounts on your platform. These management operations include, for example, the transfer of funds from one account to another, the payout of funds to an account holder, and the retrieval of balances in an account. For more information, refer to our [documentation](https://docs.adyen.com/marketplaces-and-platforms/classic/). ## Authentication Your Adyen contact will provide your API credential and an API key. To connect to the API, add an `X-API-Key` header with the API key as the value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: YOUR_API_KEY\" \\ ... ``` Alternatively, you can use the username and password to connect to the API using basic authentication. For example: ``` curl -U \"ws@MarketPlace.YOUR_PLATFORM_ACCOUNT\":\"YOUR_WS_PASSWORD\" \\ -H \"Content-Type: application/json\" \\ ... ``` When going live, you need to generate new web service user credentials to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning The Fund API supports [versioning](https://docs.adyen.com/development-resources/versioning) using a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://cal-test.adyen.com/cal/services/Fund/v6/accountHolderBalance ``` + * + * The version of the OpenAPI document: 6 + * + * + * 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.marketpayfund; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.adyen.model.marketpayfund.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; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.core.JsonProcessingException; + + +/** + * AccountTransactionList + */ +@JsonPropertyOrder({ + AccountTransactionList.JSON_PROPERTY_ACCOUNT_CODE, + AccountTransactionList.JSON_PROPERTY_HAS_NEXT_PAGE, + AccountTransactionList.JSON_PROPERTY_TRANSACTIONS +}) + +public class AccountTransactionList { + public static final String JSON_PROPERTY_ACCOUNT_CODE = "accountCode"; + private String accountCode; + + public static final String JSON_PROPERTY_HAS_NEXT_PAGE = "hasNextPage"; + private Boolean hasNextPage; + + public static final String JSON_PROPERTY_TRANSACTIONS = "transactions"; + private List transactions = null; + + public AccountTransactionList() { + } + + public AccountTransactionList accountCode(String accountCode) { + this.accountCode = accountCode; + return this; + } + + /** + * The code of the account. + * @return accountCode + **/ + @ApiModelProperty(value = "The code of the account.") + @JsonProperty(JSON_PROPERTY_ACCOUNT_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getAccountCode() { + return accountCode; + } + + + @JsonProperty(JSON_PROPERTY_ACCOUNT_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAccountCode(String accountCode) { + this.accountCode = accountCode; + } + + + public AccountTransactionList hasNextPage(Boolean hasNextPage) { + this.hasNextPage = hasNextPage; + return this; + } + + /** + * Indicates whether there is a next page of transactions available. + * @return hasNextPage + **/ + @ApiModelProperty(value = "Indicates whether there is a next page of transactions available.") + @JsonProperty(JSON_PROPERTY_HAS_NEXT_PAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getHasNextPage() { + return hasNextPage; + } + + + @JsonProperty(JSON_PROPERTY_HAS_NEXT_PAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setHasNextPage(Boolean hasNextPage) { + this.hasNextPage = hasNextPage; + } + + + public AccountTransactionList transactions(List transactions) { + this.transactions = transactions; + return this; + } + + public AccountTransactionList addTransactionsItem(Transaction transactionsItem) { + if (this.transactions == null) { + this.transactions = new ArrayList<>(); + } + this.transactions.add(transactionsItem); + return this; + } + + /** + * The list of transactions. + * @return transactions + **/ + @ApiModelProperty(value = "The list of transactions.") + @JsonProperty(JSON_PROPERTY_TRANSACTIONS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getTransactions() { + return transactions; + } + + + @JsonProperty(JSON_PROPERTY_TRANSACTIONS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTransactions(List transactions) { + this.transactions = transactions; + } + + + /** + * Return true if this AccountTransactionList object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AccountTransactionList accountTransactionList = (AccountTransactionList) o; + return Objects.equals(this.accountCode, accountTransactionList.accountCode) && + Objects.equals(this.hasNextPage, accountTransactionList.hasNextPage) && + Objects.equals(this.transactions, accountTransactionList.transactions); + } + + @Override + public int hashCode() { + return Objects.hash(accountCode, hasNextPage, transactions); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AccountTransactionList {\n"); + sb.append(" accountCode: ").append(toIndentedString(accountCode)).append("\n"); + sb.append(" hasNextPage: ").append(toIndentedString(hasNextPage)).append("\n"); + sb.append(" transactions: ").append(toIndentedString(transactions)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line 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 AccountTransactionList given an JSON string + * + * @param jsonString JSON string + * @return An instance of AccountTransactionList + * @throws JsonProcessingException if the JSON string is invalid with respect to AccountTransactionList + */ + public static AccountTransactionList fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, AccountTransactionList.class); + } +/** + * Convert an instance of AccountTransactionList 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/marketpayfund/Amount.java b/src/main/java/com/adyen/model/marketpayfund/Amount.java new file mode 100644 index 000000000..32280eb4a --- /dev/null +++ b/src/main/java/com/adyen/model/marketpayfund/Amount.java @@ -0,0 +1,160 @@ +/* + * Fund API + * This API is used for the classic integration. If you are just starting your implementation, refer to our [new integration guide](https://docs.adyen.com/marketplaces-and-platforms) instead. The Fund API provides endpoints for managing the funds in the accounts on your platform. These management operations include, for example, the transfer of funds from one account to another, the payout of funds to an account holder, and the retrieval of balances in an account. For more information, refer to our [documentation](https://docs.adyen.com/marketplaces-and-platforms/classic/). ## Authentication Your Adyen contact will provide your API credential and an API key. To connect to the API, add an `X-API-Key` header with the API key as the value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: YOUR_API_KEY\" \\ ... ``` Alternatively, you can use the username and password to connect to the API using basic authentication. For example: ``` curl -U \"ws@MarketPlace.YOUR_PLATFORM_ACCOUNT\":\"YOUR_WS_PASSWORD\" \\ -H \"Content-Type: application/json\" \\ ... ``` When going live, you need to generate new web service user credentials to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning The Fund API supports [versioning](https://docs.adyen.com/development-resources/versioning) using a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://cal-test.adyen.com/cal/services/Fund/v6/accountHolderBalance ``` + * + * The version of the OpenAPI document: 6 + * + * + * 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.marketpayfund; + +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; + + +/** + * Amount + */ +@JsonPropertyOrder({ + Amount.JSON_PROPERTY_CURRENCY, + Amount.JSON_PROPERTY_VALUE +}) + +public class Amount { + public static final String JSON_PROPERTY_CURRENCY = "currency"; + private String currency; + + public static final String JSON_PROPERTY_VALUE = "value"; + private Long value; + + public Amount() { + } + + public Amount currency(String currency) { + this.currency = currency; + return this; + } + + /** + * The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes). + * @return currency + **/ + @ApiModelProperty(required = true, value = "The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes).") + @JsonProperty(JSON_PROPERTY_CURRENCY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getCurrency() { + return currency; + } + + + @JsonProperty(JSON_PROPERTY_CURRENCY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCurrency(String currency) { + this.currency = currency; + } + + + public Amount value(Long value) { + this.value = value; + return this; + } + + /** + * The amount of the transaction, in [minor units](https://docs.adyen.com/development-resources/currency-codes). + * @return value + **/ + @ApiModelProperty(required = true, value = "The amount of the transaction, in [minor units](https://docs.adyen.com/development-resources/currency-codes).") + @JsonProperty(JSON_PROPERTY_VALUE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Long getValue() { + return value; + } + + + @JsonProperty(JSON_PROPERTY_VALUE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setValue(Long value) { + this.value = value; + } + + + /** + * Return true if this Amount object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Amount amount = (Amount) o; + return Objects.equals(this.currency, amount.currency) && + Objects.equals(this.value, amount.value); + } + + @Override + public int hashCode() { + return Objects.hash(currency, value); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Amount {\n"); + sb.append(" currency: ").append(toIndentedString(currency)).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 Amount given an JSON string + * + * @param jsonString JSON string + * @return An instance of Amount + * @throws JsonProcessingException if the JSON string is invalid with respect to Amount + */ + public static Amount fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, Amount.class); + } +/** + * Convert an instance of Amount 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/marketpayfund/BankAccountDetail.java b/src/main/java/com/adyen/model/marketpayfund/BankAccountDetail.java new file mode 100644 index 000000000..03e09da28 --- /dev/null +++ b/src/main/java/com/adyen/model/marketpayfund/BankAccountDetail.java @@ -0,0 +1,907 @@ +/* + * Fund API + * This API is used for the classic integration. If you are just starting your implementation, refer to our [new integration guide](https://docs.adyen.com/marketplaces-and-platforms) instead. The Fund API provides endpoints for managing the funds in the accounts on your platform. These management operations include, for example, the transfer of funds from one account to another, the payout of funds to an account holder, and the retrieval of balances in an account. For more information, refer to our [documentation](https://docs.adyen.com/marketplaces-and-platforms/classic/). ## Authentication Your Adyen contact will provide your API credential and an API key. To connect to the API, add an `X-API-Key` header with the API key as the value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: YOUR_API_KEY\" \\ ... ``` Alternatively, you can use the username and password to connect to the API using basic authentication. For example: ``` curl -U \"ws@MarketPlace.YOUR_PLATFORM_ACCOUNT\":\"YOUR_WS_PASSWORD\" \\ -H \"Content-Type: application/json\" \\ ... ``` When going live, you need to generate new web service user credentials to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning The Fund API supports [versioning](https://docs.adyen.com/development-resources/versioning) using a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://cal-test.adyen.com/cal/services/Fund/v6/accountHolderBalance ``` + * + * The version of the OpenAPI document: 6 + * + * + * 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.marketpayfund; + +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; + + +/** + * BankAccountDetail + */ +@JsonPropertyOrder({ + BankAccountDetail.JSON_PROPERTY_ACCOUNT_NUMBER, + BankAccountDetail.JSON_PROPERTY_ACCOUNT_TYPE, + BankAccountDetail.JSON_PROPERTY_BANK_ACCOUNT_NAME, + BankAccountDetail.JSON_PROPERTY_BANK_ACCOUNT_REFERENCE, + BankAccountDetail.JSON_PROPERTY_BANK_ACCOUNT_U_U_I_D, + BankAccountDetail.JSON_PROPERTY_BANK_BIC_SWIFT, + BankAccountDetail.JSON_PROPERTY_BANK_CITY, + BankAccountDetail.JSON_PROPERTY_BANK_CODE, + BankAccountDetail.JSON_PROPERTY_BANK_NAME, + BankAccountDetail.JSON_PROPERTY_BRANCH_CODE, + BankAccountDetail.JSON_PROPERTY_CHECK_CODE, + BankAccountDetail.JSON_PROPERTY_COUNTRY_CODE, + BankAccountDetail.JSON_PROPERTY_CURRENCY_CODE, + BankAccountDetail.JSON_PROPERTY_IBAN, + BankAccountDetail.JSON_PROPERTY_OWNER_CITY, + BankAccountDetail.JSON_PROPERTY_OWNER_COUNTRY_CODE, + BankAccountDetail.JSON_PROPERTY_OWNER_DATE_OF_BIRTH, + BankAccountDetail.JSON_PROPERTY_OWNER_HOUSE_NUMBER_OR_NAME, + BankAccountDetail.JSON_PROPERTY_OWNER_NAME, + BankAccountDetail.JSON_PROPERTY_OWNER_NATIONALITY, + BankAccountDetail.JSON_PROPERTY_OWNER_POSTAL_CODE, + BankAccountDetail.JSON_PROPERTY_OWNER_STATE, + BankAccountDetail.JSON_PROPERTY_OWNER_STREET, + BankAccountDetail.JSON_PROPERTY_PRIMARY_ACCOUNT, + BankAccountDetail.JSON_PROPERTY_TAX_ID, + BankAccountDetail.JSON_PROPERTY_URL_FOR_VERIFICATION +}) + +public class BankAccountDetail { + public static final String JSON_PROPERTY_ACCOUNT_NUMBER = "accountNumber"; + private String accountNumber; + + public static final String JSON_PROPERTY_ACCOUNT_TYPE = "accountType"; + private String accountType; + + public static final String JSON_PROPERTY_BANK_ACCOUNT_NAME = "bankAccountName"; + private String bankAccountName; + + public static final String JSON_PROPERTY_BANK_ACCOUNT_REFERENCE = "bankAccountReference"; + private String bankAccountReference; + + public static final String JSON_PROPERTY_BANK_ACCOUNT_U_U_I_D = "bankAccountUUID"; + private String bankAccountUUID; + + public static final String JSON_PROPERTY_BANK_BIC_SWIFT = "bankBicSwift"; + private String bankBicSwift; + + public static final String JSON_PROPERTY_BANK_CITY = "bankCity"; + private String bankCity; + + public static final String JSON_PROPERTY_BANK_CODE = "bankCode"; + private String bankCode; + + public static final String JSON_PROPERTY_BANK_NAME = "bankName"; + private String bankName; + + public static final String JSON_PROPERTY_BRANCH_CODE = "branchCode"; + private String branchCode; + + public static final String JSON_PROPERTY_CHECK_CODE = "checkCode"; + private String checkCode; + + public static final String JSON_PROPERTY_COUNTRY_CODE = "countryCode"; + private String countryCode; + + public static final String JSON_PROPERTY_CURRENCY_CODE = "currencyCode"; + private String currencyCode; + + public static final String JSON_PROPERTY_IBAN = "iban"; + private String iban; + + public static final String JSON_PROPERTY_OWNER_CITY = "ownerCity"; + private String ownerCity; + + public static final String JSON_PROPERTY_OWNER_COUNTRY_CODE = "ownerCountryCode"; + private String ownerCountryCode; + + public static final String JSON_PROPERTY_OWNER_DATE_OF_BIRTH = "ownerDateOfBirth"; + private String ownerDateOfBirth; + + public static final String JSON_PROPERTY_OWNER_HOUSE_NUMBER_OR_NAME = "ownerHouseNumberOrName"; + private String ownerHouseNumberOrName; + + public static final String JSON_PROPERTY_OWNER_NAME = "ownerName"; + private String ownerName; + + public static final String JSON_PROPERTY_OWNER_NATIONALITY = "ownerNationality"; + private String ownerNationality; + + public static final String JSON_PROPERTY_OWNER_POSTAL_CODE = "ownerPostalCode"; + private String ownerPostalCode; + + public static final String JSON_PROPERTY_OWNER_STATE = "ownerState"; + private String ownerState; + + public static final String JSON_PROPERTY_OWNER_STREET = "ownerStreet"; + private String ownerStreet; + + public static final String JSON_PROPERTY_PRIMARY_ACCOUNT = "primaryAccount"; + private Boolean primaryAccount; + + public static final String JSON_PROPERTY_TAX_ID = "taxId"; + private String taxId; + + public static final String JSON_PROPERTY_URL_FOR_VERIFICATION = "urlForVerification"; + private String urlForVerification; + + public BankAccountDetail() { + } + + public BankAccountDetail accountNumber(String accountNumber) { + this.accountNumber = accountNumber; + return this; + } + + /** + * The bank account number (without separators). >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements. + * @return accountNumber + **/ + @ApiModelProperty(value = "The bank account number (without separators). >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements.") + @JsonProperty(JSON_PROPERTY_ACCOUNT_NUMBER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getAccountNumber() { + return accountNumber; + } + + + @JsonProperty(JSON_PROPERTY_ACCOUNT_NUMBER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAccountNumber(String accountNumber) { + this.accountNumber = accountNumber; + } + + + public BankAccountDetail accountType(String accountType) { + this.accountType = accountType; + return this; + } + + /** + * The type of bank account. Only applicable to bank accounts held in the USA. The permitted values are: `checking`, `savings`. >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements. + * @return accountType + **/ + @ApiModelProperty(value = "The type of bank account. Only applicable to bank accounts held in the USA. The permitted values are: `checking`, `savings`. >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements.") + @JsonProperty(JSON_PROPERTY_ACCOUNT_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getAccountType() { + return accountType; + } + + + @JsonProperty(JSON_PROPERTY_ACCOUNT_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAccountType(String accountType) { + this.accountType = accountType; + } + + + public BankAccountDetail bankAccountName(String bankAccountName) { + this.bankAccountName = bankAccountName; + return this; + } + + /** + * The name of the bank account. + * @return bankAccountName + **/ + @ApiModelProperty(value = "The name of the bank account.") + @JsonProperty(JSON_PROPERTY_BANK_ACCOUNT_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getBankAccountName() { + return bankAccountName; + } + + + @JsonProperty(JSON_PROPERTY_BANK_ACCOUNT_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setBankAccountName(String bankAccountName) { + this.bankAccountName = bankAccountName; + } + + + public BankAccountDetail bankAccountReference(String bankAccountReference) { + this.bankAccountReference = bankAccountReference; + return this; + } + + /** + * Merchant reference to the bank account. + * @return bankAccountReference + **/ + @ApiModelProperty(value = "Merchant reference to the bank account.") + @JsonProperty(JSON_PROPERTY_BANK_ACCOUNT_REFERENCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getBankAccountReference() { + return bankAccountReference; + } + + + @JsonProperty(JSON_PROPERTY_BANK_ACCOUNT_REFERENCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setBankAccountReference(String bankAccountReference) { + this.bankAccountReference = bankAccountReference; + } + + + public BankAccountDetail bankAccountUUID(String bankAccountUUID) { + this.bankAccountUUID = bankAccountUUID; + return this; + } + + /** + * The unique identifier (UUID) of the Bank Account. >If, during an account holder create or update request, this field is left blank (but other fields provided), a new Bank Account will be created with a procedurally-generated UUID. >If, during an account holder create request, a UUID is provided, the creation of the Bank Account will fail while the creation of the account holder will continue. >If, during an account holder update request, a UUID that is not correlated with an existing Bank Account is provided, the update of the account holder will fail. >If, during an account holder update request, a UUID that is correlated with an existing Bank Account is provided, the existing Bank Account will be updated. + * @return bankAccountUUID + **/ + @ApiModelProperty(value = "The unique identifier (UUID) of the Bank Account. >If, during an account holder create or update request, this field is left blank (but other fields provided), a new Bank Account will be created with a procedurally-generated UUID. >If, during an account holder create request, a UUID is provided, the creation of the Bank Account will fail while the creation of the account holder will continue. >If, during an account holder update request, a UUID that is not correlated with an existing Bank Account is provided, the update of the account holder will fail. >If, during an account holder update request, a UUID that is correlated with an existing Bank Account is provided, the existing Bank Account will be updated. ") + @JsonProperty(JSON_PROPERTY_BANK_ACCOUNT_U_U_I_D) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getBankAccountUUID() { + return bankAccountUUID; + } + + + @JsonProperty(JSON_PROPERTY_BANK_ACCOUNT_U_U_I_D) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setBankAccountUUID(String bankAccountUUID) { + this.bankAccountUUID = bankAccountUUID; + } + + + public BankAccountDetail bankBicSwift(String bankBicSwift) { + this.bankBicSwift = bankBicSwift; + return this; + } + + /** + * The bank identifier code. >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements. + * @return bankBicSwift + **/ + @ApiModelProperty(value = "The bank identifier code. >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements.") + @JsonProperty(JSON_PROPERTY_BANK_BIC_SWIFT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getBankBicSwift() { + return bankBicSwift; + } + + + @JsonProperty(JSON_PROPERTY_BANK_BIC_SWIFT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setBankBicSwift(String bankBicSwift) { + this.bankBicSwift = bankBicSwift; + } + + + public BankAccountDetail bankCity(String bankCity) { + this.bankCity = bankCity; + return this; + } + + /** + * The city in which the bank branch is located. >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements. + * @return bankCity + **/ + @ApiModelProperty(value = "The city in which the bank branch is located. >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements.") + @JsonProperty(JSON_PROPERTY_BANK_CITY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getBankCity() { + return bankCity; + } + + + @JsonProperty(JSON_PROPERTY_BANK_CITY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setBankCity(String bankCity) { + this.bankCity = bankCity; + } + + + public BankAccountDetail bankCode(String bankCode) { + this.bankCode = bankCode; + return this; + } + + /** + * The bank code of the banking institution with which the bank account is registered. >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements. + * @return bankCode + **/ + @ApiModelProperty(value = "The bank code of the banking institution with which the bank account is registered. >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements.") + @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 BankAccountDetail bankName(String bankName) { + this.bankName = bankName; + return this; + } + + /** + * The name of the banking institution with which the bank account is held. >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements. + * @return bankName + **/ + @ApiModelProperty(value = "The name of the banking institution with which the bank account is held. >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements.") + @JsonProperty(JSON_PROPERTY_BANK_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getBankName() { + return bankName; + } + + + @JsonProperty(JSON_PROPERTY_BANK_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setBankName(String bankName) { + this.bankName = bankName; + } + + + public BankAccountDetail branchCode(String branchCode) { + this.branchCode = branchCode; + return this; + } + + /** + * The branch code of the branch under which the bank account is registered. The value to be specified in this parameter depends on the country of the bank account: * United States - Routing number * United Kingdom - Sort code * Germany - Bankleitzahl >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements. + * @return branchCode + **/ + @ApiModelProperty(value = "The branch code of the branch under which the bank account is registered. The value to be specified in this parameter depends on the country of the bank account: * United States - Routing number * United Kingdom - Sort code * Germany - Bankleitzahl >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements.") + @JsonProperty(JSON_PROPERTY_BRANCH_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getBranchCode() { + return branchCode; + } + + + @JsonProperty(JSON_PROPERTY_BRANCH_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setBranchCode(String branchCode) { + this.branchCode = branchCode; + } + + + public BankAccountDetail checkCode(String checkCode) { + this.checkCode = checkCode; + return this; + } + + /** + * The check code of the bank account. >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements. + * @return checkCode + **/ + @ApiModelProperty(value = "The check code of the bank account. >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements.") + @JsonProperty(JSON_PROPERTY_CHECK_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getCheckCode() { + return checkCode; + } + + + @JsonProperty(JSON_PROPERTY_CHECK_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCheckCode(String checkCode) { + this.checkCode = checkCode; + } + + + public BankAccountDetail countryCode(String countryCode) { + this.countryCode = countryCode; + return this; + } + + /** + * The two-letter country code in which the bank account is registered. >The permitted country codes are defined in ISO-3166-1 alpha-2 (e.g. 'NL'). >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements. + * @return countryCode + **/ + @ApiModelProperty(value = "The two-letter country code in which the bank account is registered. >The permitted country codes are defined in ISO-3166-1 alpha-2 (e.g. 'NL'). >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements.") + @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 BankAccountDetail currencyCode(String currencyCode) { + this.currencyCode = currencyCode; + return this; + } + + /** + * The currency in which the bank account deals. >The permitted currency codes are defined in ISO-4217 (e.g. 'EUR'). + * @return currencyCode + **/ + @ApiModelProperty(value = "The currency in which the bank account deals. >The permitted currency codes are defined in ISO-4217 (e.g. 'EUR'). ") + @JsonProperty(JSON_PROPERTY_CURRENCY_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getCurrencyCode() { + return currencyCode; + } + + + @JsonProperty(JSON_PROPERTY_CURRENCY_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCurrencyCode(String currencyCode) { + this.currencyCode = currencyCode; + } + + + public BankAccountDetail iban(String iban) { + this.iban = iban; + return this; + } + + /** + * The international bank account number. >The IBAN standard is defined in ISO-13616. >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements. + * @return iban + **/ + @ApiModelProperty(value = "The international bank account number. >The IBAN standard is defined in ISO-13616. >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements.") + @JsonProperty(JSON_PROPERTY_IBAN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getIban() { + return iban; + } + + + @JsonProperty(JSON_PROPERTY_IBAN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setIban(String iban) { + this.iban = iban; + } + + + public BankAccountDetail ownerCity(String ownerCity) { + this.ownerCity = ownerCity; + return this; + } + + /** + * The city of residence of the bank account owner. >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements. + * @return ownerCity + **/ + @ApiModelProperty(value = "The city of residence of the bank account owner. >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements.") + @JsonProperty(JSON_PROPERTY_OWNER_CITY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getOwnerCity() { + return ownerCity; + } + + + @JsonProperty(JSON_PROPERTY_OWNER_CITY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setOwnerCity(String ownerCity) { + this.ownerCity = ownerCity; + } + + + public BankAccountDetail ownerCountryCode(String ownerCountryCode) { + this.ownerCountryCode = ownerCountryCode; + return this; + } + + /** + * The country code of the country of residence of the bank account owner. >The permitted country codes are defined in ISO-3166-1 alpha-2 (e.g. 'NL'). >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements. + * @return ownerCountryCode + **/ + @ApiModelProperty(value = "The country code of the country of residence of the bank account owner. >The permitted country codes are defined in ISO-3166-1 alpha-2 (e.g. 'NL'). >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements.") + @JsonProperty(JSON_PROPERTY_OWNER_COUNTRY_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getOwnerCountryCode() { + return ownerCountryCode; + } + + + @JsonProperty(JSON_PROPERTY_OWNER_COUNTRY_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setOwnerCountryCode(String ownerCountryCode) { + this.ownerCountryCode = ownerCountryCode; + } + + + public BankAccountDetail ownerDateOfBirth(String ownerDateOfBirth) { + this.ownerDateOfBirth = ownerDateOfBirth; + return this; + } + + /** + * The date of birth of the bank account owner. The date should be in ISO-8601 format yyyy-mm-dd (e.g. 2000-01-31). + * @return ownerDateOfBirth + * @deprecated + **/ + @Deprecated + @ApiModelProperty(value = "The date of birth of the bank account owner. The date should be in ISO-8601 format yyyy-mm-dd (e.g. 2000-01-31).") + @JsonProperty(JSON_PROPERTY_OWNER_DATE_OF_BIRTH) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getOwnerDateOfBirth() { + return ownerDateOfBirth; + } + + + @Deprecated + @JsonProperty(JSON_PROPERTY_OWNER_DATE_OF_BIRTH) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setOwnerDateOfBirth(String ownerDateOfBirth) { + this.ownerDateOfBirth = ownerDateOfBirth; + } + + + public BankAccountDetail ownerHouseNumberOrName(String ownerHouseNumberOrName) { + this.ownerHouseNumberOrName = ownerHouseNumberOrName; + return this; + } + + /** + * The house name or number of the residence of the bank account owner. >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements. + * @return ownerHouseNumberOrName + **/ + @ApiModelProperty(value = "The house name or number of the residence of the bank account owner. >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements.") + @JsonProperty(JSON_PROPERTY_OWNER_HOUSE_NUMBER_OR_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getOwnerHouseNumberOrName() { + return ownerHouseNumberOrName; + } + + + @JsonProperty(JSON_PROPERTY_OWNER_HOUSE_NUMBER_OR_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setOwnerHouseNumberOrName(String ownerHouseNumberOrName) { + this.ownerHouseNumberOrName = ownerHouseNumberOrName; + } + + + public BankAccountDetail ownerName(String ownerName) { + this.ownerName = ownerName; + return this; + } + + /** + * The name of the bank account owner. >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements. + * @return ownerName + **/ + @ApiModelProperty(value = "The name of the bank account owner. >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements.") + @JsonProperty(JSON_PROPERTY_OWNER_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getOwnerName() { + return ownerName; + } + + + @JsonProperty(JSON_PROPERTY_OWNER_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setOwnerName(String ownerName) { + this.ownerName = ownerName; + } + + + public BankAccountDetail ownerNationality(String ownerNationality) { + this.ownerNationality = ownerNationality; + return this; + } + + /** + * The country code of the country of nationality of the bank account owner. >The permitted country codes are defined in ISO-3166-1 alpha-2 (e.g. 'NL'). >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements. + * @return ownerNationality + **/ + @ApiModelProperty(value = "The country code of the country of nationality of the bank account owner. >The permitted country codes are defined in ISO-3166-1 alpha-2 (e.g. 'NL'). >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements.") + @JsonProperty(JSON_PROPERTY_OWNER_NATIONALITY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getOwnerNationality() { + return ownerNationality; + } + + + @JsonProperty(JSON_PROPERTY_OWNER_NATIONALITY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setOwnerNationality(String ownerNationality) { + this.ownerNationality = ownerNationality; + } + + + public BankAccountDetail ownerPostalCode(String ownerPostalCode) { + this.ownerPostalCode = ownerPostalCode; + return this; + } + + /** + * The postal code of the residence of the bank account owner. >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements. + * @return ownerPostalCode + **/ + @ApiModelProperty(value = "The postal code of the residence of the bank account owner. >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements.") + @JsonProperty(JSON_PROPERTY_OWNER_POSTAL_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getOwnerPostalCode() { + return ownerPostalCode; + } + + + @JsonProperty(JSON_PROPERTY_OWNER_POSTAL_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setOwnerPostalCode(String ownerPostalCode) { + this.ownerPostalCode = ownerPostalCode; + } + + + public BankAccountDetail ownerState(String ownerState) { + this.ownerState = ownerState; + return this; + } + + /** + * The state of residence of the bank account owner. >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements. + * @return ownerState + **/ + @ApiModelProperty(value = "The state of residence of the bank account owner. >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements.") + @JsonProperty(JSON_PROPERTY_OWNER_STATE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getOwnerState() { + return ownerState; + } + + + @JsonProperty(JSON_PROPERTY_OWNER_STATE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setOwnerState(String ownerState) { + this.ownerState = ownerState; + } + + + public BankAccountDetail ownerStreet(String ownerStreet) { + this.ownerStreet = ownerStreet; + return this; + } + + /** + * The street name of the residence of the bank account owner. >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements. + * @return ownerStreet + **/ + @ApiModelProperty(value = "The street name of the residence of the bank account owner. >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements.") + @JsonProperty(JSON_PROPERTY_OWNER_STREET) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getOwnerStreet() { + return ownerStreet; + } + + + @JsonProperty(JSON_PROPERTY_OWNER_STREET) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setOwnerStreet(String ownerStreet) { + this.ownerStreet = ownerStreet; + } + + + public BankAccountDetail primaryAccount(Boolean primaryAccount) { + this.primaryAccount = primaryAccount; + return this; + } + + /** + * If set to true, the bank account is a primary account. + * @return primaryAccount + **/ + @ApiModelProperty(value = "If set to true, the bank account is a primary account.") + @JsonProperty(JSON_PROPERTY_PRIMARY_ACCOUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getPrimaryAccount() { + return primaryAccount; + } + + + @JsonProperty(JSON_PROPERTY_PRIMARY_ACCOUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPrimaryAccount(Boolean primaryAccount) { + this.primaryAccount = primaryAccount; + } + + + public BankAccountDetail taxId(String taxId) { + this.taxId = taxId; + return this; + } + + /** + * The tax ID number. >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements. + * @return taxId + **/ + @ApiModelProperty(value = "The tax ID number. >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements.") + @JsonProperty(JSON_PROPERTY_TAX_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getTaxId() { + return taxId; + } + + + @JsonProperty(JSON_PROPERTY_TAX_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTaxId(String taxId) { + this.taxId = taxId; + } + + + public BankAccountDetail urlForVerification(String urlForVerification) { + this.urlForVerification = urlForVerification; + return this; + } + + /** + * The URL to be used for bank account verification. This may be generated on bank account creation. >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements. + * @return urlForVerification + **/ + @ApiModelProperty(value = "The URL to be used for bank account verification. This may be generated on bank account creation. >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements.") + @JsonProperty(JSON_PROPERTY_URL_FOR_VERIFICATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getUrlForVerification() { + return urlForVerification; + } + + + @JsonProperty(JSON_PROPERTY_URL_FOR_VERIFICATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setUrlForVerification(String urlForVerification) { + this.urlForVerification = urlForVerification; + } + + + /** + * Return true if this BankAccountDetail object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + BankAccountDetail bankAccountDetail = (BankAccountDetail) o; + return Objects.equals(this.accountNumber, bankAccountDetail.accountNumber) && + Objects.equals(this.accountType, bankAccountDetail.accountType) && + Objects.equals(this.bankAccountName, bankAccountDetail.bankAccountName) && + Objects.equals(this.bankAccountReference, bankAccountDetail.bankAccountReference) && + Objects.equals(this.bankAccountUUID, bankAccountDetail.bankAccountUUID) && + Objects.equals(this.bankBicSwift, bankAccountDetail.bankBicSwift) && + Objects.equals(this.bankCity, bankAccountDetail.bankCity) && + Objects.equals(this.bankCode, bankAccountDetail.bankCode) && + Objects.equals(this.bankName, bankAccountDetail.bankName) && + Objects.equals(this.branchCode, bankAccountDetail.branchCode) && + Objects.equals(this.checkCode, bankAccountDetail.checkCode) && + Objects.equals(this.countryCode, bankAccountDetail.countryCode) && + Objects.equals(this.currencyCode, bankAccountDetail.currencyCode) && + Objects.equals(this.iban, bankAccountDetail.iban) && + Objects.equals(this.ownerCity, bankAccountDetail.ownerCity) && + Objects.equals(this.ownerCountryCode, bankAccountDetail.ownerCountryCode) && + Objects.equals(this.ownerDateOfBirth, bankAccountDetail.ownerDateOfBirth) && + Objects.equals(this.ownerHouseNumberOrName, bankAccountDetail.ownerHouseNumberOrName) && + Objects.equals(this.ownerName, bankAccountDetail.ownerName) && + Objects.equals(this.ownerNationality, bankAccountDetail.ownerNationality) && + Objects.equals(this.ownerPostalCode, bankAccountDetail.ownerPostalCode) && + Objects.equals(this.ownerState, bankAccountDetail.ownerState) && + Objects.equals(this.ownerStreet, bankAccountDetail.ownerStreet) && + Objects.equals(this.primaryAccount, bankAccountDetail.primaryAccount) && + Objects.equals(this.taxId, bankAccountDetail.taxId) && + Objects.equals(this.urlForVerification, bankAccountDetail.urlForVerification); + } + + @Override + public int hashCode() { + return Objects.hash(accountNumber, accountType, bankAccountName, bankAccountReference, bankAccountUUID, bankBicSwift, bankCity, bankCode, bankName, branchCode, checkCode, countryCode, currencyCode, iban, ownerCity, ownerCountryCode, ownerDateOfBirth, ownerHouseNumberOrName, ownerName, ownerNationality, ownerPostalCode, ownerState, ownerStreet, primaryAccount, taxId, urlForVerification); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class BankAccountDetail {\n"); + sb.append(" accountNumber: ").append(toIndentedString(accountNumber)).append("\n"); + sb.append(" accountType: ").append(toIndentedString(accountType)).append("\n"); + sb.append(" bankAccountName: ").append(toIndentedString(bankAccountName)).append("\n"); + sb.append(" bankAccountReference: ").append(toIndentedString(bankAccountReference)).append("\n"); + sb.append(" bankAccountUUID: ").append(toIndentedString(bankAccountUUID)).append("\n"); + sb.append(" bankBicSwift: ").append(toIndentedString(bankBicSwift)).append("\n"); + sb.append(" bankCity: ").append(toIndentedString(bankCity)).append("\n"); + sb.append(" bankCode: ").append(toIndentedString(bankCode)).append("\n"); + sb.append(" bankName: ").append(toIndentedString(bankName)).append("\n"); + sb.append(" branchCode: ").append(toIndentedString(branchCode)).append("\n"); + sb.append(" checkCode: ").append(toIndentedString(checkCode)).append("\n"); + sb.append(" countryCode: ").append(toIndentedString(countryCode)).append("\n"); + sb.append(" currencyCode: ").append(toIndentedString(currencyCode)).append("\n"); + sb.append(" iban: ").append(toIndentedString(iban)).append("\n"); + sb.append(" ownerCity: ").append(toIndentedString(ownerCity)).append("\n"); + sb.append(" ownerCountryCode: ").append(toIndentedString(ownerCountryCode)).append("\n"); + sb.append(" ownerDateOfBirth: ").append(toIndentedString(ownerDateOfBirth)).append("\n"); + sb.append(" ownerHouseNumberOrName: ").append(toIndentedString(ownerHouseNumberOrName)).append("\n"); + sb.append(" ownerName: ").append(toIndentedString(ownerName)).append("\n"); + sb.append(" ownerNationality: ").append(toIndentedString(ownerNationality)).append("\n"); + sb.append(" ownerPostalCode: ").append(toIndentedString(ownerPostalCode)).append("\n"); + sb.append(" ownerState: ").append(toIndentedString(ownerState)).append("\n"); + sb.append(" ownerStreet: ").append(toIndentedString(ownerStreet)).append("\n"); + sb.append(" primaryAccount: ").append(toIndentedString(primaryAccount)).append("\n"); + sb.append(" taxId: ").append(toIndentedString(taxId)).append("\n"); + sb.append(" urlForVerification: ").append(toIndentedString(urlForVerification)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line 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 BankAccountDetail given an JSON string + * + * @param jsonString JSON string + * @return An instance of BankAccountDetail + * @throws JsonProcessingException if the JSON string is invalid with respect to BankAccountDetail + */ + public static BankAccountDetail fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, BankAccountDetail.class); + } +/** + * Convert an instance of BankAccountDetail 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/marketpayfund/DebitAccountHolderRequest.java b/src/main/java/com/adyen/model/marketpayfund/DebitAccountHolderRequest.java new file mode 100644 index 000000000..aefc42b16 --- /dev/null +++ b/src/main/java/com/adyen/model/marketpayfund/DebitAccountHolderRequest.java @@ -0,0 +1,293 @@ +/* + * Fund API + * This API is used for the classic integration. If you are just starting your implementation, refer to our [new integration guide](https://docs.adyen.com/marketplaces-and-platforms) instead. The Fund API provides endpoints for managing the funds in the accounts on your platform. These management operations include, for example, the transfer of funds from one account to another, the payout of funds to an account holder, and the retrieval of balances in an account. For more information, refer to our [documentation](https://docs.adyen.com/marketplaces-and-platforms/classic/). ## Authentication Your Adyen contact will provide your API credential and an API key. To connect to the API, add an `X-API-Key` header with the API key as the value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: YOUR_API_KEY\" \\ ... ``` Alternatively, you can use the username and password to connect to the API using basic authentication. For example: ``` curl -U \"ws@MarketPlace.YOUR_PLATFORM_ACCOUNT\":\"YOUR_WS_PASSWORD\" \\ -H \"Content-Type: application/json\" \\ ... ``` When going live, you need to generate new web service user credentials to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning The Fund API supports [versioning](https://docs.adyen.com/development-resources/versioning) using a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://cal-test.adyen.com/cal/services/Fund/v6/accountHolderBalance ``` + * + * The version of the OpenAPI document: 6 + * + * + * 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.marketpayfund; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.adyen.model.marketpayfund.Amount; +import com.adyen.model.marketpayfund.Split; +import com.fasterxml.jackson.annotation.JsonInclude; +import 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; + + +/** + * DebitAccountHolderRequest + */ +@JsonPropertyOrder({ + DebitAccountHolderRequest.JSON_PROPERTY_ACCOUNT_HOLDER_CODE, + DebitAccountHolderRequest.JSON_PROPERTY_AMOUNT, + DebitAccountHolderRequest.JSON_PROPERTY_BANK_ACCOUNT_U_U_I_D, + DebitAccountHolderRequest.JSON_PROPERTY_DESCRIPTION, + DebitAccountHolderRequest.JSON_PROPERTY_MERCHANT_ACCOUNT, + DebitAccountHolderRequest.JSON_PROPERTY_SPLITS +}) + +public class DebitAccountHolderRequest { + public static final String JSON_PROPERTY_ACCOUNT_HOLDER_CODE = "accountHolderCode"; + private String accountHolderCode; + + public static final String JSON_PROPERTY_AMOUNT = "amount"; + private Amount amount; + + public static final String JSON_PROPERTY_BANK_ACCOUNT_U_U_I_D = "bankAccountUUID"; + private String bankAccountUUID; + + public static final String JSON_PROPERTY_DESCRIPTION = "description"; + private String description; + + public static final String JSON_PROPERTY_MERCHANT_ACCOUNT = "merchantAccount"; + private String merchantAccount; + + public static final String JSON_PROPERTY_SPLITS = "splits"; + private List splits = new ArrayList<>(); + + public DebitAccountHolderRequest() { + } + + public DebitAccountHolderRequest accountHolderCode(String accountHolderCode) { + this.accountHolderCode = accountHolderCode; + return this; + } + + /** + * The code of the account holder. + * @return accountHolderCode + **/ + @ApiModelProperty(required = true, value = "The code of the account holder.") + @JsonProperty(JSON_PROPERTY_ACCOUNT_HOLDER_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getAccountHolderCode() { + return accountHolderCode; + } + + + @JsonProperty(JSON_PROPERTY_ACCOUNT_HOLDER_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAccountHolderCode(String accountHolderCode) { + this.accountHolderCode = accountHolderCode; + } + + + public DebitAccountHolderRequest 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 DebitAccountHolderRequest bankAccountUUID(String bankAccountUUID) { + this.bankAccountUUID = bankAccountUUID; + return this; + } + + /** + * The Adyen-generated unique alphanumeric identifier (UUID) of the account holder's bank account. + * @return bankAccountUUID + **/ + @ApiModelProperty(required = true, value = "The Adyen-generated unique alphanumeric identifier (UUID) of the account holder's bank account.") + @JsonProperty(JSON_PROPERTY_BANK_ACCOUNT_U_U_I_D) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getBankAccountUUID() { + return bankAccountUUID; + } + + + @JsonProperty(JSON_PROPERTY_BANK_ACCOUNT_U_U_I_D) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setBankAccountUUID(String bankAccountUUID) { + this.bankAccountUUID = bankAccountUUID; + } + + + public DebitAccountHolderRequest description(String description) { + this.description = description; + return this; + } + + /** + * A description of the direct debit. Maximum length: 35 characters. Allowed characters: **a-z**, **A-Z**, **0-9**, and special characters **_/?:().,'+ \";**. + * @return description + **/ + @ApiModelProperty(value = "A description of the direct debit. Maximum length: 35 characters. Allowed characters: **a-z**, **A-Z**, **0-9**, and special characters **_/?:().,'+ \";**.") + @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 DebitAccountHolderRequest merchantAccount(String merchantAccount) { + this.merchantAccount = merchantAccount; + return this; + } + + /** + * Your merchant account. + * @return merchantAccount + **/ + @ApiModelProperty(required = true, value = "Your merchant account.") + @JsonProperty(JSON_PROPERTY_MERCHANT_ACCOUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getMerchantAccount() { + return merchantAccount; + } + + + @JsonProperty(JSON_PROPERTY_MERCHANT_ACCOUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMerchantAccount(String merchantAccount) { + this.merchantAccount = merchantAccount; + } + + + public DebitAccountHolderRequest splits(List splits) { + this.splits = splits; + return this; + } + + public DebitAccountHolderRequest addSplitsItem(Split splitsItem) { + this.splits.add(splitsItem); + return this; + } + + /** + * Contains instructions on how to split the funds between the accounts in your platform. The request must have at least one split item. + * @return splits + **/ + @ApiModelProperty(required = true, value = "Contains instructions on how to split the funds between the accounts in your platform. The request must have at least one split item.") + @JsonProperty(JSON_PROPERTY_SPLITS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getSplits() { + return splits; + } + + + @JsonProperty(JSON_PROPERTY_SPLITS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSplits(List splits) { + this.splits = splits; + } + + + /** + * Return true if this DebitAccountHolderRequest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DebitAccountHolderRequest debitAccountHolderRequest = (DebitAccountHolderRequest) o; + return Objects.equals(this.accountHolderCode, debitAccountHolderRequest.accountHolderCode) && + Objects.equals(this.amount, debitAccountHolderRequest.amount) && + Objects.equals(this.bankAccountUUID, debitAccountHolderRequest.bankAccountUUID) && + Objects.equals(this.description, debitAccountHolderRequest.description) && + Objects.equals(this.merchantAccount, debitAccountHolderRequest.merchantAccount) && + Objects.equals(this.splits, debitAccountHolderRequest.splits); + } + + @Override + public int hashCode() { + return Objects.hash(accountHolderCode, amount, bankAccountUUID, description, merchantAccount, splits); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DebitAccountHolderRequest {\n"); + sb.append(" accountHolderCode: ").append(toIndentedString(accountHolderCode)).append("\n"); + sb.append(" amount: ").append(toIndentedString(amount)).append("\n"); + sb.append(" bankAccountUUID: ").append(toIndentedString(bankAccountUUID)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" merchantAccount: ").append(toIndentedString(merchantAccount)).append("\n"); + sb.append(" splits: ").append(toIndentedString(splits)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line 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 DebitAccountHolderRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of DebitAccountHolderRequest + * @throws JsonProcessingException if the JSON string is invalid with respect to DebitAccountHolderRequest + */ + public static DebitAccountHolderRequest fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, DebitAccountHolderRequest.class); + } +/** + * Convert an instance of DebitAccountHolderRequest 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/marketpayfund/DebitAccountHolderResponse.java b/src/main/java/com/adyen/model/marketpayfund/DebitAccountHolderResponse.java new file mode 100644 index 000000000..33dd2fb7f --- /dev/null +++ b/src/main/java/com/adyen/model/marketpayfund/DebitAccountHolderResponse.java @@ -0,0 +1,303 @@ +/* + * Fund API + * This API is used for the classic integration. If you are just starting your implementation, refer to our [new integration guide](https://docs.adyen.com/marketplaces-and-platforms) instead. The Fund API provides endpoints for managing the funds in the accounts on your platform. These management operations include, for example, the transfer of funds from one account to another, the payout of funds to an account holder, and the retrieval of balances in an account. For more information, refer to our [documentation](https://docs.adyen.com/marketplaces-and-platforms/classic/). ## Authentication Your Adyen contact will provide your API credential and an API key. To connect to the API, add an `X-API-Key` header with the API key as the value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: YOUR_API_KEY\" \\ ... ``` Alternatively, you can use the username and password to connect to the API using basic authentication. For example: ``` curl -U \"ws@MarketPlace.YOUR_PLATFORM_ACCOUNT\":\"YOUR_WS_PASSWORD\" \\ -H \"Content-Type: application/json\" \\ ... ``` When going live, you need to generate new web service user credentials to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning The Fund API supports [versioning](https://docs.adyen.com/development-resources/versioning) using a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://cal-test.adyen.com/cal/services/Fund/v6/accountHolderBalance ``` + * + * The version of the OpenAPI document: 6 + * + * + * 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.marketpayfund; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.adyen.model.marketpayfund.ErrorFieldType; +import com.fasterxml.jackson.annotation.JsonInclude; +import 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; + + +/** + * DebitAccountHolderResponse + */ +@JsonPropertyOrder({ + DebitAccountHolderResponse.JSON_PROPERTY_ACCOUNT_HOLDER_CODE, + DebitAccountHolderResponse.JSON_PROPERTY_BANK_ACCOUNT_U_U_I_D, + DebitAccountHolderResponse.JSON_PROPERTY_INVALID_FIELDS, + DebitAccountHolderResponse.JSON_PROPERTY_MERCHANT_REFERENCES, + DebitAccountHolderResponse.JSON_PROPERTY_PSP_REFERENCE, + DebitAccountHolderResponse.JSON_PROPERTY_RESULT_CODE +}) + +public class DebitAccountHolderResponse { + public static final String JSON_PROPERTY_ACCOUNT_HOLDER_CODE = "accountHolderCode"; + private String accountHolderCode; + + public static final String JSON_PROPERTY_BANK_ACCOUNT_U_U_I_D = "bankAccountUUID"; + private String bankAccountUUID; + + public static final String JSON_PROPERTY_INVALID_FIELDS = "invalidFields"; + private List invalidFields = null; + + public static final String JSON_PROPERTY_MERCHANT_REFERENCES = "merchantReferences"; + private List merchantReferences = null; + + public static final String JSON_PROPERTY_PSP_REFERENCE = "pspReference"; + private String pspReference; + + public static final String JSON_PROPERTY_RESULT_CODE = "resultCode"; + private String resultCode; + + public DebitAccountHolderResponse() { + } + + public DebitAccountHolderResponse accountHolderCode(String accountHolderCode) { + this.accountHolderCode = accountHolderCode; + return this; + } + + /** + * The code of the account holder. + * @return accountHolderCode + **/ + @ApiModelProperty(value = "The code of the account holder.") + @JsonProperty(JSON_PROPERTY_ACCOUNT_HOLDER_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getAccountHolderCode() { + return accountHolderCode; + } + + + @JsonProperty(JSON_PROPERTY_ACCOUNT_HOLDER_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAccountHolderCode(String accountHolderCode) { + this.accountHolderCode = accountHolderCode; + } + + + public DebitAccountHolderResponse bankAccountUUID(String bankAccountUUID) { + this.bankAccountUUID = bankAccountUUID; + return this; + } + + /** + * The Adyen-generated unique alphanumeric identifier (UUID) of the account holder's bank account. + * @return bankAccountUUID + **/ + @ApiModelProperty(value = "The Adyen-generated unique alphanumeric identifier (UUID) of the account holder's bank account.") + @JsonProperty(JSON_PROPERTY_BANK_ACCOUNT_U_U_I_D) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getBankAccountUUID() { + return bankAccountUUID; + } + + + @JsonProperty(JSON_PROPERTY_BANK_ACCOUNT_U_U_I_D) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setBankAccountUUID(String bankAccountUUID) { + this.bankAccountUUID = bankAccountUUID; + } + + + public DebitAccountHolderResponse invalidFields(List invalidFields) { + this.invalidFields = invalidFields; + return this; + } + + public DebitAccountHolderResponse addInvalidFieldsItem(ErrorFieldType invalidFieldsItem) { + if (this.invalidFields == null) { + this.invalidFields = new ArrayList<>(); + } + this.invalidFields.add(invalidFieldsItem); + return this; + } + + /** + * Contains field validation errors that would prevent requests from being processed. + * @return invalidFields + **/ + @ApiModelProperty(value = "Contains field validation errors that would prevent requests from being processed.") + @JsonProperty(JSON_PROPERTY_INVALID_FIELDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getInvalidFields() { + return invalidFields; + } + + + @JsonProperty(JSON_PROPERTY_INVALID_FIELDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setInvalidFields(List invalidFields) { + this.invalidFields = invalidFields; + } + + + public DebitAccountHolderResponse merchantReferences(List merchantReferences) { + this.merchantReferences = merchantReferences; + return this; + } + + public DebitAccountHolderResponse addMerchantReferencesItem(String merchantReferencesItem) { + if (this.merchantReferences == null) { + this.merchantReferences = new ArrayList<>(); + } + this.merchantReferences.add(merchantReferencesItem); + return this; + } + + /** + * List of the `reference` values from the `split` array in the request. + * @return merchantReferences + **/ + @ApiModelProperty(value = "List of the `reference` values from the `split` array in the request.") + @JsonProperty(JSON_PROPERTY_MERCHANT_REFERENCES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getMerchantReferences() { + return merchantReferences; + } + + + @JsonProperty(JSON_PROPERTY_MERCHANT_REFERENCES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMerchantReferences(List merchantReferences) { + this.merchantReferences = merchantReferences; + } + + + public DebitAccountHolderResponse pspReference(String pspReference) { + this.pspReference = pspReference; + return this; + } + + /** + * The reference of a request. Can be used to uniquely identify the request. + * @return pspReference + **/ + @ApiModelProperty(value = "The reference of a request. Can be used to uniquely identify the request.") + @JsonProperty(JSON_PROPERTY_PSP_REFERENCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getPspReference() { + return pspReference; + } + + + @JsonProperty(JSON_PROPERTY_PSP_REFERENCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPspReference(String pspReference) { + this.pspReference = pspReference; + } + + + public DebitAccountHolderResponse resultCode(String resultCode) { + this.resultCode = resultCode; + return this; + } + + /** + * The result code. + * @return resultCode + **/ + @ApiModelProperty(value = "The result code.") + @JsonProperty(JSON_PROPERTY_RESULT_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getResultCode() { + return resultCode; + } + + + @JsonProperty(JSON_PROPERTY_RESULT_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setResultCode(String resultCode) { + this.resultCode = resultCode; + } + + + /** + * Return true if this DebitAccountHolderResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DebitAccountHolderResponse debitAccountHolderResponse = (DebitAccountHolderResponse) o; + return Objects.equals(this.accountHolderCode, debitAccountHolderResponse.accountHolderCode) && + Objects.equals(this.bankAccountUUID, debitAccountHolderResponse.bankAccountUUID) && + Objects.equals(this.invalidFields, debitAccountHolderResponse.invalidFields) && + Objects.equals(this.merchantReferences, debitAccountHolderResponse.merchantReferences) && + Objects.equals(this.pspReference, debitAccountHolderResponse.pspReference) && + Objects.equals(this.resultCode, debitAccountHolderResponse.resultCode); + } + + @Override + public int hashCode() { + return Objects.hash(accountHolderCode, bankAccountUUID, invalidFields, merchantReferences, pspReference, resultCode); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DebitAccountHolderResponse {\n"); + sb.append(" accountHolderCode: ").append(toIndentedString(accountHolderCode)).append("\n"); + sb.append(" bankAccountUUID: ").append(toIndentedString(bankAccountUUID)).append("\n"); + sb.append(" invalidFields: ").append(toIndentedString(invalidFields)).append("\n"); + sb.append(" merchantReferences: ").append(toIndentedString(merchantReferences)).append("\n"); + sb.append(" pspReference: ").append(toIndentedString(pspReference)).append("\n"); + sb.append(" resultCode: ").append(toIndentedString(resultCode)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line 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 DebitAccountHolderResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of DebitAccountHolderResponse + * @throws JsonProcessingException if the JSON string is invalid with respect to DebitAccountHolderResponse + */ + public static DebitAccountHolderResponse fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, DebitAccountHolderResponse.class); + } +/** + * Convert an instance of DebitAccountHolderResponse 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/marketpayfund/DetailBalance.java b/src/main/java/com/adyen/model/marketpayfund/DetailBalance.java new file mode 100644 index 000000000..33fd796d5 --- /dev/null +++ b/src/main/java/com/adyen/model/marketpayfund/DetailBalance.java @@ -0,0 +1,218 @@ +/* + * Fund API + * This API is used for the classic integration. If you are just starting your implementation, refer to our [new integration guide](https://docs.adyen.com/marketplaces-and-platforms) instead. The Fund API provides endpoints for managing the funds in the accounts on your platform. These management operations include, for example, the transfer of funds from one account to another, the payout of funds to an account holder, and the retrieval of balances in an account. For more information, refer to our [documentation](https://docs.adyen.com/marketplaces-and-platforms/classic/). ## Authentication Your Adyen contact will provide your API credential and an API key. To connect to the API, add an `X-API-Key` header with the API key as the value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: YOUR_API_KEY\" \\ ... ``` Alternatively, you can use the username and password to connect to the API using basic authentication. For example: ``` curl -U \"ws@MarketPlace.YOUR_PLATFORM_ACCOUNT\":\"YOUR_WS_PASSWORD\" \\ -H \"Content-Type: application/json\" \\ ... ``` When going live, you need to generate new web service user credentials to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning The Fund API supports [versioning](https://docs.adyen.com/development-resources/versioning) using a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://cal-test.adyen.com/cal/services/Fund/v6/accountHolderBalance ``` + * + * The version of the OpenAPI document: 6 + * + * + * 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.marketpayfund; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.adyen.model.marketpayfund.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 java.util.ArrayList; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.core.JsonProcessingException; + + +/** + * DetailBalance + */ +@JsonPropertyOrder({ + DetailBalance.JSON_PROPERTY_BALANCE, + DetailBalance.JSON_PROPERTY_ON_HOLD_BALANCE, + DetailBalance.JSON_PROPERTY_PENDING_BALANCE +}) + +public class DetailBalance { + public static final String JSON_PROPERTY_BALANCE = "balance"; + private List balance = null; + + public static final String JSON_PROPERTY_ON_HOLD_BALANCE = "onHoldBalance"; + private List onHoldBalance = null; + + public static final String JSON_PROPERTY_PENDING_BALANCE = "pendingBalance"; + private List pendingBalance = null; + + public DetailBalance() { + } + + public DetailBalance balance(List balance) { + this.balance = balance; + return this; + } + + public DetailBalance addBalanceItem(Amount balanceItem) { + if (this.balance == null) { + this.balance = new ArrayList<>(); + } + this.balance.add(balanceItem); + return this; + } + + /** + * The list of balances held by the account. + * @return balance + **/ + @ApiModelProperty(value = "The list of balances held by the account.") + @JsonProperty(JSON_PROPERTY_BALANCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getBalance() { + return balance; + } + + + @JsonProperty(JSON_PROPERTY_BALANCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setBalance(List balance) { + this.balance = balance; + } + + + public DetailBalance onHoldBalance(List onHoldBalance) { + this.onHoldBalance = onHoldBalance; + return this; + } + + public DetailBalance addOnHoldBalanceItem(Amount onHoldBalanceItem) { + if (this.onHoldBalance == null) { + this.onHoldBalance = new ArrayList<>(); + } + this.onHoldBalance.add(onHoldBalanceItem); + return this; + } + + /** + * The list of on hold balances held by the account. + * @return onHoldBalance + **/ + @ApiModelProperty(value = "The list of on hold balances held by the account.") + @JsonProperty(JSON_PROPERTY_ON_HOLD_BALANCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getOnHoldBalance() { + return onHoldBalance; + } + + + @JsonProperty(JSON_PROPERTY_ON_HOLD_BALANCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setOnHoldBalance(List onHoldBalance) { + this.onHoldBalance = onHoldBalance; + } + + + public DetailBalance pendingBalance(List pendingBalance) { + this.pendingBalance = pendingBalance; + return this; + } + + public DetailBalance addPendingBalanceItem(Amount pendingBalanceItem) { + if (this.pendingBalance == null) { + this.pendingBalance = new ArrayList<>(); + } + this.pendingBalance.add(pendingBalanceItem); + return this; + } + + /** + * The list of pending balances held by the account. + * @return pendingBalance + **/ + @ApiModelProperty(value = "The list of pending balances held by the account.") + @JsonProperty(JSON_PROPERTY_PENDING_BALANCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getPendingBalance() { + return pendingBalance; + } + + + @JsonProperty(JSON_PROPERTY_PENDING_BALANCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPendingBalance(List pendingBalance) { + this.pendingBalance = pendingBalance; + } + + + /** + * Return true if this DetailBalance object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DetailBalance detailBalance = (DetailBalance) o; + return Objects.equals(this.balance, detailBalance.balance) && + Objects.equals(this.onHoldBalance, detailBalance.onHoldBalance) && + Objects.equals(this.pendingBalance, detailBalance.pendingBalance); + } + + @Override + public int hashCode() { + return Objects.hash(balance, onHoldBalance, pendingBalance); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DetailBalance {\n"); + sb.append(" balance: ").append(toIndentedString(balance)).append("\n"); + sb.append(" onHoldBalance: ").append(toIndentedString(onHoldBalance)).append("\n"); + sb.append(" pendingBalance: ").append(toIndentedString(pendingBalance)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line 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 DetailBalance given an JSON string + * + * @param jsonString JSON string + * @return An instance of DetailBalance + * @throws JsonProcessingException if the JSON string is invalid with respect to DetailBalance + */ + public static DetailBalance fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, DetailBalance.class); + } +/** + * Convert an instance of DetailBalance 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/marketpayfund/ErrorFieldType.java b/src/main/java/com/adyen/model/marketpayfund/ErrorFieldType.java new file mode 100644 index 000000000..019d3b4df --- /dev/null +++ b/src/main/java/com/adyen/model/marketpayfund/ErrorFieldType.java @@ -0,0 +1,192 @@ +/* + * Fund API + * This API is used for the classic integration. If you are just starting your implementation, refer to our [new integration guide](https://docs.adyen.com/marketplaces-and-platforms) instead. The Fund API provides endpoints for managing the funds in the accounts on your platform. These management operations include, for example, the transfer of funds from one account to another, the payout of funds to an account holder, and the retrieval of balances in an account. For more information, refer to our [documentation](https://docs.adyen.com/marketplaces-and-platforms/classic/). ## Authentication Your Adyen contact will provide your API credential and an API key. To connect to the API, add an `X-API-Key` header with the API key as the value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: YOUR_API_KEY\" \\ ... ``` Alternatively, you can use the username and password to connect to the API using basic authentication. For example: ``` curl -U \"ws@MarketPlace.YOUR_PLATFORM_ACCOUNT\":\"YOUR_WS_PASSWORD\" \\ -H \"Content-Type: application/json\" \\ ... ``` When going live, you need to generate new web service user credentials to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning The Fund API supports [versioning](https://docs.adyen.com/development-resources/versioning) using a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://cal-test.adyen.com/cal/services/Fund/v6/accountHolderBalance ``` + * + * The version of the OpenAPI document: 6 + * + * + * 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.marketpayfund; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.adyen.model.marketpayfund.FieldType; +import com.fasterxml.jackson.annotation.JsonInclude; +import 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; + + +/** + * ErrorFieldType + */ +@JsonPropertyOrder({ + ErrorFieldType.JSON_PROPERTY_ERROR_CODE, + ErrorFieldType.JSON_PROPERTY_ERROR_DESCRIPTION, + ErrorFieldType.JSON_PROPERTY_FIELD_TYPE +}) + +public class ErrorFieldType { + public static final String JSON_PROPERTY_ERROR_CODE = "errorCode"; + private Integer errorCode; + + public static final String JSON_PROPERTY_ERROR_DESCRIPTION = "errorDescription"; + private String errorDescription; + + public static final String JSON_PROPERTY_FIELD_TYPE = "fieldType"; + private FieldType fieldType; + + public ErrorFieldType() { + } + + public ErrorFieldType errorCode(Integer errorCode) { + this.errorCode = errorCode; + return this; + } + + /** + * The validation error code. + * @return errorCode + **/ + @ApiModelProperty(value = "The validation error code.") + @JsonProperty(JSON_PROPERTY_ERROR_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Integer getErrorCode() { + return errorCode; + } + + + @JsonProperty(JSON_PROPERTY_ERROR_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setErrorCode(Integer errorCode) { + this.errorCode = errorCode; + } + + + public ErrorFieldType errorDescription(String errorDescription) { + this.errorDescription = errorDescription; + return this; + } + + /** + * A description of the validation error. + * @return errorDescription + **/ + @ApiModelProperty(value = "A description of the validation error.") + @JsonProperty(JSON_PROPERTY_ERROR_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getErrorDescription() { + return errorDescription; + } + + + @JsonProperty(JSON_PROPERTY_ERROR_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setErrorDescription(String errorDescription) { + this.errorDescription = errorDescription; + } + + + public ErrorFieldType fieldType(FieldType fieldType) { + this.fieldType = fieldType; + return this; + } + + /** + * Get fieldType + * @return fieldType + **/ + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_FIELD_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public FieldType getFieldType() { + return fieldType; + } + + + @JsonProperty(JSON_PROPERTY_FIELD_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setFieldType(FieldType fieldType) { + this.fieldType = fieldType; + } + + + /** + * Return true if this ErrorFieldType object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ErrorFieldType errorFieldType = (ErrorFieldType) o; + return Objects.equals(this.errorCode, errorFieldType.errorCode) && + Objects.equals(this.errorDescription, errorFieldType.errorDescription) && + Objects.equals(this.fieldType, errorFieldType.fieldType); + } + + @Override + public int hashCode() { + return Objects.hash(errorCode, errorDescription, fieldType); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ErrorFieldType {\n"); + sb.append(" errorCode: ").append(toIndentedString(errorCode)).append("\n"); + sb.append(" errorDescription: ").append(toIndentedString(errorDescription)).append("\n"); + sb.append(" fieldType: ").append(toIndentedString(fieldType)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line 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 ErrorFieldType given an JSON string + * + * @param jsonString JSON string + * @return An instance of ErrorFieldType + * @throws JsonProcessingException if the JSON string is invalid with respect to ErrorFieldType + */ + public static ErrorFieldType fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, ErrorFieldType.class); + } +/** + * Convert an instance of ErrorFieldType 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/marketpayfund/FieldType.java b/src/main/java/com/adyen/model/marketpayfund/FieldType.java new file mode 100644 index 000000000..0bd66027e --- /dev/null +++ b/src/main/java/com/adyen/model/marketpayfund/FieldType.java @@ -0,0 +1,546 @@ +/* + * Fund API + * This API is used for the classic integration. If you are just starting your implementation, refer to our [new integration guide](https://docs.adyen.com/marketplaces-and-platforms) instead. The Fund API provides endpoints for managing the funds in the accounts on your platform. These management operations include, for example, the transfer of funds from one account to another, the payout of funds to an account holder, and the retrieval of balances in an account. For more information, refer to our [documentation](https://docs.adyen.com/marketplaces-and-platforms/classic/). ## Authentication Your Adyen contact will provide your API credential and an API key. To connect to the API, add an `X-API-Key` header with the API key as the value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: YOUR_API_KEY\" \\ ... ``` Alternatively, you can use the username and password to connect to the API using basic authentication. For example: ``` curl -U \"ws@MarketPlace.YOUR_PLATFORM_ACCOUNT\":\"YOUR_WS_PASSWORD\" \\ -H \"Content-Type: application/json\" \\ ... ``` When going live, you need to generate new web service user credentials to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning The Fund API supports [versioning](https://docs.adyen.com/development-resources/versioning) using a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://cal-test.adyen.com/cal/services/Fund/v6/accountHolderBalance ``` + * + * The version of the OpenAPI document: 6 + * + * + * 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.marketpayfund; + +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; + + +/** + * FieldType + */ +@JsonPropertyOrder({ + FieldType.JSON_PROPERTY_FIELD, + FieldType.JSON_PROPERTY_FIELD_NAME, + FieldType.JSON_PROPERTY_SHAREHOLDER_CODE +}) + +public class FieldType { + public static final String JSON_PROPERTY_FIELD = "field"; + private String field; + + /** + * The type of the field. + */ + public enum FieldNameEnum { + ACCOUNTCODE("accountCode"), + + ACCOUNTHOLDERCODE("accountHolderCode"), + + ACCOUNTHOLDERDETAILS("accountHolderDetails"), + + ACCOUNTNUMBER("accountNumber"), + + ACCOUNTSTATETYPE("accountStateType"), + + ACCOUNTSTATUS("accountStatus"), + + ACCOUNTTYPE("accountType"), + + ADDRESS("address"), + + BALANCEACCOUNT("balanceAccount"), + + BALANCEACCOUNTACTIVE("balanceAccountActive"), + + BALANCEACCOUNTCODE("balanceAccountCode"), + + BALANCEACCOUNTID("balanceAccountId"), + + BANKACCOUNT("bankAccount"), + + BANKACCOUNTCODE("bankAccountCode"), + + BANKACCOUNTNAME("bankAccountName"), + + BANKACCOUNTUUID("bankAccountUUID"), + + BANKBICSWIFT("bankBicSwift"), + + BANKCITY("bankCity"), + + BANKCODE("bankCode"), + + BANKNAME("bankName"), + + BANKSTATEMENT("bankStatement"), + + BRANCHCODE("branchCode"), + + BUSINESSCONTACT("businessContact"), + + CARDTOKEN("cardToken"), + + CHECKCODE("checkCode"), + + CITY("city"), + + COMPANYREGISTRATION("companyRegistration"), + + CONSTITUTIONALDOCUMENT("constitutionalDocument"), + + CONTROLLER("controller"), + + COUNTRY("country"), + + COUNTRYCODE("countryCode"), + + CURRENCY("currency"), + + CURRENCYCODE("currencyCode"), + + DATEOFBIRTH("dateOfBirth"), + + DESCRIPTION("description"), + + DESTINATIONACCOUNTCODE("destinationAccountCode"), + + DOCUMENT("document"), + + DOCUMENTCONTENT("documentContent"), + + DOCUMENTEXPIRATIONDATE("documentExpirationDate"), + + DOCUMENTISSUERCOUNTRY("documentIssuerCountry"), + + DOCUMENTISSUERSTATE("documentIssuerState"), + + DOCUMENTNAME("documentName"), + + DOCUMENTNUMBER("documentNumber"), + + DOCUMENTTYPE("documentType"), + + DOINGBUSINESSAS("doingBusinessAs"), + + DRIVINGLICENCE("drivingLicence"), + + DRIVINGLICENCEBACK("drivingLicenceBack"), + + DRIVINGLICENCEFRONT("drivingLicenceFront"), + + DRIVINGLICENSE("drivingLicense"), + + EMAIL("email"), + + FIRSTNAME("firstName"), + + FORMTYPE("formType"), + + FULLPHONENUMBER("fullPhoneNumber"), + + GENDER("gender"), + + HOPWEBSERVICEUSER("hopWebserviceUser"), + + HOUSENUMBERORNAME("houseNumberOrName"), + + IBAN("iban"), + + IDCARD("idCard"), + + IDCARDBACK("idCardBack"), + + IDCARDFRONT("idCardFront"), + + IDNUMBER("idNumber"), + + IDENTITYDOCUMENT("identityDocument"), + + INDIVIDUALDETAILS("individualDetails"), + + INFIX("infix"), + + JOBTITLE("jobTitle"), + + LASTNAME("lastName"), + + LASTREVIEWDATE("lastReviewDate"), + + LEGALARRANGEMENT("legalArrangement"), + + LEGALARRANGEMENTCODE("legalArrangementCode"), + + LEGALARRANGEMENTENTITY("legalArrangementEntity"), + + LEGALARRANGEMENTENTITYCODE("legalArrangementEntityCode"), + + LEGALARRANGEMENTLEGALFORM("legalArrangementLegalForm"), + + LEGALARRANGEMENTMEMBER("legalArrangementMember"), + + LEGALARRANGEMENTMEMBERS("legalArrangementMembers"), + + LEGALARRANGEMENTNAME("legalArrangementName"), + + LEGALARRANGEMENTREFERENCE("legalArrangementReference"), + + LEGALARRANGEMENTREGISTRATIONNUMBER("legalArrangementRegistrationNumber"), + + LEGALARRANGEMENTTAXNUMBER("legalArrangementTaxNumber"), + + LEGALARRANGEMENTTYPE("legalArrangementType"), + + LEGALBUSINESSNAME("legalBusinessName"), + + LEGALENTITY("legalEntity"), + + LEGALENTITYTYPE("legalEntityType"), + + LOGO("logo"), + + MERCHANTACCOUNT("merchantAccount"), + + MERCHANTCATEGORYCODE("merchantCategoryCode"), + + MERCHANTHOUSENUMBER("merchantHouseNumber"), + + MERCHANTREFERENCE("merchantReference"), + + MICRODEPOSIT("microDeposit"), + + NAME("name"), + + NATIONALITY("nationality"), + + ORIGINALREFERENCE("originalReference"), + + OWNERCITY("ownerCity"), + + OWNERCOUNTRYCODE("ownerCountryCode"), + + OWNERDATEOFBIRTH("ownerDateOfBirth"), + + OWNERHOUSENUMBERORNAME("ownerHouseNumberOrName"), + + OWNERNAME("ownerName"), + + OWNERPOSTALCODE("ownerPostalCode"), + + OWNERSTATE("ownerState"), + + OWNERSTREET("ownerStreet"), + + PASSPORT("passport"), + + PASSPORTNUMBER("passportNumber"), + + PAYOUTMETHOD("payoutMethod"), + + PAYOUTMETHODCODE("payoutMethodCode"), + + PAYOUTSCHEDULE("payoutSchedule"), + + PCISELFASSESSMENT("pciSelfAssessment"), + + PERSONALDATA("personalData"), + + PHONECOUNTRYCODE("phoneCountryCode"), + + PHONENUMBER("phoneNumber"), + + POSTALCODE("postalCode"), + + PRIMARYCURRENCY("primaryCurrency"), + + REASON("reason"), + + REGISTRATIONNUMBER("registrationNumber"), + + RETURNURL("returnUrl"), + + SCHEDULE("schedule"), + + SHAREHOLDER("shareholder"), + + SHAREHOLDERCODE("shareholderCode"), + + SHAREHOLDERCODEANDSIGNATORYCODE("shareholderCodeAndSignatoryCode"), + + SHAREHOLDERCODEORSIGNATORYCODE("shareholderCodeOrSignatoryCode"), + + SHAREHOLDERTYPE("shareholderType"), + + SHAREHOLDERTYPES("shareholderTypes"), + + SHOPPERINTERACTION("shopperInteraction"), + + SIGNATORY("signatory"), + + SIGNATORYCODE("signatoryCode"), + + SOCIALSECURITYNUMBER("socialSecurityNumber"), + + SOURCEACCOUNTCODE("sourceAccountCode"), + + SPLITACCOUNT("splitAccount"), + + SPLITCONFIGURATIONUUID("splitConfigurationUUID"), + + SPLITCURRENCY("splitCurrency"), + + SPLITVALUE("splitValue"), + + SPLITS("splits"), + + STATEORPROVINCE("stateOrProvince"), + + STATUS("status"), + + STOCKEXCHANGE("stockExchange"), + + STOCKNUMBER("stockNumber"), + + STOCKTICKER("stockTicker"), + + STORE("store"), + + STOREDETAIL("storeDetail"), + + STORENAME("storeName"), + + STOREREFERENCE("storeReference"), + + STREET("street"), + + TAXID("taxId"), + + TIER("tier"), + + TIERNUMBER("tierNumber"), + + TRANSFERCODE("transferCode"), + + ULTIMATEPARENTCOMPANY("ultimateParentCompany"), + + ULTIMATEPARENTCOMPANYADDRESSDETAILS("ultimateParentCompanyAddressDetails"), + + ULTIMATEPARENTCOMPANYADDRESSDETAILSCOUNTRY("ultimateParentCompanyAddressDetailsCountry"), + + ULTIMATEPARENTCOMPANYBUSINESSDETAILS("ultimateParentCompanyBusinessDetails"), + + ULTIMATEPARENTCOMPANYBUSINESSDETAILSLEGALBUSINESSNAME("ultimateParentCompanyBusinessDetailsLegalBusinessName"), + + ULTIMATEPARENTCOMPANYBUSINESSDETAILSREGISTRATIONNUMBER("ultimateParentCompanyBusinessDetailsRegistrationNumber"), + + ULTIMATEPARENTCOMPANYCODE("ultimateParentCompanyCode"), + + ULTIMATEPARENTCOMPANYSTOCKEXCHANGE("ultimateParentCompanyStockExchange"), + + ULTIMATEPARENTCOMPANYSTOCKNUMBER("ultimateParentCompanyStockNumber"), + + ULTIMATEPARENTCOMPANYSTOCKNUMBERORSTOCKTICKER("ultimateParentCompanyStockNumberOrStockTicker"), + + ULTIMATEPARENTCOMPANYSTOCKTICKER("ultimateParentCompanyStockTicker"), + + UNKNOWN("unknown"), + + VALUE("value"), + + VERIFICATIONTYPE("verificationType"), + + VIRTUALACCOUNT("virtualAccount"), + + VISANUMBER("visaNumber"), + + WEBADDRESS("webAddress"), + + YEAR("year"); + + private String value; + + FieldNameEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static FieldNameEnum fromValue(String value) { + for (FieldNameEnum b : FieldNameEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_FIELD_NAME = "fieldName"; + private FieldNameEnum fieldName; + + public static final String JSON_PROPERTY_SHAREHOLDER_CODE = "shareholderCode"; + private String shareholderCode; + + public FieldType() { + } + + public FieldType field(String field) { + this.field = field; + return this; + } + + /** + * The full name of the property. + * @return field + **/ + @ApiModelProperty(value = "The full name of the property.") + @JsonProperty(JSON_PROPERTY_FIELD) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getField() { + return field; + } + + + @JsonProperty(JSON_PROPERTY_FIELD) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setField(String field) { + this.field = field; + } + + + public FieldType fieldName(FieldNameEnum fieldName) { + this.fieldName = fieldName; + return this; + } + + /** + * The type of the field. + * @return fieldName + **/ + @ApiModelProperty(value = "The type of the field.") + @JsonProperty(JSON_PROPERTY_FIELD_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public FieldNameEnum getFieldName() { + return fieldName; + } + + + @JsonProperty(JSON_PROPERTY_FIELD_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setFieldName(FieldNameEnum fieldName) { + this.fieldName = fieldName; + } + + + public FieldType shareholderCode(String shareholderCode) { + this.shareholderCode = shareholderCode; + return this; + } + + /** + * The code of the shareholder that the field belongs to. If empty, the field belongs to an account holder. + * @return shareholderCode + **/ + @ApiModelProperty(value = "The code of the shareholder that the field belongs to. If empty, the field belongs to an account holder.") + @JsonProperty(JSON_PROPERTY_SHAREHOLDER_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getShareholderCode() { + return shareholderCode; + } + + + @JsonProperty(JSON_PROPERTY_SHAREHOLDER_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setShareholderCode(String shareholderCode) { + this.shareholderCode = shareholderCode; + } + + + /** + * Return true if this FieldType object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FieldType fieldType = (FieldType) o; + return Objects.equals(this.field, fieldType.field) && + Objects.equals(this.fieldName, fieldType.fieldName) && + Objects.equals(this.shareholderCode, fieldType.shareholderCode); + } + + @Override + public int hashCode() { + return Objects.hash(field, fieldName, shareholderCode); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FieldType {\n"); + sb.append(" field: ").append(toIndentedString(field)).append("\n"); + sb.append(" fieldName: ").append(toIndentedString(fieldName)).append("\n"); + sb.append(" shareholderCode: ").append(toIndentedString(shareholderCode)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line 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 FieldType given an JSON string + * + * @param jsonString JSON string + * @return An instance of FieldType + * @throws JsonProcessingException if the JSON string is invalid with respect to FieldType + */ + public static FieldType fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, FieldType.class); + } +/** + * Convert an instance of FieldType 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/marketpayfund/JSON.java b/src/main/java/com/adyen/model/marketpayfund/JSON.java new file mode 100644 index 000000000..cf3884a5c --- /dev/null +++ b/src/main/java/com/adyen/model/marketpayfund/JSON.java @@ -0,0 +1,251 @@ +package com.adyen.model.marketpayfund; + +import com.adyen.serializer.ByteArraySerializer; +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.*; +import com.fasterxml.jackson.databind.json.JsonMapper; +import com.fasterxml.jackson.databind.module.SimpleModule; +import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule; +import com.adyen.model.marketpayfund.*; + +import java.text.DateFormat; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Map; +import java.util.Set; +import jakarta.ws.rs.core.GenericType; +import jakarta.ws.rs.ext.ContextResolver; + +public class JSON implements ContextResolver { + private static ObjectMapper mapper; + + public JSON() { + mapper = new ObjectMapper(); + mapper.setSerializationInclusion(JsonInclude.Include.NON_NULL); + JsonMapper.builder().configure(MapperFeature.ALLOW_COERCION_OF_SCALARS, false); + mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); + mapper.configure(DeserializationFeature.FAIL_ON_INVALID_SUBTYPE, true); + mapper.disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS); + mapper.disable(DeserializationFeature.ADJUST_DATES_TO_CONTEXT_TIME_ZONE); + mapper.enable(SerializationFeature.WRITE_ENUMS_USING_TO_STRING); + mapper.enable(DeserializationFeature.READ_ENUMS_USING_TO_STRING); + mapper.registerModule(new JavaTimeModule()); + // Custom ByteSerializer + SimpleModule simpleModule = new SimpleModule(); + simpleModule.addSerializer(byte[].class, new ByteArraySerializer()); + mapper.registerModule(simpleModule); + } + + /** + * Set the date format for JSON (de)serialization with Date properties. + * @param dateFormat Date format + */ + public void setDateFormat(DateFormat dateFormat) { + mapper.setDateFormat(dateFormat); + } + + @Override + public ObjectMapper getContext(Class type) { + return mapper; + } + + /** + * Get the object mapper + * + * @return object mapper + */ + public static ObjectMapper getMapper() { return mapper; } + + /** + * Returns the target model class that should be used to deserialize the input data. + * The discriminator mappings are used to determine the target model class. + * + * @param node The input data. + * @param modelClass The class that contains the discriminator mappings. + */ + public static Class getClassForElement(JsonNode node, Class modelClass) { + ClassDiscriminatorMapping cdm = modelDiscriminators.get(modelClass); + if (cdm != null) { + return cdm.getClassForElement(node, new HashSet>()); + } + return null; + } + + /** + * Helper class to register the discriminator mappings. + */ + private static class ClassDiscriminatorMapping { + // The model class name. + Class modelClass; + // The name of the discriminator property. + String discriminatorName; + // The discriminator mappings for a model class. + Map> discriminatorMappings; + + // Constructs a new class discriminator. + ClassDiscriminatorMapping(Class cls, String propertyName, Map> mappings) { + modelClass = cls; + discriminatorName = propertyName; + discriminatorMappings = new HashMap>(); + if (mappings != null) { + discriminatorMappings.putAll(mappings); + } + } + + // Return the name of the discriminator property for this model class. + String getDiscriminatorPropertyName() { + return discriminatorName; + } + + // Return the discriminator value or null if the discriminator is not + // present in the payload. + String getDiscriminatorValue(JsonNode node) { + // Determine the value of the discriminator property in the input data. + if (discriminatorName != null) { + // Get the value of the discriminator property, if present in the input payload. + node = node.get(discriminatorName); + if (node != null && node.isValueNode()) { + String discrValue = node.asText(); + if (discrValue != null) { + return discrValue; + } + } + } + return null; + } + + /** + * Returns the target model class that should be used to deserialize the input data. + * This function can be invoked for anyOf/oneOf composed models with discriminator mappings. + * The discriminator mappings are used to determine the target model class. + * + * @param node The input data. + * @param visitedClasses The set of classes that have already been visited. + */ + Class getClassForElement(JsonNode node, Set> visitedClasses) { + if (visitedClasses.contains(modelClass)) { + // Class has already been visited. + return null; + } + // Determine the value of the discriminator property in the input data. + String discrValue = getDiscriminatorValue(node); + if (discrValue == null) { + return null; + } + Class cls = discriminatorMappings.get(discrValue); + // It may not be sufficient to return this cls directly because that target class + // may itself be a composed schema, possibly with its own discriminator. + visitedClasses.add(modelClass); + for (Class childClass : discriminatorMappings.values()) { + ClassDiscriminatorMapping childCdm = modelDiscriminators.get(childClass); + if (childCdm == null) { + continue; + } + if (!discriminatorName.equals(childCdm.discriminatorName)) { + discrValue = getDiscriminatorValue(node); + if (discrValue == null) { + continue; + } + } + if (childCdm != null) { + // Recursively traverse the discriminator mappings. + Class childDiscr = childCdm.getClassForElement(node, visitedClasses); + if (childDiscr != null) { + return childDiscr; + } + } + } + return cls; + } + } + + /** + * Returns true if inst is an instance of modelClass in the OpenAPI model hierarchy. + * + * The Java class hierarchy is not implemented the same way as the OpenAPI model hierarchy, + * so it's not possible to use the instanceof keyword. + * + * @param modelClass A OpenAPI model class. + * @param inst The instance object. + */ + public static boolean isInstanceOf(Class modelClass, Object inst, Set> visitedClasses) { + if (modelClass.isInstance(inst)) { + // This handles the 'allOf' use case with single parent inheritance. + return true; + } + if (visitedClasses.contains(modelClass)) { + // This is to prevent infinite recursion when the composed schemas have + // a circular dependency. + return false; + } + visitedClasses.add(modelClass); + + // Traverse the oneOf/anyOf composed schemas. + Map descendants = modelDescendants.get(modelClass); + if (descendants != null) { + for (GenericType childType : descendants.values()) { + if (isInstanceOf(childType.getRawType(), inst, visitedClasses)) { + return true; + } + } + } + return false; + } + + /** + * A map of discriminators for all model classes. + */ + private static Map, ClassDiscriminatorMapping> modelDiscriminators = new HashMap, ClassDiscriminatorMapping>(); + + /** + * A map of oneOf/anyOf descendants for each model class. + */ + private static Map, Map> modelDescendants = new HashMap, Map>(); + + /** + * Register a model class discriminator. + * + * @param modelClass the model class + * @param discriminatorPropertyName the name of the discriminator property + * @param mappings a map with the discriminator mappings. + */ + public static void registerDiscriminator(Class modelClass, String discriminatorPropertyName, Map> mappings) { + ClassDiscriminatorMapping m = new ClassDiscriminatorMapping(modelClass, discriminatorPropertyName, mappings); + modelDiscriminators.put(modelClass, m); + } + + /** + * Register the oneOf/anyOf descendants of the modelClass. + * + * @param modelClass the model class + * @param descendants a map of oneOf/anyOf descendants. + */ + public static void registerDescendants(Class modelClass, Map descendants) { + modelDescendants.put(modelClass, descendants); + } + + private static JSON json; + + static + { + json = new JSON(); + } + + /** + * Get the default JSON instance. + * + * @return the default JSON instance + */ + public static JSON getDefault() { + return json; + } + + /** + * Set the default JSON instance. + * + * @param json JSON instance to be used + */ + public static void setDefault(JSON json) { + JSON.json = json; + } +} diff --git a/src/main/java/com/adyen/model/marketpayfund/PayoutAccountHolderRequest.java b/src/main/java/com/adyen/model/marketpayfund/PayoutAccountHolderRequest.java new file mode 100644 index 000000000..677b4aa4e --- /dev/null +++ b/src/main/java/com/adyen/model/marketpayfund/PayoutAccountHolderRequest.java @@ -0,0 +1,384 @@ +/* + * Fund API + * This API is used for the classic integration. If you are just starting your implementation, refer to our [new integration guide](https://docs.adyen.com/marketplaces-and-platforms) instead. The Fund API provides endpoints for managing the funds in the accounts on your platform. These management operations include, for example, the transfer of funds from one account to another, the payout of funds to an account holder, and the retrieval of balances in an account. For more information, refer to our [documentation](https://docs.adyen.com/marketplaces-and-platforms/classic/). ## Authentication Your Adyen contact will provide your API credential and an API key. To connect to the API, add an `X-API-Key` header with the API key as the value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: YOUR_API_KEY\" \\ ... ``` Alternatively, you can use the username and password to connect to the API using basic authentication. For example: ``` curl -U \"ws@MarketPlace.YOUR_PLATFORM_ACCOUNT\":\"YOUR_WS_PASSWORD\" \\ -H \"Content-Type: application/json\" \\ ... ``` When going live, you need to generate new web service user credentials to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning The Fund API supports [versioning](https://docs.adyen.com/development-resources/versioning) using a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://cal-test.adyen.com/cal/services/Fund/v6/accountHolderBalance ``` + * + * The version of the OpenAPI document: 6 + * + * + * 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.marketpayfund; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.adyen.model.marketpayfund.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; + + +/** + * PayoutAccountHolderRequest + */ +@JsonPropertyOrder({ + PayoutAccountHolderRequest.JSON_PROPERTY_ACCOUNT_CODE, + PayoutAccountHolderRequest.JSON_PROPERTY_ACCOUNT_HOLDER_CODE, + PayoutAccountHolderRequest.JSON_PROPERTY_AMOUNT, + PayoutAccountHolderRequest.JSON_PROPERTY_BANK_ACCOUNT_U_U_I_D, + PayoutAccountHolderRequest.JSON_PROPERTY_DESCRIPTION, + PayoutAccountHolderRequest.JSON_PROPERTY_MERCHANT_REFERENCE, + PayoutAccountHolderRequest.JSON_PROPERTY_PAYOUT_METHOD_CODE, + PayoutAccountHolderRequest.JSON_PROPERTY_PAYOUT_SPEED +}) + +public class PayoutAccountHolderRequest { + public static final String JSON_PROPERTY_ACCOUNT_CODE = "accountCode"; + private String accountCode; + + public static final String JSON_PROPERTY_ACCOUNT_HOLDER_CODE = "accountHolderCode"; + private String accountHolderCode; + + public static final String JSON_PROPERTY_AMOUNT = "amount"; + private Amount amount; + + public static final String JSON_PROPERTY_BANK_ACCOUNT_U_U_I_D = "bankAccountUUID"; + private String bankAccountUUID; + + public static final String JSON_PROPERTY_DESCRIPTION = "description"; + private String description; + + public static final String JSON_PROPERTY_MERCHANT_REFERENCE = "merchantReference"; + private String merchantReference; + + public static final String JSON_PROPERTY_PAYOUT_METHOD_CODE = "payoutMethodCode"; + private String payoutMethodCode; + + /** + * Speed with which payouts for this account are processed. Permitted values: `STANDARD`, `SAME_DAY`. + */ + public enum PayoutSpeedEnum { + INSTANT("INSTANT"), + + SAME_DAY("SAME_DAY"), + + STANDARD("STANDARD"); + + private String value; + + PayoutSpeedEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static PayoutSpeedEnum fromValue(String value) { + for (PayoutSpeedEnum b : PayoutSpeedEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_PAYOUT_SPEED = "payoutSpeed"; + private PayoutSpeedEnum payoutSpeed = PayoutSpeedEnum.STANDARD; + + public PayoutAccountHolderRequest() { + } + + public PayoutAccountHolderRequest accountCode(String accountCode) { + this.accountCode = accountCode; + return this; + } + + /** + * The code of the account from which the payout is to be made. + * @return accountCode + **/ + @ApiModelProperty(required = true, value = "The code of the account from which the payout is to be made.") + @JsonProperty(JSON_PROPERTY_ACCOUNT_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getAccountCode() { + return accountCode; + } + + + @JsonProperty(JSON_PROPERTY_ACCOUNT_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAccountCode(String accountCode) { + this.accountCode = accountCode; + } + + + public PayoutAccountHolderRequest accountHolderCode(String accountHolderCode) { + this.accountHolderCode = accountHolderCode; + return this; + } + + /** + * The code of the Account Holder who owns the account from which the payout is to be made. The Account Holder is the party to which the payout will be made. + * @return accountHolderCode + **/ + @ApiModelProperty(required = true, value = "The code of the Account Holder who owns the account from which the payout is to be made. The Account Holder is the party to which the payout will be made.") + @JsonProperty(JSON_PROPERTY_ACCOUNT_HOLDER_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getAccountHolderCode() { + return accountHolderCode; + } + + + @JsonProperty(JSON_PROPERTY_ACCOUNT_HOLDER_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAccountHolderCode(String accountHolderCode) { + this.accountHolderCode = accountHolderCode; + } + + + public PayoutAccountHolderRequest amount(Amount amount) { + this.amount = amount; + return this; + } + + /** + * Get amount + * @return amount + **/ + @ApiModelProperty(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 PayoutAccountHolderRequest bankAccountUUID(String bankAccountUUID) { + this.bankAccountUUID = bankAccountUUID; + return this; + } + + /** + * The unique ID of the Bank Account held by the Account Holder to which the payout is to be made. If left blank, a bank account is automatically selected. + * @return bankAccountUUID + **/ + @ApiModelProperty(value = "The unique ID of the Bank Account held by the Account Holder to which the payout is to be made. If left blank, a bank account is automatically selected.") + @JsonProperty(JSON_PROPERTY_BANK_ACCOUNT_U_U_I_D) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getBankAccountUUID() { + return bankAccountUUID; + } + + + @JsonProperty(JSON_PROPERTY_BANK_ACCOUNT_U_U_I_D) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setBankAccountUUID(String bankAccountUUID) { + this.bankAccountUUID = bankAccountUUID; + } + + + public PayoutAccountHolderRequest description(String description) { + this.description = description; + return this; + } + + /** + * A description of the payout. Maximum 200 characters. Allowed: **abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789/?:().,'+ \";** + * @return description + **/ + @ApiModelProperty(value = "A description of the payout. Maximum 200 characters. Allowed: **abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789/?:().,'+ \";**") + @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 PayoutAccountHolderRequest merchantReference(String merchantReference) { + this.merchantReference = merchantReference; + return this; + } + + /** + * A value that can be supplied at the discretion of the executing user in order to link multiple transactions to one another. + * @return merchantReference + **/ + @ApiModelProperty(value = "A value that can be supplied at the discretion of the executing user in order to link multiple transactions to one another.") + @JsonProperty(JSON_PROPERTY_MERCHANT_REFERENCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getMerchantReference() { + return merchantReference; + } + + + @JsonProperty(JSON_PROPERTY_MERCHANT_REFERENCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMerchantReference(String merchantReference) { + this.merchantReference = merchantReference; + } + + + public PayoutAccountHolderRequest payoutMethodCode(String payoutMethodCode) { + this.payoutMethodCode = payoutMethodCode; + return this; + } + + /** + * The unique ID of the payout method held by the Account Holder to which the payout is to be made. If left blank, a payout instrument is automatically selected. + * @return payoutMethodCode + **/ + @ApiModelProperty(value = "The unique ID of the payout method held by the Account Holder to which the payout is to be made. If left blank, a payout instrument is automatically selected.") + @JsonProperty(JSON_PROPERTY_PAYOUT_METHOD_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getPayoutMethodCode() { + return payoutMethodCode; + } + + + @JsonProperty(JSON_PROPERTY_PAYOUT_METHOD_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPayoutMethodCode(String payoutMethodCode) { + this.payoutMethodCode = payoutMethodCode; + } + + + public PayoutAccountHolderRequest payoutSpeed(PayoutSpeedEnum payoutSpeed) { + this.payoutSpeed = payoutSpeed; + return this; + } + + /** + * Speed with which payouts for this account are processed. Permitted values: `STANDARD`, `SAME_DAY`. + * @return payoutSpeed + **/ + @ApiModelProperty(value = "Speed with which payouts for this account are processed. Permitted values: `STANDARD`, `SAME_DAY`.") + @JsonProperty(JSON_PROPERTY_PAYOUT_SPEED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public PayoutSpeedEnum getPayoutSpeed() { + return payoutSpeed; + } + + + @JsonProperty(JSON_PROPERTY_PAYOUT_SPEED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPayoutSpeed(PayoutSpeedEnum payoutSpeed) { + this.payoutSpeed = payoutSpeed; + } + + + /** + * Return true if this PayoutAccountHolderRequest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PayoutAccountHolderRequest payoutAccountHolderRequest = (PayoutAccountHolderRequest) o; + return Objects.equals(this.accountCode, payoutAccountHolderRequest.accountCode) && + Objects.equals(this.accountHolderCode, payoutAccountHolderRequest.accountHolderCode) && + Objects.equals(this.amount, payoutAccountHolderRequest.amount) && + Objects.equals(this.bankAccountUUID, payoutAccountHolderRequest.bankAccountUUID) && + Objects.equals(this.description, payoutAccountHolderRequest.description) && + Objects.equals(this.merchantReference, payoutAccountHolderRequest.merchantReference) && + Objects.equals(this.payoutMethodCode, payoutAccountHolderRequest.payoutMethodCode) && + Objects.equals(this.payoutSpeed, payoutAccountHolderRequest.payoutSpeed); + } + + @Override + public int hashCode() { + return Objects.hash(accountCode, accountHolderCode, amount, bankAccountUUID, description, merchantReference, payoutMethodCode, payoutSpeed); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PayoutAccountHolderRequest {\n"); + sb.append(" accountCode: ").append(toIndentedString(accountCode)).append("\n"); + sb.append(" accountHolderCode: ").append(toIndentedString(accountHolderCode)).append("\n"); + sb.append(" amount: ").append(toIndentedString(amount)).append("\n"); + sb.append(" bankAccountUUID: ").append(toIndentedString(bankAccountUUID)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" merchantReference: ").append(toIndentedString(merchantReference)).append("\n"); + sb.append(" payoutMethodCode: ").append(toIndentedString(payoutMethodCode)).append("\n"); + sb.append(" payoutSpeed: ").append(toIndentedString(payoutSpeed)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line 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 PayoutAccountHolderRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of PayoutAccountHolderRequest + * @throws JsonProcessingException if the JSON string is invalid with respect to PayoutAccountHolderRequest + */ + public static PayoutAccountHolderRequest fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, PayoutAccountHolderRequest.class); + } +/** + * Convert an instance of PayoutAccountHolderRequest 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/marketpayfund/PayoutAccountHolderResponse.java b/src/main/java/com/adyen/model/marketpayfund/PayoutAccountHolderResponse.java new file mode 100644 index 000000000..36c40703f --- /dev/null +++ b/src/main/java/com/adyen/model/marketpayfund/PayoutAccountHolderResponse.java @@ -0,0 +1,332 @@ +/* + * Fund API + * This API is used for the classic integration. If you are just starting your implementation, refer to our [new integration guide](https://docs.adyen.com/marketplaces-and-platforms) instead. The Fund API provides endpoints for managing the funds in the accounts on your platform. These management operations include, for example, the transfer of funds from one account to another, the payout of funds to an account holder, and the retrieval of balances in an account. For more information, refer to our [documentation](https://docs.adyen.com/marketplaces-and-platforms/classic/). ## Authentication Your Adyen contact will provide your API credential and an API key. To connect to the API, add an `X-API-Key` header with the API key as the value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: YOUR_API_KEY\" \\ ... ``` Alternatively, you can use the username and password to connect to the API using basic authentication. For example: ``` curl -U \"ws@MarketPlace.YOUR_PLATFORM_ACCOUNT\":\"YOUR_WS_PASSWORD\" \\ -H \"Content-Type: application/json\" \\ ... ``` When going live, you need to generate new web service user credentials to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning The Fund API supports [versioning](https://docs.adyen.com/development-resources/versioning) using a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://cal-test.adyen.com/cal/services/Fund/v6/accountHolderBalance ``` + * + * The version of the OpenAPI document: 6 + * + * + * 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.marketpayfund; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.adyen.model.marketpayfund.ErrorFieldType; +import com.fasterxml.jackson.annotation.JsonInclude; +import 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; + + +/** + * PayoutAccountHolderResponse + */ +@JsonPropertyOrder({ + PayoutAccountHolderResponse.JSON_PROPERTY_BANK_ACCOUNT_U_U_I_D, + PayoutAccountHolderResponse.JSON_PROPERTY_INVALID_FIELDS, + PayoutAccountHolderResponse.JSON_PROPERTY_MERCHANT_REFERENCE, + PayoutAccountHolderResponse.JSON_PROPERTY_PAYOUT_SPEED, + PayoutAccountHolderResponse.JSON_PROPERTY_PSP_REFERENCE, + PayoutAccountHolderResponse.JSON_PROPERTY_RESULT_CODE +}) + +public class PayoutAccountHolderResponse { + public static final String JSON_PROPERTY_BANK_ACCOUNT_U_U_I_D = "bankAccountUUID"; + private String bankAccountUUID; + + public static final String JSON_PROPERTY_INVALID_FIELDS = "invalidFields"; + private List invalidFields = null; + + public static final String JSON_PROPERTY_MERCHANT_REFERENCE = "merchantReference"; + private String merchantReference; + + /** + * Speed with which payouts for this account are processed. Permitted values: `STANDARD`, `SAME_DAY`. + */ + public enum PayoutSpeedEnum { + INSTANT("INSTANT"), + + SAME_DAY("SAME_DAY"), + + STANDARD("STANDARD"); + + private String value; + + PayoutSpeedEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static PayoutSpeedEnum fromValue(String value) { + for (PayoutSpeedEnum b : PayoutSpeedEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_PAYOUT_SPEED = "payoutSpeed"; + private PayoutSpeedEnum payoutSpeed = PayoutSpeedEnum.STANDARD; + + public static final String JSON_PROPERTY_PSP_REFERENCE = "pspReference"; + private String pspReference; + + public static final String JSON_PROPERTY_RESULT_CODE = "resultCode"; + private String resultCode; + + public PayoutAccountHolderResponse() { + } + + public PayoutAccountHolderResponse bankAccountUUID(String bankAccountUUID) { + this.bankAccountUUID = bankAccountUUID; + return this; + } + + /** + * The unique ID of the Bank Account to which the payout was made. + * @return bankAccountUUID + **/ + @ApiModelProperty(value = "The unique ID of the Bank Account to which the payout was made.") + @JsonProperty(JSON_PROPERTY_BANK_ACCOUNT_U_U_I_D) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getBankAccountUUID() { + return bankAccountUUID; + } + + + @JsonProperty(JSON_PROPERTY_BANK_ACCOUNT_U_U_I_D) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setBankAccountUUID(String bankAccountUUID) { + this.bankAccountUUID = bankAccountUUID; + } + + + public PayoutAccountHolderResponse invalidFields(List invalidFields) { + this.invalidFields = invalidFields; + return this; + } + + public PayoutAccountHolderResponse addInvalidFieldsItem(ErrorFieldType invalidFieldsItem) { + if (this.invalidFields == null) { + this.invalidFields = new ArrayList<>(); + } + this.invalidFields.add(invalidFieldsItem); + return this; + } + + /** + * Contains field validation errors that would prevent requests from being processed. + * @return invalidFields + **/ + @ApiModelProperty(value = "Contains field validation errors that would prevent requests from being processed.") + @JsonProperty(JSON_PROPERTY_INVALID_FIELDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getInvalidFields() { + return invalidFields; + } + + + @JsonProperty(JSON_PROPERTY_INVALID_FIELDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setInvalidFields(List invalidFields) { + this.invalidFields = invalidFields; + } + + + public PayoutAccountHolderResponse merchantReference(String merchantReference) { + this.merchantReference = merchantReference; + return this; + } + + /** + * The value supplied by the executing user when initiating the transfer; may be used to link multiple transactions. + * @return merchantReference + **/ + @ApiModelProperty(value = "The value supplied by the executing user when initiating the transfer; may be used to link multiple transactions.") + @JsonProperty(JSON_PROPERTY_MERCHANT_REFERENCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getMerchantReference() { + return merchantReference; + } + + + @JsonProperty(JSON_PROPERTY_MERCHANT_REFERENCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMerchantReference(String merchantReference) { + this.merchantReference = merchantReference; + } + + + public PayoutAccountHolderResponse payoutSpeed(PayoutSpeedEnum payoutSpeed) { + this.payoutSpeed = payoutSpeed; + return this; + } + + /** + * Speed with which payouts for this account are processed. Permitted values: `STANDARD`, `SAME_DAY`. + * @return payoutSpeed + **/ + @ApiModelProperty(value = "Speed with which payouts for this account are processed. Permitted values: `STANDARD`, `SAME_DAY`.") + @JsonProperty(JSON_PROPERTY_PAYOUT_SPEED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public PayoutSpeedEnum getPayoutSpeed() { + return payoutSpeed; + } + + + @JsonProperty(JSON_PROPERTY_PAYOUT_SPEED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPayoutSpeed(PayoutSpeedEnum payoutSpeed) { + this.payoutSpeed = payoutSpeed; + } + + + public PayoutAccountHolderResponse pspReference(String pspReference) { + this.pspReference = pspReference; + return this; + } + + /** + * The reference of a request. Can be used to uniquely identify the request. + * @return pspReference + **/ + @ApiModelProperty(value = "The reference of a request. Can be used to uniquely identify the request.") + @JsonProperty(JSON_PROPERTY_PSP_REFERENCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getPspReference() { + return pspReference; + } + + + @JsonProperty(JSON_PROPERTY_PSP_REFERENCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPspReference(String pspReference) { + this.pspReference = pspReference; + } + + + public PayoutAccountHolderResponse resultCode(String resultCode) { + this.resultCode = resultCode; + return this; + } + + /** + * The result code. + * @return resultCode + **/ + @ApiModelProperty(value = "The result code.") + @JsonProperty(JSON_PROPERTY_RESULT_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getResultCode() { + return resultCode; + } + + + @JsonProperty(JSON_PROPERTY_RESULT_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setResultCode(String resultCode) { + this.resultCode = resultCode; + } + + + /** + * Return true if this PayoutAccountHolderResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PayoutAccountHolderResponse payoutAccountHolderResponse = (PayoutAccountHolderResponse) o; + return Objects.equals(this.bankAccountUUID, payoutAccountHolderResponse.bankAccountUUID) && + Objects.equals(this.invalidFields, payoutAccountHolderResponse.invalidFields) && + Objects.equals(this.merchantReference, payoutAccountHolderResponse.merchantReference) && + Objects.equals(this.payoutSpeed, payoutAccountHolderResponse.payoutSpeed) && + Objects.equals(this.pspReference, payoutAccountHolderResponse.pspReference) && + Objects.equals(this.resultCode, payoutAccountHolderResponse.resultCode); + } + + @Override + public int hashCode() { + return Objects.hash(bankAccountUUID, invalidFields, merchantReference, payoutSpeed, pspReference, resultCode); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PayoutAccountHolderResponse {\n"); + sb.append(" bankAccountUUID: ").append(toIndentedString(bankAccountUUID)).append("\n"); + sb.append(" invalidFields: ").append(toIndentedString(invalidFields)).append("\n"); + sb.append(" merchantReference: ").append(toIndentedString(merchantReference)).append("\n"); + sb.append(" payoutSpeed: ").append(toIndentedString(payoutSpeed)).append("\n"); + sb.append(" pspReference: ").append(toIndentedString(pspReference)).append("\n"); + sb.append(" resultCode: ").append(toIndentedString(resultCode)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line 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 PayoutAccountHolderResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of PayoutAccountHolderResponse + * @throws JsonProcessingException if the JSON string is invalid with respect to PayoutAccountHolderResponse + */ + public static PayoutAccountHolderResponse fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, PayoutAccountHolderResponse.class); + } +/** + * Convert an instance of PayoutAccountHolderResponse 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/marketpayfund/RefundFundsTransferRequest.java b/src/main/java/com/adyen/model/marketpayfund/RefundFundsTransferRequest.java new file mode 100644 index 000000000..856f0cb59 --- /dev/null +++ b/src/main/java/com/adyen/model/marketpayfund/RefundFundsTransferRequest.java @@ -0,0 +1,192 @@ +/* + * Fund API + * This API is used for the classic integration. If you are just starting your implementation, refer to our [new integration guide](https://docs.adyen.com/marketplaces-and-platforms) instead. The Fund API provides endpoints for managing the funds in the accounts on your platform. These management operations include, for example, the transfer of funds from one account to another, the payout of funds to an account holder, and the retrieval of balances in an account. For more information, refer to our [documentation](https://docs.adyen.com/marketplaces-and-platforms/classic/). ## Authentication Your Adyen contact will provide your API credential and an API key. To connect to the API, add an `X-API-Key` header with the API key as the value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: YOUR_API_KEY\" \\ ... ``` Alternatively, you can use the username and password to connect to the API using basic authentication. For example: ``` curl -U \"ws@MarketPlace.YOUR_PLATFORM_ACCOUNT\":\"YOUR_WS_PASSWORD\" \\ -H \"Content-Type: application/json\" \\ ... ``` When going live, you need to generate new web service user credentials to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning The Fund API supports [versioning](https://docs.adyen.com/development-resources/versioning) using a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://cal-test.adyen.com/cal/services/Fund/v6/accountHolderBalance ``` + * + * The version of the OpenAPI document: 6 + * + * + * 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.marketpayfund; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.adyen.model.marketpayfund.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; + + +/** + * RefundFundsTransferRequest + */ +@JsonPropertyOrder({ + RefundFundsTransferRequest.JSON_PROPERTY_AMOUNT, + RefundFundsTransferRequest.JSON_PROPERTY_MERCHANT_REFERENCE, + RefundFundsTransferRequest.JSON_PROPERTY_ORIGINAL_REFERENCE +}) + +public class RefundFundsTransferRequest { + public static final String JSON_PROPERTY_AMOUNT = "amount"; + private Amount amount; + + public static final String JSON_PROPERTY_MERCHANT_REFERENCE = "merchantReference"; + private String merchantReference; + + public static final String JSON_PROPERTY_ORIGINAL_REFERENCE = "originalReference"; + private String originalReference; + + public RefundFundsTransferRequest() { + } + + public RefundFundsTransferRequest 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 RefundFundsTransferRequest merchantReference(String merchantReference) { + this.merchantReference = merchantReference; + return this; + } + + /** + * A value that can be supplied at the discretion of the executing user in order to link multiple transactions to one another. + * @return merchantReference + **/ + @ApiModelProperty(value = "A value that can be supplied at the discretion of the executing user in order to link multiple transactions to one another.") + @JsonProperty(JSON_PROPERTY_MERCHANT_REFERENCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getMerchantReference() { + return merchantReference; + } + + + @JsonProperty(JSON_PROPERTY_MERCHANT_REFERENCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMerchantReference(String merchantReference) { + this.merchantReference = merchantReference; + } + + + public RefundFundsTransferRequest originalReference(String originalReference) { + this.originalReference = originalReference; + return this; + } + + /** + * A PSP reference of the original fund transfer. + * @return originalReference + **/ + @ApiModelProperty(required = true, value = "A PSP reference of the original fund transfer.") + @JsonProperty(JSON_PROPERTY_ORIGINAL_REFERENCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getOriginalReference() { + return originalReference; + } + + + @JsonProperty(JSON_PROPERTY_ORIGINAL_REFERENCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setOriginalReference(String originalReference) { + this.originalReference = originalReference; + } + + + /** + * Return true if this RefundFundsTransferRequest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RefundFundsTransferRequest refundFundsTransferRequest = (RefundFundsTransferRequest) o; + return Objects.equals(this.amount, refundFundsTransferRequest.amount) && + Objects.equals(this.merchantReference, refundFundsTransferRequest.merchantReference) && + Objects.equals(this.originalReference, refundFundsTransferRequest.originalReference); + } + + @Override + public int hashCode() { + return Objects.hash(amount, merchantReference, originalReference); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RefundFundsTransferRequest {\n"); + sb.append(" amount: ").append(toIndentedString(amount)).append("\n"); + sb.append(" merchantReference: ").append(toIndentedString(merchantReference)).append("\n"); + sb.append(" originalReference: ").append(toIndentedString(originalReference)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line 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 RefundFundsTransferRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of RefundFundsTransferRequest + * @throws JsonProcessingException if the JSON string is invalid with respect to RefundFundsTransferRequest + */ + public static RefundFundsTransferRequest fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, RefundFundsTransferRequest.class); + } +/** + * Convert an instance of RefundFundsTransferRequest 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/marketpayfund/RefundFundsTransferResponse.java b/src/main/java/com/adyen/model/marketpayfund/RefundFundsTransferResponse.java new file mode 100644 index 000000000..20e8abca8 --- /dev/null +++ b/src/main/java/com/adyen/model/marketpayfund/RefundFundsTransferResponse.java @@ -0,0 +1,295 @@ +/* + * Fund API + * This API is used for the classic integration. If you are just starting your implementation, refer to our [new integration guide](https://docs.adyen.com/marketplaces-and-platforms) instead. The Fund API provides endpoints for managing the funds in the accounts on your platform. These management operations include, for example, the transfer of funds from one account to another, the payout of funds to an account holder, and the retrieval of balances in an account. For more information, refer to our [documentation](https://docs.adyen.com/marketplaces-and-platforms/classic/). ## Authentication Your Adyen contact will provide your API credential and an API key. To connect to the API, add an `X-API-Key` header with the API key as the value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: YOUR_API_KEY\" \\ ... ``` Alternatively, you can use the username and password to connect to the API using basic authentication. For example: ``` curl -U \"ws@MarketPlace.YOUR_PLATFORM_ACCOUNT\":\"YOUR_WS_PASSWORD\" \\ -H \"Content-Type: application/json\" \\ ... ``` When going live, you need to generate new web service user credentials to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning The Fund API supports [versioning](https://docs.adyen.com/development-resources/versioning) using a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://cal-test.adyen.com/cal/services/Fund/v6/accountHolderBalance ``` + * + * The version of the OpenAPI document: 6 + * + * + * 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.marketpayfund; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.adyen.model.marketpayfund.ErrorFieldType; +import com.fasterxml.jackson.annotation.JsonInclude; +import 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; + + +/** + * RefundFundsTransferResponse + */ +@JsonPropertyOrder({ + RefundFundsTransferResponse.JSON_PROPERTY_INVALID_FIELDS, + RefundFundsTransferResponse.JSON_PROPERTY_MERCHANT_REFERENCE, + RefundFundsTransferResponse.JSON_PROPERTY_MESSAGE, + RefundFundsTransferResponse.JSON_PROPERTY_ORIGINAL_REFERENCE, + RefundFundsTransferResponse.JSON_PROPERTY_PSP_REFERENCE, + RefundFundsTransferResponse.JSON_PROPERTY_RESULT_CODE +}) + +public class RefundFundsTransferResponse { + public static final String JSON_PROPERTY_INVALID_FIELDS = "invalidFields"; + private List invalidFields = null; + + public static final String JSON_PROPERTY_MERCHANT_REFERENCE = "merchantReference"; + private String merchantReference; + + public static final String JSON_PROPERTY_MESSAGE = "message"; + private String message; + + public static final String JSON_PROPERTY_ORIGINAL_REFERENCE = "originalReference"; + private String originalReference; + + public static final String JSON_PROPERTY_PSP_REFERENCE = "pspReference"; + private String pspReference; + + public static final String JSON_PROPERTY_RESULT_CODE = "resultCode"; + private String resultCode; + + public RefundFundsTransferResponse() { + } + + public RefundFundsTransferResponse invalidFields(List invalidFields) { + this.invalidFields = invalidFields; + return this; + } + + public RefundFundsTransferResponse addInvalidFieldsItem(ErrorFieldType invalidFieldsItem) { + if (this.invalidFields == null) { + this.invalidFields = new ArrayList<>(); + } + this.invalidFields.add(invalidFieldsItem); + return this; + } + + /** + * Contains field validation errors that would prevent requests from being processed. + * @return invalidFields + **/ + @ApiModelProperty(value = "Contains field validation errors that would prevent requests from being processed.") + @JsonProperty(JSON_PROPERTY_INVALID_FIELDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getInvalidFields() { + return invalidFields; + } + + + @JsonProperty(JSON_PROPERTY_INVALID_FIELDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setInvalidFields(List invalidFields) { + this.invalidFields = invalidFields; + } + + + public RefundFundsTransferResponse merchantReference(String merchantReference) { + this.merchantReference = merchantReference; + return this; + } + + /** + * The value supplied by the executing user when initiating the transfer refund; may be used to link multiple transactions. + * @return merchantReference + **/ + @ApiModelProperty(value = "The value supplied by the executing user when initiating the transfer refund; may be used to link multiple transactions.") + @JsonProperty(JSON_PROPERTY_MERCHANT_REFERENCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getMerchantReference() { + return merchantReference; + } + + + @JsonProperty(JSON_PROPERTY_MERCHANT_REFERENCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMerchantReference(String merchantReference) { + this.merchantReference = merchantReference; + } + + + public RefundFundsTransferResponse message(String message) { + this.message = message; + return this; + } + + /** + * The message of the response. + * @return message + **/ + @ApiModelProperty(value = "The message of the response.") + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getMessage() { + return message; + } + + + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMessage(String message) { + this.message = message; + } + + + public RefundFundsTransferResponse originalReference(String originalReference) { + this.originalReference = originalReference; + return this; + } + + /** + * A PSP reference of the original fund transfer. + * @return originalReference + **/ + @ApiModelProperty(value = "A PSP reference of the original fund transfer.") + @JsonProperty(JSON_PROPERTY_ORIGINAL_REFERENCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getOriginalReference() { + return originalReference; + } + + + @JsonProperty(JSON_PROPERTY_ORIGINAL_REFERENCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setOriginalReference(String originalReference) { + this.originalReference = originalReference; + } + + + public RefundFundsTransferResponse pspReference(String pspReference) { + this.pspReference = pspReference; + return this; + } + + /** + * The reference of a request. Can be used to uniquely identify the request. + * @return pspReference + **/ + @ApiModelProperty(value = "The reference of a request. Can be used to uniquely identify the request.") + @JsonProperty(JSON_PROPERTY_PSP_REFERENCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getPspReference() { + return pspReference; + } + + + @JsonProperty(JSON_PROPERTY_PSP_REFERENCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPspReference(String pspReference) { + this.pspReference = pspReference; + } + + + public RefundFundsTransferResponse resultCode(String resultCode) { + this.resultCode = resultCode; + return this; + } + + /** + * The result code. + * @return resultCode + **/ + @ApiModelProperty(value = "The result code.") + @JsonProperty(JSON_PROPERTY_RESULT_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getResultCode() { + return resultCode; + } + + + @JsonProperty(JSON_PROPERTY_RESULT_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setResultCode(String resultCode) { + this.resultCode = resultCode; + } + + + /** + * Return true if this RefundFundsTransferResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RefundFundsTransferResponse refundFundsTransferResponse = (RefundFundsTransferResponse) o; + return Objects.equals(this.invalidFields, refundFundsTransferResponse.invalidFields) && + Objects.equals(this.merchantReference, refundFundsTransferResponse.merchantReference) && + Objects.equals(this.message, refundFundsTransferResponse.message) && + Objects.equals(this.originalReference, refundFundsTransferResponse.originalReference) && + Objects.equals(this.pspReference, refundFundsTransferResponse.pspReference) && + Objects.equals(this.resultCode, refundFundsTransferResponse.resultCode); + } + + @Override + public int hashCode() { + return Objects.hash(invalidFields, merchantReference, message, originalReference, pspReference, resultCode); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RefundFundsTransferResponse {\n"); + sb.append(" invalidFields: ").append(toIndentedString(invalidFields)).append("\n"); + sb.append(" merchantReference: ").append(toIndentedString(merchantReference)).append("\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append(" originalReference: ").append(toIndentedString(originalReference)).append("\n"); + sb.append(" pspReference: ").append(toIndentedString(pspReference)).append("\n"); + sb.append(" resultCode: ").append(toIndentedString(resultCode)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line 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 RefundFundsTransferResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of RefundFundsTransferResponse + * @throws JsonProcessingException if the JSON string is invalid with respect to RefundFundsTransferResponse + */ + public static RefundFundsTransferResponse fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, RefundFundsTransferResponse.class); + } +/** + * Convert an instance of RefundFundsTransferResponse 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/marketpayfund/RefundNotPaidOutTransfersRequest.java b/src/main/java/com/adyen/model/marketpayfund/RefundNotPaidOutTransfersRequest.java new file mode 100644 index 000000000..a603b2ed4 --- /dev/null +++ b/src/main/java/com/adyen/model/marketpayfund/RefundNotPaidOutTransfersRequest.java @@ -0,0 +1,160 @@ +/* + * Fund API + * This API is used for the classic integration. If you are just starting your implementation, refer to our [new integration guide](https://docs.adyen.com/marketplaces-and-platforms) instead. The Fund API provides endpoints for managing the funds in the accounts on your platform. These management operations include, for example, the transfer of funds from one account to another, the payout of funds to an account holder, and the retrieval of balances in an account. For more information, refer to our [documentation](https://docs.adyen.com/marketplaces-and-platforms/classic/). ## Authentication Your Adyen contact will provide your API credential and an API key. To connect to the API, add an `X-API-Key` header with the API key as the value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: YOUR_API_KEY\" \\ ... ``` Alternatively, you can use the username and password to connect to the API using basic authentication. For example: ``` curl -U \"ws@MarketPlace.YOUR_PLATFORM_ACCOUNT\":\"YOUR_WS_PASSWORD\" \\ -H \"Content-Type: application/json\" \\ ... ``` When going live, you need to generate new web service user credentials to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning The Fund API supports [versioning](https://docs.adyen.com/development-resources/versioning) using a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://cal-test.adyen.com/cal/services/Fund/v6/accountHolderBalance ``` + * + * The version of the OpenAPI document: 6 + * + * + * 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.marketpayfund; + +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; + + +/** + * RefundNotPaidOutTransfersRequest + */ +@JsonPropertyOrder({ + RefundNotPaidOutTransfersRequest.JSON_PROPERTY_ACCOUNT_CODE, + RefundNotPaidOutTransfersRequest.JSON_PROPERTY_ACCOUNT_HOLDER_CODE +}) + +public class RefundNotPaidOutTransfersRequest { + public static final String JSON_PROPERTY_ACCOUNT_CODE = "accountCode"; + private String accountCode; + + public static final String JSON_PROPERTY_ACCOUNT_HOLDER_CODE = "accountHolderCode"; + private String accountHolderCode; + + public RefundNotPaidOutTransfersRequest() { + } + + public RefundNotPaidOutTransfersRequest accountCode(String accountCode) { + this.accountCode = accountCode; + return this; + } + + /** + * The code of the account from which to perform the refund(s). + * @return accountCode + **/ + @ApiModelProperty(required = true, value = "The code of the account from which to perform the refund(s).") + @JsonProperty(JSON_PROPERTY_ACCOUNT_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getAccountCode() { + return accountCode; + } + + + @JsonProperty(JSON_PROPERTY_ACCOUNT_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAccountCode(String accountCode) { + this.accountCode = accountCode; + } + + + public RefundNotPaidOutTransfersRequest accountHolderCode(String accountHolderCode) { + this.accountHolderCode = accountHolderCode; + return this; + } + + /** + * The code of the Account Holder which owns the account from which to perform the refund(s). + * @return accountHolderCode + **/ + @ApiModelProperty(required = true, value = "The code of the Account Holder which owns the account from which to perform the refund(s).") + @JsonProperty(JSON_PROPERTY_ACCOUNT_HOLDER_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getAccountHolderCode() { + return accountHolderCode; + } + + + @JsonProperty(JSON_PROPERTY_ACCOUNT_HOLDER_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAccountHolderCode(String accountHolderCode) { + this.accountHolderCode = accountHolderCode; + } + + + /** + * Return true if this RefundNotPaidOutTransfersRequest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RefundNotPaidOutTransfersRequest refundNotPaidOutTransfersRequest = (RefundNotPaidOutTransfersRequest) o; + return Objects.equals(this.accountCode, refundNotPaidOutTransfersRequest.accountCode) && + Objects.equals(this.accountHolderCode, refundNotPaidOutTransfersRequest.accountHolderCode); + } + + @Override + public int hashCode() { + return Objects.hash(accountCode, accountHolderCode); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RefundNotPaidOutTransfersRequest {\n"); + sb.append(" accountCode: ").append(toIndentedString(accountCode)).append("\n"); + sb.append(" accountHolderCode: ").append(toIndentedString(accountHolderCode)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line 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 RefundNotPaidOutTransfersRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of RefundNotPaidOutTransfersRequest + * @throws JsonProcessingException if the JSON string is invalid with respect to RefundNotPaidOutTransfersRequest + */ + public static RefundNotPaidOutTransfersRequest fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, RefundNotPaidOutTransfersRequest.class); + } +/** + * Convert an instance of RefundNotPaidOutTransfersRequest 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/marketpayfund/RefundNotPaidOutTransfersResponse.java b/src/main/java/com/adyen/model/marketpayfund/RefundNotPaidOutTransfersResponse.java new file mode 100644 index 000000000..0fda7d1e6 --- /dev/null +++ b/src/main/java/com/adyen/model/marketpayfund/RefundNotPaidOutTransfersResponse.java @@ -0,0 +1,202 @@ +/* + * Fund API + * This API is used for the classic integration. If you are just starting your implementation, refer to our [new integration guide](https://docs.adyen.com/marketplaces-and-platforms) instead. The Fund API provides endpoints for managing the funds in the accounts on your platform. These management operations include, for example, the transfer of funds from one account to another, the payout of funds to an account holder, and the retrieval of balances in an account. For more information, refer to our [documentation](https://docs.adyen.com/marketplaces-and-platforms/classic/). ## Authentication Your Adyen contact will provide your API credential and an API key. To connect to the API, add an `X-API-Key` header with the API key as the value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: YOUR_API_KEY\" \\ ... ``` Alternatively, you can use the username and password to connect to the API using basic authentication. For example: ``` curl -U \"ws@MarketPlace.YOUR_PLATFORM_ACCOUNT\":\"YOUR_WS_PASSWORD\" \\ -H \"Content-Type: application/json\" \\ ... ``` When going live, you need to generate new web service user credentials to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning The Fund API supports [versioning](https://docs.adyen.com/development-resources/versioning) using a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://cal-test.adyen.com/cal/services/Fund/v6/accountHolderBalance ``` + * + * The version of the OpenAPI document: 6 + * + * + * 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.marketpayfund; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.adyen.model.marketpayfund.ErrorFieldType; +import com.fasterxml.jackson.annotation.JsonInclude; +import 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; + + +/** + * RefundNotPaidOutTransfersResponse + */ +@JsonPropertyOrder({ + RefundNotPaidOutTransfersResponse.JSON_PROPERTY_INVALID_FIELDS, + RefundNotPaidOutTransfersResponse.JSON_PROPERTY_PSP_REFERENCE, + RefundNotPaidOutTransfersResponse.JSON_PROPERTY_RESULT_CODE +}) + +public class RefundNotPaidOutTransfersResponse { + public static final String JSON_PROPERTY_INVALID_FIELDS = "invalidFields"; + private List invalidFields = null; + + public static final String JSON_PROPERTY_PSP_REFERENCE = "pspReference"; + private String pspReference; + + public static final String JSON_PROPERTY_RESULT_CODE = "resultCode"; + private String resultCode; + + public RefundNotPaidOutTransfersResponse() { + } + + public RefundNotPaidOutTransfersResponse invalidFields(List invalidFields) { + this.invalidFields = invalidFields; + return this; + } + + public RefundNotPaidOutTransfersResponse addInvalidFieldsItem(ErrorFieldType invalidFieldsItem) { + if (this.invalidFields == null) { + this.invalidFields = new ArrayList<>(); + } + this.invalidFields.add(invalidFieldsItem); + return this; + } + + /** + * Contains field validation errors that would prevent requests from being processed. + * @return invalidFields + **/ + @ApiModelProperty(value = "Contains field validation errors that would prevent requests from being processed.") + @JsonProperty(JSON_PROPERTY_INVALID_FIELDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getInvalidFields() { + return invalidFields; + } + + + @JsonProperty(JSON_PROPERTY_INVALID_FIELDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setInvalidFields(List invalidFields) { + this.invalidFields = invalidFields; + } + + + public RefundNotPaidOutTransfersResponse pspReference(String pspReference) { + this.pspReference = pspReference; + return this; + } + + /** + * The reference of a request. Can be used to uniquely identify the request. + * @return pspReference + **/ + @ApiModelProperty(value = "The reference of a request. Can be used to uniquely identify the request.") + @JsonProperty(JSON_PROPERTY_PSP_REFERENCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getPspReference() { + return pspReference; + } + + + @JsonProperty(JSON_PROPERTY_PSP_REFERENCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPspReference(String pspReference) { + this.pspReference = pspReference; + } + + + public RefundNotPaidOutTransfersResponse resultCode(String resultCode) { + this.resultCode = resultCode; + return this; + } + + /** + * The result code. + * @return resultCode + **/ + @ApiModelProperty(value = "The result code.") + @JsonProperty(JSON_PROPERTY_RESULT_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getResultCode() { + return resultCode; + } + + + @JsonProperty(JSON_PROPERTY_RESULT_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setResultCode(String resultCode) { + this.resultCode = resultCode; + } + + + /** + * Return true if this RefundNotPaidOutTransfersResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RefundNotPaidOutTransfersResponse refundNotPaidOutTransfersResponse = (RefundNotPaidOutTransfersResponse) o; + return Objects.equals(this.invalidFields, refundNotPaidOutTransfersResponse.invalidFields) && + Objects.equals(this.pspReference, refundNotPaidOutTransfersResponse.pspReference) && + Objects.equals(this.resultCode, refundNotPaidOutTransfersResponse.resultCode); + } + + @Override + public int hashCode() { + return Objects.hash(invalidFields, pspReference, resultCode); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RefundNotPaidOutTransfersResponse {\n"); + sb.append(" invalidFields: ").append(toIndentedString(invalidFields)).append("\n"); + sb.append(" pspReference: ").append(toIndentedString(pspReference)).append("\n"); + sb.append(" resultCode: ").append(toIndentedString(resultCode)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line 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 RefundNotPaidOutTransfersResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of RefundNotPaidOutTransfersResponse + * @throws JsonProcessingException if the JSON string is invalid with respect to RefundNotPaidOutTransfersResponse + */ + public static RefundNotPaidOutTransfersResponse fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, RefundNotPaidOutTransfersResponse.class); + } +/** + * Convert an instance of RefundNotPaidOutTransfersResponse 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/marketpayfund/ServiceError.java b/src/main/java/com/adyen/model/marketpayfund/ServiceError.java new file mode 100644 index 000000000..bd5927470 --- /dev/null +++ b/src/main/java/com/adyen/model/marketpayfund/ServiceError.java @@ -0,0 +1,253 @@ +/* + * Fund API + * This API is used for the classic integration. If you are just starting your implementation, refer to our [new integration guide](https://docs.adyen.com/marketplaces-and-platforms) instead. The Fund API provides endpoints for managing the funds in the accounts on your platform. These management operations include, for example, the transfer of funds from one account to another, the payout of funds to an account holder, and the retrieval of balances in an account. For more information, refer to our [documentation](https://docs.adyen.com/marketplaces-and-platforms/classic/). ## Authentication Your Adyen contact will provide your API credential and an API key. To connect to the API, add an `X-API-Key` header with the API key as the value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: YOUR_API_KEY\" \\ ... ``` Alternatively, you can use the username and password to connect to the API using basic authentication. For example: ``` curl -U \"ws@MarketPlace.YOUR_PLATFORM_ACCOUNT\":\"YOUR_WS_PASSWORD\" \\ -H \"Content-Type: application/json\" \\ ... ``` When going live, you need to generate new web service user credentials to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning The Fund API supports [versioning](https://docs.adyen.com/development-resources/versioning) using a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://cal-test.adyen.com/cal/services/Fund/v6/accountHolderBalance ``` + * + * The version of the OpenAPI document: 6 + * + * + * 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.marketpayfund; + +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; + + +/** + * ServiceError + */ +@JsonPropertyOrder({ + ServiceError.JSON_PROPERTY_ERROR_CODE, + ServiceError.JSON_PROPERTY_ERROR_TYPE, + ServiceError.JSON_PROPERTY_MESSAGE, + ServiceError.JSON_PROPERTY_PSP_REFERENCE, + ServiceError.JSON_PROPERTY_STATUS +}) + +public class ServiceError { + public static final String JSON_PROPERTY_ERROR_CODE = "errorCode"; + private String errorCode; + + public static final String JSON_PROPERTY_ERROR_TYPE = "errorType"; + private String errorType; + + public static final String JSON_PROPERTY_MESSAGE = "message"; + private String message; + + public static final String JSON_PROPERTY_PSP_REFERENCE = "pspReference"; + private String pspReference; + + public static final String JSON_PROPERTY_STATUS = "status"; + private Integer status; + + public ServiceError() { + } + + public ServiceError errorCode(String errorCode) { + this.errorCode = errorCode; + return this; + } + + /** + * The error code mapped to the error message. + * @return errorCode + **/ + @ApiModelProperty(value = "The error code mapped to the error message.") + @JsonProperty(JSON_PROPERTY_ERROR_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getErrorCode() { + return errorCode; + } + + + @JsonProperty(JSON_PROPERTY_ERROR_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setErrorCode(String errorCode) { + this.errorCode = errorCode; + } + + + public ServiceError errorType(String errorType) { + this.errorType = errorType; + return this; + } + + /** + * The category of the error. + * @return errorType + **/ + @ApiModelProperty(value = "The category of the error.") + @JsonProperty(JSON_PROPERTY_ERROR_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getErrorType() { + return errorType; + } + + + @JsonProperty(JSON_PROPERTY_ERROR_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setErrorType(String errorType) { + this.errorType = errorType; + } + + + public ServiceError message(String message) { + this.message = message; + return this; + } + + /** + * A short explanation of the issue. + * @return message + **/ + @ApiModelProperty(value = "A short explanation of the issue.") + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getMessage() { + return message; + } + + + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMessage(String message) { + this.message = message; + } + + + public ServiceError pspReference(String pspReference) { + this.pspReference = pspReference; + return this; + } + + /** + * The PSP reference of the payment. + * @return pspReference + **/ + @ApiModelProperty(value = "The PSP reference of the payment.") + @JsonProperty(JSON_PROPERTY_PSP_REFERENCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getPspReference() { + return pspReference; + } + + + @JsonProperty(JSON_PROPERTY_PSP_REFERENCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPspReference(String pspReference) { + this.pspReference = pspReference; + } + + + public ServiceError status(Integer status) { + this.status = status; + return this; + } + + /** + * The HTTP response status. + * @return status + **/ + @ApiModelProperty(value = "The HTTP response status.") + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Integer getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setStatus(Integer status) { + this.status = status; + } + + + /** + * Return true if this ServiceError object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ServiceError serviceError = (ServiceError) o; + return Objects.equals(this.errorCode, serviceError.errorCode) && + Objects.equals(this.errorType, serviceError.errorType) && + Objects.equals(this.message, serviceError.message) && + Objects.equals(this.pspReference, serviceError.pspReference) && + Objects.equals(this.status, serviceError.status); + } + + @Override + public int hashCode() { + return Objects.hash(errorCode, errorType, message, pspReference, status); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ServiceError {\n"); + sb.append(" errorCode: ").append(toIndentedString(errorCode)).append("\n"); + sb.append(" errorType: ").append(toIndentedString(errorType)).append("\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append(" pspReference: ").append(toIndentedString(pspReference)).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 ServiceError given an JSON string + * + * @param jsonString JSON string + * @return An instance of ServiceError + * @throws JsonProcessingException if the JSON string is invalid with respect to ServiceError + */ + public static ServiceError fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, ServiceError.class); + } +/** + * Convert an instance of ServiceError 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/marketpayfund/SetupBeneficiaryRequest.java b/src/main/java/com/adyen/model/marketpayfund/SetupBeneficiaryRequest.java new file mode 100644 index 000000000..187ef463f --- /dev/null +++ b/src/main/java/com/adyen/model/marketpayfund/SetupBeneficiaryRequest.java @@ -0,0 +1,191 @@ +/* + * Fund API + * This API is used for the classic integration. If you are just starting your implementation, refer to our [new integration guide](https://docs.adyen.com/marketplaces-and-platforms) instead. The Fund API provides endpoints for managing the funds in the accounts on your platform. These management operations include, for example, the transfer of funds from one account to another, the payout of funds to an account holder, and the retrieval of balances in an account. For more information, refer to our [documentation](https://docs.adyen.com/marketplaces-and-platforms/classic/). ## Authentication Your Adyen contact will provide your API credential and an API key. To connect to the API, add an `X-API-Key` header with the API key as the value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: YOUR_API_KEY\" \\ ... ``` Alternatively, you can use the username and password to connect to the API using basic authentication. For example: ``` curl -U \"ws@MarketPlace.YOUR_PLATFORM_ACCOUNT\":\"YOUR_WS_PASSWORD\" \\ -H \"Content-Type: application/json\" \\ ... ``` When going live, you need to generate new web service user credentials to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning The Fund API supports [versioning](https://docs.adyen.com/development-resources/versioning) using a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://cal-test.adyen.com/cal/services/Fund/v6/accountHolderBalance ``` + * + * The version of the OpenAPI document: 6 + * + * + * 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.marketpayfund; + +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; + + +/** + * SetupBeneficiaryRequest + */ +@JsonPropertyOrder({ + SetupBeneficiaryRequest.JSON_PROPERTY_DESTINATION_ACCOUNT_CODE, + SetupBeneficiaryRequest.JSON_PROPERTY_MERCHANT_REFERENCE, + SetupBeneficiaryRequest.JSON_PROPERTY_SOURCE_ACCOUNT_CODE +}) + +public class SetupBeneficiaryRequest { + public static final String JSON_PROPERTY_DESTINATION_ACCOUNT_CODE = "destinationAccountCode"; + private String destinationAccountCode; + + public static final String JSON_PROPERTY_MERCHANT_REFERENCE = "merchantReference"; + private String merchantReference; + + public static final String JSON_PROPERTY_SOURCE_ACCOUNT_CODE = "sourceAccountCode"; + private String sourceAccountCode; + + public SetupBeneficiaryRequest() { + } + + public SetupBeneficiaryRequest destinationAccountCode(String destinationAccountCode) { + this.destinationAccountCode = destinationAccountCode; + return this; + } + + /** + * The destination account code. + * @return destinationAccountCode + **/ + @ApiModelProperty(required = true, value = "The destination account code.") + @JsonProperty(JSON_PROPERTY_DESTINATION_ACCOUNT_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getDestinationAccountCode() { + return destinationAccountCode; + } + + + @JsonProperty(JSON_PROPERTY_DESTINATION_ACCOUNT_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDestinationAccountCode(String destinationAccountCode) { + this.destinationAccountCode = destinationAccountCode; + } + + + public SetupBeneficiaryRequest merchantReference(String merchantReference) { + this.merchantReference = merchantReference; + return this; + } + + /** + * A value that can be supplied at the discretion of the executing user. + * @return merchantReference + **/ + @ApiModelProperty(value = "A value that can be supplied at the discretion of the executing user.") + @JsonProperty(JSON_PROPERTY_MERCHANT_REFERENCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getMerchantReference() { + return merchantReference; + } + + + @JsonProperty(JSON_PROPERTY_MERCHANT_REFERENCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMerchantReference(String merchantReference) { + this.merchantReference = merchantReference; + } + + + public SetupBeneficiaryRequest sourceAccountCode(String sourceAccountCode) { + this.sourceAccountCode = sourceAccountCode; + return this; + } + + /** + * The benefactor account. + * @return sourceAccountCode + **/ + @ApiModelProperty(required = true, value = "The benefactor account.") + @JsonProperty(JSON_PROPERTY_SOURCE_ACCOUNT_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getSourceAccountCode() { + return sourceAccountCode; + } + + + @JsonProperty(JSON_PROPERTY_SOURCE_ACCOUNT_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSourceAccountCode(String sourceAccountCode) { + this.sourceAccountCode = sourceAccountCode; + } + + + /** + * Return true if this SetupBeneficiaryRequest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SetupBeneficiaryRequest setupBeneficiaryRequest = (SetupBeneficiaryRequest) o; + return Objects.equals(this.destinationAccountCode, setupBeneficiaryRequest.destinationAccountCode) && + Objects.equals(this.merchantReference, setupBeneficiaryRequest.merchantReference) && + Objects.equals(this.sourceAccountCode, setupBeneficiaryRequest.sourceAccountCode); + } + + @Override + public int hashCode() { + return Objects.hash(destinationAccountCode, merchantReference, sourceAccountCode); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SetupBeneficiaryRequest {\n"); + sb.append(" destinationAccountCode: ").append(toIndentedString(destinationAccountCode)).append("\n"); + sb.append(" merchantReference: ").append(toIndentedString(merchantReference)).append("\n"); + sb.append(" sourceAccountCode: ").append(toIndentedString(sourceAccountCode)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line 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 SetupBeneficiaryRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of SetupBeneficiaryRequest + * @throws JsonProcessingException if the JSON string is invalid with respect to SetupBeneficiaryRequest + */ + public static SetupBeneficiaryRequest fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, SetupBeneficiaryRequest.class); + } +/** + * Convert an instance of SetupBeneficiaryRequest 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/marketpayfund/SetupBeneficiaryResponse.java b/src/main/java/com/adyen/model/marketpayfund/SetupBeneficiaryResponse.java new file mode 100644 index 000000000..438f9ef9b --- /dev/null +++ b/src/main/java/com/adyen/model/marketpayfund/SetupBeneficiaryResponse.java @@ -0,0 +1,202 @@ +/* + * Fund API + * This API is used for the classic integration. If you are just starting your implementation, refer to our [new integration guide](https://docs.adyen.com/marketplaces-and-platforms) instead. The Fund API provides endpoints for managing the funds in the accounts on your platform. These management operations include, for example, the transfer of funds from one account to another, the payout of funds to an account holder, and the retrieval of balances in an account. For more information, refer to our [documentation](https://docs.adyen.com/marketplaces-and-platforms/classic/). ## Authentication Your Adyen contact will provide your API credential and an API key. To connect to the API, add an `X-API-Key` header with the API key as the value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: YOUR_API_KEY\" \\ ... ``` Alternatively, you can use the username and password to connect to the API using basic authentication. For example: ``` curl -U \"ws@MarketPlace.YOUR_PLATFORM_ACCOUNT\":\"YOUR_WS_PASSWORD\" \\ -H \"Content-Type: application/json\" \\ ... ``` When going live, you need to generate new web service user credentials to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning The Fund API supports [versioning](https://docs.adyen.com/development-resources/versioning) using a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://cal-test.adyen.com/cal/services/Fund/v6/accountHolderBalance ``` + * + * The version of the OpenAPI document: 6 + * + * + * 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.marketpayfund; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.adyen.model.marketpayfund.ErrorFieldType; +import com.fasterxml.jackson.annotation.JsonInclude; +import 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; + + +/** + * SetupBeneficiaryResponse + */ +@JsonPropertyOrder({ + SetupBeneficiaryResponse.JSON_PROPERTY_INVALID_FIELDS, + SetupBeneficiaryResponse.JSON_PROPERTY_PSP_REFERENCE, + SetupBeneficiaryResponse.JSON_PROPERTY_RESULT_CODE +}) + +public class SetupBeneficiaryResponse { + public static final String JSON_PROPERTY_INVALID_FIELDS = "invalidFields"; + private List invalidFields = null; + + public static final String JSON_PROPERTY_PSP_REFERENCE = "pspReference"; + private String pspReference; + + public static final String JSON_PROPERTY_RESULT_CODE = "resultCode"; + private String resultCode; + + public SetupBeneficiaryResponse() { + } + + public SetupBeneficiaryResponse invalidFields(List invalidFields) { + this.invalidFields = invalidFields; + return this; + } + + public SetupBeneficiaryResponse addInvalidFieldsItem(ErrorFieldType invalidFieldsItem) { + if (this.invalidFields == null) { + this.invalidFields = new ArrayList<>(); + } + this.invalidFields.add(invalidFieldsItem); + return this; + } + + /** + * Contains field validation errors that would prevent requests from being processed. + * @return invalidFields + **/ + @ApiModelProperty(value = "Contains field validation errors that would prevent requests from being processed.") + @JsonProperty(JSON_PROPERTY_INVALID_FIELDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getInvalidFields() { + return invalidFields; + } + + + @JsonProperty(JSON_PROPERTY_INVALID_FIELDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setInvalidFields(List invalidFields) { + this.invalidFields = invalidFields; + } + + + public SetupBeneficiaryResponse pspReference(String pspReference) { + this.pspReference = pspReference; + return this; + } + + /** + * The reference of a request. Can be used to uniquely identify the request. + * @return pspReference + **/ + @ApiModelProperty(value = "The reference of a request. Can be used to uniquely identify the request.") + @JsonProperty(JSON_PROPERTY_PSP_REFERENCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getPspReference() { + return pspReference; + } + + + @JsonProperty(JSON_PROPERTY_PSP_REFERENCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPspReference(String pspReference) { + this.pspReference = pspReference; + } + + + public SetupBeneficiaryResponse resultCode(String resultCode) { + this.resultCode = resultCode; + return this; + } + + /** + * The result code. + * @return resultCode + **/ + @ApiModelProperty(value = "The result code.") + @JsonProperty(JSON_PROPERTY_RESULT_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getResultCode() { + return resultCode; + } + + + @JsonProperty(JSON_PROPERTY_RESULT_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setResultCode(String resultCode) { + this.resultCode = resultCode; + } + + + /** + * Return true if this SetupBeneficiaryResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SetupBeneficiaryResponse setupBeneficiaryResponse = (SetupBeneficiaryResponse) o; + return Objects.equals(this.invalidFields, setupBeneficiaryResponse.invalidFields) && + Objects.equals(this.pspReference, setupBeneficiaryResponse.pspReference) && + Objects.equals(this.resultCode, setupBeneficiaryResponse.resultCode); + } + + @Override + public int hashCode() { + return Objects.hash(invalidFields, pspReference, resultCode); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SetupBeneficiaryResponse {\n"); + sb.append(" invalidFields: ").append(toIndentedString(invalidFields)).append("\n"); + sb.append(" pspReference: ").append(toIndentedString(pspReference)).append("\n"); + sb.append(" resultCode: ").append(toIndentedString(resultCode)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line 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 SetupBeneficiaryResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of SetupBeneficiaryResponse + * @throws JsonProcessingException if the JSON string is invalid with respect to SetupBeneficiaryResponse + */ + public static SetupBeneficiaryResponse fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, SetupBeneficiaryResponse.class); + } +/** + * Convert an instance of SetupBeneficiaryResponse 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/marketpayfund/Split.java b/src/main/java/com/adyen/model/marketpayfund/Split.java new file mode 100644 index 000000000..6abbf9b99 --- /dev/null +++ b/src/main/java/com/adyen/model/marketpayfund/Split.java @@ -0,0 +1,317 @@ +/* + * Fund API + * This API is used for the classic integration. If you are just starting your implementation, refer to our [new integration guide](https://docs.adyen.com/marketplaces-and-platforms) instead. The Fund API provides endpoints for managing the funds in the accounts on your platform. These management operations include, for example, the transfer of funds from one account to another, the payout of funds to an account holder, and the retrieval of balances in an account. For more information, refer to our [documentation](https://docs.adyen.com/marketplaces-and-platforms/classic/). ## Authentication Your Adyen contact will provide your API credential and an API key. To connect to the API, add an `X-API-Key` header with the API key as the value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: YOUR_API_KEY\" \\ ... ``` Alternatively, you can use the username and password to connect to the API using basic authentication. For example: ``` curl -U \"ws@MarketPlace.YOUR_PLATFORM_ACCOUNT\":\"YOUR_WS_PASSWORD\" \\ -H \"Content-Type: application/json\" \\ ... ``` When going live, you need to generate new web service user credentials to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning The Fund API supports [versioning](https://docs.adyen.com/development-resources/versioning) using a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://cal-test.adyen.com/cal/services/Fund/v6/accountHolderBalance ``` + * + * The version of the OpenAPI document: 6 + * + * + * 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.marketpayfund; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.adyen.model.marketpayfund.SplitAmount; +import com.fasterxml.jackson.annotation.JsonInclude; +import 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; + + +/** + * Split + */ +@JsonPropertyOrder({ + Split.JSON_PROPERTY_ACCOUNT, + Split.JSON_PROPERTY_AMOUNT, + Split.JSON_PROPERTY_DESCRIPTION, + Split.JSON_PROPERTY_REFERENCE, + Split.JSON_PROPERTY_TYPE +}) + +public class Split { + public static final String JSON_PROPERTY_ACCOUNT = "account"; + private String account; + + public static final String JSON_PROPERTY_AMOUNT = "amount"; + private SplitAmount amount; + + public static final String JSON_PROPERTY_DESCRIPTION = "description"; + private String description; + + public static final String JSON_PROPERTY_REFERENCE = "reference"; + private String reference; + + /** + * The type of split. Possible values: **Default**, **PaymentFee**, **VAT**, **Commission**, **MarketPlace**, **BalanceAccount**, **Remainder**, **Surcharge**, **Tip**. + */ + public enum TypeEnum { + BALANCEACCOUNT("BalanceAccount"), + + COMMISSION("Commission"), + + DEFAULT("Default"), + + MARKETPLACE("MarketPlace"), + + PAYMENTFEE("PaymentFee"), + + PAYMENTFEEACQUIRING("PaymentFeeAcquiring"), + + PAYMENTFEEADYEN("PaymentFeeAdyen"), + + PAYMENTFEEADYENCOMMISSION("PaymentFeeAdyenCommission"), + + PAYMENTFEEADYENMARKUP("PaymentFeeAdyenMarkup"), + + PAYMENTFEEINTERCHANGE("PaymentFeeInterchange"), + + PAYMENTFEESCHEMEFEE("PaymentFeeSchemeFee"), + + REMAINDER("Remainder"), + + SURCHARGE("Surcharge"), + + TIP("Tip"), + + VAT("VAT"), + + VERIFICATION("Verification"); + + 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 Split() { + } + + public Split account(String account) { + this.account = account; + return this; + } + + /** + * Unique identifier of the account where the split amount should be sent. This is required if `type` is **MarketPlace** or **BalanceAccount**. + * @return account + **/ + @ApiModelProperty(value = "Unique identifier of the account where the split amount should be sent. This is required if `type` is **MarketPlace** or **BalanceAccount**. ") + @JsonProperty(JSON_PROPERTY_ACCOUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getAccount() { + return account; + } + + + @JsonProperty(JSON_PROPERTY_ACCOUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAccount(String account) { + this.account = account; + } + + + public Split amount(SplitAmount 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 SplitAmount getAmount() { + return amount; + } + + + @JsonProperty(JSON_PROPERTY_AMOUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAmount(SplitAmount amount) { + this.amount = amount; + } + + + public Split description(String description) { + this.description = description; + return this; + } + + /** + * A description of this split. + * @return description + **/ + @ApiModelProperty(value = "A description of this split.") + @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 Split reference(String reference) { + this.reference = reference; + return this; + } + + /** + * Your reference for the split, which you can use to link the split to other operations such as captures and refunds. This is required if `type` is **MarketPlace** or **BalanceAccount**. For the other types, we also recommend sending a reference so you can reconcile the split and the associated payment in the transaction overview and in the reports. If the reference is not provided, the split is reported as part of the aggregated [TransferBalance record type](https://docs.adyen.com/reporting/marketpay-payments-accounting-report) in Adyen for Platforms. + * @return reference + **/ + @ApiModelProperty(value = "Your reference for the split, which you can use to link the split to other operations such as captures and refunds. This is required if `type` is **MarketPlace** or **BalanceAccount**. For the other types, we also recommend sending a reference so you can reconcile the split and the associated payment in the transaction overview and in the reports. If the reference is not provided, the split is reported as part of the aggregated [TransferBalance record type](https://docs.adyen.com/reporting/marketpay-payments-accounting-report) in Adyen for Platforms.") + @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 Split type(TypeEnum type) { + this.type = type; + return this; + } + + /** + * The type of split. Possible values: **Default**, **PaymentFee**, **VAT**, **Commission**, **MarketPlace**, **BalanceAccount**, **Remainder**, **Surcharge**, **Tip**. + * @return type + **/ + @ApiModelProperty(required = true, value = "The type of split. Possible values: **Default**, **PaymentFee**, **VAT**, **Commission**, **MarketPlace**, **BalanceAccount**, **Remainder**, **Surcharge**, **Tip**.") + @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 Split object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Split split = (Split) o; + return Objects.equals(this.account, split.account) && + Objects.equals(this.amount, split.amount) && + Objects.equals(this.description, split.description) && + Objects.equals(this.reference, split.reference) && + Objects.equals(this.type, split.type); + } + + @Override + public int hashCode() { + return Objects.hash(account, amount, description, reference, type); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Split {\n"); + sb.append(" account: ").append(toIndentedString(account)).append("\n"); + sb.append(" amount: ").append(toIndentedString(amount)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).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 Split given an JSON string + * + * @param jsonString JSON string + * @return An instance of Split + * @throws JsonProcessingException if the JSON string is invalid with respect to Split + */ + public static Split fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, Split.class); + } +/** + * Convert an instance of Split 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/marketpayfund/SplitAmount.java b/src/main/java/com/adyen/model/marketpayfund/SplitAmount.java new file mode 100644 index 000000000..44a7c90f5 --- /dev/null +++ b/src/main/java/com/adyen/model/marketpayfund/SplitAmount.java @@ -0,0 +1,160 @@ +/* + * Fund API + * This API is used for the classic integration. If you are just starting your implementation, refer to our [new integration guide](https://docs.adyen.com/marketplaces-and-platforms) instead. The Fund API provides endpoints for managing the funds in the accounts on your platform. These management operations include, for example, the transfer of funds from one account to another, the payout of funds to an account holder, and the retrieval of balances in an account. For more information, refer to our [documentation](https://docs.adyen.com/marketplaces-and-platforms/classic/). ## Authentication Your Adyen contact will provide your API credential and an API key. To connect to the API, add an `X-API-Key` header with the API key as the value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: YOUR_API_KEY\" \\ ... ``` Alternatively, you can use the username and password to connect to the API using basic authentication. For example: ``` curl -U \"ws@MarketPlace.YOUR_PLATFORM_ACCOUNT\":\"YOUR_WS_PASSWORD\" \\ -H \"Content-Type: application/json\" \\ ... ``` When going live, you need to generate new web service user credentials to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning The Fund API supports [versioning](https://docs.adyen.com/development-resources/versioning) using a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://cal-test.adyen.com/cal/services/Fund/v6/accountHolderBalance ``` + * + * The version of the OpenAPI document: 6 + * + * + * 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.marketpayfund; + +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; + + +/** + * SplitAmount + */ +@JsonPropertyOrder({ + SplitAmount.JSON_PROPERTY_CURRENCY, + SplitAmount.JSON_PROPERTY_VALUE +}) + +public class SplitAmount { + public static final String JSON_PROPERTY_CURRENCY = "currency"; + private String currency; + + public static final String JSON_PROPERTY_VALUE = "value"; + private Long value; + + public SplitAmount() { + } + + public SplitAmount currency(String currency) { + this.currency = currency; + return this; + } + + /** + * The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes). If this value is not provided, the currency in which the payment is made will be used. + * @return currency + **/ + @ApiModelProperty(value = "The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes). If this value is not provided, the currency in which the payment is made will be used.") + @JsonProperty(JSON_PROPERTY_CURRENCY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getCurrency() { + return currency; + } + + + @JsonProperty(JSON_PROPERTY_CURRENCY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCurrency(String currency) { + this.currency = currency; + } + + + public SplitAmount value(Long value) { + this.value = value; + return this; + } + + /** + * The amount in [minor units](https://docs.adyen.com/development-resources/currency-codes). + * @return value + **/ + @ApiModelProperty(required = true, value = "The amount in [minor units](https://docs.adyen.com/development-resources/currency-codes).") + @JsonProperty(JSON_PROPERTY_VALUE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Long getValue() { + return value; + } + + + @JsonProperty(JSON_PROPERTY_VALUE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setValue(Long value) { + this.value = value; + } + + + /** + * Return true if this SplitAmount object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SplitAmount splitAmount = (SplitAmount) o; + return Objects.equals(this.currency, splitAmount.currency) && + Objects.equals(this.value, splitAmount.value); + } + + @Override + public int hashCode() { + return Objects.hash(currency, value); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SplitAmount {\n"); + sb.append(" currency: ").append(toIndentedString(currency)).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 SplitAmount given an JSON string + * + * @param jsonString JSON string + * @return An instance of SplitAmount + * @throws JsonProcessingException if the JSON string is invalid with respect to SplitAmount + */ + public static SplitAmount fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, SplitAmount.class); + } +/** + * Convert an instance of SplitAmount 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/marketpayfund/Transaction.java b/src/main/java/com/adyen/model/marketpayfund/Transaction.java new file mode 100644 index 000000000..f6d77ddb5 --- /dev/null +++ b/src/main/java/com/adyen/model/marketpayfund/Transaction.java @@ -0,0 +1,718 @@ +/* + * Fund API + * This API is used for the classic integration. If you are just starting your implementation, refer to our [new integration guide](https://docs.adyen.com/marketplaces-and-platforms) instead. The Fund API provides endpoints for managing the funds in the accounts on your platform. These management operations include, for example, the transfer of funds from one account to another, the payout of funds to an account holder, and the retrieval of balances in an account. For more information, refer to our [documentation](https://docs.adyen.com/marketplaces-and-platforms/classic/). ## Authentication Your Adyen contact will provide your API credential and an API key. To connect to the API, add an `X-API-Key` header with the API key as the value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: YOUR_API_KEY\" \\ ... ``` Alternatively, you can use the username and password to connect to the API using basic authentication. For example: ``` curl -U \"ws@MarketPlace.YOUR_PLATFORM_ACCOUNT\":\"YOUR_WS_PASSWORD\" \\ -H \"Content-Type: application/json\" \\ ... ``` When going live, you need to generate new web service user credentials to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning The Fund API supports [versioning](https://docs.adyen.com/development-resources/versioning) using a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://cal-test.adyen.com/cal/services/Fund/v6/accountHolderBalance ``` + * + * The version of the OpenAPI document: 6 + * + * + * 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.marketpayfund; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.adyen.model.marketpayfund.Amount; +import com.adyen.model.marketpayfund.BankAccountDetail; +import com.fasterxml.jackson.annotation.JsonInclude; +import 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; + + +/** + * Transaction + */ +@JsonPropertyOrder({ + Transaction.JSON_PROPERTY_AMOUNT, + Transaction.JSON_PROPERTY_BANK_ACCOUNT_DETAIL, + Transaction.JSON_PROPERTY_CAPTURE_MERCHANT_REFERENCE, + Transaction.JSON_PROPERTY_CAPTURE_PSP_REFERENCE, + Transaction.JSON_PROPERTY_CREATION_DATE, + Transaction.JSON_PROPERTY_DESCRIPTION, + Transaction.JSON_PROPERTY_DESTINATION_ACCOUNT_CODE, + Transaction.JSON_PROPERTY_DISPUTE_PSP_REFERENCE, + Transaction.JSON_PROPERTY_DISPUTE_REASON_CODE, + Transaction.JSON_PROPERTY_MERCHANT_REFERENCE, + Transaction.JSON_PROPERTY_PAYMENT_PSP_REFERENCE, + Transaction.JSON_PROPERTY_PAYOUT_PSP_REFERENCE, + Transaction.JSON_PROPERTY_PSP_REFERENCE, + Transaction.JSON_PROPERTY_SOURCE_ACCOUNT_CODE, + Transaction.JSON_PROPERTY_TRANSACTION_STATUS, + Transaction.JSON_PROPERTY_TRANSFER_CODE +}) + +public class Transaction { + public static final String JSON_PROPERTY_AMOUNT = "amount"; + private Amount amount; + + public static final String JSON_PROPERTY_BANK_ACCOUNT_DETAIL = "bankAccountDetail"; + private BankAccountDetail bankAccountDetail; + + public static final String JSON_PROPERTY_CAPTURE_MERCHANT_REFERENCE = "captureMerchantReference"; + private String captureMerchantReference; + + public static final String JSON_PROPERTY_CAPTURE_PSP_REFERENCE = "capturePspReference"; + private String capturePspReference; + + 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_DESTINATION_ACCOUNT_CODE = "destinationAccountCode"; + private String destinationAccountCode; + + public static final String JSON_PROPERTY_DISPUTE_PSP_REFERENCE = "disputePspReference"; + private String disputePspReference; + + public static final String JSON_PROPERTY_DISPUTE_REASON_CODE = "disputeReasonCode"; + private String disputeReasonCode; + + public static final String JSON_PROPERTY_MERCHANT_REFERENCE = "merchantReference"; + private String merchantReference; + + public static final String JSON_PROPERTY_PAYMENT_PSP_REFERENCE = "paymentPspReference"; + private String paymentPspReference; + + public static final String JSON_PROPERTY_PAYOUT_PSP_REFERENCE = "payoutPspReference"; + private String payoutPspReference; + + public static final String JSON_PROPERTY_PSP_REFERENCE = "pspReference"; + private String pspReference; + + public static final String JSON_PROPERTY_SOURCE_ACCOUNT_CODE = "sourceAccountCode"; + private String sourceAccountCode; + + /** + * The status of the transaction. >Permitted values: `PendingCredit`, `CreditFailed`, `CreditClosed`, `CreditSuspended`, `Credited`, `Converted`, `PendingDebit`, `DebitFailed`, `Debited`, `DebitReversedReceived`, `DebitedReversed`, `ChargebackReceived`, `Chargeback`, `ChargebackReversedReceived`, `ChargebackReversed`, `Payout`, `PayoutReversed`, `FundTransfer`, `PendingFundTransfer`, `ManualCorrected`. + */ + public enum TransactionStatusEnum { + BALANCENOTPAIDOUTTRANSFER("BalanceNotPaidOutTransfer"), + + BALANCEPLATFORMSWEEP("BalancePlatformSweep"), + + BALANCEPLATFORMSWEEPRETURNED("BalancePlatformSweepReturned"), + + CHARGEBACK("Chargeback"), + + CHARGEBACKCORRECTION("ChargebackCorrection"), + + CHARGEBACKCORRECTIONRECEIVED("ChargebackCorrectionReceived"), + + CHARGEBACKRECEIVED("ChargebackReceived"), + + CHARGEBACKREVERSED("ChargebackReversed"), + + CHARGEBACKREVERSEDCORRECTION("ChargebackReversedCorrection"), + + CHARGEBACKREVERSEDCORRECTIONRECEIVED("ChargebackReversedCorrectionReceived"), + + CHARGEBACKREVERSEDRECEIVED("ChargebackReversedReceived"), + + CONVERTED("Converted"), + + CREDITCLOSED("CreditClosed"), + + CREDITFAILED("CreditFailed"), + + CREDITREVERSED("CreditReversed"), + + CREDITREVERSEDRECEIVED("CreditReversedReceived"), + + CREDITSUSPENDED("CreditSuspended"), + + CREDITED("Credited"), + + DEBITFAILED("DebitFailed"), + + DEBITREVERSEDRECEIVED("DebitReversedReceived"), + + DEBITED("Debited"), + + DEBITEDREVERSED("DebitedReversed"), + + DEPOSITCORRECTIONCREDITED("DepositCorrectionCredited"), + + DEPOSITCORRECTIONDEBITED("DepositCorrectionDebited"), + + FEE("Fee"), + + FUNDTRANSFER("FundTransfer"), + + FUNDTRANSFERREVERSED("FundTransferReversed"), + + INVOICEDEDUCTIONCREDITED("InvoiceDeductionCredited"), + + INVOICEDEDUCTIONDEBITED("InvoiceDeductionDebited"), + + MANUALCORRECTED("ManualCorrected"), + + MANUALCORRECTIONCREDITED("ManualCorrectionCredited"), + + MANUALCORRECTIONDEBITED("ManualCorrectionDebited"), + + MERCHANTPAYIN("MerchantPayin"), + + MERCHANTPAYINREVERSED("MerchantPayinReversed"), + + PAYOUT("Payout"), + + PAYOUTREVERSED("PayoutReversed"), + + PENDINGCREDIT("PendingCredit"), + + PENDINGDEBIT("PendingDebit"), + + PENDINGFUNDTRANSFER("PendingFundTransfer"), + + RECREDITED("ReCredited"), + + RECREDITEDRECEIVED("ReCreditedReceived"), + + SECONDCHARGEBACK("SecondChargeback"), + + SECONDCHARGEBACKCORRECTION("SecondChargebackCorrection"), + + SECONDCHARGEBACKCORRECTIONRECEIVED("SecondChargebackCorrectionReceived"), + + SECONDCHARGEBACKRECEIVED("SecondChargebackReceived"); + + private String value; + + TransactionStatusEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TransactionStatusEnum fromValue(String value) { + for (TransactionStatusEnum b : TransactionStatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_TRANSACTION_STATUS = "transactionStatus"; + private TransactionStatusEnum transactionStatus; + + public static final String JSON_PROPERTY_TRANSFER_CODE = "transferCode"; + private String transferCode; + + public Transaction() { + } + + public Transaction amount(Amount amount) { + this.amount = amount; + return this; + } + + /** + * Get amount + * @return amount + **/ + @ApiModelProperty(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 Transaction bankAccountDetail(BankAccountDetail bankAccountDetail) { + this.bankAccountDetail = bankAccountDetail; + return this; + } + + /** + * Get bankAccountDetail + * @return bankAccountDetail + **/ + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_BANK_ACCOUNT_DETAIL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public BankAccountDetail getBankAccountDetail() { + return bankAccountDetail; + } + + + @JsonProperty(JSON_PROPERTY_BANK_ACCOUNT_DETAIL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setBankAccountDetail(BankAccountDetail bankAccountDetail) { + this.bankAccountDetail = bankAccountDetail; + } + + + public Transaction captureMerchantReference(String captureMerchantReference) { + this.captureMerchantReference = captureMerchantReference; + return this; + } + + /** + * The merchant reference of a related capture. + * @return captureMerchantReference + **/ + @ApiModelProperty(value = "The merchant reference of a related capture.") + @JsonProperty(JSON_PROPERTY_CAPTURE_MERCHANT_REFERENCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getCaptureMerchantReference() { + return captureMerchantReference; + } + + + @JsonProperty(JSON_PROPERTY_CAPTURE_MERCHANT_REFERENCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCaptureMerchantReference(String captureMerchantReference) { + this.captureMerchantReference = captureMerchantReference; + } + + + public Transaction capturePspReference(String capturePspReference) { + this.capturePspReference = capturePspReference; + return this; + } + + /** + * The psp reference of a related capture. + * @return capturePspReference + **/ + @ApiModelProperty(value = "The psp reference of a related capture.") + @JsonProperty(JSON_PROPERTY_CAPTURE_PSP_REFERENCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getCapturePspReference() { + return capturePspReference; + } + + + @JsonProperty(JSON_PROPERTY_CAPTURE_PSP_REFERENCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCapturePspReference(String capturePspReference) { + this.capturePspReference = capturePspReference; + } + + + public Transaction creationDate(OffsetDateTime creationDate) { + this.creationDate = creationDate; + return this; + } + + /** + * The date on which the transaction was performed. + * @return creationDate + **/ + @ApiModelProperty(value = "The date on which the transaction was performed.") + @JsonProperty(JSON_PROPERTY_CREATION_DATE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public OffsetDateTime getCreationDate() { + return creationDate; + } + + + @JsonProperty(JSON_PROPERTY_CREATION_DATE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCreationDate(OffsetDateTime creationDate) { + this.creationDate = creationDate; + } + + + public Transaction description(String description) { + this.description = description; + return this; + } + + /** + * A description of the transaction. + * @return description + **/ + @ApiModelProperty(value = "A description of the transaction.") + @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 destinationAccountCode(String destinationAccountCode) { + this.destinationAccountCode = destinationAccountCode; + return this; + } + + /** + * The code of the account to which funds were credited during an outgoing fund transfer. + * @return destinationAccountCode + **/ + @ApiModelProperty(value = "The code of the account to which funds were credited during an outgoing fund transfer.") + @JsonProperty(JSON_PROPERTY_DESTINATION_ACCOUNT_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getDestinationAccountCode() { + return destinationAccountCode; + } + + + @JsonProperty(JSON_PROPERTY_DESTINATION_ACCOUNT_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDestinationAccountCode(String destinationAccountCode) { + this.destinationAccountCode = destinationAccountCode; + } + + + public Transaction disputePspReference(String disputePspReference) { + this.disputePspReference = disputePspReference; + return this; + } + + /** + * The psp reference of the related dispute. + * @return disputePspReference + **/ + @ApiModelProperty(value = "The psp reference of the related dispute.") + @JsonProperty(JSON_PROPERTY_DISPUTE_PSP_REFERENCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getDisputePspReference() { + return disputePspReference; + } + + + @JsonProperty(JSON_PROPERTY_DISPUTE_PSP_REFERENCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDisputePspReference(String disputePspReference) { + this.disputePspReference = disputePspReference; + } + + + public Transaction disputeReasonCode(String disputeReasonCode) { + this.disputeReasonCode = disputeReasonCode; + return this; + } + + /** + * The reason code of a dispute. + * @return disputeReasonCode + **/ + @ApiModelProperty(value = "The reason code of a dispute.") + @JsonProperty(JSON_PROPERTY_DISPUTE_REASON_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getDisputeReasonCode() { + return disputeReasonCode; + } + + + @JsonProperty(JSON_PROPERTY_DISPUTE_REASON_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDisputeReasonCode(String disputeReasonCode) { + this.disputeReasonCode = disputeReasonCode; + } + + + public Transaction merchantReference(String merchantReference) { + this.merchantReference = merchantReference; + return this; + } + + /** + * The merchant reference of a transaction. + * @return merchantReference + **/ + @ApiModelProperty(value = "The merchant reference of a transaction.") + @JsonProperty(JSON_PROPERTY_MERCHANT_REFERENCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getMerchantReference() { + return merchantReference; + } + + + @JsonProperty(JSON_PROPERTY_MERCHANT_REFERENCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMerchantReference(String merchantReference) { + this.merchantReference = merchantReference; + } + + + public Transaction paymentPspReference(String paymentPspReference) { + this.paymentPspReference = paymentPspReference; + return this; + } + + /** + * The psp reference of the related authorisation or transfer. + * @return paymentPspReference + **/ + @ApiModelProperty(value = "The psp reference of the related authorisation or transfer.") + @JsonProperty(JSON_PROPERTY_PAYMENT_PSP_REFERENCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getPaymentPspReference() { + return paymentPspReference; + } + + + @JsonProperty(JSON_PROPERTY_PAYMENT_PSP_REFERENCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPaymentPspReference(String paymentPspReference) { + this.paymentPspReference = paymentPspReference; + } + + + public Transaction payoutPspReference(String payoutPspReference) { + this.payoutPspReference = payoutPspReference; + return this; + } + + /** + * The psp reference of the related payout. + * @return payoutPspReference + **/ + @ApiModelProperty(value = "The psp reference of the related payout.") + @JsonProperty(JSON_PROPERTY_PAYOUT_PSP_REFERENCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getPayoutPspReference() { + return payoutPspReference; + } + + + @JsonProperty(JSON_PROPERTY_PAYOUT_PSP_REFERENCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPayoutPspReference(String payoutPspReference) { + this.payoutPspReference = payoutPspReference; + } + + + public Transaction pspReference(String pspReference) { + this.pspReference = pspReference; + return this; + } + + /** + * The psp reference of a transaction. + * @return pspReference + **/ + @ApiModelProperty(value = "The psp reference of a transaction.") + @JsonProperty(JSON_PROPERTY_PSP_REFERENCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getPspReference() { + return pspReference; + } + + + @JsonProperty(JSON_PROPERTY_PSP_REFERENCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPspReference(String pspReference) { + this.pspReference = pspReference; + } + + + public Transaction sourceAccountCode(String sourceAccountCode) { + this.sourceAccountCode = sourceAccountCode; + return this; + } + + /** + * The code of the account from which funds were debited during an incoming fund transfer. + * @return sourceAccountCode + **/ + @ApiModelProperty(value = "The code of the account from which funds were debited during an incoming fund transfer.") + @JsonProperty(JSON_PROPERTY_SOURCE_ACCOUNT_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getSourceAccountCode() { + return sourceAccountCode; + } + + + @JsonProperty(JSON_PROPERTY_SOURCE_ACCOUNT_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSourceAccountCode(String sourceAccountCode) { + this.sourceAccountCode = sourceAccountCode; + } + + + public Transaction transactionStatus(TransactionStatusEnum transactionStatus) { + this.transactionStatus = transactionStatus; + return this; + } + + /** + * The status of the transaction. >Permitted values: `PendingCredit`, `CreditFailed`, `CreditClosed`, `CreditSuspended`, `Credited`, `Converted`, `PendingDebit`, `DebitFailed`, `Debited`, `DebitReversedReceived`, `DebitedReversed`, `ChargebackReceived`, `Chargeback`, `ChargebackReversedReceived`, `ChargebackReversed`, `Payout`, `PayoutReversed`, `FundTransfer`, `PendingFundTransfer`, `ManualCorrected`. + * @return transactionStatus + **/ + @ApiModelProperty(value = "The status of the transaction. >Permitted values: `PendingCredit`, `CreditFailed`, `CreditClosed`, `CreditSuspended`, `Credited`, `Converted`, `PendingDebit`, `DebitFailed`, `Debited`, `DebitReversedReceived`, `DebitedReversed`, `ChargebackReceived`, `Chargeback`, `ChargebackReversedReceived`, `ChargebackReversed`, `Payout`, `PayoutReversed`, `FundTransfer`, `PendingFundTransfer`, `ManualCorrected`.") + @JsonProperty(JSON_PROPERTY_TRANSACTION_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public TransactionStatusEnum getTransactionStatus() { + return transactionStatus; + } + + + @JsonProperty(JSON_PROPERTY_TRANSACTION_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTransactionStatus(TransactionStatusEnum transactionStatus) { + this.transactionStatus = transactionStatus; + } + + + public Transaction transferCode(String transferCode) { + this.transferCode = transferCode; + return this; + } + + /** + * The transfer code of the transaction. + * @return transferCode + **/ + @ApiModelProperty(value = "The transfer code of the transaction.") + @JsonProperty(JSON_PROPERTY_TRANSFER_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getTransferCode() { + return transferCode; + } + + + @JsonProperty(JSON_PROPERTY_TRANSFER_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTransferCode(String transferCode) { + this.transferCode = transferCode; + } + + + /** + * Return true if this Transaction object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Transaction transaction = (Transaction) o; + return Objects.equals(this.amount, transaction.amount) && + Objects.equals(this.bankAccountDetail, transaction.bankAccountDetail) && + Objects.equals(this.captureMerchantReference, transaction.captureMerchantReference) && + Objects.equals(this.capturePspReference, transaction.capturePspReference) && + Objects.equals(this.creationDate, transaction.creationDate) && + Objects.equals(this.description, transaction.description) && + Objects.equals(this.destinationAccountCode, transaction.destinationAccountCode) && + Objects.equals(this.disputePspReference, transaction.disputePspReference) && + Objects.equals(this.disputeReasonCode, transaction.disputeReasonCode) && + Objects.equals(this.merchantReference, transaction.merchantReference) && + Objects.equals(this.paymentPspReference, transaction.paymentPspReference) && + Objects.equals(this.payoutPspReference, transaction.payoutPspReference) && + Objects.equals(this.pspReference, transaction.pspReference) && + Objects.equals(this.sourceAccountCode, transaction.sourceAccountCode) && + Objects.equals(this.transactionStatus, transaction.transactionStatus) && + Objects.equals(this.transferCode, transaction.transferCode); + } + + @Override + public int hashCode() { + return Objects.hash(amount, bankAccountDetail, captureMerchantReference, capturePspReference, creationDate, description, destinationAccountCode, disputePspReference, disputeReasonCode, merchantReference, paymentPspReference, payoutPspReference, pspReference, sourceAccountCode, transactionStatus, transferCode); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Transaction {\n"); + sb.append(" amount: ").append(toIndentedString(amount)).append("\n"); + sb.append(" bankAccountDetail: ").append(toIndentedString(bankAccountDetail)).append("\n"); + sb.append(" captureMerchantReference: ").append(toIndentedString(captureMerchantReference)).append("\n"); + sb.append(" capturePspReference: ").append(toIndentedString(capturePspReference)).append("\n"); + sb.append(" creationDate: ").append(toIndentedString(creationDate)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" destinationAccountCode: ").append(toIndentedString(destinationAccountCode)).append("\n"); + sb.append(" disputePspReference: ").append(toIndentedString(disputePspReference)).append("\n"); + sb.append(" disputeReasonCode: ").append(toIndentedString(disputeReasonCode)).append("\n"); + sb.append(" merchantReference: ").append(toIndentedString(merchantReference)).append("\n"); + sb.append(" paymentPspReference: ").append(toIndentedString(paymentPspReference)).append("\n"); + sb.append(" payoutPspReference: ").append(toIndentedString(payoutPspReference)).append("\n"); + sb.append(" pspReference: ").append(toIndentedString(pspReference)).append("\n"); + sb.append(" sourceAccountCode: ").append(toIndentedString(sourceAccountCode)).append("\n"); + sb.append(" transactionStatus: ").append(toIndentedString(transactionStatus)).append("\n"); + sb.append(" transferCode: ").append(toIndentedString(transferCode)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line 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 Transaction given an JSON string + * + * @param jsonString JSON string + * @return An instance of Transaction + * @throws JsonProcessingException if the JSON string is invalid with respect to Transaction + */ + public static Transaction fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, Transaction.class); + } +/** + * Convert an instance of Transaction 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/marketpayfund/TransactionListForAccount.java b/src/main/java/com/adyen/model/marketpayfund/TransactionListForAccount.java new file mode 100644 index 000000000..670b7eea8 --- /dev/null +++ b/src/main/java/com/adyen/model/marketpayfund/TransactionListForAccount.java @@ -0,0 +1,160 @@ +/* + * Fund API + * This API is used for the classic integration. If you are just starting your implementation, refer to our [new integration guide](https://docs.adyen.com/marketplaces-and-platforms) instead. The Fund API provides endpoints for managing the funds in the accounts on your platform. These management operations include, for example, the transfer of funds from one account to another, the payout of funds to an account holder, and the retrieval of balances in an account. For more information, refer to our [documentation](https://docs.adyen.com/marketplaces-and-platforms/classic/). ## Authentication Your Adyen contact will provide your API credential and an API key. To connect to the API, add an `X-API-Key` header with the API key as the value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: YOUR_API_KEY\" \\ ... ``` Alternatively, you can use the username and password to connect to the API using basic authentication. For example: ``` curl -U \"ws@MarketPlace.YOUR_PLATFORM_ACCOUNT\":\"YOUR_WS_PASSWORD\" \\ -H \"Content-Type: application/json\" \\ ... ``` When going live, you need to generate new web service user credentials to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning The Fund API supports [versioning](https://docs.adyen.com/development-resources/versioning) using a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://cal-test.adyen.com/cal/services/Fund/v6/accountHolderBalance ``` + * + * The version of the OpenAPI document: 6 + * + * + * 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.marketpayfund; + +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; + + +/** + * TransactionListForAccount + */ +@JsonPropertyOrder({ + TransactionListForAccount.JSON_PROPERTY_ACCOUNT_CODE, + TransactionListForAccount.JSON_PROPERTY_PAGE +}) + +public class TransactionListForAccount { + public static final String JSON_PROPERTY_ACCOUNT_CODE = "accountCode"; + private String accountCode; + + public static final String JSON_PROPERTY_PAGE = "page"; + private Integer page; + + public TransactionListForAccount() { + } + + public TransactionListForAccount accountCode(String accountCode) { + this.accountCode = accountCode; + return this; + } + + /** + * The account for which to retrieve the transactions. + * @return accountCode + **/ + @ApiModelProperty(required = true, value = "The account for which to retrieve the transactions.") + @JsonProperty(JSON_PROPERTY_ACCOUNT_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getAccountCode() { + return accountCode; + } + + + @JsonProperty(JSON_PROPERTY_ACCOUNT_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAccountCode(String accountCode) { + this.accountCode = accountCode; + } + + + public TransactionListForAccount page(Integer page) { + this.page = page; + return this; + } + + /** + * The page of transactions to retrieve. Each page lists fifty (50) transactions. The most recent transactions are included on page 1. + * @return page + **/ + @ApiModelProperty(required = true, value = "The page of transactions to retrieve. Each page lists fifty (50) transactions. The most recent transactions are included on page 1.") + @JsonProperty(JSON_PROPERTY_PAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Integer getPage() { + return page; + } + + + @JsonProperty(JSON_PROPERTY_PAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPage(Integer page) { + this.page = page; + } + + + /** + * Return true if this TransactionListForAccount object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TransactionListForAccount transactionListForAccount = (TransactionListForAccount) o; + return Objects.equals(this.accountCode, transactionListForAccount.accountCode) && + Objects.equals(this.page, transactionListForAccount.page); + } + + @Override + public int hashCode() { + return Objects.hash(accountCode, page); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TransactionListForAccount {\n"); + sb.append(" accountCode: ").append(toIndentedString(accountCode)).append("\n"); + sb.append(" page: ").append(toIndentedString(page)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line 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 TransactionListForAccount given an JSON string + * + * @param jsonString JSON string + * @return An instance of TransactionListForAccount + * @throws JsonProcessingException if the JSON string is invalid with respect to TransactionListForAccount + */ + public static TransactionListForAccount fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, TransactionListForAccount.class); + } +/** + * Convert an instance of TransactionListForAccount 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/marketpayfund/TransferFundsRequest.java b/src/main/java/com/adyen/model/marketpayfund/TransferFundsRequest.java new file mode 100644 index 000000000..c3c415570 --- /dev/null +++ b/src/main/java/com/adyen/model/marketpayfund/TransferFundsRequest.java @@ -0,0 +1,254 @@ +/* + * Fund API + * This API is used for the classic integration. If you are just starting your implementation, refer to our [new integration guide](https://docs.adyen.com/marketplaces-and-platforms) instead. The Fund API provides endpoints for managing the funds in the accounts on your platform. These management operations include, for example, the transfer of funds from one account to another, the payout of funds to an account holder, and the retrieval of balances in an account. For more information, refer to our [documentation](https://docs.adyen.com/marketplaces-and-platforms/classic/). ## Authentication Your Adyen contact will provide your API credential and an API key. To connect to the API, add an `X-API-Key` header with the API key as the value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: YOUR_API_KEY\" \\ ... ``` Alternatively, you can use the username and password to connect to the API using basic authentication. For example: ``` curl -U \"ws@MarketPlace.YOUR_PLATFORM_ACCOUNT\":\"YOUR_WS_PASSWORD\" \\ -H \"Content-Type: application/json\" \\ ... ``` When going live, you need to generate new web service user credentials to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning The Fund API supports [versioning](https://docs.adyen.com/development-resources/versioning) using a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://cal-test.adyen.com/cal/services/Fund/v6/accountHolderBalance ``` + * + * The version of the OpenAPI document: 6 + * + * + * 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.marketpayfund; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.adyen.model.marketpayfund.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; + + +/** + * TransferFundsRequest + */ +@JsonPropertyOrder({ + TransferFundsRequest.JSON_PROPERTY_AMOUNT, + TransferFundsRequest.JSON_PROPERTY_DESTINATION_ACCOUNT_CODE, + TransferFundsRequest.JSON_PROPERTY_MERCHANT_REFERENCE, + TransferFundsRequest.JSON_PROPERTY_SOURCE_ACCOUNT_CODE, + TransferFundsRequest.JSON_PROPERTY_TRANSFER_CODE +}) + +public class TransferFundsRequest { + public static final String JSON_PROPERTY_AMOUNT = "amount"; + private Amount amount; + + public static final String JSON_PROPERTY_DESTINATION_ACCOUNT_CODE = "destinationAccountCode"; + private String destinationAccountCode; + + public static final String JSON_PROPERTY_MERCHANT_REFERENCE = "merchantReference"; + private String merchantReference; + + public static final String JSON_PROPERTY_SOURCE_ACCOUNT_CODE = "sourceAccountCode"; + private String sourceAccountCode; + + public static final String JSON_PROPERTY_TRANSFER_CODE = "transferCode"; + private String transferCode; + + public TransferFundsRequest() { + } + + public TransferFundsRequest 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 TransferFundsRequest destinationAccountCode(String destinationAccountCode) { + this.destinationAccountCode = destinationAccountCode; + return this; + } + + /** + * The code of the account to which the funds are to be credited. >The state of the Account Holder of this account must be Active. + * @return destinationAccountCode + **/ + @ApiModelProperty(required = true, value = "The code of the account to which the funds are to be credited. >The state of the Account Holder of this account must be Active.") + @JsonProperty(JSON_PROPERTY_DESTINATION_ACCOUNT_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getDestinationAccountCode() { + return destinationAccountCode; + } + + + @JsonProperty(JSON_PROPERTY_DESTINATION_ACCOUNT_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDestinationAccountCode(String destinationAccountCode) { + this.destinationAccountCode = destinationAccountCode; + } + + + public TransferFundsRequest merchantReference(String merchantReference) { + this.merchantReference = merchantReference; + return this; + } + + /** + * A value that can be supplied at the discretion of the executing user in order to link multiple transactions to one another. + * @return merchantReference + **/ + @ApiModelProperty(value = "A value that can be supplied at the discretion of the executing user in order to link multiple transactions to one another.") + @JsonProperty(JSON_PROPERTY_MERCHANT_REFERENCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getMerchantReference() { + return merchantReference; + } + + + @JsonProperty(JSON_PROPERTY_MERCHANT_REFERENCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMerchantReference(String merchantReference) { + this.merchantReference = merchantReference; + } + + + public TransferFundsRequest sourceAccountCode(String sourceAccountCode) { + this.sourceAccountCode = sourceAccountCode; + return this; + } + + /** + * The code of the account from which the funds are to be debited. >The state of the Account Holder of this account must be Active and allow payouts. + * @return sourceAccountCode + **/ + @ApiModelProperty(required = true, value = "The code of the account from which the funds are to be debited. >The state of the Account Holder of this account must be Active and allow payouts.") + @JsonProperty(JSON_PROPERTY_SOURCE_ACCOUNT_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getSourceAccountCode() { + return sourceAccountCode; + } + + + @JsonProperty(JSON_PROPERTY_SOURCE_ACCOUNT_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSourceAccountCode(String sourceAccountCode) { + this.sourceAccountCode = sourceAccountCode; + } + + + public TransferFundsRequest transferCode(String transferCode) { + this.transferCode = transferCode; + return this; + } + + /** + * The code related to the type of transfer being performed. >The permitted codes differ for each platform account and are defined in their service level agreement. + * @return transferCode + **/ + @ApiModelProperty(required = true, value = "The code related to the type of transfer being performed. >The permitted codes differ for each platform account and are defined in their service level agreement.") + @JsonProperty(JSON_PROPERTY_TRANSFER_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getTransferCode() { + return transferCode; + } + + + @JsonProperty(JSON_PROPERTY_TRANSFER_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTransferCode(String transferCode) { + this.transferCode = transferCode; + } + + + /** + * Return true if this TransferFundsRequest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TransferFundsRequest transferFundsRequest = (TransferFundsRequest) o; + return Objects.equals(this.amount, transferFundsRequest.amount) && + Objects.equals(this.destinationAccountCode, transferFundsRequest.destinationAccountCode) && + Objects.equals(this.merchantReference, transferFundsRequest.merchantReference) && + Objects.equals(this.sourceAccountCode, transferFundsRequest.sourceAccountCode) && + Objects.equals(this.transferCode, transferFundsRequest.transferCode); + } + + @Override + public int hashCode() { + return Objects.hash(amount, destinationAccountCode, merchantReference, sourceAccountCode, transferCode); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TransferFundsRequest {\n"); + sb.append(" amount: ").append(toIndentedString(amount)).append("\n"); + sb.append(" destinationAccountCode: ").append(toIndentedString(destinationAccountCode)).append("\n"); + sb.append(" merchantReference: ").append(toIndentedString(merchantReference)).append("\n"); + sb.append(" sourceAccountCode: ").append(toIndentedString(sourceAccountCode)).append("\n"); + sb.append(" transferCode: ").append(toIndentedString(transferCode)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line 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 TransferFundsRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of TransferFundsRequest + * @throws JsonProcessingException if the JSON string is invalid with respect to TransferFundsRequest + */ + public static TransferFundsRequest fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, TransferFundsRequest.class); + } +/** + * Convert an instance of TransferFundsRequest 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/marketpayfund/TransferFundsResponse.java b/src/main/java/com/adyen/model/marketpayfund/TransferFundsResponse.java new file mode 100644 index 000000000..19d176800 --- /dev/null +++ b/src/main/java/com/adyen/model/marketpayfund/TransferFundsResponse.java @@ -0,0 +1,233 @@ +/* + * Fund API + * This API is used for the classic integration. If you are just starting your implementation, refer to our [new integration guide](https://docs.adyen.com/marketplaces-and-platforms) instead. The Fund API provides endpoints for managing the funds in the accounts on your platform. These management operations include, for example, the transfer of funds from one account to another, the payout of funds to an account holder, and the retrieval of balances in an account. For more information, refer to our [documentation](https://docs.adyen.com/marketplaces-and-platforms/classic/). ## Authentication Your Adyen contact will provide your API credential and an API key. To connect to the API, add an `X-API-Key` header with the API key as the value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: YOUR_API_KEY\" \\ ... ``` Alternatively, you can use the username and password to connect to the API using basic authentication. For example: ``` curl -U \"ws@MarketPlace.YOUR_PLATFORM_ACCOUNT\":\"YOUR_WS_PASSWORD\" \\ -H \"Content-Type: application/json\" \\ ... ``` When going live, you need to generate new web service user credentials to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning The Fund API supports [versioning](https://docs.adyen.com/development-resources/versioning) using a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://cal-test.adyen.com/cal/services/Fund/v6/accountHolderBalance ``` + * + * The version of the OpenAPI document: 6 + * + * + * 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.marketpayfund; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.adyen.model.marketpayfund.ErrorFieldType; +import com.fasterxml.jackson.annotation.JsonInclude; +import 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; + + +/** + * TransferFundsResponse + */ +@JsonPropertyOrder({ + TransferFundsResponse.JSON_PROPERTY_INVALID_FIELDS, + TransferFundsResponse.JSON_PROPERTY_MERCHANT_REFERENCE, + TransferFundsResponse.JSON_PROPERTY_PSP_REFERENCE, + TransferFundsResponse.JSON_PROPERTY_RESULT_CODE +}) + +public class TransferFundsResponse { + public static final String JSON_PROPERTY_INVALID_FIELDS = "invalidFields"; + private List invalidFields = null; + + public static final String JSON_PROPERTY_MERCHANT_REFERENCE = "merchantReference"; + private String merchantReference; + + public static final String JSON_PROPERTY_PSP_REFERENCE = "pspReference"; + private String pspReference; + + public static final String JSON_PROPERTY_RESULT_CODE = "resultCode"; + private String resultCode; + + public TransferFundsResponse() { + } + + public TransferFundsResponse invalidFields(List invalidFields) { + this.invalidFields = invalidFields; + return this; + } + + public TransferFundsResponse addInvalidFieldsItem(ErrorFieldType invalidFieldsItem) { + if (this.invalidFields == null) { + this.invalidFields = new ArrayList<>(); + } + this.invalidFields.add(invalidFieldsItem); + return this; + } + + /** + * Contains field validation errors that would prevent requests from being processed. + * @return invalidFields + **/ + @ApiModelProperty(value = "Contains field validation errors that would prevent requests from being processed.") + @JsonProperty(JSON_PROPERTY_INVALID_FIELDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getInvalidFields() { + return invalidFields; + } + + + @JsonProperty(JSON_PROPERTY_INVALID_FIELDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setInvalidFields(List invalidFields) { + this.invalidFields = invalidFields; + } + + + public TransferFundsResponse merchantReference(String merchantReference) { + this.merchantReference = merchantReference; + return this; + } + + /** + * The value supplied by the executing user when initiating the transfer; may be used to link multiple transactions. + * @return merchantReference + **/ + @ApiModelProperty(value = "The value supplied by the executing user when initiating the transfer; may be used to link multiple transactions.") + @JsonProperty(JSON_PROPERTY_MERCHANT_REFERENCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getMerchantReference() { + return merchantReference; + } + + + @JsonProperty(JSON_PROPERTY_MERCHANT_REFERENCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMerchantReference(String merchantReference) { + this.merchantReference = merchantReference; + } + + + public TransferFundsResponse pspReference(String pspReference) { + this.pspReference = pspReference; + return this; + } + + /** + * The reference of a request. Can be used to uniquely identify the request. + * @return pspReference + **/ + @ApiModelProperty(value = "The reference of a request. Can be used to uniquely identify the request.") + @JsonProperty(JSON_PROPERTY_PSP_REFERENCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getPspReference() { + return pspReference; + } + + + @JsonProperty(JSON_PROPERTY_PSP_REFERENCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPspReference(String pspReference) { + this.pspReference = pspReference; + } + + + public TransferFundsResponse resultCode(String resultCode) { + this.resultCode = resultCode; + return this; + } + + /** + * The result code. + * @return resultCode + **/ + @ApiModelProperty(value = "The result code.") + @JsonProperty(JSON_PROPERTY_RESULT_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getResultCode() { + return resultCode; + } + + + @JsonProperty(JSON_PROPERTY_RESULT_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setResultCode(String resultCode) { + this.resultCode = resultCode; + } + + + /** + * Return true if this TransferFundsResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TransferFundsResponse transferFundsResponse = (TransferFundsResponse) o; + return Objects.equals(this.invalidFields, transferFundsResponse.invalidFields) && + Objects.equals(this.merchantReference, transferFundsResponse.merchantReference) && + Objects.equals(this.pspReference, transferFundsResponse.pspReference) && + Objects.equals(this.resultCode, transferFundsResponse.resultCode); + } + + @Override + public int hashCode() { + return Objects.hash(invalidFields, merchantReference, pspReference, resultCode); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TransferFundsResponse {\n"); + sb.append(" invalidFields: ").append(toIndentedString(invalidFields)).append("\n"); + sb.append(" merchantReference: ").append(toIndentedString(merchantReference)).append("\n"); + sb.append(" pspReference: ").append(toIndentedString(pspReference)).append("\n"); + sb.append(" resultCode: ").append(toIndentedString(resultCode)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line 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 TransferFundsResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of TransferFundsResponse + * @throws JsonProcessingException if the JSON string is invalid with respect to TransferFundsResponse + */ + public static TransferFundsResponse fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, TransferFundsResponse.class); + } +/** + * Convert an instance of TransferFundsResponse 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/marketpayhop/AbstractOpenApiSchema.java b/src/main/java/com/adyen/model/marketpayhop/AbstractOpenApiSchema.java new file mode 100644 index 000000000..90de9a3ed --- /dev/null +++ b/src/main/java/com/adyen/model/marketpayhop/AbstractOpenApiSchema.java @@ -0,0 +1,148 @@ +/* + * Hosted onboarding API + * This API is used for the classic integration. If you are just starting your implementation, refer to our [new integration guide](https://docs.adyen.com/marketplaces-and-platforms) instead. The Hosted onboarding API provides endpoints that you can use to generate links to Adyen-hosted pages, such as an [onboarding page](https://docs.adyen.com/marketplaces-and-platforms/classic/hosted-onboarding-page) or a [PCI compliance questionnaire](https://docs.adyen.com/marketplaces-and-platforms/classic/platforms-for-partners). You can provide these links to your account holders so that they can complete their onboarding. ## Authentication Your Adyen contact will provide your API credential and an API key. To connect to the API, add an `X-API-Key` header with the API key as the value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: YOUR_API_KEY\" \\ ... ``` Alternatively, you can use the username and password to connect to the API using basic authentication. For example: ``` curl -U \"ws@MarketPlace.YOUR_PLATFORM_ACCOUNT\":\"YOUR_WS_PASSWORD\" \\ -H \"Content-Type: application/json\" \\ ... ``` When going live, you need to generate new web service user credentials to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning The Hosted onboarding API supports [versioning](https://docs.adyen.com/development-resources/versioning) using a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://cal-test.adyen.com/cal/services/Hop/v6/getOnboardingUrl ``` + * + * The version of the OpenAPI document: 6 + * + * + * 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.marketpayhop; + +import java.util.Objects; +import java.lang.reflect.Type; +import java.util.Map; +import jakarta.ws.rs.core.GenericType; + +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Abstract class for oneOf,anyOf schemas defined in OpenAPI spec + */ + +public abstract class AbstractOpenApiSchema { + + // store the actual instance of the schema/object + private Object instance; + + // is nullable + private Boolean isNullable; + + // schema type (e.g. oneOf, anyOf) + private final String schemaType; + + public AbstractOpenApiSchema(String schemaType, Boolean isNullable) { + this.schemaType = schemaType; + this.isNullable = isNullable; + } + + /** + * Get the list of oneOf/anyOf composed schemas allowed to be stored in this object + * + * @return an instance of the actual schema/object + */ + public abstract Map getSchemas(); + + /** + * Get the actual instance + * + * @return an instance of the actual schema/object + */ + @JsonValue + public Object getActualInstance() {return instance;} + + /** + * Set the actual instance + * + * @param instance the actual instance of the schema/object + */ + public void setActualInstance(Object instance) {this.instance = instance;} + + /** + * Get the instant recursively when the schemas defined in oneOf/anyof happen to be oneOf/anyOf schema as well + * + * @return an instance of the actual schema/object + */ + public Object getActualInstanceRecursively() { + return getActualInstanceRecursively(this); + } + + private Object getActualInstanceRecursively(AbstractOpenApiSchema object) { + if (object.getActualInstance() == null) { + return null; + } else if (object.getActualInstance() instanceof AbstractOpenApiSchema) { + return getActualInstanceRecursively((AbstractOpenApiSchema)object.getActualInstance()); + } else { + return object.getActualInstance(); + } + } + + /** + * Get the schema type (e.g. anyOf, oneOf) + * + * @return the schema type + */ + public String getSchemaType() { + return schemaType; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ").append(getClass()).append(" {\n"); + sb.append(" instance: ").append(toIndentedString(instance)).append("\n"); + sb.append(" isNullable: ").append(toIndentedString(isNullable)).append("\n"); + sb.append(" schemaType: ").append(toIndentedString(schemaType)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AbstractOpenApiSchema a = (AbstractOpenApiSchema) o; + return Objects.equals(this.instance, a.instance) && + Objects.equals(this.isNullable, a.isNullable) && + Objects.equals(this.schemaType, a.schemaType); + } + + @Override + public int hashCode() { + return Objects.hash(instance, isNullable, schemaType); + } + + /** + * Is nullable + * + * @return true if it's nullable + */ + public Boolean isNullable() { + if (Boolean.TRUE.equals(isNullable)) { + return Boolean.TRUE; + } else { + return Boolean.FALSE; + } + } + + + +} diff --git a/src/main/java/com/adyen/model/marketpayhop/CollectInformation.java b/src/main/java/com/adyen/model/marketpayhop/CollectInformation.java new file mode 100644 index 000000000..cdb65460d --- /dev/null +++ b/src/main/java/com/adyen/model/marketpayhop/CollectInformation.java @@ -0,0 +1,284 @@ +/* + * Hosted onboarding API + * This API is used for the classic integration. If you are just starting your implementation, refer to our [new integration guide](https://docs.adyen.com/marketplaces-and-platforms) instead. The Hosted onboarding API provides endpoints that you can use to generate links to Adyen-hosted pages, such as an [onboarding page](https://docs.adyen.com/marketplaces-and-platforms/classic/hosted-onboarding-page) or a [PCI compliance questionnaire](https://docs.adyen.com/marketplaces-and-platforms/classic/platforms-for-partners). You can provide these links to your account holders so that they can complete their onboarding. ## Authentication Your Adyen contact will provide your API credential and an API key. To connect to the API, add an `X-API-Key` header with the API key as the value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: YOUR_API_KEY\" \\ ... ``` Alternatively, you can use the username and password to connect to the API using basic authentication. For example: ``` curl -U \"ws@MarketPlace.YOUR_PLATFORM_ACCOUNT\":\"YOUR_WS_PASSWORD\" \\ -H \"Content-Type: application/json\" \\ ... ``` When going live, you need to generate new web service user credentials to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning The Hosted onboarding API supports [versioning](https://docs.adyen.com/development-resources/versioning) using a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://cal-test.adyen.com/cal/services/Hop/v6/getOnboardingUrl ``` + * + * The version of the OpenAPI document: 6 + * + * + * 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.marketpayhop; + +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; + + +/** + * CollectInformation + */ +@JsonPropertyOrder({ + CollectInformation.JSON_PROPERTY_BANK_DETAILS, + CollectInformation.JSON_PROPERTY_BUSINESS_DETAILS, + CollectInformation.JSON_PROPERTY_INDIVIDUAL_DETAILS, + CollectInformation.JSON_PROPERTY_LEGAL_ARRANGEMENT_DETAILS, + CollectInformation.JSON_PROPERTY_PCI_QUESTIONNAIRE, + CollectInformation.JSON_PROPERTY_SHAREHOLDER_DETAILS +}) + +public class CollectInformation { + public static final String JSON_PROPERTY_BANK_DETAILS = "bankDetails"; + private Boolean bankDetails; + + public static final String JSON_PROPERTY_BUSINESS_DETAILS = "businessDetails"; + private Boolean businessDetails; + + public static final String JSON_PROPERTY_INDIVIDUAL_DETAILS = "individualDetails"; + private Boolean individualDetails; + + public static final String JSON_PROPERTY_LEGAL_ARRANGEMENT_DETAILS = "legalArrangementDetails"; + private Boolean legalArrangementDetails; + + public static final String JSON_PROPERTY_PCI_QUESTIONNAIRE = "pciQuestionnaire"; + private Boolean pciQuestionnaire; + + public static final String JSON_PROPERTY_SHAREHOLDER_DETAILS = "shareholderDetails"; + private Boolean shareholderDetails; + + public CollectInformation() { + } + + public CollectInformation bankDetails(Boolean bankDetails) { + this.bankDetails = bankDetails; + return this; + } + + /** + * Indicates whether [bank account details](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-checks/bank-account-check) must be collected. Default is **true**. + * @return bankDetails + **/ + @ApiModelProperty(value = "Indicates whether [bank account details](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-checks/bank-account-check) must be collected. Default is **true**.") + @JsonProperty(JSON_PROPERTY_BANK_DETAILS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getBankDetails() { + return bankDetails; + } + + + @JsonProperty(JSON_PROPERTY_BANK_DETAILS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setBankDetails(Boolean bankDetails) { + this.bankDetails = bankDetails; + } + + + public CollectInformation businessDetails(Boolean businessDetails) { + this.businessDetails = businessDetails; + return this; + } + + /** + * Indicates whether [business details](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-checks/company-check) must be collected. Default is **true**. + * @return businessDetails + **/ + @ApiModelProperty(value = "Indicates whether [business details](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-checks/company-check) must be collected. Default is **true**.") + @JsonProperty(JSON_PROPERTY_BUSINESS_DETAILS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getBusinessDetails() { + return businessDetails; + } + + + @JsonProperty(JSON_PROPERTY_BUSINESS_DETAILS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setBusinessDetails(Boolean businessDetails) { + this.businessDetails = businessDetails; + } + + + public CollectInformation individualDetails(Boolean individualDetails) { + this.individualDetails = individualDetails; + return this; + } + + /** + * Indicates whether [individual details](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-checks/identity-check) must be collected. Default is **true**. + * @return individualDetails + **/ + @ApiModelProperty(value = "Indicates whether [individual details](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-checks/identity-check) must be collected. Default is **true**.") + @JsonProperty(JSON_PROPERTY_INDIVIDUAL_DETAILS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getIndividualDetails() { + return individualDetails; + } + + + @JsonProperty(JSON_PROPERTY_INDIVIDUAL_DETAILS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setIndividualDetails(Boolean individualDetails) { + this.individualDetails = individualDetails; + } + + + public CollectInformation legalArrangementDetails(Boolean legalArrangementDetails) { + this.legalArrangementDetails = legalArrangementDetails; + return this; + } + + /** + * Indicates whether [legal arrangement details](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-checks/legal-arrangements) must be collected. Default is **true**. + * @return legalArrangementDetails + **/ + @ApiModelProperty(value = "Indicates whether [legal arrangement details](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-checks/legal-arrangements) must be collected. Default is **true**.") + @JsonProperty(JSON_PROPERTY_LEGAL_ARRANGEMENT_DETAILS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getLegalArrangementDetails() { + return legalArrangementDetails; + } + + + @JsonProperty(JSON_PROPERTY_LEGAL_ARRANGEMENT_DETAILS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setLegalArrangementDetails(Boolean legalArrangementDetails) { + this.legalArrangementDetails = legalArrangementDetails; + } + + + public CollectInformation pciQuestionnaire(Boolean pciQuestionnaire) { + this.pciQuestionnaire = pciQuestionnaire; + return this; + } + + /** + * Indicates whether answers to a [PCI questionnaire](https://docs.adyen.com/marketplaces-and-platforms/classic/platforms-for-partners#onboard-partner-platform) must be collected. Applies only to partner platforms. Default is **true**. + * @return pciQuestionnaire + **/ + @ApiModelProperty(value = "Indicates whether answers to a [PCI questionnaire](https://docs.adyen.com/marketplaces-and-platforms/classic/platforms-for-partners#onboard-partner-platform) must be collected. Applies only to partner platforms. Default is **true**.") + @JsonProperty(JSON_PROPERTY_PCI_QUESTIONNAIRE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getPciQuestionnaire() { + return pciQuestionnaire; + } + + + @JsonProperty(JSON_PROPERTY_PCI_QUESTIONNAIRE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPciQuestionnaire(Boolean pciQuestionnaire) { + this.pciQuestionnaire = pciQuestionnaire; + } + + + public CollectInformation shareholderDetails(Boolean shareholderDetails) { + this.shareholderDetails = shareholderDetails; + return this; + } + + /** + * Indicates whether [shareholder details](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-checks/identity-check) must be collected. Defaults to **true**. + * @return shareholderDetails + **/ + @ApiModelProperty(value = "Indicates whether [shareholder details](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-checks/identity-check) must be collected. Defaults to **true**.") + @JsonProperty(JSON_PROPERTY_SHAREHOLDER_DETAILS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getShareholderDetails() { + return shareholderDetails; + } + + + @JsonProperty(JSON_PROPERTY_SHAREHOLDER_DETAILS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setShareholderDetails(Boolean shareholderDetails) { + this.shareholderDetails = shareholderDetails; + } + + + /** + * Return true if this CollectInformation object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CollectInformation collectInformation = (CollectInformation) o; + return Objects.equals(this.bankDetails, collectInformation.bankDetails) && + Objects.equals(this.businessDetails, collectInformation.businessDetails) && + Objects.equals(this.individualDetails, collectInformation.individualDetails) && + Objects.equals(this.legalArrangementDetails, collectInformation.legalArrangementDetails) && + Objects.equals(this.pciQuestionnaire, collectInformation.pciQuestionnaire) && + Objects.equals(this.shareholderDetails, collectInformation.shareholderDetails); + } + + @Override + public int hashCode() { + return Objects.hash(bankDetails, businessDetails, individualDetails, legalArrangementDetails, pciQuestionnaire, shareholderDetails); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CollectInformation {\n"); + sb.append(" bankDetails: ").append(toIndentedString(bankDetails)).append("\n"); + sb.append(" businessDetails: ").append(toIndentedString(businessDetails)).append("\n"); + sb.append(" individualDetails: ").append(toIndentedString(individualDetails)).append("\n"); + sb.append(" legalArrangementDetails: ").append(toIndentedString(legalArrangementDetails)).append("\n"); + sb.append(" pciQuestionnaire: ").append(toIndentedString(pciQuestionnaire)).append("\n"); + sb.append(" shareholderDetails: ").append(toIndentedString(shareholderDetails)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line 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 CollectInformation given an JSON string + * + * @param jsonString JSON string + * @return An instance of CollectInformation + * @throws JsonProcessingException if the JSON string is invalid with respect to CollectInformation + */ + public static CollectInformation fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, CollectInformation.class); + } +/** + * Convert an instance of CollectInformation 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/marketpayhop/ErrorFieldType.java b/src/main/java/com/adyen/model/marketpayhop/ErrorFieldType.java new file mode 100644 index 000000000..5f40a5083 --- /dev/null +++ b/src/main/java/com/adyen/model/marketpayhop/ErrorFieldType.java @@ -0,0 +1,192 @@ +/* + * Hosted onboarding API + * This API is used for the classic integration. If you are just starting your implementation, refer to our [new integration guide](https://docs.adyen.com/marketplaces-and-platforms) instead. The Hosted onboarding API provides endpoints that you can use to generate links to Adyen-hosted pages, such as an [onboarding page](https://docs.adyen.com/marketplaces-and-platforms/classic/hosted-onboarding-page) or a [PCI compliance questionnaire](https://docs.adyen.com/marketplaces-and-platforms/classic/platforms-for-partners). You can provide these links to your account holders so that they can complete their onboarding. ## Authentication Your Adyen contact will provide your API credential and an API key. To connect to the API, add an `X-API-Key` header with the API key as the value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: YOUR_API_KEY\" \\ ... ``` Alternatively, you can use the username and password to connect to the API using basic authentication. For example: ``` curl -U \"ws@MarketPlace.YOUR_PLATFORM_ACCOUNT\":\"YOUR_WS_PASSWORD\" \\ -H \"Content-Type: application/json\" \\ ... ``` When going live, you need to generate new web service user credentials to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning The Hosted onboarding API supports [versioning](https://docs.adyen.com/development-resources/versioning) using a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://cal-test.adyen.com/cal/services/Hop/v6/getOnboardingUrl ``` + * + * The version of the OpenAPI document: 6 + * + * + * 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.marketpayhop; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.adyen.model.marketpayhop.FieldType; +import com.fasterxml.jackson.annotation.JsonInclude; +import 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; + + +/** + * ErrorFieldType + */ +@JsonPropertyOrder({ + ErrorFieldType.JSON_PROPERTY_ERROR_CODE, + ErrorFieldType.JSON_PROPERTY_ERROR_DESCRIPTION, + ErrorFieldType.JSON_PROPERTY_FIELD_TYPE +}) + +public class ErrorFieldType { + public static final String JSON_PROPERTY_ERROR_CODE = "errorCode"; + private Integer errorCode; + + public static final String JSON_PROPERTY_ERROR_DESCRIPTION = "errorDescription"; + private String errorDescription; + + public static final String JSON_PROPERTY_FIELD_TYPE = "fieldType"; + private FieldType fieldType; + + public ErrorFieldType() { + } + + public ErrorFieldType errorCode(Integer errorCode) { + this.errorCode = errorCode; + return this; + } + + /** + * The validation error code. + * @return errorCode + **/ + @ApiModelProperty(value = "The validation error code.") + @JsonProperty(JSON_PROPERTY_ERROR_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Integer getErrorCode() { + return errorCode; + } + + + @JsonProperty(JSON_PROPERTY_ERROR_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setErrorCode(Integer errorCode) { + this.errorCode = errorCode; + } + + + public ErrorFieldType errorDescription(String errorDescription) { + this.errorDescription = errorDescription; + return this; + } + + /** + * A description of the validation error. + * @return errorDescription + **/ + @ApiModelProperty(value = "A description of the validation error.") + @JsonProperty(JSON_PROPERTY_ERROR_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getErrorDescription() { + return errorDescription; + } + + + @JsonProperty(JSON_PROPERTY_ERROR_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setErrorDescription(String errorDescription) { + this.errorDescription = errorDescription; + } + + + public ErrorFieldType fieldType(FieldType fieldType) { + this.fieldType = fieldType; + return this; + } + + /** + * Get fieldType + * @return fieldType + **/ + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_FIELD_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public FieldType getFieldType() { + return fieldType; + } + + + @JsonProperty(JSON_PROPERTY_FIELD_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setFieldType(FieldType fieldType) { + this.fieldType = fieldType; + } + + + /** + * Return true if this ErrorFieldType object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ErrorFieldType errorFieldType = (ErrorFieldType) o; + return Objects.equals(this.errorCode, errorFieldType.errorCode) && + Objects.equals(this.errorDescription, errorFieldType.errorDescription) && + Objects.equals(this.fieldType, errorFieldType.fieldType); + } + + @Override + public int hashCode() { + return Objects.hash(errorCode, errorDescription, fieldType); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ErrorFieldType {\n"); + sb.append(" errorCode: ").append(toIndentedString(errorCode)).append("\n"); + sb.append(" errorDescription: ").append(toIndentedString(errorDescription)).append("\n"); + sb.append(" fieldType: ").append(toIndentedString(fieldType)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line 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 ErrorFieldType given an JSON string + * + * @param jsonString JSON string + * @return An instance of ErrorFieldType + * @throws JsonProcessingException if the JSON string is invalid with respect to ErrorFieldType + */ + public static ErrorFieldType fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, ErrorFieldType.class); + } +/** + * Convert an instance of ErrorFieldType 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/marketpayhop/FieldType.java b/src/main/java/com/adyen/model/marketpayhop/FieldType.java new file mode 100644 index 000000000..81e5d71de --- /dev/null +++ b/src/main/java/com/adyen/model/marketpayhop/FieldType.java @@ -0,0 +1,546 @@ +/* + * Hosted onboarding API + * This API is used for the classic integration. If you are just starting your implementation, refer to our [new integration guide](https://docs.adyen.com/marketplaces-and-platforms) instead. The Hosted onboarding API provides endpoints that you can use to generate links to Adyen-hosted pages, such as an [onboarding page](https://docs.adyen.com/marketplaces-and-platforms/classic/hosted-onboarding-page) or a [PCI compliance questionnaire](https://docs.adyen.com/marketplaces-and-platforms/classic/platforms-for-partners). You can provide these links to your account holders so that they can complete their onboarding. ## Authentication Your Adyen contact will provide your API credential and an API key. To connect to the API, add an `X-API-Key` header with the API key as the value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: YOUR_API_KEY\" \\ ... ``` Alternatively, you can use the username and password to connect to the API using basic authentication. For example: ``` curl -U \"ws@MarketPlace.YOUR_PLATFORM_ACCOUNT\":\"YOUR_WS_PASSWORD\" \\ -H \"Content-Type: application/json\" \\ ... ``` When going live, you need to generate new web service user credentials to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning The Hosted onboarding API supports [versioning](https://docs.adyen.com/development-resources/versioning) using a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://cal-test.adyen.com/cal/services/Hop/v6/getOnboardingUrl ``` + * + * The version of the OpenAPI document: 6 + * + * + * 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.marketpayhop; + +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; + + +/** + * FieldType + */ +@JsonPropertyOrder({ + FieldType.JSON_PROPERTY_FIELD, + FieldType.JSON_PROPERTY_FIELD_NAME, + FieldType.JSON_PROPERTY_SHAREHOLDER_CODE +}) + +public class FieldType { + public static final String JSON_PROPERTY_FIELD = "field"; + private String field; + + /** + * The type of the field. + */ + public enum FieldNameEnum { + ACCOUNTCODE("accountCode"), + + ACCOUNTHOLDERCODE("accountHolderCode"), + + ACCOUNTHOLDERDETAILS("accountHolderDetails"), + + ACCOUNTNUMBER("accountNumber"), + + ACCOUNTSTATETYPE("accountStateType"), + + ACCOUNTSTATUS("accountStatus"), + + ACCOUNTTYPE("accountType"), + + ADDRESS("address"), + + BALANCEACCOUNT("balanceAccount"), + + BALANCEACCOUNTACTIVE("balanceAccountActive"), + + BALANCEACCOUNTCODE("balanceAccountCode"), + + BALANCEACCOUNTID("balanceAccountId"), + + BANKACCOUNT("bankAccount"), + + BANKACCOUNTCODE("bankAccountCode"), + + BANKACCOUNTNAME("bankAccountName"), + + BANKACCOUNTUUID("bankAccountUUID"), + + BANKBICSWIFT("bankBicSwift"), + + BANKCITY("bankCity"), + + BANKCODE("bankCode"), + + BANKNAME("bankName"), + + BANKSTATEMENT("bankStatement"), + + BRANCHCODE("branchCode"), + + BUSINESSCONTACT("businessContact"), + + CARDTOKEN("cardToken"), + + CHECKCODE("checkCode"), + + CITY("city"), + + COMPANYREGISTRATION("companyRegistration"), + + CONSTITUTIONALDOCUMENT("constitutionalDocument"), + + CONTROLLER("controller"), + + COUNTRY("country"), + + COUNTRYCODE("countryCode"), + + CURRENCY("currency"), + + CURRENCYCODE("currencyCode"), + + DATEOFBIRTH("dateOfBirth"), + + DESCRIPTION("description"), + + DESTINATIONACCOUNTCODE("destinationAccountCode"), + + DOCUMENT("document"), + + DOCUMENTCONTENT("documentContent"), + + DOCUMENTEXPIRATIONDATE("documentExpirationDate"), + + DOCUMENTISSUERCOUNTRY("documentIssuerCountry"), + + DOCUMENTISSUERSTATE("documentIssuerState"), + + DOCUMENTNAME("documentName"), + + DOCUMENTNUMBER("documentNumber"), + + DOCUMENTTYPE("documentType"), + + DOINGBUSINESSAS("doingBusinessAs"), + + DRIVINGLICENCE("drivingLicence"), + + DRIVINGLICENCEBACK("drivingLicenceBack"), + + DRIVINGLICENCEFRONT("drivingLicenceFront"), + + DRIVINGLICENSE("drivingLicense"), + + EMAIL("email"), + + FIRSTNAME("firstName"), + + FORMTYPE("formType"), + + FULLPHONENUMBER("fullPhoneNumber"), + + GENDER("gender"), + + HOPWEBSERVICEUSER("hopWebserviceUser"), + + HOUSENUMBERORNAME("houseNumberOrName"), + + IBAN("iban"), + + IDCARD("idCard"), + + IDCARDBACK("idCardBack"), + + IDCARDFRONT("idCardFront"), + + IDNUMBER("idNumber"), + + IDENTITYDOCUMENT("identityDocument"), + + INDIVIDUALDETAILS("individualDetails"), + + INFIX("infix"), + + JOBTITLE("jobTitle"), + + LASTNAME("lastName"), + + LASTREVIEWDATE("lastReviewDate"), + + LEGALARRANGEMENT("legalArrangement"), + + LEGALARRANGEMENTCODE("legalArrangementCode"), + + LEGALARRANGEMENTENTITY("legalArrangementEntity"), + + LEGALARRANGEMENTENTITYCODE("legalArrangementEntityCode"), + + LEGALARRANGEMENTLEGALFORM("legalArrangementLegalForm"), + + LEGALARRANGEMENTMEMBER("legalArrangementMember"), + + LEGALARRANGEMENTMEMBERS("legalArrangementMembers"), + + LEGALARRANGEMENTNAME("legalArrangementName"), + + LEGALARRANGEMENTREFERENCE("legalArrangementReference"), + + LEGALARRANGEMENTREGISTRATIONNUMBER("legalArrangementRegistrationNumber"), + + LEGALARRANGEMENTTAXNUMBER("legalArrangementTaxNumber"), + + LEGALARRANGEMENTTYPE("legalArrangementType"), + + LEGALBUSINESSNAME("legalBusinessName"), + + LEGALENTITY("legalEntity"), + + LEGALENTITYTYPE("legalEntityType"), + + LOGO("logo"), + + MERCHANTACCOUNT("merchantAccount"), + + MERCHANTCATEGORYCODE("merchantCategoryCode"), + + MERCHANTHOUSENUMBER("merchantHouseNumber"), + + MERCHANTREFERENCE("merchantReference"), + + MICRODEPOSIT("microDeposit"), + + NAME("name"), + + NATIONALITY("nationality"), + + ORIGINALREFERENCE("originalReference"), + + OWNERCITY("ownerCity"), + + OWNERCOUNTRYCODE("ownerCountryCode"), + + OWNERDATEOFBIRTH("ownerDateOfBirth"), + + OWNERHOUSENUMBERORNAME("ownerHouseNumberOrName"), + + OWNERNAME("ownerName"), + + OWNERPOSTALCODE("ownerPostalCode"), + + OWNERSTATE("ownerState"), + + OWNERSTREET("ownerStreet"), + + PASSPORT("passport"), + + PASSPORTNUMBER("passportNumber"), + + PAYOUTMETHOD("payoutMethod"), + + PAYOUTMETHODCODE("payoutMethodCode"), + + PAYOUTSCHEDULE("payoutSchedule"), + + PCISELFASSESSMENT("pciSelfAssessment"), + + PERSONALDATA("personalData"), + + PHONECOUNTRYCODE("phoneCountryCode"), + + PHONENUMBER("phoneNumber"), + + POSTALCODE("postalCode"), + + PRIMARYCURRENCY("primaryCurrency"), + + REASON("reason"), + + REGISTRATIONNUMBER("registrationNumber"), + + RETURNURL("returnUrl"), + + SCHEDULE("schedule"), + + SHAREHOLDER("shareholder"), + + SHAREHOLDERCODE("shareholderCode"), + + SHAREHOLDERCODEANDSIGNATORYCODE("shareholderCodeAndSignatoryCode"), + + SHAREHOLDERCODEORSIGNATORYCODE("shareholderCodeOrSignatoryCode"), + + SHAREHOLDERTYPE("shareholderType"), + + SHAREHOLDERTYPES("shareholderTypes"), + + SHOPPERINTERACTION("shopperInteraction"), + + SIGNATORY("signatory"), + + SIGNATORYCODE("signatoryCode"), + + SOCIALSECURITYNUMBER("socialSecurityNumber"), + + SOURCEACCOUNTCODE("sourceAccountCode"), + + SPLITACCOUNT("splitAccount"), + + SPLITCONFIGURATIONUUID("splitConfigurationUUID"), + + SPLITCURRENCY("splitCurrency"), + + SPLITVALUE("splitValue"), + + SPLITS("splits"), + + STATEORPROVINCE("stateOrProvince"), + + STATUS("status"), + + STOCKEXCHANGE("stockExchange"), + + STOCKNUMBER("stockNumber"), + + STOCKTICKER("stockTicker"), + + STORE("store"), + + STOREDETAIL("storeDetail"), + + STORENAME("storeName"), + + STOREREFERENCE("storeReference"), + + STREET("street"), + + TAXID("taxId"), + + TIER("tier"), + + TIERNUMBER("tierNumber"), + + TRANSFERCODE("transferCode"), + + ULTIMATEPARENTCOMPANY("ultimateParentCompany"), + + ULTIMATEPARENTCOMPANYADDRESSDETAILS("ultimateParentCompanyAddressDetails"), + + ULTIMATEPARENTCOMPANYADDRESSDETAILSCOUNTRY("ultimateParentCompanyAddressDetailsCountry"), + + ULTIMATEPARENTCOMPANYBUSINESSDETAILS("ultimateParentCompanyBusinessDetails"), + + ULTIMATEPARENTCOMPANYBUSINESSDETAILSLEGALBUSINESSNAME("ultimateParentCompanyBusinessDetailsLegalBusinessName"), + + ULTIMATEPARENTCOMPANYBUSINESSDETAILSREGISTRATIONNUMBER("ultimateParentCompanyBusinessDetailsRegistrationNumber"), + + ULTIMATEPARENTCOMPANYCODE("ultimateParentCompanyCode"), + + ULTIMATEPARENTCOMPANYSTOCKEXCHANGE("ultimateParentCompanyStockExchange"), + + ULTIMATEPARENTCOMPANYSTOCKNUMBER("ultimateParentCompanyStockNumber"), + + ULTIMATEPARENTCOMPANYSTOCKNUMBERORSTOCKTICKER("ultimateParentCompanyStockNumberOrStockTicker"), + + ULTIMATEPARENTCOMPANYSTOCKTICKER("ultimateParentCompanyStockTicker"), + + UNKNOWN("unknown"), + + VALUE("value"), + + VERIFICATIONTYPE("verificationType"), + + VIRTUALACCOUNT("virtualAccount"), + + VISANUMBER("visaNumber"), + + WEBADDRESS("webAddress"), + + YEAR("year"); + + private String value; + + FieldNameEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static FieldNameEnum fromValue(String value) { + for (FieldNameEnum b : FieldNameEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_FIELD_NAME = "fieldName"; + private FieldNameEnum fieldName; + + public static final String JSON_PROPERTY_SHAREHOLDER_CODE = "shareholderCode"; + private String shareholderCode; + + public FieldType() { + } + + public FieldType field(String field) { + this.field = field; + return this; + } + + /** + * The full name of the property. + * @return field + **/ + @ApiModelProperty(value = "The full name of the property.") + @JsonProperty(JSON_PROPERTY_FIELD) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getField() { + return field; + } + + + @JsonProperty(JSON_PROPERTY_FIELD) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setField(String field) { + this.field = field; + } + + + public FieldType fieldName(FieldNameEnum fieldName) { + this.fieldName = fieldName; + return this; + } + + /** + * The type of the field. + * @return fieldName + **/ + @ApiModelProperty(value = "The type of the field.") + @JsonProperty(JSON_PROPERTY_FIELD_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public FieldNameEnum getFieldName() { + return fieldName; + } + + + @JsonProperty(JSON_PROPERTY_FIELD_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setFieldName(FieldNameEnum fieldName) { + this.fieldName = fieldName; + } + + + public FieldType shareholderCode(String shareholderCode) { + this.shareholderCode = shareholderCode; + return this; + } + + /** + * The code of the shareholder that the field belongs to. If empty, the field belongs to an account holder. + * @return shareholderCode + **/ + @ApiModelProperty(value = "The code of the shareholder that the field belongs to. If empty, the field belongs to an account holder.") + @JsonProperty(JSON_PROPERTY_SHAREHOLDER_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getShareholderCode() { + return shareholderCode; + } + + + @JsonProperty(JSON_PROPERTY_SHAREHOLDER_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setShareholderCode(String shareholderCode) { + this.shareholderCode = shareholderCode; + } + + + /** + * Return true if this FieldType object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FieldType fieldType = (FieldType) o; + return Objects.equals(this.field, fieldType.field) && + Objects.equals(this.fieldName, fieldType.fieldName) && + Objects.equals(this.shareholderCode, fieldType.shareholderCode); + } + + @Override + public int hashCode() { + return Objects.hash(field, fieldName, shareholderCode); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FieldType {\n"); + sb.append(" field: ").append(toIndentedString(field)).append("\n"); + sb.append(" fieldName: ").append(toIndentedString(fieldName)).append("\n"); + sb.append(" shareholderCode: ").append(toIndentedString(shareholderCode)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line 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 FieldType given an JSON string + * + * @param jsonString JSON string + * @return An instance of FieldType + * @throws JsonProcessingException if the JSON string is invalid with respect to FieldType + */ + public static FieldType fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, FieldType.class); + } +/** + * Convert an instance of FieldType 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/marketpayhop/GetOnboardingUrlRequest.java b/src/main/java/com/adyen/model/marketpayhop/GetOnboardingUrlRequest.java new file mode 100644 index 000000000..63a8d031b --- /dev/null +++ b/src/main/java/com/adyen/model/marketpayhop/GetOnboardingUrlRequest.java @@ -0,0 +1,348 @@ +/* + * Hosted onboarding API + * This API is used for the classic integration. If you are just starting your implementation, refer to our [new integration guide](https://docs.adyen.com/marketplaces-and-platforms) instead. The Hosted onboarding API provides endpoints that you can use to generate links to Adyen-hosted pages, such as an [onboarding page](https://docs.adyen.com/marketplaces-and-platforms/classic/hosted-onboarding-page) or a [PCI compliance questionnaire](https://docs.adyen.com/marketplaces-and-platforms/classic/platforms-for-partners). You can provide these links to your account holders so that they can complete their onboarding. ## Authentication Your Adyen contact will provide your API credential and an API key. To connect to the API, add an `X-API-Key` header with the API key as the value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: YOUR_API_KEY\" \\ ... ``` Alternatively, you can use the username and password to connect to the API using basic authentication. For example: ``` curl -U \"ws@MarketPlace.YOUR_PLATFORM_ACCOUNT\":\"YOUR_WS_PASSWORD\" \\ -H \"Content-Type: application/json\" \\ ... ``` When going live, you need to generate new web service user credentials to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning The Hosted onboarding API supports [versioning](https://docs.adyen.com/development-resources/versioning) using a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://cal-test.adyen.com/cal/services/Hop/v6/getOnboardingUrl ``` + * + * The version of the OpenAPI document: 6 + * + * + * 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.marketpayhop; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.adyen.model.marketpayhop.CollectInformation; +import com.adyen.model.marketpayhop.ShowPages; +import com.fasterxml.jackson.annotation.JsonInclude; +import 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; + + +/** + * GetOnboardingUrlRequest + */ +@JsonPropertyOrder({ + GetOnboardingUrlRequest.JSON_PROPERTY_ACCOUNT_HOLDER_CODE, + GetOnboardingUrlRequest.JSON_PROPERTY_COLLECT_INFORMATION, + GetOnboardingUrlRequest.JSON_PROPERTY_EDIT_MODE, + GetOnboardingUrlRequest.JSON_PROPERTY_MOBILE_O_AUTH_CALLBACK_URL, + GetOnboardingUrlRequest.JSON_PROPERTY_PLATFORM_NAME, + GetOnboardingUrlRequest.JSON_PROPERTY_RETURN_URL, + GetOnboardingUrlRequest.JSON_PROPERTY_SHOPPER_LOCALE, + GetOnboardingUrlRequest.JSON_PROPERTY_SHOW_PAGES +}) + +public class GetOnboardingUrlRequest { + public static final String JSON_PROPERTY_ACCOUNT_HOLDER_CODE = "accountHolderCode"; + private String accountHolderCode; + + public static final String JSON_PROPERTY_COLLECT_INFORMATION = "collectInformation"; + private CollectInformation collectInformation; + + public static final String JSON_PROPERTY_EDIT_MODE = "editMode"; + private Boolean editMode; + + public static final String JSON_PROPERTY_MOBILE_O_AUTH_CALLBACK_URL = "mobileOAuthCallbackUrl"; + private String mobileOAuthCallbackUrl; + + public static final String JSON_PROPERTY_PLATFORM_NAME = "platformName"; + private String platformName; + + public static final String JSON_PROPERTY_RETURN_URL = "returnUrl"; + private String returnUrl; + + public static final String JSON_PROPERTY_SHOPPER_LOCALE = "shopperLocale"; + private String shopperLocale; + + public static final String JSON_PROPERTY_SHOW_PAGES = "showPages"; + private ShowPages showPages; + + public GetOnboardingUrlRequest() { + } + + public GetOnboardingUrlRequest accountHolderCode(String accountHolderCode) { + this.accountHolderCode = accountHolderCode; + return this; + } + + /** + * The account holder code you provided when you created the account holder. + * @return accountHolderCode + **/ + @ApiModelProperty(required = true, value = "The account holder code you provided when you created the account holder.") + @JsonProperty(JSON_PROPERTY_ACCOUNT_HOLDER_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getAccountHolderCode() { + return accountHolderCode; + } + + + @JsonProperty(JSON_PROPERTY_ACCOUNT_HOLDER_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAccountHolderCode(String accountHolderCode) { + this.accountHolderCode = accountHolderCode; + } + + + public GetOnboardingUrlRequest collectInformation(CollectInformation collectInformation) { + this.collectInformation = collectInformation; + return this; + } + + /** + * Get collectInformation + * @return collectInformation + **/ + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_COLLECT_INFORMATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public CollectInformation getCollectInformation() { + return collectInformation; + } + + + @JsonProperty(JSON_PROPERTY_COLLECT_INFORMATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCollectInformation(CollectInformation collectInformation) { + this.collectInformation = collectInformation; + } + + + public GetOnboardingUrlRequest editMode(Boolean editMode) { + this.editMode = editMode; + return this; + } + + /** + * Indicates if editing checks is allowed even if all the checks have passed. + * @return editMode + **/ + @ApiModelProperty(value = "Indicates if editing checks is allowed even if all the checks have passed.") + @JsonProperty(JSON_PROPERTY_EDIT_MODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getEditMode() { + return editMode; + } + + + @JsonProperty(JSON_PROPERTY_EDIT_MODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEditMode(Boolean editMode) { + this.editMode = editMode; + } + + + public GetOnboardingUrlRequest mobileOAuthCallbackUrl(String mobileOAuthCallbackUrl) { + this.mobileOAuthCallbackUrl = mobileOAuthCallbackUrl; + return this; + } + + /** + * The URL to which the account holder is redirected after completing an OAuth authentication with a bank through Trustly/PayMyBank. + * @return mobileOAuthCallbackUrl + **/ + @ApiModelProperty(value = "The URL to which the account holder is redirected after completing an OAuth authentication with a bank through Trustly/PayMyBank.") + @JsonProperty(JSON_PROPERTY_MOBILE_O_AUTH_CALLBACK_URL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getMobileOAuthCallbackUrl() { + return mobileOAuthCallbackUrl; + } + + + @JsonProperty(JSON_PROPERTY_MOBILE_O_AUTH_CALLBACK_URL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMobileOAuthCallbackUrl(String mobileOAuthCallbackUrl) { + this.mobileOAuthCallbackUrl = mobileOAuthCallbackUrl; + } + + + public GetOnboardingUrlRequest platformName(String platformName) { + this.platformName = platformName; + return this; + } + + /** + * The platform name which will show up in the welcome page. + * @return platformName + **/ + @ApiModelProperty(value = "The platform name which will show up in the welcome page.") + @JsonProperty(JSON_PROPERTY_PLATFORM_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getPlatformName() { + return platformName; + } + + + @JsonProperty(JSON_PROPERTY_PLATFORM_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPlatformName(String platformName) { + this.platformName = platformName; + } + + + public GetOnboardingUrlRequest returnUrl(String returnUrl) { + this.returnUrl = returnUrl; + return this; + } + + /** + * The URL where the account holder will be redirected back to after they complete the onboarding, or if their session times out. Maximum length of 500 characters. If you don't provide this, the account holder will be redirected back to the default return URL configured in your platform account. + * @return returnUrl + **/ + @ApiModelProperty(value = "The URL where the account holder will be redirected back to after they complete the onboarding, or if their session times out. Maximum length of 500 characters. If you don't provide this, the account holder will be redirected back to the default return URL configured in your platform account.") + @JsonProperty(JSON_PROPERTY_RETURN_URL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getReturnUrl() { + return returnUrl; + } + + + @JsonProperty(JSON_PROPERTY_RETURN_URL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setReturnUrl(String returnUrl) { + this.returnUrl = returnUrl; + } + + + public GetOnboardingUrlRequest shopperLocale(String shopperLocale) { + this.shopperLocale = shopperLocale; + return this; + } + + /** + * The language to be used in the page, specified by a combination of a language and country code. For example, **pt-BR**. If not specified in the request or if the language is not supported, the page uses the browser language. If the browser language is not supported, the page uses **en-US** by default. For a list of supported languages, refer to [Change the page language](https://docs.adyen.com/marketplaces-and-platforms/classic/hosted-onboarding-page/customize-experience#change-page-language). + * @return shopperLocale + **/ + @ApiModelProperty(value = "The language to be used in the page, specified by a combination of a language and country code. For example, **pt-BR**. If not specified in the request or if the language is not supported, the page uses the browser language. If the browser language is not supported, the page uses **en-US** by default. For a list of supported languages, refer to [Change the page language](https://docs.adyen.com/marketplaces-and-platforms/classic/hosted-onboarding-page/customize-experience#change-page-language).") + @JsonProperty(JSON_PROPERTY_SHOPPER_LOCALE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getShopperLocale() { + return shopperLocale; + } + + + @JsonProperty(JSON_PROPERTY_SHOPPER_LOCALE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setShopperLocale(String shopperLocale) { + this.shopperLocale = shopperLocale; + } + + + public GetOnboardingUrlRequest showPages(ShowPages showPages) { + this.showPages = showPages; + return this; + } + + /** + * Get showPages + * @return showPages + **/ + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_SHOW_PAGES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public ShowPages getShowPages() { + return showPages; + } + + + @JsonProperty(JSON_PROPERTY_SHOW_PAGES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setShowPages(ShowPages showPages) { + this.showPages = showPages; + } + + + /** + * Return true if this GetOnboardingUrlRequest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetOnboardingUrlRequest getOnboardingUrlRequest = (GetOnboardingUrlRequest) o; + return Objects.equals(this.accountHolderCode, getOnboardingUrlRequest.accountHolderCode) && + Objects.equals(this.collectInformation, getOnboardingUrlRequest.collectInformation) && + Objects.equals(this.editMode, getOnboardingUrlRequest.editMode) && + Objects.equals(this.mobileOAuthCallbackUrl, getOnboardingUrlRequest.mobileOAuthCallbackUrl) && + Objects.equals(this.platformName, getOnboardingUrlRequest.platformName) && + Objects.equals(this.returnUrl, getOnboardingUrlRequest.returnUrl) && + Objects.equals(this.shopperLocale, getOnboardingUrlRequest.shopperLocale) && + Objects.equals(this.showPages, getOnboardingUrlRequest.showPages); + } + + @Override + public int hashCode() { + return Objects.hash(accountHolderCode, collectInformation, editMode, mobileOAuthCallbackUrl, platformName, returnUrl, shopperLocale, showPages); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetOnboardingUrlRequest {\n"); + sb.append(" accountHolderCode: ").append(toIndentedString(accountHolderCode)).append("\n"); + sb.append(" collectInformation: ").append(toIndentedString(collectInformation)).append("\n"); + sb.append(" editMode: ").append(toIndentedString(editMode)).append("\n"); + sb.append(" mobileOAuthCallbackUrl: ").append(toIndentedString(mobileOAuthCallbackUrl)).append("\n"); + sb.append(" platformName: ").append(toIndentedString(platformName)).append("\n"); + sb.append(" returnUrl: ").append(toIndentedString(returnUrl)).append("\n"); + sb.append(" shopperLocale: ").append(toIndentedString(shopperLocale)).append("\n"); + sb.append(" showPages: ").append(toIndentedString(showPages)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line 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 GetOnboardingUrlRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of GetOnboardingUrlRequest + * @throws JsonProcessingException if the JSON string is invalid with respect to GetOnboardingUrlRequest + */ + public static GetOnboardingUrlRequest fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, GetOnboardingUrlRequest.class); + } +/** + * Convert an instance of GetOnboardingUrlRequest 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/marketpayhop/GetOnboardingUrlResponse.java b/src/main/java/com/adyen/model/marketpayhop/GetOnboardingUrlResponse.java new file mode 100644 index 000000000..3fb20988e --- /dev/null +++ b/src/main/java/com/adyen/model/marketpayhop/GetOnboardingUrlResponse.java @@ -0,0 +1,233 @@ +/* + * Hosted onboarding API + * This API is used for the classic integration. If you are just starting your implementation, refer to our [new integration guide](https://docs.adyen.com/marketplaces-and-platforms) instead. The Hosted onboarding API provides endpoints that you can use to generate links to Adyen-hosted pages, such as an [onboarding page](https://docs.adyen.com/marketplaces-and-platforms/classic/hosted-onboarding-page) or a [PCI compliance questionnaire](https://docs.adyen.com/marketplaces-and-platforms/classic/platforms-for-partners). You can provide these links to your account holders so that they can complete their onboarding. ## Authentication Your Adyen contact will provide your API credential and an API key. To connect to the API, add an `X-API-Key` header with the API key as the value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: YOUR_API_KEY\" \\ ... ``` Alternatively, you can use the username and password to connect to the API using basic authentication. For example: ``` curl -U \"ws@MarketPlace.YOUR_PLATFORM_ACCOUNT\":\"YOUR_WS_PASSWORD\" \\ -H \"Content-Type: application/json\" \\ ... ``` When going live, you need to generate new web service user credentials to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning The Hosted onboarding API supports [versioning](https://docs.adyen.com/development-resources/versioning) using a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://cal-test.adyen.com/cal/services/Hop/v6/getOnboardingUrl ``` + * + * The version of the OpenAPI document: 6 + * + * + * 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.marketpayhop; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.adyen.model.marketpayhop.ErrorFieldType; +import com.fasterxml.jackson.annotation.JsonInclude; +import 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; + + +/** + * GetOnboardingUrlResponse + */ +@JsonPropertyOrder({ + GetOnboardingUrlResponse.JSON_PROPERTY_INVALID_FIELDS, + GetOnboardingUrlResponse.JSON_PROPERTY_PSP_REFERENCE, + GetOnboardingUrlResponse.JSON_PROPERTY_REDIRECT_URL, + GetOnboardingUrlResponse.JSON_PROPERTY_RESULT_CODE +}) + +public class GetOnboardingUrlResponse { + public static final String JSON_PROPERTY_INVALID_FIELDS = "invalidFields"; + private List invalidFields = null; + + public static final String JSON_PROPERTY_PSP_REFERENCE = "pspReference"; + private String pspReference; + + public static final String JSON_PROPERTY_REDIRECT_URL = "redirectUrl"; + private String redirectUrl; + + public static final String JSON_PROPERTY_RESULT_CODE = "resultCode"; + private String resultCode; + + public GetOnboardingUrlResponse() { + } + + public GetOnboardingUrlResponse invalidFields(List invalidFields) { + this.invalidFields = invalidFields; + return this; + } + + public GetOnboardingUrlResponse addInvalidFieldsItem(ErrorFieldType invalidFieldsItem) { + if (this.invalidFields == null) { + this.invalidFields = new ArrayList<>(); + } + this.invalidFields.add(invalidFieldsItem); + return this; + } + + /** + * Information about any invalid fields. + * @return invalidFields + **/ + @ApiModelProperty(value = "Information about any invalid fields.") + @JsonProperty(JSON_PROPERTY_INVALID_FIELDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getInvalidFields() { + return invalidFields; + } + + + @JsonProperty(JSON_PROPERTY_INVALID_FIELDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setInvalidFields(List invalidFields) { + this.invalidFields = invalidFields; + } + + + public GetOnboardingUrlResponse pspReference(String pspReference) { + this.pspReference = pspReference; + return this; + } + + /** + * The reference of a request. Can be used to uniquely identify the request. + * @return pspReference + **/ + @ApiModelProperty(value = "The reference of a request. Can be used to uniquely identify the request.") + @JsonProperty(JSON_PROPERTY_PSP_REFERENCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getPspReference() { + return pspReference; + } + + + @JsonProperty(JSON_PROPERTY_PSP_REFERENCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPspReference(String pspReference) { + this.pspReference = pspReference; + } + + + public GetOnboardingUrlResponse redirectUrl(String redirectUrl) { + this.redirectUrl = redirectUrl; + return this; + } + + /** + * The URL to the Hosted Onboarding Page where you should redirect your sub-merchant. This URL must be used within 30 seconds and can only be used once. + * @return redirectUrl + **/ + @ApiModelProperty(value = "The URL to the Hosted Onboarding Page where you should redirect your sub-merchant. This URL must be used within 30 seconds and can only be used once.") + @JsonProperty(JSON_PROPERTY_REDIRECT_URL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getRedirectUrl() { + return redirectUrl; + } + + + @JsonProperty(JSON_PROPERTY_REDIRECT_URL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setRedirectUrl(String redirectUrl) { + this.redirectUrl = redirectUrl; + } + + + public GetOnboardingUrlResponse resultCode(String resultCode) { + this.resultCode = resultCode; + return this; + } + + /** + * The result code. + * @return resultCode + **/ + @ApiModelProperty(value = "The result code.") + @JsonProperty(JSON_PROPERTY_RESULT_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getResultCode() { + return resultCode; + } + + + @JsonProperty(JSON_PROPERTY_RESULT_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setResultCode(String resultCode) { + this.resultCode = resultCode; + } + + + /** + * Return true if this GetOnboardingUrlResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetOnboardingUrlResponse getOnboardingUrlResponse = (GetOnboardingUrlResponse) o; + return Objects.equals(this.invalidFields, getOnboardingUrlResponse.invalidFields) && + Objects.equals(this.pspReference, getOnboardingUrlResponse.pspReference) && + Objects.equals(this.redirectUrl, getOnboardingUrlResponse.redirectUrl) && + Objects.equals(this.resultCode, getOnboardingUrlResponse.resultCode); + } + + @Override + public int hashCode() { + return Objects.hash(invalidFields, pspReference, redirectUrl, resultCode); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetOnboardingUrlResponse {\n"); + sb.append(" invalidFields: ").append(toIndentedString(invalidFields)).append("\n"); + sb.append(" pspReference: ").append(toIndentedString(pspReference)).append("\n"); + sb.append(" redirectUrl: ").append(toIndentedString(redirectUrl)).append("\n"); + sb.append(" resultCode: ").append(toIndentedString(resultCode)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line 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 GetOnboardingUrlResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of GetOnboardingUrlResponse + * @throws JsonProcessingException if the JSON string is invalid with respect to GetOnboardingUrlResponse + */ + public static GetOnboardingUrlResponse fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, GetOnboardingUrlResponse.class); + } +/** + * Convert an instance of GetOnboardingUrlResponse 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/marketpayhop/GetPciUrlRequest.java b/src/main/java/com/adyen/model/marketpayhop/GetPciUrlRequest.java new file mode 100644 index 000000000..e4e85c593 --- /dev/null +++ b/src/main/java/com/adyen/model/marketpayhop/GetPciUrlRequest.java @@ -0,0 +1,160 @@ +/* + * Hosted onboarding API + * This API is used for the classic integration. If you are just starting your implementation, refer to our [new integration guide](https://docs.adyen.com/marketplaces-and-platforms) instead. The Hosted onboarding API provides endpoints that you can use to generate links to Adyen-hosted pages, such as an [onboarding page](https://docs.adyen.com/marketplaces-and-platforms/classic/hosted-onboarding-page) or a [PCI compliance questionnaire](https://docs.adyen.com/marketplaces-and-platforms/classic/platforms-for-partners). You can provide these links to your account holders so that they can complete their onboarding. ## Authentication Your Adyen contact will provide your API credential and an API key. To connect to the API, add an `X-API-Key` header with the API key as the value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: YOUR_API_KEY\" \\ ... ``` Alternatively, you can use the username and password to connect to the API using basic authentication. For example: ``` curl -U \"ws@MarketPlace.YOUR_PLATFORM_ACCOUNT\":\"YOUR_WS_PASSWORD\" \\ -H \"Content-Type: application/json\" \\ ... ``` When going live, you need to generate new web service user credentials to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning The Hosted onboarding API supports [versioning](https://docs.adyen.com/development-resources/versioning) using a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://cal-test.adyen.com/cal/services/Hop/v6/getOnboardingUrl ``` + * + * The version of the OpenAPI document: 6 + * + * + * 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.marketpayhop; + +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; + + +/** + * GetPciUrlRequest + */ +@JsonPropertyOrder({ + GetPciUrlRequest.JSON_PROPERTY_ACCOUNT_HOLDER_CODE, + GetPciUrlRequest.JSON_PROPERTY_RETURN_URL +}) + +public class GetPciUrlRequest { + public static final String JSON_PROPERTY_ACCOUNT_HOLDER_CODE = "accountHolderCode"; + private String accountHolderCode; + + public static final String JSON_PROPERTY_RETURN_URL = "returnUrl"; + private String returnUrl; + + public GetPciUrlRequest() { + } + + public GetPciUrlRequest accountHolderCode(String accountHolderCode) { + this.accountHolderCode = accountHolderCode; + return this; + } + + /** + * The account holder code you provided when you created the account holder. + * @return accountHolderCode + **/ + @ApiModelProperty(required = true, value = "The account holder code you provided when you created the account holder.") + @JsonProperty(JSON_PROPERTY_ACCOUNT_HOLDER_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getAccountHolderCode() { + return accountHolderCode; + } + + + @JsonProperty(JSON_PROPERTY_ACCOUNT_HOLDER_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAccountHolderCode(String accountHolderCode) { + this.accountHolderCode = accountHolderCode; + } + + + public GetPciUrlRequest returnUrl(String returnUrl) { + this.returnUrl = returnUrl; + return this; + } + + /** + * The URL where the account holder will be redirected back to after they fill out the questionnaire, or if their session times out. Maximum length of 500 characters. + * @return returnUrl + **/ + @ApiModelProperty(value = "The URL where the account holder will be redirected back to after they fill out the questionnaire, or if their session times out. Maximum length of 500 characters.") + @JsonProperty(JSON_PROPERTY_RETURN_URL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getReturnUrl() { + return returnUrl; + } + + + @JsonProperty(JSON_PROPERTY_RETURN_URL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setReturnUrl(String returnUrl) { + this.returnUrl = returnUrl; + } + + + /** + * Return true if this GetPciUrlRequest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetPciUrlRequest getPciUrlRequest = (GetPciUrlRequest) o; + return Objects.equals(this.accountHolderCode, getPciUrlRequest.accountHolderCode) && + Objects.equals(this.returnUrl, getPciUrlRequest.returnUrl); + } + + @Override + public int hashCode() { + return Objects.hash(accountHolderCode, returnUrl); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetPciUrlRequest {\n"); + sb.append(" accountHolderCode: ").append(toIndentedString(accountHolderCode)).append("\n"); + sb.append(" returnUrl: ").append(toIndentedString(returnUrl)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line 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 GetPciUrlRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of GetPciUrlRequest + * @throws JsonProcessingException if the JSON string is invalid with respect to GetPciUrlRequest + */ + public static GetPciUrlRequest fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, GetPciUrlRequest.class); + } +/** + * Convert an instance of GetPciUrlRequest 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/marketpayhop/GetPciUrlResponse.java b/src/main/java/com/adyen/model/marketpayhop/GetPciUrlResponse.java new file mode 100644 index 000000000..7808fcdb6 --- /dev/null +++ b/src/main/java/com/adyen/model/marketpayhop/GetPciUrlResponse.java @@ -0,0 +1,233 @@ +/* + * Hosted onboarding API + * This API is used for the classic integration. If you are just starting your implementation, refer to our [new integration guide](https://docs.adyen.com/marketplaces-and-platforms) instead. The Hosted onboarding API provides endpoints that you can use to generate links to Adyen-hosted pages, such as an [onboarding page](https://docs.adyen.com/marketplaces-and-platforms/classic/hosted-onboarding-page) or a [PCI compliance questionnaire](https://docs.adyen.com/marketplaces-and-platforms/classic/platforms-for-partners). You can provide these links to your account holders so that they can complete their onboarding. ## Authentication Your Adyen contact will provide your API credential and an API key. To connect to the API, add an `X-API-Key` header with the API key as the value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: YOUR_API_KEY\" \\ ... ``` Alternatively, you can use the username and password to connect to the API using basic authentication. For example: ``` curl -U \"ws@MarketPlace.YOUR_PLATFORM_ACCOUNT\":\"YOUR_WS_PASSWORD\" \\ -H \"Content-Type: application/json\" \\ ... ``` When going live, you need to generate new web service user credentials to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning The Hosted onboarding API supports [versioning](https://docs.adyen.com/development-resources/versioning) using a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://cal-test.adyen.com/cal/services/Hop/v6/getOnboardingUrl ``` + * + * The version of the OpenAPI document: 6 + * + * + * 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.marketpayhop; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.adyen.model.marketpayhop.ErrorFieldType; +import com.fasterxml.jackson.annotation.JsonInclude; +import 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; + + +/** + * GetPciUrlResponse + */ +@JsonPropertyOrder({ + GetPciUrlResponse.JSON_PROPERTY_INVALID_FIELDS, + GetPciUrlResponse.JSON_PROPERTY_PSP_REFERENCE, + GetPciUrlResponse.JSON_PROPERTY_REDIRECT_URL, + GetPciUrlResponse.JSON_PROPERTY_RESULT_CODE +}) + +public class GetPciUrlResponse { + public static final String JSON_PROPERTY_INVALID_FIELDS = "invalidFields"; + private List invalidFields = null; + + public static final String JSON_PROPERTY_PSP_REFERENCE = "pspReference"; + private String pspReference; + + public static final String JSON_PROPERTY_REDIRECT_URL = "redirectUrl"; + private String redirectUrl; + + public static final String JSON_PROPERTY_RESULT_CODE = "resultCode"; + private String resultCode; + + public GetPciUrlResponse() { + } + + public GetPciUrlResponse invalidFields(List invalidFields) { + this.invalidFields = invalidFields; + return this; + } + + public GetPciUrlResponse addInvalidFieldsItem(ErrorFieldType invalidFieldsItem) { + if (this.invalidFields == null) { + this.invalidFields = new ArrayList<>(); + } + this.invalidFields.add(invalidFieldsItem); + return this; + } + + /** + * Information about any invalid fields. + * @return invalidFields + **/ + @ApiModelProperty(value = "Information about any invalid fields.") + @JsonProperty(JSON_PROPERTY_INVALID_FIELDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getInvalidFields() { + return invalidFields; + } + + + @JsonProperty(JSON_PROPERTY_INVALID_FIELDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setInvalidFields(List invalidFields) { + this.invalidFields = invalidFields; + } + + + public GetPciUrlResponse pspReference(String pspReference) { + this.pspReference = pspReference; + return this; + } + + /** + * The reference of a request. Can be used to uniquely identify the request. + * @return pspReference + **/ + @ApiModelProperty(value = "The reference of a request. Can be used to uniquely identify the request.") + @JsonProperty(JSON_PROPERTY_PSP_REFERENCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getPspReference() { + return pspReference; + } + + + @JsonProperty(JSON_PROPERTY_PSP_REFERENCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPspReference(String pspReference) { + this.pspReference = pspReference; + } + + + public GetPciUrlResponse redirectUrl(String redirectUrl) { + this.redirectUrl = redirectUrl; + return this; + } + + /** + * The URL to the PCI compliance questionnaire where you should redirect your account holder. This URL must be used within 30 seconds and can only be used once. + * @return redirectUrl + **/ + @ApiModelProperty(value = "The URL to the PCI compliance questionnaire where you should redirect your account holder. This URL must be used within 30 seconds and can only be used once.") + @JsonProperty(JSON_PROPERTY_REDIRECT_URL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getRedirectUrl() { + return redirectUrl; + } + + + @JsonProperty(JSON_PROPERTY_REDIRECT_URL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setRedirectUrl(String redirectUrl) { + this.redirectUrl = redirectUrl; + } + + + public GetPciUrlResponse resultCode(String resultCode) { + this.resultCode = resultCode; + return this; + } + + /** + * The result code. + * @return resultCode + **/ + @ApiModelProperty(value = "The result code.") + @JsonProperty(JSON_PROPERTY_RESULT_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getResultCode() { + return resultCode; + } + + + @JsonProperty(JSON_PROPERTY_RESULT_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setResultCode(String resultCode) { + this.resultCode = resultCode; + } + + + /** + * Return true if this GetPciUrlResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetPciUrlResponse getPciUrlResponse = (GetPciUrlResponse) o; + return Objects.equals(this.invalidFields, getPciUrlResponse.invalidFields) && + Objects.equals(this.pspReference, getPciUrlResponse.pspReference) && + Objects.equals(this.redirectUrl, getPciUrlResponse.redirectUrl) && + Objects.equals(this.resultCode, getPciUrlResponse.resultCode); + } + + @Override + public int hashCode() { + return Objects.hash(invalidFields, pspReference, redirectUrl, resultCode); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetPciUrlResponse {\n"); + sb.append(" invalidFields: ").append(toIndentedString(invalidFields)).append("\n"); + sb.append(" pspReference: ").append(toIndentedString(pspReference)).append("\n"); + sb.append(" redirectUrl: ").append(toIndentedString(redirectUrl)).append("\n"); + sb.append(" resultCode: ").append(toIndentedString(resultCode)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line 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 GetPciUrlResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of GetPciUrlResponse + * @throws JsonProcessingException if the JSON string is invalid with respect to GetPciUrlResponse + */ + public static GetPciUrlResponse fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, GetPciUrlResponse.class); + } +/** + * Convert an instance of GetPciUrlResponse 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/marketpayhop/JSON.java b/src/main/java/com/adyen/model/marketpayhop/JSON.java new file mode 100644 index 000000000..cfe1f977f --- /dev/null +++ b/src/main/java/com/adyen/model/marketpayhop/JSON.java @@ -0,0 +1,251 @@ +package com.adyen.model.marketpayhop; + +import com.adyen.serializer.ByteArraySerializer; +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.*; +import com.fasterxml.jackson.databind.json.JsonMapper; +import com.fasterxml.jackson.databind.module.SimpleModule; +import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule; +import com.adyen.model.marketpayhop.*; + +import java.text.DateFormat; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Map; +import java.util.Set; +import jakarta.ws.rs.core.GenericType; +import jakarta.ws.rs.ext.ContextResolver; + +public class JSON implements ContextResolver { + private static ObjectMapper mapper; + + public JSON() { + mapper = new ObjectMapper(); + mapper.setSerializationInclusion(JsonInclude.Include.NON_NULL); + JsonMapper.builder().configure(MapperFeature.ALLOW_COERCION_OF_SCALARS, false); + mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); + mapper.configure(DeserializationFeature.FAIL_ON_INVALID_SUBTYPE, true); + mapper.disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS); + mapper.disable(DeserializationFeature.ADJUST_DATES_TO_CONTEXT_TIME_ZONE); + mapper.enable(SerializationFeature.WRITE_ENUMS_USING_TO_STRING); + mapper.enable(DeserializationFeature.READ_ENUMS_USING_TO_STRING); + mapper.registerModule(new JavaTimeModule()); + // Custom ByteSerializer + SimpleModule simpleModule = new SimpleModule(); + simpleModule.addSerializer(byte[].class, new ByteArraySerializer()); + mapper.registerModule(simpleModule); + } + + /** + * Set the date format for JSON (de)serialization with Date properties. + * @param dateFormat Date format + */ + public void setDateFormat(DateFormat dateFormat) { + mapper.setDateFormat(dateFormat); + } + + @Override + public ObjectMapper getContext(Class type) { + return mapper; + } + + /** + * Get the object mapper + * + * @return object mapper + */ + public static ObjectMapper getMapper() { return mapper; } + + /** + * Returns the target model class that should be used to deserialize the input data. + * The discriminator mappings are used to determine the target model class. + * + * @param node The input data. + * @param modelClass The class that contains the discriminator mappings. + */ + public static Class getClassForElement(JsonNode node, Class modelClass) { + ClassDiscriminatorMapping cdm = modelDiscriminators.get(modelClass); + if (cdm != null) { + return cdm.getClassForElement(node, new HashSet>()); + } + return null; + } + + /** + * Helper class to register the discriminator mappings. + */ + private static class ClassDiscriminatorMapping { + // The model class name. + Class modelClass; + // The name of the discriminator property. + String discriminatorName; + // The discriminator mappings for a model class. + Map> discriminatorMappings; + + // Constructs a new class discriminator. + ClassDiscriminatorMapping(Class cls, String propertyName, Map> mappings) { + modelClass = cls; + discriminatorName = propertyName; + discriminatorMappings = new HashMap>(); + if (mappings != null) { + discriminatorMappings.putAll(mappings); + } + } + + // Return the name of the discriminator property for this model class. + String getDiscriminatorPropertyName() { + return discriminatorName; + } + + // Return the discriminator value or null if the discriminator is not + // present in the payload. + String getDiscriminatorValue(JsonNode node) { + // Determine the value of the discriminator property in the input data. + if (discriminatorName != null) { + // Get the value of the discriminator property, if present in the input payload. + node = node.get(discriminatorName); + if (node != null && node.isValueNode()) { + String discrValue = node.asText(); + if (discrValue != null) { + return discrValue; + } + } + } + return null; + } + + /** + * Returns the target model class that should be used to deserialize the input data. + * This function can be invoked for anyOf/oneOf composed models with discriminator mappings. + * The discriminator mappings are used to determine the target model class. + * + * @param node The input data. + * @param visitedClasses The set of classes that have already been visited. + */ + Class getClassForElement(JsonNode node, Set> visitedClasses) { + if (visitedClasses.contains(modelClass)) { + // Class has already been visited. + return null; + } + // Determine the value of the discriminator property in the input data. + String discrValue = getDiscriminatorValue(node); + if (discrValue == null) { + return null; + } + Class cls = discriminatorMappings.get(discrValue); + // It may not be sufficient to return this cls directly because that target class + // may itself be a composed schema, possibly with its own discriminator. + visitedClasses.add(modelClass); + for (Class childClass : discriminatorMappings.values()) { + ClassDiscriminatorMapping childCdm = modelDiscriminators.get(childClass); + if (childCdm == null) { + continue; + } + if (!discriminatorName.equals(childCdm.discriminatorName)) { + discrValue = getDiscriminatorValue(node); + if (discrValue == null) { + continue; + } + } + if (childCdm != null) { + // Recursively traverse the discriminator mappings. + Class childDiscr = childCdm.getClassForElement(node, visitedClasses); + if (childDiscr != null) { + return childDiscr; + } + } + } + return cls; + } + } + + /** + * Returns true if inst is an instance of modelClass in the OpenAPI model hierarchy. + * + * The Java class hierarchy is not implemented the same way as the OpenAPI model hierarchy, + * so it's not possible to use the instanceof keyword. + * + * @param modelClass A OpenAPI model class. + * @param inst The instance object. + */ + public static boolean isInstanceOf(Class modelClass, Object inst, Set> visitedClasses) { + if (modelClass.isInstance(inst)) { + // This handles the 'allOf' use case with single parent inheritance. + return true; + } + if (visitedClasses.contains(modelClass)) { + // This is to prevent infinite recursion when the composed schemas have + // a circular dependency. + return false; + } + visitedClasses.add(modelClass); + + // Traverse the oneOf/anyOf composed schemas. + Map descendants = modelDescendants.get(modelClass); + if (descendants != null) { + for (GenericType childType : descendants.values()) { + if (isInstanceOf(childType.getRawType(), inst, visitedClasses)) { + return true; + } + } + } + return false; + } + + /** + * A map of discriminators for all model classes. + */ + private static Map, ClassDiscriminatorMapping> modelDiscriminators = new HashMap, ClassDiscriminatorMapping>(); + + /** + * A map of oneOf/anyOf descendants for each model class. + */ + private static Map, Map> modelDescendants = new HashMap, Map>(); + + /** + * Register a model class discriminator. + * + * @param modelClass the model class + * @param discriminatorPropertyName the name of the discriminator property + * @param mappings a map with the discriminator mappings. + */ + public static void registerDiscriminator(Class modelClass, String discriminatorPropertyName, Map> mappings) { + ClassDiscriminatorMapping m = new ClassDiscriminatorMapping(modelClass, discriminatorPropertyName, mappings); + modelDiscriminators.put(modelClass, m); + } + + /** + * Register the oneOf/anyOf descendants of the modelClass. + * + * @param modelClass the model class + * @param descendants a map of oneOf/anyOf descendants. + */ + public static void registerDescendants(Class modelClass, Map descendants) { + modelDescendants.put(modelClass, descendants); + } + + private static JSON json; + + static + { + json = new JSON(); + } + + /** + * Get the default JSON instance. + * + * @return the default JSON instance + */ + public static JSON getDefault() { + return json; + } + + /** + * Set the default JSON instance. + * + * @param json JSON instance to be used + */ + public static void setDefault(JSON json) { + JSON.json = json; + } +} diff --git a/src/main/java/com/adyen/model/marketpayhop/ServiceError.java b/src/main/java/com/adyen/model/marketpayhop/ServiceError.java new file mode 100644 index 000000000..019a20cf6 --- /dev/null +++ b/src/main/java/com/adyen/model/marketpayhop/ServiceError.java @@ -0,0 +1,253 @@ +/* + * Hosted onboarding API + * This API is used for the classic integration. If you are just starting your implementation, refer to our [new integration guide](https://docs.adyen.com/marketplaces-and-platforms) instead. The Hosted onboarding API provides endpoints that you can use to generate links to Adyen-hosted pages, such as an [onboarding page](https://docs.adyen.com/marketplaces-and-platforms/classic/hosted-onboarding-page) or a [PCI compliance questionnaire](https://docs.adyen.com/marketplaces-and-platforms/classic/platforms-for-partners). You can provide these links to your account holders so that they can complete their onboarding. ## Authentication Your Adyen contact will provide your API credential and an API key. To connect to the API, add an `X-API-Key` header with the API key as the value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: YOUR_API_KEY\" \\ ... ``` Alternatively, you can use the username and password to connect to the API using basic authentication. For example: ``` curl -U \"ws@MarketPlace.YOUR_PLATFORM_ACCOUNT\":\"YOUR_WS_PASSWORD\" \\ -H \"Content-Type: application/json\" \\ ... ``` When going live, you need to generate new web service user credentials to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning The Hosted onboarding API supports [versioning](https://docs.adyen.com/development-resources/versioning) using a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://cal-test.adyen.com/cal/services/Hop/v6/getOnboardingUrl ``` + * + * The version of the OpenAPI document: 6 + * + * + * 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.marketpayhop; + +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; + + +/** + * ServiceError + */ +@JsonPropertyOrder({ + ServiceError.JSON_PROPERTY_ERROR_CODE, + ServiceError.JSON_PROPERTY_ERROR_TYPE, + ServiceError.JSON_PROPERTY_MESSAGE, + ServiceError.JSON_PROPERTY_PSP_REFERENCE, + ServiceError.JSON_PROPERTY_STATUS +}) + +public class ServiceError { + public static final String JSON_PROPERTY_ERROR_CODE = "errorCode"; + private String errorCode; + + public static final String JSON_PROPERTY_ERROR_TYPE = "errorType"; + private String errorType; + + public static final String JSON_PROPERTY_MESSAGE = "message"; + private String message; + + public static final String JSON_PROPERTY_PSP_REFERENCE = "pspReference"; + private String pspReference; + + public static final String JSON_PROPERTY_STATUS = "status"; + private Integer status; + + public ServiceError() { + } + + public ServiceError errorCode(String errorCode) { + this.errorCode = errorCode; + return this; + } + + /** + * The error code mapped to the error message. + * @return errorCode + **/ + @ApiModelProperty(value = "The error code mapped to the error message.") + @JsonProperty(JSON_PROPERTY_ERROR_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getErrorCode() { + return errorCode; + } + + + @JsonProperty(JSON_PROPERTY_ERROR_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setErrorCode(String errorCode) { + this.errorCode = errorCode; + } + + + public ServiceError errorType(String errorType) { + this.errorType = errorType; + return this; + } + + /** + * The category of the error. + * @return errorType + **/ + @ApiModelProperty(value = "The category of the error.") + @JsonProperty(JSON_PROPERTY_ERROR_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getErrorType() { + return errorType; + } + + + @JsonProperty(JSON_PROPERTY_ERROR_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setErrorType(String errorType) { + this.errorType = errorType; + } + + + public ServiceError message(String message) { + this.message = message; + return this; + } + + /** + * A short explanation of the issue. + * @return message + **/ + @ApiModelProperty(value = "A short explanation of the issue.") + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getMessage() { + return message; + } + + + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMessage(String message) { + this.message = message; + } + + + public ServiceError pspReference(String pspReference) { + this.pspReference = pspReference; + return this; + } + + /** + * The PSP reference of the payment. + * @return pspReference + **/ + @ApiModelProperty(value = "The PSP reference of the payment.") + @JsonProperty(JSON_PROPERTY_PSP_REFERENCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getPspReference() { + return pspReference; + } + + + @JsonProperty(JSON_PROPERTY_PSP_REFERENCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPspReference(String pspReference) { + this.pspReference = pspReference; + } + + + public ServiceError status(Integer status) { + this.status = status; + return this; + } + + /** + * The HTTP response status. + * @return status + **/ + @ApiModelProperty(value = "The HTTP response status.") + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Integer getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setStatus(Integer status) { + this.status = status; + } + + + /** + * Return true if this ServiceError object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ServiceError serviceError = (ServiceError) o; + return Objects.equals(this.errorCode, serviceError.errorCode) && + Objects.equals(this.errorType, serviceError.errorType) && + Objects.equals(this.message, serviceError.message) && + Objects.equals(this.pspReference, serviceError.pspReference) && + Objects.equals(this.status, serviceError.status); + } + + @Override + public int hashCode() { + return Objects.hash(errorCode, errorType, message, pspReference, status); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ServiceError {\n"); + sb.append(" errorCode: ").append(toIndentedString(errorCode)).append("\n"); + sb.append(" errorType: ").append(toIndentedString(errorType)).append("\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append(" pspReference: ").append(toIndentedString(pspReference)).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 ServiceError given an JSON string + * + * @param jsonString JSON string + * @return An instance of ServiceError + * @throws JsonProcessingException if the JSON string is invalid with respect to ServiceError + */ + public static ServiceError fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, ServiceError.class); + } +/** + * Convert an instance of ServiceError 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/marketpayhop/ShowPages.java b/src/main/java/com/adyen/model/marketpayhop/ShowPages.java new file mode 100644 index 000000000..7b5937755 --- /dev/null +++ b/src/main/java/com/adyen/model/marketpayhop/ShowPages.java @@ -0,0 +1,377 @@ +/* + * Hosted onboarding API + * This API is used for the classic integration. If you are just starting your implementation, refer to our [new integration guide](https://docs.adyen.com/marketplaces-and-platforms) instead. The Hosted onboarding API provides endpoints that you can use to generate links to Adyen-hosted pages, such as an [onboarding page](https://docs.adyen.com/marketplaces-and-platforms/classic/hosted-onboarding-page) or a [PCI compliance questionnaire](https://docs.adyen.com/marketplaces-and-platforms/classic/platforms-for-partners). You can provide these links to your account holders so that they can complete their onboarding. ## Authentication Your Adyen contact will provide your API credential and an API key. To connect to the API, add an `X-API-Key` header with the API key as the value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: YOUR_API_KEY\" \\ ... ``` Alternatively, you can use the username and password to connect to the API using basic authentication. For example: ``` curl -U \"ws@MarketPlace.YOUR_PLATFORM_ACCOUNT\":\"YOUR_WS_PASSWORD\" \\ -H \"Content-Type: application/json\" \\ ... ``` When going live, you need to generate new web service user credentials to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning The Hosted onboarding API supports [versioning](https://docs.adyen.com/development-resources/versioning) using a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://cal-test.adyen.com/cal/services/Hop/v6/getOnboardingUrl ``` + * + * The version of the OpenAPI document: 6 + * + * + * 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.marketpayhop; + +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; + + +/** + * ShowPages + */ +@JsonPropertyOrder({ + ShowPages.JSON_PROPERTY_BANK_DETAILS_SUMMARY_PAGE, + ShowPages.JSON_PROPERTY_BANK_VERIFICATION_PAGE, + ShowPages.JSON_PROPERTY_BUSINESS_DETAILS_SUMMARY_PAGE, + ShowPages.JSON_PROPERTY_CHECKS_OVERVIEW_PAGE, + ShowPages.JSON_PROPERTY_INDIVIDUAL_DETAILS_SUMMARY_PAGE, + ShowPages.JSON_PROPERTY_LEGAL_ARRANGEMENTS_DETAILS_SUMMARY_PAGE, + ShowPages.JSON_PROPERTY_MANUAL_BANK_ACCOUNT_PAGE, + ShowPages.JSON_PROPERTY_SHAREHOLDER_DETAILS_SUMMARY_PAGE, + ShowPages.JSON_PROPERTY_WELCOME_PAGE +}) + +public class ShowPages { + public static final String JSON_PROPERTY_BANK_DETAILS_SUMMARY_PAGE = "bankDetailsSummaryPage"; + private Boolean bankDetailsSummaryPage; + + public static final String JSON_PROPERTY_BANK_VERIFICATION_PAGE = "bankVerificationPage"; + private Boolean bankVerificationPage; + + public static final String JSON_PROPERTY_BUSINESS_DETAILS_SUMMARY_PAGE = "businessDetailsSummaryPage"; + private Boolean businessDetailsSummaryPage; + + public static final String JSON_PROPERTY_CHECKS_OVERVIEW_PAGE = "checksOverviewPage"; + private Boolean checksOverviewPage; + + public static final String JSON_PROPERTY_INDIVIDUAL_DETAILS_SUMMARY_PAGE = "individualDetailsSummaryPage"; + private Boolean individualDetailsSummaryPage; + + public static final String JSON_PROPERTY_LEGAL_ARRANGEMENTS_DETAILS_SUMMARY_PAGE = "legalArrangementsDetailsSummaryPage"; + private Boolean legalArrangementsDetailsSummaryPage; + + public static final String JSON_PROPERTY_MANUAL_BANK_ACCOUNT_PAGE = "manualBankAccountPage"; + private Boolean manualBankAccountPage; + + public static final String JSON_PROPERTY_SHAREHOLDER_DETAILS_SUMMARY_PAGE = "shareholderDetailsSummaryPage"; + private Boolean shareholderDetailsSummaryPage; + + public static final String JSON_PROPERTY_WELCOME_PAGE = "welcomePage"; + private Boolean welcomePage; + + public ShowPages() { + } + + public ShowPages bankDetailsSummaryPage(Boolean bankDetailsSummaryPage) { + this.bankDetailsSummaryPage = bankDetailsSummaryPage; + return this; + } + + /** + * Indicates whether the page with bank account details must be shown. Defaults to **true**. + * @return bankDetailsSummaryPage + **/ + @ApiModelProperty(value = "Indicates whether the page with bank account details must be shown. Defaults to **true**.") + @JsonProperty(JSON_PROPERTY_BANK_DETAILS_SUMMARY_PAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getBankDetailsSummaryPage() { + return bankDetailsSummaryPage; + } + + + @JsonProperty(JSON_PROPERTY_BANK_DETAILS_SUMMARY_PAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setBankDetailsSummaryPage(Boolean bankDetailsSummaryPage) { + this.bankDetailsSummaryPage = bankDetailsSummaryPage; + } + + + public ShowPages bankVerificationPage(Boolean bankVerificationPage) { + this.bankVerificationPage = bankVerificationPage; + return this; + } + + /** + * Indicates whether the bank check instant verification' details must be shown. Defaults to **true**. + * @return bankVerificationPage + **/ + @ApiModelProperty(value = "Indicates whether the bank check instant verification' details must be shown. Defaults to **true**.") + @JsonProperty(JSON_PROPERTY_BANK_VERIFICATION_PAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getBankVerificationPage() { + return bankVerificationPage; + } + + + @JsonProperty(JSON_PROPERTY_BANK_VERIFICATION_PAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setBankVerificationPage(Boolean bankVerificationPage) { + this.bankVerificationPage = bankVerificationPage; + } + + + public ShowPages businessDetailsSummaryPage(Boolean businessDetailsSummaryPage) { + this.businessDetailsSummaryPage = businessDetailsSummaryPage; + return this; + } + + /** + * Indicates whether the page with the company's or organization's details must be shown. Defaults to **true**. + * @return businessDetailsSummaryPage + **/ + @ApiModelProperty(value = "Indicates whether the page with the company's or organization's details must be shown. Defaults to **true**.") + @JsonProperty(JSON_PROPERTY_BUSINESS_DETAILS_SUMMARY_PAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getBusinessDetailsSummaryPage() { + return businessDetailsSummaryPage; + } + + + @JsonProperty(JSON_PROPERTY_BUSINESS_DETAILS_SUMMARY_PAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setBusinessDetailsSummaryPage(Boolean businessDetailsSummaryPage) { + this.businessDetailsSummaryPage = businessDetailsSummaryPage; + } + + + public ShowPages checksOverviewPage(Boolean checksOverviewPage) { + this.checksOverviewPage = checksOverviewPage; + return this; + } + + /** + * Indicates whether the checks overview page must be shown. Defaults to **false**. + * @return checksOverviewPage + **/ + @ApiModelProperty(value = "Indicates whether the checks overview page must be shown. Defaults to **false**.") + @JsonProperty(JSON_PROPERTY_CHECKS_OVERVIEW_PAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getChecksOverviewPage() { + return checksOverviewPage; + } + + + @JsonProperty(JSON_PROPERTY_CHECKS_OVERVIEW_PAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setChecksOverviewPage(Boolean checksOverviewPage) { + this.checksOverviewPage = checksOverviewPage; + } + + + public ShowPages individualDetailsSummaryPage(Boolean individualDetailsSummaryPage) { + this.individualDetailsSummaryPage = individualDetailsSummaryPage; + return this; + } + + /** + * Indicates whether the page with the individual's details must be shown. Defaults to **true**. + * @return individualDetailsSummaryPage + **/ + @ApiModelProperty(value = "Indicates whether the page with the individual's details must be shown. Defaults to **true**.") + @JsonProperty(JSON_PROPERTY_INDIVIDUAL_DETAILS_SUMMARY_PAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getIndividualDetailsSummaryPage() { + return individualDetailsSummaryPage; + } + + + @JsonProperty(JSON_PROPERTY_INDIVIDUAL_DETAILS_SUMMARY_PAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setIndividualDetailsSummaryPage(Boolean individualDetailsSummaryPage) { + this.individualDetailsSummaryPage = individualDetailsSummaryPage; + } + + + public ShowPages legalArrangementsDetailsSummaryPage(Boolean legalArrangementsDetailsSummaryPage) { + this.legalArrangementsDetailsSummaryPage = legalArrangementsDetailsSummaryPage; + return this; + } + + /** + * Indicates whether the page with the legal arrangements' details must be shown. Defaults to **true**. + * @return legalArrangementsDetailsSummaryPage + **/ + @ApiModelProperty(value = "Indicates whether the page with the legal arrangements' details must be shown. Defaults to **true**.") + @JsonProperty(JSON_PROPERTY_LEGAL_ARRANGEMENTS_DETAILS_SUMMARY_PAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getLegalArrangementsDetailsSummaryPage() { + return legalArrangementsDetailsSummaryPage; + } + + + @JsonProperty(JSON_PROPERTY_LEGAL_ARRANGEMENTS_DETAILS_SUMMARY_PAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setLegalArrangementsDetailsSummaryPage(Boolean legalArrangementsDetailsSummaryPage) { + this.legalArrangementsDetailsSummaryPage = legalArrangementsDetailsSummaryPage; + } + + + public ShowPages manualBankAccountPage(Boolean manualBankAccountPage) { + this.manualBankAccountPage = manualBankAccountPage; + return this; + } + + /** + * Indicates whether the page to manually add bank account' details must be shown. Defaults to **true**. + * @return manualBankAccountPage + **/ + @ApiModelProperty(value = "Indicates whether the page to manually add bank account' details must be shown. Defaults to **true**.") + @JsonProperty(JSON_PROPERTY_MANUAL_BANK_ACCOUNT_PAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getManualBankAccountPage() { + return manualBankAccountPage; + } + + + @JsonProperty(JSON_PROPERTY_MANUAL_BANK_ACCOUNT_PAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setManualBankAccountPage(Boolean manualBankAccountPage) { + this.manualBankAccountPage = manualBankAccountPage; + } + + + public ShowPages shareholderDetailsSummaryPage(Boolean shareholderDetailsSummaryPage) { + this.shareholderDetailsSummaryPage = shareholderDetailsSummaryPage; + return this; + } + + /** + * Indicates whether the page with the shareholders' details must be shown. Defaults to **true**. + * @return shareholderDetailsSummaryPage + **/ + @ApiModelProperty(value = "Indicates whether the page with the shareholders' details must be shown. Defaults to **true**.") + @JsonProperty(JSON_PROPERTY_SHAREHOLDER_DETAILS_SUMMARY_PAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getShareholderDetailsSummaryPage() { + return shareholderDetailsSummaryPage; + } + + + @JsonProperty(JSON_PROPERTY_SHAREHOLDER_DETAILS_SUMMARY_PAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setShareholderDetailsSummaryPage(Boolean shareholderDetailsSummaryPage) { + this.shareholderDetailsSummaryPage = shareholderDetailsSummaryPage; + } + + + public ShowPages welcomePage(Boolean welcomePage) { + this.welcomePage = welcomePage; + return this; + } + + /** + * Indicates whether the welcome page must be shown. Defaults to **false**. + * @return welcomePage + **/ + @ApiModelProperty(value = "Indicates whether the welcome page must be shown. Defaults to **false**.") + @JsonProperty(JSON_PROPERTY_WELCOME_PAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getWelcomePage() { + return welcomePage; + } + + + @JsonProperty(JSON_PROPERTY_WELCOME_PAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setWelcomePage(Boolean welcomePage) { + this.welcomePage = welcomePage; + } + + + /** + * Return true if this ShowPages object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ShowPages showPages = (ShowPages) o; + return Objects.equals(this.bankDetailsSummaryPage, showPages.bankDetailsSummaryPage) && + Objects.equals(this.bankVerificationPage, showPages.bankVerificationPage) && + Objects.equals(this.businessDetailsSummaryPage, showPages.businessDetailsSummaryPage) && + Objects.equals(this.checksOverviewPage, showPages.checksOverviewPage) && + Objects.equals(this.individualDetailsSummaryPage, showPages.individualDetailsSummaryPage) && + Objects.equals(this.legalArrangementsDetailsSummaryPage, showPages.legalArrangementsDetailsSummaryPage) && + Objects.equals(this.manualBankAccountPage, showPages.manualBankAccountPage) && + Objects.equals(this.shareholderDetailsSummaryPage, showPages.shareholderDetailsSummaryPage) && + Objects.equals(this.welcomePage, showPages.welcomePage); + } + + @Override + public int hashCode() { + return Objects.hash(bankDetailsSummaryPage, bankVerificationPage, businessDetailsSummaryPage, checksOverviewPage, individualDetailsSummaryPage, legalArrangementsDetailsSummaryPage, manualBankAccountPage, shareholderDetailsSummaryPage, welcomePage); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ShowPages {\n"); + sb.append(" bankDetailsSummaryPage: ").append(toIndentedString(bankDetailsSummaryPage)).append("\n"); + sb.append(" bankVerificationPage: ").append(toIndentedString(bankVerificationPage)).append("\n"); + sb.append(" businessDetailsSummaryPage: ").append(toIndentedString(businessDetailsSummaryPage)).append("\n"); + sb.append(" checksOverviewPage: ").append(toIndentedString(checksOverviewPage)).append("\n"); + sb.append(" individualDetailsSummaryPage: ").append(toIndentedString(individualDetailsSummaryPage)).append("\n"); + sb.append(" legalArrangementsDetailsSummaryPage: ").append(toIndentedString(legalArrangementsDetailsSummaryPage)).append("\n"); + sb.append(" manualBankAccountPage: ").append(toIndentedString(manualBankAccountPage)).append("\n"); + sb.append(" shareholderDetailsSummaryPage: ").append(toIndentedString(shareholderDetailsSummaryPage)).append("\n"); + sb.append(" welcomePage: ").append(toIndentedString(welcomePage)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line 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 ShowPages given an JSON string + * + * @param jsonString JSON string + * @return An instance of ShowPages + * @throws JsonProcessingException if the JSON string is invalid with respect to ShowPages + */ + public static ShowPages fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, ShowPages.class); + } +/** + * Convert an instance of ShowPages 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/payment/JSON.java b/src/main/java/com/adyen/model/payment/JSON.java index 68ef982f4..3c907576f 100644 --- a/src/main/java/com/adyen/model/payment/JSON.java +++ b/src/main/java/com/adyen/model/payment/JSON.java @@ -1,6 +1,7 @@ package com.adyen.model.payment; 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/payment/PaymentRequest.java b/src/main/java/com/adyen/model/payment/PaymentRequest.java index 4547ca7c3..6203dcfbf 100644 --- a/src/main/java/com/adyen/model/payment/PaymentRequest.java +++ b/src/main/java/com/adyen/model/payment/PaymentRequest.java @@ -966,10 +966,10 @@ public PaymentRequest putLocalizedShopperStatementItem(String key, String locali } /** - * This field allows merchants to use dynamic shopper statement in local character sets. The local shopper statement field can be supplied in markets where localized merchant descriptors are used. Currently, Adyen only supports this in the Japanese market .The available character sets at the moment are: * Processing in Japan: **ja-Kana** The character set **ja-Kana** supports UTF-8 based Katakana and alphanumeric and special characters. Merchants can use half-width or full-width characters. An example request would be: > { \"shopperStatement\" : \"ADYEN - SELLER-A\", \"localizedShopperStatement\" : { \"ja-Kana\" : \"ADYEN - セラーA\" } } We recommend merchants to always supply the field localizedShopperStatement in addition to the field shopperStatement.It is issuer dependent whether the localized shopper statement field is supported. In the case of non-domestic transactions (e.g. US-issued cards processed in JP) the field `shopperStatement` is used to modify the statement of the shopper. Adyen handles the complexity of ensuring the correct descriptors are assigned. Please note, this field can be used for only Visa and Mastercard transactions. + * The `localizedShopperStatement` field lets you use dynamic values for your shopper statement in a local character set. If not supplied, left empty, or for cross-border transactions, **shopperStatement** is used. Adyen currently supports the ja-Kana character set for Visa and Mastercard payments in Japan using Japanese cards. This character set supports: * UTF-8 based Katakana, capital letters, numbers and special characters. * Half-width or full-width characters. * @return localizedShopperStatement **/ - @ApiModelProperty(value = "This field allows merchants to use dynamic shopper statement in local character sets. The local shopper statement field can be supplied in markets where localized merchant descriptors are used. Currently, Adyen only supports this in the Japanese market .The available character sets at the moment are: * Processing in Japan: **ja-Kana** The character set **ja-Kana** supports UTF-8 based Katakana and alphanumeric and special characters. Merchants can use half-width or full-width characters. An example request would be: > { \"shopperStatement\" : \"ADYEN - SELLER-A\", \"localizedShopperStatement\" : { \"ja-Kana\" : \"ADYEN - セラーA\" } } We recommend merchants to always supply the field localizedShopperStatement in addition to the field shopperStatement.It is issuer dependent whether the localized shopper statement field is supported. In the case of non-domestic transactions (e.g. US-issued cards processed in JP) the field `shopperStatement` is used to modify the statement of the shopper. Adyen handles the complexity of ensuring the correct descriptors are assigned. Please note, this field can be used for only Visa and Mastercard transactions.") + @ApiModelProperty(value = "The `localizedShopperStatement` field lets you use dynamic values for your shopper statement in a local character set. If not supplied, left empty, or for cross-border transactions, **shopperStatement** is used. Adyen currently supports the ja-Kana character set for Visa and Mastercard payments in Japan using Japanese cards. This character set supports: * UTF-8 based Katakana, capital letters, numbers and special characters. * Half-width or full-width characters.") @JsonProperty(JSON_PROPERTY_LOCALIZED_SHOPPER_STATEMENT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) diff --git a/src/main/java/com/adyen/model/payment/PaymentRequest3d.java b/src/main/java/com/adyen/model/payment/PaymentRequest3d.java index 6abaf465e..e00a712af 100644 --- a/src/main/java/com/adyen/model/payment/PaymentRequest3d.java +++ b/src/main/java/com/adyen/model/payment/PaymentRequest3d.java @@ -709,10 +709,10 @@ public PaymentRequest3d putLocalizedShopperStatementItem(String key, String loca } /** - * This field allows merchants to use dynamic shopper statement in local character sets. The local shopper statement field can be supplied in markets where localized merchant descriptors are used. Currently, Adyen only supports this in the Japanese market .The available character sets at the moment are: * Processing in Japan: **ja-Kana** The character set **ja-Kana** supports UTF-8 based Katakana and alphanumeric and special characters. Merchants can use half-width or full-width characters. An example request would be: > { \"shopperStatement\" : \"ADYEN - SELLER-A\", \"localizedShopperStatement\" : { \"ja-Kana\" : \"ADYEN - セラーA\" } } We recommend merchants to always supply the field localizedShopperStatement in addition to the field shopperStatement.It is issuer dependent whether the localized shopper statement field is supported. In the case of non-domestic transactions (e.g. US-issued cards processed in JP) the field `shopperStatement` is used to modify the statement of the shopper. Adyen handles the complexity of ensuring the correct descriptors are assigned. Please note, this field can be used for only Visa and Mastercard transactions. + * The `localizedShopperStatement` field lets you use dynamic values for your shopper statement in a local character set. If not supplied, left empty, or for cross-border transactions, **shopperStatement** is used. Adyen currently supports the ja-Kana character set for Visa and Mastercard payments in Japan using Japanese cards. This character set supports: * UTF-8 based Katakana, capital letters, numbers and special characters. * Half-width or full-width characters. * @return localizedShopperStatement **/ - @ApiModelProperty(value = "This field allows merchants to use dynamic shopper statement in local character sets. The local shopper statement field can be supplied in markets where localized merchant descriptors are used. Currently, Adyen only supports this in the Japanese market .The available character sets at the moment are: * Processing in Japan: **ja-Kana** The character set **ja-Kana** supports UTF-8 based Katakana and alphanumeric and special characters. Merchants can use half-width or full-width characters. An example request would be: > { \"shopperStatement\" : \"ADYEN - SELLER-A\", \"localizedShopperStatement\" : { \"ja-Kana\" : \"ADYEN - セラーA\" } } We recommend merchants to always supply the field localizedShopperStatement in addition to the field shopperStatement.It is issuer dependent whether the localized shopper statement field is supported. In the case of non-domestic transactions (e.g. US-issued cards processed in JP) the field `shopperStatement` is used to modify the statement of the shopper. Adyen handles the complexity of ensuring the correct descriptors are assigned. Please note, this field can be used for only Visa and Mastercard transactions.") + @ApiModelProperty(value = "The `localizedShopperStatement` field lets you use dynamic values for your shopper statement in a local character set. If not supplied, left empty, or for cross-border transactions, **shopperStatement** is used. Adyen currently supports the ja-Kana character set for Visa and Mastercard payments in Japan using Japanese cards. This character set supports: * UTF-8 based Katakana, capital letters, numbers and special characters. * Half-width or full-width characters.") @JsonProperty(JSON_PROPERTY_LOCALIZED_SHOPPER_STATEMENT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) diff --git a/src/main/java/com/adyen/model/payment/PaymentRequest3ds2.java b/src/main/java/com/adyen/model/payment/PaymentRequest3ds2.java index 0de17dece..5997b6fed 100644 --- a/src/main/java/com/adyen/model/payment/PaymentRequest3ds2.java +++ b/src/main/java/com/adyen/model/payment/PaymentRequest3ds2.java @@ -710,10 +710,10 @@ public PaymentRequest3ds2 putLocalizedShopperStatementItem(String key, String lo } /** - * This field allows merchants to use dynamic shopper statement in local character sets. The local shopper statement field can be supplied in markets where localized merchant descriptors are used. Currently, Adyen only supports this in the Japanese market .The available character sets at the moment are: * Processing in Japan: **ja-Kana** The character set **ja-Kana** supports UTF-8 based Katakana and alphanumeric and special characters. Merchants can use half-width or full-width characters. An example request would be: > { \"shopperStatement\" : \"ADYEN - SELLER-A\", \"localizedShopperStatement\" : { \"ja-Kana\" : \"ADYEN - セラーA\" } } We recommend merchants to always supply the field localizedShopperStatement in addition to the field shopperStatement.It is issuer dependent whether the localized shopper statement field is supported. In the case of non-domestic transactions (e.g. US-issued cards processed in JP) the field `shopperStatement` is used to modify the statement of the shopper. Adyen handles the complexity of ensuring the correct descriptors are assigned. Please note, this field can be used for only Visa and Mastercard transactions. + * The `localizedShopperStatement` field lets you use dynamic values for your shopper statement in a local character set. If not supplied, left empty, or for cross-border transactions, **shopperStatement** is used. Adyen currently supports the ja-Kana character set for Visa and Mastercard payments in Japan using Japanese cards. This character set supports: * UTF-8 based Katakana, capital letters, numbers and special characters. * Half-width or full-width characters. * @return localizedShopperStatement **/ - @ApiModelProperty(value = "This field allows merchants to use dynamic shopper statement in local character sets. The local shopper statement field can be supplied in markets where localized merchant descriptors are used. Currently, Adyen only supports this in the Japanese market .The available character sets at the moment are: * Processing in Japan: **ja-Kana** The character set **ja-Kana** supports UTF-8 based Katakana and alphanumeric and special characters. Merchants can use half-width or full-width characters. An example request would be: > { \"shopperStatement\" : \"ADYEN - SELLER-A\", \"localizedShopperStatement\" : { \"ja-Kana\" : \"ADYEN - セラーA\" } } We recommend merchants to always supply the field localizedShopperStatement in addition to the field shopperStatement.It is issuer dependent whether the localized shopper statement field is supported. In the case of non-domestic transactions (e.g. US-issued cards processed in JP) the field `shopperStatement` is used to modify the statement of the shopper. Adyen handles the complexity of ensuring the correct descriptors are assigned. Please note, this field can be used for only Visa and Mastercard transactions.") + @ApiModelProperty(value = "The `localizedShopperStatement` field lets you use dynamic values for your shopper statement in a local character set. If not supplied, left empty, or for cross-border transactions, **shopperStatement** is used. Adyen currently supports the ja-Kana character set for Visa and Mastercard payments in Japan using Japanese cards. This character set supports: * UTF-8 based Katakana, capital letters, numbers and special characters. * Half-width or full-width characters.") @JsonProperty(JSON_PROPERTY_LOCALIZED_SHOPPER_STATEMENT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) diff --git a/src/main/java/com/adyen/model/payout/JSON.java b/src/main/java/com/adyen/model/payout/JSON.java index 25ed46802..2a88aeeb5 100644 --- a/src/main/java/com/adyen/model/payout/JSON.java +++ b/src/main/java/com/adyen/model/payout/JSON.java @@ -1,6 +1,7 @@ package com.adyen.model.payout; 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/posterminalmanagement/JSON.java b/src/main/java/com/adyen/model/posterminalmanagement/JSON.java index f1eccfcdc..7d7591447 100644 --- a/src/main/java/com/adyen/model/posterminalmanagement/JSON.java +++ b/src/main/java/com/adyen/model/posterminalmanagement/JSON.java @@ -1,6 +1,7 @@ package com.adyen.model.posterminalmanagement; 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/recurring/JSON.java b/src/main/java/com/adyen/model/recurring/JSON.java index 18d1af60b..81edbb88d 100644 --- a/src/main/java/com/adyen/model/recurring/JSON.java +++ b/src/main/java/com/adyen/model/recurring/JSON.java @@ -1,6 +1,7 @@ package com.adyen.model.recurring; 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/storedvalue/JSON.java b/src/main/java/com/adyen/model/storedvalue/JSON.java index 546e9ed62..54f1ff4f1 100644 --- a/src/main/java/com/adyen/model/storedvalue/JSON.java +++ b/src/main/java/com/adyen/model/storedvalue/JSON.java @@ -1,6 +1,7 @@ package com.adyen.model.storedvalue; 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/transfers/HKLocalAccountIdentification.java b/src/main/java/com/adyen/model/transfers/HKLocalAccountIdentification.java index c35dcb628..9d839ba60 100644 --- a/src/main/java/com/adyen/model/transfers/HKLocalAccountIdentification.java +++ b/src/main/java/com/adyen/model/transfers/HKLocalAccountIdentification.java @@ -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 12-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 12-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/transfers/JSON.java b/src/main/java/com/adyen/model/transfers/JSON.java index 4baea8013..c96532ced 100644 --- a/src/main/java/com/adyen/model/transfers/JSON.java +++ b/src/main/java/com/adyen/model/transfers/JSON.java @@ -1,6 +1,7 @@ package com.adyen.model.transfers; 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/transfers/MerchantData.java b/src/main/java/com/adyen/model/transfers/MerchantData.java index 8c9c16b8e..00fd6fc5b 100644 --- a/src/main/java/com/adyen/model/transfers/MerchantData.java +++ b/src/main/java/com/adyen/model/transfers/MerchantData.java @@ -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/transfers/NZLocalAccountIdentification.java b/src/main/java/com/adyen/model/transfers/NZLocalAccountIdentification.java index 43dc39e07..cc29c368c 100644 --- a/src/main/java/com/adyen/model/transfers/NZLocalAccountIdentification.java +++ b/src/main/java/com/adyen/model/transfers/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/transfers/ServiceError.java b/src/main/java/com/adyen/model/transfers/ServiceError.java new file mode 100644 index 000000000..32a28e36f --- /dev/null +++ b/src/main/java/com/adyen/model/transfers/ServiceError.java @@ -0,0 +1,252 @@ +/* + * Transfers 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.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; + + +/** + * ServiceError + */ +@JsonPropertyOrder({ + ServiceError.JSON_PROPERTY_ERROR_CODE, + ServiceError.JSON_PROPERTY_ERROR_TYPE, + ServiceError.JSON_PROPERTY_MESSAGE, + ServiceError.JSON_PROPERTY_PSP_REFERENCE, + ServiceError.JSON_PROPERTY_STATUS +}) + +public class ServiceError { + public static final String JSON_PROPERTY_ERROR_CODE = "errorCode"; + private String errorCode; + + public static final String JSON_PROPERTY_ERROR_TYPE = "errorType"; + private String errorType; + + public static final String JSON_PROPERTY_MESSAGE = "message"; + private String message; + + public static final String JSON_PROPERTY_PSP_REFERENCE = "pspReference"; + private String pspReference; + + public static final String JSON_PROPERTY_STATUS = "status"; + private Integer status; + + public ServiceError() { + } + + public ServiceError errorCode(String errorCode) { + this.errorCode = errorCode; + return this; + } + + /** + * The error code mapped to the error message. + * @return errorCode + **/ + @ApiModelProperty(value = "The error code mapped to the error message.") + @JsonProperty(JSON_PROPERTY_ERROR_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getErrorCode() { + return errorCode; + } + + + @JsonProperty(JSON_PROPERTY_ERROR_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setErrorCode(String errorCode) { + this.errorCode = errorCode; + } + + + public ServiceError errorType(String errorType) { + this.errorType = errorType; + return this; + } + + /** + * The category of the error. + * @return errorType + **/ + @ApiModelProperty(value = "The category of the error.") + @JsonProperty(JSON_PROPERTY_ERROR_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getErrorType() { + return errorType; + } + + + @JsonProperty(JSON_PROPERTY_ERROR_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setErrorType(String errorType) { + this.errorType = errorType; + } + + + public ServiceError message(String message) { + this.message = message; + return this; + } + + /** + * A short explanation of the issue. + * @return message + **/ + @ApiModelProperty(value = "A short explanation of the issue.") + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getMessage() { + return message; + } + + + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMessage(String message) { + this.message = message; + } + + + public ServiceError pspReference(String pspReference) { + this.pspReference = pspReference; + return this; + } + + /** + * The PSP reference of the payment. + * @return pspReference + **/ + @ApiModelProperty(value = "The PSP reference of the payment.") + @JsonProperty(JSON_PROPERTY_PSP_REFERENCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getPspReference() { + return pspReference; + } + + + @JsonProperty(JSON_PROPERTY_PSP_REFERENCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPspReference(String pspReference) { + this.pspReference = pspReference; + } + + + public ServiceError status(Integer status) { + this.status = status; + return this; + } + + /** + * The HTTP response status. + * @return status + **/ + @ApiModelProperty(value = "The HTTP response status.") + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Integer getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setStatus(Integer status) { + this.status = status; + } + + + /** + * Return true if this ServiceError object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ServiceError serviceError = (ServiceError) o; + return Objects.equals(this.errorCode, serviceError.errorCode) && + Objects.equals(this.errorType, serviceError.errorType) && + Objects.equals(this.message, serviceError.message) && + Objects.equals(this.pspReference, serviceError.pspReference) && + Objects.equals(this.status, serviceError.status); + } + + @Override + public int hashCode() { + return Objects.hash(errorCode, errorType, message, pspReference, status); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ServiceError {\n"); + sb.append(" errorCode: ").append(toIndentedString(errorCode)).append("\n"); + sb.append(" errorType: ").append(toIndentedString(errorType)).append("\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append(" pspReference: ").append(toIndentedString(pspReference)).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 ServiceError given an JSON string + * + * @param jsonString JSON string + * @return An instance of ServiceError + * @throws JsonProcessingException if the JSON string is invalid with respect to ServiceError + */ + public static ServiceError fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, ServiceError.class); + } +/** + * Convert an instance of ServiceError 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/Transaction.java b/src/main/java/com/adyen/model/transfers/Transaction.java index e706bc28c..39ecbef6d 100644 --- a/src/main/java/com/adyen/model/transfers/Transaction.java +++ b/src/main/java/com/adyen/model/transfers/Transaction.java @@ -13,17 +13,11 @@ 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.CounterpartyV3; + import com.fasterxml.jackson.annotation.JsonInclude; import 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; @@ -88,7 +82,9 @@ public enum CategoryEnum { MIGRATION("migration"), - PLATFORMPAYMENT("platformPayment"); + PLATFORMPAYMENT("platformPayment"), + + UPGRADE("upgrade"); private String value; @@ -201,6 +197,8 @@ public enum TypeEnum { BALANCEADJUSTMENT("balanceAdjustment"), + BALANCEMIGRATION("balanceMigration"), + BALANCEROLLOVER("balanceRollover"), BANKTRANSFER("bankTransfer"), @@ -211,10 +209,20 @@ public enum TypeEnum { CARDTRANSFER("cardTransfer"), + CASHOUTFEE("cashOutFee"), + + CASHOUTFUNDING("cashOutFunding"), + + CASHOUTINSTRUCTION("cashOutInstruction"), + CHARGEBACK("chargeback"), + CHARGEBACKCORRECTION("chargebackCorrection"), + CHARGEBACKREVERSAL("chargebackReversal"), + CHARGEBACKREVERSALCORRECTION("chargebackReversalCorrection"), + DEPOSITCORRECTION("depositCorrection"), FEE("fee"), @@ -247,7 +255,9 @@ public enum TypeEnum { RESERVEADJUSTMENT("reserveAdjustment"), - SECONDCHARGEBACK("secondChargeback"); + SECONDCHARGEBACK("secondChargeback"), + + SECONDCHARGEBACKCORRECTION("secondChargebackCorrection"); private String value; @@ -282,7 +292,7 @@ public static TypeEnum fromValue(String value) { public static final String JSON_PROPERTY_VALUE_DATE = "valueDate"; private OffsetDateTime valueDate; - public Transaction() { + public Transaction() { } public Transaction accountHolderId(String accountHolderId) { @@ -366,10 +376,10 @@ public Transaction balancePlatform(String balancePlatform) { } /** - * Unique identifier of the balance platform. + * The unique identifier of the balance platform. * @return balancePlatform **/ - @ApiModelProperty(required = true, value = "Unique identifier of the balance platform.") + @ApiModelProperty(required = true, value = "The unique identifier of the balance platform.") @JsonProperty(JSON_PROPERTY_BALANCE_PLATFORM) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -391,10 +401,10 @@ public Transaction bookingDate(OffsetDateTime bookingDate) { } /** - * The date the transaction was booked to the balance account. + * The date the transaction was booked into the balance account. * @return bookingDate **/ - @ApiModelProperty(required = true, value = "The date the transaction was booked to the balance account.") + @ApiModelProperty(required = true, value = "The date the transaction was booked into the balance account.") @JsonProperty(JSON_PROPERTY_BOOKING_DATE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -541,10 +551,10 @@ public Transaction eventId(String eventId) { } /** - * The PSP reference in the journal. + * The PSP reference of the transaction in the journal. * @return eventId **/ - @ApiModelProperty(value = "The PSP reference in the journal.") + @ApiModelProperty(value = "The PSP reference of the transaction in the journal.") @JsonProperty(JSON_PROPERTY_EVENT_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -566,10 +576,10 @@ public Transaction id(String id) { } /** - * Unique identifier of the transaction. + * The unique identifier of the transaction. * @return id **/ - @ApiModelProperty(required = true, value = "Unique identifier of the transaction.") + @ApiModelProperty(required = true, value = "The unique identifier of the transaction.") @JsonProperty(JSON_PROPERTY_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -616,10 +626,10 @@ public Transaction paymentInstrumentId(String paymentInstrumentId) { } /** - * Unique identifier of the payment instrument that was used for the transaction. + * The unique identifier of the payment instrument that was used for the transaction. * @return paymentInstrumentId **/ - @ApiModelProperty(value = "Unique identifier of the payment instrument that was used for the transaction.") + @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) diff --git a/src/main/java/com/adyen/model/transfers/TransactionSearchResponse.java b/src/main/java/com/adyen/model/transfers/TransactionSearchResponse.java index 8c634311f..1676aa433 100644 --- a/src/main/java/com/adyen/model/transfers/TransactionSearchResponse.java +++ b/src/main/java/com/adyen/model/transfers/TransactionSearchResponse.java @@ -13,17 +13,9 @@ 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 736ef1666..1df33f11d 100644 --- a/src/main/java/com/adyen/model/transfers/Transfer.java +++ b/src/main/java/com/adyen/model/transfers/Transfer.java @@ -69,7 +69,7 @@ public class Transfer { private String balanceAccountId; /** - * 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"), @@ -167,7 +167,7 @@ public static DirectionEnum fromValue(String value) { 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). + * 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"), @@ -222,6 +222,8 @@ public enum ReasonEnum { APPROVED("approved"), + BALANCEACCOUNTTEMPORARILYBLOCKEDBYTRANSACTIONRULE("balanceAccountTemporarilyBlockedByTransactionRule"), + COUNTERPARTYACCOUNTBLOCKED("counterpartyAccountBlocked"), COUNTERPARTYACCOUNTCLOSED("counterpartyAccountClosed"), @@ -234,6 +236,8 @@ public enum ReasonEnum { COUNTERPARTYBANKUNAVAILABLE("counterpartyBankUnavailable"), + DECLINEDBYTRANSACTIONRULE("declinedByTransactionRule"), + ERROR("error"), NOTENOUGHBALANCE("notEnoughBalance"), @@ -242,6 +246,8 @@ public enum ReasonEnum { ROUTENOTFOUND("routeNotFound"), + SCAFAILED("scaFailed"), + UNKNOWN("unknown"); private String value; @@ -382,14 +388,6 @@ public enum StatusEnum { MISCCOSTPENDING("miscCostPending"), - OPERATIONAUTHORIZED("operationAuthorized"), - - OPERATIONBOOKED("operationBooked"), - - OPERATIONPENDING("operationPending"), - - OPERATIONRECEIVED("operationReceived"), - PAYMENTCOST("paymentCost"), PAYMENTCOSTPENDING("paymentCostPending"), @@ -562,10 +560,10 @@ public Transfer 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) @@ -765,10 +763,10 @@ public Transfer priority(PriorityEnum priority) { } /** - * 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). + * 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).") + @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) diff --git a/src/main/java/com/adyen/model/transfers/TransferInfo.java b/src/main/java/com/adyen/model/transfers/TransferInfo.java index 231eea349..270a25fc3 100644 --- a/src/main/java/com/adyen/model/transfers/TransferInfo.java +++ b/src/main/java/com/adyen/model/transfers/TransferInfo.java @@ -39,7 +39,6 @@ TransferInfo.JSON_PROPERTY_CATEGORY, TransferInfo.JSON_PROPERTY_COUNTERPARTY, TransferInfo.JSON_PROPERTY_DESCRIPTION, - TransferInfo.JSON_PROPERTY_ID, TransferInfo.JSON_PROPERTY_PAYMENT_INSTRUMENT_ID, TransferInfo.JSON_PROPERTY_PRIORITY, TransferInfo.JSON_PROPERTY_REFERENCE, @@ -104,9 +103,6 @@ public static CategoryEnum fromValue(String value) { public static final String JSON_PROPERTY_DESCRIPTION = "description"; private String description; - public static final String JSON_PROPERTY_ID = "id"; - private String id; - public static final String JSON_PROPERTY_PAYMENT_INSTRUMENT_ID = "paymentInstrumentId"; private String paymentInstrumentId; @@ -295,31 +291,6 @@ public void setDescription(String description) { } - public TransferInfo 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 TransferInfo paymentInstrumentId(String paymentInstrumentId) { this.paymentInstrumentId = paymentInstrumentId; return this; @@ -462,7 +433,6 @@ public boolean equals(Object o) { Objects.equals(this.category, transferInfo.category) && Objects.equals(this.counterparty, transferInfo.counterparty) && Objects.equals(this.description, transferInfo.description) && - Objects.equals(this.id, transferInfo.id) && Objects.equals(this.paymentInstrumentId, transferInfo.paymentInstrumentId) && Objects.equals(this.priority, transferInfo.priority) && Objects.equals(this.reference, transferInfo.reference) && @@ -472,7 +442,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(amount, balanceAccountId, category, counterparty, description, id, paymentInstrumentId, priority, reference, referenceForBeneficiary, ultimateParty); + return Objects.hash(amount, balanceAccountId, category, counterparty, description, paymentInstrumentId, priority, reference, referenceForBeneficiary, ultimateParty); } @Override @@ -484,7 +454,6 @@ public String toString() { sb.append(" category: ").append(toIndentedString(category)).append("\n"); sb.append(" counterparty: ").append(toIndentedString(counterparty)).append("\n"); sb.append(" description: ").append(toIndentedString(description)).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" paymentInstrumentId: ").append(toIndentedString(paymentInstrumentId)).append("\n"); sb.append(" priority: ").append(toIndentedString(priority)).append("\n"); sb.append(" reference: ").append(toIndentedString(reference)).append("\n"); diff --git a/src/main/java/com/adyen/serializer/ByteArrayDeserializer.java b/src/main/java/com/adyen/serializer/ByteArrayDeserializer.java new file mode 100644 index 000000000..8fc817292 --- /dev/null +++ b/src/main/java/com/adyen/serializer/ByteArrayDeserializer.java @@ -0,0 +1,20 @@ +package com.adyen.serializer; + +import com.fasterxml.jackson.core.JacksonException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; + +import java.io.IOException; +import java.nio.charset.StandardCharsets; + +public class ByteArrayDeserializer extends StdDeserializer { + public ByteArrayDeserializer() { + super(byte[].class); + } + + @Override + public byte[] deserialize(JsonParser jsonParser, DeserializationContext deserializationContext) throws IOException, JacksonException { + return jsonParser.getValueAsString().getBytes(StandardCharsets.UTF_8); + } +} diff --git a/src/main/java/com/adyen/service/classicplatforms/ClassicPlatformAccountApi.java b/src/main/java/com/adyen/service/classicplatforms/ClassicPlatformAccountApi.java new file mode 100644 index 000000000..e9247999a --- /dev/null +++ b/src/main/java/com/adyen/service/classicplatforms/ClassicPlatformAccountApi.java @@ -0,0 +1,625 @@ +/* + * Account API + * This API is used for the classic integration. If you are just starting your implementation, refer to our [new integration guide](https://docs.adyen.com/marketplaces-and-platforms) instead. The Account API provides endpoints for managing account-related entities on your platform. These related entities include account holders, accounts, bank accounts, shareholders, and verification-related documents. The management operations include actions such as creation, retrieval, updating, and deletion of them. For more information, refer to our [documentation](https://docs.adyen.com/marketplaces-and-platforms/classic). ## Authentication Your Adyen contact will provide your API credential and an API key. To connect to the API, add an `X-API-Key` header with the API key as the value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: YOUR_API_KEY\" \\ ... ``` Alternatively, you can use the username and password to connect to the API using basic authentication. For example: ``` curl -U \"ws@MarketPlace.YOUR_PLATFORM_ACCOUNT\":\"YOUR_WS_PASSWORD\" \\ -H \"Content-Type: application/json\" \\ ... ``` When going live, you need to generate new web service user credentials to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning The Account API supports [versioning](https://docs.adyen.com/development-resources/versioning) using a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://cal-test.adyen.com/cal/services/Account/v6/createAccountHolder ``` + * + * The version of the OpenAPI document: 6 + * + * + * 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.service.classicplatforms; + +import com.adyen.Client; +import com.adyen.Service; +import com.adyen.constants.ApiConstants; +import com.adyen.model.marketpayaccount.CloseAccountHolderRequest; +import com.adyen.model.marketpayaccount.CloseAccountHolderResponse; +import com.adyen.model.marketpayaccount.CloseAccountRequest; +import com.adyen.model.marketpayaccount.CloseAccountResponse; +import com.adyen.model.marketpayaccount.CloseStoresRequest; +import com.adyen.model.marketpayaccount.CreateAccountHolderRequest; +import com.adyen.model.marketpayaccount.CreateAccountHolderResponse; +import com.adyen.model.marketpayaccount.CreateAccountRequest; +import com.adyen.model.marketpayaccount.CreateAccountResponse; +import com.adyen.model.marketpayaccount.DeleteBankAccountRequest; +import com.adyen.model.marketpayaccount.DeleteLegalArrangementRequest; +import com.adyen.model.marketpayaccount.DeletePayoutMethodRequest; +import com.adyen.model.marketpayaccount.DeleteShareholderRequest; +import com.adyen.model.marketpayaccount.DeleteSignatoriesRequest; +import com.adyen.model.marketpayaccount.GenericResponse; +import com.adyen.model.marketpayaccount.GetAccountHolderRequest; +import com.adyen.model.marketpayaccount.GetAccountHolderResponse; +import com.adyen.model.marketpayaccount.GetAccountHolderStatusResponse; +import com.adyen.model.marketpayaccount.GetTaxFormRequest; +import com.adyen.model.marketpayaccount.GetTaxFormResponse; +import com.adyen.model.marketpayaccount.GetUploadedDocumentsRequest; +import com.adyen.model.marketpayaccount.GetUploadedDocumentsResponse; +import com.adyen.model.marketpayaccount.PerformVerificationRequest; +import com.adyen.model.marketpayaccount.ServiceError; +import com.adyen.model.marketpayaccount.SuspendAccountHolderRequest; +import com.adyen.model.marketpayaccount.SuspendAccountHolderResponse; +import com.adyen.model.marketpayaccount.UnSuspendAccountHolderRequest; +import com.adyen.model.marketpayaccount.UnSuspendAccountHolderResponse; +import com.adyen.model.marketpayaccount.UpdateAccountHolderRequest; +import com.adyen.model.marketpayaccount.UpdateAccountHolderResponse; +import com.adyen.model.marketpayaccount.UpdateAccountHolderStateRequest; +import com.adyen.model.marketpayaccount.UpdateAccountRequest; +import com.adyen.model.marketpayaccount.UpdateAccountResponse; +import com.adyen.model.marketpayaccount.UploadDocumentRequest; +import com.adyen.model.RequestOptions; +import com.adyen.service.exception.ApiException; +import com.adyen.service.resource.Resource; + +import java.io.IOException; +import java.util.HashMap; +import java.util.Map; + +public class ClassicPlatformAccountApi extends Service { + + public static final String API_VERSION = "6"; + + protected String baseURL; + + /** + * Verification constructor in {@link com.adyen.service package}. + * @param client {@link Client } (required) + */ + public ClassicPlatformAccountApi(Client client) { + super(client); + this.baseURL = createBaseURL("https://cal-test.adyen.com/cal/services/Account/v6"); + } + + /** + * Verification constructor in {@link com.adyen.service package}. + * Please use this constructor only if you would like to pass along your own url for routing or testing purposes. The latest API version is defined in this class as a constant. + * @param client {@link Client } (required) + * @param baseURL {@link String } (required) + */ + public ClassicPlatformAccountApi(Client client, String baseURL) { + super(client); + this.baseURL = baseURL; + } + + /** + * Trigger verification + * + * @param performVerificationRequest {@link PerformVerificationRequest } (required) + * @return {@link GenericResponse } + * @throws ApiException if fails to make API call + */ + public GenericResponse checkAccountHolder(PerformVerificationRequest performVerificationRequest) throws ApiException, IOException { + return checkAccountHolder(performVerificationRequest, null); + } + + /** + * Trigger verification + * + * @param performVerificationRequest {@link PerformVerificationRequest } (required) + * @param requestOptions {@link RequestOptions } Object to store additional data such as idempotency-keys (optional) + * @return {@link GenericResponse } + * @throws ApiException if fails to make API call + */ + public GenericResponse checkAccountHolder(PerformVerificationRequest performVerificationRequest, RequestOptions requestOptions) throws ApiException, IOException { + + String requestBody = performVerificationRequest.toJson(); + Resource resource = new Resource(this, this.baseURL + "/checkAccountHolder", null); + String jsonResult = resource.request(requestBody, requestOptions, ApiConstants.HttpMethod.POST, null); + return GenericResponse.fromJson(jsonResult); + } + + /** + * Close an account + * + * @param closeAccountRequest {@link CloseAccountRequest } (required) + * @return {@link CloseAccountResponse } + * @throws ApiException if fails to make API call + */ + public CloseAccountResponse closeAccount(CloseAccountRequest closeAccountRequest) throws ApiException, IOException { + return closeAccount(closeAccountRequest, null); + } + + /** + * Close an account + * + * @param closeAccountRequest {@link CloseAccountRequest } (required) + * @param requestOptions {@link RequestOptions } Object to store additional data such as idempotency-keys (optional) + * @return {@link CloseAccountResponse } + * @throws ApiException if fails to make API call + */ + public CloseAccountResponse closeAccount(CloseAccountRequest closeAccountRequest, RequestOptions requestOptions) throws ApiException, IOException { + + String requestBody = closeAccountRequest.toJson(); + Resource resource = new Resource(this, this.baseURL + "/closeAccount", null); + String jsonResult = resource.request(requestBody, requestOptions, ApiConstants.HttpMethod.POST, null); + return CloseAccountResponse.fromJson(jsonResult); + } + + /** + * Close an account holder + * + * @param closeAccountHolderRequest {@link CloseAccountHolderRequest } (required) + * @return {@link CloseAccountHolderResponse } + * @throws ApiException if fails to make API call + */ + public CloseAccountHolderResponse closeAccountHolder(CloseAccountHolderRequest closeAccountHolderRequest) throws ApiException, IOException { + return closeAccountHolder(closeAccountHolderRequest, null); + } + + /** + * Close an account holder + * + * @param closeAccountHolderRequest {@link CloseAccountHolderRequest } (required) + * @param requestOptions {@link RequestOptions } Object to store additional data such as idempotency-keys (optional) + * @return {@link CloseAccountHolderResponse } + * @throws ApiException if fails to make API call + */ + public CloseAccountHolderResponse closeAccountHolder(CloseAccountHolderRequest closeAccountHolderRequest, RequestOptions requestOptions) throws ApiException, IOException { + + String requestBody = closeAccountHolderRequest.toJson(); + Resource resource = new Resource(this, this.baseURL + "/closeAccountHolder", null); + String jsonResult = resource.request(requestBody, requestOptions, ApiConstants.HttpMethod.POST, null); + return CloseAccountHolderResponse.fromJson(jsonResult); + } + + /** + * Close stores + * + * @param closeStoresRequest {@link CloseStoresRequest } (required) + * @return {@link GenericResponse } + * @throws ApiException if fails to make API call + */ + public GenericResponse closeStores(CloseStoresRequest closeStoresRequest) throws ApiException, IOException { + return closeStores(closeStoresRequest, null); + } + + /** + * Close stores + * + * @param closeStoresRequest {@link CloseStoresRequest } (required) + * @param requestOptions {@link RequestOptions } Object to store additional data such as idempotency-keys (optional) + * @return {@link GenericResponse } + * @throws ApiException if fails to make API call + */ + public GenericResponse closeStores(CloseStoresRequest closeStoresRequest, RequestOptions requestOptions) throws ApiException, IOException { + + String requestBody = closeStoresRequest.toJson(); + Resource resource = new Resource(this, this.baseURL + "/closeStores", null); + String jsonResult = resource.request(requestBody, requestOptions, ApiConstants.HttpMethod.POST, null); + return GenericResponse.fromJson(jsonResult); + } + + /** + * Create an account + * + * @param createAccountRequest {@link CreateAccountRequest } (required) + * @return {@link CreateAccountResponse } + * @throws ApiException if fails to make API call + */ + public CreateAccountResponse createAccount(CreateAccountRequest createAccountRequest) throws ApiException, IOException { + return createAccount(createAccountRequest, null); + } + + /** + * Create an account + * + * @param createAccountRequest {@link CreateAccountRequest } (required) + * @param requestOptions {@link RequestOptions } Object to store additional data such as idempotency-keys (optional) + * @return {@link CreateAccountResponse } + * @throws ApiException if fails to make API call + */ + public CreateAccountResponse createAccount(CreateAccountRequest createAccountRequest, RequestOptions requestOptions) throws ApiException, IOException { + + String requestBody = createAccountRequest.toJson(); + Resource resource = new Resource(this, this.baseURL + "/createAccount", null); + String jsonResult = resource.request(requestBody, requestOptions, ApiConstants.HttpMethod.POST, null); + return CreateAccountResponse.fromJson(jsonResult); + } + + /** + * Create an account holder + * + * @param createAccountHolderRequest {@link CreateAccountHolderRequest } (required) + * @return {@link CreateAccountHolderResponse } + * @throws ApiException if fails to make API call + */ + public CreateAccountHolderResponse createAccountHolder(CreateAccountHolderRequest createAccountHolderRequest) throws ApiException, IOException { + return createAccountHolder(createAccountHolderRequest, null); + } + + /** + * Create an account holder + * + * @param createAccountHolderRequest {@link CreateAccountHolderRequest } (required) + * @param requestOptions {@link RequestOptions } Object to store additional data such as idempotency-keys (optional) + * @return {@link CreateAccountHolderResponse } + * @throws ApiException if fails to make API call + */ + public CreateAccountHolderResponse createAccountHolder(CreateAccountHolderRequest createAccountHolderRequest, RequestOptions requestOptions) throws ApiException, IOException { + + String requestBody = createAccountHolderRequest.toJson(); + Resource resource = new Resource(this, this.baseURL + "/createAccountHolder", null); + String jsonResult = resource.request(requestBody, requestOptions, ApiConstants.HttpMethod.POST, null); + return CreateAccountHolderResponse.fromJson(jsonResult); + } + + /** + * Delete bank accounts + * + * @param deleteBankAccountRequest {@link DeleteBankAccountRequest } (required) + * @return {@link GenericResponse } + * @throws ApiException if fails to make API call + */ + public GenericResponse deleteBankAccounts(DeleteBankAccountRequest deleteBankAccountRequest) throws ApiException, IOException { + return deleteBankAccounts(deleteBankAccountRequest, null); + } + + /** + * Delete bank accounts + * + * @param deleteBankAccountRequest {@link DeleteBankAccountRequest } (required) + * @param requestOptions {@link RequestOptions } Object to store additional data such as idempotency-keys (optional) + * @return {@link GenericResponse } + * @throws ApiException if fails to make API call + */ + public GenericResponse deleteBankAccounts(DeleteBankAccountRequest deleteBankAccountRequest, RequestOptions requestOptions) throws ApiException, IOException { + + String requestBody = deleteBankAccountRequest.toJson(); + Resource resource = new Resource(this, this.baseURL + "/deleteBankAccounts", null); + String jsonResult = resource.request(requestBody, requestOptions, ApiConstants.HttpMethod.POST, null); + return GenericResponse.fromJson(jsonResult); + } + + /** + * Delete legal arrangements + * + * @param deleteLegalArrangementRequest {@link DeleteLegalArrangementRequest } (required) + * @return {@link GenericResponse } + * @throws ApiException if fails to make API call + */ + public GenericResponse deleteLegalArrangements(DeleteLegalArrangementRequest deleteLegalArrangementRequest) throws ApiException, IOException { + return deleteLegalArrangements(deleteLegalArrangementRequest, null); + } + + /** + * Delete legal arrangements + * + * @param deleteLegalArrangementRequest {@link DeleteLegalArrangementRequest } (required) + * @param requestOptions {@link RequestOptions } Object to store additional data such as idempotency-keys (optional) + * @return {@link GenericResponse } + * @throws ApiException if fails to make API call + */ + public GenericResponse deleteLegalArrangements(DeleteLegalArrangementRequest deleteLegalArrangementRequest, RequestOptions requestOptions) throws ApiException, IOException { + + String requestBody = deleteLegalArrangementRequest.toJson(); + Resource resource = new Resource(this, this.baseURL + "/deleteLegalArrangements", null); + String jsonResult = resource.request(requestBody, requestOptions, ApiConstants.HttpMethod.POST, null); + return GenericResponse.fromJson(jsonResult); + } + + /** + * Delete payout methods + * + * @param deletePayoutMethodRequest {@link DeletePayoutMethodRequest } (required) + * @return {@link GenericResponse } + * @throws ApiException if fails to make API call + */ + public GenericResponse deletePayoutMethods(DeletePayoutMethodRequest deletePayoutMethodRequest) throws ApiException, IOException { + return deletePayoutMethods(deletePayoutMethodRequest, null); + } + + /** + * Delete payout methods + * + * @param deletePayoutMethodRequest {@link DeletePayoutMethodRequest } (required) + * @param requestOptions {@link RequestOptions } Object to store additional data such as idempotency-keys (optional) + * @return {@link GenericResponse } + * @throws ApiException if fails to make API call + */ + public GenericResponse deletePayoutMethods(DeletePayoutMethodRequest deletePayoutMethodRequest, RequestOptions requestOptions) throws ApiException, IOException { + + String requestBody = deletePayoutMethodRequest.toJson(); + Resource resource = new Resource(this, this.baseURL + "/deletePayoutMethods", null); + String jsonResult = resource.request(requestBody, requestOptions, ApiConstants.HttpMethod.POST, null); + return GenericResponse.fromJson(jsonResult); + } + + /** + * Delete shareholders + * + * @param deleteShareholderRequest {@link DeleteShareholderRequest } (required) + * @return {@link GenericResponse } + * @throws ApiException if fails to make API call + */ + public GenericResponse deleteShareholders(DeleteShareholderRequest deleteShareholderRequest) throws ApiException, IOException { + return deleteShareholders(deleteShareholderRequest, null); + } + + /** + * Delete shareholders + * + * @param deleteShareholderRequest {@link DeleteShareholderRequest } (required) + * @param requestOptions {@link RequestOptions } Object to store additional data such as idempotency-keys (optional) + * @return {@link GenericResponse } + * @throws ApiException if fails to make API call + */ + public GenericResponse deleteShareholders(DeleteShareholderRequest deleteShareholderRequest, RequestOptions requestOptions) throws ApiException, IOException { + + String requestBody = deleteShareholderRequest.toJson(); + Resource resource = new Resource(this, this.baseURL + "/deleteShareholders", null); + String jsonResult = resource.request(requestBody, requestOptions, ApiConstants.HttpMethod.POST, null); + return GenericResponse.fromJson(jsonResult); + } + + /** + * Delete signatories + * + * @param deleteSignatoriesRequest {@link DeleteSignatoriesRequest } (required) + * @return {@link GenericResponse } + * @throws ApiException if fails to make API call + */ + public GenericResponse deleteSignatories(DeleteSignatoriesRequest deleteSignatoriesRequest) throws ApiException, IOException { + return deleteSignatories(deleteSignatoriesRequest, null); + } + + /** + * Delete signatories + * + * @param deleteSignatoriesRequest {@link DeleteSignatoriesRequest } (required) + * @param requestOptions {@link RequestOptions } Object to store additional data such as idempotency-keys (optional) + * @return {@link GenericResponse } + * @throws ApiException if fails to make API call + */ + public GenericResponse deleteSignatories(DeleteSignatoriesRequest deleteSignatoriesRequest, RequestOptions requestOptions) throws ApiException, IOException { + + String requestBody = deleteSignatoriesRequest.toJson(); + Resource resource = new Resource(this, this.baseURL + "/deleteSignatories", null); + String jsonResult = resource.request(requestBody, requestOptions, ApiConstants.HttpMethod.POST, null); + return GenericResponse.fromJson(jsonResult); + } + + /** + * Get an account holder + * + * @param getAccountHolderRequest {@link GetAccountHolderRequest } (required) + * @return {@link GetAccountHolderResponse } + * @throws ApiException if fails to make API call + */ + public GetAccountHolderResponse getAccountHolder(GetAccountHolderRequest getAccountHolderRequest) throws ApiException, IOException { + return getAccountHolder(getAccountHolderRequest, null); + } + + /** + * Get an account holder + * + * @param getAccountHolderRequest {@link GetAccountHolderRequest } (required) + * @param requestOptions {@link RequestOptions } Object to store additional data such as idempotency-keys (optional) + * @return {@link GetAccountHolderResponse } + * @throws ApiException if fails to make API call + */ + public GetAccountHolderResponse getAccountHolder(GetAccountHolderRequest getAccountHolderRequest, RequestOptions requestOptions) throws ApiException, IOException { + + String requestBody = getAccountHolderRequest.toJson(); + Resource resource = new Resource(this, this.baseURL + "/getAccountHolder", null); + String jsonResult = resource.request(requestBody, requestOptions, ApiConstants.HttpMethod.POST, null); + return GetAccountHolderResponse.fromJson(jsonResult); + } + + /** + * Get a tax form + * + * @param getTaxFormRequest {@link GetTaxFormRequest } (required) + * @return {@link GetTaxFormResponse } + * @throws ApiException if fails to make API call + */ + public GetTaxFormResponse getTaxForm(GetTaxFormRequest getTaxFormRequest) throws ApiException, IOException { + return getTaxForm(getTaxFormRequest, null); + } + + /** + * Get a tax form + * + * @param getTaxFormRequest {@link GetTaxFormRequest } (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(GetTaxFormRequest getTaxFormRequest, RequestOptions requestOptions) throws ApiException, IOException { + + String requestBody = getTaxFormRequest.toJson(); + Resource resource = new Resource(this, this.baseURL + "/getTaxForm", null); + String jsonResult = resource.request(requestBody, requestOptions, ApiConstants.HttpMethod.POST, null); + return GetTaxFormResponse.fromJson(jsonResult); + } + + /** + * Get documents + * + * @param getUploadedDocumentsRequest {@link GetUploadedDocumentsRequest } (required) + * @return {@link GetUploadedDocumentsResponse } + * @throws ApiException if fails to make API call + */ + public GetUploadedDocumentsResponse getUploadedDocuments(GetUploadedDocumentsRequest getUploadedDocumentsRequest) throws ApiException, IOException { + return getUploadedDocuments(getUploadedDocumentsRequest, null); + } + + /** + * Get documents + * + * @param getUploadedDocumentsRequest {@link GetUploadedDocumentsRequest } (required) + * @param requestOptions {@link RequestOptions } Object to store additional data such as idempotency-keys (optional) + * @return {@link GetUploadedDocumentsResponse } + * @throws ApiException if fails to make API call + */ + public GetUploadedDocumentsResponse getUploadedDocuments(GetUploadedDocumentsRequest getUploadedDocumentsRequest, RequestOptions requestOptions) throws ApiException, IOException { + + String requestBody = getUploadedDocumentsRequest.toJson(); + Resource resource = new Resource(this, this.baseURL + "/getUploadedDocuments", null); + String jsonResult = resource.request(requestBody, requestOptions, ApiConstants.HttpMethod.POST, null); + return GetUploadedDocumentsResponse.fromJson(jsonResult); + } + + /** + * Suspend an account holder + * + * @param suspendAccountHolderRequest {@link SuspendAccountHolderRequest } (required) + * @return {@link SuspendAccountHolderResponse } + * @throws ApiException if fails to make API call + */ + public SuspendAccountHolderResponse suspendAccountHolder(SuspendAccountHolderRequest suspendAccountHolderRequest) throws ApiException, IOException { + return suspendAccountHolder(suspendAccountHolderRequest, null); + } + + /** + * Suspend an account holder + * + * @param suspendAccountHolderRequest {@link SuspendAccountHolderRequest } (required) + * @param requestOptions {@link RequestOptions } Object to store additional data such as idempotency-keys (optional) + * @return {@link SuspendAccountHolderResponse } + * @throws ApiException if fails to make API call + */ + public SuspendAccountHolderResponse suspendAccountHolder(SuspendAccountHolderRequest suspendAccountHolderRequest, RequestOptions requestOptions) throws ApiException, IOException { + + String requestBody = suspendAccountHolderRequest.toJson(); + Resource resource = new Resource(this, this.baseURL + "/suspendAccountHolder", null); + String jsonResult = resource.request(requestBody, requestOptions, ApiConstants.HttpMethod.POST, null); + return SuspendAccountHolderResponse.fromJson(jsonResult); + } + + /** + * Unsuspend an account holder + * + * @param unSuspendAccountHolderRequest {@link UnSuspendAccountHolderRequest } (required) + * @return {@link UnSuspendAccountHolderResponse } + * @throws ApiException if fails to make API call + */ + public UnSuspendAccountHolderResponse unSuspendAccountHolder(UnSuspendAccountHolderRequest unSuspendAccountHolderRequest) throws ApiException, IOException { + return unSuspendAccountHolder(unSuspendAccountHolderRequest, null); + } + + /** + * Unsuspend an account holder + * + * @param unSuspendAccountHolderRequest {@link UnSuspendAccountHolderRequest } (required) + * @param requestOptions {@link RequestOptions } Object to store additional data such as idempotency-keys (optional) + * @return {@link UnSuspendAccountHolderResponse } + * @throws ApiException if fails to make API call + */ + public UnSuspendAccountHolderResponse unSuspendAccountHolder(UnSuspendAccountHolderRequest unSuspendAccountHolderRequest, RequestOptions requestOptions) throws ApiException, IOException { + + String requestBody = unSuspendAccountHolderRequest.toJson(); + Resource resource = new Resource(this, this.baseURL + "/unSuspendAccountHolder", null); + String jsonResult = resource.request(requestBody, requestOptions, ApiConstants.HttpMethod.POST, null); + return UnSuspendAccountHolderResponse.fromJson(jsonResult); + } + + /** + * Update an account + * + * @param updateAccountRequest {@link UpdateAccountRequest } (required) + * @return {@link UpdateAccountResponse } + * @throws ApiException if fails to make API call + */ + public UpdateAccountResponse updateAccount(UpdateAccountRequest updateAccountRequest) throws ApiException, IOException { + return updateAccount(updateAccountRequest, null); + } + + /** + * Update an account + * + * @param updateAccountRequest {@link UpdateAccountRequest } (required) + * @param requestOptions {@link RequestOptions } Object to store additional data such as idempotency-keys (optional) + * @return {@link UpdateAccountResponse } + * @throws ApiException if fails to make API call + */ + public UpdateAccountResponse updateAccount(UpdateAccountRequest updateAccountRequest, RequestOptions requestOptions) throws ApiException, IOException { + + String requestBody = updateAccountRequest.toJson(); + Resource resource = new Resource(this, this.baseURL + "/updateAccount", null); + String jsonResult = resource.request(requestBody, requestOptions, ApiConstants.HttpMethod.POST, null); + return UpdateAccountResponse.fromJson(jsonResult); + } + + /** + * Update an account holder + * + * @param updateAccountHolderRequest {@link UpdateAccountHolderRequest } (required) + * @return {@link UpdateAccountHolderResponse } + * @throws ApiException if fails to make API call + */ + public UpdateAccountHolderResponse updateAccountHolder(UpdateAccountHolderRequest updateAccountHolderRequest) throws ApiException, IOException { + return updateAccountHolder(updateAccountHolderRequest, null); + } + + /** + * Update an account holder + * + * @param updateAccountHolderRequest {@link UpdateAccountHolderRequest } (required) + * @param requestOptions {@link RequestOptions } Object to store additional data such as idempotency-keys (optional) + * @return {@link UpdateAccountHolderResponse } + * @throws ApiException if fails to make API call + */ + public UpdateAccountHolderResponse updateAccountHolder(UpdateAccountHolderRequest updateAccountHolderRequest, RequestOptions requestOptions) throws ApiException, IOException { + + String requestBody = updateAccountHolderRequest.toJson(); + Resource resource = new Resource(this, this.baseURL + "/updateAccountHolder", null); + String jsonResult = resource.request(requestBody, requestOptions, ApiConstants.HttpMethod.POST, null); + return UpdateAccountHolderResponse.fromJson(jsonResult); + } + + /** + * Update payout or processing state + * + * @param updateAccountHolderStateRequest {@link UpdateAccountHolderStateRequest } (required) + * @return {@link GetAccountHolderStatusResponse } + * @throws ApiException if fails to make API call + */ + public GetAccountHolderStatusResponse updateAccountHolderState(UpdateAccountHolderStateRequest updateAccountHolderStateRequest) throws ApiException, IOException { + return updateAccountHolderState(updateAccountHolderStateRequest, null); + } + + /** + * Update payout or processing state + * + * @param updateAccountHolderStateRequest {@link UpdateAccountHolderStateRequest } (required) + * @param requestOptions {@link RequestOptions } Object to store additional data such as idempotency-keys (optional) + * @return {@link GetAccountHolderStatusResponse } + * @throws ApiException if fails to make API call + */ + public GetAccountHolderStatusResponse updateAccountHolderState(UpdateAccountHolderStateRequest updateAccountHolderStateRequest, RequestOptions requestOptions) throws ApiException, IOException { + + String requestBody = updateAccountHolderStateRequest.toJson(); + Resource resource = new Resource(this, this.baseURL + "/updateAccountHolderState", null); + String jsonResult = resource.request(requestBody, requestOptions, ApiConstants.HttpMethod.POST, null); + return GetAccountHolderStatusResponse.fromJson(jsonResult); + } + + /** + * Upload a document + * + * @param uploadDocumentRequest {@link UploadDocumentRequest } (required) + * @return {@link UpdateAccountHolderResponse } + * @throws ApiException if fails to make API call + */ + public UpdateAccountHolderResponse uploadDocument(UploadDocumentRequest uploadDocumentRequest) throws ApiException, IOException { + return uploadDocument(uploadDocumentRequest, null); + } + + /** + * Upload a document + * + * @param uploadDocumentRequest {@link UploadDocumentRequest } (required) + * @param requestOptions {@link RequestOptions } Object to store additional data such as idempotency-keys (optional) + * @return {@link UpdateAccountHolderResponse } + * @throws ApiException if fails to make API call + */ + public UpdateAccountHolderResponse uploadDocument(UploadDocumentRequest uploadDocumentRequest, RequestOptions requestOptions) throws ApiException, IOException { + + String requestBody = uploadDocumentRequest.toJson(); + Resource resource = new Resource(this, this.baseURL + "/uploadDocument", null); + String jsonResult = resource.request(requestBody, requestOptions, ApiConstants.HttpMethod.POST, null); + return UpdateAccountHolderResponse.fromJson(jsonResult); + } +} diff --git a/src/main/java/com/adyen/service/classicplatforms/ClassicPlatformConfigurationApi.java b/src/main/java/com/adyen/service/classicplatforms/ClassicPlatformConfigurationApi.java new file mode 100644 index 000000000..6d8e153aa --- /dev/null +++ b/src/main/java/com/adyen/service/classicplatforms/ClassicPlatformConfigurationApi.java @@ -0,0 +1,220 @@ +/* + * Notification Configuration API + * This API is used for the classic integration. If you are just starting your implementation, refer to our [new integration guide](https://docs.adyen.com/marketplaces-and-platforms) instead. The Notification Configuration API provides endpoints for setting up and testing notifications that inform you of events on your platform, for example when a verification check or a payout has been completed. For more information, refer to our [documentation](https://docs.adyen.com/marketplaces-and-platforms/classic/notifications). ## Authentication Your Adyen contact will provide your API credential and an API key. To connect to the API, add an `X-API-Key` header with the API key as the value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: YOUR_API_KEY\" \\ ... ``` Alternatively, you can use the username and password to connect to the API using basic authentication. For example: ``` curl -U \"ws@MarketPlace.YOUR_PLATFORM_ACCOUNT\":\"YOUR_WS_PASSWORD\" \\ -H \"Content-Type: application/json\" \\ ... ``` When going live, you need to generate new web service user credentials to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning The Notification Configuration API supports [versioning](https://docs.adyen.com/development-resources/versioning) using a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://cal-test.adyen.com/cal/services/Notification/v6/createNotificationConfiguration ``` + * + * The version of the OpenAPI document: 6 + * + * + * 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.service.classicplatforms; + +import com.adyen.Client; +import com.adyen.Service; +import com.adyen.constants.ApiConstants; +import com.adyen.model.marketpayconfiguration.CreateNotificationConfigurationRequest; +import com.adyen.model.marketpayconfiguration.DeleteNotificationConfigurationRequest; +import com.adyen.model.marketpayconfiguration.GenericResponse; +import com.adyen.model.marketpayconfiguration.GetNotificationConfigurationListResponse; +import com.adyen.model.marketpayconfiguration.GetNotificationConfigurationRequest; +import com.adyen.model.marketpayconfiguration.GetNotificationConfigurationResponse; +import com.adyen.model.marketpayconfiguration.ServiceError; +import com.adyen.model.marketpayconfiguration.TestNotificationConfigurationRequest; +import com.adyen.model.marketpayconfiguration.TestNotificationConfigurationResponse; +import com.adyen.model.marketpayconfiguration.UpdateNotificationConfigurationRequest; +import com.adyen.model.RequestOptions; +import com.adyen.service.exception.ApiException; +import com.adyen.service.resource.Resource; + +import java.io.IOException; +import java.util.HashMap; +import java.util.Map; + +public class ClassicPlatformConfigurationApi extends Service { + + public static final String API_VERSION = "6"; + + protected String baseURL; + + /** + * General constructor in {@link com.adyen.service package}. + * @param client {@link Client } (required) + */ + public ClassicPlatformConfigurationApi(Client client) { + super(client); + this.baseURL = createBaseURL("https://cal-test.adyen.com/cal/services/Notification/v6"); + } + + /** + * General constructor in {@link com.adyen.service package}. + * Please use this constructor only if you would like to pass along your own url for routing or testing purposes. The latest API version is defined in this class as a constant. + * @param client {@link Client } (required) + * @param baseURL {@link String } (required) + */ + public ClassicPlatformConfigurationApi(Client client, String baseURL) { + super(client); + this.baseURL = baseURL; + } + + /** + * Subscribe to notifications + * + * @param createNotificationConfigurationRequest {@link CreateNotificationConfigurationRequest } (required) + * @return {@link GetNotificationConfigurationResponse } + * @throws ApiException if fails to make API call + */ + public GetNotificationConfigurationResponse createNotificationConfiguration(CreateNotificationConfigurationRequest createNotificationConfigurationRequest) throws ApiException, IOException { + return createNotificationConfiguration(createNotificationConfigurationRequest, null); + } + + /** + * Subscribe to notifications + * + * @param createNotificationConfigurationRequest {@link CreateNotificationConfigurationRequest } (required) + * @param requestOptions {@link RequestOptions } Object to store additional data such as idempotency-keys (optional) + * @return {@link GetNotificationConfigurationResponse } + * @throws ApiException if fails to make API call + */ + public GetNotificationConfigurationResponse createNotificationConfiguration(CreateNotificationConfigurationRequest createNotificationConfigurationRequest, RequestOptions requestOptions) throws ApiException, IOException { + + String requestBody = createNotificationConfigurationRequest.toJson(); + Resource resource = new Resource(this, this.baseURL + "/createNotificationConfiguration", null); + String jsonResult = resource.request(requestBody, requestOptions, ApiConstants.HttpMethod.POST, null); + return GetNotificationConfigurationResponse.fromJson(jsonResult); + } + + /** + * Delete a notification subscription configuration + * + * @param deleteNotificationConfigurationRequest {@link DeleteNotificationConfigurationRequest } (required) + * @return {@link GenericResponse } + * @throws ApiException if fails to make API call + */ + public GenericResponse deleteNotificationConfigurations(DeleteNotificationConfigurationRequest deleteNotificationConfigurationRequest) throws ApiException, IOException { + return deleteNotificationConfigurations(deleteNotificationConfigurationRequest, null); + } + + /** + * Delete a notification subscription configuration + * + * @param deleteNotificationConfigurationRequest {@link DeleteNotificationConfigurationRequest } (required) + * @param requestOptions {@link RequestOptions } Object to store additional data such as idempotency-keys (optional) + * @return {@link GenericResponse } + * @throws ApiException if fails to make API call + */ + public GenericResponse deleteNotificationConfigurations(DeleteNotificationConfigurationRequest deleteNotificationConfigurationRequest, RequestOptions requestOptions) throws ApiException, IOException { + + String requestBody = deleteNotificationConfigurationRequest.toJson(); + Resource resource = new Resource(this, this.baseURL + "/deleteNotificationConfigurations", null); + String jsonResult = resource.request(requestBody, requestOptions, ApiConstants.HttpMethod.POST, null); + return GenericResponse.fromJson(jsonResult); + } + + /** + * Get a notification subscription configuration + * + * @param getNotificationConfigurationRequest {@link GetNotificationConfigurationRequest } (required) + * @return {@link GetNotificationConfigurationResponse } + * @throws ApiException if fails to make API call + */ + public GetNotificationConfigurationResponse getNotificationConfiguration(GetNotificationConfigurationRequest getNotificationConfigurationRequest) throws ApiException, IOException { + return getNotificationConfiguration(getNotificationConfigurationRequest, null); + } + + /** + * Get a notification subscription configuration + * + * @param getNotificationConfigurationRequest {@link GetNotificationConfigurationRequest } (required) + * @param requestOptions {@link RequestOptions } Object to store additional data such as idempotency-keys (optional) + * @return {@link GetNotificationConfigurationResponse } + * @throws ApiException if fails to make API call + */ + public GetNotificationConfigurationResponse getNotificationConfiguration(GetNotificationConfigurationRequest getNotificationConfigurationRequest, RequestOptions requestOptions) throws ApiException, IOException { + + String requestBody = getNotificationConfigurationRequest.toJson(); + Resource resource = new Resource(this, this.baseURL + "/getNotificationConfiguration", null); + String jsonResult = resource.request(requestBody, requestOptions, ApiConstants.HttpMethod.POST, null); + return GetNotificationConfigurationResponse.fromJson(jsonResult); + } + + /** + * Get a list of notification subscription configurations + * + * @return {@link GetNotificationConfigurationListResponse } + * @throws ApiException if fails to make API call + */ + public GetNotificationConfigurationListResponse getNotificationConfigurationList() throws ApiException, IOException { + return getNotificationConfigurationList(null); + } + + /** + * Get a list of notification subscription configurations + * + * @param requestOptions {@link RequestOptions } Object to store additional data such as idempotency-keys (optional) + * @return {@link GetNotificationConfigurationListResponse } + * @throws ApiException if fails to make API call + */ + public GetNotificationConfigurationListResponse getNotificationConfigurationList(RequestOptions requestOptions) throws ApiException, IOException { + + Resource resource = new Resource(this, this.baseURL + "/getNotificationConfigurationList", null); + String jsonResult = resource.request("{}", requestOptions, ApiConstants.HttpMethod.POST, null); + return GetNotificationConfigurationListResponse.fromJson(jsonResult); + } + + /** + * Test a notification configuration + * + * @param testNotificationConfigurationRequest {@link TestNotificationConfigurationRequest } (required) + * @return {@link TestNotificationConfigurationResponse } + * @throws ApiException if fails to make API call + */ + public TestNotificationConfigurationResponse testNotificationConfiguration(TestNotificationConfigurationRequest testNotificationConfigurationRequest) throws ApiException, IOException { + return testNotificationConfiguration(testNotificationConfigurationRequest, null); + } + + /** + * Test a notification configuration + * + * @param testNotificationConfigurationRequest {@link TestNotificationConfigurationRequest } (required) + * @param requestOptions {@link RequestOptions } Object to store additional data such as idempotency-keys (optional) + * @return {@link TestNotificationConfigurationResponse } + * @throws ApiException if fails to make API call + */ + public TestNotificationConfigurationResponse testNotificationConfiguration(TestNotificationConfigurationRequest testNotificationConfigurationRequest, RequestOptions requestOptions) throws ApiException, IOException { + + String requestBody = testNotificationConfigurationRequest.toJson(); + Resource resource = new Resource(this, this.baseURL + "/testNotificationConfiguration", null); + String jsonResult = resource.request(requestBody, requestOptions, ApiConstants.HttpMethod.POST, null); + return TestNotificationConfigurationResponse.fromJson(jsonResult); + } + + /** + * Update a notification subscription configuration + * + * @param updateNotificationConfigurationRequest {@link UpdateNotificationConfigurationRequest } (required) + * @return {@link GetNotificationConfigurationResponse } + * @throws ApiException if fails to make API call + */ + public GetNotificationConfigurationResponse updateNotificationConfiguration(UpdateNotificationConfigurationRequest updateNotificationConfigurationRequest) throws ApiException, IOException { + return updateNotificationConfiguration(updateNotificationConfigurationRequest, null); + } + + /** + * Update a notification subscription configuration + * + * @param updateNotificationConfigurationRequest {@link UpdateNotificationConfigurationRequest } (required) + * @param requestOptions {@link RequestOptions } Object to store additional data such as idempotency-keys (optional) + * @return {@link GetNotificationConfigurationResponse } + * @throws ApiException if fails to make API call + */ + public GetNotificationConfigurationResponse updateNotificationConfiguration(UpdateNotificationConfigurationRequest updateNotificationConfigurationRequest, RequestOptions requestOptions) throws ApiException, IOException { + + String requestBody = updateNotificationConfigurationRequest.toJson(); + Resource resource = new Resource(this, this.baseURL + "/updateNotificationConfiguration", null); + String jsonResult = resource.request(requestBody, requestOptions, ApiConstants.HttpMethod.POST, null); + return GetNotificationConfigurationResponse.fromJson(jsonResult); + } +} diff --git a/src/main/java/com/adyen/service/classicplatforms/ClassicPlatformFundApi.java b/src/main/java/com/adyen/service/classicplatforms/ClassicPlatformFundApi.java new file mode 100644 index 000000000..17c3e04bc --- /dev/null +++ b/src/main/java/com/adyen/service/classicplatforms/ClassicPlatformFundApi.java @@ -0,0 +1,284 @@ +/* + * Fund API + * This API is used for the classic integration. If you are just starting your implementation, refer to our [new integration guide](https://docs.adyen.com/marketplaces-and-platforms) instead. The Fund API provides endpoints for managing the funds in the accounts on your platform. These management operations include, for example, the transfer of funds from one account to another, the payout of funds to an account holder, and the retrieval of balances in an account. For more information, refer to our [documentation](https://docs.adyen.com/marketplaces-and-platforms/classic/). ## Authentication Your Adyen contact will provide your API credential and an API key. To connect to the API, add an `X-API-Key` header with the API key as the value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: YOUR_API_KEY\" \\ ... ``` Alternatively, you can use the username and password to connect to the API using basic authentication. For example: ``` curl -U \"ws@MarketPlace.YOUR_PLATFORM_ACCOUNT\":\"YOUR_WS_PASSWORD\" \\ -H \"Content-Type: application/json\" \\ ... ``` When going live, you need to generate new web service user credentials to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning The Fund API supports [versioning](https://docs.adyen.com/development-resources/versioning) using a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://cal-test.adyen.com/cal/services/Fund/v6/accountHolderBalance ``` + * + * The version of the OpenAPI document: 6 + * + * + * 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.service.classicplatforms; + +import com.adyen.Client; +import com.adyen.Service; +import com.adyen.constants.ApiConstants; +import com.adyen.model.marketpayfund.AccountHolderBalanceRequest; +import com.adyen.model.marketpayfund.AccountHolderBalanceResponse; +import com.adyen.model.marketpayfund.AccountHolderTransactionListRequest; +import com.adyen.model.marketpayfund.AccountHolderTransactionListResponse; +import com.adyen.model.marketpayfund.DebitAccountHolderRequest; +import com.adyen.model.marketpayfund.DebitAccountHolderResponse; +import com.adyen.model.marketpayfund.PayoutAccountHolderRequest; +import com.adyen.model.marketpayfund.PayoutAccountHolderResponse; +import com.adyen.model.marketpayfund.RefundFundsTransferRequest; +import com.adyen.model.marketpayfund.RefundFundsTransferResponse; +import com.adyen.model.marketpayfund.RefundNotPaidOutTransfersRequest; +import com.adyen.model.marketpayfund.RefundNotPaidOutTransfersResponse; +import com.adyen.model.marketpayfund.ServiceError; +import com.adyen.model.marketpayfund.SetupBeneficiaryRequest; +import com.adyen.model.marketpayfund.SetupBeneficiaryResponse; +import com.adyen.model.marketpayfund.TransferFundsRequest; +import com.adyen.model.marketpayfund.TransferFundsResponse; +import com.adyen.model.RequestOptions; +import com.adyen.service.exception.ApiException; +import com.adyen.service.resource.Resource; + +import java.io.IOException; +import java.util.HashMap; +import java.util.Map; + +public class ClassicPlatformFundApi extends Service { + + public static final String API_VERSION = "6"; + + protected String baseURL; + + /** + * General constructor in {@link com.adyen.service package}. + * @param client {@link Client } (required) + */ + public ClassicPlatformFundApi(Client client) { + super(client); + this.baseURL = createBaseURL("https://cal-test.adyen.com/cal/services/Fund/v6"); + } + + /** + * General constructor in {@link com.adyen.service package}. + * Please use this constructor only if you would like to pass along your own url for routing or testing purposes. The latest API version is defined in this class as a constant. + * @param client {@link Client } (required) + * @param baseURL {@link String } (required) + */ + public ClassicPlatformFundApi(Client client, String baseURL) { + super(client); + this.baseURL = baseURL; + } + + /** + * Get the balances of an account holder + * + * @param accountHolderBalanceRequest {@link AccountHolderBalanceRequest } (required) + * @return {@link AccountHolderBalanceResponse } + * @throws ApiException if fails to make API call + */ + public AccountHolderBalanceResponse accountHolderBalance(AccountHolderBalanceRequest accountHolderBalanceRequest) throws ApiException, IOException { + return accountHolderBalance(accountHolderBalanceRequest, null); + } + + /** + * Get the balances of an account holder + * + * @param accountHolderBalanceRequest {@link AccountHolderBalanceRequest } (required) + * @param requestOptions {@link RequestOptions } Object to store additional data such as idempotency-keys (optional) + * @return {@link AccountHolderBalanceResponse } + * @throws ApiException if fails to make API call + */ + public AccountHolderBalanceResponse accountHolderBalance(AccountHolderBalanceRequest accountHolderBalanceRequest, RequestOptions requestOptions) throws ApiException, IOException { + + String requestBody = accountHolderBalanceRequest.toJson(); + Resource resource = new Resource(this, this.baseURL + "/accountHolderBalance", null); + String jsonResult = resource.request(requestBody, requestOptions, ApiConstants.HttpMethod.POST, null); + return AccountHolderBalanceResponse.fromJson(jsonResult); + } + + /** + * Get a list of transactions + * + * @param accountHolderTransactionListRequest {@link AccountHolderTransactionListRequest } (required) + * @return {@link AccountHolderTransactionListResponse } + * @throws ApiException if fails to make API call + */ + public AccountHolderTransactionListResponse accountHolderTransactionList(AccountHolderTransactionListRequest accountHolderTransactionListRequest) throws ApiException, IOException { + return accountHolderTransactionList(accountHolderTransactionListRequest, null); + } + + /** + * Get a list of transactions + * + * @param accountHolderTransactionListRequest {@link AccountHolderTransactionListRequest } (required) + * @param requestOptions {@link RequestOptions } Object to store additional data such as idempotency-keys (optional) + * @return {@link AccountHolderTransactionListResponse } + * @throws ApiException if fails to make API call + */ + public AccountHolderTransactionListResponse accountHolderTransactionList(AccountHolderTransactionListRequest accountHolderTransactionListRequest, RequestOptions requestOptions) throws ApiException, IOException { + + String requestBody = accountHolderTransactionListRequest.toJson(); + Resource resource = new Resource(this, this.baseURL + "/accountHolderTransactionList", null); + String jsonResult = resource.request(requestBody, requestOptions, ApiConstants.HttpMethod.POST, null); + return AccountHolderTransactionListResponse.fromJson(jsonResult); + } + + /** + * Send a direct debit request + * + * @param debitAccountHolderRequest {@link DebitAccountHolderRequest } (required) + * @return {@link DebitAccountHolderResponse } + * @throws ApiException if fails to make API call + */ + public DebitAccountHolderResponse debitAccountHolder(DebitAccountHolderRequest debitAccountHolderRequest) throws ApiException, IOException { + return debitAccountHolder(debitAccountHolderRequest, null); + } + + /** + * Send a direct debit request + * + * @param debitAccountHolderRequest {@link DebitAccountHolderRequest } (required) + * @param requestOptions {@link RequestOptions } Object to store additional data such as idempotency-keys (optional) + * @return {@link DebitAccountHolderResponse } + * @throws ApiException if fails to make API call + */ + public DebitAccountHolderResponse debitAccountHolder(DebitAccountHolderRequest debitAccountHolderRequest, RequestOptions requestOptions) throws ApiException, IOException { + + String requestBody = debitAccountHolderRequest.toJson(); + Resource resource = new Resource(this, this.baseURL + "/debitAccountHolder", null); + String jsonResult = resource.request(requestBody, requestOptions, ApiConstants.HttpMethod.POST, null); + return DebitAccountHolderResponse.fromJson(jsonResult); + } + + /** + * Pay out from an account to the account holder + * + * @param payoutAccountHolderRequest {@link PayoutAccountHolderRequest } (required) + * @return {@link PayoutAccountHolderResponse } + * @throws ApiException if fails to make API call + */ + public PayoutAccountHolderResponse payoutAccountHolder(PayoutAccountHolderRequest payoutAccountHolderRequest) throws ApiException, IOException { + return payoutAccountHolder(payoutAccountHolderRequest, null); + } + + /** + * Pay out from an account to the account holder + * + * @param payoutAccountHolderRequest {@link PayoutAccountHolderRequest } (required) + * @param requestOptions {@link RequestOptions } Object to store additional data such as idempotency-keys (optional) + * @return {@link PayoutAccountHolderResponse } + * @throws ApiException if fails to make API call + */ + public PayoutAccountHolderResponse payoutAccountHolder(PayoutAccountHolderRequest payoutAccountHolderRequest, RequestOptions requestOptions) throws ApiException, IOException { + + String requestBody = payoutAccountHolderRequest.toJson(); + Resource resource = new Resource(this, this.baseURL + "/payoutAccountHolder", null); + String jsonResult = resource.request(requestBody, requestOptions, ApiConstants.HttpMethod.POST, null); + return PayoutAccountHolderResponse.fromJson(jsonResult); + } + + /** + * Refund a funds transfer + * + * @param refundFundsTransferRequest {@link RefundFundsTransferRequest } (required) + * @return {@link RefundFundsTransferResponse } + * @throws ApiException if fails to make API call + */ + public RefundFundsTransferResponse refundFundsTransfer(RefundFundsTransferRequest refundFundsTransferRequest) throws ApiException, IOException { + return refundFundsTransfer(refundFundsTransferRequest, null); + } + + /** + * Refund a funds transfer + * + * @param refundFundsTransferRequest {@link RefundFundsTransferRequest } (required) + * @param requestOptions {@link RequestOptions } Object to store additional data such as idempotency-keys (optional) + * @return {@link RefundFundsTransferResponse } + * @throws ApiException if fails to make API call + */ + public RefundFundsTransferResponse refundFundsTransfer(RefundFundsTransferRequest refundFundsTransferRequest, RequestOptions requestOptions) throws ApiException, IOException { + + String requestBody = refundFundsTransferRequest.toJson(); + Resource resource = new Resource(this, this.baseURL + "/refundFundsTransfer", null); + String jsonResult = resource.request(requestBody, requestOptions, ApiConstants.HttpMethod.POST, null); + return RefundFundsTransferResponse.fromJson(jsonResult); + } + + /** + * Refund all transactions of an account since the most recent payout + * + * @param refundNotPaidOutTransfersRequest {@link RefundNotPaidOutTransfersRequest } (required) + * @return {@link RefundNotPaidOutTransfersResponse } + * @throws ApiException if fails to make API call + */ + public RefundNotPaidOutTransfersResponse refundNotPaidOutTransfers(RefundNotPaidOutTransfersRequest refundNotPaidOutTransfersRequest) throws ApiException, IOException { + return refundNotPaidOutTransfers(refundNotPaidOutTransfersRequest, null); + } + + /** + * Refund all transactions of an account since the most recent payout + * + * @param refundNotPaidOutTransfersRequest {@link RefundNotPaidOutTransfersRequest } (required) + * @param requestOptions {@link RequestOptions } Object to store additional data such as idempotency-keys (optional) + * @return {@link RefundNotPaidOutTransfersResponse } + * @throws ApiException if fails to make API call + */ + public RefundNotPaidOutTransfersResponse refundNotPaidOutTransfers(RefundNotPaidOutTransfersRequest refundNotPaidOutTransfersRequest, RequestOptions requestOptions) throws ApiException, IOException { + + String requestBody = refundNotPaidOutTransfersRequest.toJson(); + Resource resource = new Resource(this, this.baseURL + "/refundNotPaidOutTransfers", null); + String jsonResult = resource.request(requestBody, requestOptions, ApiConstants.HttpMethod.POST, null); + return RefundNotPaidOutTransfersResponse.fromJson(jsonResult); + } + + /** + * Designate a beneficiary account and transfer the benefactor's current balance + * + * @param setupBeneficiaryRequest {@link SetupBeneficiaryRequest } (required) + * @return {@link SetupBeneficiaryResponse } + * @throws ApiException if fails to make API call + */ + public SetupBeneficiaryResponse setupBeneficiary(SetupBeneficiaryRequest setupBeneficiaryRequest) throws ApiException, IOException { + return setupBeneficiary(setupBeneficiaryRequest, null); + } + + /** + * Designate a beneficiary account and transfer the benefactor's current balance + * + * @param setupBeneficiaryRequest {@link SetupBeneficiaryRequest } (required) + * @param requestOptions {@link RequestOptions } Object to store additional data such as idempotency-keys (optional) + * @return {@link SetupBeneficiaryResponse } + * @throws ApiException if fails to make API call + */ + public SetupBeneficiaryResponse setupBeneficiary(SetupBeneficiaryRequest setupBeneficiaryRequest, RequestOptions requestOptions) throws ApiException, IOException { + + String requestBody = setupBeneficiaryRequest.toJson(); + Resource resource = new Resource(this, this.baseURL + "/setupBeneficiary", null); + String jsonResult = resource.request(requestBody, requestOptions, ApiConstants.HttpMethod.POST, null); + return SetupBeneficiaryResponse.fromJson(jsonResult); + } + + /** + * Transfer funds between platform accounts + * + * @param transferFundsRequest {@link TransferFundsRequest } (required) + * @return {@link TransferFundsResponse } + * @throws ApiException if fails to make API call + */ + public TransferFundsResponse transferFunds(TransferFundsRequest transferFundsRequest) throws ApiException, IOException { + return transferFunds(transferFundsRequest, null); + } + + /** + * Transfer funds between platform accounts + * + * @param transferFundsRequest {@link TransferFundsRequest } (required) + * @param requestOptions {@link RequestOptions } Object to store additional data such as idempotency-keys (optional) + * @return {@link TransferFundsResponse } + * @throws ApiException if fails to make API call + */ + public TransferFundsResponse transferFunds(TransferFundsRequest transferFundsRequest, RequestOptions requestOptions) throws ApiException, IOException { + + String requestBody = transferFundsRequest.toJson(); + Resource resource = new Resource(this, this.baseURL + "/transferFunds", null); + String jsonResult = resource.request(requestBody, requestOptions, ApiConstants.HttpMethod.POST, null); + return TransferFundsResponse.fromJson(jsonResult); + } +} diff --git a/src/main/java/com/adyen/service/classicplatforms/ClassicPlatformHopApi.java b/src/main/java/com/adyen/service/classicplatforms/ClassicPlatformHopApi.java new file mode 100644 index 000000000..71981797b --- /dev/null +++ b/src/main/java/com/adyen/service/classicplatforms/ClassicPlatformHopApi.java @@ -0,0 +1,110 @@ +/* + * Hosted onboarding API + * This API is used for the classic integration. If you are just starting your implementation, refer to our [new integration guide](https://docs.adyen.com/marketplaces-and-platforms) instead. The Hosted onboarding API provides endpoints that you can use to generate links to Adyen-hosted pages, such as an [onboarding page](https://docs.adyen.com/marketplaces-and-platforms/classic/hosted-onboarding-page) or a [PCI compliance questionnaire](https://docs.adyen.com/marketplaces-and-platforms/classic/platforms-for-partners). You can provide these links to your account holders so that they can complete their onboarding. ## Authentication Your Adyen contact will provide your API credential and an API key. To connect to the API, add an `X-API-Key` header with the API key as the value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: YOUR_API_KEY\" \\ ... ``` Alternatively, you can use the username and password to connect to the API using basic authentication. For example: ``` curl -U \"ws@MarketPlace.YOUR_PLATFORM_ACCOUNT\":\"YOUR_WS_PASSWORD\" \\ -H \"Content-Type: application/json\" \\ ... ``` When going live, you need to generate new web service user credentials to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning The Hosted onboarding API supports [versioning](https://docs.adyen.com/development-resources/versioning) using a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://cal-test.adyen.com/cal/services/Hop/v6/getOnboardingUrl ``` + * + * The version of the OpenAPI document: 6 + * + * + * 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.service.classicplatforms; + +import com.adyen.Client; +import com.adyen.Service; +import com.adyen.constants.ApiConstants; +import com.adyen.model.marketpayhop.GetOnboardingUrlRequest; +import com.adyen.model.marketpayhop.GetOnboardingUrlResponse; +import com.adyen.model.marketpayhop.GetPciUrlRequest; +import com.adyen.model.marketpayhop.GetPciUrlResponse; +import com.adyen.model.marketpayhop.ServiceError; +import com.adyen.model.RequestOptions; +import com.adyen.service.exception.ApiException; +import com.adyen.service.resource.Resource; + +import java.io.IOException; +import java.util.HashMap; +import java.util.Map; + +public class ClassicPlatformHopApi extends Service { + + public static final String API_VERSION = "6"; + + protected String baseURL; + + /** + * Hosted Onboarding Page constructor in {@link com.adyen.service package}. + * @param client {@link Client } (required) + */ + public ClassicPlatformHopApi(Client client) { + super(client); + this.baseURL = createBaseURL("https://cal-test.adyen.com/cal/services/Hop/v6"); + } + + /** + * Hosted Onboarding Page constructor in {@link com.adyen.service package}. + * Please use this constructor only if you would like to pass along your own url for routing or testing purposes. The latest API version is defined in this class as a constant. + * @param client {@link Client } (required) + * @param baseURL {@link String } (required) + */ + public ClassicPlatformHopApi(Client client, String baseURL) { + super(client); + this.baseURL = baseURL; + } + + /** + * Get a link to a Adyen-hosted onboarding page + * + * @param getOnboardingUrlRequest {@link GetOnboardingUrlRequest } (required) + * @return {@link GetOnboardingUrlResponse } + * @throws ApiException if fails to make API call + */ + public GetOnboardingUrlResponse getOnboardingUrl(GetOnboardingUrlRequest getOnboardingUrlRequest) throws ApiException, IOException { + return getOnboardingUrl(getOnboardingUrlRequest, null); + } + + /** + * Get a link to a Adyen-hosted onboarding page + * + * @param getOnboardingUrlRequest {@link GetOnboardingUrlRequest } (required) + * @param requestOptions {@link RequestOptions } Object to store additional data such as idempotency-keys (optional) + * @return {@link GetOnboardingUrlResponse } + * @throws ApiException if fails to make API call + */ + public GetOnboardingUrlResponse getOnboardingUrl(GetOnboardingUrlRequest getOnboardingUrlRequest, RequestOptions requestOptions) throws ApiException, IOException { + + String requestBody = getOnboardingUrlRequest.toJson(); + Resource resource = new Resource(this, this.baseURL + "/getOnboardingUrl", null); + String jsonResult = resource.request(requestBody, requestOptions, ApiConstants.HttpMethod.POST, null); + return GetOnboardingUrlResponse.fromJson(jsonResult); + } + + /** + * Get a link to a PCI compliance questionnaire + * + * @param getPciUrlRequest {@link GetPciUrlRequest } (required) + * @return {@link GetPciUrlResponse } + * @throws ApiException if fails to make API call + */ + public GetPciUrlResponse getPciQuestionnaireUrl(GetPciUrlRequest getPciUrlRequest) throws ApiException, IOException { + return getPciQuestionnaireUrl(getPciUrlRequest, null); + } + + /** + * Get a link to a PCI compliance questionnaire + * + * @param getPciUrlRequest {@link GetPciUrlRequest } (required) + * @param requestOptions {@link RequestOptions } Object to store additional data such as idempotency-keys (optional) + * @return {@link GetPciUrlResponse } + * @throws ApiException if fails to make API call + */ + public GetPciUrlResponse getPciQuestionnaireUrl(GetPciUrlRequest getPciUrlRequest, RequestOptions requestOptions) throws ApiException, IOException { + + String requestBody = getPciUrlRequest.toJson(); + Resource resource = new Resource(this, this.baseURL + "/getPciQuestionnaireUrl", null); + String jsonResult = resource.request(requestBody, requestOptions, ApiConstants.HttpMethod.POST, null); + return GetPciUrlResponse.fromJson(jsonResult); + } +} diff --git a/src/main/java/com/adyen/service/transfers/TransactionsApi.java b/src/main/java/com/adyen/service/transfers/TransactionsApi.java index b9ec5741e..25049d88b 100644 --- a/src/main/java/com/adyen/service/transfers/TransactionsApi.java +++ b/src/main/java/com/adyen/service/transfers/TransactionsApi.java @@ -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; @@ -67,10 +67,10 @@ public TransactionSearchResponse getAllTransactions(OffsetDateTime createdSince, /** * Get all transactions * - * @param balancePlatform {@link String } Query: Unique identifier of the [balance platform](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/get/balancePlatforms/{id}__queryParam_id). (optional) - * @param paymentInstrumentId {@link String } Query: Unique identifier of the [payment instrument](https://docs.adyen.com/api-explorer/balanceplatform/latest/get/paymentInstruments/_id_). (optional) - * @param accountHolderId {@link String } Query: Unique identifier of the [account holder](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/get/accountHolders/{id}__queryParam_id). (optional) - * @param balanceAccountId {@link String } Query: Unique identifier of the [balance account](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/get/balanceAccounts/{id}__queryParam_id). (optional) + * @param balancePlatform {@link String } Query: The unique identifier of the [balance platform](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/get/balancePlatforms/{id}__queryParam_id). Required if you don't provide a `balanceAccountId` or `accountHolderId`. (optional) + * @param paymentInstrumentId {@link String } Query: The unique identifier of the [payment instrument](https://docs.adyen.com/api-explorer/balanceplatform/latest/get/paymentInstruments/_id_). To use this parameter, you must also provide a `balanceAccountId`, `accountHolderId`, or `balancePlatform`. The `paymentInstrumentId` must be related to the `balanceAccountId` or `accountHolderId` that you provide. (optional) + * @param accountHolderId {@link String } Query: The unique identifier of the [account holder](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/get/accountHolders/{id}__queryParam_id). Required if you don't provide a `balanceAccountId` or `balancePlatform`. If you provide a `balanceAccountId`, the `accountHolderId` must be related to the `balanceAccountId`. (optional) + * @param balanceAccountId {@link String } Query: The unique identifier of the [balance account](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/get/balanceAccounts/{id}__queryParam_id). Required if you don't provide an `accountHolderId` or `balancePlatform`. If you provide an `accountHolderId`, the `balanceAccountId` must be related to the `accountHolderId`. (optional) * @param cursor {@link String } Query: The `cursor` returned in the links of the previous response. (optional) * @param createdSince {@link OffsetDateTime } Query: Only include transactions that have been created on or after this point in time. The value must be in ISO 8601 format. For example, **2021-05-30T15:07:40Z**. (required) * @param createdUntil {@link OffsetDateTime } Query: Only include transactions that have been created on or before this point in time. The value must be in ISO 8601 format. For example, **2021-05-30T15:07:40Z**. (required) diff --git a/src/main/java/com/adyen/service/transfers/TransfersApi.java b/src/main/java/com/adyen/service/transfers/TransfersApi.java index b910e8300..64575c82b 100644 --- a/src/main/java/com/adyen/service/transfers/TransfersApi.java +++ b/src/main/java/com/adyen/service/transfers/TransfersApi.java @@ -15,6 +15,7 @@ import com.adyen.Service; import com.adyen.constants.ApiConstants; import com.adyen.model.transfers.RestServiceError; +import com.adyen.model.transfers.ServiceError; import com.adyen.model.transfers.Transfer; import com.adyen.model.transfers.TransferInfo; import com.adyen.model.RequestOptions; diff --git a/src/test/java/com/adyen/LegalEntityManagementTest.java b/src/test/java/com/adyen/LegalEntityManagementTest.java index c3fee5493..1580e8561 100644 --- a/src/test/java/com/adyen/LegalEntityManagementTest.java +++ b/src/test/java/com/adyen/LegalEntityManagementTest.java @@ -7,6 +7,7 @@ import org.junit.Test; import java.io.IOException; +import java.util.Base64; import java.util.logging.Level; import java.util.logging.Logger; @@ -319,7 +320,7 @@ public void TestBase64EncodedResponseToByteArray() throws Exception { " \"type\": \"bankStatement\"\n" + "}"); Document response = service.updateDocument("SE322KT223222D5FJ7TJN2986", request); - assertEquals("Thisisanbase64encodedstring", new String(response.getAttachments().get(0).getContent())); + assertEquals("Thisisanbase64encodedstring", new String(Base64.getDecoder().decode(response.getAttachments().get(0).getContent()))); } @Test diff --git a/src/test/java/com/adyen/MarketPayTest.java b/src/test/java/com/adyen/MarketPayTest.java new file mode 100644 index 000000000..8d47c8fc4 --- /dev/null +++ b/src/test/java/com/adyen/MarketPayTest.java @@ -0,0 +1,202 @@ +package com.adyen; + +import com.adyen.constants.ApiConstants; +import com.adyen.httpclient.HTTPClientException; +import com.adyen.model.marketpayaccount.GetTaxFormRequest; +import com.adyen.model.marketpayaccount.GetTaxFormResponse; +import com.adyen.model.marketpayconfiguration.CreateNotificationConfigurationRequest; +import com.adyen.model.marketpayconfiguration.GetNotificationConfigurationResponse; +import com.adyen.model.marketpayfund.PayoutAccountHolderRequest; +import com.adyen.model.marketpayfund.PayoutAccountHolderResponse; +import com.adyen.model.marketpayhop.GetOnboardingUrlRequest; +import com.adyen.model.marketpayhop.GetOnboardingUrlResponse; +import com.adyen.service.classicplatforms.ClassicPlatformAccountApi; +import com.adyen.service.classicplatforms.ClassicPlatformConfigurationApi; +import com.adyen.service.classicplatforms.ClassicPlatformFundApi; +import com.adyen.service.classicplatforms.ClassicPlatformHopApi; +import com.adyen.service.exception.ApiException; +import org.junit.Test; + +import java.io.IOException; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertTrue; +import static org.mockito.Mockito.verify; + +public class MarketPayTest extends BaseTest{ + + @Test + public void testConfigurationApi() throws IOException, ApiException, HTTPClientException { + CreateNotificationConfigurationRequest request = CreateNotificationConfigurationRequest.fromJson("{\n" + + " \"configurationDetails\": {\n" + + " \"active\": true,\n" + + " \"description\": \"Unique description 123\",\n" + + " \"eventConfigs\": [\n" + + " {\n" + + " \"eventType\": \"ACCOUNT_HOLDER_VERIFICATION\",\n" + + " \"includeMode\": \"INCLUDE\"\n" + + " }\n" + + " ],\n" + + " \"notifyURL\": \"https://www.adyen.com/notification-handler\",\n" + + " \"notifyUsername\": \"testUserName\",\n" + + " \"notifyPassword\": \"testPassword\",\n" + + " \"sslProtocol\": \"TLSv13\"\n" + + " }\n" + + "}"); + String jsonRequest = request.toJson(); + assertTrue(jsonRequest.contains("eventType\":\"ACCOUNT_HOLDER_VERIFICATION")); + assertTrue(jsonRequest.contains("\"sslProtocol\":\"TLSv13\"")); + GetNotificationConfigurationResponse response = GetNotificationConfigurationResponse.fromJson("{\n" + + " \"pspReference\": \"8516178952380553\",\n" + + " \"configurationDetails\": {\n" + + " \"active\": true,\n" + + " \"description\": \"Unique description 123\",\n" + + " \"eventConfigs\": [\n" + + " {\n" + + " \"eventType\": \"ACCOUNT_HOLDER_VERIFICATION\",\n" + + " \"includeMode\": \"INCLUDE\"\n" + + " }\n" + + " ],\n" + + " \"notificationId\": 28468,\n" + + " \"notifyURL\": \"https://www.adyen.com/notification-handler\",\n" + + " \"sslProtocol\": \"TLSv13\"\n" + + " }\n" + + "}"); + String json = response.toJson(); + assertTrue(json.contains("eventType\":\"ACCOUNT_HOLDER_VERIFICATION")); + assertTrue(json.contains("\"sslProtocol\":\"TLSv13\"")); + + Client client = createMockClientFromResponse(json); + ClassicPlatformConfigurationApi api = new ClassicPlatformConfigurationApi(client); + + api.createNotificationConfiguration(request); + verify(client.getHttpClient()).request( + "https://cal-test.adyen.com/cal/services/Notification/v6/createNotificationConfiguration", + jsonRequest, + client.getConfig(), + false, + null, + ApiConstants.HttpMethod.POST, + null + ); + } + + @Test + public void testHopApi() throws IOException, ApiException, HTTPClientException { + GetOnboardingUrlRequest request = GetOnboardingUrlRequest.fromJson("{\n" + + " \"accountHolderCode\": \"CODE_OF_ACCOUNT_HOLDER\",\n" + + " \"returnUrl\": \"https://your.return-url.com/?submerchant=123\"\n" + + "}"); + String jsonRequest = request.toJson(); + GetOnboardingUrlResponse response = GetOnboardingUrlResponse.fromJson("{\n" + + " \"invalidFields\": [],\n" + + " \"pspReference\": \"9115677600500127\",\n" + + " \"resultCode\": \"Success\",\n" + + " \"redirectUrl\": \"https://hop-test.adyen.com/hop/view/?token=\"\n" + + "}"); + String json = response.toJson(); + Client client = createMockClientFromResponse(json); + ClassicPlatformHopApi api = new ClassicPlatformHopApi(client); + + api.getOnboardingUrl(request); + verify(client.getHttpClient()).request( + "https://cal-test.adyen.com/cal/services/Hop/v6/getOnboardingUrl", + jsonRequest, + client.getConfig(), + false, + null, + ApiConstants.HttpMethod.POST, + null + ); + } + + @Test + public void testAccountApi() throws IOException, ApiException, HTTPClientException { + GetTaxFormRequest request = GetTaxFormRequest.fromJson("{\n" + + " \"accountHolderCode\": \"CODE_OF_ACCOUNT_HOLDER\",\n" + + " \"formType\": \"1099-K\",\n" + + " \"year\": 2020\n" + + "}"); + String jsonRequest = request.toJson(); + GetTaxFormResponse response = GetTaxFormResponse.fromJson("{\n" + + " \"content\": \"AQIDBAUGBwgJCgsMDQ4PEBESExQ=\",\n" + + " \"contentType\": \"String\",\n" + + " \"invalidFields\": [\n" + + " {\n" + + " \"errorCode\": 0,\n" + + " \"errorDescription\": \"string\",\n" + + " \"fieldType\": {\n" + + " \"field\": \"string\",\n" + + " \"fieldName\": \"accountCode\",\n" + + " \"shareholderCode\": \"string\"\n" + + " }\n" + + " }\n" + + " ],\n" + + " \"pspReference\": \"string\",\n" + + " \"resultCode\": \"string\"\n" + + "}"); + // 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); + + api.getTaxForm(request); + verify(client.getHttpClient()).request( + "https://cal-test.adyen.com/cal/services/Account/v6/getTaxForm", + jsonRequest, + client.getConfig(), + false, + null, + ApiConstants.HttpMethod.POST, + null + ); + } + + @Test + public void testFundApi() throws IOException, ApiException, HTTPClientException { + PayoutAccountHolderRequest request = PayoutAccountHolderRequest.fromJson("{\n" + + " \"accountCode\": \"118731451\",\n" + + " \"amount\": {\n" + + " \"currency\": \"EUR\",\n" + + " \"value\": 99792\n" + + " },\n" + + " \"accountHolderCode\": \"CODE_OF_ACCOUNT_HOLDER\",\n" + + " \"description\": \"12345 – Test\",\n" + + " \"bankAccountUUID\": \"000b81aa-ae7e-4492-aa7e-72b2129dce0c\"\n" + + "}"); + String jsonRequest = request.toJson(); + PayoutAccountHolderResponse response = PayoutAccountHolderResponse.fromJson("{\n" + + " \"bankAccountUUID\": \"string\",\n" + + " \"invalidFields\": [\n" + + " {\n" + + " \"errorCode\": 0,\n" + + " \"errorDescription\": \"string\",\n" + + " \"fieldType\": {\n" + + " \"field\": \"string\",\n" + + " \"fieldName\": \"accountCode\",\n" + + " \"shareholderCode\": \"string\"\n" + + " }\n" + + " }\n" + + " ],\n" + + " \"merchantReference\": \"string\",\n" + + " \"payoutSpeed\": \"STANDARD\",\n" + + " \"pspReference\": \"string\",\n" + + " \"resultCode\": \"string\"\n" + + "}"); + String json = response.toJson(); + Client client = createMockClientFromResponse(json); + ClassicPlatformFundApi api = new ClassicPlatformFundApi(client); + + assertEquals(json, api.payoutAccountHolder(request).toJson()); + verify(client.getHttpClient()).request( + "https://cal-test.adyen.com/cal/services/Fund/v6/payoutAccountHolder", + jsonRequest, + client.getConfig(), + false, + null, + ApiConstants.HttpMethod.POST, + null + ); + } +} diff --git a/src/test/java/com/adyen/PaymentTest.java b/src/test/java/com/adyen/PaymentTest.java index 1133fb96b..23382563d 100644 --- a/src/test/java/com/adyen/PaymentTest.java +++ b/src/test/java/com/adyen/PaymentTest.java @@ -44,6 +44,7 @@ import java.util.Locale; import java.util.Map; import java.util.TimeZone; +import java.util.Base64; import static com.adyen.constants.ApiConstants.AdditionalData.*; import static com.adyen.constants.ApiConstants.SelectedBrand.BOLETO_SANTANDER; @@ -443,9 +444,6 @@ protected void assertRefused(PaymentResult paymentResult) { @Test public void TestByteArrayDeserialization() throws Exception { - Client client = createMockClientFromFile("mocks/authorise-success.json"); - PaymentApi payment = new PaymentApi(client); - final String expectedBytesAsString = "Let's pretend/ this a jpg or something="; final byte[] expectedBytes = expectedBytesAsString.getBytes(StandardCharsets.UTF_8); final ByteString expectedByteString = ByteString.of(expectedBytes); @@ -456,7 +454,7 @@ public void TestByteArrayDeserialization() throws Exception { byte[] actualDeserializedBytes = JSON.getMapper().readValue(serializedBytesWithQuotes, byte[].class); // Assert - assertEquals(expectedBytesAsString, new String(actualDeserializedBytes, StandardCharsets.UTF_8)); + assertEquals(expectedBytesAsString, new String(Base64.getDecoder().decode(actualDeserializedBytes))); } @Test diff --git a/templates/libraries/jersey3/JSON.mustache b/templates/libraries/jersey3/JSON.mustache index 17cbd4e63..b5fcf51d7 100644 --- a/templates/libraries/jersey3/JSON.mustache +++ b/templates/libraries/jersey3/JSON.mustache @@ -1,6 +1,7 @@ package {{modelPackage}}; 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; @@ -48,6 +49,7 @@ public class JSON implements ContextResolver { // Custom ByteSerializer SimpleModule simpleModule = new SimpleModule(); simpleModule.addSerializer(byte[].class, new ByteArraySerializer()); + simpleModule.addDeserializer(byte[].class, new ByteArrayDeserializer()); mapper.registerModule(simpleModule); }