From 65ca8b24631b4a4a267d49263adaa7b4a2ba26f6 Mon Sep 17 00:00:00 2001 From: Alessio Zampatti Date: Wed, 11 Oct 2023 10:53:43 +0200 Subject: [PATCH 1/7] Update Readme for reintroducing classic platforms API (#1143) --- README.md | 39 ++++++++++++++++++++++----------------- 1 file changed, 22 insertions(+), 17 deletions(-) diff --git a/README.md b/README.md index 195c167e4..a41526c87 100644 --- a/README.md +++ b/README.md @@ -10,23 +10,28 @@ This is the officially supported Java library for using Adyen's APIs. The Library supports all APIs under the following services: -| API | Description | Service Name | Supported version | -|-----------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------|-------------------| -| [BIN lookup API](https://docs.adyen.com/api-explorer/BinLookup/54/overview) | The BIN Lookup API provides endpoints for retrieving information based on a given BIN. | BinLookup | **v54** | -| [Capital API](https://docs.adyen.com/api-explorer/capital/3/overview) | Adyen Capital allows you to build an embedded financing offering for your users to serve their operational needs. | Capital | **v3** | -| [Checkout API](https://docs.adyen.com/api-explorer/Checkout/70/overview) | Our latest integration for accepting online payments. | Checkout | **v70** | -| [Configuration API](https://docs.adyen.com/api-explorer/balanceplatform/2/overview) | The Configuration API enables you to create a platform where you can onboard your users as account holders and create balance accounts, cards, and business accounts. | balanceplatform package subclasses | **v2** | -| [DataProtection API](https://docs.adyen.com/development-resources/data-protection-api) | Adyen Data Protection API provides a way for you to process [Subject Erasure Requests](https://gdpr-info.eu/art-17-gdpr/) as mandated in GDPR. Use our API to submit a request to delete shopper's data, including payment details and other related information (for example, delivery address or shopper email) | DataProtection | **v1** | -| [Legal Entity Management API](https://docs.adyen.com/api-explorer/legalentity/3/overview) | Manage legal entities that contain information required for verification. | legalentitymanagement package subclasses | **v3** | -| [Local/Cloud-based Terminal API](https://docs.adyen.com/point-of-sale/terminal-api-reference) | Our point-of-sale integration. | TerminalLocalAPI or TerminalCloudAPI | - | -| [Management API](https://docs.adyen.com/api-explorer/Management/1/overview) | Configure and manage your Adyen company and merchant accounts, stores, and payment terminals. | management package subclasses | **v1** | -| [Payments API](https://docs.adyen.com/api-explorer/Payment/68/overview) | Our classic integration for online payments. | Payment | **v68** | -| [Payouts API](https://docs.adyen.com/api-explorer/Payout/68/overview) | Endpoints for sending funds to your customers. | Payout | **v68** | -| [POS Terminal Management API](https://docs.adyen.com/api-explorer/postfmapi/1/overview) | Endpoints for managing your point-of-sale payment terminals. | TerminalManagement | **v1** | -| [Recurring API](https://docs.adyen.com/api-explorer/Recurring/68/overview) | Endpoints for managing saved payment details. | Recurring | **v68** | -| [Stored Value API](https://docs.adyen.com/payment-methods/gift-cards/stored-value-api) | Manage both online and point-of-sale gift cards and other stored-value cards. | StoredValue | **v46** | -| [Transfers API](https://docs.adyen.com/api-explorer/transfers/3/overview) | The Transfers API provides endpoints that can be used to get information about all your transactions, move funds within your balance platform or send funds from your balance platform to a transfer instrument. | Transfers | **v3** | -| [Webhooks](https://docs.adyen.com/api-explorer/Webhooks/1/overview) | Adyen uses webhooks to send notifications about payment status updates, newly available reports, and other events that can be subscribed to. For more information, refer to our [documentation](https://docs.adyen.com/development-resources/webhooks). | *Models only* | **v1** | +| API | Description | Service Name | Supported version | +|------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------|-------------------| +| [BIN lookup API](https://docs.adyen.com/api-explorer/BinLookup/54/overview) | The BIN Lookup API provides endpoints for retrieving information based on a given BIN. | BinLookup | **v54** | +| [Capital API](https://docs.adyen.com/api-explorer/capital/3/overview) | Adyen Capital allows you to build an embedded financing offering for your users to serve their operational needs. | Capital | **v3** | +| [Checkout API](https://docs.adyen.com/api-explorer/Checkout/70/overview) | Our latest integration for accepting online payments. | Checkout | **v70** | +| [Configuration API](https://docs.adyen.com/api-explorer/balanceplatform/2/overview) | The Configuration API enables you to create a platform where you can onboard your users as account holders and create balance accounts, cards, and business accounts. | balanceplatform package subclasses | **v2** | +| [DataProtection API](https://docs.adyen.com/development-resources/data-protection-api) | Adyen Data Protection API provides a way for you to process [Subject Erasure Requests](https://gdpr-info.eu/art-17-gdpr/) as mandated in GDPR. Use our API to submit a request to delete shopper's data, including payment details and other related information (for example, delivery address or shopper email) | DataProtection | **v1** | +| [Legal Entity Management API](https://docs.adyen.com/api-explorer/legalentity/3/overview) | Manage legal entities that contain information required for verification. | legalentitymanagement package subclasses | **v3** | +| [Local/Cloud-based Terminal API](https://docs.adyen.com/point-of-sale/terminal-api-reference) | Our point-of-sale integration. | TerminalLocalAPI or TerminalCloudAPI | - | +| [Management API](https://docs.adyen.com/api-explorer/Management/1/overview) | Configure and manage your Adyen company and merchant accounts, stores, and payment terminals. | management package subclasses | **v1** | +| [Payments API](https://docs.adyen.com/api-explorer/Payment/68/overview) | Our classic integration for online payments. | Payment | **v68** | +| [Payouts API](https://docs.adyen.com/api-explorer/Payout/68/overview) | Endpoints for sending funds to your customers. | Payout | **v68** | +| [POS Terminal Management API](https://docs.adyen.com/api-explorer/postfmapi/1/overview) | Endpoints for managing your point-of-sale payment terminals. | TerminalManagement | **v1** | +| [Recurring API](https://docs.adyen.com/api-explorer/Recurring/68/overview) | Endpoints for managing saved payment details. | Recurring | **v68** | +| [Stored Value API](https://docs.adyen.com/payment-methods/gift-cards/stored-value-api) | Manage both online and point-of-sale gift cards and other stored-value cards. | StoredValue | **v46** | +| [Transfers API](https://docs.adyen.com/api-explorer/transfers/3/overview) | The Transfers API provides endpoints that can be used to get information about all your transactions, move funds within your balance platform or send funds from your balance platform to a transfer instrument. | Transfers | **v3** | +| [Webhooks](https://docs.adyen.com/api-explorer/Webhooks/1/overview) | Adyen uses webhooks to send notifications about payment status updates, newly available reports, and other events that can be subscribed to. For more information, refer to our [documentation](https://docs.adyen.com/development-resources/webhooks). | *Models only* | **v1** | +| [Classic Platforms Account API](https://docs.adyen.com/api-explorer/Account/6/overview) | This API is used for the classic integration. If you are just starting your implementation, refer to our new integration guide instead. | ClassicPlatformAccountApi | **v6** | +| [Classic Platforms Fund API](https://docs.adyen.com/api-explorer/Fund/6/overview) | This API is used for the classic integration. If you are just starting your implementation, refer to our new integration guide instead. | ClassicPlatformFundApi | **v6** | +| [Classic Platforms Hosted Onboarding Page API](https://docs.adyen.com/api-explorer/Hop/6/overview) | This API is used for the classic integration. If you are just starting your implementation, refer to our new integration guide instead. | ClassicPlatformHopApi | **v6** | +| [Classic Platforms Notification Configuration API](https://docs.adyen.com/api-explorer/NotificationConfiguration/6/overview) | This API is used for the classic integration. If you are just starting your implementation, refer to our new integration guide instead. | ClassicPlatformConfigurationApi | **v6** | + ## Supported Webhook versions The library supports all webhooks under the following model directories: From 87d7b67615177936dd78d0a4709275548be2e38e Mon Sep 17 00:00:00 2001 From: Alessio Zampatti Date: Wed, 11 Oct 2023 13:29:42 +0200 Subject: [PATCH 2/7] Add Disputes Api, tests. Adjust Readme and Makefile (#1147) --- Makefile | 7 +- README.md | 43 +-- .../model/disputes/AbstractOpenApiSchema.java | 148 ++++++++++ .../model/disputes/AcceptDisputeRequest.java | 160 +++++++++++ .../model/disputes/AcceptDisputeResponse.java | 130 +++++++++ .../model/disputes/DefendDisputeRequest.java | 191 +++++++++++++ .../model/disputes/DefendDisputeResponse.java | 130 +++++++++ .../adyen/model/disputes/DefenseDocument.java | 191 +++++++++++++ .../model/disputes/DefenseDocumentType.java | 191 +++++++++++++ .../adyen/model/disputes/DefenseReason.java | 202 ++++++++++++++ .../model/disputes/DefenseReasonsRequest.java | 160 +++++++++++ .../disputes/DefenseReasonsResponse.java | 172 ++++++++++++ .../DeleteDefenseDocumentRequest.java | 191 +++++++++++++ .../DeleteDefenseDocumentResponse.java | 130 +++++++++ .../model/disputes/DisputeServiceResult.java | 160 +++++++++++ .../DownloadDefenseDocumentRequest.java | 191 +++++++++++++ .../DownloadDefenseDocumentResponse.java | 192 +++++++++++++ .../java/com/adyen/model/disputes/JSON.java | 253 ++++++++++++++++++ .../adyen/model/disputes/ServiceError.java | 253 ++++++++++++++++++ .../SupplyDefenseDocumentRequest.java | 199 ++++++++++++++ .../SupplyDefenseDocumentResponse.java | 130 +++++++++ .../java/com/adyen/service/DisputesApi.java | 226 ++++++++++++++++ src/test/java/com/adyen/DisputesTest.java | 194 ++++++++++++++ ...post-acceptDispute-accept-dispute-200.json | 5 + ...post-defendDispute-defend-dispute-200.json | 5 + ...t-delete-dispute-defense-document-200.json | 5 + ...download-dispute-defense-document-200.json | 5 + ...eReasons-retrieve-defense-reasons-200.json | 71 +++++ ...eDocument-supply-defense-document-200.json | 5 + 29 files changed, 3917 insertions(+), 23 deletions(-) create mode 100644 src/main/java/com/adyen/model/disputes/AbstractOpenApiSchema.java create mode 100644 src/main/java/com/adyen/model/disputes/AcceptDisputeRequest.java create mode 100644 src/main/java/com/adyen/model/disputes/AcceptDisputeResponse.java create mode 100644 src/main/java/com/adyen/model/disputes/DefendDisputeRequest.java create mode 100644 src/main/java/com/adyen/model/disputes/DefendDisputeResponse.java create mode 100644 src/main/java/com/adyen/model/disputes/DefenseDocument.java create mode 100644 src/main/java/com/adyen/model/disputes/DefenseDocumentType.java create mode 100644 src/main/java/com/adyen/model/disputes/DefenseReason.java create mode 100644 src/main/java/com/adyen/model/disputes/DefenseReasonsRequest.java create mode 100644 src/main/java/com/adyen/model/disputes/DefenseReasonsResponse.java create mode 100644 src/main/java/com/adyen/model/disputes/DeleteDefenseDocumentRequest.java create mode 100644 src/main/java/com/adyen/model/disputes/DeleteDefenseDocumentResponse.java create mode 100644 src/main/java/com/adyen/model/disputes/DisputeServiceResult.java create mode 100644 src/main/java/com/adyen/model/disputes/DownloadDefenseDocumentRequest.java create mode 100644 src/main/java/com/adyen/model/disputes/DownloadDefenseDocumentResponse.java create mode 100644 src/main/java/com/adyen/model/disputes/JSON.java create mode 100644 src/main/java/com/adyen/model/disputes/ServiceError.java create mode 100644 src/main/java/com/adyen/model/disputes/SupplyDefenseDocumentRequest.java create mode 100644 src/main/java/com/adyen/model/disputes/SupplyDefenseDocumentResponse.java create mode 100644 src/main/java/com/adyen/service/DisputesApi.java create mode 100644 src/test/java/com/adyen/DisputesTest.java create mode 100644 src/test/resources/mocks/disputes/post-acceptDispute-accept-dispute-200.json create mode 100644 src/test/resources/mocks/disputes/post-defendDispute-defend-dispute-200.json create mode 100644 src/test/resources/mocks/disputes/post-deleteDisputeDefenseDocument-delete-dispute-defense-document-200.json create mode 100644 src/test/resources/mocks/disputes/post-downloadDisputeDefenseDocument-download-dispute-defense-document-200.json create mode 100644 src/test/resources/mocks/disputes/post-retrieveApplicableDefenseReasons-retrieve-defense-reasons-200.json create mode 100644 src/test/resources/mocks/disputes/post-supplyDefenseDocument-supply-defense-document-200.json diff --git a/Makefile b/Makefile index 1320b022c..164c5d8b1 100644 --- a/Makefile +++ b/Makefile @@ -5,7 +5,7 @@ openapi-generator-cli:=java -jar $(openapi-generator-jar) generator:=java library:=jersey3 -modelGen:=acswebhooks balancecontrol balanceplatform binlookup checkout dataprotection legalentitymanagement management payment payout posterminalmanagement recurring transfers storedvalue configurationwebhooks reportwebhooks transferwebhooks managementwebhooks +modelGen:=acswebhooks balancecontrol balanceplatform binlookup checkout dataprotection legalentitymanagement management payment payout posterminalmanagement recurring transfers storedvalue configurationwebhooks reportwebhooks transferwebhooks managementwebhooks disputes models:=src/main/java/com/adyen/model output:=target/out @@ -49,6 +49,9 @@ reportwebhooks: spec=BalancePlatformReportNotification-v1 transferwebhooks: spec=BalancePlatformTransferNotification-v3 # Management Webhooks managementwebhooks: spec=ManagementNotificationService-v1 +# Disputes +disputes: spec=DisputeService-v30 +disputes: smallServiceName=DisputesApi $(modelGen): target/spec $(openapi-generator-jar) rm -rf $(models)/$@ $(output) @@ -73,7 +76,7 @@ $(modelGen): target/spec $(openapi-generator-jar) # Full service + models automation bigServices:=balanceplatform checkout payout management legalentitymanagement transfers -singleFileServices:=balancecontrol binlookup dataprotection storedvalue posterminalmanagement recurring payment +singleFileServices:=balancecontrol binlookup dataprotection storedvalue posterminalmanagement recurring payment disputes services: $(bigServices) $(singleFileServices) diff --git a/README.md b/README.md index a41526c87..988eda7cd 100644 --- a/README.md +++ b/README.md @@ -10,27 +10,28 @@ This is the officially supported Java library for using Adyen's APIs. The Library supports all APIs under the following services: -| API | Description | Service Name | Supported version | -|------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------|-------------------| -| [BIN lookup API](https://docs.adyen.com/api-explorer/BinLookup/54/overview) | The BIN Lookup API provides endpoints for retrieving information based on a given BIN. | BinLookup | **v54** | -| [Capital API](https://docs.adyen.com/api-explorer/capital/3/overview) | Adyen Capital allows you to build an embedded financing offering for your users to serve their operational needs. | Capital | **v3** | -| [Checkout API](https://docs.adyen.com/api-explorer/Checkout/70/overview) | Our latest integration for accepting online payments. | Checkout | **v70** | -| [Configuration API](https://docs.adyen.com/api-explorer/balanceplatform/2/overview) | The Configuration API enables you to create a platform where you can onboard your users as account holders and create balance accounts, cards, and business accounts. | balanceplatform package subclasses | **v2** | -| [DataProtection API](https://docs.adyen.com/development-resources/data-protection-api) | Adyen Data Protection API provides a way for you to process [Subject Erasure Requests](https://gdpr-info.eu/art-17-gdpr/) as mandated in GDPR. Use our API to submit a request to delete shopper's data, including payment details and other related information (for example, delivery address or shopper email) | DataProtection | **v1** | -| [Legal Entity Management API](https://docs.adyen.com/api-explorer/legalentity/3/overview) | Manage legal entities that contain information required for verification. | legalentitymanagement package subclasses | **v3** | -| [Local/Cloud-based Terminal API](https://docs.adyen.com/point-of-sale/terminal-api-reference) | Our point-of-sale integration. | TerminalLocalAPI or TerminalCloudAPI | - | -| [Management API](https://docs.adyen.com/api-explorer/Management/1/overview) | Configure and manage your Adyen company and merchant accounts, stores, and payment terminals. | management package subclasses | **v1** | -| [Payments API](https://docs.adyen.com/api-explorer/Payment/68/overview) | Our classic integration for online payments. | Payment | **v68** | -| [Payouts API](https://docs.adyen.com/api-explorer/Payout/68/overview) | Endpoints for sending funds to your customers. | Payout | **v68** | -| [POS Terminal Management API](https://docs.adyen.com/api-explorer/postfmapi/1/overview) | Endpoints for managing your point-of-sale payment terminals. | TerminalManagement | **v1** | -| [Recurring API](https://docs.adyen.com/api-explorer/Recurring/68/overview) | Endpoints for managing saved payment details. | Recurring | **v68** | -| [Stored Value API](https://docs.adyen.com/payment-methods/gift-cards/stored-value-api) | Manage both online and point-of-sale gift cards and other stored-value cards. | StoredValue | **v46** | -| [Transfers API](https://docs.adyen.com/api-explorer/transfers/3/overview) | The Transfers API provides endpoints that can be used to get information about all your transactions, move funds within your balance platform or send funds from your balance platform to a transfer instrument. | Transfers | **v3** | -| [Webhooks](https://docs.adyen.com/api-explorer/Webhooks/1/overview) | Adyen uses webhooks to send notifications about payment status updates, newly available reports, and other events that can be subscribed to. For more information, refer to our [documentation](https://docs.adyen.com/development-resources/webhooks). | *Models only* | **v1** | -| [Classic Platforms Account API](https://docs.adyen.com/api-explorer/Account/6/overview) | This API is used for the classic integration. If you are just starting your implementation, refer to our new integration guide instead. | ClassicPlatformAccountApi | **v6** | -| [Classic Platforms Fund API](https://docs.adyen.com/api-explorer/Fund/6/overview) | This API is used for the classic integration. If you are just starting your implementation, refer to our new integration guide instead. | ClassicPlatformFundApi | **v6** | -| [Classic Platforms Hosted Onboarding Page API](https://docs.adyen.com/api-explorer/Hop/6/overview) | This API is used for the classic integration. If you are just starting your implementation, refer to our new integration guide instead. | ClassicPlatformHopApi | **v6** | -| [Classic Platforms Notification Configuration API](https://docs.adyen.com/api-explorer/NotificationConfiguration/6/overview) | This API is used for the classic integration. If you are just starting your implementation, refer to our new integration guide instead. | ClassicPlatformConfigurationApi | **v6** | +| API | Description | Service Name | Supported version | +|------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------|-------------------| +| [BIN lookup API](https://docs.adyen.com/api-explorer/BinLookup/54/overview) | The BIN Lookup API provides endpoints for retrieving information based on a given BIN. | BinLookup | **v54** | +| [Capital API](https://docs.adyen.com/api-explorer/capital/3/overview) | Adyen Capital allows you to build an embedded financing offering for your users to serve their operational needs. | Capital | **v3** | +| [Checkout API](https://docs.adyen.com/api-explorer/Checkout/70/overview) | Our latest integration for accepting online payments. | Checkout | **v70** | +| [Configuration API](https://docs.adyen.com/api-explorer/balanceplatform/2/overview) | The Configuration API enables you to create a platform where you can onboard your users as account holders and create balance accounts, cards, and business accounts. | balanceplatform package subclasses | **v2** | +| [DataProtection API](https://docs.adyen.com/development-resources/data-protection-api) | Adyen Data Protection API provides a way for you to process [Subject Erasure Requests](https://gdpr-info.eu/art-17-gdpr/) as mandated in GDPR. Use our API to submit a request to delete shopper's data, including payment details and other related information (for example, delivery address or shopper email) | DataProtection | **v1** | +| [Legal Entity Management API](https://docs.adyen.com/api-explorer/legalentity/3/overview) | Manage legal entities that contain information required for verification. | legalentitymanagement package subclasses | **v3** | +| [Local/Cloud-based Terminal API](https://docs.adyen.com/point-of-sale/terminal-api-reference) | Our point-of-sale integration. | TerminalLocalAPI or TerminalCloudAPI | - | +| [Management API](https://docs.adyen.com/api-explorer/Management/1/overview) | Configure and manage your Adyen company and merchant accounts, stores, and payment terminals. | management package subclasses | **v1** | +| [Payments API](https://docs.adyen.com/api-explorer/Payment/68/overview) | Our classic integration for online payments. | Payment | **v68** | +| [Payouts API](https://docs.adyen.com/api-explorer/Payout/68/overview) | Endpoints for sending funds to your customers. | Payout | **v68** | +| [POS Terminal Management API](https://docs.adyen.com/api-explorer/postfmapi/1/overview) | Endpoints for managing your point-of-sale payment terminals. | TerminalManagement | **v1** | +| [Recurring API](https://docs.adyen.com/api-explorer/Recurring/68/overview) | Endpoints for managing saved payment details. | Recurring | **v68** | +| [Stored Value API](https://docs.adyen.com/payment-methods/gift-cards/stored-value-api) | Manage both online and point-of-sale gift cards and other stored-value cards. | StoredValue | **v46** | +| [Transfers API](https://docs.adyen.com/api-explorer/transfers/3/overview) | The Transfers API provides endpoints that can be used to get information about all your transactions, move funds within your balance platform or send funds from your balance platform to a transfer instrument. | Transfers | **v3** | +| [Webhooks](https://docs.adyen.com/api-explorer/Webhooks/1/overview) | Adyen uses webhooks to send notifications about payment status updates, newly available reports, and other events that can be subscribed to. For more information, refer to our [documentation](https://docs.adyen.com/development-resources/webhooks). | *Models only* | **v1** | +| [Classic Platforms Account API](https://docs.adyen.com/api-explorer/Account/6/overview) | This API is used for the classic integration. If you are just starting your implementation, refer to our new integration guide instead. | ClassicPlatformAccountApi | **v6** | +| [Classic Platforms Fund API](https://docs.adyen.com/api-explorer/Fund/6/overview) | This API is used for the classic integration. If you are just starting your implementation, refer to our new integration guide instead. | ClassicPlatformFundApi | **v6** | +| [Classic Platforms Hosted Onboarding Page API](https://docs.adyen.com/api-explorer/Hop/6/overview) | This API is used for the classic integration. If you are just starting your implementation, refer to our new integration guide instead. | ClassicPlatformHopApi | **v6** | +| [Classic Platforms Notification Configuration API](https://docs.adyen.com/api-explorer/NotificationConfiguration/6/overview) | This API is used for the classic integration. If you are just starting your implementation, refer to our new integration guide instead. | ClassicPlatformConfigurationApi | **v6** | +| [Disputes API](https://docs.adyen.com/api-explorer/Disputes/30/overview) | You can use the [Disputes API](https://docs.adyen.com/risk-management/disputes-api) to automate the dispute handling process so that you can respond to disputes and chargebacks as soon as they are initiated. The Disputes API lets you retrieve defense reasons, supply and delete defense documents, and accept or defend disputes. | DisputesApi | **v30** | ## Supported Webhook versions The library supports all webhooks under the following model directories: diff --git a/src/main/java/com/adyen/model/disputes/AbstractOpenApiSchema.java b/src/main/java/com/adyen/model/disputes/AbstractOpenApiSchema.java new file mode 100644 index 000000000..c654050e9 --- /dev/null +++ b/src/main/java/com/adyen/model/disputes/AbstractOpenApiSchema.java @@ -0,0 +1,148 @@ +/* + * Disputes API + * You can use the [Disputes API](https://docs.adyen.com/risk-management/disputes-api) to automate the dispute handling process so that you can respond to disputes and chargebacks as soon as they are initiated. The Disputes API lets you retrieve defense reasons, supply and delete defense documents, and accept or defend disputes. ## Authentication Each request to the Disputes API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/development-resources/api-credentials#generate-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_API_key\" \\ ... ``` Note that 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 Disputes 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://ca-test.adyen.com/ca/services/DisputeService/v30/defendDispute ``` + * + * The version of the OpenAPI document: 30 + * + * + * 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.disputes; + +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/disputes/AcceptDisputeRequest.java b/src/main/java/com/adyen/model/disputes/AcceptDisputeRequest.java new file mode 100644 index 000000000..28c99c97f --- /dev/null +++ b/src/main/java/com/adyen/model/disputes/AcceptDisputeRequest.java @@ -0,0 +1,160 @@ +/* + * Disputes API + * You can use the [Disputes API](https://docs.adyen.com/risk-management/disputes-api) to automate the dispute handling process so that you can respond to disputes and chargebacks as soon as they are initiated. The Disputes API lets you retrieve defense reasons, supply and delete defense documents, and accept or defend disputes. ## Authentication Each request to the Disputes API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/development-resources/api-credentials#generate-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_API_key\" \\ ... ``` Note that 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 Disputes 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://ca-test.adyen.com/ca/services/DisputeService/v30/defendDispute ``` + * + * The version of the OpenAPI document: 30 + * + * + * 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.disputes; + +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; + + +/** + * AcceptDisputeRequest + */ +@JsonPropertyOrder({ + AcceptDisputeRequest.JSON_PROPERTY_DISPUTE_PSP_REFERENCE, + AcceptDisputeRequest.JSON_PROPERTY_MERCHANT_ACCOUNT_CODE +}) + +public class AcceptDisputeRequest { + public static final String JSON_PROPERTY_DISPUTE_PSP_REFERENCE = "disputePspReference"; + private String disputePspReference; + + public static final String JSON_PROPERTY_MERCHANT_ACCOUNT_CODE = "merchantAccountCode"; + private String merchantAccountCode; + + public AcceptDisputeRequest() { + } + + public AcceptDisputeRequest disputePspReference(String disputePspReference) { + this.disputePspReference = disputePspReference; + return this; + } + + /** + * The PSP reference assigned to the dispute. + * @return disputePspReference + **/ + @ApiModelProperty(required = true, value = "The PSP reference assigned to the 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 AcceptDisputeRequest merchantAccountCode(String merchantAccountCode) { + this.merchantAccountCode = merchantAccountCode; + return this; + } + + /** + * The merchant account identifier, for which you want to process the dispute transaction. + * @return merchantAccountCode + **/ + @ApiModelProperty(required = true, value = "The merchant account identifier, for which you want to process the dispute transaction.") + @JsonProperty(JSON_PROPERTY_MERCHANT_ACCOUNT_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getMerchantAccountCode() { + return merchantAccountCode; + } + + + @JsonProperty(JSON_PROPERTY_MERCHANT_ACCOUNT_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMerchantAccountCode(String merchantAccountCode) { + this.merchantAccountCode = merchantAccountCode; + } + + + /** + * Return true if this AcceptDisputeRequest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AcceptDisputeRequest acceptDisputeRequest = (AcceptDisputeRequest) o; + return Objects.equals(this.disputePspReference, acceptDisputeRequest.disputePspReference) && + Objects.equals(this.merchantAccountCode, acceptDisputeRequest.merchantAccountCode); + } + + @Override + public int hashCode() { + return Objects.hash(disputePspReference, merchantAccountCode); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AcceptDisputeRequest {\n"); + sb.append(" disputePspReference: ").append(toIndentedString(disputePspReference)).append("\n"); + sb.append(" merchantAccountCode: ").append(toIndentedString(merchantAccountCode)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line 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 AcceptDisputeRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of AcceptDisputeRequest + * @throws JsonProcessingException if the JSON string is invalid with respect to AcceptDisputeRequest + */ + public static AcceptDisputeRequest fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, AcceptDisputeRequest.class); + } +/** + * Convert an instance of AcceptDisputeRequest 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/disputes/AcceptDisputeResponse.java b/src/main/java/com/adyen/model/disputes/AcceptDisputeResponse.java new file mode 100644 index 000000000..ba3c8bfa4 --- /dev/null +++ b/src/main/java/com/adyen/model/disputes/AcceptDisputeResponse.java @@ -0,0 +1,130 @@ +/* + * Disputes API + * You can use the [Disputes API](https://docs.adyen.com/risk-management/disputes-api) to automate the dispute handling process so that you can respond to disputes and chargebacks as soon as they are initiated. The Disputes API lets you retrieve defense reasons, supply and delete defense documents, and accept or defend disputes. ## Authentication Each request to the Disputes API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/development-resources/api-credentials#generate-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_API_key\" \\ ... ``` Note that 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 Disputes 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://ca-test.adyen.com/ca/services/DisputeService/v30/defendDispute ``` + * + * The version of the OpenAPI document: 30 + * + * + * 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.disputes; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.adyen.model.disputes.DisputeServiceResult; +import com.fasterxml.jackson.annotation.JsonInclude; +import 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; + + +/** + * AcceptDisputeResponse + */ +@JsonPropertyOrder({ + AcceptDisputeResponse.JSON_PROPERTY_DISPUTE_SERVICE_RESULT +}) + +public class AcceptDisputeResponse { + public static final String JSON_PROPERTY_DISPUTE_SERVICE_RESULT = "disputeServiceResult"; + private DisputeServiceResult disputeServiceResult; + + public AcceptDisputeResponse() { + } + + public AcceptDisputeResponse disputeServiceResult(DisputeServiceResult disputeServiceResult) { + this.disputeServiceResult = disputeServiceResult; + return this; + } + + /** + * Get disputeServiceResult + * @return disputeServiceResult + **/ + @ApiModelProperty(required = true, value = "") + @JsonProperty(JSON_PROPERTY_DISPUTE_SERVICE_RESULT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public DisputeServiceResult getDisputeServiceResult() { + return disputeServiceResult; + } + + + @JsonProperty(JSON_PROPERTY_DISPUTE_SERVICE_RESULT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDisputeServiceResult(DisputeServiceResult disputeServiceResult) { + this.disputeServiceResult = disputeServiceResult; + } + + + /** + * Return true if this AcceptDisputeResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AcceptDisputeResponse acceptDisputeResponse = (AcceptDisputeResponse) o; + return Objects.equals(this.disputeServiceResult, acceptDisputeResponse.disputeServiceResult); + } + + @Override + public int hashCode() { + return Objects.hash(disputeServiceResult); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AcceptDisputeResponse {\n"); + sb.append(" disputeServiceResult: ").append(toIndentedString(disputeServiceResult)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line 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 AcceptDisputeResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of AcceptDisputeResponse + * @throws JsonProcessingException if the JSON string is invalid with respect to AcceptDisputeResponse + */ + public static AcceptDisputeResponse fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, AcceptDisputeResponse.class); + } +/** + * Convert an instance of AcceptDisputeResponse 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/disputes/DefendDisputeRequest.java b/src/main/java/com/adyen/model/disputes/DefendDisputeRequest.java new file mode 100644 index 000000000..07b62bdc0 --- /dev/null +++ b/src/main/java/com/adyen/model/disputes/DefendDisputeRequest.java @@ -0,0 +1,191 @@ +/* + * Disputes API + * You can use the [Disputes API](https://docs.adyen.com/risk-management/disputes-api) to automate the dispute handling process so that you can respond to disputes and chargebacks as soon as they are initiated. The Disputes API lets you retrieve defense reasons, supply and delete defense documents, and accept or defend disputes. ## Authentication Each request to the Disputes API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/development-resources/api-credentials#generate-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_API_key\" \\ ... ``` Note that 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 Disputes 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://ca-test.adyen.com/ca/services/DisputeService/v30/defendDispute ``` + * + * The version of the OpenAPI document: 30 + * + * + * 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.disputes; + +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; + + +/** + * DefendDisputeRequest + */ +@JsonPropertyOrder({ + DefendDisputeRequest.JSON_PROPERTY_DEFENSE_REASON_CODE, + DefendDisputeRequest.JSON_PROPERTY_DISPUTE_PSP_REFERENCE, + DefendDisputeRequest.JSON_PROPERTY_MERCHANT_ACCOUNT_CODE +}) + +public class DefendDisputeRequest { + public static final String JSON_PROPERTY_DEFENSE_REASON_CODE = "defenseReasonCode"; + private String defenseReasonCode; + + public static final String JSON_PROPERTY_DISPUTE_PSP_REFERENCE = "disputePspReference"; + private String disputePspReference; + + public static final String JSON_PROPERTY_MERCHANT_ACCOUNT_CODE = "merchantAccountCode"; + private String merchantAccountCode; + + public DefendDisputeRequest() { + } + + public DefendDisputeRequest defenseReasonCode(String defenseReasonCode) { + this.defenseReasonCode = defenseReasonCode; + return this; + } + + /** + * The defense reason code that was selected to defend this dispute. + * @return defenseReasonCode + **/ + @ApiModelProperty(required = true, value = "The defense reason code that was selected to defend this dispute.") + @JsonProperty(JSON_PROPERTY_DEFENSE_REASON_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getDefenseReasonCode() { + return defenseReasonCode; + } + + + @JsonProperty(JSON_PROPERTY_DEFENSE_REASON_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDefenseReasonCode(String defenseReasonCode) { + this.defenseReasonCode = defenseReasonCode; + } + + + public DefendDisputeRequest disputePspReference(String disputePspReference) { + this.disputePspReference = disputePspReference; + return this; + } + + /** + * The PSP reference assigned to the dispute. + * @return disputePspReference + **/ + @ApiModelProperty(required = true, value = "The PSP reference assigned to the 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 DefendDisputeRequest merchantAccountCode(String merchantAccountCode) { + this.merchantAccountCode = merchantAccountCode; + return this; + } + + /** + * The merchant account identifier, for which you want to process the dispute transaction. + * @return merchantAccountCode + **/ + @ApiModelProperty(required = true, value = "The merchant account identifier, for which you want to process the dispute transaction.") + @JsonProperty(JSON_PROPERTY_MERCHANT_ACCOUNT_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getMerchantAccountCode() { + return merchantAccountCode; + } + + + @JsonProperty(JSON_PROPERTY_MERCHANT_ACCOUNT_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMerchantAccountCode(String merchantAccountCode) { + this.merchantAccountCode = merchantAccountCode; + } + + + /** + * Return true if this DefendDisputeRequest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DefendDisputeRequest defendDisputeRequest = (DefendDisputeRequest) o; + return Objects.equals(this.defenseReasonCode, defendDisputeRequest.defenseReasonCode) && + Objects.equals(this.disputePspReference, defendDisputeRequest.disputePspReference) && + Objects.equals(this.merchantAccountCode, defendDisputeRequest.merchantAccountCode); + } + + @Override + public int hashCode() { + return Objects.hash(defenseReasonCode, disputePspReference, merchantAccountCode); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DefendDisputeRequest {\n"); + sb.append(" defenseReasonCode: ").append(toIndentedString(defenseReasonCode)).append("\n"); + sb.append(" disputePspReference: ").append(toIndentedString(disputePspReference)).append("\n"); + sb.append(" merchantAccountCode: ").append(toIndentedString(merchantAccountCode)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line 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 DefendDisputeRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of DefendDisputeRequest + * @throws JsonProcessingException if the JSON string is invalid with respect to DefendDisputeRequest + */ + public static DefendDisputeRequest fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, DefendDisputeRequest.class); + } +/** + * Convert an instance of DefendDisputeRequest 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/disputes/DefendDisputeResponse.java b/src/main/java/com/adyen/model/disputes/DefendDisputeResponse.java new file mode 100644 index 000000000..583624c3d --- /dev/null +++ b/src/main/java/com/adyen/model/disputes/DefendDisputeResponse.java @@ -0,0 +1,130 @@ +/* + * Disputes API + * You can use the [Disputes API](https://docs.adyen.com/risk-management/disputes-api) to automate the dispute handling process so that you can respond to disputes and chargebacks as soon as they are initiated. The Disputes API lets you retrieve defense reasons, supply and delete defense documents, and accept or defend disputes. ## Authentication Each request to the Disputes API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/development-resources/api-credentials#generate-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_API_key\" \\ ... ``` Note that 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 Disputes 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://ca-test.adyen.com/ca/services/DisputeService/v30/defendDispute ``` + * + * The version of the OpenAPI document: 30 + * + * + * 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.disputes; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.adyen.model.disputes.DisputeServiceResult; +import com.fasterxml.jackson.annotation.JsonInclude; +import 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; + + +/** + * DefendDisputeResponse + */ +@JsonPropertyOrder({ + DefendDisputeResponse.JSON_PROPERTY_DISPUTE_SERVICE_RESULT +}) + +public class DefendDisputeResponse { + public static final String JSON_PROPERTY_DISPUTE_SERVICE_RESULT = "disputeServiceResult"; + private DisputeServiceResult disputeServiceResult; + + public DefendDisputeResponse() { + } + + public DefendDisputeResponse disputeServiceResult(DisputeServiceResult disputeServiceResult) { + this.disputeServiceResult = disputeServiceResult; + return this; + } + + /** + * Get disputeServiceResult + * @return disputeServiceResult + **/ + @ApiModelProperty(required = true, value = "") + @JsonProperty(JSON_PROPERTY_DISPUTE_SERVICE_RESULT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public DisputeServiceResult getDisputeServiceResult() { + return disputeServiceResult; + } + + + @JsonProperty(JSON_PROPERTY_DISPUTE_SERVICE_RESULT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDisputeServiceResult(DisputeServiceResult disputeServiceResult) { + this.disputeServiceResult = disputeServiceResult; + } + + + /** + * Return true if this DefendDisputeResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DefendDisputeResponse defendDisputeResponse = (DefendDisputeResponse) o; + return Objects.equals(this.disputeServiceResult, defendDisputeResponse.disputeServiceResult); + } + + @Override + public int hashCode() { + return Objects.hash(disputeServiceResult); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DefendDisputeResponse {\n"); + sb.append(" disputeServiceResult: ").append(toIndentedString(disputeServiceResult)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line 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 DefendDisputeResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of DefendDisputeResponse + * @throws JsonProcessingException if the JSON string is invalid with respect to DefendDisputeResponse + */ + public static DefendDisputeResponse fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, DefendDisputeResponse.class); + } +/** + * Convert an instance of DefendDisputeResponse 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/disputes/DefenseDocument.java b/src/main/java/com/adyen/model/disputes/DefenseDocument.java new file mode 100644 index 000000000..d05ae5b4f --- /dev/null +++ b/src/main/java/com/adyen/model/disputes/DefenseDocument.java @@ -0,0 +1,191 @@ +/* + * Disputes API + * You can use the [Disputes API](https://docs.adyen.com/risk-management/disputes-api) to automate the dispute handling process so that you can respond to disputes and chargebacks as soon as they are initiated. The Disputes API lets you retrieve defense reasons, supply and delete defense documents, and accept or defend disputes. ## Authentication Each request to the Disputes API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/development-resources/api-credentials#generate-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_API_key\" \\ ... ``` Note that 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 Disputes 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://ca-test.adyen.com/ca/services/DisputeService/v30/defendDispute ``` + * + * The version of the OpenAPI document: 30 + * + * + * 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.disputes; + +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; + + +/** + * DefenseDocument + */ +@JsonPropertyOrder({ + DefenseDocument.JSON_PROPERTY_CONTENT, + DefenseDocument.JSON_PROPERTY_CONTENT_TYPE, + DefenseDocument.JSON_PROPERTY_DEFENSE_DOCUMENT_TYPE_CODE +}) + +public class DefenseDocument { + 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_DEFENSE_DOCUMENT_TYPE_CODE = "defenseDocumentTypeCode"; + private String defenseDocumentTypeCode; + + public DefenseDocument() { + } + + public DefenseDocument content(byte[] content) { + this.content = content; + return this; + } + + /** + * The content of the defense document. + * @return content + **/ + @ApiModelProperty(required = true, value = "The content of the defense document.") + @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 DefenseDocument contentType(String contentType) { + this.contentType = contentType; + return this; + } + + /** + * The content type of the defense document. + * @return contentType + **/ + @ApiModelProperty(required = true, value = "The content type of the defense document.") + @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 DefenseDocument defenseDocumentTypeCode(String defenseDocumentTypeCode) { + this.defenseDocumentTypeCode = defenseDocumentTypeCode; + return this; + } + + /** + * The document type code of the defense document. + * @return defenseDocumentTypeCode + **/ + @ApiModelProperty(required = true, value = "The document type code of the defense document.") + @JsonProperty(JSON_PROPERTY_DEFENSE_DOCUMENT_TYPE_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getDefenseDocumentTypeCode() { + return defenseDocumentTypeCode; + } + + + @JsonProperty(JSON_PROPERTY_DEFENSE_DOCUMENT_TYPE_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDefenseDocumentTypeCode(String defenseDocumentTypeCode) { + this.defenseDocumentTypeCode = defenseDocumentTypeCode; + } + + + /** + * Return true if this DefenseDocument object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DefenseDocument defenseDocument = (DefenseDocument) o; + return Arrays.equals(this.content, defenseDocument.content) && + Objects.equals(this.contentType, defenseDocument.contentType) && + Objects.equals(this.defenseDocumentTypeCode, defenseDocument.defenseDocumentTypeCode); + } + + @Override + public int hashCode() { + return Objects.hash(Arrays.hashCode(content), contentType, defenseDocumentTypeCode); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DefenseDocument {\n"); + sb.append(" content: ").append(toIndentedString(content)).append("\n"); + sb.append(" contentType: ").append(toIndentedString(contentType)).append("\n"); + sb.append(" defenseDocumentTypeCode: ").append(toIndentedString(defenseDocumentTypeCode)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line 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 DefenseDocument given an JSON string + * + * @param jsonString JSON string + * @return An instance of DefenseDocument + * @throws JsonProcessingException if the JSON string is invalid with respect to DefenseDocument + */ + public static DefenseDocument fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, DefenseDocument.class); + } +/** + * Convert an instance of DefenseDocument 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/disputes/DefenseDocumentType.java b/src/main/java/com/adyen/model/disputes/DefenseDocumentType.java new file mode 100644 index 000000000..5f9cf9759 --- /dev/null +++ b/src/main/java/com/adyen/model/disputes/DefenseDocumentType.java @@ -0,0 +1,191 @@ +/* + * Disputes API + * You can use the [Disputes API](https://docs.adyen.com/risk-management/disputes-api) to automate the dispute handling process so that you can respond to disputes and chargebacks as soon as they are initiated. The Disputes API lets you retrieve defense reasons, supply and delete defense documents, and accept or defend disputes. ## Authentication Each request to the Disputes API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/development-resources/api-credentials#generate-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_API_key\" \\ ... ``` Note that 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 Disputes 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://ca-test.adyen.com/ca/services/DisputeService/v30/defendDispute ``` + * + * The version of the OpenAPI document: 30 + * + * + * 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.disputes; + +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; + + +/** + * DefenseDocumentType + */ +@JsonPropertyOrder({ + DefenseDocumentType.JSON_PROPERTY_AVAILABLE, + DefenseDocumentType.JSON_PROPERTY_DEFENSE_DOCUMENT_TYPE_CODE, + DefenseDocumentType.JSON_PROPERTY_REQUIREMENT_LEVEL +}) + +public class DefenseDocumentType { + public static final String JSON_PROPERTY_AVAILABLE = "available"; + private Boolean available; + + public static final String JSON_PROPERTY_DEFENSE_DOCUMENT_TYPE_CODE = "defenseDocumentTypeCode"; + private String defenseDocumentTypeCode; + + public static final String JSON_PROPERTY_REQUIREMENT_LEVEL = "requirementLevel"; + private String requirementLevel; + + public DefenseDocumentType() { + } + + public DefenseDocumentType available(Boolean available) { + this.available = available; + return this; + } + + /** + * When **true**, you've successfully uploaded this type of defense document. When **false**, you haven't uploaded this defense document type. + * @return available + **/ + @ApiModelProperty(required = true, value = "When **true**, you've successfully uploaded this type of defense document. When **false**, you haven't uploaded this defense document type.") + @JsonProperty(JSON_PROPERTY_AVAILABLE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getAvailable() { + return available; + } + + + @JsonProperty(JSON_PROPERTY_AVAILABLE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAvailable(Boolean available) { + this.available = available; + } + + + public DefenseDocumentType defenseDocumentTypeCode(String defenseDocumentTypeCode) { + this.defenseDocumentTypeCode = defenseDocumentTypeCode; + return this; + } + + /** + * The document type code of the defense document. + * @return defenseDocumentTypeCode + **/ + @ApiModelProperty(required = true, value = "The document type code of the defense document.") + @JsonProperty(JSON_PROPERTY_DEFENSE_DOCUMENT_TYPE_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getDefenseDocumentTypeCode() { + return defenseDocumentTypeCode; + } + + + @JsonProperty(JSON_PROPERTY_DEFENSE_DOCUMENT_TYPE_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDefenseDocumentTypeCode(String defenseDocumentTypeCode) { + this.defenseDocumentTypeCode = defenseDocumentTypeCode; + } + + + public DefenseDocumentType requirementLevel(String requirementLevel) { + this.requirementLevel = requirementLevel; + return this; + } + + /** + * Indicates to what extent the defense document is required in the defense process. Possible values: * **Required**: You must supply the document. * **OneOrMore**: You must supply at least one of the documents with this label. * **Optional**: You can choose to supply the document. * **AlternativeRequired**: You must supply a generic defense document. To enable this functionality, contact our Support Team. When enabled, you can supply a generic defense document for all schemes. + * @return requirementLevel + **/ + @ApiModelProperty(required = true, value = "Indicates to what extent the defense document is required in the defense process. Possible values: * **Required**: You must supply the document. * **OneOrMore**: You must supply at least one of the documents with this label. * **Optional**: You can choose to supply the document. * **AlternativeRequired**: You must supply a generic defense document. To enable this functionality, contact our Support Team. When enabled, you can supply a generic defense document for all schemes.") + @JsonProperty(JSON_PROPERTY_REQUIREMENT_LEVEL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getRequirementLevel() { + return requirementLevel; + } + + + @JsonProperty(JSON_PROPERTY_REQUIREMENT_LEVEL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setRequirementLevel(String requirementLevel) { + this.requirementLevel = requirementLevel; + } + + + /** + * Return true if this DefenseDocumentType object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DefenseDocumentType defenseDocumentType = (DefenseDocumentType) o; + return Objects.equals(this.available, defenseDocumentType.available) && + Objects.equals(this.defenseDocumentTypeCode, defenseDocumentType.defenseDocumentTypeCode) && + Objects.equals(this.requirementLevel, defenseDocumentType.requirementLevel); + } + + @Override + public int hashCode() { + return Objects.hash(available, defenseDocumentTypeCode, requirementLevel); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DefenseDocumentType {\n"); + sb.append(" available: ").append(toIndentedString(available)).append("\n"); + sb.append(" defenseDocumentTypeCode: ").append(toIndentedString(defenseDocumentTypeCode)).append("\n"); + sb.append(" requirementLevel: ").append(toIndentedString(requirementLevel)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line 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 DefenseDocumentType given an JSON string + * + * @param jsonString JSON string + * @return An instance of DefenseDocumentType + * @throws JsonProcessingException if the JSON string is invalid with respect to DefenseDocumentType + */ + public static DefenseDocumentType fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, DefenseDocumentType.class); + } +/** + * Convert an instance of DefenseDocumentType 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/disputes/DefenseReason.java b/src/main/java/com/adyen/model/disputes/DefenseReason.java new file mode 100644 index 000000000..171967e69 --- /dev/null +++ b/src/main/java/com/adyen/model/disputes/DefenseReason.java @@ -0,0 +1,202 @@ +/* + * Disputes API + * You can use the [Disputes API](https://docs.adyen.com/risk-management/disputes-api) to automate the dispute handling process so that you can respond to disputes and chargebacks as soon as they are initiated. The Disputes API lets you retrieve defense reasons, supply and delete defense documents, and accept or defend disputes. ## Authentication Each request to the Disputes API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/development-resources/api-credentials#generate-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_API_key\" \\ ... ``` Note that 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 Disputes 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://ca-test.adyen.com/ca/services/DisputeService/v30/defendDispute ``` + * + * The version of the OpenAPI document: 30 + * + * + * 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.disputes; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.adyen.model.disputes.DefenseDocumentType; +import com.fasterxml.jackson.annotation.JsonInclude; +import 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; + + +/** + * DefenseReason + */ +@JsonPropertyOrder({ + DefenseReason.JSON_PROPERTY_DEFENSE_DOCUMENT_TYPES, + DefenseReason.JSON_PROPERTY_DEFENSE_REASON_CODE, + DefenseReason.JSON_PROPERTY_SATISFIED +}) + +public class DefenseReason { + public static final String JSON_PROPERTY_DEFENSE_DOCUMENT_TYPES = "defenseDocumentTypes"; + private List defenseDocumentTypes = null; + + public static final String JSON_PROPERTY_DEFENSE_REASON_CODE = "defenseReasonCode"; + private String defenseReasonCode; + + public static final String JSON_PROPERTY_SATISFIED = "satisfied"; + private Boolean satisfied; + + public DefenseReason() { + } + + public DefenseReason defenseDocumentTypes(List defenseDocumentTypes) { + this.defenseDocumentTypes = defenseDocumentTypes; + return this; + } + + public DefenseReason addDefenseDocumentTypesItem(DefenseDocumentType defenseDocumentTypesItem) { + if (this.defenseDocumentTypes == null) { + this.defenseDocumentTypes = new ArrayList<>(); + } + this.defenseDocumentTypes.add(defenseDocumentTypesItem); + return this; + } + + /** + * Array of defense document types for a specific defense reason. Indicates the document types that you can submit to the schemes to defend this dispute, and whether they are required. + * @return defenseDocumentTypes + **/ + @ApiModelProperty(value = "Array of defense document types for a specific defense reason. Indicates the document types that you can submit to the schemes to defend this dispute, and whether they are required.") + @JsonProperty(JSON_PROPERTY_DEFENSE_DOCUMENT_TYPES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getDefenseDocumentTypes() { + return defenseDocumentTypes; + } + + + @JsonProperty(JSON_PROPERTY_DEFENSE_DOCUMENT_TYPES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDefenseDocumentTypes(List defenseDocumentTypes) { + this.defenseDocumentTypes = defenseDocumentTypes; + } + + + public DefenseReason defenseReasonCode(String defenseReasonCode) { + this.defenseReasonCode = defenseReasonCode; + return this; + } + + /** + * The defense reason code that was selected to defend this dispute. + * @return defenseReasonCode + **/ + @ApiModelProperty(required = true, value = "The defense reason code that was selected to defend this dispute.") + @JsonProperty(JSON_PROPERTY_DEFENSE_REASON_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getDefenseReasonCode() { + return defenseReasonCode; + } + + + @JsonProperty(JSON_PROPERTY_DEFENSE_REASON_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDefenseReasonCode(String defenseReasonCode) { + this.defenseReasonCode = defenseReasonCode; + } + + + public DefenseReason satisfied(Boolean satisfied) { + this.satisfied = satisfied; + return this; + } + + /** + * Indicates if sufficient defense material has been supplied. + * @return satisfied + **/ + @ApiModelProperty(required = true, value = "Indicates if sufficient defense material has been supplied.") + @JsonProperty(JSON_PROPERTY_SATISFIED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getSatisfied() { + return satisfied; + } + + + @JsonProperty(JSON_PROPERTY_SATISFIED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSatisfied(Boolean satisfied) { + this.satisfied = satisfied; + } + + + /** + * Return true if this DefenseReason object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DefenseReason defenseReason = (DefenseReason) o; + return Objects.equals(this.defenseDocumentTypes, defenseReason.defenseDocumentTypes) && + Objects.equals(this.defenseReasonCode, defenseReason.defenseReasonCode) && + Objects.equals(this.satisfied, defenseReason.satisfied); + } + + @Override + public int hashCode() { + return Objects.hash(defenseDocumentTypes, defenseReasonCode, satisfied); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DefenseReason {\n"); + sb.append(" defenseDocumentTypes: ").append(toIndentedString(defenseDocumentTypes)).append("\n"); + sb.append(" defenseReasonCode: ").append(toIndentedString(defenseReasonCode)).append("\n"); + sb.append(" satisfied: ").append(toIndentedString(satisfied)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line 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 DefenseReason given an JSON string + * + * @param jsonString JSON string + * @return An instance of DefenseReason + * @throws JsonProcessingException if the JSON string is invalid with respect to DefenseReason + */ + public static DefenseReason fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, DefenseReason.class); + } +/** + * Convert an instance of DefenseReason 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/disputes/DefenseReasonsRequest.java b/src/main/java/com/adyen/model/disputes/DefenseReasonsRequest.java new file mode 100644 index 000000000..475cd28be --- /dev/null +++ b/src/main/java/com/adyen/model/disputes/DefenseReasonsRequest.java @@ -0,0 +1,160 @@ +/* + * Disputes API + * You can use the [Disputes API](https://docs.adyen.com/risk-management/disputes-api) to automate the dispute handling process so that you can respond to disputes and chargebacks as soon as they are initiated. The Disputes API lets you retrieve defense reasons, supply and delete defense documents, and accept or defend disputes. ## Authentication Each request to the Disputes API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/development-resources/api-credentials#generate-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_API_key\" \\ ... ``` Note that 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 Disputes 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://ca-test.adyen.com/ca/services/DisputeService/v30/defendDispute ``` + * + * The version of the OpenAPI document: 30 + * + * + * 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.disputes; + +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; + + +/** + * DefenseReasonsRequest + */ +@JsonPropertyOrder({ + DefenseReasonsRequest.JSON_PROPERTY_DISPUTE_PSP_REFERENCE, + DefenseReasonsRequest.JSON_PROPERTY_MERCHANT_ACCOUNT_CODE +}) + +public class DefenseReasonsRequest { + public static final String JSON_PROPERTY_DISPUTE_PSP_REFERENCE = "disputePspReference"; + private String disputePspReference; + + public static final String JSON_PROPERTY_MERCHANT_ACCOUNT_CODE = "merchantAccountCode"; + private String merchantAccountCode; + + public DefenseReasonsRequest() { + } + + public DefenseReasonsRequest disputePspReference(String disputePspReference) { + this.disputePspReference = disputePspReference; + return this; + } + + /** + * The PSP reference assigned to the dispute. + * @return disputePspReference + **/ + @ApiModelProperty(required = true, value = "The PSP reference assigned to the 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 DefenseReasonsRequest merchantAccountCode(String merchantAccountCode) { + this.merchantAccountCode = merchantAccountCode; + return this; + } + + /** + * The merchant account identifier, for which you want to process the dispute transaction. + * @return merchantAccountCode + **/ + @ApiModelProperty(required = true, value = "The merchant account identifier, for which you want to process the dispute transaction.") + @JsonProperty(JSON_PROPERTY_MERCHANT_ACCOUNT_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getMerchantAccountCode() { + return merchantAccountCode; + } + + + @JsonProperty(JSON_PROPERTY_MERCHANT_ACCOUNT_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMerchantAccountCode(String merchantAccountCode) { + this.merchantAccountCode = merchantAccountCode; + } + + + /** + * Return true if this DefenseReasonsRequest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DefenseReasonsRequest defenseReasonsRequest = (DefenseReasonsRequest) o; + return Objects.equals(this.disputePspReference, defenseReasonsRequest.disputePspReference) && + Objects.equals(this.merchantAccountCode, defenseReasonsRequest.merchantAccountCode); + } + + @Override + public int hashCode() { + return Objects.hash(disputePspReference, merchantAccountCode); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DefenseReasonsRequest {\n"); + sb.append(" disputePspReference: ").append(toIndentedString(disputePspReference)).append("\n"); + sb.append(" merchantAccountCode: ").append(toIndentedString(merchantAccountCode)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line 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 DefenseReasonsRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of DefenseReasonsRequest + * @throws JsonProcessingException if the JSON string is invalid with respect to DefenseReasonsRequest + */ + public static DefenseReasonsRequest fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, DefenseReasonsRequest.class); + } +/** + * Convert an instance of DefenseReasonsRequest 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/disputes/DefenseReasonsResponse.java b/src/main/java/com/adyen/model/disputes/DefenseReasonsResponse.java new file mode 100644 index 000000000..f0c84d6fd --- /dev/null +++ b/src/main/java/com/adyen/model/disputes/DefenseReasonsResponse.java @@ -0,0 +1,172 @@ +/* + * Disputes API + * You can use the [Disputes API](https://docs.adyen.com/risk-management/disputes-api) to automate the dispute handling process so that you can respond to disputes and chargebacks as soon as they are initiated. The Disputes API lets you retrieve defense reasons, supply and delete defense documents, and accept or defend disputes. ## Authentication Each request to the Disputes API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/development-resources/api-credentials#generate-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_API_key\" \\ ... ``` Note that 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 Disputes 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://ca-test.adyen.com/ca/services/DisputeService/v30/defendDispute ``` + * + * The version of the OpenAPI document: 30 + * + * + * 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.disputes; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.adyen.model.disputes.DefenseReason; +import com.adyen.model.disputes.DisputeServiceResult; +import com.fasterxml.jackson.annotation.JsonInclude; +import 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; + + +/** + * DefenseReasonsResponse + */ +@JsonPropertyOrder({ + DefenseReasonsResponse.JSON_PROPERTY_DEFENSE_REASONS, + DefenseReasonsResponse.JSON_PROPERTY_DISPUTE_SERVICE_RESULT +}) + +public class DefenseReasonsResponse { + public static final String JSON_PROPERTY_DEFENSE_REASONS = "defenseReasons"; + private List defenseReasons = null; + + public static final String JSON_PROPERTY_DISPUTE_SERVICE_RESULT = "disputeServiceResult"; + private DisputeServiceResult disputeServiceResult; + + public DefenseReasonsResponse() { + } + + public DefenseReasonsResponse defenseReasons(List defenseReasons) { + this.defenseReasons = defenseReasons; + return this; + } + + public DefenseReasonsResponse addDefenseReasonsItem(DefenseReason defenseReasonsItem) { + if (this.defenseReasons == null) { + this.defenseReasons = new ArrayList<>(); + } + this.defenseReasons.add(defenseReasonsItem); + return this; + } + + /** + * The defense reasons that can be used to defend the dispute. + * @return defenseReasons + **/ + @ApiModelProperty(value = "The defense reasons that can be used to defend the dispute.") + @JsonProperty(JSON_PROPERTY_DEFENSE_REASONS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getDefenseReasons() { + return defenseReasons; + } + + + @JsonProperty(JSON_PROPERTY_DEFENSE_REASONS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDefenseReasons(List defenseReasons) { + this.defenseReasons = defenseReasons; + } + + + public DefenseReasonsResponse disputeServiceResult(DisputeServiceResult disputeServiceResult) { + this.disputeServiceResult = disputeServiceResult; + return this; + } + + /** + * Get disputeServiceResult + * @return disputeServiceResult + **/ + @ApiModelProperty(required = true, value = "") + @JsonProperty(JSON_PROPERTY_DISPUTE_SERVICE_RESULT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public DisputeServiceResult getDisputeServiceResult() { + return disputeServiceResult; + } + + + @JsonProperty(JSON_PROPERTY_DISPUTE_SERVICE_RESULT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDisputeServiceResult(DisputeServiceResult disputeServiceResult) { + this.disputeServiceResult = disputeServiceResult; + } + + + /** + * Return true if this DefenseReasonsResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DefenseReasonsResponse defenseReasonsResponse = (DefenseReasonsResponse) o; + return Objects.equals(this.defenseReasons, defenseReasonsResponse.defenseReasons) && + Objects.equals(this.disputeServiceResult, defenseReasonsResponse.disputeServiceResult); + } + + @Override + public int hashCode() { + return Objects.hash(defenseReasons, disputeServiceResult); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DefenseReasonsResponse {\n"); + sb.append(" defenseReasons: ").append(toIndentedString(defenseReasons)).append("\n"); + sb.append(" disputeServiceResult: ").append(toIndentedString(disputeServiceResult)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line 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 DefenseReasonsResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of DefenseReasonsResponse + * @throws JsonProcessingException if the JSON string is invalid with respect to DefenseReasonsResponse + */ + public static DefenseReasonsResponse fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, DefenseReasonsResponse.class); + } +/** + * Convert an instance of DefenseReasonsResponse 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/disputes/DeleteDefenseDocumentRequest.java b/src/main/java/com/adyen/model/disputes/DeleteDefenseDocumentRequest.java new file mode 100644 index 000000000..ee94b0192 --- /dev/null +++ b/src/main/java/com/adyen/model/disputes/DeleteDefenseDocumentRequest.java @@ -0,0 +1,191 @@ +/* + * Disputes API + * You can use the [Disputes API](https://docs.adyen.com/risk-management/disputes-api) to automate the dispute handling process so that you can respond to disputes and chargebacks as soon as they are initiated. The Disputes API lets you retrieve defense reasons, supply and delete defense documents, and accept or defend disputes. ## Authentication Each request to the Disputes API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/development-resources/api-credentials#generate-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_API_key\" \\ ... ``` Note that 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 Disputes 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://ca-test.adyen.com/ca/services/DisputeService/v30/defendDispute ``` + * + * The version of the OpenAPI document: 30 + * + * + * 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.disputes; + +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; + + +/** + * DeleteDefenseDocumentRequest + */ +@JsonPropertyOrder({ + DeleteDefenseDocumentRequest.JSON_PROPERTY_DEFENSE_DOCUMENT_TYPE, + DeleteDefenseDocumentRequest.JSON_PROPERTY_DISPUTE_PSP_REFERENCE, + DeleteDefenseDocumentRequest.JSON_PROPERTY_MERCHANT_ACCOUNT_CODE +}) + +public class DeleteDefenseDocumentRequest { + public static final String JSON_PROPERTY_DEFENSE_DOCUMENT_TYPE = "defenseDocumentType"; + private String defenseDocumentType; + + public static final String JSON_PROPERTY_DISPUTE_PSP_REFERENCE = "disputePspReference"; + private String disputePspReference; + + public static final String JSON_PROPERTY_MERCHANT_ACCOUNT_CODE = "merchantAccountCode"; + private String merchantAccountCode; + + public DeleteDefenseDocumentRequest() { + } + + public DeleteDefenseDocumentRequest defenseDocumentType(String defenseDocumentType) { + this.defenseDocumentType = defenseDocumentType; + return this; + } + + /** + * The document type code of the defense document. + * @return defenseDocumentType + **/ + @ApiModelProperty(required = true, value = "The document type code of the defense document.") + @JsonProperty(JSON_PROPERTY_DEFENSE_DOCUMENT_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getDefenseDocumentType() { + return defenseDocumentType; + } + + + @JsonProperty(JSON_PROPERTY_DEFENSE_DOCUMENT_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDefenseDocumentType(String defenseDocumentType) { + this.defenseDocumentType = defenseDocumentType; + } + + + public DeleteDefenseDocumentRequest disputePspReference(String disputePspReference) { + this.disputePspReference = disputePspReference; + return this; + } + + /** + * The PSP reference assigned to the dispute. + * @return disputePspReference + **/ + @ApiModelProperty(required = true, value = "The PSP reference assigned to the 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 DeleteDefenseDocumentRequest merchantAccountCode(String merchantAccountCode) { + this.merchantAccountCode = merchantAccountCode; + return this; + } + + /** + * The merchant account identifier, for which you want to process the dispute transaction. + * @return merchantAccountCode + **/ + @ApiModelProperty(required = true, value = "The merchant account identifier, for which you want to process the dispute transaction.") + @JsonProperty(JSON_PROPERTY_MERCHANT_ACCOUNT_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getMerchantAccountCode() { + return merchantAccountCode; + } + + + @JsonProperty(JSON_PROPERTY_MERCHANT_ACCOUNT_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMerchantAccountCode(String merchantAccountCode) { + this.merchantAccountCode = merchantAccountCode; + } + + + /** + * Return true if this DeleteDefenseDocumentRequest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DeleteDefenseDocumentRequest deleteDefenseDocumentRequest = (DeleteDefenseDocumentRequest) o; + return Objects.equals(this.defenseDocumentType, deleteDefenseDocumentRequest.defenseDocumentType) && + Objects.equals(this.disputePspReference, deleteDefenseDocumentRequest.disputePspReference) && + Objects.equals(this.merchantAccountCode, deleteDefenseDocumentRequest.merchantAccountCode); + } + + @Override + public int hashCode() { + return Objects.hash(defenseDocumentType, disputePspReference, merchantAccountCode); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DeleteDefenseDocumentRequest {\n"); + sb.append(" defenseDocumentType: ").append(toIndentedString(defenseDocumentType)).append("\n"); + sb.append(" disputePspReference: ").append(toIndentedString(disputePspReference)).append("\n"); + sb.append(" merchantAccountCode: ").append(toIndentedString(merchantAccountCode)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line 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 DeleteDefenseDocumentRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of DeleteDefenseDocumentRequest + * @throws JsonProcessingException if the JSON string is invalid with respect to DeleteDefenseDocumentRequest + */ + public static DeleteDefenseDocumentRequest fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, DeleteDefenseDocumentRequest.class); + } +/** + * Convert an instance of DeleteDefenseDocumentRequest 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/disputes/DeleteDefenseDocumentResponse.java b/src/main/java/com/adyen/model/disputes/DeleteDefenseDocumentResponse.java new file mode 100644 index 000000000..f461c49ce --- /dev/null +++ b/src/main/java/com/adyen/model/disputes/DeleteDefenseDocumentResponse.java @@ -0,0 +1,130 @@ +/* + * Disputes API + * You can use the [Disputes API](https://docs.adyen.com/risk-management/disputes-api) to automate the dispute handling process so that you can respond to disputes and chargebacks as soon as they are initiated. The Disputes API lets you retrieve defense reasons, supply and delete defense documents, and accept or defend disputes. ## Authentication Each request to the Disputes API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/development-resources/api-credentials#generate-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_API_key\" \\ ... ``` Note that 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 Disputes 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://ca-test.adyen.com/ca/services/DisputeService/v30/defendDispute ``` + * + * The version of the OpenAPI document: 30 + * + * + * 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.disputes; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.adyen.model.disputes.DisputeServiceResult; +import com.fasterxml.jackson.annotation.JsonInclude; +import 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; + + +/** + * DeleteDefenseDocumentResponse + */ +@JsonPropertyOrder({ + DeleteDefenseDocumentResponse.JSON_PROPERTY_DISPUTE_SERVICE_RESULT +}) + +public class DeleteDefenseDocumentResponse { + public static final String JSON_PROPERTY_DISPUTE_SERVICE_RESULT = "disputeServiceResult"; + private DisputeServiceResult disputeServiceResult; + + public DeleteDefenseDocumentResponse() { + } + + public DeleteDefenseDocumentResponse disputeServiceResult(DisputeServiceResult disputeServiceResult) { + this.disputeServiceResult = disputeServiceResult; + return this; + } + + /** + * Get disputeServiceResult + * @return disputeServiceResult + **/ + @ApiModelProperty(required = true, value = "") + @JsonProperty(JSON_PROPERTY_DISPUTE_SERVICE_RESULT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public DisputeServiceResult getDisputeServiceResult() { + return disputeServiceResult; + } + + + @JsonProperty(JSON_PROPERTY_DISPUTE_SERVICE_RESULT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDisputeServiceResult(DisputeServiceResult disputeServiceResult) { + this.disputeServiceResult = disputeServiceResult; + } + + + /** + * Return true if this DeleteDefenseDocumentResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DeleteDefenseDocumentResponse deleteDefenseDocumentResponse = (DeleteDefenseDocumentResponse) o; + return Objects.equals(this.disputeServiceResult, deleteDefenseDocumentResponse.disputeServiceResult); + } + + @Override + public int hashCode() { + return Objects.hash(disputeServiceResult); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DeleteDefenseDocumentResponse {\n"); + sb.append(" disputeServiceResult: ").append(toIndentedString(disputeServiceResult)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line 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 DeleteDefenseDocumentResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of DeleteDefenseDocumentResponse + * @throws JsonProcessingException if the JSON string is invalid with respect to DeleteDefenseDocumentResponse + */ + public static DeleteDefenseDocumentResponse fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, DeleteDefenseDocumentResponse.class); + } +/** + * Convert an instance of DeleteDefenseDocumentResponse 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/disputes/DisputeServiceResult.java b/src/main/java/com/adyen/model/disputes/DisputeServiceResult.java new file mode 100644 index 000000000..5b865b22d --- /dev/null +++ b/src/main/java/com/adyen/model/disputes/DisputeServiceResult.java @@ -0,0 +1,160 @@ +/* + * Disputes API + * You can use the [Disputes API](https://docs.adyen.com/risk-management/disputes-api) to automate the dispute handling process so that you can respond to disputes and chargebacks as soon as they are initiated. The Disputes API lets you retrieve defense reasons, supply and delete defense documents, and accept or defend disputes. ## Authentication Each request to the Disputes API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/development-resources/api-credentials#generate-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_API_key\" \\ ... ``` Note that 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 Disputes 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://ca-test.adyen.com/ca/services/DisputeService/v30/defendDispute ``` + * + * The version of the OpenAPI document: 30 + * + * + * 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.disputes; + +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; + + +/** + * DisputeServiceResult + */ +@JsonPropertyOrder({ + DisputeServiceResult.JSON_PROPERTY_ERROR_MESSAGE, + DisputeServiceResult.JSON_PROPERTY_SUCCESS +}) + +public class DisputeServiceResult { + public static final String JSON_PROPERTY_ERROR_MESSAGE = "errorMessage"; + private String errorMessage; + + public static final String JSON_PROPERTY_SUCCESS = "success"; + private Boolean success; + + public DisputeServiceResult() { + } + + public DisputeServiceResult errorMessage(String errorMessage) { + this.errorMessage = errorMessage; + return this; + } + + /** + * The general error message. + * @return errorMessage + **/ + @ApiModelProperty(value = "The general error message.") + @JsonProperty(JSON_PROPERTY_ERROR_MESSAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getErrorMessage() { + return errorMessage; + } + + + @JsonProperty(JSON_PROPERTY_ERROR_MESSAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setErrorMessage(String errorMessage) { + this.errorMessage = errorMessage; + } + + + public DisputeServiceResult success(Boolean success) { + this.success = success; + return this; + } + + /** + * Indicates whether the request succeeded. + * @return success + **/ + @ApiModelProperty(required = true, value = "Indicates whether the request succeeded.") + @JsonProperty(JSON_PROPERTY_SUCCESS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getSuccess() { + return success; + } + + + @JsonProperty(JSON_PROPERTY_SUCCESS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSuccess(Boolean success) { + this.success = success; + } + + + /** + * Return true if this DisputeServiceResult object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DisputeServiceResult disputeServiceResult = (DisputeServiceResult) o; + return Objects.equals(this.errorMessage, disputeServiceResult.errorMessage) && + Objects.equals(this.success, disputeServiceResult.success); + } + + @Override + public int hashCode() { + return Objects.hash(errorMessage, success); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DisputeServiceResult {\n"); + sb.append(" errorMessage: ").append(toIndentedString(errorMessage)).append("\n"); + sb.append(" success: ").append(toIndentedString(success)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line 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 DisputeServiceResult given an JSON string + * + * @param jsonString JSON string + * @return An instance of DisputeServiceResult + * @throws JsonProcessingException if the JSON string is invalid with respect to DisputeServiceResult + */ + public static DisputeServiceResult fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, DisputeServiceResult.class); + } +/** + * Convert an instance of DisputeServiceResult 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/disputes/DownloadDefenseDocumentRequest.java b/src/main/java/com/adyen/model/disputes/DownloadDefenseDocumentRequest.java new file mode 100644 index 000000000..a3f9b9d3e --- /dev/null +++ b/src/main/java/com/adyen/model/disputes/DownloadDefenseDocumentRequest.java @@ -0,0 +1,191 @@ +/* + * Disputes API + * You can use the [Disputes API](https://docs.adyen.com/risk-management/disputes-api) to automate the dispute handling process so that you can respond to disputes and chargebacks as soon as they are initiated. The Disputes API lets you retrieve defense reasons, supply and delete defense documents, and accept or defend disputes. ## Authentication Each request to the Disputes API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/development-resources/api-credentials#generate-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_API_key\" \\ ... ``` Note that 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 Disputes 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://ca-test.adyen.com/ca/services/DisputeService/v30/defendDispute ``` + * + * The version of the OpenAPI document: 30 + * + * + * 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.disputes; + +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; + + +/** + * DownloadDefenseDocumentRequest + */ +@JsonPropertyOrder({ + DownloadDefenseDocumentRequest.JSON_PROPERTY_DEFENSE_DOCUMENT_TYPE, + DownloadDefenseDocumentRequest.JSON_PROPERTY_DISPUTE_PSP_REFERENCE, + DownloadDefenseDocumentRequest.JSON_PROPERTY_MERCHANT_ACCOUNT_CODE +}) + +public class DownloadDefenseDocumentRequest { + public static final String JSON_PROPERTY_DEFENSE_DOCUMENT_TYPE = "defenseDocumentType"; + private String defenseDocumentType; + + public static final String JSON_PROPERTY_DISPUTE_PSP_REFERENCE = "disputePspReference"; + private String disputePspReference; + + public static final String JSON_PROPERTY_MERCHANT_ACCOUNT_CODE = "merchantAccountCode"; + private String merchantAccountCode; + + public DownloadDefenseDocumentRequest() { + } + + public DownloadDefenseDocumentRequest defenseDocumentType(String defenseDocumentType) { + this.defenseDocumentType = defenseDocumentType; + return this; + } + + /** + * The document type code of the defense document. + * @return defenseDocumentType + **/ + @ApiModelProperty(required = true, value = "The document type code of the defense document.") + @JsonProperty(JSON_PROPERTY_DEFENSE_DOCUMENT_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getDefenseDocumentType() { + return defenseDocumentType; + } + + + @JsonProperty(JSON_PROPERTY_DEFENSE_DOCUMENT_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDefenseDocumentType(String defenseDocumentType) { + this.defenseDocumentType = defenseDocumentType; + } + + + public DownloadDefenseDocumentRequest disputePspReference(String disputePspReference) { + this.disputePspReference = disputePspReference; + return this; + } + + /** + * The PSP reference assigned to the dispute. + * @return disputePspReference + **/ + @ApiModelProperty(required = true, value = "The PSP reference assigned to the 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 DownloadDefenseDocumentRequest merchantAccountCode(String merchantAccountCode) { + this.merchantAccountCode = merchantAccountCode; + return this; + } + + /** + * The merchant account identifier, for which you want to process the dispute transaction. + * @return merchantAccountCode + **/ + @ApiModelProperty(required = true, value = "The merchant account identifier, for which you want to process the dispute transaction.") + @JsonProperty(JSON_PROPERTY_MERCHANT_ACCOUNT_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getMerchantAccountCode() { + return merchantAccountCode; + } + + + @JsonProperty(JSON_PROPERTY_MERCHANT_ACCOUNT_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMerchantAccountCode(String merchantAccountCode) { + this.merchantAccountCode = merchantAccountCode; + } + + + /** + * Return true if this DownloadDefenseDocumentRequest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DownloadDefenseDocumentRequest downloadDefenseDocumentRequest = (DownloadDefenseDocumentRequest) o; + return Objects.equals(this.defenseDocumentType, downloadDefenseDocumentRequest.defenseDocumentType) && + Objects.equals(this.disputePspReference, downloadDefenseDocumentRequest.disputePspReference) && + Objects.equals(this.merchantAccountCode, downloadDefenseDocumentRequest.merchantAccountCode); + } + + @Override + public int hashCode() { + return Objects.hash(defenseDocumentType, disputePspReference, merchantAccountCode); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DownloadDefenseDocumentRequest {\n"); + sb.append(" defenseDocumentType: ").append(toIndentedString(defenseDocumentType)).append("\n"); + sb.append(" disputePspReference: ").append(toIndentedString(disputePspReference)).append("\n"); + sb.append(" merchantAccountCode: ").append(toIndentedString(merchantAccountCode)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line 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 DownloadDefenseDocumentRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of DownloadDefenseDocumentRequest + * @throws JsonProcessingException if the JSON string is invalid with respect to DownloadDefenseDocumentRequest + */ + public static DownloadDefenseDocumentRequest fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, DownloadDefenseDocumentRequest.class); + } +/** + * Convert an instance of DownloadDefenseDocumentRequest 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/disputes/DownloadDefenseDocumentResponse.java b/src/main/java/com/adyen/model/disputes/DownloadDefenseDocumentResponse.java new file mode 100644 index 000000000..40cadd35b --- /dev/null +++ b/src/main/java/com/adyen/model/disputes/DownloadDefenseDocumentResponse.java @@ -0,0 +1,192 @@ +/* + * Disputes API + * You can use the [Disputes API](https://docs.adyen.com/risk-management/disputes-api) to automate the dispute handling process so that you can respond to disputes and chargebacks as soon as they are initiated. The Disputes API lets you retrieve defense reasons, supply and delete defense documents, and accept or defend disputes. ## Authentication Each request to the Disputes API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/development-resources/api-credentials#generate-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_API_key\" \\ ... ``` Note that 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 Disputes 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://ca-test.adyen.com/ca/services/DisputeService/v30/defendDispute ``` + * + * The version of the OpenAPI document: 30 + * + * + * 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.disputes; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.adyen.model.disputes.DisputeServiceResult; +import com.fasterxml.jackson.annotation.JsonInclude; +import 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; + + +/** + * DownloadDefenseDocumentResponse + */ +@JsonPropertyOrder({ + DownloadDefenseDocumentResponse.JSON_PROPERTY_CONTENT, + DownloadDefenseDocumentResponse.JSON_PROPERTY_CONTENT_TYPE, + DownloadDefenseDocumentResponse.JSON_PROPERTY_DISPUTE_SERVICE_RESULT +}) + +public class DownloadDefenseDocumentResponse { + 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_DISPUTE_SERVICE_RESULT = "disputeServiceResult"; + private DisputeServiceResult disputeServiceResult; + + public DownloadDefenseDocumentResponse() { + } + + public DownloadDefenseDocumentResponse content(byte[] content) { + this.content = content; + return this; + } + + /** + * The content of the defense document in Base64 binary format. Must be encoded in the format that is specified in the `contentType` field. + * @return content + **/ + @ApiModelProperty(value = "The content of the defense document in Base64 binary format. Must be encoded in the format that is specified in the `contentType` field.") + @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 DownloadDefenseDocumentResponse contentType(String contentType) { + this.contentType = contentType; + return this; + } + + /** + * The content type of the dispute defense document. Possible values: * **image/jpg** * **image/jpeg** * **image/tiff** * **application/pdf** + * @return contentType + **/ + @ApiModelProperty(value = "The content type of the dispute defense document. Possible values: * **image/jpg** * **image/jpeg** * **image/tiff** * **application/pdf**") + @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 DownloadDefenseDocumentResponse disputeServiceResult(DisputeServiceResult disputeServiceResult) { + this.disputeServiceResult = disputeServiceResult; + return this; + } + + /** + * Get disputeServiceResult + * @return disputeServiceResult + **/ + @ApiModelProperty(required = true, value = "") + @JsonProperty(JSON_PROPERTY_DISPUTE_SERVICE_RESULT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public DisputeServiceResult getDisputeServiceResult() { + return disputeServiceResult; + } + + + @JsonProperty(JSON_PROPERTY_DISPUTE_SERVICE_RESULT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDisputeServiceResult(DisputeServiceResult disputeServiceResult) { + this.disputeServiceResult = disputeServiceResult; + } + + + /** + * Return true if this DownloadDefenseDocumentResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DownloadDefenseDocumentResponse downloadDefenseDocumentResponse = (DownloadDefenseDocumentResponse) o; + return Arrays.equals(this.content, downloadDefenseDocumentResponse.content) && + Objects.equals(this.contentType, downloadDefenseDocumentResponse.contentType) && + Objects.equals(this.disputeServiceResult, downloadDefenseDocumentResponse.disputeServiceResult); + } + + @Override + public int hashCode() { + return Objects.hash(Arrays.hashCode(content), contentType, disputeServiceResult); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DownloadDefenseDocumentResponse {\n"); + sb.append(" content: ").append(toIndentedString(content)).append("\n"); + sb.append(" contentType: ").append(toIndentedString(contentType)).append("\n"); + sb.append(" disputeServiceResult: ").append(toIndentedString(disputeServiceResult)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line 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 DownloadDefenseDocumentResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of DownloadDefenseDocumentResponse + * @throws JsonProcessingException if the JSON string is invalid with respect to DownloadDefenseDocumentResponse + */ + public static DownloadDefenseDocumentResponse fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, DownloadDefenseDocumentResponse.class); + } +/** + * Convert an instance of DownloadDefenseDocumentResponse 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/disputes/JSON.java b/src/main/java/com/adyen/model/disputes/JSON.java new file mode 100644 index 000000000..839d46200 --- /dev/null +++ b/src/main/java/com/adyen/model/disputes/JSON.java @@ -0,0 +1,253 @@ +package com.adyen.model.disputes; + +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; +import com.fasterxml.jackson.databind.module.SimpleModule; +import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule; +import com.adyen.model.disputes.*; + +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/disputes/ServiceError.java b/src/main/java/com/adyen/model/disputes/ServiceError.java new file mode 100644 index 000000000..4a6a3b6c0 --- /dev/null +++ b/src/main/java/com/adyen/model/disputes/ServiceError.java @@ -0,0 +1,253 @@ +/* + * Disputes API + * You can use the [Disputes API](https://docs.adyen.com/risk-management/disputes-api) to automate the dispute handling process so that you can respond to disputes and chargebacks as soon as they are initiated. The Disputes API lets you retrieve defense reasons, supply and delete defense documents, and accept or defend disputes. ## Authentication Each request to the Disputes API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/development-resources/api-credentials#generate-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_API_key\" \\ ... ``` Note that 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 Disputes 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://ca-test.adyen.com/ca/services/DisputeService/v30/defendDispute ``` + * + * The version of the OpenAPI document: 30 + * + * + * 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.disputes; + +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/disputes/SupplyDefenseDocumentRequest.java b/src/main/java/com/adyen/model/disputes/SupplyDefenseDocumentRequest.java new file mode 100644 index 000000000..4ac36c28e --- /dev/null +++ b/src/main/java/com/adyen/model/disputes/SupplyDefenseDocumentRequest.java @@ -0,0 +1,199 @@ +/* + * Disputes API + * You can use the [Disputes API](https://docs.adyen.com/risk-management/disputes-api) to automate the dispute handling process so that you can respond to disputes and chargebacks as soon as they are initiated. The Disputes API lets you retrieve defense reasons, supply and delete defense documents, and accept or defend disputes. ## Authentication Each request to the Disputes API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/development-resources/api-credentials#generate-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_API_key\" \\ ... ``` Note that 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 Disputes 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://ca-test.adyen.com/ca/services/DisputeService/v30/defendDispute ``` + * + * The version of the OpenAPI document: 30 + * + * + * 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.disputes; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.adyen.model.disputes.DefenseDocument; +import com.fasterxml.jackson.annotation.JsonInclude; +import 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; + + +/** + * SupplyDefenseDocumentRequest + */ +@JsonPropertyOrder({ + SupplyDefenseDocumentRequest.JSON_PROPERTY_DEFENSE_DOCUMENTS, + SupplyDefenseDocumentRequest.JSON_PROPERTY_DISPUTE_PSP_REFERENCE, + SupplyDefenseDocumentRequest.JSON_PROPERTY_MERCHANT_ACCOUNT_CODE +}) + +public class SupplyDefenseDocumentRequest { + public static final String JSON_PROPERTY_DEFENSE_DOCUMENTS = "defenseDocuments"; + private List defenseDocuments = new ArrayList<>(); + + public static final String JSON_PROPERTY_DISPUTE_PSP_REFERENCE = "disputePspReference"; + private String disputePspReference; + + public static final String JSON_PROPERTY_MERCHANT_ACCOUNT_CODE = "merchantAccountCode"; + private String merchantAccountCode; + + public SupplyDefenseDocumentRequest() { + } + + public SupplyDefenseDocumentRequest defenseDocuments(List defenseDocuments) { + this.defenseDocuments = defenseDocuments; + return this; + } + + public SupplyDefenseDocumentRequest addDefenseDocumentsItem(DefenseDocument defenseDocumentsItem) { + this.defenseDocuments.add(defenseDocumentsItem); + return this; + } + + /** + * An array containing a list of the defense documents. + * @return defenseDocuments + **/ + @ApiModelProperty(required = true, value = "An array containing a list of the defense documents.") + @JsonProperty(JSON_PROPERTY_DEFENSE_DOCUMENTS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getDefenseDocuments() { + return defenseDocuments; + } + + + @JsonProperty(JSON_PROPERTY_DEFENSE_DOCUMENTS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDefenseDocuments(List defenseDocuments) { + this.defenseDocuments = defenseDocuments; + } + + + public SupplyDefenseDocumentRequest disputePspReference(String disputePspReference) { + this.disputePspReference = disputePspReference; + return this; + } + + /** + * The PSP reference assigned to the dispute. + * @return disputePspReference + **/ + @ApiModelProperty(required = true, value = "The PSP reference assigned to the 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 SupplyDefenseDocumentRequest merchantAccountCode(String merchantAccountCode) { + this.merchantAccountCode = merchantAccountCode; + return this; + } + + /** + * The merchant account identifier, for which you want to process the dispute transaction. + * @return merchantAccountCode + **/ + @ApiModelProperty(required = true, value = "The merchant account identifier, for which you want to process the dispute transaction.") + @JsonProperty(JSON_PROPERTY_MERCHANT_ACCOUNT_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getMerchantAccountCode() { + return merchantAccountCode; + } + + + @JsonProperty(JSON_PROPERTY_MERCHANT_ACCOUNT_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMerchantAccountCode(String merchantAccountCode) { + this.merchantAccountCode = merchantAccountCode; + } + + + /** + * Return true if this SupplyDefenseDocumentRequest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SupplyDefenseDocumentRequest supplyDefenseDocumentRequest = (SupplyDefenseDocumentRequest) o; + return Objects.equals(this.defenseDocuments, supplyDefenseDocumentRequest.defenseDocuments) && + Objects.equals(this.disputePspReference, supplyDefenseDocumentRequest.disputePspReference) && + Objects.equals(this.merchantAccountCode, supplyDefenseDocumentRequest.merchantAccountCode); + } + + @Override + public int hashCode() { + return Objects.hash(defenseDocuments, disputePspReference, merchantAccountCode); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SupplyDefenseDocumentRequest {\n"); + sb.append(" defenseDocuments: ").append(toIndentedString(defenseDocuments)).append("\n"); + sb.append(" disputePspReference: ").append(toIndentedString(disputePspReference)).append("\n"); + sb.append(" merchantAccountCode: ").append(toIndentedString(merchantAccountCode)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line 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 SupplyDefenseDocumentRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of SupplyDefenseDocumentRequest + * @throws JsonProcessingException if the JSON string is invalid with respect to SupplyDefenseDocumentRequest + */ + public static SupplyDefenseDocumentRequest fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, SupplyDefenseDocumentRequest.class); + } +/** + * Convert an instance of SupplyDefenseDocumentRequest 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/disputes/SupplyDefenseDocumentResponse.java b/src/main/java/com/adyen/model/disputes/SupplyDefenseDocumentResponse.java new file mode 100644 index 000000000..f2c0997b6 --- /dev/null +++ b/src/main/java/com/adyen/model/disputes/SupplyDefenseDocumentResponse.java @@ -0,0 +1,130 @@ +/* + * Disputes API + * You can use the [Disputes API](https://docs.adyen.com/risk-management/disputes-api) to automate the dispute handling process so that you can respond to disputes and chargebacks as soon as they are initiated. The Disputes API lets you retrieve defense reasons, supply and delete defense documents, and accept or defend disputes. ## Authentication Each request to the Disputes API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/development-resources/api-credentials#generate-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_API_key\" \\ ... ``` Note that 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 Disputes 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://ca-test.adyen.com/ca/services/DisputeService/v30/defendDispute ``` + * + * The version of the OpenAPI document: 30 + * + * + * 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.disputes; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.adyen.model.disputes.DisputeServiceResult; +import com.fasterxml.jackson.annotation.JsonInclude; +import 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; + + +/** + * SupplyDefenseDocumentResponse + */ +@JsonPropertyOrder({ + SupplyDefenseDocumentResponse.JSON_PROPERTY_DISPUTE_SERVICE_RESULT +}) + +public class SupplyDefenseDocumentResponse { + public static final String JSON_PROPERTY_DISPUTE_SERVICE_RESULT = "disputeServiceResult"; + private DisputeServiceResult disputeServiceResult; + + public SupplyDefenseDocumentResponse() { + } + + public SupplyDefenseDocumentResponse disputeServiceResult(DisputeServiceResult disputeServiceResult) { + this.disputeServiceResult = disputeServiceResult; + return this; + } + + /** + * Get disputeServiceResult + * @return disputeServiceResult + **/ + @ApiModelProperty(required = true, value = "") + @JsonProperty(JSON_PROPERTY_DISPUTE_SERVICE_RESULT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public DisputeServiceResult getDisputeServiceResult() { + return disputeServiceResult; + } + + + @JsonProperty(JSON_PROPERTY_DISPUTE_SERVICE_RESULT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDisputeServiceResult(DisputeServiceResult disputeServiceResult) { + this.disputeServiceResult = disputeServiceResult; + } + + + /** + * Return true if this SupplyDefenseDocumentResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SupplyDefenseDocumentResponse supplyDefenseDocumentResponse = (SupplyDefenseDocumentResponse) o; + return Objects.equals(this.disputeServiceResult, supplyDefenseDocumentResponse.disputeServiceResult); + } + + @Override + public int hashCode() { + return Objects.hash(disputeServiceResult); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SupplyDefenseDocumentResponse {\n"); + sb.append(" disputeServiceResult: ").append(toIndentedString(disputeServiceResult)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line 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 SupplyDefenseDocumentResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of SupplyDefenseDocumentResponse + * @throws JsonProcessingException if the JSON string is invalid with respect to SupplyDefenseDocumentResponse + */ + public static SupplyDefenseDocumentResponse fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, SupplyDefenseDocumentResponse.class); + } +/** + * Convert an instance of SupplyDefenseDocumentResponse 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/service/DisputesApi.java b/src/main/java/com/adyen/service/DisputesApi.java new file mode 100644 index 000000000..bb72aafb3 --- /dev/null +++ b/src/main/java/com/adyen/service/DisputesApi.java @@ -0,0 +1,226 @@ +/* + * Disputes API + * You can use the [Disputes API](https://docs.adyen.com/risk-management/disputes-api) to automate the dispute handling process so that you can respond to disputes and chargebacks as soon as they are initiated. The Disputes API lets you retrieve defense reasons, supply and delete defense documents, and accept or defend disputes. ## Authentication Each request to the Disputes API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/development-resources/api-credentials#generate-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_API_key\" \\ ... ``` Note that 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 Disputes 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://ca-test.adyen.com/ca/services/DisputeService/v30/defendDispute ``` + * + * The version of the OpenAPI document: 30 + * + * + * 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; + +import com.adyen.Client; +import com.adyen.Service; +import com.adyen.constants.ApiConstants; +import com.adyen.model.disputes.AcceptDisputeRequest; +import com.adyen.model.disputes.AcceptDisputeResponse; +import com.adyen.model.disputes.DefendDisputeRequest; +import com.adyen.model.disputes.DefendDisputeResponse; +import com.adyen.model.disputes.DefenseReasonsRequest; +import com.adyen.model.disputes.DefenseReasonsResponse; +import com.adyen.model.disputes.DeleteDefenseDocumentRequest; +import com.adyen.model.disputes.DeleteDefenseDocumentResponse; +import com.adyen.model.disputes.DownloadDefenseDocumentRequest; +import com.adyen.model.disputes.DownloadDefenseDocumentResponse; +import com.adyen.model.disputes.ServiceError; +import com.adyen.model.disputes.SupplyDefenseDocumentRequest; +import com.adyen.model.disputes.SupplyDefenseDocumentResponse; +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 DisputesApi extends Service { + + public static final String API_VERSION = "30"; + + protected String baseURL; + + /** + * General constructor in {@link com.adyen.service package}. + * @param client {@link Client } (required) + */ + public DisputesApi(Client client) { + super(client); + this.baseURL = createBaseURL("https://ca-test.adyen.com/ca/services/DisputeService/v30"); + } + + /** + * 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 DisputesApi(Client client, String baseURL) { + super(client); + this.baseURL = baseURL; + } + + /** + * Accept a dispute + * + * @param acceptDisputeRequest {@link AcceptDisputeRequest } (required) + * @return {@link AcceptDisputeResponse } + * @throws ApiException if fails to make API call + */ + public AcceptDisputeResponse acceptDispute(AcceptDisputeRequest acceptDisputeRequest) throws ApiException, IOException { + return acceptDispute(acceptDisputeRequest, null); + } + + /** + * Accept a dispute + * + * @param acceptDisputeRequest {@link AcceptDisputeRequest } (required) + * @param requestOptions {@link RequestOptions } Object to store additional data such as idempotency-keys (optional) + * @return {@link AcceptDisputeResponse } + * @throws ApiException if fails to make API call + */ + public AcceptDisputeResponse acceptDispute(AcceptDisputeRequest acceptDisputeRequest, RequestOptions requestOptions) throws ApiException, IOException { + + String requestBody = acceptDisputeRequest.toJson(); + Resource resource = new Resource(this, this.baseURL + "/acceptDispute", null); + String jsonResult = resource.request(requestBody, requestOptions, ApiConstants.HttpMethod.POST, null); + return AcceptDisputeResponse.fromJson(jsonResult); + } + + /** + * Defend a dispute + * + * @param defendDisputeRequest {@link DefendDisputeRequest } (required) + * @return {@link DefendDisputeResponse } + * @throws ApiException if fails to make API call + */ + public DefendDisputeResponse defendDispute(DefendDisputeRequest defendDisputeRequest) throws ApiException, IOException { + return defendDispute(defendDisputeRequest, null); + } + + /** + * Defend a dispute + * + * @param defendDisputeRequest {@link DefendDisputeRequest } (required) + * @param requestOptions {@link RequestOptions } Object to store additional data such as idempotency-keys (optional) + * @return {@link DefendDisputeResponse } + * @throws ApiException if fails to make API call + */ + public DefendDisputeResponse defendDispute(DefendDisputeRequest defendDisputeRequest, RequestOptions requestOptions) throws ApiException, IOException { + + String requestBody = defendDisputeRequest.toJson(); + Resource resource = new Resource(this, this.baseURL + "/defendDispute", null); + String jsonResult = resource.request(requestBody, requestOptions, ApiConstants.HttpMethod.POST, null); + return DefendDisputeResponse.fromJson(jsonResult); + } + + /** + * Delete a defense document + * + * @param deleteDefenseDocumentRequest {@link DeleteDefenseDocumentRequest } (required) + * @return {@link DeleteDefenseDocumentResponse } + * @throws ApiException if fails to make API call + */ + public DeleteDefenseDocumentResponse deleteDisputeDefenseDocument(DeleteDefenseDocumentRequest deleteDefenseDocumentRequest) throws ApiException, IOException { + return deleteDisputeDefenseDocument(deleteDefenseDocumentRequest, null); + } + + /** + * Delete a defense document + * + * @param deleteDefenseDocumentRequest {@link DeleteDefenseDocumentRequest } (required) + * @param requestOptions {@link RequestOptions } Object to store additional data such as idempotency-keys (optional) + * @return {@link DeleteDefenseDocumentResponse } + * @throws ApiException if fails to make API call + */ + public DeleteDefenseDocumentResponse deleteDisputeDefenseDocument(DeleteDefenseDocumentRequest deleteDefenseDocumentRequest, RequestOptions requestOptions) throws ApiException, IOException { + + String requestBody = deleteDefenseDocumentRequest.toJson(); + Resource resource = new Resource(this, this.baseURL + "/deleteDisputeDefenseDocument", null); + String jsonResult = resource.request(requestBody, requestOptions, ApiConstants.HttpMethod.POST, null); + return DeleteDefenseDocumentResponse.fromJson(jsonResult); + } + + /** + * Download a defense document + * + * @param downloadDefenseDocumentRequest {@link DownloadDefenseDocumentRequest } (required) + * @return {@link DownloadDefenseDocumentResponse } + * @throws ApiException if fails to make API call + */ + public DownloadDefenseDocumentResponse downloadDisputeDefenseDocument(DownloadDefenseDocumentRequest downloadDefenseDocumentRequest) throws ApiException, IOException { + return downloadDisputeDefenseDocument(downloadDefenseDocumentRequest, null); + } + + /** + * Download a defense document + * + * @param downloadDefenseDocumentRequest {@link DownloadDefenseDocumentRequest } (required) + * @param requestOptions {@link RequestOptions } Object to store additional data such as idempotency-keys (optional) + * @return {@link DownloadDefenseDocumentResponse } + * @throws ApiException if fails to make API call + */ + public DownloadDefenseDocumentResponse downloadDisputeDefenseDocument(DownloadDefenseDocumentRequest downloadDefenseDocumentRequest, RequestOptions requestOptions) throws ApiException, IOException { + + String requestBody = downloadDefenseDocumentRequest.toJson(); + Resource resource = new Resource(this, this.baseURL + "/downloadDisputeDefenseDocument", null); + String jsonResult = resource.request(requestBody, requestOptions, ApiConstants.HttpMethod.POST, null); + return DownloadDefenseDocumentResponse.fromJson(jsonResult); + } + + /** + * Get applicable defense reasons + * + * @param defenseReasonsRequest {@link DefenseReasonsRequest } (required) + * @return {@link DefenseReasonsResponse } + * @throws ApiException if fails to make API call + */ + public DefenseReasonsResponse retrieveApplicableDefenseReasons(DefenseReasonsRequest defenseReasonsRequest) throws ApiException, IOException { + return retrieveApplicableDefenseReasons(defenseReasonsRequest, null); + } + + /** + * Get applicable defense reasons + * + * @param defenseReasonsRequest {@link DefenseReasonsRequest } (required) + * @param requestOptions {@link RequestOptions } Object to store additional data such as idempotency-keys (optional) + * @return {@link DefenseReasonsResponse } + * @throws ApiException if fails to make API call + */ + public DefenseReasonsResponse retrieveApplicableDefenseReasons(DefenseReasonsRequest defenseReasonsRequest, RequestOptions requestOptions) throws ApiException, IOException { + + String requestBody = defenseReasonsRequest.toJson(); + Resource resource = new Resource(this, this.baseURL + "/retrieveApplicableDefenseReasons", null); + String jsonResult = resource.request(requestBody, requestOptions, ApiConstants.HttpMethod.POST, null); + return DefenseReasonsResponse.fromJson(jsonResult); + } + + /** + * Supply a defense document + * + * @param supplyDefenseDocumentRequest {@link SupplyDefenseDocumentRequest } (required) + * @return {@link SupplyDefenseDocumentResponse } + * @throws ApiException if fails to make API call + */ + public SupplyDefenseDocumentResponse supplyDefenseDocument(SupplyDefenseDocumentRequest supplyDefenseDocumentRequest) throws ApiException, IOException { + return supplyDefenseDocument(supplyDefenseDocumentRequest, null); + } + + /** + * Supply a defense document + * + * @param supplyDefenseDocumentRequest {@link SupplyDefenseDocumentRequest } (required) + * @param requestOptions {@link RequestOptions } Object to store additional data such as idempotency-keys (optional) + * @return {@link SupplyDefenseDocumentResponse } + * @throws ApiException if fails to make API call + */ + public SupplyDefenseDocumentResponse supplyDefenseDocument(SupplyDefenseDocumentRequest supplyDefenseDocumentRequest, RequestOptions requestOptions) throws ApiException, IOException { + + String requestBody = supplyDefenseDocumentRequest.toJson(); + Resource resource = new Resource(this, this.baseURL + "/supplyDefenseDocument", null); + String jsonResult = resource.request(requestBody, requestOptions, ApiConstants.HttpMethod.POST, null); + return SupplyDefenseDocumentResponse.fromJson(jsonResult); + } +} diff --git a/src/test/java/com/adyen/DisputesTest.java b/src/test/java/com/adyen/DisputesTest.java new file mode 100644 index 000000000..4af135c8b --- /dev/null +++ b/src/test/java/com/adyen/DisputesTest.java @@ -0,0 +1,194 @@ +package com.adyen; + +import com.adyen.constants.ApiConstants; +import com.adyen.enums.Environment; +import com.adyen.httpclient.HTTPClientException; +import com.adyen.model.disputes.*; +import com.adyen.service.DisputesApi; +import com.adyen.service.exception.ApiException; +import org.junit.Test; + +import java.io.IOException; +import java.util.Collections; + +import static org.junit.Assert.*; +import static org.mockito.Mockito.verify; + +public class DisputesTest extends BaseTest{ + + @Test + public void acceptDispute() throws IOException, ApiException, HTTPClientException { + Client client = createMockClientFromFile("mocks/disputes/post-acceptDispute-accept-dispute-200.json"); + client.setEnvironment(Environment.TEST, null); + DisputesApi disputesApiService = new DisputesApi(client); + + AcceptDisputeRequest request = new AcceptDisputeRequest(); + request.setDisputePspReference("DZ4DPSHB4WD2WN82"); + request.setMerchantAccountCode("YOUR_MERCHANT_ACCOUNT"); + AcceptDisputeResponse response = disputesApiService.acceptDispute(request); + + verify(client.getHttpClient()).request( + "https://ca-test.adyen.com/ca/services/DisputeService/v" + DisputesApi.API_VERSION + "/acceptDispute", + request.toJson(), + client.getConfig(), + false, + null, + ApiConstants.HttpMethod.POST, + null + ); + assertNotNull(response.getDisputeServiceResult()); + assertTrue(response.getDisputeServiceResult().getSuccess()); + } + + @Test + public void defendDispute() throws IOException, ApiException, HTTPClientException { + Client client = createMockClientFromFile("mocks/disputes/post-defendDispute-defend-dispute-200.json"); + client.setEnvironment(Environment.TEST, null); + DisputesApi disputesApiService = new DisputesApi(client); + + DefendDisputeRequest request = new DefendDisputeRequest(); + request.setDefenseReasonCode("SupplyDefenseMaterial"); + request.setDisputePspReference("DZ4DPSHB4WD2WN82"); + request.setMerchantAccountCode("YOUR_MERCHANT_ACCOUNT"); + DefendDisputeResponse response = disputesApiService.defendDispute(request); + + verify(client.getHttpClient()).request( + "https://ca-test.adyen.com/ca/services/DisputeService/v" + DisputesApi.API_VERSION + "/defendDispute", + request.toJson(), + client.getConfig(), + false, + null, + ApiConstants.HttpMethod.POST, + null + ); + assertNotNull(response.getDisputeServiceResult()); + assertTrue(response.getDisputeServiceResult().getSuccess()); + } + + @Test + public void deleteDisputeDefenseDocument() throws IOException, ApiException, HTTPClientException { + Client client = createMockClientFromFile("mocks/disputes/post-deleteDisputeDefenseDocument-delete-dispute-defense-document-200.json"); + client.setEnvironment(Environment.TEST, null); + DisputesApi disputesApiService = new DisputesApi(client); + + DeleteDefenseDocumentRequest request = new DeleteDefenseDocumentRequest(); + request.setDefenseDocumentType("DefenseMaterial"); + request.setDisputePspReference("DZ4DPSHB4WD2WN82"); + request.setMerchantAccountCode("YOUR_MERCHANT_ACCOUNT"); + DeleteDefenseDocumentResponse response = disputesApiService.deleteDisputeDefenseDocument(request); + + verify(client.getHttpClient()).request( + "https://ca-test.adyen.com/ca/services/DisputeService/v" + DisputesApi.API_VERSION + "/deleteDisputeDefenseDocument", + request.toJson(), + client.getConfig(), + false, + null, + ApiConstants.HttpMethod.POST, + null + ); + assertNotNull(response.getDisputeServiceResult()); + assertTrue(response.getDisputeServiceResult().getSuccess()); + } + + @Test + public void downloadDisputeDefenseDocument() throws IOException, ApiException, HTTPClientException { + Client client = createMockClientFromFile("mocks/disputes/post-downloadDisputeDefenseDocument-download-dispute-defense-document-200.json"); + client.setEnvironment(Environment.TEST, null); + DisputesApi disputesApiService = new DisputesApi(client); + + DownloadDefenseDocumentRequest request = new DownloadDefenseDocumentRequest(); + request.setDefenseDocumentType("DefenseMaterial"); + request.setDisputePspReference("DZ4DPSHB4WD2WN82"); + request.setMerchantAccountCode("YOUR_MERCHANT_ACCOUNT"); + DownloadDefenseDocumentResponse response = disputesApiService.downloadDisputeDefenseDocument(request); + + verify(client.getHttpClient()).request( + "https://ca-test.adyen.com/ca/services/DisputeService/v" + DisputesApi.API_VERSION + "/downloadDisputeDefenseDocument", + request.toJson(), + client.getConfig(), + false, + null, + ApiConstants.HttpMethod.POST, + null + ); + assertNotNull(response.getDisputeServiceResult()); + assertTrue(response.getDisputeServiceResult().getSuccess()); + } + + @Test + public void retrieveApplicableDefenseReasons() throws IOException, ApiException, HTTPClientException { + Client client = createMockClientFromFile("mocks/disputes/post-retrieveApplicableDefenseReasons-retrieve-defense-reasons-200.json"); + client.setEnvironment(Environment.TEST, null); + DisputesApi disputesApiService = new DisputesApi(client); + + DefenseReasonsRequest request = new DefenseReasonsRequest(); + request.setDisputePspReference("DZ4DPSHB4WD2WN82"); + request.setMerchantAccountCode("YOUR_MERCHANT_ACCOUNT"); + DefenseReasonsResponse response = disputesApiService.retrieveApplicableDefenseReasons(request); + + verify(client.getHttpClient()).request( + "https://ca-test.adyen.com/ca/services/DisputeService/v" + DisputesApi.API_VERSION + "/retrieveApplicableDefenseReasons", + request.toJson(), + client.getConfig(), + false, + null, + ApiConstants.HttpMethod.POST, + null + ); + assertNotNull(response.getDisputeServiceResult()); + assertTrue(response.getDisputeServiceResult().getSuccess()); + assertNotNull(response.getDefenseReasons()); + + assertNotNull(response.getDefenseReasons().get(0)); + assertEquals("GoodsNotReturned", response.getDefenseReasons().get(0).getDefenseReasonCode()); + assertNotNull(response.getDefenseReasons().get(0).getDefenseDocumentTypes()); + assertFalse(response.getDefenseReasons().get(0).getDefenseDocumentTypes().get(0).getAvailable()); + assertEquals("TIDorInvoice", response.getDefenseReasons().get(0).getDefenseDocumentTypes().get(0).getDefenseDocumentTypeCode()); + assertEquals("Optional", response.getDefenseReasons().get(0).getDefenseDocumentTypes().get(0).getRequirementLevel()); + assertFalse(response.getDefenseReasons().get(0).getSatisfied()); + + assertNotNull(response.getDefenseReasons().get(1)); + assertEquals("GoodsRepairedOrReplaced", response.getDefenseReasons().get(1).getDefenseReasonCode()); + assertNotNull(response.getDefenseReasons().get(1).getDefenseDocumentTypes()); + assertFalse(response.getDefenseReasons().get(1).getSatisfied()); + + assertNotNull(response.getDefenseReasons().get(2)); + assertEquals("GoodsWereAsDescribed", response.getDefenseReasons().get(2).getDefenseReasonCode()); + assertNotNull(response.getDefenseReasons().get(2).getDefenseDocumentTypes()); + assertFalse(response.getDefenseReasons().get(2).getSatisfied()); + + assertNotNull(response.getDefenseReasons().get(3)); + assertEquals("SupplyDefenseMaterial", response.getDefenseReasons().get(3).getDefenseReasonCode()); + assertNotNull(response.getDefenseReasons().get(3).getDefenseDocumentTypes()); + assertFalse(response.getDefenseReasons().get(3).getSatisfied()); + } + + @Test + public void supplyDefenseDocument() throws IOException, ApiException, HTTPClientException { + Client client = createMockClientFromFile("mocks/disputes/post-supplyDefenseDocument-supply-defense-document-200.json"); + client.setEnvironment(Environment.TEST, null); + DisputesApi disputesApiService = new DisputesApi(client); + + SupplyDefenseDocumentRequest request = new SupplyDefenseDocumentRequest(); + DefenseDocument defenseDocument = new DefenseDocument(); + defenseDocument.setContent("JVBERi0xLjQKJcOkw7zDtsOfCjIgMCBv+f/ub0j6JPRX+E3EmC==".getBytes()); + defenseDocument.setContentType("application/pdf"); + defenseDocument.setDefenseDocumentTypeCode("DefenseMaterial"); + request.setDefenseDocuments(Collections.singletonList(defenseDocument)); + request.setDisputePspReference("DZ4DPSHB4WD2WN82"); + request.setMerchantAccountCode("YOUR_MERCHANT_ACCOUNT"); + SupplyDefenseDocumentResponse response = disputesApiService.supplyDefenseDocument(request); + + verify(client.getHttpClient()).request( + "https://ca-test.adyen.com/ca/services/DisputeService/v" + DisputesApi.API_VERSION + "/supplyDefenseDocument", + request.toJson(), + client.getConfig(), + false, + null, + ApiConstants.HttpMethod.POST, + null + ); + assertNotNull(response.getDisputeServiceResult()); + assertTrue(response.getDisputeServiceResult().getSuccess()); + } +} diff --git a/src/test/resources/mocks/disputes/post-acceptDispute-accept-dispute-200.json b/src/test/resources/mocks/disputes/post-acceptDispute-accept-dispute-200.json new file mode 100644 index 000000000..ef664389c --- /dev/null +++ b/src/test/resources/mocks/disputes/post-acceptDispute-accept-dispute-200.json @@ -0,0 +1,5 @@ +{ + "disputeServiceResult": { + "success": true + } +} \ No newline at end of file diff --git a/src/test/resources/mocks/disputes/post-defendDispute-defend-dispute-200.json b/src/test/resources/mocks/disputes/post-defendDispute-defend-dispute-200.json new file mode 100644 index 000000000..ef664389c --- /dev/null +++ b/src/test/resources/mocks/disputes/post-defendDispute-defend-dispute-200.json @@ -0,0 +1,5 @@ +{ + "disputeServiceResult": { + "success": true + } +} \ No newline at end of file diff --git a/src/test/resources/mocks/disputes/post-deleteDisputeDefenseDocument-delete-dispute-defense-document-200.json b/src/test/resources/mocks/disputes/post-deleteDisputeDefenseDocument-delete-dispute-defense-document-200.json new file mode 100644 index 000000000..ef664389c --- /dev/null +++ b/src/test/resources/mocks/disputes/post-deleteDisputeDefenseDocument-delete-dispute-defense-document-200.json @@ -0,0 +1,5 @@ +{ + "disputeServiceResult": { + "success": true + } +} \ No newline at end of file diff --git a/src/test/resources/mocks/disputes/post-downloadDisputeDefenseDocument-download-dispute-defense-document-200.json b/src/test/resources/mocks/disputes/post-downloadDisputeDefenseDocument-download-dispute-defense-document-200.json new file mode 100644 index 000000000..ef664389c --- /dev/null +++ b/src/test/resources/mocks/disputes/post-downloadDisputeDefenseDocument-download-dispute-defense-document-200.json @@ -0,0 +1,5 @@ +{ + "disputeServiceResult": { + "success": true + } +} \ No newline at end of file diff --git a/src/test/resources/mocks/disputes/post-retrieveApplicableDefenseReasons-retrieve-defense-reasons-200.json b/src/test/resources/mocks/disputes/post-retrieveApplicableDefenseReasons-retrieve-defense-reasons-200.json new file mode 100644 index 000000000..21af47cd7 --- /dev/null +++ b/src/test/resources/mocks/disputes/post-retrieveApplicableDefenseReasons-retrieve-defense-reasons-200.json @@ -0,0 +1,71 @@ +{ + "defenseReasons": [ + { + "defenseDocumentTypes": [ + { + "available": false, + "defenseDocumentTypeCode": "TIDorInvoice", + "requirementLevel": "Optional" + }, + { + "available": false, + "defenseDocumentTypeCode": "GoodsNotReturned", + "requirementLevel": "Required" + } + ], + "defenseReasonCode": "GoodsNotReturned", + "satisfied": false + }, + { + "defenseDocumentTypes": [ + { + "available": false, + "defenseDocumentTypeCode": "TIDorInvoice", + "requirementLevel": "Optional" + }, + { + "available": false, + "defenseDocumentTypeCode": "GoodsRepairedOrReplaced", + "requirementLevel": "Required" + } + ], + "defenseReasonCode": "GoodsRepairedOrReplaced", + "satisfied": false + }, + { + "defenseDocumentTypes": [ + { + "available": false, + "defenseDocumentTypeCode": "GoodsWereAsDescribed", + "requirementLevel": "Required" + }, + { + "available": false, + "defenseDocumentTypeCode": "TIDorInvoice", + "requirementLevel": "Required" + } + ], + "defenseReasonCode": "GoodsWereAsDescribed", + "satisfied": false + }, + { + "defenseDocumentTypes": [ + { + "available": false, + "defenseDocumentTypeCode": "TIDorInvoice", + "requirementLevel": "Optional" + }, + { + "available": false, + "defenseDocumentTypeCode": "DefenseMaterial", + "requirementLevel": "Required" + } + ], + "defenseReasonCode": "SupplyDefenseMaterial", + "satisfied": false + } + ], + "disputeServiceResult": { + "success": true + } +} \ No newline at end of file diff --git a/src/test/resources/mocks/disputes/post-supplyDefenseDocument-supply-defense-document-200.json b/src/test/resources/mocks/disputes/post-supplyDefenseDocument-supply-defense-document-200.json new file mode 100644 index 000000000..ef664389c --- /dev/null +++ b/src/test/resources/mocks/disputes/post-supplyDefenseDocument-supply-defense-document-200.json @@ -0,0 +1,5 @@ +{ + "disputeServiceResult": { + "success": true + } +} \ No newline at end of file From f58a83d0ad6aa9235ec57aed2b0e19a48eb0ba45 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 13 Oct 2023 15:23:01 +0200 Subject: [PATCH 3/7] fix(deps): update dependency com.fasterxml.jackson.datatype:jackson-datatype-jsr310 to v2.15.3 (#1152) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 0e2ab6da3..c4c5f3d48 100644 --- a/pom.xml +++ b/pom.xml @@ -184,7 +184,7 @@ com.fasterxml.jackson.datatype jackson-datatype-jsr310 - 2.15.2 + 2.15.3 com.fasterxml.jackson.core From fe719ccb37ba815555e4c72356c5a178251e5a2a Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 16 Oct 2023 11:07:45 +0200 Subject: [PATCH 4/7] fix(deps): update dependency io.swagger.core.v3:swagger-annotations to v2.2.17 (#1150) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index c4c5f3d48..0ee8d4638 100644 --- a/pom.xml +++ b/pom.xml @@ -230,7 +230,7 @@ io.swagger.core.v3 swagger-annotations - 2.2.16 + 2.2.17 compile From d2500c7beacf75dcb1e285229ac92afd22648be1 Mon Sep 17 00:00:00 2001 From: jillingk <93914435+jillingk@users.noreply.github.com> Date: Mon, 16 Oct 2023 11:20:33 +0200 Subject: [PATCH 5/7] Add support for MarketPay webhooks (#1145) * added marketpay webhooks * fix imports and test * add readme * Fix UT --------- Co-authored-by: system-mr Co-authored-by: Alexandros Moraitis --- Makefile | 2 +- README.md | 17 +- .../AbstractOpenApiSchema.java | 147 +++ .../AccountCloseNotification.java | 317 ++++++ .../AccountCreateNotification.java | 317 ++++++ .../model/marketpaywebhooks/AccountEvent.java | 226 +++++ ...ccountFundsBelowThresholdNotification.java | 317 ++++++ ...undsBelowThresholdNotificationContent.java | 254 +++++ .../AccountHolderCreateNotification.java | 317 ++++++ .../AccountHolderDetails.java | 613 ++++++++++++ .../AccountHolderPayoutNotification.java | 317 ++++++ ...ccountHolderPayoutNotificationContent.java | 684 +++++++++++++ .../AccountHolderStatus.java | 304 ++++++ ...AccountHolderStatusChangeNotification.java | 317 ++++++ ...HolderStatusChangeNotificationContent.java | 264 +++++ ...ntHolderStoreStatusChangeNotification.java | 317 ++++++ ...rStoreStatusChangeNotificationContent.java | 407 ++++++++ ...untHolderUpcomingDeadlineNotification.java | 317 ++++++ ...erUpcomingDeadlineNotificationContent.java | 301 ++++++ .../AccountHolderUpdateNotification.java | 317 ++++++ ...AccountHolderVerificationNotification.java | 317 ++++++ ...HolderVerificationNotificationContent.java | 315 ++++++ .../marketpaywebhooks/AccountPayoutState.java | 284 ++++++ .../AccountProcessingState.java | 253 +++++ .../AccountUpdateNotification.java | 317 ++++++ .../adyen/model/marketpaywebhooks/Amount.java | 159 +++ .../marketpaywebhooks/BankAccountDetail.java | 906 ++++++++++++++++++ .../BeneficiarySetupNotification.java | 317 ++++++ .../BeneficiarySetupNotificationContent.java | 326 +++++++ .../marketpaywebhooks/BusinessDetails.java | 436 +++++++++ .../CloseAccountResponse.java | 302 ++++++ ...CompensateNegativeBalanceNotification.java | 317 ++++++ ...ateNegativeBalanceNotificationContent.java | 139 +++ ...sateNegativeBalanceNotificationRecord.java | 192 ++++ .../CreateAccountHolderResponse.java | 527 ++++++++++ .../CreateAccountResponse.java | 567 +++++++++++ .../DirectDebitInitiatedNotification.java | 317 ++++++ ...rectDebitInitiatedNotificationContent.java | 337 +++++++ .../marketpaywebhooks/ErrorFieldType.java | 191 ++++ .../model/marketpaywebhooks/FieldType.java | 545 +++++++++++ .../marketpaywebhooks/IndividualDetails.java | 161 ++++ .../adyen/model/marketpaywebhooks/JSON.java | 253 +++++ .../marketpaywebhooks/KYCCheckResult.java | 139 +++ .../marketpaywebhooks/KYCCheckStatusData.java | 330 +++++++ .../marketpaywebhooks/KYCCheckSummary.java | 159 +++ .../KYCLegalArrangementCheckResult.java | 170 ++++ .../KYCLegalArrangementEntityCheckResult.java | 201 ++++ .../KYCPayoutMethodCheckResult.java | 170 ++++ .../KYCShareholderCheckResult.java | 232 +++++ .../KYCSignatoryCheckResult.java | 170 ++++ .../KYCUltimateParentCompanyCheckResult.java | 170 ++++ .../KYCVerificationResult.java | 371 +++++++ .../LegalArrangementDetail.java | 494 ++++++++++ .../LegalArrangementEntityDetail.java | 538 +++++++++++ .../model/marketpaywebhooks/LocalDate.java | 159 +++ .../model/marketpaywebhooks/Message.java | 159 +++ .../NotificationErrorContainer.java | 159 +++ .../NotificationResponse.java | 128 +++ .../marketpaywebhooks/OperationStatus.java | 160 ++++ .../PaymentFailureNotification.java | 317 ++++++ .../PaymentFailureNotificationContent.java | 295 ++++++ .../model/marketpaywebhooks/PayoutMethod.java | 252 +++++ .../PayoutScheduleResponse.java | 221 +++++ .../PersonalDocumentData.java | 293 ++++++ .../RefundFundsTransferNotification.java | 317 ++++++ ...efundFundsTransferNotificationContent.java | 265 +++++ .../model/marketpaywebhooks/RefundResult.java | 191 ++++ .../ReportAvailableNotification.java | 317 ++++++ .../ReportAvailableNotificationContent.java | 253 +++++ .../ScheduledRefundsNotification.java | 317 ++++++ .../ScheduledRefundsNotificationContent.java | 273 ++++++ .../marketpaywebhooks/ShareholderContact.java | 479 +++++++++ .../marketpaywebhooks/SignatoryContact.java | 411 ++++++++ .../adyen/model/marketpaywebhooks/Split.java | 316 ++++++ .../model/marketpaywebhooks/SplitAmount.java | 159 +++ .../model/marketpaywebhooks/StoreDetail.java | 640 +++++++++++++ .../model/marketpaywebhooks/Transaction.java | 717 ++++++++++++++ .../TransferFundsNotification.java | 317 ++++++ .../TransferFundsNotificationContent.java | 327 +++++++ .../UltimateParentCompany.java | 192 ++++ .../UltimateParentCompanyBusinessDetails.java | 252 +++++ .../UpdateAccountHolderResponse.java | 496 ++++++++++ .../UpdateAccountResponse.java | 466 +++++++++ .../model/marketpaywebhooks/ViasAddress.java | 283 ++++++ .../model/marketpaywebhooks/ViasName.java | 258 +++++ .../marketpaywebhooks/ViasPersonalData.java | 201 ++++ .../marketpaywebhooks/ViasPhoneNumber.java | 229 +++++ .../ClassicPlatformWebhookHandler.java | 112 +++ src/test/java/com/adyen/WebhookTest.java | 235 ++++- 89 files changed, 26847 insertions(+), 13 deletions(-) create mode 100644 src/main/java/com/adyen/model/marketpaywebhooks/AbstractOpenApiSchema.java create mode 100644 src/main/java/com/adyen/model/marketpaywebhooks/AccountCloseNotification.java create mode 100644 src/main/java/com/adyen/model/marketpaywebhooks/AccountCreateNotification.java create mode 100644 src/main/java/com/adyen/model/marketpaywebhooks/AccountEvent.java create mode 100644 src/main/java/com/adyen/model/marketpaywebhooks/AccountFundsBelowThresholdNotification.java create mode 100644 src/main/java/com/adyen/model/marketpaywebhooks/AccountFundsBelowThresholdNotificationContent.java create mode 100644 src/main/java/com/adyen/model/marketpaywebhooks/AccountHolderCreateNotification.java create mode 100644 src/main/java/com/adyen/model/marketpaywebhooks/AccountHolderDetails.java create mode 100644 src/main/java/com/adyen/model/marketpaywebhooks/AccountHolderPayoutNotification.java create mode 100644 src/main/java/com/adyen/model/marketpaywebhooks/AccountHolderPayoutNotificationContent.java create mode 100644 src/main/java/com/adyen/model/marketpaywebhooks/AccountHolderStatus.java create mode 100644 src/main/java/com/adyen/model/marketpaywebhooks/AccountHolderStatusChangeNotification.java create mode 100644 src/main/java/com/adyen/model/marketpaywebhooks/AccountHolderStatusChangeNotificationContent.java create mode 100644 src/main/java/com/adyen/model/marketpaywebhooks/AccountHolderStoreStatusChangeNotification.java create mode 100644 src/main/java/com/adyen/model/marketpaywebhooks/AccountHolderStoreStatusChangeNotificationContent.java create mode 100644 src/main/java/com/adyen/model/marketpaywebhooks/AccountHolderUpcomingDeadlineNotification.java create mode 100644 src/main/java/com/adyen/model/marketpaywebhooks/AccountHolderUpcomingDeadlineNotificationContent.java create mode 100644 src/main/java/com/adyen/model/marketpaywebhooks/AccountHolderUpdateNotification.java create mode 100644 src/main/java/com/adyen/model/marketpaywebhooks/AccountHolderVerificationNotification.java create mode 100644 src/main/java/com/adyen/model/marketpaywebhooks/AccountHolderVerificationNotificationContent.java create mode 100644 src/main/java/com/adyen/model/marketpaywebhooks/AccountPayoutState.java create mode 100644 src/main/java/com/adyen/model/marketpaywebhooks/AccountProcessingState.java create mode 100644 src/main/java/com/adyen/model/marketpaywebhooks/AccountUpdateNotification.java create mode 100644 src/main/java/com/adyen/model/marketpaywebhooks/Amount.java create mode 100644 src/main/java/com/adyen/model/marketpaywebhooks/BankAccountDetail.java create mode 100644 src/main/java/com/adyen/model/marketpaywebhooks/BeneficiarySetupNotification.java create mode 100644 src/main/java/com/adyen/model/marketpaywebhooks/BeneficiarySetupNotificationContent.java create mode 100644 src/main/java/com/adyen/model/marketpaywebhooks/BusinessDetails.java create mode 100644 src/main/java/com/adyen/model/marketpaywebhooks/CloseAccountResponse.java create mode 100644 src/main/java/com/adyen/model/marketpaywebhooks/CompensateNegativeBalanceNotification.java create mode 100644 src/main/java/com/adyen/model/marketpaywebhooks/CompensateNegativeBalanceNotificationContent.java create mode 100644 src/main/java/com/adyen/model/marketpaywebhooks/CompensateNegativeBalanceNotificationRecord.java create mode 100644 src/main/java/com/adyen/model/marketpaywebhooks/CreateAccountHolderResponse.java create mode 100644 src/main/java/com/adyen/model/marketpaywebhooks/CreateAccountResponse.java create mode 100644 src/main/java/com/adyen/model/marketpaywebhooks/DirectDebitInitiatedNotification.java create mode 100644 src/main/java/com/adyen/model/marketpaywebhooks/DirectDebitInitiatedNotificationContent.java create mode 100644 src/main/java/com/adyen/model/marketpaywebhooks/ErrorFieldType.java create mode 100644 src/main/java/com/adyen/model/marketpaywebhooks/FieldType.java create mode 100644 src/main/java/com/adyen/model/marketpaywebhooks/IndividualDetails.java create mode 100644 src/main/java/com/adyen/model/marketpaywebhooks/JSON.java create mode 100644 src/main/java/com/adyen/model/marketpaywebhooks/KYCCheckResult.java create mode 100644 src/main/java/com/adyen/model/marketpaywebhooks/KYCCheckStatusData.java create mode 100644 src/main/java/com/adyen/model/marketpaywebhooks/KYCCheckSummary.java create mode 100644 src/main/java/com/adyen/model/marketpaywebhooks/KYCLegalArrangementCheckResult.java create mode 100644 src/main/java/com/adyen/model/marketpaywebhooks/KYCLegalArrangementEntityCheckResult.java create mode 100644 src/main/java/com/adyen/model/marketpaywebhooks/KYCPayoutMethodCheckResult.java create mode 100644 src/main/java/com/adyen/model/marketpaywebhooks/KYCShareholderCheckResult.java create mode 100644 src/main/java/com/adyen/model/marketpaywebhooks/KYCSignatoryCheckResult.java create mode 100644 src/main/java/com/adyen/model/marketpaywebhooks/KYCUltimateParentCompanyCheckResult.java create mode 100644 src/main/java/com/adyen/model/marketpaywebhooks/KYCVerificationResult.java create mode 100644 src/main/java/com/adyen/model/marketpaywebhooks/LegalArrangementDetail.java create mode 100644 src/main/java/com/adyen/model/marketpaywebhooks/LegalArrangementEntityDetail.java create mode 100644 src/main/java/com/adyen/model/marketpaywebhooks/LocalDate.java create mode 100644 src/main/java/com/adyen/model/marketpaywebhooks/Message.java create mode 100644 src/main/java/com/adyen/model/marketpaywebhooks/NotificationErrorContainer.java create mode 100644 src/main/java/com/adyen/model/marketpaywebhooks/NotificationResponse.java create mode 100644 src/main/java/com/adyen/model/marketpaywebhooks/OperationStatus.java create mode 100644 src/main/java/com/adyen/model/marketpaywebhooks/PaymentFailureNotification.java create mode 100644 src/main/java/com/adyen/model/marketpaywebhooks/PaymentFailureNotificationContent.java create mode 100644 src/main/java/com/adyen/model/marketpaywebhooks/PayoutMethod.java create mode 100644 src/main/java/com/adyen/model/marketpaywebhooks/PayoutScheduleResponse.java create mode 100644 src/main/java/com/adyen/model/marketpaywebhooks/PersonalDocumentData.java create mode 100644 src/main/java/com/adyen/model/marketpaywebhooks/RefundFundsTransferNotification.java create mode 100644 src/main/java/com/adyen/model/marketpaywebhooks/RefundFundsTransferNotificationContent.java create mode 100644 src/main/java/com/adyen/model/marketpaywebhooks/RefundResult.java create mode 100644 src/main/java/com/adyen/model/marketpaywebhooks/ReportAvailableNotification.java create mode 100644 src/main/java/com/adyen/model/marketpaywebhooks/ReportAvailableNotificationContent.java create mode 100644 src/main/java/com/adyen/model/marketpaywebhooks/ScheduledRefundsNotification.java create mode 100644 src/main/java/com/adyen/model/marketpaywebhooks/ScheduledRefundsNotificationContent.java create mode 100644 src/main/java/com/adyen/model/marketpaywebhooks/ShareholderContact.java create mode 100644 src/main/java/com/adyen/model/marketpaywebhooks/SignatoryContact.java create mode 100644 src/main/java/com/adyen/model/marketpaywebhooks/Split.java create mode 100644 src/main/java/com/adyen/model/marketpaywebhooks/SplitAmount.java create mode 100644 src/main/java/com/adyen/model/marketpaywebhooks/StoreDetail.java create mode 100644 src/main/java/com/adyen/model/marketpaywebhooks/Transaction.java create mode 100644 src/main/java/com/adyen/model/marketpaywebhooks/TransferFundsNotification.java create mode 100644 src/main/java/com/adyen/model/marketpaywebhooks/TransferFundsNotificationContent.java create mode 100644 src/main/java/com/adyen/model/marketpaywebhooks/UltimateParentCompany.java create mode 100644 src/main/java/com/adyen/model/marketpaywebhooks/UltimateParentCompanyBusinessDetails.java create mode 100644 src/main/java/com/adyen/model/marketpaywebhooks/UpdateAccountHolderResponse.java create mode 100644 src/main/java/com/adyen/model/marketpaywebhooks/UpdateAccountResponse.java create mode 100644 src/main/java/com/adyen/model/marketpaywebhooks/ViasAddress.java create mode 100644 src/main/java/com/adyen/model/marketpaywebhooks/ViasName.java create mode 100644 src/main/java/com/adyen/model/marketpaywebhooks/ViasPersonalData.java create mode 100644 src/main/java/com/adyen/model/marketpaywebhooks/ViasPhoneNumber.java create mode 100644 src/main/java/com/adyen/notification/ClassicPlatformWebhookHandler.java diff --git a/Makefile b/Makefile index 164c5d8b1..be081157d 100644 --- a/Makefile +++ b/Makefile @@ -41,7 +41,7 @@ marketpayconfiguration: spec=NotificationConfigurationService-v6 marketpayconfiguration: smallServiceName=ClassicPlatformConfigurationApi marketpayhop: spec=HopService-v6 marketpayhop: smallServiceName=ClassicPlatformHopApi -#marketpaywebhooks: spec=MarketPayNotificationService-v6 +marketpaywebhooks: spec=MarketPayNotificationService-v6 # Balance Webhooks acswebhooks: spec=BalancePlatformAcsNotification-v1 configurationwebhooks: spec=BalancePlatformConfigurationNotification-v1 diff --git a/README.md b/README.md index 988eda7cd..108327c8f 100644 --- a/README.md +++ b/README.md @@ -36,14 +36,15 @@ The Library supports all APIs under the following services: ## Supported Webhook versions The library supports all webhooks under the following model directories: -| Webhooks | Description | Model Name | Supported Version | -|---------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------|-------------------| -| [Authentication Webhooks](https://docs.adyen.com/api-explorer/acs-webhook/1/overview) | Adyen sends this webhook when the process of cardholder authentication is finalized, whether it is completed successfully, fails, or expires. | [acswebhooks](src/main/java/com/adyen/model/acswebhooks) | **v1** | -| [Configuration Webhooks](https://docs.adyen.com/api-explorer/balanceplatform-webhooks/1/overview) | You can use these webhooks to build your implementation. For example, you can use this information to update internal statuses when the status of a capability is changed. | [configurationwebhooks](src/main/java/com/adyen/model/configurationwebhooks) | **v1** | -| [Transfer Webhooks](https://docs.adyen.com/api-explorer/transfer-webhooks/3/overview) | You can use these webhooks to build your implementation. For example, you can use this information to update balances in your own dashboards or to keep track of incoming funds. | [transferwebhooks](src/main/java/com/adyen/model/transferwebhooks) | **v3** | -| [Report Webhooks](https://docs.adyen.com/api-explorer/report-webhooks/1/overview) | You can download reports programmatically by making an HTTP GET request, or manually from your Balance Platform Customer Area | [reportwebhooks](src/main/java/com/adyen/model/reportwebhooks) | **v1** | -| [Notification Webhooks](https://docs.adyen.com/api-explorer/Webhooks/1/overview) | We use webhooks to send you updates about payment status updates, newly available reports, and other events that you can subscribe to. For more information, refer to our documentation | [notification](src/main/java/com/adyen/model/notification) | **v1** | -| [Management Webhooks](https://docs.adyen.com/api-explorer/ManagementNotification/1/overview) | Adyen uses webhooks to inform your system about events that happen with your Adyen company and merchant accounts, stores, payment terminals, and payment methods when using Management API | [managementwebhooks](src/main/java/com/adyen/model/managementwebhooks) | **v1** | +| Webhooks | Description | Model Name | Supported Version | +|---------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------|-------------------| +| [Authentication Webhooks](https://docs.adyen.com/api-explorer/acs-webhook/1/overview) | Adyen sends this webhook when the process of cardholder authentication is finalized, whether it is completed successfully, fails, or expires. | [acswebhooks](src/main/java/com/adyen/model/acswebhooks) | **v1** | +| [Configuration Webhooks](https://docs.adyen.com/api-explorer/balanceplatform-webhooks/1/overview) | You can use these webhooks to build your implementation. For example, you can use this information to update internal statuses when the status of a capability is changed. | [configurationwebhooks](src/main/java/com/adyen/model/configurationwebhooks) | **v1** | +| [Transfer Webhooks](https://docs.adyen.com/api-explorer/transfer-webhooks/3/overview) | You can use these webhooks to build your implementation. For example, you can use this information to update balances in your own dashboards or to keep track of incoming funds. | [transferwebhooks](src/main/java/com/adyen/model/transferwebhooks) | **v3** | +| [Report Webhooks](https://docs.adyen.com/api-explorer/report-webhooks/1/overview) | You can download reports programmatically by making an HTTP GET request, or manually from your Balance Platform Customer Area | [reportwebhooks](src/main/java/com/adyen/model/reportwebhooks) | **v1** | +| [Notification Webhooks](https://docs.adyen.com/api-explorer/Webhooks/1/overview) | We use webhooks to send you updates about payment status updates, newly available reports, and other events that you can subscribe to. For more information, refer to our documentation | [notification](src/main/java/com/adyen/model/notification) | **v1** | +| [Management Webhooks](https://docs.adyen.com/api-explorer/ManagementNotification/1/overview) | Adyen uses webhooks to inform your system about events that happen with your Adyen company and merchant accounts, stores, payment terminals, and payment methods when using Management API | [managementwebhooks](src/main/java/com/adyen/model/managementwebhooks) | **v1** | +| [Classic Platform Webhooks](https://docs.adyen.com/api-explorer/Notification/6/overview#retry) | The Notification API sends notifications to the endpoints specified in a given subscription. Subscriptions are managed through the Notification Configuration API. The API specifications listed here detail the format of each notification. | [marketpaywebhooks](src/main/java/com/adyen/model/marketpaywebhooks) | **v6** | For more information, refer to our [documentation](https://docs.adyen.com/) or the [API Explorer](https://docs.adyen.com/api-explorer/). diff --git a/src/main/java/com/adyen/model/marketpaywebhooks/AbstractOpenApiSchema.java b/src/main/java/com/adyen/model/marketpaywebhooks/AbstractOpenApiSchema.java new file mode 100644 index 000000000..169b08efc --- /dev/null +++ b/src/main/java/com/adyen/model/marketpaywebhooks/AbstractOpenApiSchema.java @@ -0,0 +1,147 @@ +/* + * Classic Platforms - Notifications + * + * 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.marketpaywebhooks; + +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/marketpaywebhooks/AccountCloseNotification.java b/src/main/java/com/adyen/model/marketpaywebhooks/AccountCloseNotification.java new file mode 100644 index 000000000..a01acf79e --- /dev/null +++ b/src/main/java/com/adyen/model/marketpaywebhooks/AccountCloseNotification.java @@ -0,0 +1,317 @@ +/* + * Classic Platforms - Notifications + * + * 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.marketpaywebhooks; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.adyen.model.marketpaywebhooks.CloseAccountResponse; +import com.adyen.model.marketpaywebhooks.NotificationErrorContainer; +import com.fasterxml.jackson.annotation.JsonInclude; +import 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; + + +/** + * AccountCloseNotification + */ +@JsonPropertyOrder({ + AccountCloseNotification.JSON_PROPERTY_CONTENT, + AccountCloseNotification.JSON_PROPERTY_ERROR, + AccountCloseNotification.JSON_PROPERTY_EVENT_DATE, + AccountCloseNotification.JSON_PROPERTY_EVENT_TYPE, + AccountCloseNotification.JSON_PROPERTY_EXECUTING_USER_KEY, + AccountCloseNotification.JSON_PROPERTY_LIVE, + AccountCloseNotification.JSON_PROPERTY_PSP_REFERENCE +}) + +public class AccountCloseNotification { + public static final String JSON_PROPERTY_CONTENT = "content"; + private CloseAccountResponse content; + + public static final String JSON_PROPERTY_ERROR = "error"; + private NotificationErrorContainer error; + + public static final String JSON_PROPERTY_EVENT_DATE = "eventDate"; + private OffsetDateTime eventDate; + + public static final String JSON_PROPERTY_EVENT_TYPE = "eventType"; + private String eventType; + + public static final String JSON_PROPERTY_EXECUTING_USER_KEY = "executingUserKey"; + private String executingUserKey; + + public static final String JSON_PROPERTY_LIVE = "live"; + private Boolean live; + + public static final String JSON_PROPERTY_PSP_REFERENCE = "pspReference"; + private String pspReference; + + public AccountCloseNotification() { + } + + public AccountCloseNotification content(CloseAccountResponse content) { + this.content = content; + return this; + } + + /** + * Get content + * @return content + **/ + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_CONTENT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public CloseAccountResponse getContent() { + return content; + } + + + @JsonProperty(JSON_PROPERTY_CONTENT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setContent(CloseAccountResponse content) { + this.content = content; + } + + + public AccountCloseNotification error(NotificationErrorContainer error) { + this.error = error; + return this; + } + + /** + * Get error + * @return error + **/ + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_ERROR) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public NotificationErrorContainer getError() { + return error; + } + + + @JsonProperty(JSON_PROPERTY_ERROR) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setError(NotificationErrorContainer error) { + this.error = error; + } + + + public AccountCloseNotification eventDate(OffsetDateTime eventDate) { + this.eventDate = eventDate; + return this; + } + + /** + * The date and time when an event has been completed. + * @return eventDate + **/ + @ApiModelProperty(required = true, value = "The date and time when an event has been completed.") + @JsonProperty(JSON_PROPERTY_EVENT_DATE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public OffsetDateTime getEventDate() { + return eventDate; + } + + + @JsonProperty(JSON_PROPERTY_EVENT_DATE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEventDate(OffsetDateTime eventDate) { + this.eventDate = eventDate; + } + + + public AccountCloseNotification eventType(String eventType) { + this.eventType = eventType; + return this; + } + + /** + * The event type of the notification. + * @return eventType + **/ + @ApiModelProperty(required = true, value = "The event type of the notification.") + @JsonProperty(JSON_PROPERTY_EVENT_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getEventType() { + return eventType; + } + + + @JsonProperty(JSON_PROPERTY_EVENT_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEventType(String eventType) { + this.eventType = eventType; + } + + + public AccountCloseNotification executingUserKey(String executingUserKey) { + this.executingUserKey = executingUserKey; + return this; + } + + /** + * The user or process that has triggered the notification. + * @return executingUserKey + **/ + @ApiModelProperty(required = true, value = "The user or process that has triggered the notification.") + @JsonProperty(JSON_PROPERTY_EXECUTING_USER_KEY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getExecutingUserKey() { + return executingUserKey; + } + + + @JsonProperty(JSON_PROPERTY_EXECUTING_USER_KEY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setExecutingUserKey(String executingUserKey) { + this.executingUserKey = executingUserKey; + } + + + public AccountCloseNotification live(Boolean live) { + this.live = live; + return this; + } + + /** + * Indicates whether the notification originated from the live environment or the test environment. If true, the notification originated from the live environment. If false, the notification originated from the test environment. + * @return live + **/ + @ApiModelProperty(required = true, value = "Indicates whether the notification originated from the live environment or the test environment. If true, the notification originated from the live environment. If false, the notification originated from the test environment.") + @JsonProperty(JSON_PROPERTY_LIVE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getLive() { + return live; + } + + + @JsonProperty(JSON_PROPERTY_LIVE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setLive(Boolean live) { + this.live = live; + } + + + public AccountCloseNotification pspReference(String pspReference) { + this.pspReference = pspReference; + return this; + } + + /** + * The PSP reference of the request from which the notification originates. + * @return pspReference + **/ + @ApiModelProperty(required = true, value = "The PSP reference of the request from which the notification originates.") + @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; + } + + + /** + * Return true if this AccountCloseNotification object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AccountCloseNotification accountCloseNotification = (AccountCloseNotification) o; + return Objects.equals(this.content, accountCloseNotification.content) && + Objects.equals(this.error, accountCloseNotification.error) && + Objects.equals(this.eventDate, accountCloseNotification.eventDate) && + Objects.equals(this.eventType, accountCloseNotification.eventType) && + Objects.equals(this.executingUserKey, accountCloseNotification.executingUserKey) && + Objects.equals(this.live, accountCloseNotification.live) && + Objects.equals(this.pspReference, accountCloseNotification.pspReference); + } + + @Override + public int hashCode() { + return Objects.hash(content, error, eventDate, eventType, executingUserKey, live, pspReference); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AccountCloseNotification {\n"); + sb.append(" content: ").append(toIndentedString(content)).append("\n"); + sb.append(" error: ").append(toIndentedString(error)).append("\n"); + sb.append(" eventDate: ").append(toIndentedString(eventDate)).append("\n"); + sb.append(" eventType: ").append(toIndentedString(eventType)).append("\n"); + sb.append(" executingUserKey: ").append(toIndentedString(executingUserKey)).append("\n"); + sb.append(" live: ").append(toIndentedString(live)).append("\n"); + sb.append(" pspReference: ").append(toIndentedString(pspReference)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line 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 AccountCloseNotification given an JSON string + * + * @param jsonString JSON string + * @return An instance of AccountCloseNotification + * @throws JsonProcessingException if the JSON string is invalid with respect to AccountCloseNotification + */ + public static AccountCloseNotification fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, AccountCloseNotification.class); + } +/** + * Convert an instance of AccountCloseNotification 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/marketpaywebhooks/AccountCreateNotification.java b/src/main/java/com/adyen/model/marketpaywebhooks/AccountCreateNotification.java new file mode 100644 index 000000000..99f4a35e0 --- /dev/null +++ b/src/main/java/com/adyen/model/marketpaywebhooks/AccountCreateNotification.java @@ -0,0 +1,317 @@ +/* + * Classic Platforms - Notifications + * + * 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.marketpaywebhooks; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.adyen.model.marketpaywebhooks.CreateAccountResponse; +import com.adyen.model.marketpaywebhooks.NotificationErrorContainer; +import com.fasterxml.jackson.annotation.JsonInclude; +import 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; + + +/** + * AccountCreateNotification + */ +@JsonPropertyOrder({ + AccountCreateNotification.JSON_PROPERTY_CONTENT, + AccountCreateNotification.JSON_PROPERTY_ERROR, + AccountCreateNotification.JSON_PROPERTY_EVENT_DATE, + AccountCreateNotification.JSON_PROPERTY_EVENT_TYPE, + AccountCreateNotification.JSON_PROPERTY_EXECUTING_USER_KEY, + AccountCreateNotification.JSON_PROPERTY_LIVE, + AccountCreateNotification.JSON_PROPERTY_PSP_REFERENCE +}) + +public class AccountCreateNotification { + public static final String JSON_PROPERTY_CONTENT = "content"; + private CreateAccountResponse content; + + public static final String JSON_PROPERTY_ERROR = "error"; + private NotificationErrorContainer error; + + public static final String JSON_PROPERTY_EVENT_DATE = "eventDate"; + private OffsetDateTime eventDate; + + public static final String JSON_PROPERTY_EVENT_TYPE = "eventType"; + private String eventType; + + public static final String JSON_PROPERTY_EXECUTING_USER_KEY = "executingUserKey"; + private String executingUserKey; + + public static final String JSON_PROPERTY_LIVE = "live"; + private Boolean live; + + public static final String JSON_PROPERTY_PSP_REFERENCE = "pspReference"; + private String pspReference; + + public AccountCreateNotification() { + } + + public AccountCreateNotification content(CreateAccountResponse content) { + this.content = content; + return this; + } + + /** + * Get content + * @return content + **/ + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_CONTENT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public CreateAccountResponse getContent() { + return content; + } + + + @JsonProperty(JSON_PROPERTY_CONTENT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setContent(CreateAccountResponse content) { + this.content = content; + } + + + public AccountCreateNotification error(NotificationErrorContainer error) { + this.error = error; + return this; + } + + /** + * Get error + * @return error + **/ + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_ERROR) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public NotificationErrorContainer getError() { + return error; + } + + + @JsonProperty(JSON_PROPERTY_ERROR) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setError(NotificationErrorContainer error) { + this.error = error; + } + + + public AccountCreateNotification eventDate(OffsetDateTime eventDate) { + this.eventDate = eventDate; + return this; + } + + /** + * The date and time when an event has been completed. + * @return eventDate + **/ + @ApiModelProperty(required = true, value = "The date and time when an event has been completed.") + @JsonProperty(JSON_PROPERTY_EVENT_DATE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public OffsetDateTime getEventDate() { + return eventDate; + } + + + @JsonProperty(JSON_PROPERTY_EVENT_DATE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEventDate(OffsetDateTime eventDate) { + this.eventDate = eventDate; + } + + + public AccountCreateNotification eventType(String eventType) { + this.eventType = eventType; + return this; + } + + /** + * The event type of the notification. + * @return eventType + **/ + @ApiModelProperty(required = true, value = "The event type of the notification.") + @JsonProperty(JSON_PROPERTY_EVENT_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getEventType() { + return eventType; + } + + + @JsonProperty(JSON_PROPERTY_EVENT_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEventType(String eventType) { + this.eventType = eventType; + } + + + public AccountCreateNotification executingUserKey(String executingUserKey) { + this.executingUserKey = executingUserKey; + return this; + } + + /** + * The user or process that has triggered the notification. + * @return executingUserKey + **/ + @ApiModelProperty(required = true, value = "The user or process that has triggered the notification.") + @JsonProperty(JSON_PROPERTY_EXECUTING_USER_KEY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getExecutingUserKey() { + return executingUserKey; + } + + + @JsonProperty(JSON_PROPERTY_EXECUTING_USER_KEY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setExecutingUserKey(String executingUserKey) { + this.executingUserKey = executingUserKey; + } + + + public AccountCreateNotification live(Boolean live) { + this.live = live; + return this; + } + + /** + * Indicates whether the notification originated from the live environment or the test environment. If true, the notification originated from the live environment. If false, the notification originated from the test environment. + * @return live + **/ + @ApiModelProperty(required = true, value = "Indicates whether the notification originated from the live environment or the test environment. If true, the notification originated from the live environment. If false, the notification originated from the test environment.") + @JsonProperty(JSON_PROPERTY_LIVE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getLive() { + return live; + } + + + @JsonProperty(JSON_PROPERTY_LIVE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setLive(Boolean live) { + this.live = live; + } + + + public AccountCreateNotification pspReference(String pspReference) { + this.pspReference = pspReference; + return this; + } + + /** + * The PSP reference of the request from which the notification originates. + * @return pspReference + **/ + @ApiModelProperty(required = true, value = "The PSP reference of the request from which the notification originates.") + @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; + } + + + /** + * Return true if this AccountCreateNotification object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AccountCreateNotification accountCreateNotification = (AccountCreateNotification) o; + return Objects.equals(this.content, accountCreateNotification.content) && + Objects.equals(this.error, accountCreateNotification.error) && + Objects.equals(this.eventDate, accountCreateNotification.eventDate) && + Objects.equals(this.eventType, accountCreateNotification.eventType) && + Objects.equals(this.executingUserKey, accountCreateNotification.executingUserKey) && + Objects.equals(this.live, accountCreateNotification.live) && + Objects.equals(this.pspReference, accountCreateNotification.pspReference); + } + + @Override + public int hashCode() { + return Objects.hash(content, error, eventDate, eventType, executingUserKey, live, pspReference); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AccountCreateNotification {\n"); + sb.append(" content: ").append(toIndentedString(content)).append("\n"); + sb.append(" error: ").append(toIndentedString(error)).append("\n"); + sb.append(" eventDate: ").append(toIndentedString(eventDate)).append("\n"); + sb.append(" eventType: ").append(toIndentedString(eventType)).append("\n"); + sb.append(" executingUserKey: ").append(toIndentedString(executingUserKey)).append("\n"); + sb.append(" live: ").append(toIndentedString(live)).append("\n"); + sb.append(" pspReference: ").append(toIndentedString(pspReference)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line 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 AccountCreateNotification given an JSON string + * + * @param jsonString JSON string + * @return An instance of AccountCreateNotification + * @throws JsonProcessingException if the JSON string is invalid with respect to AccountCreateNotification + */ + public static AccountCreateNotification fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, AccountCreateNotification.class); + } +/** + * Convert an instance of AccountCreateNotification 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/marketpaywebhooks/AccountEvent.java b/src/main/java/com/adyen/model/marketpaywebhooks/AccountEvent.java new file mode 100644 index 000000000..cccea399d --- /dev/null +++ b/src/main/java/com/adyen/model/marketpaywebhooks/AccountEvent.java @@ -0,0 +1,226 @@ +/* + * Classic Platforms - Notifications + * + * 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.marketpaywebhooks; + +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/marketpaywebhooks/AccountFundsBelowThresholdNotification.java b/src/main/java/com/adyen/model/marketpaywebhooks/AccountFundsBelowThresholdNotification.java new file mode 100644 index 000000000..06c103cfc --- /dev/null +++ b/src/main/java/com/adyen/model/marketpaywebhooks/AccountFundsBelowThresholdNotification.java @@ -0,0 +1,317 @@ +/* + * Classic Platforms - Notifications + * + * 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.marketpaywebhooks; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.adyen.model.marketpaywebhooks.AccountFundsBelowThresholdNotificationContent; +import com.adyen.model.marketpaywebhooks.NotificationErrorContainer; +import com.fasterxml.jackson.annotation.JsonInclude; +import 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; + + +/** + * AccountFundsBelowThresholdNotification + */ +@JsonPropertyOrder({ + AccountFundsBelowThresholdNotification.JSON_PROPERTY_CONTENT, + AccountFundsBelowThresholdNotification.JSON_PROPERTY_ERROR, + AccountFundsBelowThresholdNotification.JSON_PROPERTY_EVENT_DATE, + AccountFundsBelowThresholdNotification.JSON_PROPERTY_EVENT_TYPE, + AccountFundsBelowThresholdNotification.JSON_PROPERTY_EXECUTING_USER_KEY, + AccountFundsBelowThresholdNotification.JSON_PROPERTY_LIVE, + AccountFundsBelowThresholdNotification.JSON_PROPERTY_PSP_REFERENCE +}) + +public class AccountFundsBelowThresholdNotification { + public static final String JSON_PROPERTY_CONTENT = "content"; + private AccountFundsBelowThresholdNotificationContent content; + + public static final String JSON_PROPERTY_ERROR = "error"; + private NotificationErrorContainer error; + + public static final String JSON_PROPERTY_EVENT_DATE = "eventDate"; + private OffsetDateTime eventDate; + + public static final String JSON_PROPERTY_EVENT_TYPE = "eventType"; + private String eventType; + + public static final String JSON_PROPERTY_EXECUTING_USER_KEY = "executingUserKey"; + private String executingUserKey; + + public static final String JSON_PROPERTY_LIVE = "live"; + private Boolean live; + + public static final String JSON_PROPERTY_PSP_REFERENCE = "pspReference"; + private String pspReference; + + public AccountFundsBelowThresholdNotification() { + } + + public AccountFundsBelowThresholdNotification content(AccountFundsBelowThresholdNotificationContent content) { + this.content = content; + return this; + } + + /** + * Get content + * @return content + **/ + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_CONTENT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public AccountFundsBelowThresholdNotificationContent getContent() { + return content; + } + + + @JsonProperty(JSON_PROPERTY_CONTENT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setContent(AccountFundsBelowThresholdNotificationContent content) { + this.content = content; + } + + + public AccountFundsBelowThresholdNotification error(NotificationErrorContainer error) { + this.error = error; + return this; + } + + /** + * Get error + * @return error + **/ + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_ERROR) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public NotificationErrorContainer getError() { + return error; + } + + + @JsonProperty(JSON_PROPERTY_ERROR) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setError(NotificationErrorContainer error) { + this.error = error; + } + + + public AccountFundsBelowThresholdNotification eventDate(OffsetDateTime eventDate) { + this.eventDate = eventDate; + return this; + } + + /** + * The date and time when an event has been completed. + * @return eventDate + **/ + @ApiModelProperty(required = true, value = "The date and time when an event has been completed.") + @JsonProperty(JSON_PROPERTY_EVENT_DATE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public OffsetDateTime getEventDate() { + return eventDate; + } + + + @JsonProperty(JSON_PROPERTY_EVENT_DATE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEventDate(OffsetDateTime eventDate) { + this.eventDate = eventDate; + } + + + public AccountFundsBelowThresholdNotification eventType(String eventType) { + this.eventType = eventType; + return this; + } + + /** + * The event type of the notification. + * @return eventType + **/ + @ApiModelProperty(required = true, value = "The event type of the notification.") + @JsonProperty(JSON_PROPERTY_EVENT_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getEventType() { + return eventType; + } + + + @JsonProperty(JSON_PROPERTY_EVENT_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEventType(String eventType) { + this.eventType = eventType; + } + + + public AccountFundsBelowThresholdNotification executingUserKey(String executingUserKey) { + this.executingUserKey = executingUserKey; + return this; + } + + /** + * The user or process that has triggered the notification. + * @return executingUserKey + **/ + @ApiModelProperty(required = true, value = "The user or process that has triggered the notification.") + @JsonProperty(JSON_PROPERTY_EXECUTING_USER_KEY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getExecutingUserKey() { + return executingUserKey; + } + + + @JsonProperty(JSON_PROPERTY_EXECUTING_USER_KEY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setExecutingUserKey(String executingUserKey) { + this.executingUserKey = executingUserKey; + } + + + public AccountFundsBelowThresholdNotification live(Boolean live) { + this.live = live; + return this; + } + + /** + * Indicates whether the notification originated from the live environment or the test environment. If true, the notification originated from the live environment. If false, the notification originated from the test environment. + * @return live + **/ + @ApiModelProperty(required = true, value = "Indicates whether the notification originated from the live environment or the test environment. If true, the notification originated from the live environment. If false, the notification originated from the test environment.") + @JsonProperty(JSON_PROPERTY_LIVE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getLive() { + return live; + } + + + @JsonProperty(JSON_PROPERTY_LIVE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setLive(Boolean live) { + this.live = live; + } + + + public AccountFundsBelowThresholdNotification pspReference(String pspReference) { + this.pspReference = pspReference; + return this; + } + + /** + * The PSP reference of the request from which the notification originates. + * @return pspReference + **/ + @ApiModelProperty(required = true, value = "The PSP reference of the request from which the notification originates.") + @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; + } + + + /** + * Return true if this AccountFundsBelowThresholdNotification object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AccountFundsBelowThresholdNotification accountFundsBelowThresholdNotification = (AccountFundsBelowThresholdNotification) o; + return Objects.equals(this.content, accountFundsBelowThresholdNotification.content) && + Objects.equals(this.error, accountFundsBelowThresholdNotification.error) && + Objects.equals(this.eventDate, accountFundsBelowThresholdNotification.eventDate) && + Objects.equals(this.eventType, accountFundsBelowThresholdNotification.eventType) && + Objects.equals(this.executingUserKey, accountFundsBelowThresholdNotification.executingUserKey) && + Objects.equals(this.live, accountFundsBelowThresholdNotification.live) && + Objects.equals(this.pspReference, accountFundsBelowThresholdNotification.pspReference); + } + + @Override + public int hashCode() { + return Objects.hash(content, error, eventDate, eventType, executingUserKey, live, pspReference); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AccountFundsBelowThresholdNotification {\n"); + sb.append(" content: ").append(toIndentedString(content)).append("\n"); + sb.append(" error: ").append(toIndentedString(error)).append("\n"); + sb.append(" eventDate: ").append(toIndentedString(eventDate)).append("\n"); + sb.append(" eventType: ").append(toIndentedString(eventType)).append("\n"); + sb.append(" executingUserKey: ").append(toIndentedString(executingUserKey)).append("\n"); + sb.append(" live: ").append(toIndentedString(live)).append("\n"); + sb.append(" pspReference: ").append(toIndentedString(pspReference)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line 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 AccountFundsBelowThresholdNotification given an JSON string + * + * @param jsonString JSON string + * @return An instance of AccountFundsBelowThresholdNotification + * @throws JsonProcessingException if the JSON string is invalid with respect to AccountFundsBelowThresholdNotification + */ + public static AccountFundsBelowThresholdNotification fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, AccountFundsBelowThresholdNotification.class); + } +/** + * Convert an instance of AccountFundsBelowThresholdNotification 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/marketpaywebhooks/AccountFundsBelowThresholdNotificationContent.java b/src/main/java/com/adyen/model/marketpaywebhooks/AccountFundsBelowThresholdNotificationContent.java new file mode 100644 index 000000000..2460f3909 --- /dev/null +++ b/src/main/java/com/adyen/model/marketpaywebhooks/AccountFundsBelowThresholdNotificationContent.java @@ -0,0 +1,254 @@ +/* + * Classic Platforms - Notifications + * + * 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.marketpaywebhooks; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.adyen.model.marketpaywebhooks.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.time.LocalDate; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.core.JsonProcessingException; + + +/** + * AccountFundsBelowThresholdNotificationContent + */ +@JsonPropertyOrder({ + AccountFundsBelowThresholdNotificationContent.JSON_PROPERTY_ACCOUNT_CODE, + AccountFundsBelowThresholdNotificationContent.JSON_PROPERTY_BALANCE_DATE, + AccountFundsBelowThresholdNotificationContent.JSON_PROPERTY_CURRENT_FUNDS, + AccountFundsBelowThresholdNotificationContent.JSON_PROPERTY_FUND_THRESHOLD, + AccountFundsBelowThresholdNotificationContent.JSON_PROPERTY_MERCHANT_ACCOUNT_CODE +}) + +public class AccountFundsBelowThresholdNotificationContent { + public static final String JSON_PROPERTY_ACCOUNT_CODE = "accountCode"; + private String accountCode; + + public static final String JSON_PROPERTY_BALANCE_DATE = "balanceDate"; + private LocalDate balanceDate; + + public static final String JSON_PROPERTY_CURRENT_FUNDS = "currentFunds"; + private Amount currentFunds; + + public static final String JSON_PROPERTY_FUND_THRESHOLD = "fundThreshold"; + private Amount fundThreshold; + + public static final String JSON_PROPERTY_MERCHANT_ACCOUNT_CODE = "merchantAccountCode"; + private String merchantAccountCode; + + public AccountFundsBelowThresholdNotificationContent() { + } + + public AccountFundsBelowThresholdNotificationContent accountCode(String accountCode) { + this.accountCode = accountCode; + return this; + } + + /** + * The code of the account with funds under threshold + * @return accountCode + **/ + @ApiModelProperty(value = "The code of the account with funds under threshold") + @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 AccountFundsBelowThresholdNotificationContent balanceDate(LocalDate balanceDate) { + this.balanceDate = balanceDate; + return this; + } + + /** + * Get balanceDate + * @return balanceDate + **/ + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_BALANCE_DATE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public LocalDate getBalanceDate() { + return balanceDate; + } + + + @JsonProperty(JSON_PROPERTY_BALANCE_DATE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setBalanceDate(LocalDate balanceDate) { + this.balanceDate = balanceDate; + } + + + public AccountFundsBelowThresholdNotificationContent currentFunds(Amount currentFunds) { + this.currentFunds = currentFunds; + return this; + } + + /** + * Get currentFunds + * @return currentFunds + **/ + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_CURRENT_FUNDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Amount getCurrentFunds() { + return currentFunds; + } + + + @JsonProperty(JSON_PROPERTY_CURRENT_FUNDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCurrentFunds(Amount currentFunds) { + this.currentFunds = currentFunds; + } + + + public AccountFundsBelowThresholdNotificationContent fundThreshold(Amount fundThreshold) { + this.fundThreshold = fundThreshold; + return this; + } + + /** + * Get fundThreshold + * @return fundThreshold + **/ + @ApiModelProperty(required = true, value = "") + @JsonProperty(JSON_PROPERTY_FUND_THRESHOLD) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Amount getFundThreshold() { + return fundThreshold; + } + + + @JsonProperty(JSON_PROPERTY_FUND_THRESHOLD) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setFundThreshold(Amount fundThreshold) { + this.fundThreshold = fundThreshold; + } + + + public AccountFundsBelowThresholdNotificationContent merchantAccountCode(String merchantAccountCode) { + this.merchantAccountCode = merchantAccountCode; + return this; + } + + /** + * The code of the merchant account. + * @return merchantAccountCode + **/ + @ApiModelProperty(required = true, value = "The code of the merchant account.") + @JsonProperty(JSON_PROPERTY_MERCHANT_ACCOUNT_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getMerchantAccountCode() { + return merchantAccountCode; + } + + + @JsonProperty(JSON_PROPERTY_MERCHANT_ACCOUNT_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMerchantAccountCode(String merchantAccountCode) { + this.merchantAccountCode = merchantAccountCode; + } + + + /** + * Return true if this AccountFundsBelowThresholdNotificationContent object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AccountFundsBelowThresholdNotificationContent accountFundsBelowThresholdNotificationContent = (AccountFundsBelowThresholdNotificationContent) o; + return Objects.equals(this.accountCode, accountFundsBelowThresholdNotificationContent.accountCode) && + Objects.equals(this.balanceDate, accountFundsBelowThresholdNotificationContent.balanceDate) && + Objects.equals(this.currentFunds, accountFundsBelowThresholdNotificationContent.currentFunds) && + Objects.equals(this.fundThreshold, accountFundsBelowThresholdNotificationContent.fundThreshold) && + Objects.equals(this.merchantAccountCode, accountFundsBelowThresholdNotificationContent.merchantAccountCode); + } + + @Override + public int hashCode() { + return Objects.hash(accountCode, balanceDate, currentFunds, fundThreshold, merchantAccountCode); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AccountFundsBelowThresholdNotificationContent {\n"); + sb.append(" accountCode: ").append(toIndentedString(accountCode)).append("\n"); + sb.append(" balanceDate: ").append(toIndentedString(balanceDate)).append("\n"); + sb.append(" currentFunds: ").append(toIndentedString(currentFunds)).append("\n"); + sb.append(" fundThreshold: ").append(toIndentedString(fundThreshold)).append("\n"); + sb.append(" merchantAccountCode: ").append(toIndentedString(merchantAccountCode)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line 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 AccountFundsBelowThresholdNotificationContent given an JSON string + * + * @param jsonString JSON string + * @return An instance of AccountFundsBelowThresholdNotificationContent + * @throws JsonProcessingException if the JSON string is invalid with respect to AccountFundsBelowThresholdNotificationContent + */ + public static AccountFundsBelowThresholdNotificationContent fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, AccountFundsBelowThresholdNotificationContent.class); + } +/** + * Convert an instance of AccountFundsBelowThresholdNotificationContent 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/marketpaywebhooks/AccountHolderCreateNotification.java b/src/main/java/com/adyen/model/marketpaywebhooks/AccountHolderCreateNotification.java new file mode 100644 index 000000000..20e086d67 --- /dev/null +++ b/src/main/java/com/adyen/model/marketpaywebhooks/AccountHolderCreateNotification.java @@ -0,0 +1,317 @@ +/* + * Classic Platforms - Notifications + * + * 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.marketpaywebhooks; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.adyen.model.marketpaywebhooks.CreateAccountHolderResponse; +import com.adyen.model.marketpaywebhooks.NotificationErrorContainer; +import com.fasterxml.jackson.annotation.JsonInclude; +import 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; + + +/** + * AccountHolderCreateNotification + */ +@JsonPropertyOrder({ + AccountHolderCreateNotification.JSON_PROPERTY_CONTENT, + AccountHolderCreateNotification.JSON_PROPERTY_ERROR, + AccountHolderCreateNotification.JSON_PROPERTY_EVENT_DATE, + AccountHolderCreateNotification.JSON_PROPERTY_EVENT_TYPE, + AccountHolderCreateNotification.JSON_PROPERTY_EXECUTING_USER_KEY, + AccountHolderCreateNotification.JSON_PROPERTY_LIVE, + AccountHolderCreateNotification.JSON_PROPERTY_PSP_REFERENCE +}) + +public class AccountHolderCreateNotification { + public static final String JSON_PROPERTY_CONTENT = "content"; + private CreateAccountHolderResponse content; + + public static final String JSON_PROPERTY_ERROR = "error"; + private NotificationErrorContainer error; + + public static final String JSON_PROPERTY_EVENT_DATE = "eventDate"; + private OffsetDateTime eventDate; + + public static final String JSON_PROPERTY_EVENT_TYPE = "eventType"; + private String eventType; + + public static final String JSON_PROPERTY_EXECUTING_USER_KEY = "executingUserKey"; + private String executingUserKey; + + public static final String JSON_PROPERTY_LIVE = "live"; + private Boolean live; + + public static final String JSON_PROPERTY_PSP_REFERENCE = "pspReference"; + private String pspReference; + + public AccountHolderCreateNotification() { + } + + public AccountHolderCreateNotification content(CreateAccountHolderResponse content) { + this.content = content; + return this; + } + + /** + * Get content + * @return content + **/ + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_CONTENT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public CreateAccountHolderResponse getContent() { + return content; + } + + + @JsonProperty(JSON_PROPERTY_CONTENT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setContent(CreateAccountHolderResponse content) { + this.content = content; + } + + + public AccountHolderCreateNotification error(NotificationErrorContainer error) { + this.error = error; + return this; + } + + /** + * Get error + * @return error + **/ + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_ERROR) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public NotificationErrorContainer getError() { + return error; + } + + + @JsonProperty(JSON_PROPERTY_ERROR) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setError(NotificationErrorContainer error) { + this.error = error; + } + + + public AccountHolderCreateNotification eventDate(OffsetDateTime eventDate) { + this.eventDate = eventDate; + return this; + } + + /** + * The date and time when an event has been completed. + * @return eventDate + **/ + @ApiModelProperty(required = true, value = "The date and time when an event has been completed.") + @JsonProperty(JSON_PROPERTY_EVENT_DATE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public OffsetDateTime getEventDate() { + return eventDate; + } + + + @JsonProperty(JSON_PROPERTY_EVENT_DATE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEventDate(OffsetDateTime eventDate) { + this.eventDate = eventDate; + } + + + public AccountHolderCreateNotification eventType(String eventType) { + this.eventType = eventType; + return this; + } + + /** + * The event type of the notification. + * @return eventType + **/ + @ApiModelProperty(required = true, value = "The event type of the notification.") + @JsonProperty(JSON_PROPERTY_EVENT_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getEventType() { + return eventType; + } + + + @JsonProperty(JSON_PROPERTY_EVENT_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEventType(String eventType) { + this.eventType = eventType; + } + + + public AccountHolderCreateNotification executingUserKey(String executingUserKey) { + this.executingUserKey = executingUserKey; + return this; + } + + /** + * The user or process that has triggered the notification. + * @return executingUserKey + **/ + @ApiModelProperty(required = true, value = "The user or process that has triggered the notification.") + @JsonProperty(JSON_PROPERTY_EXECUTING_USER_KEY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getExecutingUserKey() { + return executingUserKey; + } + + + @JsonProperty(JSON_PROPERTY_EXECUTING_USER_KEY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setExecutingUserKey(String executingUserKey) { + this.executingUserKey = executingUserKey; + } + + + public AccountHolderCreateNotification live(Boolean live) { + this.live = live; + return this; + } + + /** + * Indicates whether the notification originated from the live environment or the test environment. If true, the notification originated from the live environment. If false, the notification originated from the test environment. + * @return live + **/ + @ApiModelProperty(required = true, value = "Indicates whether the notification originated from the live environment or the test environment. If true, the notification originated from the live environment. If false, the notification originated from the test environment.") + @JsonProperty(JSON_PROPERTY_LIVE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getLive() { + return live; + } + + + @JsonProperty(JSON_PROPERTY_LIVE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setLive(Boolean live) { + this.live = live; + } + + + public AccountHolderCreateNotification pspReference(String pspReference) { + this.pspReference = pspReference; + return this; + } + + /** + * The PSP reference of the request from which the notification originates. + * @return pspReference + **/ + @ApiModelProperty(required = true, value = "The PSP reference of the request from which the notification originates.") + @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; + } + + + /** + * Return true if this AccountHolderCreateNotification object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AccountHolderCreateNotification accountHolderCreateNotification = (AccountHolderCreateNotification) o; + return Objects.equals(this.content, accountHolderCreateNotification.content) && + Objects.equals(this.error, accountHolderCreateNotification.error) && + Objects.equals(this.eventDate, accountHolderCreateNotification.eventDate) && + Objects.equals(this.eventType, accountHolderCreateNotification.eventType) && + Objects.equals(this.executingUserKey, accountHolderCreateNotification.executingUserKey) && + Objects.equals(this.live, accountHolderCreateNotification.live) && + Objects.equals(this.pspReference, accountHolderCreateNotification.pspReference); + } + + @Override + public int hashCode() { + return Objects.hash(content, error, eventDate, eventType, executingUserKey, live, pspReference); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AccountHolderCreateNotification {\n"); + sb.append(" content: ").append(toIndentedString(content)).append("\n"); + sb.append(" error: ").append(toIndentedString(error)).append("\n"); + sb.append(" eventDate: ").append(toIndentedString(eventDate)).append("\n"); + sb.append(" eventType: ").append(toIndentedString(eventType)).append("\n"); + sb.append(" executingUserKey: ").append(toIndentedString(executingUserKey)).append("\n"); + sb.append(" live: ").append(toIndentedString(live)).append("\n"); + sb.append(" pspReference: ").append(toIndentedString(pspReference)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line 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 AccountHolderCreateNotification given an JSON string + * + * @param jsonString JSON string + * @return An instance of AccountHolderCreateNotification + * @throws JsonProcessingException if the JSON string is invalid with respect to AccountHolderCreateNotification + */ + public static AccountHolderCreateNotification fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, AccountHolderCreateNotification.class); + } +/** + * Convert an instance of AccountHolderCreateNotification 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/marketpaywebhooks/AccountHolderDetails.java b/src/main/java/com/adyen/model/marketpaywebhooks/AccountHolderDetails.java new file mode 100644 index 000000000..0a9812fd5 --- /dev/null +++ b/src/main/java/com/adyen/model/marketpaywebhooks/AccountHolderDetails.java @@ -0,0 +1,613 @@ +/* + * Classic Platforms - Notifications + * + * 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.marketpaywebhooks; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.adyen.model.marketpaywebhooks.BankAccountDetail; +import com.adyen.model.marketpaywebhooks.BusinessDetails; +import com.adyen.model.marketpaywebhooks.IndividualDetails; +import com.adyen.model.marketpaywebhooks.LegalArrangementDetail; +import com.adyen.model.marketpaywebhooks.PayoutMethod; +import com.adyen.model.marketpaywebhooks.StoreDetail; +import com.adyen.model.marketpaywebhooks.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/marketpaywebhooks/AccountHolderPayoutNotification.java b/src/main/java/com/adyen/model/marketpaywebhooks/AccountHolderPayoutNotification.java new file mode 100644 index 000000000..4fababd59 --- /dev/null +++ b/src/main/java/com/adyen/model/marketpaywebhooks/AccountHolderPayoutNotification.java @@ -0,0 +1,317 @@ +/* + * Classic Platforms - Notifications + * + * 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.marketpaywebhooks; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.adyen.model.marketpaywebhooks.AccountHolderPayoutNotificationContent; +import com.adyen.model.marketpaywebhooks.NotificationErrorContainer; +import com.fasterxml.jackson.annotation.JsonInclude; +import 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; + + +/** + * AccountHolderPayoutNotification + */ +@JsonPropertyOrder({ + AccountHolderPayoutNotification.JSON_PROPERTY_CONTENT, + AccountHolderPayoutNotification.JSON_PROPERTY_ERROR, + AccountHolderPayoutNotification.JSON_PROPERTY_EVENT_DATE, + AccountHolderPayoutNotification.JSON_PROPERTY_EVENT_TYPE, + AccountHolderPayoutNotification.JSON_PROPERTY_EXECUTING_USER_KEY, + AccountHolderPayoutNotification.JSON_PROPERTY_LIVE, + AccountHolderPayoutNotification.JSON_PROPERTY_PSP_REFERENCE +}) + +public class AccountHolderPayoutNotification { + public static final String JSON_PROPERTY_CONTENT = "content"; + private AccountHolderPayoutNotificationContent content; + + public static final String JSON_PROPERTY_ERROR = "error"; + private NotificationErrorContainer error; + + public static final String JSON_PROPERTY_EVENT_DATE = "eventDate"; + private OffsetDateTime eventDate; + + public static final String JSON_PROPERTY_EVENT_TYPE = "eventType"; + private String eventType; + + public static final String JSON_PROPERTY_EXECUTING_USER_KEY = "executingUserKey"; + private String executingUserKey; + + public static final String JSON_PROPERTY_LIVE = "live"; + private Boolean live; + + public static final String JSON_PROPERTY_PSP_REFERENCE = "pspReference"; + private String pspReference; + + public AccountHolderPayoutNotification() { + } + + public AccountHolderPayoutNotification content(AccountHolderPayoutNotificationContent content) { + this.content = content; + return this; + } + + /** + * Get content + * @return content + **/ + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_CONTENT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public AccountHolderPayoutNotificationContent getContent() { + return content; + } + + + @JsonProperty(JSON_PROPERTY_CONTENT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setContent(AccountHolderPayoutNotificationContent content) { + this.content = content; + } + + + public AccountHolderPayoutNotification error(NotificationErrorContainer error) { + this.error = error; + return this; + } + + /** + * Get error + * @return error + **/ + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_ERROR) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public NotificationErrorContainer getError() { + return error; + } + + + @JsonProperty(JSON_PROPERTY_ERROR) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setError(NotificationErrorContainer error) { + this.error = error; + } + + + public AccountHolderPayoutNotification eventDate(OffsetDateTime eventDate) { + this.eventDate = eventDate; + return this; + } + + /** + * The date and time when an event has been completed. + * @return eventDate + **/ + @ApiModelProperty(required = true, value = "The date and time when an event has been completed.") + @JsonProperty(JSON_PROPERTY_EVENT_DATE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public OffsetDateTime getEventDate() { + return eventDate; + } + + + @JsonProperty(JSON_PROPERTY_EVENT_DATE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEventDate(OffsetDateTime eventDate) { + this.eventDate = eventDate; + } + + + public AccountHolderPayoutNotification eventType(String eventType) { + this.eventType = eventType; + return this; + } + + /** + * The event type of the notification. + * @return eventType + **/ + @ApiModelProperty(required = true, value = "The event type of the notification.") + @JsonProperty(JSON_PROPERTY_EVENT_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getEventType() { + return eventType; + } + + + @JsonProperty(JSON_PROPERTY_EVENT_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEventType(String eventType) { + this.eventType = eventType; + } + + + public AccountHolderPayoutNotification executingUserKey(String executingUserKey) { + this.executingUserKey = executingUserKey; + return this; + } + + /** + * The user or process that has triggered the notification. + * @return executingUserKey + **/ + @ApiModelProperty(required = true, value = "The user or process that has triggered the notification.") + @JsonProperty(JSON_PROPERTY_EXECUTING_USER_KEY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getExecutingUserKey() { + return executingUserKey; + } + + + @JsonProperty(JSON_PROPERTY_EXECUTING_USER_KEY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setExecutingUserKey(String executingUserKey) { + this.executingUserKey = executingUserKey; + } + + + public AccountHolderPayoutNotification live(Boolean live) { + this.live = live; + return this; + } + + /** + * Indicates whether the notification originated from the live environment or the test environment. If true, the notification originated from the live environment. If false, the notification originated from the test environment. + * @return live + **/ + @ApiModelProperty(required = true, value = "Indicates whether the notification originated from the live environment or the test environment. If true, the notification originated from the live environment. If false, the notification originated from the test environment.") + @JsonProperty(JSON_PROPERTY_LIVE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getLive() { + return live; + } + + + @JsonProperty(JSON_PROPERTY_LIVE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setLive(Boolean live) { + this.live = live; + } + + + public AccountHolderPayoutNotification pspReference(String pspReference) { + this.pspReference = pspReference; + return this; + } + + /** + * The PSP reference of the request from which the notification originates. + * @return pspReference + **/ + @ApiModelProperty(required = true, value = "The PSP reference of the request from which the notification originates.") + @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; + } + + + /** + * Return true if this AccountHolderPayoutNotification object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AccountHolderPayoutNotification accountHolderPayoutNotification = (AccountHolderPayoutNotification) o; + return Objects.equals(this.content, accountHolderPayoutNotification.content) && + Objects.equals(this.error, accountHolderPayoutNotification.error) && + Objects.equals(this.eventDate, accountHolderPayoutNotification.eventDate) && + Objects.equals(this.eventType, accountHolderPayoutNotification.eventType) && + Objects.equals(this.executingUserKey, accountHolderPayoutNotification.executingUserKey) && + Objects.equals(this.live, accountHolderPayoutNotification.live) && + Objects.equals(this.pspReference, accountHolderPayoutNotification.pspReference); + } + + @Override + public int hashCode() { + return Objects.hash(content, error, eventDate, eventType, executingUserKey, live, pspReference); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AccountHolderPayoutNotification {\n"); + sb.append(" content: ").append(toIndentedString(content)).append("\n"); + sb.append(" error: ").append(toIndentedString(error)).append("\n"); + sb.append(" eventDate: ").append(toIndentedString(eventDate)).append("\n"); + sb.append(" eventType: ").append(toIndentedString(eventType)).append("\n"); + sb.append(" executingUserKey: ").append(toIndentedString(executingUserKey)).append("\n"); + sb.append(" live: ").append(toIndentedString(live)).append("\n"); + sb.append(" pspReference: ").append(toIndentedString(pspReference)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line 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 AccountHolderPayoutNotification given an JSON string + * + * @param jsonString JSON string + * @return An instance of AccountHolderPayoutNotification + * @throws JsonProcessingException if the JSON string is invalid with respect to AccountHolderPayoutNotification + */ + public static AccountHolderPayoutNotification fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, AccountHolderPayoutNotification.class); + } +/** + * Convert an instance of AccountHolderPayoutNotification 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/marketpaywebhooks/AccountHolderPayoutNotificationContent.java b/src/main/java/com/adyen/model/marketpaywebhooks/AccountHolderPayoutNotificationContent.java new file mode 100644 index 000000000..31bbba685 --- /dev/null +++ b/src/main/java/com/adyen/model/marketpaywebhooks/AccountHolderPayoutNotificationContent.java @@ -0,0 +1,684 @@ +/* + * Classic Platforms - Notifications + * + * 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.marketpaywebhooks; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.adyen.model.marketpaywebhooks.Amount; +import com.adyen.model.marketpaywebhooks.BankAccountDetail; +import com.adyen.model.marketpaywebhooks.ErrorFieldType; +import com.adyen.model.marketpaywebhooks.OperationStatus; +import com.fasterxml.jackson.annotation.JsonInclude; +import 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.LocalDate; +import java.util.ArrayList; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.core.JsonProcessingException; + + +/** + * AccountHolderPayoutNotificationContent + */ +@JsonPropertyOrder({ + AccountHolderPayoutNotificationContent.JSON_PROPERTY_ACCOUNT_CODE, + AccountHolderPayoutNotificationContent.JSON_PROPERTY_ACCOUNT_HOLDER_CODE, + AccountHolderPayoutNotificationContent.JSON_PROPERTY_AMOUNTS, + AccountHolderPayoutNotificationContent.JSON_PROPERTY_BANK_ACCOUNT_DETAIL, + AccountHolderPayoutNotificationContent.JSON_PROPERTY_DESCRIPTION, + AccountHolderPayoutNotificationContent.JSON_PROPERTY_ESTIMATED_ARRIVAL_DATE, + AccountHolderPayoutNotificationContent.JSON_PROPERTY_INVALID_FIELDS, + AccountHolderPayoutNotificationContent.JSON_PROPERTY_MERCHANT_REFERENCE, + AccountHolderPayoutNotificationContent.JSON_PROPERTY_ORIGINAL_PSP_REFERENCE, + AccountHolderPayoutNotificationContent.JSON_PROPERTY_PAYOUT_ACCOUNT_COUNTRY, + AccountHolderPayoutNotificationContent.JSON_PROPERTY_PAYOUT_ACCOUNT_NUMBER, + AccountHolderPayoutNotificationContent.JSON_PROPERTY_PAYOUT_BALANCE_ACCOUNT_ID, + AccountHolderPayoutNotificationContent.JSON_PROPERTY_PAYOUT_BANK_NAME, + AccountHolderPayoutNotificationContent.JSON_PROPERTY_PAYOUT_BRANCH_CODE, + AccountHolderPayoutNotificationContent.JSON_PROPERTY_PAYOUT_REFERENCE, + AccountHolderPayoutNotificationContent.JSON_PROPERTY_PAYOUT_SPEED, + AccountHolderPayoutNotificationContent.JSON_PROPERTY_STATUS +}) + +public class AccountHolderPayoutNotificationContent { + 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_AMOUNTS = "amounts"; + private List amounts = null; + + public static final String JSON_PROPERTY_BANK_ACCOUNT_DETAIL = "bankAccountDetail"; + private BankAccountDetail bankAccountDetail; + + public static final String JSON_PROPERTY_DESCRIPTION = "description"; + private String description; + + public static final String JSON_PROPERTY_ESTIMATED_ARRIVAL_DATE = "estimatedArrivalDate"; + private LocalDate estimatedArrivalDate; + + 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_ORIGINAL_PSP_REFERENCE = "originalPspReference"; + private String originalPspReference; + + public static final String JSON_PROPERTY_PAYOUT_ACCOUNT_COUNTRY = "payoutAccountCountry"; + private String payoutAccountCountry; + + public static final String JSON_PROPERTY_PAYOUT_ACCOUNT_NUMBER = "payoutAccountNumber"; + private String payoutAccountNumber; + + public static final String JSON_PROPERTY_PAYOUT_BALANCE_ACCOUNT_ID = "payoutBalanceAccountId"; + private String payoutBalanceAccountId; + + public static final String JSON_PROPERTY_PAYOUT_BANK_NAME = "payoutBankName"; + private String payoutBankName; + + public static final String JSON_PROPERTY_PAYOUT_BRANCH_CODE = "payoutBranchCode"; + private String payoutBranchCode; + + public static final String JSON_PROPERTY_PAYOUT_REFERENCE = "payoutReference"; + private Long payoutReference; + + /** + * 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 OperationStatus status; + + public AccountHolderPayoutNotificationContent() { + } + + public AccountHolderPayoutNotificationContent accountCode(String accountCode) { + this.accountCode = accountCode; + return this; + } + + /** + * The code of the account from which the payout was made. + * @return accountCode + **/ + @ApiModelProperty(value = "The code of the account from which the payout was 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 AccountHolderPayoutNotificationContent accountHolderCode(String accountHolderCode) { + this.accountHolderCode = accountHolderCode; + return this; + } + + /** + * The code of the Account Holder to which the payout was made. + * @return accountHolderCode + **/ + @ApiModelProperty(value = "The code of the Account Holder to which the payout was 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 AccountHolderPayoutNotificationContent amounts(List amounts) { + this.amounts = amounts; + return this; + } + + public AccountHolderPayoutNotificationContent addAmountsItem(Amount amountsItem) { + if (this.amounts == null) { + this.amounts = new ArrayList<>(); + } + this.amounts.add(amountsItem); + return this; + } + + /** + * The payout amounts (per currency). + * @return amounts + **/ + @ApiModelProperty(value = "The payout amounts (per currency).") + @JsonProperty(JSON_PROPERTY_AMOUNTS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getAmounts() { + return amounts; + } + + + @JsonProperty(JSON_PROPERTY_AMOUNTS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAmounts(List amounts) { + this.amounts = amounts; + } + + + public AccountHolderPayoutNotificationContent 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 AccountHolderPayoutNotificationContent description(String description) { + this.description = description; + return this; + } + + /** + * A description of the payout. + * @return description + **/ + @ApiModelProperty(value = "A description of the payout.") + @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 AccountHolderPayoutNotificationContent estimatedArrivalDate(LocalDate estimatedArrivalDate) { + this.estimatedArrivalDate = estimatedArrivalDate; + return this; + } + + /** + * Get estimatedArrivalDate + * @return estimatedArrivalDate + **/ + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_ESTIMATED_ARRIVAL_DATE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public LocalDate getEstimatedArrivalDate() { + return estimatedArrivalDate; + } + + + @JsonProperty(JSON_PROPERTY_ESTIMATED_ARRIVAL_DATE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEstimatedArrivalDate(LocalDate estimatedArrivalDate) { + this.estimatedArrivalDate = estimatedArrivalDate; + } + + + public AccountHolderPayoutNotificationContent invalidFields(List invalidFields) { + this.invalidFields = invalidFields; + return this; + } + + public AccountHolderPayoutNotificationContent addInvalidFieldsItem(ErrorFieldType invalidFieldsItem) { + if (this.invalidFields == null) { + this.invalidFields = new ArrayList<>(); + } + this.invalidFields.add(invalidFieldsItem); + return this; + } + + /** + * Invalid fields list. + * @return invalidFields + **/ + @ApiModelProperty(value = "Invalid fields list.") + @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 AccountHolderPayoutNotificationContent merchantReference(String merchantReference) { + this.merchantReference = merchantReference; + return this; + } + + /** + * The merchant reference. + * @return merchantReference + **/ + @ApiModelProperty(value = "The merchant reference.") + @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 AccountHolderPayoutNotificationContent originalPspReference(String originalPspReference) { + this.originalPspReference = originalPspReference; + return this; + } + + /** + * The PSP reference of the original payout. + * @return originalPspReference + **/ + @ApiModelProperty(value = "The PSP reference of the original payout.") + @JsonProperty(JSON_PROPERTY_ORIGINAL_PSP_REFERENCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getOriginalPspReference() { + return originalPspReference; + } + + + @JsonProperty(JSON_PROPERTY_ORIGINAL_PSP_REFERENCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setOriginalPspReference(String originalPspReference) { + this.originalPspReference = originalPspReference; + } + + + public AccountHolderPayoutNotificationContent payoutAccountCountry(String payoutAccountCountry) { + this.payoutAccountCountry = payoutAccountCountry; + return this; + } + + /** + * The country code of the bank from which the payout was initiated. + * @return payoutAccountCountry + **/ + @ApiModelProperty(value = "The country code of the bank from which the payout was initiated.") + @JsonProperty(JSON_PROPERTY_PAYOUT_ACCOUNT_COUNTRY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getPayoutAccountCountry() { + return payoutAccountCountry; + } + + + @JsonProperty(JSON_PROPERTY_PAYOUT_ACCOUNT_COUNTRY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPayoutAccountCountry(String payoutAccountCountry) { + this.payoutAccountCountry = payoutAccountCountry; + } + + + public AccountHolderPayoutNotificationContent payoutAccountNumber(String payoutAccountNumber) { + this.payoutAccountNumber = payoutAccountNumber; + return this; + } + + /** + * The account number of the bank from which the payout was initiated. + * @return payoutAccountNumber + **/ + @ApiModelProperty(value = "The account number of the bank from which the payout was initiated.") + @JsonProperty(JSON_PROPERTY_PAYOUT_ACCOUNT_NUMBER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getPayoutAccountNumber() { + return payoutAccountNumber; + } + + + @JsonProperty(JSON_PROPERTY_PAYOUT_ACCOUNT_NUMBER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPayoutAccountNumber(String payoutAccountNumber) { + this.payoutAccountNumber = payoutAccountNumber; + } + + + public AccountHolderPayoutNotificationContent payoutBalanceAccountId(String payoutBalanceAccountId) { + this.payoutBalanceAccountId = payoutBalanceAccountId; + return this; + } + + /** + * The balance account id to which payment was made + * @return payoutBalanceAccountId + **/ + @ApiModelProperty(value = "The balance account id to which payment was made") + @JsonProperty(JSON_PROPERTY_PAYOUT_BALANCE_ACCOUNT_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getPayoutBalanceAccountId() { + return payoutBalanceAccountId; + } + + + @JsonProperty(JSON_PROPERTY_PAYOUT_BALANCE_ACCOUNT_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPayoutBalanceAccountId(String payoutBalanceAccountId) { + this.payoutBalanceAccountId = payoutBalanceAccountId; + } + + + public AccountHolderPayoutNotificationContent payoutBankName(String payoutBankName) { + this.payoutBankName = payoutBankName; + return this; + } + + /** + * The name of the bank the payout from which the payout was initiated. + * @return payoutBankName + **/ + @ApiModelProperty(value = "The name of the bank the payout from which the payout was initiated.") + @JsonProperty(JSON_PROPERTY_PAYOUT_BANK_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getPayoutBankName() { + return payoutBankName; + } + + + @JsonProperty(JSON_PROPERTY_PAYOUT_BANK_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPayoutBankName(String payoutBankName) { + this.payoutBankName = payoutBankName; + } + + + public AccountHolderPayoutNotificationContent payoutBranchCode(String payoutBranchCode) { + this.payoutBranchCode = payoutBranchCode; + return this; + } + + /** + * The branch code of the bank from which the payout was initiated. + * @return payoutBranchCode + **/ + @ApiModelProperty(value = "The branch code of the bank from which the payout was initiated.") + @JsonProperty(JSON_PROPERTY_PAYOUT_BRANCH_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getPayoutBranchCode() { + return payoutBranchCode; + } + + + @JsonProperty(JSON_PROPERTY_PAYOUT_BRANCH_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPayoutBranchCode(String payoutBranchCode) { + this.payoutBranchCode = payoutBranchCode; + } + + + public AccountHolderPayoutNotificationContent payoutReference(Long payoutReference) { + this.payoutReference = payoutReference; + return this; + } + + /** + * The unique payout identifier. + * @return payoutReference + **/ + @ApiModelProperty(value = "The unique payout identifier.") + @JsonProperty(JSON_PROPERTY_PAYOUT_REFERENCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Long getPayoutReference() { + return payoutReference; + } + + + @JsonProperty(JSON_PROPERTY_PAYOUT_REFERENCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPayoutReference(Long payoutReference) { + this.payoutReference = payoutReference; + } + + + public AccountHolderPayoutNotificationContent 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 AccountHolderPayoutNotificationContent status(OperationStatus status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + **/ + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public OperationStatus getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setStatus(OperationStatus status) { + this.status = status; + } + + + /** + * Return true if this AccountHolderPayoutNotificationContent object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AccountHolderPayoutNotificationContent accountHolderPayoutNotificationContent = (AccountHolderPayoutNotificationContent) o; + return Objects.equals(this.accountCode, accountHolderPayoutNotificationContent.accountCode) && + Objects.equals(this.accountHolderCode, accountHolderPayoutNotificationContent.accountHolderCode) && + Objects.equals(this.amounts, accountHolderPayoutNotificationContent.amounts) && + Objects.equals(this.bankAccountDetail, accountHolderPayoutNotificationContent.bankAccountDetail) && + Objects.equals(this.description, accountHolderPayoutNotificationContent.description) && + Objects.equals(this.estimatedArrivalDate, accountHolderPayoutNotificationContent.estimatedArrivalDate) && + Objects.equals(this.invalidFields, accountHolderPayoutNotificationContent.invalidFields) && + Objects.equals(this.merchantReference, accountHolderPayoutNotificationContent.merchantReference) && + Objects.equals(this.originalPspReference, accountHolderPayoutNotificationContent.originalPspReference) && + Objects.equals(this.payoutAccountCountry, accountHolderPayoutNotificationContent.payoutAccountCountry) && + Objects.equals(this.payoutAccountNumber, accountHolderPayoutNotificationContent.payoutAccountNumber) && + Objects.equals(this.payoutBalanceAccountId, accountHolderPayoutNotificationContent.payoutBalanceAccountId) && + Objects.equals(this.payoutBankName, accountHolderPayoutNotificationContent.payoutBankName) && + Objects.equals(this.payoutBranchCode, accountHolderPayoutNotificationContent.payoutBranchCode) && + Objects.equals(this.payoutReference, accountHolderPayoutNotificationContent.payoutReference) && + Objects.equals(this.payoutSpeed, accountHolderPayoutNotificationContent.payoutSpeed) && + Objects.equals(this.status, accountHolderPayoutNotificationContent.status); + } + + @Override + public int hashCode() { + return Objects.hash(accountCode, accountHolderCode, amounts, bankAccountDetail, description, estimatedArrivalDate, invalidFields, merchantReference, originalPspReference, payoutAccountCountry, payoutAccountNumber, payoutBalanceAccountId, payoutBankName, payoutBranchCode, payoutReference, payoutSpeed, status); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AccountHolderPayoutNotificationContent {\n"); + sb.append(" accountCode: ").append(toIndentedString(accountCode)).append("\n"); + sb.append(" accountHolderCode: ").append(toIndentedString(accountHolderCode)).append("\n"); + sb.append(" amounts: ").append(toIndentedString(amounts)).append("\n"); + sb.append(" bankAccountDetail: ").append(toIndentedString(bankAccountDetail)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" estimatedArrivalDate: ").append(toIndentedString(estimatedArrivalDate)).append("\n"); + sb.append(" invalidFields: ").append(toIndentedString(invalidFields)).append("\n"); + sb.append(" merchantReference: ").append(toIndentedString(merchantReference)).append("\n"); + sb.append(" originalPspReference: ").append(toIndentedString(originalPspReference)).append("\n"); + sb.append(" payoutAccountCountry: ").append(toIndentedString(payoutAccountCountry)).append("\n"); + sb.append(" payoutAccountNumber: ").append(toIndentedString(payoutAccountNumber)).append("\n"); + sb.append(" payoutBalanceAccountId: ").append(toIndentedString(payoutBalanceAccountId)).append("\n"); + sb.append(" payoutBankName: ").append(toIndentedString(payoutBankName)).append("\n"); + sb.append(" payoutBranchCode: ").append(toIndentedString(payoutBranchCode)).append("\n"); + sb.append(" payoutReference: ").append(toIndentedString(payoutReference)).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 AccountHolderPayoutNotificationContent given an JSON string + * + * @param jsonString JSON string + * @return An instance of AccountHolderPayoutNotificationContent + * @throws JsonProcessingException if the JSON string is invalid with respect to AccountHolderPayoutNotificationContent + */ + public static AccountHolderPayoutNotificationContent fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, AccountHolderPayoutNotificationContent.class); + } +/** + * Convert an instance of AccountHolderPayoutNotificationContent 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/marketpaywebhooks/AccountHolderStatus.java b/src/main/java/com/adyen/model/marketpaywebhooks/AccountHolderStatus.java new file mode 100644 index 000000000..bbd3c98f7 --- /dev/null +++ b/src/main/java/com/adyen/model/marketpaywebhooks/AccountHolderStatus.java @@ -0,0 +1,304 @@ +/* + * Classic Platforms - Notifications + * + * 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.marketpaywebhooks; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.adyen.model.marketpaywebhooks.AccountEvent; +import com.adyen.model.marketpaywebhooks.AccountPayoutState; +import com.adyen.model.marketpaywebhooks.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/marketpaywebhooks/AccountHolderStatusChangeNotification.java b/src/main/java/com/adyen/model/marketpaywebhooks/AccountHolderStatusChangeNotification.java new file mode 100644 index 000000000..4baa6be64 --- /dev/null +++ b/src/main/java/com/adyen/model/marketpaywebhooks/AccountHolderStatusChangeNotification.java @@ -0,0 +1,317 @@ +/* + * Classic Platforms - Notifications + * + * 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.marketpaywebhooks; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.adyen.model.marketpaywebhooks.AccountHolderStatusChangeNotificationContent; +import com.adyen.model.marketpaywebhooks.NotificationErrorContainer; +import com.fasterxml.jackson.annotation.JsonInclude; +import 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; + + +/** + * AccountHolderStatusChangeNotification + */ +@JsonPropertyOrder({ + AccountHolderStatusChangeNotification.JSON_PROPERTY_CONTENT, + AccountHolderStatusChangeNotification.JSON_PROPERTY_ERROR, + AccountHolderStatusChangeNotification.JSON_PROPERTY_EVENT_DATE, + AccountHolderStatusChangeNotification.JSON_PROPERTY_EVENT_TYPE, + AccountHolderStatusChangeNotification.JSON_PROPERTY_EXECUTING_USER_KEY, + AccountHolderStatusChangeNotification.JSON_PROPERTY_LIVE, + AccountHolderStatusChangeNotification.JSON_PROPERTY_PSP_REFERENCE +}) + +public class AccountHolderStatusChangeNotification { + public static final String JSON_PROPERTY_CONTENT = "content"; + private AccountHolderStatusChangeNotificationContent content; + + public static final String JSON_PROPERTY_ERROR = "error"; + private NotificationErrorContainer error; + + public static final String JSON_PROPERTY_EVENT_DATE = "eventDate"; + private OffsetDateTime eventDate; + + public static final String JSON_PROPERTY_EVENT_TYPE = "eventType"; + private String eventType; + + public static final String JSON_PROPERTY_EXECUTING_USER_KEY = "executingUserKey"; + private String executingUserKey; + + public static final String JSON_PROPERTY_LIVE = "live"; + private Boolean live; + + public static final String JSON_PROPERTY_PSP_REFERENCE = "pspReference"; + private String pspReference; + + public AccountHolderStatusChangeNotification() { + } + + public AccountHolderStatusChangeNotification content(AccountHolderStatusChangeNotificationContent content) { + this.content = content; + return this; + } + + /** + * Get content + * @return content + **/ + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_CONTENT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public AccountHolderStatusChangeNotificationContent getContent() { + return content; + } + + + @JsonProperty(JSON_PROPERTY_CONTENT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setContent(AccountHolderStatusChangeNotificationContent content) { + this.content = content; + } + + + public AccountHolderStatusChangeNotification error(NotificationErrorContainer error) { + this.error = error; + return this; + } + + /** + * Get error + * @return error + **/ + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_ERROR) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public NotificationErrorContainer getError() { + return error; + } + + + @JsonProperty(JSON_PROPERTY_ERROR) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setError(NotificationErrorContainer error) { + this.error = error; + } + + + public AccountHolderStatusChangeNotification eventDate(OffsetDateTime eventDate) { + this.eventDate = eventDate; + return this; + } + + /** + * The date and time when an event has been completed. + * @return eventDate + **/ + @ApiModelProperty(required = true, value = "The date and time when an event has been completed.") + @JsonProperty(JSON_PROPERTY_EVENT_DATE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public OffsetDateTime getEventDate() { + return eventDate; + } + + + @JsonProperty(JSON_PROPERTY_EVENT_DATE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEventDate(OffsetDateTime eventDate) { + this.eventDate = eventDate; + } + + + public AccountHolderStatusChangeNotification eventType(String eventType) { + this.eventType = eventType; + return this; + } + + /** + * The event type of the notification. + * @return eventType + **/ + @ApiModelProperty(required = true, value = "The event type of the notification.") + @JsonProperty(JSON_PROPERTY_EVENT_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getEventType() { + return eventType; + } + + + @JsonProperty(JSON_PROPERTY_EVENT_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEventType(String eventType) { + this.eventType = eventType; + } + + + public AccountHolderStatusChangeNotification executingUserKey(String executingUserKey) { + this.executingUserKey = executingUserKey; + return this; + } + + /** + * The user or process that has triggered the notification. + * @return executingUserKey + **/ + @ApiModelProperty(required = true, value = "The user or process that has triggered the notification.") + @JsonProperty(JSON_PROPERTY_EXECUTING_USER_KEY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getExecutingUserKey() { + return executingUserKey; + } + + + @JsonProperty(JSON_PROPERTY_EXECUTING_USER_KEY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setExecutingUserKey(String executingUserKey) { + this.executingUserKey = executingUserKey; + } + + + public AccountHolderStatusChangeNotification live(Boolean live) { + this.live = live; + return this; + } + + /** + * Indicates whether the notification originated from the live environment or the test environment. If true, the notification originated from the live environment. If false, the notification originated from the test environment. + * @return live + **/ + @ApiModelProperty(required = true, value = "Indicates whether the notification originated from the live environment or the test environment. If true, the notification originated from the live environment. If false, the notification originated from the test environment.") + @JsonProperty(JSON_PROPERTY_LIVE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getLive() { + return live; + } + + + @JsonProperty(JSON_PROPERTY_LIVE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setLive(Boolean live) { + this.live = live; + } + + + public AccountHolderStatusChangeNotification pspReference(String pspReference) { + this.pspReference = pspReference; + return this; + } + + /** + * The PSP reference of the request from which the notification originates. + * @return pspReference + **/ + @ApiModelProperty(required = true, value = "The PSP reference of the request from which the notification originates.") + @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; + } + + + /** + * Return true if this AccountHolderStatusChangeNotification object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AccountHolderStatusChangeNotification accountHolderStatusChangeNotification = (AccountHolderStatusChangeNotification) o; + return Objects.equals(this.content, accountHolderStatusChangeNotification.content) && + Objects.equals(this.error, accountHolderStatusChangeNotification.error) && + Objects.equals(this.eventDate, accountHolderStatusChangeNotification.eventDate) && + Objects.equals(this.eventType, accountHolderStatusChangeNotification.eventType) && + Objects.equals(this.executingUserKey, accountHolderStatusChangeNotification.executingUserKey) && + Objects.equals(this.live, accountHolderStatusChangeNotification.live) && + Objects.equals(this.pspReference, accountHolderStatusChangeNotification.pspReference); + } + + @Override + public int hashCode() { + return Objects.hash(content, error, eventDate, eventType, executingUserKey, live, pspReference); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AccountHolderStatusChangeNotification {\n"); + sb.append(" content: ").append(toIndentedString(content)).append("\n"); + sb.append(" error: ").append(toIndentedString(error)).append("\n"); + sb.append(" eventDate: ").append(toIndentedString(eventDate)).append("\n"); + sb.append(" eventType: ").append(toIndentedString(eventType)).append("\n"); + sb.append(" executingUserKey: ").append(toIndentedString(executingUserKey)).append("\n"); + sb.append(" live: ").append(toIndentedString(live)).append("\n"); + sb.append(" pspReference: ").append(toIndentedString(pspReference)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line 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 AccountHolderStatusChangeNotification given an JSON string + * + * @param jsonString JSON string + * @return An instance of AccountHolderStatusChangeNotification + * @throws JsonProcessingException if the JSON string is invalid with respect to AccountHolderStatusChangeNotification + */ + public static AccountHolderStatusChangeNotification fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, AccountHolderStatusChangeNotification.class); + } +/** + * Convert an instance of AccountHolderStatusChangeNotification 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/marketpaywebhooks/AccountHolderStatusChangeNotificationContent.java b/src/main/java/com/adyen/model/marketpaywebhooks/AccountHolderStatusChangeNotificationContent.java new file mode 100644 index 000000000..b8dc42088 --- /dev/null +++ b/src/main/java/com/adyen/model/marketpaywebhooks/AccountHolderStatusChangeNotificationContent.java @@ -0,0 +1,264 @@ +/* + * Classic Platforms - Notifications + * + * 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.marketpaywebhooks; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.adyen.model.marketpaywebhooks.AccountHolderStatus; +import com.adyen.model.marketpaywebhooks.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; + + +/** + * AccountHolderStatusChangeNotificationContent + */ +@JsonPropertyOrder({ + AccountHolderStatusChangeNotificationContent.JSON_PROPERTY_ACCOUNT_HOLDER_CODE, + AccountHolderStatusChangeNotificationContent.JSON_PROPERTY_INVALID_FIELDS, + AccountHolderStatusChangeNotificationContent.JSON_PROPERTY_NEW_STATUS, + AccountHolderStatusChangeNotificationContent.JSON_PROPERTY_OLD_STATUS, + AccountHolderStatusChangeNotificationContent.JSON_PROPERTY_REASON +}) + +public class AccountHolderStatusChangeNotificationContent { + public static final String JSON_PROPERTY_ACCOUNT_HOLDER_CODE = "accountHolderCode"; + private String accountHolderCode; + + public static final String JSON_PROPERTY_INVALID_FIELDS = "invalidFields"; + private List invalidFields = null; + + public static final String JSON_PROPERTY_NEW_STATUS = "newStatus"; + private AccountHolderStatus newStatus; + + public static final String JSON_PROPERTY_OLD_STATUS = "oldStatus"; + private AccountHolderStatus oldStatus; + + public static final String JSON_PROPERTY_REASON = "reason"; + private String reason; + + public AccountHolderStatusChangeNotificationContent() { + } + + public AccountHolderStatusChangeNotificationContent 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 AccountHolderStatusChangeNotificationContent invalidFields(List invalidFields) { + this.invalidFields = invalidFields; + return this; + } + + public AccountHolderStatusChangeNotificationContent 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 AccountHolderStatusChangeNotificationContent newStatus(AccountHolderStatus newStatus) { + this.newStatus = newStatus; + return this; + } + + /** + * Get newStatus + * @return newStatus + **/ + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_NEW_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public AccountHolderStatus getNewStatus() { + return newStatus; + } + + + @JsonProperty(JSON_PROPERTY_NEW_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setNewStatus(AccountHolderStatus newStatus) { + this.newStatus = newStatus; + } + + + public AccountHolderStatusChangeNotificationContent oldStatus(AccountHolderStatus oldStatus) { + this.oldStatus = oldStatus; + return this; + } + + /** + * Get oldStatus + * @return oldStatus + **/ + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_OLD_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public AccountHolderStatus getOldStatus() { + return oldStatus; + } + + + @JsonProperty(JSON_PROPERTY_OLD_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setOldStatus(AccountHolderStatus oldStatus) { + this.oldStatus = oldStatus; + } + + + public AccountHolderStatusChangeNotificationContent reason(String reason) { + this.reason = reason; + return this; + } + + /** + * The reason for the status change. + * @return reason + **/ + @ApiModelProperty(value = "The reason for the status change.") + @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 AccountHolderStatusChangeNotificationContent object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AccountHolderStatusChangeNotificationContent accountHolderStatusChangeNotificationContent = (AccountHolderStatusChangeNotificationContent) o; + return Objects.equals(this.accountHolderCode, accountHolderStatusChangeNotificationContent.accountHolderCode) && + Objects.equals(this.invalidFields, accountHolderStatusChangeNotificationContent.invalidFields) && + Objects.equals(this.newStatus, accountHolderStatusChangeNotificationContent.newStatus) && + Objects.equals(this.oldStatus, accountHolderStatusChangeNotificationContent.oldStatus) && + Objects.equals(this.reason, accountHolderStatusChangeNotificationContent.reason); + } + + @Override + public int hashCode() { + return Objects.hash(accountHolderCode, invalidFields, newStatus, oldStatus, reason); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AccountHolderStatusChangeNotificationContent {\n"); + sb.append(" accountHolderCode: ").append(toIndentedString(accountHolderCode)).append("\n"); + sb.append(" invalidFields: ").append(toIndentedString(invalidFields)).append("\n"); + sb.append(" newStatus: ").append(toIndentedString(newStatus)).append("\n"); + sb.append(" oldStatus: ").append(toIndentedString(oldStatus)).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 AccountHolderStatusChangeNotificationContent given an JSON string + * + * @param jsonString JSON string + * @return An instance of AccountHolderStatusChangeNotificationContent + * @throws JsonProcessingException if the JSON string is invalid with respect to AccountHolderStatusChangeNotificationContent + */ + public static AccountHolderStatusChangeNotificationContent fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, AccountHolderStatusChangeNotificationContent.class); + } +/** + * Convert an instance of AccountHolderStatusChangeNotificationContent 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/marketpaywebhooks/AccountHolderStoreStatusChangeNotification.java b/src/main/java/com/adyen/model/marketpaywebhooks/AccountHolderStoreStatusChangeNotification.java new file mode 100644 index 000000000..3669fc327 --- /dev/null +++ b/src/main/java/com/adyen/model/marketpaywebhooks/AccountHolderStoreStatusChangeNotification.java @@ -0,0 +1,317 @@ +/* + * Classic Platforms - Notifications + * + * 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.marketpaywebhooks; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.adyen.model.marketpaywebhooks.AccountHolderStoreStatusChangeNotificationContent; +import com.adyen.model.marketpaywebhooks.NotificationErrorContainer; +import com.fasterxml.jackson.annotation.JsonInclude; +import 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; + + +/** + * AccountHolderStoreStatusChangeNotification + */ +@JsonPropertyOrder({ + AccountHolderStoreStatusChangeNotification.JSON_PROPERTY_CONTENT, + AccountHolderStoreStatusChangeNotification.JSON_PROPERTY_ERROR, + AccountHolderStoreStatusChangeNotification.JSON_PROPERTY_EVENT_DATE, + AccountHolderStoreStatusChangeNotification.JSON_PROPERTY_EVENT_TYPE, + AccountHolderStoreStatusChangeNotification.JSON_PROPERTY_EXECUTING_USER_KEY, + AccountHolderStoreStatusChangeNotification.JSON_PROPERTY_LIVE, + AccountHolderStoreStatusChangeNotification.JSON_PROPERTY_PSP_REFERENCE +}) + +public class AccountHolderStoreStatusChangeNotification { + public static final String JSON_PROPERTY_CONTENT = "content"; + private AccountHolderStoreStatusChangeNotificationContent content; + + public static final String JSON_PROPERTY_ERROR = "error"; + private NotificationErrorContainer error; + + public static final String JSON_PROPERTY_EVENT_DATE = "eventDate"; + private OffsetDateTime eventDate; + + public static final String JSON_PROPERTY_EVENT_TYPE = "eventType"; + private String eventType; + + public static final String JSON_PROPERTY_EXECUTING_USER_KEY = "executingUserKey"; + private String executingUserKey; + + public static final String JSON_PROPERTY_LIVE = "live"; + private Boolean live; + + public static final String JSON_PROPERTY_PSP_REFERENCE = "pspReference"; + private String pspReference; + + public AccountHolderStoreStatusChangeNotification() { + } + + public AccountHolderStoreStatusChangeNotification content(AccountHolderStoreStatusChangeNotificationContent content) { + this.content = content; + return this; + } + + /** + * Get content + * @return content + **/ + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_CONTENT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public AccountHolderStoreStatusChangeNotificationContent getContent() { + return content; + } + + + @JsonProperty(JSON_PROPERTY_CONTENT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setContent(AccountHolderStoreStatusChangeNotificationContent content) { + this.content = content; + } + + + public AccountHolderStoreStatusChangeNotification error(NotificationErrorContainer error) { + this.error = error; + return this; + } + + /** + * Get error + * @return error + **/ + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_ERROR) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public NotificationErrorContainer getError() { + return error; + } + + + @JsonProperty(JSON_PROPERTY_ERROR) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setError(NotificationErrorContainer error) { + this.error = error; + } + + + public AccountHolderStoreStatusChangeNotification eventDate(OffsetDateTime eventDate) { + this.eventDate = eventDate; + return this; + } + + /** + * The date and time when an event has been completed. + * @return eventDate + **/ + @ApiModelProperty(required = true, value = "The date and time when an event has been completed.") + @JsonProperty(JSON_PROPERTY_EVENT_DATE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public OffsetDateTime getEventDate() { + return eventDate; + } + + + @JsonProperty(JSON_PROPERTY_EVENT_DATE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEventDate(OffsetDateTime eventDate) { + this.eventDate = eventDate; + } + + + public AccountHolderStoreStatusChangeNotification eventType(String eventType) { + this.eventType = eventType; + return this; + } + + /** + * The event type of the notification. + * @return eventType + **/ + @ApiModelProperty(required = true, value = "The event type of the notification.") + @JsonProperty(JSON_PROPERTY_EVENT_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getEventType() { + return eventType; + } + + + @JsonProperty(JSON_PROPERTY_EVENT_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEventType(String eventType) { + this.eventType = eventType; + } + + + public AccountHolderStoreStatusChangeNotification executingUserKey(String executingUserKey) { + this.executingUserKey = executingUserKey; + return this; + } + + /** + * The user or process that has triggered the notification. + * @return executingUserKey + **/ + @ApiModelProperty(required = true, value = "The user or process that has triggered the notification.") + @JsonProperty(JSON_PROPERTY_EXECUTING_USER_KEY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getExecutingUserKey() { + return executingUserKey; + } + + + @JsonProperty(JSON_PROPERTY_EXECUTING_USER_KEY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setExecutingUserKey(String executingUserKey) { + this.executingUserKey = executingUserKey; + } + + + public AccountHolderStoreStatusChangeNotification live(Boolean live) { + this.live = live; + return this; + } + + /** + * Indicates whether the notification originated from the live environment or the test environment. If true, the notification originated from the live environment. If false, the notification originated from the test environment. + * @return live + **/ + @ApiModelProperty(required = true, value = "Indicates whether the notification originated from the live environment or the test environment. If true, the notification originated from the live environment. If false, the notification originated from the test environment.") + @JsonProperty(JSON_PROPERTY_LIVE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getLive() { + return live; + } + + + @JsonProperty(JSON_PROPERTY_LIVE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setLive(Boolean live) { + this.live = live; + } + + + public AccountHolderStoreStatusChangeNotification pspReference(String pspReference) { + this.pspReference = pspReference; + return this; + } + + /** + * The PSP reference of the request from which the notification originates. + * @return pspReference + **/ + @ApiModelProperty(required = true, value = "The PSP reference of the request from which the notification originates.") + @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; + } + + + /** + * Return true if this AccountHolderStoreStatusChangeNotification object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AccountHolderStoreStatusChangeNotification accountHolderStoreStatusChangeNotification = (AccountHolderStoreStatusChangeNotification) o; + return Objects.equals(this.content, accountHolderStoreStatusChangeNotification.content) && + Objects.equals(this.error, accountHolderStoreStatusChangeNotification.error) && + Objects.equals(this.eventDate, accountHolderStoreStatusChangeNotification.eventDate) && + Objects.equals(this.eventType, accountHolderStoreStatusChangeNotification.eventType) && + Objects.equals(this.executingUserKey, accountHolderStoreStatusChangeNotification.executingUserKey) && + Objects.equals(this.live, accountHolderStoreStatusChangeNotification.live) && + Objects.equals(this.pspReference, accountHolderStoreStatusChangeNotification.pspReference); + } + + @Override + public int hashCode() { + return Objects.hash(content, error, eventDate, eventType, executingUserKey, live, pspReference); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AccountHolderStoreStatusChangeNotification {\n"); + sb.append(" content: ").append(toIndentedString(content)).append("\n"); + sb.append(" error: ").append(toIndentedString(error)).append("\n"); + sb.append(" eventDate: ").append(toIndentedString(eventDate)).append("\n"); + sb.append(" eventType: ").append(toIndentedString(eventType)).append("\n"); + sb.append(" executingUserKey: ").append(toIndentedString(executingUserKey)).append("\n"); + sb.append(" live: ").append(toIndentedString(live)).append("\n"); + sb.append(" pspReference: ").append(toIndentedString(pspReference)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line 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 AccountHolderStoreStatusChangeNotification given an JSON string + * + * @param jsonString JSON string + * @return An instance of AccountHolderStoreStatusChangeNotification + * @throws JsonProcessingException if the JSON string is invalid with respect to AccountHolderStoreStatusChangeNotification + */ + public static AccountHolderStoreStatusChangeNotification fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, AccountHolderStoreStatusChangeNotification.class); + } +/** + * Convert an instance of AccountHolderStoreStatusChangeNotification 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/marketpaywebhooks/AccountHolderStoreStatusChangeNotificationContent.java b/src/main/java/com/adyen/model/marketpaywebhooks/AccountHolderStoreStatusChangeNotificationContent.java new file mode 100644 index 000000000..df5277ba8 --- /dev/null +++ b/src/main/java/com/adyen/model/marketpaywebhooks/AccountHolderStoreStatusChangeNotificationContent.java @@ -0,0 +1,407 @@ +/* + * Classic Platforms - Notifications + * + * 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.marketpaywebhooks; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.adyen.model.marketpaywebhooks.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; + + +/** + * AccountHolderStoreStatusChangeNotificationContent + */ +@JsonPropertyOrder({ + AccountHolderStoreStatusChangeNotificationContent.JSON_PROPERTY_ACCOUNT_HOLDER_CODE, + AccountHolderStoreStatusChangeNotificationContent.JSON_PROPERTY_INVALID_FIELDS, + AccountHolderStoreStatusChangeNotificationContent.JSON_PROPERTY_NEW_STATUS, + AccountHolderStoreStatusChangeNotificationContent.JSON_PROPERTY_OLD_STATUS, + AccountHolderStoreStatusChangeNotificationContent.JSON_PROPERTY_REASON, + AccountHolderStoreStatusChangeNotificationContent.JSON_PROPERTY_STORE, + AccountHolderStoreStatusChangeNotificationContent.JSON_PROPERTY_STORE_REFERENCE +}) + +public class AccountHolderStoreStatusChangeNotificationContent { + public static final String JSON_PROPERTY_ACCOUNT_HOLDER_CODE = "accountHolderCode"; + private String accountHolderCode; + + public static final String JSON_PROPERTY_INVALID_FIELDS = "invalidFields"; + private List invalidFields = null; + + /** + * The new status of the account holder. + */ + public enum NewStatusEnum { + ACTIVE("Active"), + + CLOSED("Closed"), + + INACTIVE("Inactive"), + + INACTIVEWITHMODIFICATIONS("InactiveWithModifications"), + + PENDING("Pending"); + + private String value; + + NewStatusEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static NewStatusEnum fromValue(String value) { + for (NewStatusEnum b : NewStatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_NEW_STATUS = "newStatus"; + private NewStatusEnum newStatus; + + /** + * The former status of the account holder. + */ + public enum OldStatusEnum { + ACTIVE("Active"), + + CLOSED("Closed"), + + INACTIVE("Inactive"), + + INACTIVEWITHMODIFICATIONS("InactiveWithModifications"), + + PENDING("Pending"); + + private String value; + + OldStatusEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static OldStatusEnum fromValue(String value) { + for (OldStatusEnum b : OldStatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_OLD_STATUS = "oldStatus"; + private OldStatusEnum oldStatus; + + public static final String JSON_PROPERTY_REASON = "reason"; + private String reason; + + public static final String JSON_PROPERTY_STORE = "store"; + private String store; + + public static final String JSON_PROPERTY_STORE_REFERENCE = "storeReference"; + private String storeReference; + + public AccountHolderStoreStatusChangeNotificationContent() { + } + + public AccountHolderStoreStatusChangeNotificationContent 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 AccountHolderStoreStatusChangeNotificationContent invalidFields(List invalidFields) { + this.invalidFields = invalidFields; + return this; + } + + public AccountHolderStoreStatusChangeNotificationContent addInvalidFieldsItem(ErrorFieldType invalidFieldsItem) { + if (this.invalidFields == null) { + this.invalidFields = new ArrayList<>(); + } + this.invalidFields.add(invalidFieldsItem); + return this; + } + + /** + * In case the store status has not been updated, contains fields that did not pass the validation. + * @return invalidFields + **/ + @ApiModelProperty(value = "In case the store status has not been updated, contains 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 AccountHolderStoreStatusChangeNotificationContent newStatus(NewStatusEnum newStatus) { + this.newStatus = newStatus; + return this; + } + + /** + * The new status of the account holder. + * @return newStatus + **/ + @ApiModelProperty(required = true, value = "The new status of the account holder.") + @JsonProperty(JSON_PROPERTY_NEW_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public NewStatusEnum getNewStatus() { + return newStatus; + } + + + @JsonProperty(JSON_PROPERTY_NEW_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setNewStatus(NewStatusEnum newStatus) { + this.newStatus = newStatus; + } + + + public AccountHolderStoreStatusChangeNotificationContent oldStatus(OldStatusEnum oldStatus) { + this.oldStatus = oldStatus; + return this; + } + + /** + * The former status of the account holder. + * @return oldStatus + **/ + @ApiModelProperty(required = true, value = "The former status of the account holder.") + @JsonProperty(JSON_PROPERTY_OLD_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public OldStatusEnum getOldStatus() { + return oldStatus; + } + + + @JsonProperty(JSON_PROPERTY_OLD_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setOldStatus(OldStatusEnum oldStatus) { + this.oldStatus = oldStatus; + } + + + public AccountHolderStoreStatusChangeNotificationContent reason(String reason) { + this.reason = reason; + return this; + } + + /** + * The reason for the status change. + * @return reason + **/ + @ApiModelProperty(value = "The reason for the status change.") + @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 AccountHolderStoreStatusChangeNotificationContent store(String store) { + this.store = store; + return this; + } + + /** + * Alphanumeric identifier of the store. + * @return store + **/ + @ApiModelProperty(required = true, value = "Alphanumeric identifier of the store.") + @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 AccountHolderStoreStatusChangeNotificationContent storeReference(String storeReference) { + this.storeReference = storeReference; + return this; + } + + /** + * Store store reference. + * @return storeReference + **/ + @ApiModelProperty(required = true, value = "Store store reference.") + @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 AccountHolderStoreStatusChangeNotificationContent object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AccountHolderStoreStatusChangeNotificationContent accountHolderStoreStatusChangeNotificationContent = (AccountHolderStoreStatusChangeNotificationContent) o; + return Objects.equals(this.accountHolderCode, accountHolderStoreStatusChangeNotificationContent.accountHolderCode) && + Objects.equals(this.invalidFields, accountHolderStoreStatusChangeNotificationContent.invalidFields) && + Objects.equals(this.newStatus, accountHolderStoreStatusChangeNotificationContent.newStatus) && + Objects.equals(this.oldStatus, accountHolderStoreStatusChangeNotificationContent.oldStatus) && + Objects.equals(this.reason, accountHolderStoreStatusChangeNotificationContent.reason) && + Objects.equals(this.store, accountHolderStoreStatusChangeNotificationContent.store) && + Objects.equals(this.storeReference, accountHolderStoreStatusChangeNotificationContent.storeReference); + } + + @Override + public int hashCode() { + return Objects.hash(accountHolderCode, invalidFields, newStatus, oldStatus, reason, store, storeReference); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AccountHolderStoreStatusChangeNotificationContent {\n"); + sb.append(" accountHolderCode: ").append(toIndentedString(accountHolderCode)).append("\n"); + sb.append(" invalidFields: ").append(toIndentedString(invalidFields)).append("\n"); + sb.append(" newStatus: ").append(toIndentedString(newStatus)).append("\n"); + sb.append(" oldStatus: ").append(toIndentedString(oldStatus)).append("\n"); + sb.append(" reason: ").append(toIndentedString(reason)).append("\n"); + sb.append(" store: ").append(toIndentedString(store)).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 AccountHolderStoreStatusChangeNotificationContent given an JSON string + * + * @param jsonString JSON string + * @return An instance of AccountHolderStoreStatusChangeNotificationContent + * @throws JsonProcessingException if the JSON string is invalid with respect to AccountHolderStoreStatusChangeNotificationContent + */ + public static AccountHolderStoreStatusChangeNotificationContent fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, AccountHolderStoreStatusChangeNotificationContent.class); + } +/** + * Convert an instance of AccountHolderStoreStatusChangeNotificationContent 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/marketpaywebhooks/AccountHolderUpcomingDeadlineNotification.java b/src/main/java/com/adyen/model/marketpaywebhooks/AccountHolderUpcomingDeadlineNotification.java new file mode 100644 index 000000000..1d1c88c86 --- /dev/null +++ b/src/main/java/com/adyen/model/marketpaywebhooks/AccountHolderUpcomingDeadlineNotification.java @@ -0,0 +1,317 @@ +/* + * Classic Platforms - Notifications + * + * 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.marketpaywebhooks; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.adyen.model.marketpaywebhooks.AccountHolderUpcomingDeadlineNotificationContent; +import com.adyen.model.marketpaywebhooks.NotificationErrorContainer; +import com.fasterxml.jackson.annotation.JsonInclude; +import 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; + + +/** + * AccountHolderUpcomingDeadlineNotification + */ +@JsonPropertyOrder({ + AccountHolderUpcomingDeadlineNotification.JSON_PROPERTY_CONTENT, + AccountHolderUpcomingDeadlineNotification.JSON_PROPERTY_ERROR, + AccountHolderUpcomingDeadlineNotification.JSON_PROPERTY_EVENT_DATE, + AccountHolderUpcomingDeadlineNotification.JSON_PROPERTY_EVENT_TYPE, + AccountHolderUpcomingDeadlineNotification.JSON_PROPERTY_EXECUTING_USER_KEY, + AccountHolderUpcomingDeadlineNotification.JSON_PROPERTY_LIVE, + AccountHolderUpcomingDeadlineNotification.JSON_PROPERTY_PSP_REFERENCE +}) + +public class AccountHolderUpcomingDeadlineNotification { + public static final String JSON_PROPERTY_CONTENT = "content"; + private AccountHolderUpcomingDeadlineNotificationContent content; + + public static final String JSON_PROPERTY_ERROR = "error"; + private NotificationErrorContainer error; + + public static final String JSON_PROPERTY_EVENT_DATE = "eventDate"; + private OffsetDateTime eventDate; + + public static final String JSON_PROPERTY_EVENT_TYPE = "eventType"; + private String eventType; + + public static final String JSON_PROPERTY_EXECUTING_USER_KEY = "executingUserKey"; + private String executingUserKey; + + public static final String JSON_PROPERTY_LIVE = "live"; + private Boolean live; + + public static final String JSON_PROPERTY_PSP_REFERENCE = "pspReference"; + private String pspReference; + + public AccountHolderUpcomingDeadlineNotification() { + } + + public AccountHolderUpcomingDeadlineNotification content(AccountHolderUpcomingDeadlineNotificationContent content) { + this.content = content; + return this; + } + + /** + * Get content + * @return content + **/ + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_CONTENT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public AccountHolderUpcomingDeadlineNotificationContent getContent() { + return content; + } + + + @JsonProperty(JSON_PROPERTY_CONTENT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setContent(AccountHolderUpcomingDeadlineNotificationContent content) { + this.content = content; + } + + + public AccountHolderUpcomingDeadlineNotification error(NotificationErrorContainer error) { + this.error = error; + return this; + } + + /** + * Get error + * @return error + **/ + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_ERROR) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public NotificationErrorContainer getError() { + return error; + } + + + @JsonProperty(JSON_PROPERTY_ERROR) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setError(NotificationErrorContainer error) { + this.error = error; + } + + + public AccountHolderUpcomingDeadlineNotification eventDate(OffsetDateTime eventDate) { + this.eventDate = eventDate; + return this; + } + + /** + * The date and time when an event has been completed. + * @return eventDate + **/ + @ApiModelProperty(required = true, value = "The date and time when an event has been completed.") + @JsonProperty(JSON_PROPERTY_EVENT_DATE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public OffsetDateTime getEventDate() { + return eventDate; + } + + + @JsonProperty(JSON_PROPERTY_EVENT_DATE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEventDate(OffsetDateTime eventDate) { + this.eventDate = eventDate; + } + + + public AccountHolderUpcomingDeadlineNotification eventType(String eventType) { + this.eventType = eventType; + return this; + } + + /** + * The event type of the notification. + * @return eventType + **/ + @ApiModelProperty(required = true, value = "The event type of the notification.") + @JsonProperty(JSON_PROPERTY_EVENT_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getEventType() { + return eventType; + } + + + @JsonProperty(JSON_PROPERTY_EVENT_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEventType(String eventType) { + this.eventType = eventType; + } + + + public AccountHolderUpcomingDeadlineNotification executingUserKey(String executingUserKey) { + this.executingUserKey = executingUserKey; + return this; + } + + /** + * The user or process that has triggered the notification. + * @return executingUserKey + **/ + @ApiModelProperty(required = true, value = "The user or process that has triggered the notification.") + @JsonProperty(JSON_PROPERTY_EXECUTING_USER_KEY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getExecutingUserKey() { + return executingUserKey; + } + + + @JsonProperty(JSON_PROPERTY_EXECUTING_USER_KEY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setExecutingUserKey(String executingUserKey) { + this.executingUserKey = executingUserKey; + } + + + public AccountHolderUpcomingDeadlineNotification live(Boolean live) { + this.live = live; + return this; + } + + /** + * Indicates whether the notification originated from the live environment or the test environment. If true, the notification originated from the live environment. If false, the notification originated from the test environment. + * @return live + **/ + @ApiModelProperty(required = true, value = "Indicates whether the notification originated from the live environment or the test environment. If true, the notification originated from the live environment. If false, the notification originated from the test environment.") + @JsonProperty(JSON_PROPERTY_LIVE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getLive() { + return live; + } + + + @JsonProperty(JSON_PROPERTY_LIVE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setLive(Boolean live) { + this.live = live; + } + + + public AccountHolderUpcomingDeadlineNotification pspReference(String pspReference) { + this.pspReference = pspReference; + return this; + } + + /** + * The PSP reference of the request from which the notification originates. + * @return pspReference + **/ + @ApiModelProperty(required = true, value = "The PSP reference of the request from which the notification originates.") + @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; + } + + + /** + * Return true if this AccountHolderUpcomingDeadlineNotification object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AccountHolderUpcomingDeadlineNotification accountHolderUpcomingDeadlineNotification = (AccountHolderUpcomingDeadlineNotification) o; + return Objects.equals(this.content, accountHolderUpcomingDeadlineNotification.content) && + Objects.equals(this.error, accountHolderUpcomingDeadlineNotification.error) && + Objects.equals(this.eventDate, accountHolderUpcomingDeadlineNotification.eventDate) && + Objects.equals(this.eventType, accountHolderUpcomingDeadlineNotification.eventType) && + Objects.equals(this.executingUserKey, accountHolderUpcomingDeadlineNotification.executingUserKey) && + Objects.equals(this.live, accountHolderUpcomingDeadlineNotification.live) && + Objects.equals(this.pspReference, accountHolderUpcomingDeadlineNotification.pspReference); + } + + @Override + public int hashCode() { + return Objects.hash(content, error, eventDate, eventType, executingUserKey, live, pspReference); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AccountHolderUpcomingDeadlineNotification {\n"); + sb.append(" content: ").append(toIndentedString(content)).append("\n"); + sb.append(" error: ").append(toIndentedString(error)).append("\n"); + sb.append(" eventDate: ").append(toIndentedString(eventDate)).append("\n"); + sb.append(" eventType: ").append(toIndentedString(eventType)).append("\n"); + sb.append(" executingUserKey: ").append(toIndentedString(executingUserKey)).append("\n"); + sb.append(" live: ").append(toIndentedString(live)).append("\n"); + sb.append(" pspReference: ").append(toIndentedString(pspReference)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line 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 AccountHolderUpcomingDeadlineNotification given an JSON string + * + * @param jsonString JSON string + * @return An instance of AccountHolderUpcomingDeadlineNotification + * @throws JsonProcessingException if the JSON string is invalid with respect to AccountHolderUpcomingDeadlineNotification + */ + public static AccountHolderUpcomingDeadlineNotification fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, AccountHolderUpcomingDeadlineNotification.class); + } +/** + * Convert an instance of AccountHolderUpcomingDeadlineNotification 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/marketpaywebhooks/AccountHolderUpcomingDeadlineNotificationContent.java b/src/main/java/com/adyen/model/marketpaywebhooks/AccountHolderUpcomingDeadlineNotificationContent.java new file mode 100644 index 000000000..0c8b7d3cc --- /dev/null +++ b/src/main/java/com/adyen/model/marketpaywebhooks/AccountHolderUpcomingDeadlineNotificationContent.java @@ -0,0 +1,301 @@ +/* + * Classic Platforms - Notifications + * + * 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.marketpaywebhooks; + +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; + + +/** + * AccountHolderUpcomingDeadlineNotificationContent + */ +@JsonPropertyOrder({ + AccountHolderUpcomingDeadlineNotificationContent.JSON_PROPERTY_ACCOUNT_HOLDER_CODE, + AccountHolderUpcomingDeadlineNotificationContent.JSON_PROPERTY_EVENT, + AccountHolderUpcomingDeadlineNotificationContent.JSON_PROPERTY_EXECUTION_DATE, + AccountHolderUpcomingDeadlineNotificationContent.JSON_PROPERTY_REASON +}) + +public class AccountHolderUpcomingDeadlineNotificationContent { + public static final String JSON_PROPERTY_ACCOUNT_HOLDER_CODE = "accountHolderCode"; + private String accountHolderCode; + + /** + * The event name that will be trigger if no action is taken. + */ + public enum EventEnum { + ACCESSPII("AccessPii"), + + APITIERUPDATE("ApiTierUpdate"), + + CLOSEACCOUNT("CloseAccount"), + + CLOSESTORES("CloseStores"), + + DELETEBALANCEACCOUNTS("DeleteBalanceAccounts"), + + DELETEBANKACCOUNTS("DeleteBankAccounts"), + + DELETELEGALARRANGEMENTS("DeleteLegalArrangements"), + + DELETELIABLEBANKACCOUNT("DeleteLiableBankAccount"), + + DELETEPAYOUTMETHODS("DeletePayoutMethods"), + + DELETESHAREHOLDERS("DeleteShareholders"), + + DELETESIGNATORIES("DeleteSignatories"), + + INACTIVATEACCOUNT("InactivateAccount"), + + KYCDEADLINEEXTENSION("KYCDeadlineExtension"), + + MIGRATEACCOUNTTOBP("MigrateAccountToBP"), + + RECALCULATEACCOUNTSTATUSANDPROCESSINGTIER("RecalculateAccountStatusAndProcessingTier"), + + REFUNDNOTPAIDOUTTRANSFERS("RefundNotPaidOutTransfers"), + + RESOLVEEVENTS("ResolveEvents"), + + SAVEACCOUNTHOLDER("SaveAccountHolder"), + + SAVEKYCCHECKSTATUS("SaveKYCCheckStatus"), + + SAVEPEPCHECKS("SavePEPChecks"), + + SUSPENDACCOUNT("SuspendAccount"), + + UNSUSPENDACCOUNT("UnSuspendAccount"), + + UPDATEACCOUNTHOLDERSTATE("UpdateAccountHolderState"), + + VERIFICATION("Verification"); + + 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 AccountHolderUpcomingDeadlineNotificationContent() { + } + + public AccountHolderUpcomingDeadlineNotificationContent accountHolderCode(String accountHolderCode) { + this.accountHolderCode = accountHolderCode; + return this; + } + + /** + * The code of the account holder whom the event refers to. + * @return accountHolderCode + **/ + @ApiModelProperty(value = "The code of the account holder whom the event refers to.") + @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 AccountHolderUpcomingDeadlineNotificationContent event(EventEnum event) { + this.event = event; + return this; + } + + /** + * The event name that will be trigger if no action is taken. + * @return event + **/ + @ApiModelProperty(value = "The event name that will be trigger if no action is taken.") + @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 AccountHolderUpcomingDeadlineNotificationContent executionDate(OffsetDateTime executionDate) { + this.executionDate = executionDate; + return this; + } + + /** + * The execution date scheduled for the event. + * @return executionDate + **/ + @ApiModelProperty(value = "The execution date scheduled for the event.") + @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 AccountHolderUpcomingDeadlineNotificationContent reason(String reason) { + this.reason = reason; + return this; + } + + /** + * The reason that leads to scheduling of the event. + * @return reason + **/ + @ApiModelProperty(value = "The reason that leads to scheduling of the event.") + @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 AccountHolderUpcomingDeadlineNotificationContent object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AccountHolderUpcomingDeadlineNotificationContent accountHolderUpcomingDeadlineNotificationContent = (AccountHolderUpcomingDeadlineNotificationContent) o; + return Objects.equals(this.accountHolderCode, accountHolderUpcomingDeadlineNotificationContent.accountHolderCode) && + Objects.equals(this.event, accountHolderUpcomingDeadlineNotificationContent.event) && + Objects.equals(this.executionDate, accountHolderUpcomingDeadlineNotificationContent.executionDate) && + Objects.equals(this.reason, accountHolderUpcomingDeadlineNotificationContent.reason); + } + + @Override + public int hashCode() { + return Objects.hash(accountHolderCode, event, executionDate, reason); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AccountHolderUpcomingDeadlineNotificationContent {\n"); + sb.append(" accountHolderCode: ").append(toIndentedString(accountHolderCode)).append("\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 AccountHolderUpcomingDeadlineNotificationContent given an JSON string + * + * @param jsonString JSON string + * @return An instance of AccountHolderUpcomingDeadlineNotificationContent + * @throws JsonProcessingException if the JSON string is invalid with respect to AccountHolderUpcomingDeadlineNotificationContent + */ + public static AccountHolderUpcomingDeadlineNotificationContent fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, AccountHolderUpcomingDeadlineNotificationContent.class); + } +/** + * Convert an instance of AccountHolderUpcomingDeadlineNotificationContent 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/marketpaywebhooks/AccountHolderUpdateNotification.java b/src/main/java/com/adyen/model/marketpaywebhooks/AccountHolderUpdateNotification.java new file mode 100644 index 000000000..81559b9f2 --- /dev/null +++ b/src/main/java/com/adyen/model/marketpaywebhooks/AccountHolderUpdateNotification.java @@ -0,0 +1,317 @@ +/* + * Classic Platforms - Notifications + * + * 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.marketpaywebhooks; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.adyen.model.marketpaywebhooks.NotificationErrorContainer; +import com.adyen.model.marketpaywebhooks.UpdateAccountHolderResponse; +import com.fasterxml.jackson.annotation.JsonInclude; +import 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; + + +/** + * AccountHolderUpdateNotification + */ +@JsonPropertyOrder({ + AccountHolderUpdateNotification.JSON_PROPERTY_CONTENT, + AccountHolderUpdateNotification.JSON_PROPERTY_ERROR, + AccountHolderUpdateNotification.JSON_PROPERTY_EVENT_DATE, + AccountHolderUpdateNotification.JSON_PROPERTY_EVENT_TYPE, + AccountHolderUpdateNotification.JSON_PROPERTY_EXECUTING_USER_KEY, + AccountHolderUpdateNotification.JSON_PROPERTY_LIVE, + AccountHolderUpdateNotification.JSON_PROPERTY_PSP_REFERENCE +}) + +public class AccountHolderUpdateNotification { + public static final String JSON_PROPERTY_CONTENT = "content"; + private UpdateAccountHolderResponse content; + + public static final String JSON_PROPERTY_ERROR = "error"; + private NotificationErrorContainer error; + + public static final String JSON_PROPERTY_EVENT_DATE = "eventDate"; + private OffsetDateTime eventDate; + + public static final String JSON_PROPERTY_EVENT_TYPE = "eventType"; + private String eventType; + + public static final String JSON_PROPERTY_EXECUTING_USER_KEY = "executingUserKey"; + private String executingUserKey; + + public static final String JSON_PROPERTY_LIVE = "live"; + private Boolean live; + + public static final String JSON_PROPERTY_PSP_REFERENCE = "pspReference"; + private String pspReference; + + public AccountHolderUpdateNotification() { + } + + public AccountHolderUpdateNotification content(UpdateAccountHolderResponse content) { + this.content = content; + return this; + } + + /** + * Get content + * @return content + **/ + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_CONTENT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public UpdateAccountHolderResponse getContent() { + return content; + } + + + @JsonProperty(JSON_PROPERTY_CONTENT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setContent(UpdateAccountHolderResponse content) { + this.content = content; + } + + + public AccountHolderUpdateNotification error(NotificationErrorContainer error) { + this.error = error; + return this; + } + + /** + * Get error + * @return error + **/ + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_ERROR) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public NotificationErrorContainer getError() { + return error; + } + + + @JsonProperty(JSON_PROPERTY_ERROR) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setError(NotificationErrorContainer error) { + this.error = error; + } + + + public AccountHolderUpdateNotification eventDate(OffsetDateTime eventDate) { + this.eventDate = eventDate; + return this; + } + + /** + * The date and time when an event has been completed. + * @return eventDate + **/ + @ApiModelProperty(required = true, value = "The date and time when an event has been completed.") + @JsonProperty(JSON_PROPERTY_EVENT_DATE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public OffsetDateTime getEventDate() { + return eventDate; + } + + + @JsonProperty(JSON_PROPERTY_EVENT_DATE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEventDate(OffsetDateTime eventDate) { + this.eventDate = eventDate; + } + + + public AccountHolderUpdateNotification eventType(String eventType) { + this.eventType = eventType; + return this; + } + + /** + * The event type of the notification. + * @return eventType + **/ + @ApiModelProperty(required = true, value = "The event type of the notification.") + @JsonProperty(JSON_PROPERTY_EVENT_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getEventType() { + return eventType; + } + + + @JsonProperty(JSON_PROPERTY_EVENT_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEventType(String eventType) { + this.eventType = eventType; + } + + + public AccountHolderUpdateNotification executingUserKey(String executingUserKey) { + this.executingUserKey = executingUserKey; + return this; + } + + /** + * The user or process that has triggered the notification. + * @return executingUserKey + **/ + @ApiModelProperty(required = true, value = "The user or process that has triggered the notification.") + @JsonProperty(JSON_PROPERTY_EXECUTING_USER_KEY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getExecutingUserKey() { + return executingUserKey; + } + + + @JsonProperty(JSON_PROPERTY_EXECUTING_USER_KEY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setExecutingUserKey(String executingUserKey) { + this.executingUserKey = executingUserKey; + } + + + public AccountHolderUpdateNotification live(Boolean live) { + this.live = live; + return this; + } + + /** + * Indicates whether the notification originated from the live environment or the test environment. If true, the notification originated from the live environment. If false, the notification originated from the test environment. + * @return live + **/ + @ApiModelProperty(required = true, value = "Indicates whether the notification originated from the live environment or the test environment. If true, the notification originated from the live environment. If false, the notification originated from the test environment.") + @JsonProperty(JSON_PROPERTY_LIVE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getLive() { + return live; + } + + + @JsonProperty(JSON_PROPERTY_LIVE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setLive(Boolean live) { + this.live = live; + } + + + public AccountHolderUpdateNotification pspReference(String pspReference) { + this.pspReference = pspReference; + return this; + } + + /** + * The PSP reference of the request from which the notification originates. + * @return pspReference + **/ + @ApiModelProperty(required = true, value = "The PSP reference of the request from which the notification originates.") + @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; + } + + + /** + * Return true if this AccountHolderUpdateNotification object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AccountHolderUpdateNotification accountHolderUpdateNotification = (AccountHolderUpdateNotification) o; + return Objects.equals(this.content, accountHolderUpdateNotification.content) && + Objects.equals(this.error, accountHolderUpdateNotification.error) && + Objects.equals(this.eventDate, accountHolderUpdateNotification.eventDate) && + Objects.equals(this.eventType, accountHolderUpdateNotification.eventType) && + Objects.equals(this.executingUserKey, accountHolderUpdateNotification.executingUserKey) && + Objects.equals(this.live, accountHolderUpdateNotification.live) && + Objects.equals(this.pspReference, accountHolderUpdateNotification.pspReference); + } + + @Override + public int hashCode() { + return Objects.hash(content, error, eventDate, eventType, executingUserKey, live, pspReference); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AccountHolderUpdateNotification {\n"); + sb.append(" content: ").append(toIndentedString(content)).append("\n"); + sb.append(" error: ").append(toIndentedString(error)).append("\n"); + sb.append(" eventDate: ").append(toIndentedString(eventDate)).append("\n"); + sb.append(" eventType: ").append(toIndentedString(eventType)).append("\n"); + sb.append(" executingUserKey: ").append(toIndentedString(executingUserKey)).append("\n"); + sb.append(" live: ").append(toIndentedString(live)).append("\n"); + sb.append(" pspReference: ").append(toIndentedString(pspReference)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line 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 AccountHolderUpdateNotification given an JSON string + * + * @param jsonString JSON string + * @return An instance of AccountHolderUpdateNotification + * @throws JsonProcessingException if the JSON string is invalid with respect to AccountHolderUpdateNotification + */ + public static AccountHolderUpdateNotification fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, AccountHolderUpdateNotification.class); + } +/** + * Convert an instance of AccountHolderUpdateNotification 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/marketpaywebhooks/AccountHolderVerificationNotification.java b/src/main/java/com/adyen/model/marketpaywebhooks/AccountHolderVerificationNotification.java new file mode 100644 index 000000000..3fa0e8249 --- /dev/null +++ b/src/main/java/com/adyen/model/marketpaywebhooks/AccountHolderVerificationNotification.java @@ -0,0 +1,317 @@ +/* + * Classic Platforms - Notifications + * + * 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.marketpaywebhooks; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.adyen.model.marketpaywebhooks.AccountHolderVerificationNotificationContent; +import com.adyen.model.marketpaywebhooks.NotificationErrorContainer; +import com.fasterxml.jackson.annotation.JsonInclude; +import 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; + + +/** + * AccountHolderVerificationNotification + */ +@JsonPropertyOrder({ + AccountHolderVerificationNotification.JSON_PROPERTY_CONTENT, + AccountHolderVerificationNotification.JSON_PROPERTY_ERROR, + AccountHolderVerificationNotification.JSON_PROPERTY_EVENT_DATE, + AccountHolderVerificationNotification.JSON_PROPERTY_EVENT_TYPE, + AccountHolderVerificationNotification.JSON_PROPERTY_EXECUTING_USER_KEY, + AccountHolderVerificationNotification.JSON_PROPERTY_LIVE, + AccountHolderVerificationNotification.JSON_PROPERTY_PSP_REFERENCE +}) + +public class AccountHolderVerificationNotification { + public static final String JSON_PROPERTY_CONTENT = "content"; + private AccountHolderVerificationNotificationContent content; + + public static final String JSON_PROPERTY_ERROR = "error"; + private NotificationErrorContainer error; + + public static final String JSON_PROPERTY_EVENT_DATE = "eventDate"; + private OffsetDateTime eventDate; + + public static final String JSON_PROPERTY_EVENT_TYPE = "eventType"; + private String eventType; + + public static final String JSON_PROPERTY_EXECUTING_USER_KEY = "executingUserKey"; + private String executingUserKey; + + public static final String JSON_PROPERTY_LIVE = "live"; + private Boolean live; + + public static final String JSON_PROPERTY_PSP_REFERENCE = "pspReference"; + private String pspReference; + + public AccountHolderVerificationNotification() { + } + + public AccountHolderVerificationNotification content(AccountHolderVerificationNotificationContent content) { + this.content = content; + return this; + } + + /** + * Get content + * @return content + **/ + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_CONTENT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public AccountHolderVerificationNotificationContent getContent() { + return content; + } + + + @JsonProperty(JSON_PROPERTY_CONTENT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setContent(AccountHolderVerificationNotificationContent content) { + this.content = content; + } + + + public AccountHolderVerificationNotification error(NotificationErrorContainer error) { + this.error = error; + return this; + } + + /** + * Get error + * @return error + **/ + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_ERROR) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public NotificationErrorContainer getError() { + return error; + } + + + @JsonProperty(JSON_PROPERTY_ERROR) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setError(NotificationErrorContainer error) { + this.error = error; + } + + + public AccountHolderVerificationNotification eventDate(OffsetDateTime eventDate) { + this.eventDate = eventDate; + return this; + } + + /** + * The date and time when an event has been completed. + * @return eventDate + **/ + @ApiModelProperty(required = true, value = "The date and time when an event has been completed.") + @JsonProperty(JSON_PROPERTY_EVENT_DATE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public OffsetDateTime getEventDate() { + return eventDate; + } + + + @JsonProperty(JSON_PROPERTY_EVENT_DATE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEventDate(OffsetDateTime eventDate) { + this.eventDate = eventDate; + } + + + public AccountHolderVerificationNotification eventType(String eventType) { + this.eventType = eventType; + return this; + } + + /** + * The event type of the notification. + * @return eventType + **/ + @ApiModelProperty(required = true, value = "The event type of the notification.") + @JsonProperty(JSON_PROPERTY_EVENT_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getEventType() { + return eventType; + } + + + @JsonProperty(JSON_PROPERTY_EVENT_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEventType(String eventType) { + this.eventType = eventType; + } + + + public AccountHolderVerificationNotification executingUserKey(String executingUserKey) { + this.executingUserKey = executingUserKey; + return this; + } + + /** + * The user or process that has triggered the notification. + * @return executingUserKey + **/ + @ApiModelProperty(required = true, value = "The user or process that has triggered the notification.") + @JsonProperty(JSON_PROPERTY_EXECUTING_USER_KEY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getExecutingUserKey() { + return executingUserKey; + } + + + @JsonProperty(JSON_PROPERTY_EXECUTING_USER_KEY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setExecutingUserKey(String executingUserKey) { + this.executingUserKey = executingUserKey; + } + + + public AccountHolderVerificationNotification live(Boolean live) { + this.live = live; + return this; + } + + /** + * Indicates whether the notification originated from the live environment or the test environment. If true, the notification originated from the live environment. If false, the notification originated from the test environment. + * @return live + **/ + @ApiModelProperty(required = true, value = "Indicates whether the notification originated from the live environment or the test environment. If true, the notification originated from the live environment. If false, the notification originated from the test environment.") + @JsonProperty(JSON_PROPERTY_LIVE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getLive() { + return live; + } + + + @JsonProperty(JSON_PROPERTY_LIVE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setLive(Boolean live) { + this.live = live; + } + + + public AccountHolderVerificationNotification pspReference(String pspReference) { + this.pspReference = pspReference; + return this; + } + + /** + * The PSP reference of the request from which the notification originates. + * @return pspReference + **/ + @ApiModelProperty(required = true, value = "The PSP reference of the request from which the notification originates.") + @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; + } + + + /** + * Return true if this AccountHolderVerificationNotification object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AccountHolderVerificationNotification accountHolderVerificationNotification = (AccountHolderVerificationNotification) o; + return Objects.equals(this.content, accountHolderVerificationNotification.content) && + Objects.equals(this.error, accountHolderVerificationNotification.error) && + Objects.equals(this.eventDate, accountHolderVerificationNotification.eventDate) && + Objects.equals(this.eventType, accountHolderVerificationNotification.eventType) && + Objects.equals(this.executingUserKey, accountHolderVerificationNotification.executingUserKey) && + Objects.equals(this.live, accountHolderVerificationNotification.live) && + Objects.equals(this.pspReference, accountHolderVerificationNotification.pspReference); + } + + @Override + public int hashCode() { + return Objects.hash(content, error, eventDate, eventType, executingUserKey, live, pspReference); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AccountHolderVerificationNotification {\n"); + sb.append(" content: ").append(toIndentedString(content)).append("\n"); + sb.append(" error: ").append(toIndentedString(error)).append("\n"); + sb.append(" eventDate: ").append(toIndentedString(eventDate)).append("\n"); + sb.append(" eventType: ").append(toIndentedString(eventType)).append("\n"); + sb.append(" executingUserKey: ").append(toIndentedString(executingUserKey)).append("\n"); + sb.append(" live: ").append(toIndentedString(live)).append("\n"); + sb.append(" pspReference: ").append(toIndentedString(pspReference)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line 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 AccountHolderVerificationNotification given an JSON string + * + * @param jsonString JSON string + * @return An instance of AccountHolderVerificationNotification + * @throws JsonProcessingException if the JSON string is invalid with respect to AccountHolderVerificationNotification + */ + public static AccountHolderVerificationNotification fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, AccountHolderVerificationNotification.class); + } +/** + * Convert an instance of AccountHolderVerificationNotification 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/marketpaywebhooks/AccountHolderVerificationNotificationContent.java b/src/main/java/com/adyen/model/marketpaywebhooks/AccountHolderVerificationNotificationContent.java new file mode 100644 index 000000000..9fce0281f --- /dev/null +++ b/src/main/java/com/adyen/model/marketpaywebhooks/AccountHolderVerificationNotificationContent.java @@ -0,0 +1,315 @@ +/* + * Classic Platforms - Notifications + * + * 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.marketpaywebhooks; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.adyen.model.marketpaywebhooks.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 com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.core.JsonProcessingException; + + +/** + * AccountHolderVerificationNotificationContent + */ +@JsonPropertyOrder({ + AccountHolderVerificationNotificationContent.JSON_PROPERTY_ACCOUNT_HOLDER_CODE, + AccountHolderVerificationNotificationContent.JSON_PROPERTY_KYC_CHECK_STATUS_DATA, + AccountHolderVerificationNotificationContent.JSON_PROPERTY_LEGAL_ARRANGEMENT_CODE, + AccountHolderVerificationNotificationContent.JSON_PROPERTY_LEGAL_ARRANGEMENT_ENTITY_CODE, + AccountHolderVerificationNotificationContent.JSON_PROPERTY_PAYOUT_METHOD_CODE, + AccountHolderVerificationNotificationContent.JSON_PROPERTY_SHAREHOLDER_CODE, + AccountHolderVerificationNotificationContent.JSON_PROPERTY_SIGNATORY_CODE +}) + +public class AccountHolderVerificationNotificationContent { + public static final String JSON_PROPERTY_ACCOUNT_HOLDER_CODE = "accountHolderCode"; + private String accountHolderCode; + + public static final String JSON_PROPERTY_KYC_CHECK_STATUS_DATA = "kycCheckStatusData"; + private KYCCheckStatusData kycCheckStatusData; + + 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_PAYOUT_METHOD_CODE = "payoutMethodCode"; + private String payoutMethodCode; + + 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 AccountHolderVerificationNotificationContent() { + } + + public AccountHolderVerificationNotificationContent 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 AccountHolderVerificationNotificationContent kycCheckStatusData(KYCCheckStatusData kycCheckStatusData) { + this.kycCheckStatusData = kycCheckStatusData; + return this; + } + + /** + * Get kycCheckStatusData + * @return kycCheckStatusData + **/ + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_KYC_CHECK_STATUS_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public KYCCheckStatusData getKycCheckStatusData() { + return kycCheckStatusData; + } + + + @JsonProperty(JSON_PROPERTY_KYC_CHECK_STATUS_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setKycCheckStatusData(KYCCheckStatusData kycCheckStatusData) { + this.kycCheckStatusData = kycCheckStatusData; + } + + + public AccountHolderVerificationNotificationContent legalArrangementCode(String legalArrangementCode) { + this.legalArrangementCode = legalArrangementCode; + return this; + } + + /** + * The unique ID of the legal arrangement that has been verified. + * @return legalArrangementCode + **/ + @ApiModelProperty(value = "The unique ID of the legal arrangement that has been verified.") + @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 AccountHolderVerificationNotificationContent legalArrangementEntityCode(String legalArrangementEntityCode) { + this.legalArrangementEntityCode = legalArrangementEntityCode; + return this; + } + + /** + * The unique ID of the legal arrangement entity that has been verified. + * @return legalArrangementEntityCode + **/ + @ApiModelProperty(value = "The unique ID of the legal arrangement entity that has been verified.") + @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 AccountHolderVerificationNotificationContent payoutMethodCode(String payoutMethodCode) { + this.payoutMethodCode = payoutMethodCode; + return this; + } + + /** + * The unique code of the payout method that has been verified. + * @return payoutMethodCode + **/ + @ApiModelProperty(value = "The unique code of the payout method that has been verified.") + @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 AccountHolderVerificationNotificationContent shareholderCode(String shareholderCode) { + this.shareholderCode = shareholderCode; + return this; + } + + /** + * The code of the shareholder that has been verified. + * @return shareholderCode + **/ + @ApiModelProperty(value = "The code of the shareholder that has been verified.") + @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 AccountHolderVerificationNotificationContent signatoryCode(String signatoryCode) { + this.signatoryCode = signatoryCode; + return this; + } + + /** + * The code of the signatory that has been verified. + * @return signatoryCode + **/ + @ApiModelProperty(value = "The code of the signatory that has been verified.") + @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 AccountHolderVerificationNotificationContent object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AccountHolderVerificationNotificationContent accountHolderVerificationNotificationContent = (AccountHolderVerificationNotificationContent) o; + return Objects.equals(this.accountHolderCode, accountHolderVerificationNotificationContent.accountHolderCode) && + Objects.equals(this.kycCheckStatusData, accountHolderVerificationNotificationContent.kycCheckStatusData) && + Objects.equals(this.legalArrangementCode, accountHolderVerificationNotificationContent.legalArrangementCode) && + Objects.equals(this.legalArrangementEntityCode, accountHolderVerificationNotificationContent.legalArrangementEntityCode) && + Objects.equals(this.payoutMethodCode, accountHolderVerificationNotificationContent.payoutMethodCode) && + Objects.equals(this.shareholderCode, accountHolderVerificationNotificationContent.shareholderCode) && + Objects.equals(this.signatoryCode, accountHolderVerificationNotificationContent.signatoryCode); + } + + @Override + public int hashCode() { + return Objects.hash(accountHolderCode, kycCheckStatusData, legalArrangementCode, legalArrangementEntityCode, payoutMethodCode, shareholderCode, signatoryCode); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AccountHolderVerificationNotificationContent {\n"); + sb.append(" accountHolderCode: ").append(toIndentedString(accountHolderCode)).append("\n"); + sb.append(" kycCheckStatusData: ").append(toIndentedString(kycCheckStatusData)).append("\n"); + sb.append(" legalArrangementCode: ").append(toIndentedString(legalArrangementCode)).append("\n"); + sb.append(" legalArrangementEntityCode: ").append(toIndentedString(legalArrangementEntityCode)).append("\n"); + sb.append(" payoutMethodCode: ").append(toIndentedString(payoutMethodCode)).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 AccountHolderVerificationNotificationContent given an JSON string + * + * @param jsonString JSON string + * @return An instance of AccountHolderVerificationNotificationContent + * @throws JsonProcessingException if the JSON string is invalid with respect to AccountHolderVerificationNotificationContent + */ + public static AccountHolderVerificationNotificationContent fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, AccountHolderVerificationNotificationContent.class); + } +/** + * Convert an instance of AccountHolderVerificationNotificationContent 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/marketpaywebhooks/AccountPayoutState.java b/src/main/java/com/adyen/model/marketpaywebhooks/AccountPayoutState.java new file mode 100644 index 000000000..c38588caf --- /dev/null +++ b/src/main/java/com/adyen/model/marketpaywebhooks/AccountPayoutState.java @@ -0,0 +1,284 @@ +/* + * Classic Platforms - Notifications + * + * 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.marketpaywebhooks; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.adyen.model.marketpaywebhooks.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/marketpaywebhooks/AccountProcessingState.java b/src/main/java/com/adyen/model/marketpaywebhooks/AccountProcessingState.java new file mode 100644 index 000000000..c26b85fd0 --- /dev/null +++ b/src/main/java/com/adyen/model/marketpaywebhooks/AccountProcessingState.java @@ -0,0 +1,253 @@ +/* + * Classic Platforms - Notifications + * + * 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.marketpaywebhooks; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.adyen.model.marketpaywebhooks.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/marketpaywebhooks/AccountUpdateNotification.java b/src/main/java/com/adyen/model/marketpaywebhooks/AccountUpdateNotification.java new file mode 100644 index 000000000..dd86e8d88 --- /dev/null +++ b/src/main/java/com/adyen/model/marketpaywebhooks/AccountUpdateNotification.java @@ -0,0 +1,317 @@ +/* + * Classic Platforms - Notifications + * + * 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.marketpaywebhooks; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.adyen.model.marketpaywebhooks.NotificationErrorContainer; +import com.adyen.model.marketpaywebhooks.UpdateAccountResponse; +import com.fasterxml.jackson.annotation.JsonInclude; +import 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; + + +/** + * AccountUpdateNotification + */ +@JsonPropertyOrder({ + AccountUpdateNotification.JSON_PROPERTY_CONTENT, + AccountUpdateNotification.JSON_PROPERTY_ERROR, + AccountUpdateNotification.JSON_PROPERTY_EVENT_DATE, + AccountUpdateNotification.JSON_PROPERTY_EVENT_TYPE, + AccountUpdateNotification.JSON_PROPERTY_EXECUTING_USER_KEY, + AccountUpdateNotification.JSON_PROPERTY_LIVE, + AccountUpdateNotification.JSON_PROPERTY_PSP_REFERENCE +}) + +public class AccountUpdateNotification { + public static final String JSON_PROPERTY_CONTENT = "content"; + private UpdateAccountResponse content; + + public static final String JSON_PROPERTY_ERROR = "error"; + private NotificationErrorContainer error; + + public static final String JSON_PROPERTY_EVENT_DATE = "eventDate"; + private OffsetDateTime eventDate; + + public static final String JSON_PROPERTY_EVENT_TYPE = "eventType"; + private String eventType; + + public static final String JSON_PROPERTY_EXECUTING_USER_KEY = "executingUserKey"; + private String executingUserKey; + + public static final String JSON_PROPERTY_LIVE = "live"; + private Boolean live; + + public static final String JSON_PROPERTY_PSP_REFERENCE = "pspReference"; + private String pspReference; + + public AccountUpdateNotification() { + } + + public AccountUpdateNotification content(UpdateAccountResponse content) { + this.content = content; + return this; + } + + /** + * Get content + * @return content + **/ + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_CONTENT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public UpdateAccountResponse getContent() { + return content; + } + + + @JsonProperty(JSON_PROPERTY_CONTENT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setContent(UpdateAccountResponse content) { + this.content = content; + } + + + public AccountUpdateNotification error(NotificationErrorContainer error) { + this.error = error; + return this; + } + + /** + * Get error + * @return error + **/ + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_ERROR) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public NotificationErrorContainer getError() { + return error; + } + + + @JsonProperty(JSON_PROPERTY_ERROR) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setError(NotificationErrorContainer error) { + this.error = error; + } + + + public AccountUpdateNotification eventDate(OffsetDateTime eventDate) { + this.eventDate = eventDate; + return this; + } + + /** + * The date and time when an event has been completed. + * @return eventDate + **/ + @ApiModelProperty(required = true, value = "The date and time when an event has been completed.") + @JsonProperty(JSON_PROPERTY_EVENT_DATE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public OffsetDateTime getEventDate() { + return eventDate; + } + + + @JsonProperty(JSON_PROPERTY_EVENT_DATE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEventDate(OffsetDateTime eventDate) { + this.eventDate = eventDate; + } + + + public AccountUpdateNotification eventType(String eventType) { + this.eventType = eventType; + return this; + } + + /** + * The event type of the notification. + * @return eventType + **/ + @ApiModelProperty(required = true, value = "The event type of the notification.") + @JsonProperty(JSON_PROPERTY_EVENT_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getEventType() { + return eventType; + } + + + @JsonProperty(JSON_PROPERTY_EVENT_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEventType(String eventType) { + this.eventType = eventType; + } + + + public AccountUpdateNotification executingUserKey(String executingUserKey) { + this.executingUserKey = executingUserKey; + return this; + } + + /** + * The user or process that has triggered the notification. + * @return executingUserKey + **/ + @ApiModelProperty(required = true, value = "The user or process that has triggered the notification.") + @JsonProperty(JSON_PROPERTY_EXECUTING_USER_KEY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getExecutingUserKey() { + return executingUserKey; + } + + + @JsonProperty(JSON_PROPERTY_EXECUTING_USER_KEY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setExecutingUserKey(String executingUserKey) { + this.executingUserKey = executingUserKey; + } + + + public AccountUpdateNotification live(Boolean live) { + this.live = live; + return this; + } + + /** + * Indicates whether the notification originated from the live environment or the test environment. If true, the notification originated from the live environment. If false, the notification originated from the test environment. + * @return live + **/ + @ApiModelProperty(required = true, value = "Indicates whether the notification originated from the live environment or the test environment. If true, the notification originated from the live environment. If false, the notification originated from the test environment.") + @JsonProperty(JSON_PROPERTY_LIVE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getLive() { + return live; + } + + + @JsonProperty(JSON_PROPERTY_LIVE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setLive(Boolean live) { + this.live = live; + } + + + public AccountUpdateNotification pspReference(String pspReference) { + this.pspReference = pspReference; + return this; + } + + /** + * The PSP reference of the request from which the notification originates. + * @return pspReference + **/ + @ApiModelProperty(required = true, value = "The PSP reference of the request from which the notification originates.") + @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; + } + + + /** + * Return true if this AccountUpdateNotification object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AccountUpdateNotification accountUpdateNotification = (AccountUpdateNotification) o; + return Objects.equals(this.content, accountUpdateNotification.content) && + Objects.equals(this.error, accountUpdateNotification.error) && + Objects.equals(this.eventDate, accountUpdateNotification.eventDate) && + Objects.equals(this.eventType, accountUpdateNotification.eventType) && + Objects.equals(this.executingUserKey, accountUpdateNotification.executingUserKey) && + Objects.equals(this.live, accountUpdateNotification.live) && + Objects.equals(this.pspReference, accountUpdateNotification.pspReference); + } + + @Override + public int hashCode() { + return Objects.hash(content, error, eventDate, eventType, executingUserKey, live, pspReference); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AccountUpdateNotification {\n"); + sb.append(" content: ").append(toIndentedString(content)).append("\n"); + sb.append(" error: ").append(toIndentedString(error)).append("\n"); + sb.append(" eventDate: ").append(toIndentedString(eventDate)).append("\n"); + sb.append(" eventType: ").append(toIndentedString(eventType)).append("\n"); + sb.append(" executingUserKey: ").append(toIndentedString(executingUserKey)).append("\n"); + sb.append(" live: ").append(toIndentedString(live)).append("\n"); + sb.append(" pspReference: ").append(toIndentedString(pspReference)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line 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 AccountUpdateNotification given an JSON string + * + * @param jsonString JSON string + * @return An instance of AccountUpdateNotification + * @throws JsonProcessingException if the JSON string is invalid with respect to AccountUpdateNotification + */ + public static AccountUpdateNotification fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, AccountUpdateNotification.class); + } +/** + * Convert an instance of AccountUpdateNotification 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/marketpaywebhooks/Amount.java b/src/main/java/com/adyen/model/marketpaywebhooks/Amount.java new file mode 100644 index 000000000..4dfd7fd38 --- /dev/null +++ b/src/main/java/com/adyen/model/marketpaywebhooks/Amount.java @@ -0,0 +1,159 @@ +/* + * Classic Platforms - Notifications + * + * 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.marketpaywebhooks; + +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/marketpaywebhooks/BankAccountDetail.java b/src/main/java/com/adyen/model/marketpaywebhooks/BankAccountDetail.java new file mode 100644 index 000000000..c4a383220 --- /dev/null +++ b/src/main/java/com/adyen/model/marketpaywebhooks/BankAccountDetail.java @@ -0,0 +1,906 @@ +/* + * Classic Platforms - Notifications + * + * 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.marketpaywebhooks; + +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/marketpaywebhooks/BeneficiarySetupNotification.java b/src/main/java/com/adyen/model/marketpaywebhooks/BeneficiarySetupNotification.java new file mode 100644 index 000000000..6520c38a2 --- /dev/null +++ b/src/main/java/com/adyen/model/marketpaywebhooks/BeneficiarySetupNotification.java @@ -0,0 +1,317 @@ +/* + * Classic Platforms - Notifications + * + * 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.marketpaywebhooks; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.adyen.model.marketpaywebhooks.BeneficiarySetupNotificationContent; +import com.adyen.model.marketpaywebhooks.NotificationErrorContainer; +import com.fasterxml.jackson.annotation.JsonInclude; +import 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; + + +/** + * BeneficiarySetupNotification + */ +@JsonPropertyOrder({ + BeneficiarySetupNotification.JSON_PROPERTY_CONTENT, + BeneficiarySetupNotification.JSON_PROPERTY_ERROR, + BeneficiarySetupNotification.JSON_PROPERTY_EVENT_DATE, + BeneficiarySetupNotification.JSON_PROPERTY_EVENT_TYPE, + BeneficiarySetupNotification.JSON_PROPERTY_EXECUTING_USER_KEY, + BeneficiarySetupNotification.JSON_PROPERTY_LIVE, + BeneficiarySetupNotification.JSON_PROPERTY_PSP_REFERENCE +}) + +public class BeneficiarySetupNotification { + public static final String JSON_PROPERTY_CONTENT = "content"; + private BeneficiarySetupNotificationContent content; + + public static final String JSON_PROPERTY_ERROR = "error"; + private NotificationErrorContainer error; + + public static final String JSON_PROPERTY_EVENT_DATE = "eventDate"; + private OffsetDateTime eventDate; + + public static final String JSON_PROPERTY_EVENT_TYPE = "eventType"; + private String eventType; + + public static final String JSON_PROPERTY_EXECUTING_USER_KEY = "executingUserKey"; + private String executingUserKey; + + public static final String JSON_PROPERTY_LIVE = "live"; + private Boolean live; + + public static final String JSON_PROPERTY_PSP_REFERENCE = "pspReference"; + private String pspReference; + + public BeneficiarySetupNotification() { + } + + public BeneficiarySetupNotification content(BeneficiarySetupNotificationContent content) { + this.content = content; + return this; + } + + /** + * Get content + * @return content + **/ + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_CONTENT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public BeneficiarySetupNotificationContent getContent() { + return content; + } + + + @JsonProperty(JSON_PROPERTY_CONTENT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setContent(BeneficiarySetupNotificationContent content) { + this.content = content; + } + + + public BeneficiarySetupNotification error(NotificationErrorContainer error) { + this.error = error; + return this; + } + + /** + * Get error + * @return error + **/ + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_ERROR) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public NotificationErrorContainer getError() { + return error; + } + + + @JsonProperty(JSON_PROPERTY_ERROR) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setError(NotificationErrorContainer error) { + this.error = error; + } + + + public BeneficiarySetupNotification eventDate(OffsetDateTime eventDate) { + this.eventDate = eventDate; + return this; + } + + /** + * The date and time when an event has been completed. + * @return eventDate + **/ + @ApiModelProperty(required = true, value = "The date and time when an event has been completed.") + @JsonProperty(JSON_PROPERTY_EVENT_DATE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public OffsetDateTime getEventDate() { + return eventDate; + } + + + @JsonProperty(JSON_PROPERTY_EVENT_DATE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEventDate(OffsetDateTime eventDate) { + this.eventDate = eventDate; + } + + + public BeneficiarySetupNotification eventType(String eventType) { + this.eventType = eventType; + return this; + } + + /** + * The event type of the notification. + * @return eventType + **/ + @ApiModelProperty(required = true, value = "The event type of the notification.") + @JsonProperty(JSON_PROPERTY_EVENT_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getEventType() { + return eventType; + } + + + @JsonProperty(JSON_PROPERTY_EVENT_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEventType(String eventType) { + this.eventType = eventType; + } + + + public BeneficiarySetupNotification executingUserKey(String executingUserKey) { + this.executingUserKey = executingUserKey; + return this; + } + + /** + * The user or process that has triggered the notification. + * @return executingUserKey + **/ + @ApiModelProperty(required = true, value = "The user or process that has triggered the notification.") + @JsonProperty(JSON_PROPERTY_EXECUTING_USER_KEY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getExecutingUserKey() { + return executingUserKey; + } + + + @JsonProperty(JSON_PROPERTY_EXECUTING_USER_KEY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setExecutingUserKey(String executingUserKey) { + this.executingUserKey = executingUserKey; + } + + + public BeneficiarySetupNotification live(Boolean live) { + this.live = live; + return this; + } + + /** + * Indicates whether the notification originated from the live environment or the test environment. If true, the notification originated from the live environment. If false, the notification originated from the test environment. + * @return live + **/ + @ApiModelProperty(required = true, value = "Indicates whether the notification originated from the live environment or the test environment. If true, the notification originated from the live environment. If false, the notification originated from the test environment.") + @JsonProperty(JSON_PROPERTY_LIVE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getLive() { + return live; + } + + + @JsonProperty(JSON_PROPERTY_LIVE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setLive(Boolean live) { + this.live = live; + } + + + public BeneficiarySetupNotification pspReference(String pspReference) { + this.pspReference = pspReference; + return this; + } + + /** + * The PSP reference of the request from which the notification originates. + * @return pspReference + **/ + @ApiModelProperty(required = true, value = "The PSP reference of the request from which the notification originates.") + @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; + } + + + /** + * Return true if this BeneficiarySetupNotification object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + BeneficiarySetupNotification beneficiarySetupNotification = (BeneficiarySetupNotification) o; + return Objects.equals(this.content, beneficiarySetupNotification.content) && + Objects.equals(this.error, beneficiarySetupNotification.error) && + Objects.equals(this.eventDate, beneficiarySetupNotification.eventDate) && + Objects.equals(this.eventType, beneficiarySetupNotification.eventType) && + Objects.equals(this.executingUserKey, beneficiarySetupNotification.executingUserKey) && + Objects.equals(this.live, beneficiarySetupNotification.live) && + Objects.equals(this.pspReference, beneficiarySetupNotification.pspReference); + } + + @Override + public int hashCode() { + return Objects.hash(content, error, eventDate, eventType, executingUserKey, live, pspReference); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class BeneficiarySetupNotification {\n"); + sb.append(" content: ").append(toIndentedString(content)).append("\n"); + sb.append(" error: ").append(toIndentedString(error)).append("\n"); + sb.append(" eventDate: ").append(toIndentedString(eventDate)).append("\n"); + sb.append(" eventType: ").append(toIndentedString(eventType)).append("\n"); + sb.append(" executingUserKey: ").append(toIndentedString(executingUserKey)).append("\n"); + sb.append(" live: ").append(toIndentedString(live)).append("\n"); + sb.append(" pspReference: ").append(toIndentedString(pspReference)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line 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 BeneficiarySetupNotification given an JSON string + * + * @param jsonString JSON string + * @return An instance of BeneficiarySetupNotification + * @throws JsonProcessingException if the JSON string is invalid with respect to BeneficiarySetupNotification + */ + public static BeneficiarySetupNotification fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, BeneficiarySetupNotification.class); + } +/** + * Convert an instance of BeneficiarySetupNotification 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/marketpaywebhooks/BeneficiarySetupNotificationContent.java b/src/main/java/com/adyen/model/marketpaywebhooks/BeneficiarySetupNotificationContent.java new file mode 100644 index 000000000..aba9f1965 --- /dev/null +++ b/src/main/java/com/adyen/model/marketpaywebhooks/BeneficiarySetupNotificationContent.java @@ -0,0 +1,326 @@ +/* + * Classic Platforms - Notifications + * + * 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.marketpaywebhooks; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.adyen.model.marketpaywebhooks.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.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.core.JsonProcessingException; + + +/** + * BeneficiarySetupNotificationContent + */ +@JsonPropertyOrder({ + BeneficiarySetupNotificationContent.JSON_PROPERTY_DESTINATION_ACCOUNT_CODE, + BeneficiarySetupNotificationContent.JSON_PROPERTY_DESTINATION_ACCOUNT_HOLDER_CODE, + BeneficiarySetupNotificationContent.JSON_PROPERTY_INVALID_FIELDS, + BeneficiarySetupNotificationContent.JSON_PROPERTY_MERCHANT_REFERENCE, + BeneficiarySetupNotificationContent.JSON_PROPERTY_SOURCE_ACCOUNT_CODE, + BeneficiarySetupNotificationContent.JSON_PROPERTY_SOURCE_ACCOUNT_HOLDER_CODE, + BeneficiarySetupNotificationContent.JSON_PROPERTY_TRANSFER_DATE +}) + +public class BeneficiarySetupNotificationContent { + public static final String JSON_PROPERTY_DESTINATION_ACCOUNT_CODE = "destinationAccountCode"; + private String destinationAccountCode; + + public static final String JSON_PROPERTY_DESTINATION_ACCOUNT_HOLDER_CODE = "destinationAccountHolderCode"; + private String destinationAccountHolderCode; + + 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_SOURCE_ACCOUNT_CODE = "sourceAccountCode"; + private String sourceAccountCode; + + public static final String JSON_PROPERTY_SOURCE_ACCOUNT_HOLDER_CODE = "sourceAccountHolderCode"; + private String sourceAccountHolderCode; + + public static final String JSON_PROPERTY_TRANSFER_DATE = "transferDate"; + private OffsetDateTime transferDate; + + public BeneficiarySetupNotificationContent() { + } + + public BeneficiarySetupNotificationContent destinationAccountCode(String destinationAccountCode) { + this.destinationAccountCode = destinationAccountCode; + return this; + } + + /** + * The code of the beneficiary account. + * @return destinationAccountCode + **/ + @ApiModelProperty(value = "The code of the beneficiary account.") + @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 BeneficiarySetupNotificationContent destinationAccountHolderCode(String destinationAccountHolderCode) { + this.destinationAccountHolderCode = destinationAccountHolderCode; + return this; + } + + /** + * The code of the beneficiary Account Holder. + * @return destinationAccountHolderCode + **/ + @ApiModelProperty(value = "The code of the beneficiary Account Holder.") + @JsonProperty(JSON_PROPERTY_DESTINATION_ACCOUNT_HOLDER_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getDestinationAccountHolderCode() { + return destinationAccountHolderCode; + } + + + @JsonProperty(JSON_PROPERTY_DESTINATION_ACCOUNT_HOLDER_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDestinationAccountHolderCode(String destinationAccountHolderCode) { + this.destinationAccountHolderCode = destinationAccountHolderCode; + } + + + public BeneficiarySetupNotificationContent invalidFields(List invalidFields) { + this.invalidFields = invalidFields; + return this; + } + + public BeneficiarySetupNotificationContent addInvalidFieldsItem(ErrorFieldType invalidFieldsItem) { + if (this.invalidFields == null) { + this.invalidFields = new ArrayList<>(); + } + this.invalidFields.add(invalidFieldsItem); + return this; + } + + /** + * A listing of the invalid fields which have caused the Setup Beneficiary request to fail. If this is empty, the Setup Beneficiary request has succeeded. + * @return invalidFields + **/ + @ApiModelProperty(value = "A listing of the invalid fields which have caused the Setup Beneficiary request to fail. If this is empty, the Setup Beneficiary request has succeeded.") + @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 BeneficiarySetupNotificationContent merchantReference(String merchantReference) { + this.merchantReference = merchantReference; + return this; + } + + /** + * The reference provided by the merchant. + * @return merchantReference + **/ + @ApiModelProperty(value = "The reference provided by the merchant.") + @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 BeneficiarySetupNotificationContent sourceAccountCode(String sourceAccountCode) { + this.sourceAccountCode = sourceAccountCode; + return this; + } + + /** + * The code of the benefactor account. + * @return sourceAccountCode + **/ + @ApiModelProperty(value = "The code of 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; + } + + + public BeneficiarySetupNotificationContent sourceAccountHolderCode(String sourceAccountHolderCode) { + this.sourceAccountHolderCode = sourceAccountHolderCode; + return this; + } + + /** + * The code of the benefactor Account Holder. + * @return sourceAccountHolderCode + **/ + @ApiModelProperty(value = "The code of the benefactor Account Holder.") + @JsonProperty(JSON_PROPERTY_SOURCE_ACCOUNT_HOLDER_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getSourceAccountHolderCode() { + return sourceAccountHolderCode; + } + + + @JsonProperty(JSON_PROPERTY_SOURCE_ACCOUNT_HOLDER_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSourceAccountHolderCode(String sourceAccountHolderCode) { + this.sourceAccountHolderCode = sourceAccountHolderCode; + } + + + public BeneficiarySetupNotificationContent transferDate(OffsetDateTime transferDate) { + this.transferDate = transferDate; + return this; + } + + /** + * The date on which the beneficiary was set up and funds transferred from benefactor to beneficiary. + * @return transferDate + **/ + @ApiModelProperty(value = "The date on which the beneficiary was set up and funds transferred from benefactor to beneficiary.") + @JsonProperty(JSON_PROPERTY_TRANSFER_DATE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public OffsetDateTime getTransferDate() { + return transferDate; + } + + + @JsonProperty(JSON_PROPERTY_TRANSFER_DATE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTransferDate(OffsetDateTime transferDate) { + this.transferDate = transferDate; + } + + + /** + * Return true if this BeneficiarySetupNotificationContent object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + BeneficiarySetupNotificationContent beneficiarySetupNotificationContent = (BeneficiarySetupNotificationContent) o; + return Objects.equals(this.destinationAccountCode, beneficiarySetupNotificationContent.destinationAccountCode) && + Objects.equals(this.destinationAccountHolderCode, beneficiarySetupNotificationContent.destinationAccountHolderCode) && + Objects.equals(this.invalidFields, beneficiarySetupNotificationContent.invalidFields) && + Objects.equals(this.merchantReference, beneficiarySetupNotificationContent.merchantReference) && + Objects.equals(this.sourceAccountCode, beneficiarySetupNotificationContent.sourceAccountCode) && + Objects.equals(this.sourceAccountHolderCode, beneficiarySetupNotificationContent.sourceAccountHolderCode) && + Objects.equals(this.transferDate, beneficiarySetupNotificationContent.transferDate); + } + + @Override + public int hashCode() { + return Objects.hash(destinationAccountCode, destinationAccountHolderCode, invalidFields, merchantReference, sourceAccountCode, sourceAccountHolderCode, transferDate); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class BeneficiarySetupNotificationContent {\n"); + sb.append(" destinationAccountCode: ").append(toIndentedString(destinationAccountCode)).append("\n"); + sb.append(" destinationAccountHolderCode: ").append(toIndentedString(destinationAccountHolderCode)).append("\n"); + sb.append(" invalidFields: ").append(toIndentedString(invalidFields)).append("\n"); + sb.append(" merchantReference: ").append(toIndentedString(merchantReference)).append("\n"); + sb.append(" sourceAccountCode: ").append(toIndentedString(sourceAccountCode)).append("\n"); + sb.append(" sourceAccountHolderCode: ").append(toIndentedString(sourceAccountHolderCode)).append("\n"); + sb.append(" transferDate: ").append(toIndentedString(transferDate)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line 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 BeneficiarySetupNotificationContent given an JSON string + * + * @param jsonString JSON string + * @return An instance of BeneficiarySetupNotificationContent + * @throws JsonProcessingException if the JSON string is invalid with respect to BeneficiarySetupNotificationContent + */ + public static BeneficiarySetupNotificationContent fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, BeneficiarySetupNotificationContent.class); + } +/** + * Convert an instance of BeneficiarySetupNotificationContent 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/marketpaywebhooks/BusinessDetails.java b/src/main/java/com/adyen/model/marketpaywebhooks/BusinessDetails.java new file mode 100644 index 000000000..5865b7380 --- /dev/null +++ b/src/main/java/com/adyen/model/marketpaywebhooks/BusinessDetails.java @@ -0,0 +1,436 @@ +/* + * Classic Platforms - Notifications + * + * 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.marketpaywebhooks; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.adyen.model.marketpaywebhooks.ShareholderContact; +import com.adyen.model.marketpaywebhooks.SignatoryContact; +import com.adyen.model.marketpaywebhooks.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/marketpaywebhooks/CloseAccountResponse.java b/src/main/java/com/adyen/model/marketpaywebhooks/CloseAccountResponse.java new file mode 100644 index 000000000..5e11b35ed --- /dev/null +++ b/src/main/java/com/adyen/model/marketpaywebhooks/CloseAccountResponse.java @@ -0,0 +1,302 @@ +/* + * Classic Platforms - Notifications + * + * 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.marketpaywebhooks; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.adyen.model.marketpaywebhooks.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/marketpaywebhooks/CompensateNegativeBalanceNotification.java b/src/main/java/com/adyen/model/marketpaywebhooks/CompensateNegativeBalanceNotification.java new file mode 100644 index 000000000..30b79f58c --- /dev/null +++ b/src/main/java/com/adyen/model/marketpaywebhooks/CompensateNegativeBalanceNotification.java @@ -0,0 +1,317 @@ +/* + * Classic Platforms - Notifications + * + * 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.marketpaywebhooks; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.adyen.model.marketpaywebhooks.CompensateNegativeBalanceNotificationContent; +import com.adyen.model.marketpaywebhooks.NotificationErrorContainer; +import com.fasterxml.jackson.annotation.JsonInclude; +import 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; + + +/** + * CompensateNegativeBalanceNotification + */ +@JsonPropertyOrder({ + CompensateNegativeBalanceNotification.JSON_PROPERTY_CONTENT, + CompensateNegativeBalanceNotification.JSON_PROPERTY_ERROR, + CompensateNegativeBalanceNotification.JSON_PROPERTY_EVENT_DATE, + CompensateNegativeBalanceNotification.JSON_PROPERTY_EVENT_TYPE, + CompensateNegativeBalanceNotification.JSON_PROPERTY_EXECUTING_USER_KEY, + CompensateNegativeBalanceNotification.JSON_PROPERTY_LIVE, + CompensateNegativeBalanceNotification.JSON_PROPERTY_PSP_REFERENCE +}) + +public class CompensateNegativeBalanceNotification { + public static final String JSON_PROPERTY_CONTENT = "content"; + private CompensateNegativeBalanceNotificationContent content; + + public static final String JSON_PROPERTY_ERROR = "error"; + private NotificationErrorContainer error; + + public static final String JSON_PROPERTY_EVENT_DATE = "eventDate"; + private OffsetDateTime eventDate; + + public static final String JSON_PROPERTY_EVENT_TYPE = "eventType"; + private String eventType; + + public static final String JSON_PROPERTY_EXECUTING_USER_KEY = "executingUserKey"; + private String executingUserKey; + + public static final String JSON_PROPERTY_LIVE = "live"; + private Boolean live; + + public static final String JSON_PROPERTY_PSP_REFERENCE = "pspReference"; + private String pspReference; + + public CompensateNegativeBalanceNotification() { + } + + public CompensateNegativeBalanceNotification content(CompensateNegativeBalanceNotificationContent content) { + this.content = content; + return this; + } + + /** + * Get content + * @return content + **/ + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_CONTENT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public CompensateNegativeBalanceNotificationContent getContent() { + return content; + } + + + @JsonProperty(JSON_PROPERTY_CONTENT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setContent(CompensateNegativeBalanceNotificationContent content) { + this.content = content; + } + + + public CompensateNegativeBalanceNotification error(NotificationErrorContainer error) { + this.error = error; + return this; + } + + /** + * Get error + * @return error + **/ + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_ERROR) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public NotificationErrorContainer getError() { + return error; + } + + + @JsonProperty(JSON_PROPERTY_ERROR) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setError(NotificationErrorContainer error) { + this.error = error; + } + + + public CompensateNegativeBalanceNotification eventDate(OffsetDateTime eventDate) { + this.eventDate = eventDate; + return this; + } + + /** + * The date and time when an event has been completed. + * @return eventDate + **/ + @ApiModelProperty(required = true, value = "The date and time when an event has been completed.") + @JsonProperty(JSON_PROPERTY_EVENT_DATE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public OffsetDateTime getEventDate() { + return eventDate; + } + + + @JsonProperty(JSON_PROPERTY_EVENT_DATE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEventDate(OffsetDateTime eventDate) { + this.eventDate = eventDate; + } + + + public CompensateNegativeBalanceNotification eventType(String eventType) { + this.eventType = eventType; + return this; + } + + /** + * The event type of the notification. + * @return eventType + **/ + @ApiModelProperty(required = true, value = "The event type of the notification.") + @JsonProperty(JSON_PROPERTY_EVENT_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getEventType() { + return eventType; + } + + + @JsonProperty(JSON_PROPERTY_EVENT_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEventType(String eventType) { + this.eventType = eventType; + } + + + public CompensateNegativeBalanceNotification executingUserKey(String executingUserKey) { + this.executingUserKey = executingUserKey; + return this; + } + + /** + * The user or process that has triggered the notification. + * @return executingUserKey + **/ + @ApiModelProperty(required = true, value = "The user or process that has triggered the notification.") + @JsonProperty(JSON_PROPERTY_EXECUTING_USER_KEY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getExecutingUserKey() { + return executingUserKey; + } + + + @JsonProperty(JSON_PROPERTY_EXECUTING_USER_KEY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setExecutingUserKey(String executingUserKey) { + this.executingUserKey = executingUserKey; + } + + + public CompensateNegativeBalanceNotification live(Boolean live) { + this.live = live; + return this; + } + + /** + * Indicates whether the notification originated from the live environment or the test environment. If true, the notification originated from the live environment. If false, the notification originated from the test environment. + * @return live + **/ + @ApiModelProperty(required = true, value = "Indicates whether the notification originated from the live environment or the test environment. If true, the notification originated from the live environment. If false, the notification originated from the test environment.") + @JsonProperty(JSON_PROPERTY_LIVE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getLive() { + return live; + } + + + @JsonProperty(JSON_PROPERTY_LIVE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setLive(Boolean live) { + this.live = live; + } + + + public CompensateNegativeBalanceNotification pspReference(String pspReference) { + this.pspReference = pspReference; + return this; + } + + /** + * The PSP reference of the request from which the notification originates. + * @return pspReference + **/ + @ApiModelProperty(required = true, value = "The PSP reference of the request from which the notification originates.") + @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; + } + + + /** + * Return true if this CompensateNegativeBalanceNotification object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CompensateNegativeBalanceNotification compensateNegativeBalanceNotification = (CompensateNegativeBalanceNotification) o; + return Objects.equals(this.content, compensateNegativeBalanceNotification.content) && + Objects.equals(this.error, compensateNegativeBalanceNotification.error) && + Objects.equals(this.eventDate, compensateNegativeBalanceNotification.eventDate) && + Objects.equals(this.eventType, compensateNegativeBalanceNotification.eventType) && + Objects.equals(this.executingUserKey, compensateNegativeBalanceNotification.executingUserKey) && + Objects.equals(this.live, compensateNegativeBalanceNotification.live) && + Objects.equals(this.pspReference, compensateNegativeBalanceNotification.pspReference); + } + + @Override + public int hashCode() { + return Objects.hash(content, error, eventDate, eventType, executingUserKey, live, pspReference); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CompensateNegativeBalanceNotification {\n"); + sb.append(" content: ").append(toIndentedString(content)).append("\n"); + sb.append(" error: ").append(toIndentedString(error)).append("\n"); + sb.append(" eventDate: ").append(toIndentedString(eventDate)).append("\n"); + sb.append(" eventType: ").append(toIndentedString(eventType)).append("\n"); + sb.append(" executingUserKey: ").append(toIndentedString(executingUserKey)).append("\n"); + sb.append(" live: ").append(toIndentedString(live)).append("\n"); + sb.append(" pspReference: ").append(toIndentedString(pspReference)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line 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 CompensateNegativeBalanceNotification given an JSON string + * + * @param jsonString JSON string + * @return An instance of CompensateNegativeBalanceNotification + * @throws JsonProcessingException if the JSON string is invalid with respect to CompensateNegativeBalanceNotification + */ + public static CompensateNegativeBalanceNotification fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, CompensateNegativeBalanceNotification.class); + } +/** + * Convert an instance of CompensateNegativeBalanceNotification 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/marketpaywebhooks/CompensateNegativeBalanceNotificationContent.java b/src/main/java/com/adyen/model/marketpaywebhooks/CompensateNegativeBalanceNotificationContent.java new file mode 100644 index 000000000..bfbcabcac --- /dev/null +++ b/src/main/java/com/adyen/model/marketpaywebhooks/CompensateNegativeBalanceNotificationContent.java @@ -0,0 +1,139 @@ +/* + * Classic Platforms - Notifications + * + * 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.marketpaywebhooks; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.adyen.model.marketpaywebhooks.CompensateNegativeBalanceNotificationRecord; +import com.fasterxml.jackson.annotation.JsonInclude; +import 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; + + +/** + * CompensateNegativeBalanceNotificationContent + */ +@JsonPropertyOrder({ + CompensateNegativeBalanceNotificationContent.JSON_PROPERTY_RECORDS +}) + +public class CompensateNegativeBalanceNotificationContent { + public static final String JSON_PROPERTY_RECORDS = "records"; + private List records = null; + + public CompensateNegativeBalanceNotificationContent() { + } + + public CompensateNegativeBalanceNotificationContent records(List records) { + this.records = records; + return this; + } + + public CompensateNegativeBalanceNotificationContent addRecordsItem(CompensateNegativeBalanceNotificationRecord recordsItem) { + if (this.records == null) { + this.records = new ArrayList<>(); + } + this.records.add(recordsItem); + return this; + } + + /** + * A list of the negative balances compensated. + * @return records + **/ + @ApiModelProperty(value = "A list of the negative balances compensated.") + @JsonProperty(JSON_PROPERTY_RECORDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getRecords() { + return records; + } + + + @JsonProperty(JSON_PROPERTY_RECORDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setRecords(List records) { + this.records = records; + } + + + /** + * Return true if this CompensateNegativeBalanceNotificationContent object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CompensateNegativeBalanceNotificationContent compensateNegativeBalanceNotificationContent = (CompensateNegativeBalanceNotificationContent) o; + return Objects.equals(this.records, compensateNegativeBalanceNotificationContent.records); + } + + @Override + public int hashCode() { + return Objects.hash(records); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CompensateNegativeBalanceNotificationContent {\n"); + sb.append(" records: ").append(toIndentedString(records)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line 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 CompensateNegativeBalanceNotificationContent given an JSON string + * + * @param jsonString JSON string + * @return An instance of CompensateNegativeBalanceNotificationContent + * @throws JsonProcessingException if the JSON string is invalid with respect to CompensateNegativeBalanceNotificationContent + */ + public static CompensateNegativeBalanceNotificationContent fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, CompensateNegativeBalanceNotificationContent.class); + } +/** + * Convert an instance of CompensateNegativeBalanceNotificationContent 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/marketpaywebhooks/CompensateNegativeBalanceNotificationRecord.java b/src/main/java/com/adyen/model/marketpaywebhooks/CompensateNegativeBalanceNotificationRecord.java new file mode 100644 index 000000000..74c5a908f --- /dev/null +++ b/src/main/java/com/adyen/model/marketpaywebhooks/CompensateNegativeBalanceNotificationRecord.java @@ -0,0 +1,192 @@ +/* + * Classic Platforms - Notifications + * + * 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.marketpaywebhooks; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.adyen.model.marketpaywebhooks.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.time.OffsetDateTime; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.core.JsonProcessingException; + + +/** + * CompensateNegativeBalanceNotificationRecord + */ +@JsonPropertyOrder({ + CompensateNegativeBalanceNotificationRecord.JSON_PROPERTY_ACCOUNT_CODE, + CompensateNegativeBalanceNotificationRecord.JSON_PROPERTY_AMOUNT, + CompensateNegativeBalanceNotificationRecord.JSON_PROPERTY_TRANSFER_DATE +}) + +public class CompensateNegativeBalanceNotificationRecord { + public static final String JSON_PROPERTY_ACCOUNT_CODE = "accountCode"; + private String accountCode; + + public static final String JSON_PROPERTY_AMOUNT = "amount"; + private Amount amount; + + public static final String JSON_PROPERTY_TRANSFER_DATE = "transferDate"; + private OffsetDateTime transferDate; + + public CompensateNegativeBalanceNotificationRecord() { + } + + public CompensateNegativeBalanceNotificationRecord accountCode(String accountCode) { + this.accountCode = accountCode; + return this; + } + + /** + * The code of the account whose negative balance has been compensated. + * @return accountCode + **/ + @ApiModelProperty(value = "The code of the account whose negative balance has been compensated.") + @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 CompensateNegativeBalanceNotificationRecord 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 CompensateNegativeBalanceNotificationRecord transferDate(OffsetDateTime transferDate) { + this.transferDate = transferDate; + return this; + } + + /** + * The date on which the compensation took place. + * @return transferDate + **/ + @ApiModelProperty(value = "The date on which the compensation took place.") + @JsonProperty(JSON_PROPERTY_TRANSFER_DATE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public OffsetDateTime getTransferDate() { + return transferDate; + } + + + @JsonProperty(JSON_PROPERTY_TRANSFER_DATE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTransferDate(OffsetDateTime transferDate) { + this.transferDate = transferDate; + } + + + /** + * Return true if this CompensateNegativeBalanceNotificationRecord object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CompensateNegativeBalanceNotificationRecord compensateNegativeBalanceNotificationRecord = (CompensateNegativeBalanceNotificationRecord) o; + return Objects.equals(this.accountCode, compensateNegativeBalanceNotificationRecord.accountCode) && + Objects.equals(this.amount, compensateNegativeBalanceNotificationRecord.amount) && + Objects.equals(this.transferDate, compensateNegativeBalanceNotificationRecord.transferDate); + } + + @Override + public int hashCode() { + return Objects.hash(accountCode, amount, transferDate); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CompensateNegativeBalanceNotificationRecord {\n"); + sb.append(" accountCode: ").append(toIndentedString(accountCode)).append("\n"); + sb.append(" amount: ").append(toIndentedString(amount)).append("\n"); + sb.append(" transferDate: ").append(toIndentedString(transferDate)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line 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 CompensateNegativeBalanceNotificationRecord given an JSON string + * + * @param jsonString JSON string + * @return An instance of CompensateNegativeBalanceNotificationRecord + * @throws JsonProcessingException if the JSON string is invalid with respect to CompensateNegativeBalanceNotificationRecord + */ + public static CompensateNegativeBalanceNotificationRecord fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, CompensateNegativeBalanceNotificationRecord.class); + } +/** + * Convert an instance of CompensateNegativeBalanceNotificationRecord 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/marketpaywebhooks/CreateAccountHolderResponse.java b/src/main/java/com/adyen/model/marketpaywebhooks/CreateAccountHolderResponse.java new file mode 100644 index 000000000..688324785 --- /dev/null +++ b/src/main/java/com/adyen/model/marketpaywebhooks/CreateAccountHolderResponse.java @@ -0,0 +1,527 @@ +/* + * Classic Platforms - Notifications + * + * 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.marketpaywebhooks; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.adyen.model.marketpaywebhooks.AccountHolderDetails; +import com.adyen.model.marketpaywebhooks.AccountHolderStatus; +import com.adyen.model.marketpaywebhooks.ErrorFieldType; +import com.adyen.model.marketpaywebhooks.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/marketpaywebhooks/CreateAccountResponse.java b/src/main/java/com/adyen/model/marketpaywebhooks/CreateAccountResponse.java new file mode 100644 index 000000000..868405306 --- /dev/null +++ b/src/main/java/com/adyen/model/marketpaywebhooks/CreateAccountResponse.java @@ -0,0 +1,567 @@ +/* + * Classic Platforms - Notifications + * + * 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.marketpaywebhooks; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.adyen.model.marketpaywebhooks.ErrorFieldType; +import com.adyen.model.marketpaywebhooks.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/marketpaywebhooks/DirectDebitInitiatedNotification.java b/src/main/java/com/adyen/model/marketpaywebhooks/DirectDebitInitiatedNotification.java new file mode 100644 index 000000000..a08a1b0aa --- /dev/null +++ b/src/main/java/com/adyen/model/marketpaywebhooks/DirectDebitInitiatedNotification.java @@ -0,0 +1,317 @@ +/* + * Classic Platforms - Notifications + * + * 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.marketpaywebhooks; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.adyen.model.marketpaywebhooks.DirectDebitInitiatedNotificationContent; +import com.adyen.model.marketpaywebhooks.NotificationErrorContainer; +import com.fasterxml.jackson.annotation.JsonInclude; +import 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; + + +/** + * DirectDebitInitiatedNotification + */ +@JsonPropertyOrder({ + DirectDebitInitiatedNotification.JSON_PROPERTY_CONTENT, + DirectDebitInitiatedNotification.JSON_PROPERTY_ERROR, + DirectDebitInitiatedNotification.JSON_PROPERTY_EVENT_DATE, + DirectDebitInitiatedNotification.JSON_PROPERTY_EVENT_TYPE, + DirectDebitInitiatedNotification.JSON_PROPERTY_EXECUTING_USER_KEY, + DirectDebitInitiatedNotification.JSON_PROPERTY_LIVE, + DirectDebitInitiatedNotification.JSON_PROPERTY_PSP_REFERENCE +}) + +public class DirectDebitInitiatedNotification { + public static final String JSON_PROPERTY_CONTENT = "content"; + private DirectDebitInitiatedNotificationContent content; + + public static final String JSON_PROPERTY_ERROR = "error"; + private NotificationErrorContainer error; + + public static final String JSON_PROPERTY_EVENT_DATE = "eventDate"; + private OffsetDateTime eventDate; + + public static final String JSON_PROPERTY_EVENT_TYPE = "eventType"; + private String eventType; + + public static final String JSON_PROPERTY_EXECUTING_USER_KEY = "executingUserKey"; + private String executingUserKey; + + public static final String JSON_PROPERTY_LIVE = "live"; + private Boolean live; + + public static final String JSON_PROPERTY_PSP_REFERENCE = "pspReference"; + private String pspReference; + + public DirectDebitInitiatedNotification() { + } + + public DirectDebitInitiatedNotification content(DirectDebitInitiatedNotificationContent content) { + this.content = content; + return this; + } + + /** + * Get content + * @return content + **/ + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_CONTENT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public DirectDebitInitiatedNotificationContent getContent() { + return content; + } + + + @JsonProperty(JSON_PROPERTY_CONTENT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setContent(DirectDebitInitiatedNotificationContent content) { + this.content = content; + } + + + public DirectDebitInitiatedNotification error(NotificationErrorContainer error) { + this.error = error; + return this; + } + + /** + * Get error + * @return error + **/ + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_ERROR) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public NotificationErrorContainer getError() { + return error; + } + + + @JsonProperty(JSON_PROPERTY_ERROR) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setError(NotificationErrorContainer error) { + this.error = error; + } + + + public DirectDebitInitiatedNotification eventDate(OffsetDateTime eventDate) { + this.eventDate = eventDate; + return this; + } + + /** + * The date and time when an event has been completed. + * @return eventDate + **/ + @ApiModelProperty(required = true, value = "The date and time when an event has been completed.") + @JsonProperty(JSON_PROPERTY_EVENT_DATE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public OffsetDateTime getEventDate() { + return eventDate; + } + + + @JsonProperty(JSON_PROPERTY_EVENT_DATE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEventDate(OffsetDateTime eventDate) { + this.eventDate = eventDate; + } + + + public DirectDebitInitiatedNotification eventType(String eventType) { + this.eventType = eventType; + return this; + } + + /** + * The event type of the notification. + * @return eventType + **/ + @ApiModelProperty(required = true, value = "The event type of the notification.") + @JsonProperty(JSON_PROPERTY_EVENT_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getEventType() { + return eventType; + } + + + @JsonProperty(JSON_PROPERTY_EVENT_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEventType(String eventType) { + this.eventType = eventType; + } + + + public DirectDebitInitiatedNotification executingUserKey(String executingUserKey) { + this.executingUserKey = executingUserKey; + return this; + } + + /** + * The user or process that has triggered the notification. + * @return executingUserKey + **/ + @ApiModelProperty(required = true, value = "The user or process that has triggered the notification.") + @JsonProperty(JSON_PROPERTY_EXECUTING_USER_KEY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getExecutingUserKey() { + return executingUserKey; + } + + + @JsonProperty(JSON_PROPERTY_EXECUTING_USER_KEY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setExecutingUserKey(String executingUserKey) { + this.executingUserKey = executingUserKey; + } + + + public DirectDebitInitiatedNotification live(Boolean live) { + this.live = live; + return this; + } + + /** + * Indicates whether the notification originated from the live environment or the test environment. If true, the notification originated from the live environment. If false, the notification originated from the test environment. + * @return live + **/ + @ApiModelProperty(required = true, value = "Indicates whether the notification originated from the live environment or the test environment. If true, the notification originated from the live environment. If false, the notification originated from the test environment.") + @JsonProperty(JSON_PROPERTY_LIVE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getLive() { + return live; + } + + + @JsonProperty(JSON_PROPERTY_LIVE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setLive(Boolean live) { + this.live = live; + } + + + public DirectDebitInitiatedNotification pspReference(String pspReference) { + this.pspReference = pspReference; + return this; + } + + /** + * The PSP reference of the request from which the notification originates. + * @return pspReference + **/ + @ApiModelProperty(required = true, value = "The PSP reference of the request from which the notification originates.") + @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; + } + + + /** + * Return true if this DirectDebitInitiatedNotification object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DirectDebitInitiatedNotification directDebitInitiatedNotification = (DirectDebitInitiatedNotification) o; + return Objects.equals(this.content, directDebitInitiatedNotification.content) && + Objects.equals(this.error, directDebitInitiatedNotification.error) && + Objects.equals(this.eventDate, directDebitInitiatedNotification.eventDate) && + Objects.equals(this.eventType, directDebitInitiatedNotification.eventType) && + Objects.equals(this.executingUserKey, directDebitInitiatedNotification.executingUserKey) && + Objects.equals(this.live, directDebitInitiatedNotification.live) && + Objects.equals(this.pspReference, directDebitInitiatedNotification.pspReference); + } + + @Override + public int hashCode() { + return Objects.hash(content, error, eventDate, eventType, executingUserKey, live, pspReference); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DirectDebitInitiatedNotification {\n"); + sb.append(" content: ").append(toIndentedString(content)).append("\n"); + sb.append(" error: ").append(toIndentedString(error)).append("\n"); + sb.append(" eventDate: ").append(toIndentedString(eventDate)).append("\n"); + sb.append(" eventType: ").append(toIndentedString(eventType)).append("\n"); + sb.append(" executingUserKey: ").append(toIndentedString(executingUserKey)).append("\n"); + sb.append(" live: ").append(toIndentedString(live)).append("\n"); + sb.append(" pspReference: ").append(toIndentedString(pspReference)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line 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 DirectDebitInitiatedNotification given an JSON string + * + * @param jsonString JSON string + * @return An instance of DirectDebitInitiatedNotification + * @throws JsonProcessingException if the JSON string is invalid with respect to DirectDebitInitiatedNotification + */ + public static DirectDebitInitiatedNotification fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, DirectDebitInitiatedNotification.class); + } +/** + * Convert an instance of DirectDebitInitiatedNotification 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/marketpaywebhooks/DirectDebitInitiatedNotificationContent.java b/src/main/java/com/adyen/model/marketpaywebhooks/DirectDebitInitiatedNotificationContent.java new file mode 100644 index 000000000..1e2473629 --- /dev/null +++ b/src/main/java/com/adyen/model/marketpaywebhooks/DirectDebitInitiatedNotificationContent.java @@ -0,0 +1,337 @@ +/* + * Classic Platforms - Notifications + * + * 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.marketpaywebhooks; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.adyen.model.marketpaywebhooks.Amount; +import com.adyen.model.marketpaywebhooks.ErrorFieldType; +import com.adyen.model.marketpaywebhooks.OperationStatus; +import com.adyen.model.marketpaywebhooks.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.time.LocalDate; +import java.util.ArrayList; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.core.JsonProcessingException; + + +/** + * DirectDebitInitiatedNotificationContent + */ +@JsonPropertyOrder({ + DirectDebitInitiatedNotificationContent.JSON_PROPERTY_ACCOUNT_CODE, + DirectDebitInitiatedNotificationContent.JSON_PROPERTY_AMOUNT, + DirectDebitInitiatedNotificationContent.JSON_PROPERTY_DEBIT_INITIATION_DATE, + DirectDebitInitiatedNotificationContent.JSON_PROPERTY_INVALID_FIELDS, + DirectDebitInitiatedNotificationContent.JSON_PROPERTY_MERCHANT_ACCOUNT_CODE, + DirectDebitInitiatedNotificationContent.JSON_PROPERTY_SPLITS, + DirectDebitInitiatedNotificationContent.JSON_PROPERTY_STATUS +}) + +public class DirectDebitInitiatedNotificationContent { + public static final String JSON_PROPERTY_ACCOUNT_CODE = "accountCode"; + private String accountCode; + + public static final String JSON_PROPERTY_AMOUNT = "amount"; + private Amount amount; + + public static final String JSON_PROPERTY_DEBIT_INITIATION_DATE = "debitInitiationDate"; + private LocalDate debitInitiationDate; + + public static final String JSON_PROPERTY_INVALID_FIELDS = "invalidFields"; + private List invalidFields = null; + + public static final String JSON_PROPERTY_MERCHANT_ACCOUNT_CODE = "merchantAccountCode"; + private String merchantAccountCode; + + public static final String JSON_PROPERTY_SPLITS = "splits"; + private List splits = null; + + public static final String JSON_PROPERTY_STATUS = "status"; + private OperationStatus status; + + public DirectDebitInitiatedNotificationContent() { + } + + public DirectDebitInitiatedNotificationContent 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 DirectDebitInitiatedNotificationContent 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 DirectDebitInitiatedNotificationContent debitInitiationDate(LocalDate debitInitiationDate) { + this.debitInitiationDate = debitInitiationDate; + return this; + } + + /** + * Get debitInitiationDate + * @return debitInitiationDate + **/ + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_DEBIT_INITIATION_DATE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public LocalDate getDebitInitiationDate() { + return debitInitiationDate; + } + + + @JsonProperty(JSON_PROPERTY_DEBIT_INITIATION_DATE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDebitInitiationDate(LocalDate debitInitiationDate) { + this.debitInitiationDate = debitInitiationDate; + } + + + public DirectDebitInitiatedNotificationContent invalidFields(List invalidFields) { + this.invalidFields = invalidFields; + return this; + } + + public DirectDebitInitiatedNotificationContent addInvalidFieldsItem(ErrorFieldType invalidFieldsItem) { + if (this.invalidFields == null) { + this.invalidFields = new ArrayList<>(); + } + this.invalidFields.add(invalidFieldsItem); + return this; + } + + /** + * Invalid fields list. + * @return invalidFields + **/ + @ApiModelProperty(value = "Invalid fields list.") + @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 DirectDebitInitiatedNotificationContent merchantAccountCode(String merchantAccountCode) { + this.merchantAccountCode = merchantAccountCode; + return this; + } + + /** + * The code of the merchant account. + * @return merchantAccountCode + **/ + @ApiModelProperty(required = true, value = "The code of the merchant account.") + @JsonProperty(JSON_PROPERTY_MERCHANT_ACCOUNT_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getMerchantAccountCode() { + return merchantAccountCode; + } + + + @JsonProperty(JSON_PROPERTY_MERCHANT_ACCOUNT_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMerchantAccountCode(String merchantAccountCode) { + this.merchantAccountCode = merchantAccountCode; + } + + + public DirectDebitInitiatedNotificationContent splits(List splits) { + this.splits = splits; + return this; + } + + public DirectDebitInitiatedNotificationContent addSplitsItem(Split splitsItem) { + if (this.splits == null) { + this.splits = new ArrayList<>(); + } + this.splits.add(splitsItem); + return this; + } + + /** + * The split data for the debit request. + * @return splits + **/ + @ApiModelProperty(value = "The split data for the debit request.") + @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; + } + + + public DirectDebitInitiatedNotificationContent status(OperationStatus status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + **/ + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public OperationStatus getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setStatus(OperationStatus status) { + this.status = status; + } + + + /** + * Return true if this DirectDebitInitiatedNotificationContent object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DirectDebitInitiatedNotificationContent directDebitInitiatedNotificationContent = (DirectDebitInitiatedNotificationContent) o; + return Objects.equals(this.accountCode, directDebitInitiatedNotificationContent.accountCode) && + Objects.equals(this.amount, directDebitInitiatedNotificationContent.amount) && + Objects.equals(this.debitInitiationDate, directDebitInitiatedNotificationContent.debitInitiationDate) && + Objects.equals(this.invalidFields, directDebitInitiatedNotificationContent.invalidFields) && + Objects.equals(this.merchantAccountCode, directDebitInitiatedNotificationContent.merchantAccountCode) && + Objects.equals(this.splits, directDebitInitiatedNotificationContent.splits) && + Objects.equals(this.status, directDebitInitiatedNotificationContent.status); + } + + @Override + public int hashCode() { + return Objects.hash(accountCode, amount, debitInitiationDate, invalidFields, merchantAccountCode, splits, status); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DirectDebitInitiatedNotificationContent {\n"); + sb.append(" accountCode: ").append(toIndentedString(accountCode)).append("\n"); + sb.append(" amount: ").append(toIndentedString(amount)).append("\n"); + sb.append(" debitInitiationDate: ").append(toIndentedString(debitInitiationDate)).append("\n"); + sb.append(" invalidFields: ").append(toIndentedString(invalidFields)).append("\n"); + sb.append(" merchantAccountCode: ").append(toIndentedString(merchantAccountCode)).append("\n"); + sb.append(" splits: ").append(toIndentedString(splits)).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 DirectDebitInitiatedNotificationContent given an JSON string + * + * @param jsonString JSON string + * @return An instance of DirectDebitInitiatedNotificationContent + * @throws JsonProcessingException if the JSON string is invalid with respect to DirectDebitInitiatedNotificationContent + */ + public static DirectDebitInitiatedNotificationContent fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, DirectDebitInitiatedNotificationContent.class); + } +/** + * Convert an instance of DirectDebitInitiatedNotificationContent 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/marketpaywebhooks/ErrorFieldType.java b/src/main/java/com/adyen/model/marketpaywebhooks/ErrorFieldType.java new file mode 100644 index 000000000..79fcc1fe6 --- /dev/null +++ b/src/main/java/com/adyen/model/marketpaywebhooks/ErrorFieldType.java @@ -0,0 +1,191 @@ +/* + * Classic Platforms - Notifications + * + * 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.marketpaywebhooks; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.adyen.model.marketpaywebhooks.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/marketpaywebhooks/FieldType.java b/src/main/java/com/adyen/model/marketpaywebhooks/FieldType.java new file mode 100644 index 000000000..a052477a3 --- /dev/null +++ b/src/main/java/com/adyen/model/marketpaywebhooks/FieldType.java @@ -0,0 +1,545 @@ +/* + * Classic Platforms - Notifications + * + * 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.marketpaywebhooks; + +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/marketpaywebhooks/IndividualDetails.java b/src/main/java/com/adyen/model/marketpaywebhooks/IndividualDetails.java new file mode 100644 index 000000000..fe9bf845a --- /dev/null +++ b/src/main/java/com/adyen/model/marketpaywebhooks/IndividualDetails.java @@ -0,0 +1,161 @@ +/* + * Classic Platforms - Notifications + * + * 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.marketpaywebhooks; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.adyen.model.marketpaywebhooks.ViasName; +import com.adyen.model.marketpaywebhooks.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/marketpaywebhooks/JSON.java b/src/main/java/com/adyen/model/marketpaywebhooks/JSON.java new file mode 100644 index 000000000..1bcb8af21 --- /dev/null +++ b/src/main/java/com/adyen/model/marketpaywebhooks/JSON.java @@ -0,0 +1,253 @@ +package com.adyen.model.marketpaywebhooks; + +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; +import com.fasterxml.jackson.databind.module.SimpleModule; +import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule; +import com.adyen.model.marketpaywebhooks.*; + +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/marketpaywebhooks/KYCCheckResult.java b/src/main/java/com/adyen/model/marketpaywebhooks/KYCCheckResult.java new file mode 100644 index 000000000..d5f66a7ab --- /dev/null +++ b/src/main/java/com/adyen/model/marketpaywebhooks/KYCCheckResult.java @@ -0,0 +1,139 @@ +/* + * Classic Platforms - Notifications + * + * 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.marketpaywebhooks; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.adyen.model.marketpaywebhooks.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/marketpaywebhooks/KYCCheckStatusData.java b/src/main/java/com/adyen/model/marketpaywebhooks/KYCCheckStatusData.java new file mode 100644 index 000000000..4108b25c1 --- /dev/null +++ b/src/main/java/com/adyen/model/marketpaywebhooks/KYCCheckStatusData.java @@ -0,0 +1,330 @@ +/* + * Classic Platforms - Notifications + * + * 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.marketpaywebhooks; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.adyen.model.marketpaywebhooks.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/marketpaywebhooks/KYCCheckSummary.java b/src/main/java/com/adyen/model/marketpaywebhooks/KYCCheckSummary.java new file mode 100644 index 000000000..29b70f49b --- /dev/null +++ b/src/main/java/com/adyen/model/marketpaywebhooks/KYCCheckSummary.java @@ -0,0 +1,159 @@ +/* + * Classic Platforms - Notifications + * + * 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.marketpaywebhooks; + +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/marketpaywebhooks/KYCLegalArrangementCheckResult.java b/src/main/java/com/adyen/model/marketpaywebhooks/KYCLegalArrangementCheckResult.java new file mode 100644 index 000000000..59024a0a3 --- /dev/null +++ b/src/main/java/com/adyen/model/marketpaywebhooks/KYCLegalArrangementCheckResult.java @@ -0,0 +1,170 @@ +/* + * Classic Platforms - Notifications + * + * 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.marketpaywebhooks; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.adyen.model.marketpaywebhooks.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/marketpaywebhooks/KYCLegalArrangementEntityCheckResult.java b/src/main/java/com/adyen/model/marketpaywebhooks/KYCLegalArrangementEntityCheckResult.java new file mode 100644 index 000000000..0703e6c78 --- /dev/null +++ b/src/main/java/com/adyen/model/marketpaywebhooks/KYCLegalArrangementEntityCheckResult.java @@ -0,0 +1,201 @@ +/* + * Classic Platforms - Notifications + * + * 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.marketpaywebhooks; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.adyen.model.marketpaywebhooks.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/marketpaywebhooks/KYCPayoutMethodCheckResult.java b/src/main/java/com/adyen/model/marketpaywebhooks/KYCPayoutMethodCheckResult.java new file mode 100644 index 000000000..4bfae887d --- /dev/null +++ b/src/main/java/com/adyen/model/marketpaywebhooks/KYCPayoutMethodCheckResult.java @@ -0,0 +1,170 @@ +/* + * Classic Platforms - Notifications + * + * 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.marketpaywebhooks; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.adyen.model.marketpaywebhooks.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/marketpaywebhooks/KYCShareholderCheckResult.java b/src/main/java/com/adyen/model/marketpaywebhooks/KYCShareholderCheckResult.java new file mode 100644 index 000000000..1472a6d94 --- /dev/null +++ b/src/main/java/com/adyen/model/marketpaywebhooks/KYCShareholderCheckResult.java @@ -0,0 +1,232 @@ +/* + * Classic Platforms - Notifications + * + * 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.marketpaywebhooks; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.adyen.model.marketpaywebhooks.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/marketpaywebhooks/KYCSignatoryCheckResult.java b/src/main/java/com/adyen/model/marketpaywebhooks/KYCSignatoryCheckResult.java new file mode 100644 index 000000000..c4b92c6ee --- /dev/null +++ b/src/main/java/com/adyen/model/marketpaywebhooks/KYCSignatoryCheckResult.java @@ -0,0 +1,170 @@ +/* + * Classic Platforms - Notifications + * + * 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.marketpaywebhooks; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.adyen.model.marketpaywebhooks.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/marketpaywebhooks/KYCUltimateParentCompanyCheckResult.java b/src/main/java/com/adyen/model/marketpaywebhooks/KYCUltimateParentCompanyCheckResult.java new file mode 100644 index 000000000..a4c19577c --- /dev/null +++ b/src/main/java/com/adyen/model/marketpaywebhooks/KYCUltimateParentCompanyCheckResult.java @@ -0,0 +1,170 @@ +/* + * Classic Platforms - Notifications + * + * 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.marketpaywebhooks; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.adyen.model.marketpaywebhooks.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/marketpaywebhooks/KYCVerificationResult.java b/src/main/java/com/adyen/model/marketpaywebhooks/KYCVerificationResult.java new file mode 100644 index 000000000..2d74f6c1a --- /dev/null +++ b/src/main/java/com/adyen/model/marketpaywebhooks/KYCVerificationResult.java @@ -0,0 +1,371 @@ +/* + * Classic Platforms - Notifications + * + * 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.marketpaywebhooks; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.adyen.model.marketpaywebhooks.KYCCheckResult; +import com.adyen.model.marketpaywebhooks.KYCLegalArrangementCheckResult; +import com.adyen.model.marketpaywebhooks.KYCLegalArrangementEntityCheckResult; +import com.adyen.model.marketpaywebhooks.KYCPayoutMethodCheckResult; +import com.adyen.model.marketpaywebhooks.KYCShareholderCheckResult; +import com.adyen.model.marketpaywebhooks.KYCSignatoryCheckResult; +import com.adyen.model.marketpaywebhooks.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/marketpaywebhooks/LegalArrangementDetail.java b/src/main/java/com/adyen/model/marketpaywebhooks/LegalArrangementDetail.java new file mode 100644 index 000000000..34faa1139 --- /dev/null +++ b/src/main/java/com/adyen/model/marketpaywebhooks/LegalArrangementDetail.java @@ -0,0 +1,494 @@ +/* + * Classic Platforms - Notifications + * + * 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.marketpaywebhooks; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.adyen.model.marketpaywebhooks.LegalArrangementEntityDetail; +import com.adyen.model.marketpaywebhooks.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/marketpaywebhooks/LegalArrangementEntityDetail.java b/src/main/java/com/adyen/model/marketpaywebhooks/LegalArrangementEntityDetail.java new file mode 100644 index 000000000..540b575e5 --- /dev/null +++ b/src/main/java/com/adyen/model/marketpaywebhooks/LegalArrangementEntityDetail.java @@ -0,0 +1,538 @@ +/* + * Classic Platforms - Notifications + * + * 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.marketpaywebhooks; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.adyen.model.marketpaywebhooks.BusinessDetails; +import com.adyen.model.marketpaywebhooks.IndividualDetails; +import com.adyen.model.marketpaywebhooks.ViasAddress; +import com.adyen.model.marketpaywebhooks.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/marketpaywebhooks/LocalDate.java b/src/main/java/com/adyen/model/marketpaywebhooks/LocalDate.java new file mode 100644 index 000000000..a2be9a2c9 --- /dev/null +++ b/src/main/java/com/adyen/model/marketpaywebhooks/LocalDate.java @@ -0,0 +1,159 @@ +/* + * Classic Platforms - Notifications + * + * 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.marketpaywebhooks; + +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; + + +/** + * LocalDate + */ +@JsonPropertyOrder({ + LocalDate.JSON_PROPERTY_MONTH, + LocalDate.JSON_PROPERTY_YEAR +}) + +public class LocalDate { + public static final String JSON_PROPERTY_MONTH = "month"; + private Integer month; + + public static final String JSON_PROPERTY_YEAR = "year"; + private Integer year; + + public LocalDate() { + } + + public LocalDate month(Integer month) { + this.month = month; + return this; + } + + /** + * Get month + * @return month + **/ + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_MONTH) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Integer getMonth() { + return month; + } + + + @JsonProperty(JSON_PROPERTY_MONTH) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMonth(Integer month) { + this.month = month; + } + + + public LocalDate year(Integer year) { + this.year = year; + return this; + } + + /** + * Get year + * @return year + **/ + @ApiModelProperty(value = "") + @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 LocalDate object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LocalDate localDate = (LocalDate) o; + return Objects.equals(this.month, localDate.month) && + Objects.equals(this.year, localDate.year); + } + + @Override + public int hashCode() { + return Objects.hash(month, year); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LocalDate {\n"); + sb.append(" month: ").append(toIndentedString(month)).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 LocalDate given an JSON string + * + * @param jsonString JSON string + * @return An instance of LocalDate + * @throws JsonProcessingException if the JSON string is invalid with respect to LocalDate + */ + public static LocalDate fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, LocalDate.class); + } +/** + * Convert an instance of LocalDate 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/marketpaywebhooks/Message.java b/src/main/java/com/adyen/model/marketpaywebhooks/Message.java new file mode 100644 index 000000000..36dd8b6fa --- /dev/null +++ b/src/main/java/com/adyen/model/marketpaywebhooks/Message.java @@ -0,0 +1,159 @@ +/* + * Classic Platforms - Notifications + * + * 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.marketpaywebhooks; + +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; + + +/** + * Message + */ +@JsonPropertyOrder({ + Message.JSON_PROPERTY_CODE, + Message.JSON_PROPERTY_TEXT +}) + +public class Message { + public static final String JSON_PROPERTY_CODE = "code"; + private String code; + + public static final String JSON_PROPERTY_TEXT = "text"; + private String text; + + public Message() { + } + + public Message code(String code) { + this.code = code; + return this; + } + + /** + * The message code. + * @return code + **/ + @ApiModelProperty(value = "The message code.") + @JsonProperty(JSON_PROPERTY_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getCode() { + return code; + } + + + @JsonProperty(JSON_PROPERTY_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCode(String code) { + this.code = code; + } + + + public Message text(String text) { + this.text = text; + return this; + } + + /** + * The message text. + * @return text + **/ + @ApiModelProperty(value = "The message text.") + @JsonProperty(JSON_PROPERTY_TEXT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getText() { + return text; + } + + + @JsonProperty(JSON_PROPERTY_TEXT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setText(String text) { + this.text = text; + } + + + /** + * Return true if this Message object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Message message = (Message) o; + return Objects.equals(this.code, message.code) && + Objects.equals(this.text, message.text); + } + + @Override + public int hashCode() { + return Objects.hash(code, text); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Message {\n"); + sb.append(" code: ").append(toIndentedString(code)).append("\n"); + sb.append(" text: ").append(toIndentedString(text)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line 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 Message given an JSON string + * + * @param jsonString JSON string + * @return An instance of Message + * @throws JsonProcessingException if the JSON string is invalid with respect to Message + */ + public static Message fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, Message.class); + } +/** + * Convert an instance of Message 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/marketpaywebhooks/NotificationErrorContainer.java b/src/main/java/com/adyen/model/marketpaywebhooks/NotificationErrorContainer.java new file mode 100644 index 000000000..c24f2c5e8 --- /dev/null +++ b/src/main/java/com/adyen/model/marketpaywebhooks/NotificationErrorContainer.java @@ -0,0 +1,159 @@ +/* + * Classic Platforms - Notifications + * + * 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.marketpaywebhooks; + +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; + + +/** + * NotificationErrorContainer + */ +@JsonPropertyOrder({ + NotificationErrorContainer.JSON_PROPERTY_ERROR_CODE, + NotificationErrorContainer.JSON_PROPERTY_MESSAGE +}) + +public class NotificationErrorContainer { + public static final String JSON_PROPERTY_ERROR_CODE = "errorCode"; + private String errorCode; + + public static final String JSON_PROPERTY_MESSAGE = "message"; + private String message; + + public NotificationErrorContainer() { + } + + public NotificationErrorContainer errorCode(String errorCode) { + this.errorCode = errorCode; + return this; + } + + /** + * The Adyen code that is mapped to the error message. + * @return errorCode + **/ + @ApiModelProperty(value = "The Adyen code that is 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 NotificationErrorContainer 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; + } + + + /** + * Return true if this NotificationErrorContainer object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + NotificationErrorContainer notificationErrorContainer = (NotificationErrorContainer) o; + return Objects.equals(this.errorCode, notificationErrorContainer.errorCode) && + Objects.equals(this.message, notificationErrorContainer.message); + } + + @Override + public int hashCode() { + return Objects.hash(errorCode, message); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class NotificationErrorContainer {\n"); + sb.append(" errorCode: ").append(toIndentedString(errorCode)).append("\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line 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 NotificationErrorContainer given an JSON string + * + * @param jsonString JSON string + * @return An instance of NotificationErrorContainer + * @throws JsonProcessingException if the JSON string is invalid with respect to NotificationErrorContainer + */ + public static NotificationErrorContainer fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, NotificationErrorContainer.class); + } +/** + * Convert an instance of NotificationErrorContainer 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/marketpaywebhooks/NotificationResponse.java b/src/main/java/com/adyen/model/marketpaywebhooks/NotificationResponse.java new file mode 100644 index 000000000..025816f87 --- /dev/null +++ b/src/main/java/com/adyen/model/marketpaywebhooks/NotificationResponse.java @@ -0,0 +1,128 @@ +/* + * Classic Platforms - Notifications + * + * 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.marketpaywebhooks; + +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; + + +/** + * NotificationResponse + */ +@JsonPropertyOrder({ + NotificationResponse.JSON_PROPERTY_NOTIFICATION_RESPONSE +}) + +public class NotificationResponse { + public static final String JSON_PROPERTY_NOTIFICATION_RESPONSE = "notificationResponse"; + private String notificationResponse; + + public NotificationResponse() { + } + + public NotificationResponse notificationResponse(String notificationResponse) { + this.notificationResponse = notificationResponse; + return this; + } + + /** + * Set this parameter to **[accepted]** to acknowledge that you received a notification from Adyen. + * @return notificationResponse + **/ + @ApiModelProperty(value = "Set this parameter to **[accepted]** to acknowledge that you received a notification from Adyen.") + @JsonProperty(JSON_PROPERTY_NOTIFICATION_RESPONSE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getNotificationResponse() { + return notificationResponse; + } + + + @JsonProperty(JSON_PROPERTY_NOTIFICATION_RESPONSE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setNotificationResponse(String notificationResponse) { + this.notificationResponse = notificationResponse; + } + + + /** + * Return true if this NotificationResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + NotificationResponse notificationResponse = (NotificationResponse) o; + return Objects.equals(this.notificationResponse, notificationResponse.notificationResponse); + } + + @Override + public int hashCode() { + return Objects.hash(notificationResponse); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class NotificationResponse {\n"); + sb.append(" notificationResponse: ").append(toIndentedString(notificationResponse)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line 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 NotificationResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of NotificationResponse + * @throws JsonProcessingException if the JSON string is invalid with respect to NotificationResponse + */ + public static NotificationResponse fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, NotificationResponse.class); + } +/** + * Convert an instance of NotificationResponse 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/marketpaywebhooks/OperationStatus.java b/src/main/java/com/adyen/model/marketpaywebhooks/OperationStatus.java new file mode 100644 index 000000000..d79e9f3c8 --- /dev/null +++ b/src/main/java/com/adyen/model/marketpaywebhooks/OperationStatus.java @@ -0,0 +1,160 @@ +/* + * Classic Platforms - Notifications + * + * 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.marketpaywebhooks; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.adyen.model.marketpaywebhooks.Message; +import com.fasterxml.jackson.annotation.JsonInclude; +import 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; + + +/** + * OperationStatus + */ +@JsonPropertyOrder({ + OperationStatus.JSON_PROPERTY_MESSAGE, + OperationStatus.JSON_PROPERTY_STATUS_CODE +}) + +public class OperationStatus { + public static final String JSON_PROPERTY_MESSAGE = "message"; + private Message message; + + public static final String JSON_PROPERTY_STATUS_CODE = "statusCode"; + private String statusCode; + + public OperationStatus() { + } + + public OperationStatus message(Message message) { + this.message = message; + return this; + } + + /** + * Get message + * @return message + **/ + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Message getMessage() { + return message; + } + + + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMessage(Message message) { + this.message = message; + } + + + public OperationStatus statusCode(String statusCode) { + this.statusCode = statusCode; + return this; + } + + /** + * The status code. + * @return statusCode + **/ + @ApiModelProperty(value = "The status code.") + @JsonProperty(JSON_PROPERTY_STATUS_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getStatusCode() { + return statusCode; + } + + + @JsonProperty(JSON_PROPERTY_STATUS_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setStatusCode(String statusCode) { + this.statusCode = statusCode; + } + + + /** + * Return true if this OperationStatus object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OperationStatus operationStatus = (OperationStatus) o; + return Objects.equals(this.message, operationStatus.message) && + Objects.equals(this.statusCode, operationStatus.statusCode); + } + + @Override + public int hashCode() { + return Objects.hash(message, statusCode); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OperationStatus {\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append(" statusCode: ").append(toIndentedString(statusCode)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line 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 OperationStatus given an JSON string + * + * @param jsonString JSON string + * @return An instance of OperationStatus + * @throws JsonProcessingException if the JSON string is invalid with respect to OperationStatus + */ + public static OperationStatus fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, OperationStatus.class); + } +/** + * Convert an instance of OperationStatus 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/marketpaywebhooks/PaymentFailureNotification.java b/src/main/java/com/adyen/model/marketpaywebhooks/PaymentFailureNotification.java new file mode 100644 index 000000000..9e9575e41 --- /dev/null +++ b/src/main/java/com/adyen/model/marketpaywebhooks/PaymentFailureNotification.java @@ -0,0 +1,317 @@ +/* + * Classic Platforms - Notifications + * + * 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.marketpaywebhooks; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.adyen.model.marketpaywebhooks.NotificationErrorContainer; +import com.adyen.model.marketpaywebhooks.PaymentFailureNotificationContent; +import com.fasterxml.jackson.annotation.JsonInclude; +import 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; + + +/** + * PaymentFailureNotification + */ +@JsonPropertyOrder({ + PaymentFailureNotification.JSON_PROPERTY_CONTENT, + PaymentFailureNotification.JSON_PROPERTY_ERROR, + PaymentFailureNotification.JSON_PROPERTY_EVENT_DATE, + PaymentFailureNotification.JSON_PROPERTY_EVENT_TYPE, + PaymentFailureNotification.JSON_PROPERTY_EXECUTING_USER_KEY, + PaymentFailureNotification.JSON_PROPERTY_LIVE, + PaymentFailureNotification.JSON_PROPERTY_PSP_REFERENCE +}) + +public class PaymentFailureNotification { + public static final String JSON_PROPERTY_CONTENT = "content"; + private PaymentFailureNotificationContent content; + + public static final String JSON_PROPERTY_ERROR = "error"; + private NotificationErrorContainer error; + + public static final String JSON_PROPERTY_EVENT_DATE = "eventDate"; + private OffsetDateTime eventDate; + + public static final String JSON_PROPERTY_EVENT_TYPE = "eventType"; + private String eventType; + + public static final String JSON_PROPERTY_EXECUTING_USER_KEY = "executingUserKey"; + private String executingUserKey; + + public static final String JSON_PROPERTY_LIVE = "live"; + private Boolean live; + + public static final String JSON_PROPERTY_PSP_REFERENCE = "pspReference"; + private String pspReference; + + public PaymentFailureNotification() { + } + + public PaymentFailureNotification content(PaymentFailureNotificationContent content) { + this.content = content; + return this; + } + + /** + * Get content + * @return content + **/ + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_CONTENT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public PaymentFailureNotificationContent getContent() { + return content; + } + + + @JsonProperty(JSON_PROPERTY_CONTENT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setContent(PaymentFailureNotificationContent content) { + this.content = content; + } + + + public PaymentFailureNotification error(NotificationErrorContainer error) { + this.error = error; + return this; + } + + /** + * Get error + * @return error + **/ + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_ERROR) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public NotificationErrorContainer getError() { + return error; + } + + + @JsonProperty(JSON_PROPERTY_ERROR) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setError(NotificationErrorContainer error) { + this.error = error; + } + + + public PaymentFailureNotification eventDate(OffsetDateTime eventDate) { + this.eventDate = eventDate; + return this; + } + + /** + * The date and time when an event has been completed. + * @return eventDate + **/ + @ApiModelProperty(required = true, value = "The date and time when an event has been completed.") + @JsonProperty(JSON_PROPERTY_EVENT_DATE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public OffsetDateTime getEventDate() { + return eventDate; + } + + + @JsonProperty(JSON_PROPERTY_EVENT_DATE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEventDate(OffsetDateTime eventDate) { + this.eventDate = eventDate; + } + + + public PaymentFailureNotification eventType(String eventType) { + this.eventType = eventType; + return this; + } + + /** + * The event type of the notification. + * @return eventType + **/ + @ApiModelProperty(required = true, value = "The event type of the notification.") + @JsonProperty(JSON_PROPERTY_EVENT_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getEventType() { + return eventType; + } + + + @JsonProperty(JSON_PROPERTY_EVENT_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEventType(String eventType) { + this.eventType = eventType; + } + + + public PaymentFailureNotification executingUserKey(String executingUserKey) { + this.executingUserKey = executingUserKey; + return this; + } + + /** + * The user or process that has triggered the notification. + * @return executingUserKey + **/ + @ApiModelProperty(required = true, value = "The user or process that has triggered the notification.") + @JsonProperty(JSON_PROPERTY_EXECUTING_USER_KEY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getExecutingUserKey() { + return executingUserKey; + } + + + @JsonProperty(JSON_PROPERTY_EXECUTING_USER_KEY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setExecutingUserKey(String executingUserKey) { + this.executingUserKey = executingUserKey; + } + + + public PaymentFailureNotification live(Boolean live) { + this.live = live; + return this; + } + + /** + * Indicates whether the notification originated from the live environment or the test environment. If true, the notification originated from the live environment. If false, the notification originated from the test environment. + * @return live + **/ + @ApiModelProperty(required = true, value = "Indicates whether the notification originated from the live environment or the test environment. If true, the notification originated from the live environment. If false, the notification originated from the test environment.") + @JsonProperty(JSON_PROPERTY_LIVE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getLive() { + return live; + } + + + @JsonProperty(JSON_PROPERTY_LIVE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setLive(Boolean live) { + this.live = live; + } + + + public PaymentFailureNotification pspReference(String pspReference) { + this.pspReference = pspReference; + return this; + } + + /** + * The PSP reference of the request from which the notification originates. + * @return pspReference + **/ + @ApiModelProperty(required = true, value = "The PSP reference of the request from which the notification originates.") + @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; + } + + + /** + * Return true if this PaymentFailureNotification object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PaymentFailureNotification paymentFailureNotification = (PaymentFailureNotification) o; + return Objects.equals(this.content, paymentFailureNotification.content) && + Objects.equals(this.error, paymentFailureNotification.error) && + Objects.equals(this.eventDate, paymentFailureNotification.eventDate) && + Objects.equals(this.eventType, paymentFailureNotification.eventType) && + Objects.equals(this.executingUserKey, paymentFailureNotification.executingUserKey) && + Objects.equals(this.live, paymentFailureNotification.live) && + Objects.equals(this.pspReference, paymentFailureNotification.pspReference); + } + + @Override + public int hashCode() { + return Objects.hash(content, error, eventDate, eventType, executingUserKey, live, pspReference); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PaymentFailureNotification {\n"); + sb.append(" content: ").append(toIndentedString(content)).append("\n"); + sb.append(" error: ").append(toIndentedString(error)).append("\n"); + sb.append(" eventDate: ").append(toIndentedString(eventDate)).append("\n"); + sb.append(" eventType: ").append(toIndentedString(eventType)).append("\n"); + sb.append(" executingUserKey: ").append(toIndentedString(executingUserKey)).append("\n"); + sb.append(" live: ").append(toIndentedString(live)).append("\n"); + sb.append(" pspReference: ").append(toIndentedString(pspReference)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line 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 PaymentFailureNotification given an JSON string + * + * @param jsonString JSON string + * @return An instance of PaymentFailureNotification + * @throws JsonProcessingException if the JSON string is invalid with respect to PaymentFailureNotification + */ + public static PaymentFailureNotification fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, PaymentFailureNotification.class); + } +/** + * Convert an instance of PaymentFailureNotification 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/marketpaywebhooks/PaymentFailureNotificationContent.java b/src/main/java/com/adyen/model/marketpaywebhooks/PaymentFailureNotificationContent.java new file mode 100644 index 000000000..6d2dd53a1 --- /dev/null +++ b/src/main/java/com/adyen/model/marketpaywebhooks/PaymentFailureNotificationContent.java @@ -0,0 +1,295 @@ +/* + * Classic Platforms - Notifications + * + * 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.marketpaywebhooks; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.adyen.model.marketpaywebhooks.ErrorFieldType; +import com.adyen.model.marketpaywebhooks.Message; +import com.fasterxml.jackson.annotation.JsonInclude; +import 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; + + +/** + * PaymentFailureNotificationContent + */ +@JsonPropertyOrder({ + PaymentFailureNotificationContent.JSON_PROPERTY_ERROR_FIELDS, + PaymentFailureNotificationContent.JSON_PROPERTY_ERROR_MESSAGE, + PaymentFailureNotificationContent.JSON_PROPERTY_MODIFICATION_MERCHANT_REFERENCE, + PaymentFailureNotificationContent.JSON_PROPERTY_MODIFICATION_PSP_REFERENCE, + PaymentFailureNotificationContent.JSON_PROPERTY_PAYMENT_MERCHANT_REFERENCE, + PaymentFailureNotificationContent.JSON_PROPERTY_PAYMENT_PSP_REFERENCE +}) + +public class PaymentFailureNotificationContent { + public static final String JSON_PROPERTY_ERROR_FIELDS = "errorFields"; + private List errorFields = null; + + public static final String JSON_PROPERTY_ERROR_MESSAGE = "errorMessage"; + private Message errorMessage; + + public static final String JSON_PROPERTY_MODIFICATION_MERCHANT_REFERENCE = "modificationMerchantReference"; + private String modificationMerchantReference; + + public static final String JSON_PROPERTY_MODIFICATION_PSP_REFERENCE = "modificationPspReference"; + private String modificationPspReference; + + public static final String JSON_PROPERTY_PAYMENT_MERCHANT_REFERENCE = "paymentMerchantReference"; + private String paymentMerchantReference; + + public static final String JSON_PROPERTY_PAYMENT_PSP_REFERENCE = "paymentPspReference"; + private String paymentPspReference; + + public PaymentFailureNotificationContent() { + } + + public PaymentFailureNotificationContent errorFields(List errorFields) { + this.errorFields = errorFields; + return this; + } + + public PaymentFailureNotificationContent addErrorFieldsItem(ErrorFieldType errorFieldsItem) { + if (this.errorFields == null) { + this.errorFields = new ArrayList<>(); + } + this.errorFields.add(errorFieldsItem); + return this; + } + + /** + * Missing or invalid fields that caused the payment error. + * @return errorFields + **/ + @ApiModelProperty(value = "Missing or invalid fields that caused the payment error.") + @JsonProperty(JSON_PROPERTY_ERROR_FIELDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getErrorFields() { + return errorFields; + } + + + @JsonProperty(JSON_PROPERTY_ERROR_FIELDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setErrorFields(List errorFields) { + this.errorFields = errorFields; + } + + + public PaymentFailureNotificationContent errorMessage(Message errorMessage) { + this.errorMessage = errorMessage; + return this; + } + + /** + * Get errorMessage + * @return errorMessage + **/ + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_ERROR_MESSAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Message getErrorMessage() { + return errorMessage; + } + + + @JsonProperty(JSON_PROPERTY_ERROR_MESSAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setErrorMessage(Message errorMessage) { + this.errorMessage = errorMessage; + } + + + public PaymentFailureNotificationContent modificationMerchantReference(String modificationMerchantReference) { + this.modificationMerchantReference = modificationMerchantReference; + return this; + } + + /** + * The `reference` of the capture or refund. + * @return modificationMerchantReference + **/ + @ApiModelProperty(value = "The `reference` of the capture or refund.") + @JsonProperty(JSON_PROPERTY_MODIFICATION_MERCHANT_REFERENCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getModificationMerchantReference() { + return modificationMerchantReference; + } + + + @JsonProperty(JSON_PROPERTY_MODIFICATION_MERCHANT_REFERENCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setModificationMerchantReference(String modificationMerchantReference) { + this.modificationMerchantReference = modificationMerchantReference; + } + + + public PaymentFailureNotificationContent modificationPspReference(String modificationPspReference) { + this.modificationPspReference = modificationPspReference; + return this; + } + + /** + * The `pspReference` of the capture or refund. + * @return modificationPspReference + **/ + @ApiModelProperty(value = "The `pspReference` of the capture or refund.") + @JsonProperty(JSON_PROPERTY_MODIFICATION_PSP_REFERENCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getModificationPspReference() { + return modificationPspReference; + } + + + @JsonProperty(JSON_PROPERTY_MODIFICATION_PSP_REFERENCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setModificationPspReference(String modificationPspReference) { + this.modificationPspReference = modificationPspReference; + } + + + public PaymentFailureNotificationContent paymentMerchantReference(String paymentMerchantReference) { + this.paymentMerchantReference = paymentMerchantReference; + return this; + } + + /** + * The `reference` of the payment. + * @return paymentMerchantReference + **/ + @ApiModelProperty(value = "The `reference` of the payment.") + @JsonProperty(JSON_PROPERTY_PAYMENT_MERCHANT_REFERENCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getPaymentMerchantReference() { + return paymentMerchantReference; + } + + + @JsonProperty(JSON_PROPERTY_PAYMENT_MERCHANT_REFERENCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPaymentMerchantReference(String paymentMerchantReference) { + this.paymentMerchantReference = paymentMerchantReference; + } + + + public PaymentFailureNotificationContent paymentPspReference(String paymentPspReference) { + this.paymentPspReference = paymentPspReference; + return this; + } + + /** + * The `pspReference` of the payment. + * @return paymentPspReference + **/ + @ApiModelProperty(value = "The `pspReference` of the payment.") + @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; + } + + + /** + * Return true if this PaymentFailureNotificationContent object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PaymentFailureNotificationContent paymentFailureNotificationContent = (PaymentFailureNotificationContent) o; + return Objects.equals(this.errorFields, paymentFailureNotificationContent.errorFields) && + Objects.equals(this.errorMessage, paymentFailureNotificationContent.errorMessage) && + Objects.equals(this.modificationMerchantReference, paymentFailureNotificationContent.modificationMerchantReference) && + Objects.equals(this.modificationPspReference, paymentFailureNotificationContent.modificationPspReference) && + Objects.equals(this.paymentMerchantReference, paymentFailureNotificationContent.paymentMerchantReference) && + Objects.equals(this.paymentPspReference, paymentFailureNotificationContent.paymentPspReference); + } + + @Override + public int hashCode() { + return Objects.hash(errorFields, errorMessage, modificationMerchantReference, modificationPspReference, paymentMerchantReference, paymentPspReference); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PaymentFailureNotificationContent {\n"); + sb.append(" errorFields: ").append(toIndentedString(errorFields)).append("\n"); + sb.append(" errorMessage: ").append(toIndentedString(errorMessage)).append("\n"); + sb.append(" modificationMerchantReference: ").append(toIndentedString(modificationMerchantReference)).append("\n"); + sb.append(" modificationPspReference: ").append(toIndentedString(modificationPspReference)).append("\n"); + sb.append(" paymentMerchantReference: ").append(toIndentedString(paymentMerchantReference)).append("\n"); + sb.append(" paymentPspReference: ").append(toIndentedString(paymentPspReference)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line 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 PaymentFailureNotificationContent given an JSON string + * + * @param jsonString JSON string + * @return An instance of PaymentFailureNotificationContent + * @throws JsonProcessingException if the JSON string is invalid with respect to PaymentFailureNotificationContent + */ + public static PaymentFailureNotificationContent fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, PaymentFailureNotificationContent.class); + } +/** + * Convert an instance of PaymentFailureNotificationContent 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/marketpaywebhooks/PayoutMethod.java b/src/main/java/com/adyen/model/marketpaywebhooks/PayoutMethod.java new file mode 100644 index 000000000..7b9481354 --- /dev/null +++ b/src/main/java/com/adyen/model/marketpaywebhooks/PayoutMethod.java @@ -0,0 +1,252 @@ +/* + * Classic Platforms - Notifications + * + * 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.marketpaywebhooks; + +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/marketpaywebhooks/PayoutScheduleResponse.java b/src/main/java/com/adyen/model/marketpaywebhooks/PayoutScheduleResponse.java new file mode 100644 index 000000000..462914a28 --- /dev/null +++ b/src/main/java/com/adyen/model/marketpaywebhooks/PayoutScheduleResponse.java @@ -0,0 +1,221 @@ +/* + * Classic Platforms - Notifications + * + * 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.marketpaywebhooks; + +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/marketpaywebhooks/PersonalDocumentData.java b/src/main/java/com/adyen/model/marketpaywebhooks/PersonalDocumentData.java new file mode 100644 index 000000000..d53652bb9 --- /dev/null +++ b/src/main/java/com/adyen/model/marketpaywebhooks/PersonalDocumentData.java @@ -0,0 +1,293 @@ +/* + * Classic Platforms - Notifications + * + * 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.marketpaywebhooks; + +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/marketpaywebhooks/RefundFundsTransferNotification.java b/src/main/java/com/adyen/model/marketpaywebhooks/RefundFundsTransferNotification.java new file mode 100644 index 000000000..379523624 --- /dev/null +++ b/src/main/java/com/adyen/model/marketpaywebhooks/RefundFundsTransferNotification.java @@ -0,0 +1,317 @@ +/* + * Classic Platforms - Notifications + * + * 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.marketpaywebhooks; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.adyen.model.marketpaywebhooks.NotificationErrorContainer; +import com.adyen.model.marketpaywebhooks.RefundFundsTransferNotificationContent; +import com.fasterxml.jackson.annotation.JsonInclude; +import 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; + + +/** + * RefundFundsTransferNotification + */ +@JsonPropertyOrder({ + RefundFundsTransferNotification.JSON_PROPERTY_CONTENT, + RefundFundsTransferNotification.JSON_PROPERTY_ERROR, + RefundFundsTransferNotification.JSON_PROPERTY_EVENT_DATE, + RefundFundsTransferNotification.JSON_PROPERTY_EVENT_TYPE, + RefundFundsTransferNotification.JSON_PROPERTY_EXECUTING_USER_KEY, + RefundFundsTransferNotification.JSON_PROPERTY_LIVE, + RefundFundsTransferNotification.JSON_PROPERTY_PSP_REFERENCE +}) + +public class RefundFundsTransferNotification { + public static final String JSON_PROPERTY_CONTENT = "content"; + private RefundFundsTransferNotificationContent content; + + public static final String JSON_PROPERTY_ERROR = "error"; + private NotificationErrorContainer error; + + public static final String JSON_PROPERTY_EVENT_DATE = "eventDate"; + private OffsetDateTime eventDate; + + public static final String JSON_PROPERTY_EVENT_TYPE = "eventType"; + private String eventType; + + public static final String JSON_PROPERTY_EXECUTING_USER_KEY = "executingUserKey"; + private String executingUserKey; + + public static final String JSON_PROPERTY_LIVE = "live"; + private Boolean live; + + public static final String JSON_PROPERTY_PSP_REFERENCE = "pspReference"; + private String pspReference; + + public RefundFundsTransferNotification() { + } + + public RefundFundsTransferNotification content(RefundFundsTransferNotificationContent content) { + this.content = content; + return this; + } + + /** + * Get content + * @return content + **/ + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_CONTENT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public RefundFundsTransferNotificationContent getContent() { + return content; + } + + + @JsonProperty(JSON_PROPERTY_CONTENT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setContent(RefundFundsTransferNotificationContent content) { + this.content = content; + } + + + public RefundFundsTransferNotification error(NotificationErrorContainer error) { + this.error = error; + return this; + } + + /** + * Get error + * @return error + **/ + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_ERROR) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public NotificationErrorContainer getError() { + return error; + } + + + @JsonProperty(JSON_PROPERTY_ERROR) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setError(NotificationErrorContainer error) { + this.error = error; + } + + + public RefundFundsTransferNotification eventDate(OffsetDateTime eventDate) { + this.eventDate = eventDate; + return this; + } + + /** + * The date and time when an event has been completed. + * @return eventDate + **/ + @ApiModelProperty(required = true, value = "The date and time when an event has been completed.") + @JsonProperty(JSON_PROPERTY_EVENT_DATE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public OffsetDateTime getEventDate() { + return eventDate; + } + + + @JsonProperty(JSON_PROPERTY_EVENT_DATE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEventDate(OffsetDateTime eventDate) { + this.eventDate = eventDate; + } + + + public RefundFundsTransferNotification eventType(String eventType) { + this.eventType = eventType; + return this; + } + + /** + * The event type of the notification. + * @return eventType + **/ + @ApiModelProperty(required = true, value = "The event type of the notification.") + @JsonProperty(JSON_PROPERTY_EVENT_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getEventType() { + return eventType; + } + + + @JsonProperty(JSON_PROPERTY_EVENT_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEventType(String eventType) { + this.eventType = eventType; + } + + + public RefundFundsTransferNotification executingUserKey(String executingUserKey) { + this.executingUserKey = executingUserKey; + return this; + } + + /** + * The user or process that has triggered the notification. + * @return executingUserKey + **/ + @ApiModelProperty(required = true, value = "The user or process that has triggered the notification.") + @JsonProperty(JSON_PROPERTY_EXECUTING_USER_KEY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getExecutingUserKey() { + return executingUserKey; + } + + + @JsonProperty(JSON_PROPERTY_EXECUTING_USER_KEY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setExecutingUserKey(String executingUserKey) { + this.executingUserKey = executingUserKey; + } + + + public RefundFundsTransferNotification live(Boolean live) { + this.live = live; + return this; + } + + /** + * Indicates whether the notification originated from the live environment or the test environment. If true, the notification originated from the live environment. If false, the notification originated from the test environment. + * @return live + **/ + @ApiModelProperty(required = true, value = "Indicates whether the notification originated from the live environment or the test environment. If true, the notification originated from the live environment. If false, the notification originated from the test environment.") + @JsonProperty(JSON_PROPERTY_LIVE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getLive() { + return live; + } + + + @JsonProperty(JSON_PROPERTY_LIVE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setLive(Boolean live) { + this.live = live; + } + + + public RefundFundsTransferNotification pspReference(String pspReference) { + this.pspReference = pspReference; + return this; + } + + /** + * The PSP reference of the request from which the notification originates. + * @return pspReference + **/ + @ApiModelProperty(required = true, value = "The PSP reference of the request from which the notification originates.") + @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; + } + + + /** + * Return true if this RefundFundsTransferNotification object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RefundFundsTransferNotification refundFundsTransferNotification = (RefundFundsTransferNotification) o; + return Objects.equals(this.content, refundFundsTransferNotification.content) && + Objects.equals(this.error, refundFundsTransferNotification.error) && + Objects.equals(this.eventDate, refundFundsTransferNotification.eventDate) && + Objects.equals(this.eventType, refundFundsTransferNotification.eventType) && + Objects.equals(this.executingUserKey, refundFundsTransferNotification.executingUserKey) && + Objects.equals(this.live, refundFundsTransferNotification.live) && + Objects.equals(this.pspReference, refundFundsTransferNotification.pspReference); + } + + @Override + public int hashCode() { + return Objects.hash(content, error, eventDate, eventType, executingUserKey, live, pspReference); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RefundFundsTransferNotification {\n"); + sb.append(" content: ").append(toIndentedString(content)).append("\n"); + sb.append(" error: ").append(toIndentedString(error)).append("\n"); + sb.append(" eventDate: ").append(toIndentedString(eventDate)).append("\n"); + sb.append(" eventType: ").append(toIndentedString(eventType)).append("\n"); + sb.append(" executingUserKey: ").append(toIndentedString(executingUserKey)).append("\n"); + sb.append(" live: ").append(toIndentedString(live)).append("\n"); + sb.append(" pspReference: ").append(toIndentedString(pspReference)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line 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 RefundFundsTransferNotification given an JSON string + * + * @param jsonString JSON string + * @return An instance of RefundFundsTransferNotification + * @throws JsonProcessingException if the JSON string is invalid with respect to RefundFundsTransferNotification + */ + public static RefundFundsTransferNotification fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, RefundFundsTransferNotification.class); + } +/** + * Convert an instance of RefundFundsTransferNotification 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/marketpaywebhooks/RefundFundsTransferNotificationContent.java b/src/main/java/com/adyen/model/marketpaywebhooks/RefundFundsTransferNotificationContent.java new file mode 100644 index 000000000..0ad868390 --- /dev/null +++ b/src/main/java/com/adyen/model/marketpaywebhooks/RefundFundsTransferNotificationContent.java @@ -0,0 +1,265 @@ +/* + * Classic Platforms - Notifications + * + * 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.marketpaywebhooks; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.adyen.model.marketpaywebhooks.Amount; +import com.adyen.model.marketpaywebhooks.ErrorFieldType; +import com.adyen.model.marketpaywebhooks.OperationStatus; +import com.fasterxml.jackson.annotation.JsonInclude; +import 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; + + +/** + * RefundFundsTransferNotificationContent + */ +@JsonPropertyOrder({ + RefundFundsTransferNotificationContent.JSON_PROPERTY_AMOUNT, + RefundFundsTransferNotificationContent.JSON_PROPERTY_INVALID_FIELDS, + RefundFundsTransferNotificationContent.JSON_PROPERTY_MERCHANT_REFERENCE, + RefundFundsTransferNotificationContent.JSON_PROPERTY_ORIGINAL_REFERENCE, + RefundFundsTransferNotificationContent.JSON_PROPERTY_STATUS +}) + +public class RefundFundsTransferNotificationContent { + public static final String JSON_PROPERTY_AMOUNT = "amount"; + private Amount amount; + + 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_ORIGINAL_REFERENCE = "originalReference"; + private String originalReference; + + public static final String JSON_PROPERTY_STATUS = "status"; + private OperationStatus status; + + public RefundFundsTransferNotificationContent() { + } + + public RefundFundsTransferNotificationContent 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 RefundFundsTransferNotificationContent invalidFields(List invalidFields) { + this.invalidFields = invalidFields; + return this; + } + + public RefundFundsTransferNotificationContent addInvalidFieldsItem(ErrorFieldType invalidFieldsItem) { + if (this.invalidFields == null) { + this.invalidFields = new ArrayList<>(); + } + this.invalidFields.add(invalidFieldsItem); + return this; + } + + /** + * Invalid fields list. + * @return invalidFields + **/ + @ApiModelProperty(value = "Invalid fields list.") + @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 RefundFundsTransferNotificationContent 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 RefundFundsTransferNotificationContent 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; + } + + + public RefundFundsTransferNotificationContent status(OperationStatus status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + **/ + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public OperationStatus getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setStatus(OperationStatus status) { + this.status = status; + } + + + /** + * Return true if this RefundFundsTransferNotificationContent object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RefundFundsTransferNotificationContent refundFundsTransferNotificationContent = (RefundFundsTransferNotificationContent) o; + return Objects.equals(this.amount, refundFundsTransferNotificationContent.amount) && + Objects.equals(this.invalidFields, refundFundsTransferNotificationContent.invalidFields) && + Objects.equals(this.merchantReference, refundFundsTransferNotificationContent.merchantReference) && + Objects.equals(this.originalReference, refundFundsTransferNotificationContent.originalReference) && + Objects.equals(this.status, refundFundsTransferNotificationContent.status); + } + + @Override + public int hashCode() { + return Objects.hash(amount, invalidFields, merchantReference, originalReference, status); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RefundFundsTransferNotificationContent {\n"); + sb.append(" amount: ").append(toIndentedString(amount)).append("\n"); + sb.append(" invalidFields: ").append(toIndentedString(invalidFields)).append("\n"); + sb.append(" merchantReference: ").append(toIndentedString(merchantReference)).append("\n"); + sb.append(" originalReference: ").append(toIndentedString(originalReference)).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 RefundFundsTransferNotificationContent given an JSON string + * + * @param jsonString JSON string + * @return An instance of RefundFundsTransferNotificationContent + * @throws JsonProcessingException if the JSON string is invalid with respect to RefundFundsTransferNotificationContent + */ + public static RefundFundsTransferNotificationContent fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, RefundFundsTransferNotificationContent.class); + } +/** + * Convert an instance of RefundFundsTransferNotificationContent 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/marketpaywebhooks/RefundResult.java b/src/main/java/com/adyen/model/marketpaywebhooks/RefundResult.java new file mode 100644 index 000000000..11cc730a3 --- /dev/null +++ b/src/main/java/com/adyen/model/marketpaywebhooks/RefundResult.java @@ -0,0 +1,191 @@ +/* + * Classic Platforms - Notifications + * + * 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.marketpaywebhooks; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.adyen.model.marketpaywebhooks.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 com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.core.JsonProcessingException; + + +/** + * RefundResult + */ +@JsonPropertyOrder({ + RefundResult.JSON_PROPERTY_ORIGINAL_TRANSACTION, + RefundResult.JSON_PROPERTY_PSP_REFERENCE, + RefundResult.JSON_PROPERTY_RESPONSE +}) + +public class RefundResult { + public static final String JSON_PROPERTY_ORIGINAL_TRANSACTION = "originalTransaction"; + private Transaction originalTransaction; + + public static final String JSON_PROPERTY_PSP_REFERENCE = "pspReference"; + private String pspReference; + + public static final String JSON_PROPERTY_RESPONSE = "response"; + private String response; + + public RefundResult() { + } + + public RefundResult originalTransaction(Transaction originalTransaction) { + this.originalTransaction = originalTransaction; + return this; + } + + /** + * Get originalTransaction + * @return originalTransaction + **/ + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_ORIGINAL_TRANSACTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Transaction getOriginalTransaction() { + return originalTransaction; + } + + + @JsonProperty(JSON_PROPERTY_ORIGINAL_TRANSACTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setOriginalTransaction(Transaction originalTransaction) { + this.originalTransaction = originalTransaction; + } + + + public RefundResult pspReference(String pspReference) { + this.pspReference = pspReference; + return this; + } + + /** + * The reference of the refund. + * @return pspReference + **/ + @ApiModelProperty(value = "The reference of the refund.") + @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 RefundResult response(String response) { + this.response = response; + return this; + } + + /** + * The response indicating if the refund has been received for processing. + * @return response + **/ + @ApiModelProperty(value = "The response indicating if the refund has been received for processing.") + @JsonProperty(JSON_PROPERTY_RESPONSE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getResponse() { + return response; + } + + + @JsonProperty(JSON_PROPERTY_RESPONSE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setResponse(String response) { + this.response = response; + } + + + /** + * Return true if this RefundResult object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RefundResult refundResult = (RefundResult) o; + return Objects.equals(this.originalTransaction, refundResult.originalTransaction) && + Objects.equals(this.pspReference, refundResult.pspReference) && + Objects.equals(this.response, refundResult.response); + } + + @Override + public int hashCode() { + return Objects.hash(originalTransaction, pspReference, response); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RefundResult {\n"); + sb.append(" originalTransaction: ").append(toIndentedString(originalTransaction)).append("\n"); + sb.append(" pspReference: ").append(toIndentedString(pspReference)).append("\n"); + sb.append(" response: ").append(toIndentedString(response)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line 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 RefundResult given an JSON string + * + * @param jsonString JSON string + * @return An instance of RefundResult + * @throws JsonProcessingException if the JSON string is invalid with respect to RefundResult + */ + public static RefundResult fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, RefundResult.class); + } +/** + * Convert an instance of RefundResult 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/marketpaywebhooks/ReportAvailableNotification.java b/src/main/java/com/adyen/model/marketpaywebhooks/ReportAvailableNotification.java new file mode 100644 index 000000000..b2c472dda --- /dev/null +++ b/src/main/java/com/adyen/model/marketpaywebhooks/ReportAvailableNotification.java @@ -0,0 +1,317 @@ +/* + * Classic Platforms - Notifications + * + * 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.marketpaywebhooks; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.adyen.model.marketpaywebhooks.NotificationErrorContainer; +import com.adyen.model.marketpaywebhooks.ReportAvailableNotificationContent; +import com.fasterxml.jackson.annotation.JsonInclude; +import 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; + + +/** + * ReportAvailableNotification + */ +@JsonPropertyOrder({ + ReportAvailableNotification.JSON_PROPERTY_CONTENT, + ReportAvailableNotification.JSON_PROPERTY_ERROR, + ReportAvailableNotification.JSON_PROPERTY_EVENT_DATE, + ReportAvailableNotification.JSON_PROPERTY_EVENT_TYPE, + ReportAvailableNotification.JSON_PROPERTY_EXECUTING_USER_KEY, + ReportAvailableNotification.JSON_PROPERTY_LIVE, + ReportAvailableNotification.JSON_PROPERTY_PSP_REFERENCE +}) + +public class ReportAvailableNotification { + public static final String JSON_PROPERTY_CONTENT = "content"; + private ReportAvailableNotificationContent content; + + public static final String JSON_PROPERTY_ERROR = "error"; + private NotificationErrorContainer error; + + public static final String JSON_PROPERTY_EVENT_DATE = "eventDate"; + private OffsetDateTime eventDate; + + public static final String JSON_PROPERTY_EVENT_TYPE = "eventType"; + private String eventType; + + public static final String JSON_PROPERTY_EXECUTING_USER_KEY = "executingUserKey"; + private String executingUserKey; + + public static final String JSON_PROPERTY_LIVE = "live"; + private Boolean live; + + public static final String JSON_PROPERTY_PSP_REFERENCE = "pspReference"; + private String pspReference; + + public ReportAvailableNotification() { + } + + public ReportAvailableNotification content(ReportAvailableNotificationContent content) { + this.content = content; + return this; + } + + /** + * Get content + * @return content + **/ + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_CONTENT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public ReportAvailableNotificationContent getContent() { + return content; + } + + + @JsonProperty(JSON_PROPERTY_CONTENT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setContent(ReportAvailableNotificationContent content) { + this.content = content; + } + + + public ReportAvailableNotification error(NotificationErrorContainer error) { + this.error = error; + return this; + } + + /** + * Get error + * @return error + **/ + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_ERROR) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public NotificationErrorContainer getError() { + return error; + } + + + @JsonProperty(JSON_PROPERTY_ERROR) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setError(NotificationErrorContainer error) { + this.error = error; + } + + + public ReportAvailableNotification eventDate(OffsetDateTime eventDate) { + this.eventDate = eventDate; + return this; + } + + /** + * The date and time when an event has been completed. + * @return eventDate + **/ + @ApiModelProperty(required = true, value = "The date and time when an event has been completed.") + @JsonProperty(JSON_PROPERTY_EVENT_DATE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public OffsetDateTime getEventDate() { + return eventDate; + } + + + @JsonProperty(JSON_PROPERTY_EVENT_DATE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEventDate(OffsetDateTime eventDate) { + this.eventDate = eventDate; + } + + + public ReportAvailableNotification eventType(String eventType) { + this.eventType = eventType; + return this; + } + + /** + * The event type of the notification. + * @return eventType + **/ + @ApiModelProperty(required = true, value = "The event type of the notification.") + @JsonProperty(JSON_PROPERTY_EVENT_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getEventType() { + return eventType; + } + + + @JsonProperty(JSON_PROPERTY_EVENT_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEventType(String eventType) { + this.eventType = eventType; + } + + + public ReportAvailableNotification executingUserKey(String executingUserKey) { + this.executingUserKey = executingUserKey; + return this; + } + + /** + * The user or process that has triggered the notification. + * @return executingUserKey + **/ + @ApiModelProperty(required = true, value = "The user or process that has triggered the notification.") + @JsonProperty(JSON_PROPERTY_EXECUTING_USER_KEY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getExecutingUserKey() { + return executingUserKey; + } + + + @JsonProperty(JSON_PROPERTY_EXECUTING_USER_KEY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setExecutingUserKey(String executingUserKey) { + this.executingUserKey = executingUserKey; + } + + + public ReportAvailableNotification live(Boolean live) { + this.live = live; + return this; + } + + /** + * Indicates whether the notification originated from the live environment or the test environment. If true, the notification originated from the live environment. If false, the notification originated from the test environment. + * @return live + **/ + @ApiModelProperty(required = true, value = "Indicates whether the notification originated from the live environment or the test environment. If true, the notification originated from the live environment. If false, the notification originated from the test environment.") + @JsonProperty(JSON_PROPERTY_LIVE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getLive() { + return live; + } + + + @JsonProperty(JSON_PROPERTY_LIVE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setLive(Boolean live) { + this.live = live; + } + + + public ReportAvailableNotification pspReference(String pspReference) { + this.pspReference = pspReference; + return this; + } + + /** + * The PSP reference of the request from which the notification originates. + * @return pspReference + **/ + @ApiModelProperty(required = true, value = "The PSP reference of the request from which the notification originates.") + @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; + } + + + /** + * Return true if this ReportAvailableNotification object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ReportAvailableNotification reportAvailableNotification = (ReportAvailableNotification) o; + return Objects.equals(this.content, reportAvailableNotification.content) && + Objects.equals(this.error, reportAvailableNotification.error) && + Objects.equals(this.eventDate, reportAvailableNotification.eventDate) && + Objects.equals(this.eventType, reportAvailableNotification.eventType) && + Objects.equals(this.executingUserKey, reportAvailableNotification.executingUserKey) && + Objects.equals(this.live, reportAvailableNotification.live) && + Objects.equals(this.pspReference, reportAvailableNotification.pspReference); + } + + @Override + public int hashCode() { + return Objects.hash(content, error, eventDate, eventType, executingUserKey, live, pspReference); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ReportAvailableNotification {\n"); + sb.append(" content: ").append(toIndentedString(content)).append("\n"); + sb.append(" error: ").append(toIndentedString(error)).append("\n"); + sb.append(" eventDate: ").append(toIndentedString(eventDate)).append("\n"); + sb.append(" eventType: ").append(toIndentedString(eventType)).append("\n"); + sb.append(" executingUserKey: ").append(toIndentedString(executingUserKey)).append("\n"); + sb.append(" live: ").append(toIndentedString(live)).append("\n"); + sb.append(" pspReference: ").append(toIndentedString(pspReference)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line 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 ReportAvailableNotification given an JSON string + * + * @param jsonString JSON string + * @return An instance of ReportAvailableNotification + * @throws JsonProcessingException if the JSON string is invalid with respect to ReportAvailableNotification + */ + public static ReportAvailableNotification fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, ReportAvailableNotification.class); + } +/** + * Convert an instance of ReportAvailableNotification 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/marketpaywebhooks/ReportAvailableNotificationContent.java b/src/main/java/com/adyen/model/marketpaywebhooks/ReportAvailableNotificationContent.java new file mode 100644 index 000000000..a9df5595e --- /dev/null +++ b/src/main/java/com/adyen/model/marketpaywebhooks/ReportAvailableNotificationContent.java @@ -0,0 +1,253 @@ +/* + * Classic Platforms - Notifications + * + * 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.marketpaywebhooks; + +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; + + +/** + * ReportAvailableNotificationContent + */ +@JsonPropertyOrder({ + ReportAvailableNotificationContent.JSON_PROPERTY_ACCOUNT_CODE, + ReportAvailableNotificationContent.JSON_PROPERTY_ACCOUNT_TYPE, + ReportAvailableNotificationContent.JSON_PROPERTY_EVENT_DATE, + ReportAvailableNotificationContent.JSON_PROPERTY_REMOTE_ACCESS_URL, + ReportAvailableNotificationContent.JSON_PROPERTY_SUCCESS +}) + +public class ReportAvailableNotificationContent { + public static final String JSON_PROPERTY_ACCOUNT_CODE = "accountCode"; + private String accountCode; + + public static final String JSON_PROPERTY_ACCOUNT_TYPE = "accountType"; + private String accountType; + + public static final String JSON_PROPERTY_EVENT_DATE = "eventDate"; + private OffsetDateTime eventDate; + + public static final String JSON_PROPERTY_REMOTE_ACCESS_URL = "remoteAccessUrl"; + private String remoteAccessUrl; + + public static final String JSON_PROPERTY_SUCCESS = "success"; + private Boolean success; + + public ReportAvailableNotificationContent() { + } + + public ReportAvailableNotificationContent accountCode(String accountCode) { + this.accountCode = accountCode; + return this; + } + + /** + * The code of the Account to which the report applies. + * @return accountCode + **/ + @ApiModelProperty(value = "The code of the Account to which the report applies.") + @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 ReportAvailableNotificationContent accountType(String accountType) { + this.accountType = accountType; + return this; + } + + /** + * The type of Account to which the report applies. + * @return accountType + **/ + @ApiModelProperty(value = "The type of Account to which the report applies.") + @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 ReportAvailableNotificationContent eventDate(OffsetDateTime eventDate) { + this.eventDate = eventDate; + return this; + } + + /** + * The date of the event to which the report applies. + * @return eventDate + **/ + @ApiModelProperty(value = "The date of the event to which the report applies.") + @JsonProperty(JSON_PROPERTY_EVENT_DATE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public OffsetDateTime getEventDate() { + return eventDate; + } + + + @JsonProperty(JSON_PROPERTY_EVENT_DATE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEventDate(OffsetDateTime eventDate) { + this.eventDate = eventDate; + } + + + public ReportAvailableNotificationContent remoteAccessUrl(String remoteAccessUrl) { + this.remoteAccessUrl = remoteAccessUrl; + return this; + } + + /** + * The URL at which the report can be accessed. + * @return remoteAccessUrl + **/ + @ApiModelProperty(value = "The URL at which the report can be accessed.") + @JsonProperty(JSON_PROPERTY_REMOTE_ACCESS_URL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getRemoteAccessUrl() { + return remoteAccessUrl; + } + + + @JsonProperty(JSON_PROPERTY_REMOTE_ACCESS_URL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setRemoteAccessUrl(String remoteAccessUrl) { + this.remoteAccessUrl = remoteAccessUrl; + } + + + public ReportAvailableNotificationContent success(Boolean success) { + this.success = success; + return this; + } + + /** + * Indicates whether the event resulted in a success. + * @return success + **/ + @ApiModelProperty(value = "Indicates whether the event resulted in a success.") + @JsonProperty(JSON_PROPERTY_SUCCESS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getSuccess() { + return success; + } + + + @JsonProperty(JSON_PROPERTY_SUCCESS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSuccess(Boolean success) { + this.success = success; + } + + + /** + * Return true if this ReportAvailableNotificationContent object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ReportAvailableNotificationContent reportAvailableNotificationContent = (ReportAvailableNotificationContent) o; + return Objects.equals(this.accountCode, reportAvailableNotificationContent.accountCode) && + Objects.equals(this.accountType, reportAvailableNotificationContent.accountType) && + Objects.equals(this.eventDate, reportAvailableNotificationContent.eventDate) && + Objects.equals(this.remoteAccessUrl, reportAvailableNotificationContent.remoteAccessUrl) && + Objects.equals(this.success, reportAvailableNotificationContent.success); + } + + @Override + public int hashCode() { + return Objects.hash(accountCode, accountType, eventDate, remoteAccessUrl, success); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ReportAvailableNotificationContent {\n"); + sb.append(" accountCode: ").append(toIndentedString(accountCode)).append("\n"); + sb.append(" accountType: ").append(toIndentedString(accountType)).append("\n"); + sb.append(" eventDate: ").append(toIndentedString(eventDate)).append("\n"); + sb.append(" remoteAccessUrl: ").append(toIndentedString(remoteAccessUrl)).append("\n"); + sb.append(" success: ").append(toIndentedString(success)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line 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 ReportAvailableNotificationContent given an JSON string + * + * @param jsonString JSON string + * @return An instance of ReportAvailableNotificationContent + * @throws JsonProcessingException if the JSON string is invalid with respect to ReportAvailableNotificationContent + */ + public static ReportAvailableNotificationContent fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, ReportAvailableNotificationContent.class); + } +/** + * Convert an instance of ReportAvailableNotificationContent 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/marketpaywebhooks/ScheduledRefundsNotification.java b/src/main/java/com/adyen/model/marketpaywebhooks/ScheduledRefundsNotification.java new file mode 100644 index 000000000..a766aa325 --- /dev/null +++ b/src/main/java/com/adyen/model/marketpaywebhooks/ScheduledRefundsNotification.java @@ -0,0 +1,317 @@ +/* + * Classic Platforms - Notifications + * + * 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.marketpaywebhooks; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.adyen.model.marketpaywebhooks.NotificationErrorContainer; +import com.adyen.model.marketpaywebhooks.ScheduledRefundsNotificationContent; +import com.fasterxml.jackson.annotation.JsonInclude; +import 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; + + +/** + * ScheduledRefundsNotification + */ +@JsonPropertyOrder({ + ScheduledRefundsNotification.JSON_PROPERTY_CONTENT, + ScheduledRefundsNotification.JSON_PROPERTY_ERROR, + ScheduledRefundsNotification.JSON_PROPERTY_EVENT_DATE, + ScheduledRefundsNotification.JSON_PROPERTY_EVENT_TYPE, + ScheduledRefundsNotification.JSON_PROPERTY_EXECUTING_USER_KEY, + ScheduledRefundsNotification.JSON_PROPERTY_LIVE, + ScheduledRefundsNotification.JSON_PROPERTY_PSP_REFERENCE +}) + +public class ScheduledRefundsNotification { + public static final String JSON_PROPERTY_CONTENT = "content"; + private ScheduledRefundsNotificationContent content; + + public static final String JSON_PROPERTY_ERROR = "error"; + private NotificationErrorContainer error; + + public static final String JSON_PROPERTY_EVENT_DATE = "eventDate"; + private OffsetDateTime eventDate; + + public static final String JSON_PROPERTY_EVENT_TYPE = "eventType"; + private String eventType; + + public static final String JSON_PROPERTY_EXECUTING_USER_KEY = "executingUserKey"; + private String executingUserKey; + + public static final String JSON_PROPERTY_LIVE = "live"; + private Boolean live; + + public static final String JSON_PROPERTY_PSP_REFERENCE = "pspReference"; + private String pspReference; + + public ScheduledRefundsNotification() { + } + + public ScheduledRefundsNotification content(ScheduledRefundsNotificationContent content) { + this.content = content; + return this; + } + + /** + * Get content + * @return content + **/ + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_CONTENT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public ScheduledRefundsNotificationContent getContent() { + return content; + } + + + @JsonProperty(JSON_PROPERTY_CONTENT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setContent(ScheduledRefundsNotificationContent content) { + this.content = content; + } + + + public ScheduledRefundsNotification error(NotificationErrorContainer error) { + this.error = error; + return this; + } + + /** + * Get error + * @return error + **/ + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_ERROR) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public NotificationErrorContainer getError() { + return error; + } + + + @JsonProperty(JSON_PROPERTY_ERROR) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setError(NotificationErrorContainer error) { + this.error = error; + } + + + public ScheduledRefundsNotification eventDate(OffsetDateTime eventDate) { + this.eventDate = eventDate; + return this; + } + + /** + * The date and time when an event has been completed. + * @return eventDate + **/ + @ApiModelProperty(required = true, value = "The date and time when an event has been completed.") + @JsonProperty(JSON_PROPERTY_EVENT_DATE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public OffsetDateTime getEventDate() { + return eventDate; + } + + + @JsonProperty(JSON_PROPERTY_EVENT_DATE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEventDate(OffsetDateTime eventDate) { + this.eventDate = eventDate; + } + + + public ScheduledRefundsNotification eventType(String eventType) { + this.eventType = eventType; + return this; + } + + /** + * The event type of the notification. + * @return eventType + **/ + @ApiModelProperty(required = true, value = "The event type of the notification.") + @JsonProperty(JSON_PROPERTY_EVENT_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getEventType() { + return eventType; + } + + + @JsonProperty(JSON_PROPERTY_EVENT_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEventType(String eventType) { + this.eventType = eventType; + } + + + public ScheduledRefundsNotification executingUserKey(String executingUserKey) { + this.executingUserKey = executingUserKey; + return this; + } + + /** + * The user or process that has triggered the notification. + * @return executingUserKey + **/ + @ApiModelProperty(required = true, value = "The user or process that has triggered the notification.") + @JsonProperty(JSON_PROPERTY_EXECUTING_USER_KEY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getExecutingUserKey() { + return executingUserKey; + } + + + @JsonProperty(JSON_PROPERTY_EXECUTING_USER_KEY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setExecutingUserKey(String executingUserKey) { + this.executingUserKey = executingUserKey; + } + + + public ScheduledRefundsNotification live(Boolean live) { + this.live = live; + return this; + } + + /** + * Indicates whether the notification originated from the live environment or the test environment. If true, the notification originated from the live environment. If false, the notification originated from the test environment. + * @return live + **/ + @ApiModelProperty(required = true, value = "Indicates whether the notification originated from the live environment or the test environment. If true, the notification originated from the live environment. If false, the notification originated from the test environment.") + @JsonProperty(JSON_PROPERTY_LIVE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getLive() { + return live; + } + + + @JsonProperty(JSON_PROPERTY_LIVE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setLive(Boolean live) { + this.live = live; + } + + + public ScheduledRefundsNotification pspReference(String pspReference) { + this.pspReference = pspReference; + return this; + } + + /** + * The PSP reference of the request from which the notification originates. + * @return pspReference + **/ + @ApiModelProperty(required = true, value = "The PSP reference of the request from which the notification originates.") + @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; + } + + + /** + * Return true if this ScheduledRefundsNotification object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ScheduledRefundsNotification scheduledRefundsNotification = (ScheduledRefundsNotification) o; + return Objects.equals(this.content, scheduledRefundsNotification.content) && + Objects.equals(this.error, scheduledRefundsNotification.error) && + Objects.equals(this.eventDate, scheduledRefundsNotification.eventDate) && + Objects.equals(this.eventType, scheduledRefundsNotification.eventType) && + Objects.equals(this.executingUserKey, scheduledRefundsNotification.executingUserKey) && + Objects.equals(this.live, scheduledRefundsNotification.live) && + Objects.equals(this.pspReference, scheduledRefundsNotification.pspReference); + } + + @Override + public int hashCode() { + return Objects.hash(content, error, eventDate, eventType, executingUserKey, live, pspReference); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ScheduledRefundsNotification {\n"); + sb.append(" content: ").append(toIndentedString(content)).append("\n"); + sb.append(" error: ").append(toIndentedString(error)).append("\n"); + sb.append(" eventDate: ").append(toIndentedString(eventDate)).append("\n"); + sb.append(" eventType: ").append(toIndentedString(eventType)).append("\n"); + sb.append(" executingUserKey: ").append(toIndentedString(executingUserKey)).append("\n"); + sb.append(" live: ").append(toIndentedString(live)).append("\n"); + sb.append(" pspReference: ").append(toIndentedString(pspReference)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line 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 ScheduledRefundsNotification given an JSON string + * + * @param jsonString JSON string + * @return An instance of ScheduledRefundsNotification + * @throws JsonProcessingException if the JSON string is invalid with respect to ScheduledRefundsNotification + */ + public static ScheduledRefundsNotification fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, ScheduledRefundsNotification.class); + } +/** + * Convert an instance of ScheduledRefundsNotification 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/marketpaywebhooks/ScheduledRefundsNotificationContent.java b/src/main/java/com/adyen/model/marketpaywebhooks/ScheduledRefundsNotificationContent.java new file mode 100644 index 000000000..1fd69b70e --- /dev/null +++ b/src/main/java/com/adyen/model/marketpaywebhooks/ScheduledRefundsNotificationContent.java @@ -0,0 +1,273 @@ +/* + * Classic Platforms - Notifications + * + * 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.marketpaywebhooks; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.adyen.model.marketpaywebhooks.ErrorFieldType; +import com.adyen.model.marketpaywebhooks.RefundResult; +import com.adyen.model.marketpaywebhooks.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; + + +/** + * ScheduledRefundsNotificationContent + */ +@JsonPropertyOrder({ + ScheduledRefundsNotificationContent.JSON_PROPERTY_ACCOUNT_CODE, + ScheduledRefundsNotificationContent.JSON_PROPERTY_ACCOUNT_HOLDER_CODE, + ScheduledRefundsNotificationContent.JSON_PROPERTY_INVALID_FIELDS, + ScheduledRefundsNotificationContent.JSON_PROPERTY_LAST_PAYOUT, + ScheduledRefundsNotificationContent.JSON_PROPERTY_REFUND_RESULTS +}) + +public class ScheduledRefundsNotificationContent { + 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_INVALID_FIELDS = "invalidFields"; + private List invalidFields = null; + + public static final String JSON_PROPERTY_LAST_PAYOUT = "lastPayout"; + private Transaction lastPayout; + + public static final String JSON_PROPERTY_REFUND_RESULTS = "refundResults"; + private List refundResults = null; + + public ScheduledRefundsNotificationContent() { + } + + public ScheduledRefundsNotificationContent 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 ScheduledRefundsNotificationContent 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 ScheduledRefundsNotificationContent invalidFields(List invalidFields) { + this.invalidFields = invalidFields; + return this; + } + + public ScheduledRefundsNotificationContent addInvalidFieldsItem(ErrorFieldType invalidFieldsItem) { + if (this.invalidFields == null) { + this.invalidFields = new ArrayList<>(); + } + this.invalidFields.add(invalidFieldsItem); + return this; + } + + /** + * Invalid fields list. + * @return invalidFields + **/ + @ApiModelProperty(value = "Invalid fields list.") + @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 ScheduledRefundsNotificationContent lastPayout(Transaction lastPayout) { + this.lastPayout = lastPayout; + return this; + } + + /** + * Get lastPayout + * @return lastPayout + **/ + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_LAST_PAYOUT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Transaction getLastPayout() { + return lastPayout; + } + + + @JsonProperty(JSON_PROPERTY_LAST_PAYOUT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setLastPayout(Transaction lastPayout) { + this.lastPayout = lastPayout; + } + + + public ScheduledRefundsNotificationContent refundResults(List refundResults) { + this.refundResults = refundResults; + return this; + } + + public ScheduledRefundsNotificationContent addRefundResultsItem(RefundResult refundResultsItem) { + if (this.refundResults == null) { + this.refundResults = new ArrayList<>(); + } + this.refundResults.add(refundResultsItem); + return this; + } + + /** + * A list of the refunds that have been scheduled and their results. + * @return refundResults + **/ + @ApiModelProperty(value = "A list of the refunds that have been scheduled and their results.") + @JsonProperty(JSON_PROPERTY_REFUND_RESULTS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getRefundResults() { + return refundResults; + } + + + @JsonProperty(JSON_PROPERTY_REFUND_RESULTS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setRefundResults(List refundResults) { + this.refundResults = refundResults; + } + + + /** + * Return true if this ScheduledRefundsNotificationContent object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ScheduledRefundsNotificationContent scheduledRefundsNotificationContent = (ScheduledRefundsNotificationContent) o; + return Objects.equals(this.accountCode, scheduledRefundsNotificationContent.accountCode) && + Objects.equals(this.accountHolderCode, scheduledRefundsNotificationContent.accountHolderCode) && + Objects.equals(this.invalidFields, scheduledRefundsNotificationContent.invalidFields) && + Objects.equals(this.lastPayout, scheduledRefundsNotificationContent.lastPayout) && + Objects.equals(this.refundResults, scheduledRefundsNotificationContent.refundResults); + } + + @Override + public int hashCode() { + return Objects.hash(accountCode, accountHolderCode, invalidFields, lastPayout, refundResults); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ScheduledRefundsNotificationContent {\n"); + sb.append(" accountCode: ").append(toIndentedString(accountCode)).append("\n"); + sb.append(" accountHolderCode: ").append(toIndentedString(accountHolderCode)).append("\n"); + sb.append(" invalidFields: ").append(toIndentedString(invalidFields)).append("\n"); + sb.append(" lastPayout: ").append(toIndentedString(lastPayout)).append("\n"); + sb.append(" refundResults: ").append(toIndentedString(refundResults)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line 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 ScheduledRefundsNotificationContent given an JSON string + * + * @param jsonString JSON string + * @return An instance of ScheduledRefundsNotificationContent + * @throws JsonProcessingException if the JSON string is invalid with respect to ScheduledRefundsNotificationContent + */ + public static ScheduledRefundsNotificationContent fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, ScheduledRefundsNotificationContent.class); + } +/** + * Convert an instance of ScheduledRefundsNotificationContent 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/marketpaywebhooks/ShareholderContact.java b/src/main/java/com/adyen/model/marketpaywebhooks/ShareholderContact.java new file mode 100644 index 000000000..15bd8318e --- /dev/null +++ b/src/main/java/com/adyen/model/marketpaywebhooks/ShareholderContact.java @@ -0,0 +1,479 @@ +/* + * Classic Platforms - Notifications + * + * 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.marketpaywebhooks; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.adyen.model.marketpaywebhooks.ViasAddress; +import com.adyen.model.marketpaywebhooks.ViasName; +import com.adyen.model.marketpaywebhooks.ViasPersonalData; +import com.adyen.model.marketpaywebhooks.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/marketpaywebhooks/SignatoryContact.java b/src/main/java/com/adyen/model/marketpaywebhooks/SignatoryContact.java new file mode 100644 index 000000000..cc4945a4b --- /dev/null +++ b/src/main/java/com/adyen/model/marketpaywebhooks/SignatoryContact.java @@ -0,0 +1,411 @@ +/* + * Classic Platforms - Notifications + * + * 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.marketpaywebhooks; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.adyen.model.marketpaywebhooks.ViasAddress; +import com.adyen.model.marketpaywebhooks.ViasName; +import com.adyen.model.marketpaywebhooks.ViasPersonalData; +import com.adyen.model.marketpaywebhooks.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/marketpaywebhooks/Split.java b/src/main/java/com/adyen/model/marketpaywebhooks/Split.java new file mode 100644 index 000000000..f1cc5b26f --- /dev/null +++ b/src/main/java/com/adyen/model/marketpaywebhooks/Split.java @@ -0,0 +1,316 @@ +/* + * Classic Platforms - Notifications + * + * 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.marketpaywebhooks; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.adyen.model.marketpaywebhooks.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/marketpaywebhooks/SplitAmount.java b/src/main/java/com/adyen/model/marketpaywebhooks/SplitAmount.java new file mode 100644 index 000000000..85219e67f --- /dev/null +++ b/src/main/java/com/adyen/model/marketpaywebhooks/SplitAmount.java @@ -0,0 +1,159 @@ +/* + * Classic Platforms - Notifications + * + * 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.marketpaywebhooks; + +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/marketpaywebhooks/StoreDetail.java b/src/main/java/com/adyen/model/marketpaywebhooks/StoreDetail.java new file mode 100644 index 000000000..7de98a1d3 --- /dev/null +++ b/src/main/java/com/adyen/model/marketpaywebhooks/StoreDetail.java @@ -0,0 +1,640 @@ +/* + * Classic Platforms - Notifications + * + * 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.marketpaywebhooks; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.adyen.model.marketpaywebhooks.ViasAddress; +import com.adyen.model.marketpaywebhooks.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/marketpaywebhooks/Transaction.java b/src/main/java/com/adyen/model/marketpaywebhooks/Transaction.java new file mode 100644 index 000000000..7f8b25112 --- /dev/null +++ b/src/main/java/com/adyen/model/marketpaywebhooks/Transaction.java @@ -0,0 +1,717 @@ +/* + * Classic Platforms - Notifications + * + * 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.marketpaywebhooks; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.adyen.model.marketpaywebhooks.Amount; +import com.adyen.model.marketpaywebhooks.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/marketpaywebhooks/TransferFundsNotification.java b/src/main/java/com/adyen/model/marketpaywebhooks/TransferFundsNotification.java new file mode 100644 index 000000000..a30dd0b46 --- /dev/null +++ b/src/main/java/com/adyen/model/marketpaywebhooks/TransferFundsNotification.java @@ -0,0 +1,317 @@ +/* + * Classic Platforms - Notifications + * + * 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.marketpaywebhooks; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.adyen.model.marketpaywebhooks.NotificationErrorContainer; +import com.adyen.model.marketpaywebhooks.TransferFundsNotificationContent; +import com.fasterxml.jackson.annotation.JsonInclude; +import 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; + + +/** + * TransferFundsNotification + */ +@JsonPropertyOrder({ + TransferFundsNotification.JSON_PROPERTY_CONTENT, + TransferFundsNotification.JSON_PROPERTY_ERROR, + TransferFundsNotification.JSON_PROPERTY_EVENT_DATE, + TransferFundsNotification.JSON_PROPERTY_EVENT_TYPE, + TransferFundsNotification.JSON_PROPERTY_EXECUTING_USER_KEY, + TransferFundsNotification.JSON_PROPERTY_LIVE, + TransferFundsNotification.JSON_PROPERTY_PSP_REFERENCE +}) + +public class TransferFundsNotification { + public static final String JSON_PROPERTY_CONTENT = "content"; + private TransferFundsNotificationContent content; + + public static final String JSON_PROPERTY_ERROR = "error"; + private NotificationErrorContainer error; + + public static final String JSON_PROPERTY_EVENT_DATE = "eventDate"; + private OffsetDateTime eventDate; + + public static final String JSON_PROPERTY_EVENT_TYPE = "eventType"; + private String eventType; + + public static final String JSON_PROPERTY_EXECUTING_USER_KEY = "executingUserKey"; + private String executingUserKey; + + public static final String JSON_PROPERTY_LIVE = "live"; + private Boolean live; + + public static final String JSON_PROPERTY_PSP_REFERENCE = "pspReference"; + private String pspReference; + + public TransferFundsNotification() { + } + + public TransferFundsNotification content(TransferFundsNotificationContent content) { + this.content = content; + return this; + } + + /** + * Get content + * @return content + **/ + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_CONTENT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public TransferFundsNotificationContent getContent() { + return content; + } + + + @JsonProperty(JSON_PROPERTY_CONTENT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setContent(TransferFundsNotificationContent content) { + this.content = content; + } + + + public TransferFundsNotification error(NotificationErrorContainer error) { + this.error = error; + return this; + } + + /** + * Get error + * @return error + **/ + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_ERROR) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public NotificationErrorContainer getError() { + return error; + } + + + @JsonProperty(JSON_PROPERTY_ERROR) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setError(NotificationErrorContainer error) { + this.error = error; + } + + + public TransferFundsNotification eventDate(OffsetDateTime eventDate) { + this.eventDate = eventDate; + return this; + } + + /** + * The date and time when an event has been completed. + * @return eventDate + **/ + @ApiModelProperty(required = true, value = "The date and time when an event has been completed.") + @JsonProperty(JSON_PROPERTY_EVENT_DATE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public OffsetDateTime getEventDate() { + return eventDate; + } + + + @JsonProperty(JSON_PROPERTY_EVENT_DATE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEventDate(OffsetDateTime eventDate) { + this.eventDate = eventDate; + } + + + public TransferFundsNotification eventType(String eventType) { + this.eventType = eventType; + return this; + } + + /** + * The event type of the notification. + * @return eventType + **/ + @ApiModelProperty(required = true, value = "The event type of the notification.") + @JsonProperty(JSON_PROPERTY_EVENT_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getEventType() { + return eventType; + } + + + @JsonProperty(JSON_PROPERTY_EVENT_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEventType(String eventType) { + this.eventType = eventType; + } + + + public TransferFundsNotification executingUserKey(String executingUserKey) { + this.executingUserKey = executingUserKey; + return this; + } + + /** + * The user or process that has triggered the notification. + * @return executingUserKey + **/ + @ApiModelProperty(required = true, value = "The user or process that has triggered the notification.") + @JsonProperty(JSON_PROPERTY_EXECUTING_USER_KEY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getExecutingUserKey() { + return executingUserKey; + } + + + @JsonProperty(JSON_PROPERTY_EXECUTING_USER_KEY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setExecutingUserKey(String executingUserKey) { + this.executingUserKey = executingUserKey; + } + + + public TransferFundsNotification live(Boolean live) { + this.live = live; + return this; + } + + /** + * Indicates whether the notification originated from the live environment or the test environment. If true, the notification originated from the live environment. If false, the notification originated from the test environment. + * @return live + **/ + @ApiModelProperty(required = true, value = "Indicates whether the notification originated from the live environment or the test environment. If true, the notification originated from the live environment. If false, the notification originated from the test environment.") + @JsonProperty(JSON_PROPERTY_LIVE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getLive() { + return live; + } + + + @JsonProperty(JSON_PROPERTY_LIVE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setLive(Boolean live) { + this.live = live; + } + + + public TransferFundsNotification pspReference(String pspReference) { + this.pspReference = pspReference; + return this; + } + + /** + * The PSP reference of the request from which the notification originates. + * @return pspReference + **/ + @ApiModelProperty(required = true, value = "The PSP reference of the request from which the notification originates.") + @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; + } + + + /** + * Return true if this TransferFundsNotification object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TransferFundsNotification transferFundsNotification = (TransferFundsNotification) o; + return Objects.equals(this.content, transferFundsNotification.content) && + Objects.equals(this.error, transferFundsNotification.error) && + Objects.equals(this.eventDate, transferFundsNotification.eventDate) && + Objects.equals(this.eventType, transferFundsNotification.eventType) && + Objects.equals(this.executingUserKey, transferFundsNotification.executingUserKey) && + Objects.equals(this.live, transferFundsNotification.live) && + Objects.equals(this.pspReference, transferFundsNotification.pspReference); + } + + @Override + public int hashCode() { + return Objects.hash(content, error, eventDate, eventType, executingUserKey, live, pspReference); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TransferFundsNotification {\n"); + sb.append(" content: ").append(toIndentedString(content)).append("\n"); + sb.append(" error: ").append(toIndentedString(error)).append("\n"); + sb.append(" eventDate: ").append(toIndentedString(eventDate)).append("\n"); + sb.append(" eventType: ").append(toIndentedString(eventType)).append("\n"); + sb.append(" executingUserKey: ").append(toIndentedString(executingUserKey)).append("\n"); + sb.append(" live: ").append(toIndentedString(live)).append("\n"); + sb.append(" pspReference: ").append(toIndentedString(pspReference)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line 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 TransferFundsNotification given an JSON string + * + * @param jsonString JSON string + * @return An instance of TransferFundsNotification + * @throws JsonProcessingException if the JSON string is invalid with respect to TransferFundsNotification + */ + public static TransferFundsNotification fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, TransferFundsNotification.class); + } +/** + * Convert an instance of TransferFundsNotification 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/marketpaywebhooks/TransferFundsNotificationContent.java b/src/main/java/com/adyen/model/marketpaywebhooks/TransferFundsNotificationContent.java new file mode 100644 index 000000000..14a9ed896 --- /dev/null +++ b/src/main/java/com/adyen/model/marketpaywebhooks/TransferFundsNotificationContent.java @@ -0,0 +1,327 @@ +/* + * Classic Platforms - Notifications + * + * 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.marketpaywebhooks; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.adyen.model.marketpaywebhooks.Amount; +import com.adyen.model.marketpaywebhooks.ErrorFieldType; +import com.adyen.model.marketpaywebhooks.OperationStatus; +import com.fasterxml.jackson.annotation.JsonInclude; +import 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; + + +/** + * TransferFundsNotificationContent + */ +@JsonPropertyOrder({ + TransferFundsNotificationContent.JSON_PROPERTY_AMOUNT, + TransferFundsNotificationContent.JSON_PROPERTY_DESTINATION_ACCOUNT_CODE, + TransferFundsNotificationContent.JSON_PROPERTY_INVALID_FIELDS, + TransferFundsNotificationContent.JSON_PROPERTY_MERCHANT_REFERENCE, + TransferFundsNotificationContent.JSON_PROPERTY_SOURCE_ACCOUNT_CODE, + TransferFundsNotificationContent.JSON_PROPERTY_STATUS, + TransferFundsNotificationContent.JSON_PROPERTY_TRANSFER_CODE +}) + +public class TransferFundsNotificationContent { + 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_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_SOURCE_ACCOUNT_CODE = "sourceAccountCode"; + private String sourceAccountCode; + + public static final String JSON_PROPERTY_STATUS = "status"; + private OperationStatus status; + + public static final String JSON_PROPERTY_TRANSFER_CODE = "transferCode"; + private String transferCode; + + public TransferFundsNotificationContent() { + } + + public TransferFundsNotificationContent 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 TransferFundsNotificationContent destinationAccountCode(String destinationAccountCode) { + this.destinationAccountCode = destinationAccountCode; + return this; + } + + /** + * The code of the Account to which funds were credited. + * @return destinationAccountCode + **/ + @ApiModelProperty(value = "The code of the Account to which funds were credited.") + @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 TransferFundsNotificationContent invalidFields(List invalidFields) { + this.invalidFields = invalidFields; + return this; + } + + public TransferFundsNotificationContent addInvalidFieldsItem(ErrorFieldType invalidFieldsItem) { + if (this.invalidFields == null) { + this.invalidFields = new ArrayList<>(); + } + this.invalidFields.add(invalidFieldsItem); + return this; + } + + /** + * Invalid fields list. + * @return invalidFields + **/ + @ApiModelProperty(value = "Invalid fields list.") + @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 TransferFundsNotificationContent merchantReference(String merchantReference) { + this.merchantReference = merchantReference; + return this; + } + + /** + * The reference provided by the merchant. + * @return merchantReference + **/ + @ApiModelProperty(value = "The reference provided by the merchant.") + @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 TransferFundsNotificationContent sourceAccountCode(String sourceAccountCode) { + this.sourceAccountCode = sourceAccountCode; + return this; + } + + /** + * The code of the Account from which funds were debited. + * @return sourceAccountCode + **/ + @ApiModelProperty(value = "The code of the Account from which funds were debited.") + @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 TransferFundsNotificationContent status(OperationStatus status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + **/ + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public OperationStatus getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setStatus(OperationStatus status) { + this.status = status; + } + + + public TransferFundsNotificationContent transferCode(String transferCode) { + this.transferCode = transferCode; + return this; + } + + /** + * The transfer code. + * @return transferCode + **/ + @ApiModelProperty(value = "The transfer code.") + @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 TransferFundsNotificationContent object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TransferFundsNotificationContent transferFundsNotificationContent = (TransferFundsNotificationContent) o; + return Objects.equals(this.amount, transferFundsNotificationContent.amount) && + Objects.equals(this.destinationAccountCode, transferFundsNotificationContent.destinationAccountCode) && + Objects.equals(this.invalidFields, transferFundsNotificationContent.invalidFields) && + Objects.equals(this.merchantReference, transferFundsNotificationContent.merchantReference) && + Objects.equals(this.sourceAccountCode, transferFundsNotificationContent.sourceAccountCode) && + Objects.equals(this.status, transferFundsNotificationContent.status) && + Objects.equals(this.transferCode, transferFundsNotificationContent.transferCode); + } + + @Override + public int hashCode() { + return Objects.hash(amount, destinationAccountCode, invalidFields, merchantReference, sourceAccountCode, status, transferCode); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TransferFundsNotificationContent {\n"); + sb.append(" amount: ").append(toIndentedString(amount)).append("\n"); + sb.append(" destinationAccountCode: ").append(toIndentedString(destinationAccountCode)).append("\n"); + sb.append(" invalidFields: ").append(toIndentedString(invalidFields)).append("\n"); + sb.append(" merchantReference: ").append(toIndentedString(merchantReference)).append("\n"); + sb.append(" sourceAccountCode: ").append(toIndentedString(sourceAccountCode)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).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 TransferFundsNotificationContent given an JSON string + * + * @param jsonString JSON string + * @return An instance of TransferFundsNotificationContent + * @throws JsonProcessingException if the JSON string is invalid with respect to TransferFundsNotificationContent + */ + public static TransferFundsNotificationContent fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, TransferFundsNotificationContent.class); + } +/** + * Convert an instance of TransferFundsNotificationContent 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/marketpaywebhooks/UltimateParentCompany.java b/src/main/java/com/adyen/model/marketpaywebhooks/UltimateParentCompany.java new file mode 100644 index 000000000..e4f721178 --- /dev/null +++ b/src/main/java/com/adyen/model/marketpaywebhooks/UltimateParentCompany.java @@ -0,0 +1,192 @@ +/* + * Classic Platforms - Notifications + * + * 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.marketpaywebhooks; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.adyen.model.marketpaywebhooks.UltimateParentCompanyBusinessDetails; +import com.adyen.model.marketpaywebhooks.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/marketpaywebhooks/UltimateParentCompanyBusinessDetails.java b/src/main/java/com/adyen/model/marketpaywebhooks/UltimateParentCompanyBusinessDetails.java new file mode 100644 index 000000000..ea7e5eb6e --- /dev/null +++ b/src/main/java/com/adyen/model/marketpaywebhooks/UltimateParentCompanyBusinessDetails.java @@ -0,0 +1,252 @@ +/* + * Classic Platforms - Notifications + * + * 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.marketpaywebhooks; + +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/marketpaywebhooks/UpdateAccountHolderResponse.java b/src/main/java/com/adyen/model/marketpaywebhooks/UpdateAccountHolderResponse.java new file mode 100644 index 000000000..708389db0 --- /dev/null +++ b/src/main/java/com/adyen/model/marketpaywebhooks/UpdateAccountHolderResponse.java @@ -0,0 +1,496 @@ +/* + * Classic Platforms - Notifications + * + * 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.marketpaywebhooks; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.adyen.model.marketpaywebhooks.AccountHolderDetails; +import com.adyen.model.marketpaywebhooks.AccountHolderStatus; +import com.adyen.model.marketpaywebhooks.ErrorFieldType; +import com.adyen.model.marketpaywebhooks.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/marketpaywebhooks/UpdateAccountResponse.java b/src/main/java/com/adyen/model/marketpaywebhooks/UpdateAccountResponse.java new file mode 100644 index 000000000..880e9bfec --- /dev/null +++ b/src/main/java/com/adyen/model/marketpaywebhooks/UpdateAccountResponse.java @@ -0,0 +1,466 @@ +/* + * Classic Platforms - Notifications + * + * 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.marketpaywebhooks; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.adyen.model.marketpaywebhooks.ErrorFieldType; +import com.adyen.model.marketpaywebhooks.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/marketpaywebhooks/ViasAddress.java b/src/main/java/com/adyen/model/marketpaywebhooks/ViasAddress.java new file mode 100644 index 000000000..fa696c920 --- /dev/null +++ b/src/main/java/com/adyen/model/marketpaywebhooks/ViasAddress.java @@ -0,0 +1,283 @@ +/* + * Classic Platforms - Notifications + * + * 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.marketpaywebhooks; + +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/marketpaywebhooks/ViasName.java b/src/main/java/com/adyen/model/marketpaywebhooks/ViasName.java new file mode 100644 index 000000000..001b7165c --- /dev/null +++ b/src/main/java/com/adyen/model/marketpaywebhooks/ViasName.java @@ -0,0 +1,258 @@ +/* + * Classic Platforms - Notifications + * + * 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.marketpaywebhooks; + +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/marketpaywebhooks/ViasPersonalData.java b/src/main/java/com/adyen/model/marketpaywebhooks/ViasPersonalData.java new file mode 100644 index 000000000..df4b19d2f --- /dev/null +++ b/src/main/java/com/adyen/model/marketpaywebhooks/ViasPersonalData.java @@ -0,0 +1,201 @@ +/* + * Classic Platforms - Notifications + * + * 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.marketpaywebhooks; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.adyen.model.marketpaywebhooks.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/marketpaywebhooks/ViasPhoneNumber.java b/src/main/java/com/adyen/model/marketpaywebhooks/ViasPhoneNumber.java new file mode 100644 index 000000000..7e546789b --- /dev/null +++ b/src/main/java/com/adyen/model/marketpaywebhooks/ViasPhoneNumber.java @@ -0,0 +1,229 @@ +/* + * Classic Platforms - Notifications + * + * 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.marketpaywebhooks; + +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/notification/ClassicPlatformWebhookHandler.java b/src/main/java/com/adyen/notification/ClassicPlatformWebhookHandler.java new file mode 100644 index 000000000..987e4c045 --- /dev/null +++ b/src/main/java/com/adyen/notification/ClassicPlatformWebhookHandler.java @@ -0,0 +1,112 @@ +package com.adyen.notification; + +import com.adyen.model.marketpaywebhooks.AccountCloseNotification; +import com.adyen.model.marketpaywebhooks.AccountCreateNotification; +import com.adyen.model.marketpaywebhooks.AccountFundsBelowThresholdNotification; +import com.adyen.model.marketpaywebhooks.AccountHolderCreateNotification; +import com.adyen.model.marketpaywebhooks.AccountHolderPayoutNotification; +import com.adyen.model.marketpaywebhooks.AccountHolderStatusChangeNotification; +import com.adyen.model.marketpaywebhooks.AccountHolderUpcomingDeadlineNotification; +import com.adyen.model.marketpaywebhooks.AccountHolderUpdateNotification; +import com.adyen.model.marketpaywebhooks.AccountHolderVerificationNotification; +import com.adyen.model.marketpaywebhooks.AccountUpdateNotification; +import com.adyen.model.marketpaywebhooks.BeneficiarySetupNotification; +import com.adyen.model.marketpaywebhooks.CompensateNegativeBalanceNotification; +import com.adyen.model.marketpaywebhooks.DirectDebitInitiatedNotification; +import com.adyen.model.marketpaywebhooks.PaymentFailureNotification; +import com.adyen.model.marketpaywebhooks.RefundFundsTransferNotification; +import com.adyen.model.marketpaywebhooks.ReportAvailableNotification; +import com.adyen.model.marketpaywebhooks.ScheduledRefundsNotification; +import com.adyen.model.marketpaywebhooks.TransferFundsNotification; +import com.adyen.model.transferwebhooks.JSON; + +import java.util.Optional; + +public class ClassicPlatformWebhookHandler { + private final String payload; + + public ClassicPlatformWebhookHandler(String payload) { + this.payload = payload; + } + + public Optional getAccountCreateNotification() { + return getOptionalField(AccountCreateNotification.class); + } + + public Optional getAccountCloseNotification() { + return getOptionalField(AccountCloseNotification.class); + } + + public Optional getAccountFundsBelowThresholdNotification() { + return getOptionalField(AccountFundsBelowThresholdNotification.class); + } + + public Optional getAccountHolderCreateNotification() { + return getOptionalField(AccountHolderCreateNotification.class); + } + + public Optional getAccountHolderPayoutNotification() { + return getOptionalField(AccountHolderPayoutNotification.class); + } + + public Optional getAccountHolderStatusChangeNotification() { + return getOptionalField(AccountHolderStatusChangeNotification.class); + } + + public Optional getAccountHolderUpcomingDeadlineNotification() { + return getOptionalField(AccountHolderUpcomingDeadlineNotification.class); + } + + public Optional getAccountHolderUpdateNotification() { + return getOptionalField(AccountHolderUpdateNotification.class); + } + + public Optional getAccountHolderVerificationNotification() { + return getOptionalField(AccountHolderVerificationNotification.class); + } + + public Optional getAccountUpdateNotification() { + return getOptionalField(AccountUpdateNotification.class); + } + + public Optional getBeneficiarySetupNotification() { + return getOptionalField(BeneficiarySetupNotification.class); + } + + public Optional getCompensateNegativeBalanceNotification() { + return getOptionalField(CompensateNegativeBalanceNotification.class); + } + + public Optional getDirectDebitInitiatedNotification() { + return getOptionalField(DirectDebitInitiatedNotification.class); + } + + public Optional getPaymentFailureNotification() { + return getOptionalField(PaymentFailureNotification.class); + } + + public Optional getRefundFundsTransferNotification() { + return getOptionalField(RefundFundsTransferNotification.class); + } + + public Optional getReportAvailableNotification() { + return getOptionalField(ReportAvailableNotification.class); + } + + public Optional getScheduledRefundsNotification() { + return getOptionalField(ScheduledRefundsNotification.class); + } + + public Optional getTransferFundsNotification() { + return getOptionalField(TransferFundsNotification.class); + } + + private Optional getOptionalField(Class clazz) { + try { + T val = JSON.getMapper().readValue(payload, clazz); + return Optional.ofNullable(val); + } catch (Exception e) { + return Optional.empty(); + } + } +} diff --git a/src/test/java/com/adyen/WebhookTest.java b/src/test/java/com/adyen/WebhookTest.java index f8d3528a2..a0cf2bc6e 100644 --- a/src/test/java/com/adyen/WebhookTest.java +++ b/src/test/java/com/adyen/WebhookTest.java @@ -21,12 +21,11 @@ package com.adyen; import com.adyen.model.acswebhooks.AuthenticationNotificationRequest; -import com.adyen.model.balanceplatform.BankAccountIdentificationValidationRequest; import com.adyen.model.configurationwebhooks.AccountHolderNotificationRequest; -import com.adyen.model.configurationwebhooks.BalanceAccountNotificationRequest; import com.adyen.model.managementwebhooks.MerchantCreatedNotificationRequest; import com.adyen.model.managementwebhooks.MerchantUpdatedNotificationRequest; import com.adyen.model.managementwebhooks.PaymentMethodCreatedNotificationRequest; +import com.adyen.model.marketpaywebhooks.AccountHolderCreateNotification; import com.adyen.model.nexo.DeviceType; import com.adyen.model.nexo.DisplayOutput; import com.adyen.model.nexo.EventNotification; @@ -36,6 +35,7 @@ import com.adyen.model.notification.NotificationRequestItem; import com.adyen.model.terminal.TerminalAPIRequest; import com.adyen.notification.BankingWebhookHandler; +import com.adyen.notification.ClassicPlatformWebhookHandler; import com.adyen.notification.ManagementWebhookHandler; import com.adyen.notification.WebhookHandler; import com.adyen.util.HMACValidator; @@ -44,7 +44,6 @@ import org.junit.Assert; import org.junit.Before; import org.junit.Test; -import org.junit.function.ThrowingRunnable; import java.io.IOException; import java.security.SignatureException; @@ -287,7 +286,6 @@ public void testBankingWebhookAcsParsing() { " \"challenge\" : {\n" + " \"flow\" : \"OTP_SMS\",\n" + " \"lastInteraction\" : \"2023-01-19T17:37:13+01:00\",\n" + - " \"phoneNumber\" : \"******6789\",\n" + " \"resends\" : 0,\n" + " \"retries\" : 2\n" + " },\n" + @@ -425,4 +423,233 @@ public void testManagementWebhookMerchantCreatedParsing() { Assert.assertEquals("MC3224X22322535GH8D537TJR", request.getData().getMerchantId()); Assert.assertEquals(MerchantCreatedNotificationRequest.TypeEnum.MERCHANT_CREATED, request.getType()); } + + @Test + public void testClassicPlatformParsing() throws JsonProcessingException { + String notification = "{\n" + + " \"error\": {\n" + + " \"errorCode\": \"000\",\n" + + " \"message\": \"test error message\"\n" + + " },\n" + + " \"eventDate\": \"2019-01-02T01:00:00+01:00\",\n" + + " \"eventType\": \"ACCOUNT_HOLDER_CREATED\",\n" + + " \"executingUserKey\": \"executing-user-key\",\n" + + " \"live\": false,\n" + + " \"pspReference\": \"TSTPSPR0001\",\n" + + " \"content\": {\n" + + " \"invalidFields\": [\n" + + " {\n" + + " \"errorCode\": 1,\n" + + " \"errorDescription\": \"Field is missing\",\n" + + " \"fieldType\": {\n" + + " \"field\": \"AccountHolderDetails.BusinessDetails.Shareholders.unknown\",\n" + + " \"fieldName\": \"unknown\",\n" + + " \"shareholderCode\": \"SH00001\"\n" + + " }\n" + + " }\n" + + " ],\n" + + " \"pspReference\": \"TSTPSPR0001\",\n" + + " \"resultCode\": \"Success\",\n" + + " \"accountCode\": \"AC0000000001\",\n" + + " \"accountHolderCode\": \"AHC00000001\",\n" + + " \"accountHolderDetails\": {\n" + + " \"address\": {\n" + + " \"city\": \"Amsterdam\",\n" + + " \"country\": \"NL\",\n" + + " \"houseNumberOrName\": \"96/A\",\n" + + " \"postalCode\": \"1000AA\",\n" + + " \"stateOrProvince\": \"NH\",\n" + + " \"street\": \"Street\"\n" + + " },\n" + + " \"bankAccountDetails\": [\n" + + " {\n" + + " \"accountNumber\": \"00000000\",\n" + + " \"accountType\": \"checking\",\n" + + " \"bankAccountName\": \"Account name\",\n" + + " \"bankAccountReference\": \"Ref#000001\",\n" + + " \"bankAccountUUID\": \"00000000-0000-0000-0000-000000000000\",\n" + + " \"bankBicSwift\": \"BSWFT\",\n" + + " \"bankCity\": \"Amsterdam\",\n" + + " \"bankCode\": \"00000000\",\n" + + " \"bankName\": \"Bank Name Co\",\n" + + " \"branchCode\": \"00000000\",\n" + + " \"checkCode\": \"1234\",\n" + + " \"countryCode\": \"NL\",\n" + + " \"currencyCode\": \"EUR\",\n" + + " \"iban\": \"NL00NONE1234123412\",\n" + + " \"ownerCity\": \"Amsterdam\",\n" + + " \"ownerCountryCode\": \"NL\",\n" + + " \"ownerDateOfBirth\": \"1981-02-27\",\n" + + " \"ownerHouseNumberOrName\": \"32/B\",\n" + + " \"ownerName\": \"Owner Name\",\n" + + " \"ownerNationality\": \"NL\",\n" + + " \"ownerPostalCode\": \"1000AA\",\n" + + " \"ownerState\": \"NH\",\n" + + " \"ownerStreet\": \"Owner Street\",\n" + + " \"primaryAccount\": false,\n" + + " \"taxId\": \"OT#12345\",\n" + + " \"urlForVerification\": \"http://adyen.com\"\n" + + " }\n" + + " ],\n" + + " \"businessDetails\": {\n" + + " \"doingBusinessAs\": \"Business name\",\n" + + " \"legalBusinessName\": \"Legal Business Co\",\n" + + " \"registrationNumber\": \"Reg#1234\",\n" + + " \"shareholders\": [\n" + + " {\n" + + " \"address\": {\n" + + " \"city\": \"Amsterdam\",\n" + + " \"country\": \"NL\",\n" + + " \"houseNumberOrName\": \"96/A\",\n" + + " \"postalCode\": \"1000AA\",\n" + + " \"stateOrProvince\": \"NH\",\n" + + " \"street\": \"Street\"\n" + + " },\n" + + " \"email\": \"contact@merchant.com\",\n" + + " \"fullPhoneNumber\": \"+3112345678\",\n" + + " \"name\": {\n" + + " \"firstName\": \"Firstname\",\n" + + " \"gender\": \"UNKNOWN\",\n" + + " \"infix\": \"infix\",\n" + + " \"lastName\": \"Lastname\"\n" + + " },\n" + + " \"personalData\": {\n" + + " \"dateOfBirth\": \"1981-02-27\",\n" + + " \"documentData\": [\n" + + " {\n" + + " \"expirationDate\": \"2030-12-31\",\n" + + " \"issuerCountry\": \"NL\",\n" + + " \"issuerState\": \"NH\",\n" + + " \"number\": \"ID#123456\",\n" + + " \"type\": \"ID\"\n" + + " }\n" + + " ],\n" + + " \"nationality\": \"NL\"\n" + + " },\n" + + " \"phoneNumber\": {\n" + + " \"phoneCountryCode\": \"NL\",\n" + + " \"phoneNumber\": \"858888138\",\n" + + " \"phoneType\": \"Landline\"\n" + + " },\n" + + " \"shareholderCode\": \"SH00001\",\n" + + " \"shareholderReference\": \"SHREF#0000001\",\n" + + " \"webAddress\": \"https://www.adyen.com/\"\n" + + " }\n" + + " ],\n" + + " \"taxId\": \"TaxID#1234\"\n" + + " },\n" + + " \"email\": \"contact@adyen.com\",\n" + + " \"fullPhoneNumber\": \"+31858888138\",\n" + + " \"individualDetails\": {\n" + + " \"name\": {\n" + + " \"firstName\": \"Firstname\",\n" + + " \"gender\": \"UNKNOWN\",\n" + + " \"infix\": \"infix\",\n" + + " \"lastName\": \"Lastname\"\n" + + " },\n" + + " \"personalData\": {\n" + + " \"dateOfBirth\": \"1981-02-27\",\n" + + " \"documentData\": [\n" + + " {\n" + + " \"expirationDate\": \"2030-12-31\",\n" + + " \"issuerCountry\": \"NL\",\n" + + " \"issuerState\": \"NH\",\n" + + " \"number\": \"ID#123456\",\n" + + " \"type\": \"ID\"\n" + + " }\n" + + " ],\n" + + " \"nationality\": \"NL\"\n" + + " }\n" + + " },\n" + + " \"merchantCategoryCode\": \"1212\",\n" + + " \"metadata\": {\n" + + " \"MetaKey\": \"MetaValue\"\n" + + " },\n" + + " \"phoneNumber\": {\n" + + " \"phoneCountryCode\": \"NL\",\n" + + " \"phoneNumber\": \"858888138\",\n" + + " \"phoneType\": \"Landline\"\n" + + " },\n" + + " \"webAddress\": \"https://adyen.com\"\n" + + " },\n" + + " \"accountHolderStatus\": {\n" + + " \"status\": \"Active\",\n" + + " \"statusReason\": \"Reason of status\",\n" + + " \"processingState\": {\n" + + " \"disabled\": true,\n" + + " \"disableReason\": \"Reason for disabled status\",\n" + + " \"processedFrom\": {\n" + + " \"currency\": \"EUR\",\n" + + " \"value\": 10\n" + + " },\n" + + " \"processedTo\": {\n" + + " \"currency\": \"EUR\",\n" + + " \"value\": 100\n" + + " },\n" + + " \"tierNumber\": 2\n" + + " },\n" + + " \"payoutState\": {\n" + + " \"allowPayout\": false,\n" + + " \"payoutLimit\": {\n" + + " \"currency\": \"EUR\",\n" + + " \"value\": 1000\n" + + " },\n" + + " \"disabled\": true,\n" + + " \"disableReason\": \"Reason for disabled status\",\n" + + " \"tierNumber\": 2,\n" + + " \"notAllowedReason\": \"Reason of not allowed\"\n" + + " },\n" + + " \"events\": [\n" + + " {\n" + + " \"event\": \"InactivateAccount\",\n" + + " \"executionDate\": \"2019-01-01T01:00:00+01:00\",\n" + + " \"reason\": \"Reason of event\"\n" + + " }\n" + + " ]\n" + + " },\n" + + " \"description\": \"Description for account holder\",\n" + + " \"legalEntity\": \"Business\",\n" + + " \"primaryCurrency\": \"EUR\",\n" + + " \"verification\": {\n" + + " \"accountHolder\": {\n" + + " \"checks\": [\n" + + " {\n" + + " \"type\": \"IDENTITY_VERIFICATION\",\n" + + " \"status\": \"PENDING\",\n" + + " \"summary\": {\n" + + " \"kycCheckCode\": 100,\n" + + " \"kycCheckDescription\": \"KYC check summary description\"\n" + + " },\n" + + " \"requiredFields\": [\n" + + " \"field.missing\"\n" + + " ]\n" + + " }\n" + + " ]\n" + + " },\n" + + " \"shareholders\": [\n" + + " {\n" + + " \"checks\": [\n" + + " {\n" + + " \"type\": \"IDENTITY_VERIFICATION\",\n" + + " \"status\": \"PENDING\",\n" + + " \"summary\": {\n" + + " \"kycCheckCode\": 100,\n" + + " \"kycCheckDescription\": \"KYC check summary description\"\n" + + " },\n" + + " \"requiredFields\": [\n" + + " \"field.missing\"\n" + + " ]\n" + + " }\n" + + " ],\n" + + " \"shareholderCode\": \"SH000001\"\n" + + " }\n" + + " ]\n" + + " }\n" + + " }\n" + + "}"; + ClassicPlatformWebhookHandler webhookHandler = new ClassicPlatformWebhookHandler(notification); + Assert.assertTrue(webhookHandler.getAccountHolderCreateNotification().isPresent()); + AccountHolderCreateNotification payload = webhookHandler.getAccountHolderCreateNotification().get(); + Assert.assertEquals("ACCOUNT_HOLDER_CREATED", payload.getEventType()); + } } From c96e5d11d090dc1c380d3c076880d52eb9010aa3 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 16 Oct 2023 09:23:11 +0000 Subject: [PATCH 6/7] chore(deps): update dependency org.mockito:mockito-core to v5.6.0 (#1142) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: jillingk <93914435+jillingk@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 0ee8d4638..5a3fb2e6b 100644 --- a/pom.xml +++ b/pom.xml @@ -218,7 +218,7 @@ org.mockito mockito-core - 5.5.0 + 5.6.0 test From d6cc1d7072de3be6ef407f73f97b63d67b7c6453 Mon Sep 17 00:00:00 2001 From: Adyen Automation Date: Mon, 16 Oct 2023 09:23:27 +0000 Subject: [PATCH 7/7] chore(release): bump to 21.6.0 --- README.md | 2 +- pom.xml | 2 +- src/main/java/com/adyen/Client.java | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 108327c8f..6a7ac346b 100644 --- a/README.md +++ b/README.md @@ -65,7 +65,7 @@ You can use Maven and add this dependency to your project's POM: com.adyen adyen-java-api-library - 21.5.0 + 21.6.0 ``` diff --git a/pom.xml b/pom.xml index 5a3fb2e6b..ccb9f231e 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ com.adyen adyen-java-api-library jar - 21.5.0 + 21.6.0 Adyen Java API Library Adyen API Client Library for Java https://github.com/adyen/adyen-java-api-library diff --git a/src/main/java/com/adyen/Client.java b/src/main/java/com/adyen/Client.java index 827d43883..7556e079b 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.5.0"; + public static final String LIB_VERSION = "21.6.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";