
com.adyen.model.marketpayaccount.DocumentDetail Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of adyen-java-api-library Show documentation
Show all versions of adyen-java-api-library Show documentation
Adyen API Client Library for Java
/*
* Account API
* This API is used for the classic integration. If you are just starting your implementation, refer to our [new integration guide](https://docs.adyen.com/marketplaces-and-platforms) instead. The Account API provides endpoints for managing account-related entities on your platform. These related entities include account holders, accounts, bank accounts, shareholders, and verification-related documents. The management operations include actions such as creation, retrieval, updating, and deletion of them. For more information, refer to our [documentation](https://docs.adyen.com/marketplaces-and-platforms/classic). ## Authentication Your Adyen contact will provide your API credential and an API key. To connect to the API, add an `X-API-Key` header with the API key as the value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: YOUR_API_KEY\" \\ ... ``` Alternatively, you can use the username and password to connect to the API using basic authentication. For example: ``` curl -U \"[email protected]_PLATFORM_ACCOUNT\":\"YOUR_WS_PASSWORD\" \\ -H \"Content-Type: application/json\" \\ ... ``` When going live, you need to generate new web service user credentials to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning The Account API supports [versioning](https://docs.adyen.com/development-resources/versioning) using a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://cal-test.adyen.com/cal/services/Account/v6/createAccountHolder ```
*
* The version of the OpenAPI document: 6
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
package com.adyen.model.marketpayaccount;
import java.util.Objects;
import java.util.Arrays;
import java.util.Map;
import java.util.HashMap;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonTypeName;
import com.fasterxml.jackson.annotation.JsonValue;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.fasterxml.jackson.core.JsonProcessingException;
/**
* DocumentDetail
*/
@JsonPropertyOrder({
DocumentDetail.JSON_PROPERTY_ACCOUNT_HOLDER_CODE,
DocumentDetail.JSON_PROPERTY_BANK_ACCOUNT_U_U_I_D,
DocumentDetail.JSON_PROPERTY_DESCRIPTION,
DocumentDetail.JSON_PROPERTY_DOCUMENT_TYPE,
DocumentDetail.JSON_PROPERTY_FILENAME,
DocumentDetail.JSON_PROPERTY_LEGAL_ARRANGEMENT_CODE,
DocumentDetail.JSON_PROPERTY_LEGAL_ARRANGEMENT_ENTITY_CODE,
DocumentDetail.JSON_PROPERTY_SHAREHOLDER_CODE,
DocumentDetail.JSON_PROPERTY_SIGNATORY_CODE
})
public class DocumentDetail {
public static final String JSON_PROPERTY_ACCOUNT_HOLDER_CODE = "accountHolderCode";
private String accountHolderCode;
public static final String JSON_PROPERTY_BANK_ACCOUNT_U_U_I_D = "bankAccountUUID";
private String bankAccountUUID;
public static final String JSON_PROPERTY_DESCRIPTION = "description";
private String description;
/**
* The type of the document. Refer to [Verification checks](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-checks) for details on when each document type should be submitted and for the accepted file formats. Permitted values: * **BANK_STATEMENT**: A file containing a bank statement or other document proving ownership of a specific bank account. * **COMPANY_REGISTRATION_SCREENING** (Supported from v5 and later): A file containing a company registration document. * **CONSTITUTIONAL_DOCUMENT**: A file containing information about the account holder's legal arrangement. * **PASSPORT**: A file containing the identity page(s) of a passport. * **ID_CARD_FRONT**: A file containing only the front of the ID card. In order for a document to be usable, both the **ID_CARD_FRONT** and **ID_CARD_BACK** must be submitted. * **ID_CARD_BACK**: A file containing only the back of the ID card. In order for a document to be usable, both the **ID_CARD_FRONT** and **ID_CARD_BACK** must be submitted. * **DRIVING_LICENCE_FRONT**: A file containing only the front of the driving licence. In order for a document to be usable, both the **DRIVING_LICENCE_FRONT** and **DRIVING_LICENCE_BACK** must be submitted. * **DRIVING_LICENCE_BACK**: A file containing only the back of the driving licence. In order for a document to be usable, both the **DRIVING_LICENCE_FRONT** and **DRIVING_LICENCE_FRONT** must be submitted.
*/
public enum DocumentTypeEnum {
BANK_STATEMENT("BANK_STATEMENT"),
BSN("BSN"),
COMPANY_REGISTRATION_SCREENING("COMPANY_REGISTRATION_SCREENING"),
CONSTITUTIONAL_DOCUMENT("CONSTITUTIONAL_DOCUMENT"),
DRIVING_LICENCE("DRIVING_LICENCE"),
DRIVING_LICENCE_BACK("DRIVING_LICENCE_BACK"),
DRIVING_LICENCE_FRONT("DRIVING_LICENCE_FRONT"),
ID_CARD("ID_CARD"),
ID_CARD_BACK("ID_CARD_BACK"),
ID_CARD_FRONT("ID_CARD_FRONT"),
PASSPORT("PASSPORT"),
PROOF_OF_RESIDENCY("PROOF_OF_RESIDENCY"),
SSN("SSN"),
SUPPORTING_DOCUMENTS("SUPPORTING_DOCUMENTS");
private String value;
DocumentTypeEnum(String value) {
this.value = value;
}
@JsonValue
public String getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
@JsonCreator
public static DocumentTypeEnum fromValue(String value) {
for (DocumentTypeEnum b : DocumentTypeEnum.values()) {
if (b.value.equals(value)) {
return b;
}
}
throw new IllegalArgumentException("Unexpected value '" + value + "'");
}
}
public static final String JSON_PROPERTY_DOCUMENT_TYPE = "documentType";
private DocumentTypeEnum documentType;
public static final String JSON_PROPERTY_FILENAME = "filename";
private String filename;
public static final String JSON_PROPERTY_LEGAL_ARRANGEMENT_CODE = "legalArrangementCode";
private String legalArrangementCode;
public static final String JSON_PROPERTY_LEGAL_ARRANGEMENT_ENTITY_CODE = "legalArrangementEntityCode";
private String legalArrangementEntityCode;
public static final String JSON_PROPERTY_SHAREHOLDER_CODE = "shareholderCode";
private String shareholderCode;
public static final String JSON_PROPERTY_SIGNATORY_CODE = "signatoryCode";
private String signatoryCode;
public DocumentDetail() {
}
public DocumentDetail accountHolderCode(String accountHolderCode) {
this.accountHolderCode = accountHolderCode;
return this;
}
/**
* The code of account holder, to which the document applies.
* @return accountHolderCode
**/
@ApiModelProperty(value = "The code of account holder, to which the document applies.")
@JsonProperty(JSON_PROPERTY_ACCOUNT_HOLDER_CODE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getAccountHolderCode() {
return accountHolderCode;
}
@JsonProperty(JSON_PROPERTY_ACCOUNT_HOLDER_CODE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setAccountHolderCode(String accountHolderCode) {
this.accountHolderCode = accountHolderCode;
}
public DocumentDetail bankAccountUUID(String bankAccountUUID) {
this.bankAccountUUID = bankAccountUUID;
return this;
}
/**
* The Adyen-generated [`bankAccountUUID`](https://docs.adyen.com/api-explorer/#/Account/latest/post/createAccountHolder__resParam_accountHolderDetails-bankAccountDetails-bankAccountUUID) to which the document must be linked. Refer to [Bank account check](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-checks/bank-account-check#uploading-a-bank-statement) for details on when a document should be submitted. >Required if the `documentType` is **BANK_STATEMENT**, where a document is being submitted in order to verify a bank account.
* @return bankAccountUUID
**/
@ApiModelProperty(value = "The Adyen-generated [`bankAccountUUID`](https://docs.adyen.com/api-explorer/#/Account/latest/post/createAccountHolder__resParam_accountHolderDetails-bankAccountDetails-bankAccountUUID) to which the document must be linked. Refer to [Bank account check](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-checks/bank-account-check#uploading-a-bank-statement) for details on when a document should be submitted. >Required if the `documentType` is **BANK_STATEMENT**, where a document is being submitted in order to verify a bank account. ")
@JsonProperty(JSON_PROPERTY_BANK_ACCOUNT_U_U_I_D)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getBankAccountUUID() {
return bankAccountUUID;
}
@JsonProperty(JSON_PROPERTY_BANK_ACCOUNT_U_U_I_D)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setBankAccountUUID(String bankAccountUUID) {
this.bankAccountUUID = bankAccountUUID;
}
public DocumentDetail description(String description) {
this.description = description;
return this;
}
/**
* Description of the document.
* @return description
**/
@ApiModelProperty(value = "Description of the document.")
@JsonProperty(JSON_PROPERTY_DESCRIPTION)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getDescription() {
return description;
}
@JsonProperty(JSON_PROPERTY_DESCRIPTION)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setDescription(String description) {
this.description = description;
}
public DocumentDetail documentType(DocumentTypeEnum documentType) {
this.documentType = documentType;
return this;
}
/**
* The type of the document. Refer to [Verification checks](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-checks) for details on when each document type should be submitted and for the accepted file formats. Permitted values: * **BANK_STATEMENT**: A file containing a bank statement or other document proving ownership of a specific bank account. * **COMPANY_REGISTRATION_SCREENING** (Supported from v5 and later): A file containing a company registration document. * **CONSTITUTIONAL_DOCUMENT**: A file containing information about the account holder's legal arrangement. * **PASSPORT**: A file containing the identity page(s) of a passport. * **ID_CARD_FRONT**: A file containing only the front of the ID card. In order for a document to be usable, both the **ID_CARD_FRONT** and **ID_CARD_BACK** must be submitted. * **ID_CARD_BACK**: A file containing only the back of the ID card. In order for a document to be usable, both the **ID_CARD_FRONT** and **ID_CARD_BACK** must be submitted. * **DRIVING_LICENCE_FRONT**: A file containing only the front of the driving licence. In order for a document to be usable, both the **DRIVING_LICENCE_FRONT** and **DRIVING_LICENCE_BACK** must be submitted. * **DRIVING_LICENCE_BACK**: A file containing only the back of the driving licence. In order for a document to be usable, both the **DRIVING_LICENCE_FRONT** and **DRIVING_LICENCE_FRONT** must be submitted.
* @return documentType
**/
@ApiModelProperty(required = true, value = "The type of the document. Refer to [Verification checks](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-checks) for details on when each document type should be submitted and for the accepted file formats. Permitted values: * **BANK_STATEMENT**: A file containing a bank statement or other document proving ownership of a specific bank account. * **COMPANY_REGISTRATION_SCREENING** (Supported from v5 and later): A file containing a company registration document. * **CONSTITUTIONAL_DOCUMENT**: A file containing information about the account holder's legal arrangement. * **PASSPORT**: A file containing the identity page(s) of a passport. * **ID_CARD_FRONT**: A file containing only the front of the ID card. In order for a document to be usable, both the **ID_CARD_FRONT** and **ID_CARD_BACK** must be submitted. * **ID_CARD_BACK**: A file containing only the back of the ID card. In order for a document to be usable, both the **ID_CARD_FRONT** and **ID_CARD_BACK** must be submitted. * **DRIVING_LICENCE_FRONT**: A file containing only the front of the driving licence. In order for a document to be usable, both the **DRIVING_LICENCE_FRONT** and **DRIVING_LICENCE_BACK** must be submitted. * **DRIVING_LICENCE_BACK**: A file containing only the back of the driving licence. In order for a document to be usable, both the **DRIVING_LICENCE_FRONT** and **DRIVING_LICENCE_FRONT** must be submitted. ")
@JsonProperty(JSON_PROPERTY_DOCUMENT_TYPE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public DocumentTypeEnum getDocumentType() {
return documentType;
}
@JsonProperty(JSON_PROPERTY_DOCUMENT_TYPE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setDocumentType(DocumentTypeEnum documentType) {
this.documentType = documentType;
}
public DocumentDetail filename(String filename) {
this.filename = filename;
return this;
}
/**
* Filename of the document.
* @return filename
**/
@ApiModelProperty(value = "Filename of the document.")
@JsonProperty(JSON_PROPERTY_FILENAME)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getFilename() {
return filename;
}
@JsonProperty(JSON_PROPERTY_FILENAME)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setFilename(String filename) {
this.filename = filename;
}
public DocumentDetail legalArrangementCode(String legalArrangementCode) {
this.legalArrangementCode = legalArrangementCode;
return this;
}
/**
* The Adyen-generated [`legalArrangementCode`](https://docs.adyen.com/api-explorer/#/Account/latest/post/createAccountHolder__resParam_accountHolderDetails-legalArrangements-legalArrangementCode) to which the document must be linked.
* @return legalArrangementCode
**/
@ApiModelProperty(value = "The Adyen-generated [`legalArrangementCode`](https://docs.adyen.com/api-explorer/#/Account/latest/post/createAccountHolder__resParam_accountHolderDetails-legalArrangements-legalArrangementCode) to which the document must be linked.")
@JsonProperty(JSON_PROPERTY_LEGAL_ARRANGEMENT_CODE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getLegalArrangementCode() {
return legalArrangementCode;
}
@JsonProperty(JSON_PROPERTY_LEGAL_ARRANGEMENT_CODE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setLegalArrangementCode(String legalArrangementCode) {
this.legalArrangementCode = legalArrangementCode;
}
public DocumentDetail legalArrangementEntityCode(String legalArrangementEntityCode) {
this.legalArrangementEntityCode = legalArrangementEntityCode;
return this;
}
/**
* The Adyen-generated [`legalArrangementEntityCode`](https://docs.adyen.com/api-explorer/#/Account/v6/post/createAccountHolder__resParam_accountHolderDetails-legalArrangements-legalArrangementEntities-legalArrangementEntityCode) to which the document must be linked.
* @return legalArrangementEntityCode
**/
@ApiModelProperty(value = "The Adyen-generated [`legalArrangementEntityCode`](https://docs.adyen.com/api-explorer/#/Account/v6/post/createAccountHolder__resParam_accountHolderDetails-legalArrangements-legalArrangementEntities-legalArrangementEntityCode) to which the document must be linked.")
@JsonProperty(JSON_PROPERTY_LEGAL_ARRANGEMENT_ENTITY_CODE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getLegalArrangementEntityCode() {
return legalArrangementEntityCode;
}
@JsonProperty(JSON_PROPERTY_LEGAL_ARRANGEMENT_ENTITY_CODE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setLegalArrangementEntityCode(String legalArrangementEntityCode) {
this.legalArrangementEntityCode = legalArrangementEntityCode;
}
public DocumentDetail shareholderCode(String shareholderCode) {
this.shareholderCode = shareholderCode;
return this;
}
/**
* The Adyen-generated [`shareholderCode`](https://docs.adyen.com/api-explorer/#/Account/latest/post/createAccountHolder__resParam_accountHolderDetails-businessDetails-shareholders-shareholderCode) to which the document must be linked. Refer to [Verification checks](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-checks) for details on when a document should be submitted. >Required if the account holder has a `legalEntity` of type **Business** and the `documentType` is either **PASSPORT**, **ID_CARD_FRONT**, **ID_CARD_BACK**, **DRIVING_LICENCE_FRONT**, or **DRIVING_LICENCE_BACK**.
* @return shareholderCode
**/
@ApiModelProperty(value = "The Adyen-generated [`shareholderCode`](https://docs.adyen.com/api-explorer/#/Account/latest/post/createAccountHolder__resParam_accountHolderDetails-businessDetails-shareholders-shareholderCode) to which the document must be linked. Refer to [Verification checks](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-checks) for details on when a document should be submitted. >Required if the account holder has a `legalEntity` of type **Business** and the `documentType` is either **PASSPORT**, **ID_CARD_FRONT**, **ID_CARD_BACK**, **DRIVING_LICENCE_FRONT**, or **DRIVING_LICENCE_BACK**. ")
@JsonProperty(JSON_PROPERTY_SHAREHOLDER_CODE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getShareholderCode() {
return shareholderCode;
}
@JsonProperty(JSON_PROPERTY_SHAREHOLDER_CODE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setShareholderCode(String shareholderCode) {
this.shareholderCode = shareholderCode;
}
public DocumentDetail signatoryCode(String signatoryCode) {
this.signatoryCode = signatoryCode;
return this;
}
/**
* The Adyen-generated [`signatoryCode`](https://docs.adyen.com/api-explorer/#/Account/v6/post/createAccountHolder__resParam_accountHolderDetails-businessDetails-signatories-signatoryCode) to which the document must be linked.
* @return signatoryCode
**/
@ApiModelProperty(value = "The Adyen-generated [`signatoryCode`](https://docs.adyen.com/api-explorer/#/Account/v6/post/createAccountHolder__resParam_accountHolderDetails-businessDetails-signatories-signatoryCode) to which the document must be linked.")
@JsonProperty(JSON_PROPERTY_SIGNATORY_CODE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getSignatoryCode() {
return signatoryCode;
}
@JsonProperty(JSON_PROPERTY_SIGNATORY_CODE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setSignatoryCode(String signatoryCode) {
this.signatoryCode = signatoryCode;
}
/**
* Return true if this DocumentDetail object is equal to o.
*/
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
DocumentDetail documentDetail = (DocumentDetail) o;
return Objects.equals(this.accountHolderCode, documentDetail.accountHolderCode) &&
Objects.equals(this.bankAccountUUID, documentDetail.bankAccountUUID) &&
Objects.equals(this.description, documentDetail.description) &&
Objects.equals(this.documentType, documentDetail.documentType) &&
Objects.equals(this.filename, documentDetail.filename) &&
Objects.equals(this.legalArrangementCode, documentDetail.legalArrangementCode) &&
Objects.equals(this.legalArrangementEntityCode, documentDetail.legalArrangementEntityCode) &&
Objects.equals(this.shareholderCode, documentDetail.shareholderCode) &&
Objects.equals(this.signatoryCode, documentDetail.signatoryCode);
}
@Override
public int hashCode() {
return Objects.hash(accountHolderCode, bankAccountUUID, description, documentType, filename, legalArrangementCode, legalArrangementEntityCode, shareholderCode, signatoryCode);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class DocumentDetail {\n");
sb.append(" accountHolderCode: ").append(toIndentedString(accountHolderCode)).append("\n");
sb.append(" bankAccountUUID: ").append(toIndentedString(bankAccountUUID)).append("\n");
sb.append(" description: ").append(toIndentedString(description)).append("\n");
sb.append(" documentType: ").append(toIndentedString(documentType)).append("\n");
sb.append(" filename: ").append(toIndentedString(filename)).append("\n");
sb.append(" legalArrangementCode: ").append(toIndentedString(legalArrangementCode)).append("\n");
sb.append(" legalArrangementEntityCode: ").append(toIndentedString(legalArrangementEntityCode)).append("\n");
sb.append(" shareholderCode: ").append(toIndentedString(shareholderCode)).append("\n");
sb.append(" signatoryCode: ").append(toIndentedString(signatoryCode)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
/**
* Create an instance of DocumentDetail given an JSON string
*
* @param jsonString JSON string
* @return An instance of DocumentDetail
* @throws JsonProcessingException if the JSON string is invalid with respect to DocumentDetail
*/
public static DocumentDetail fromJson(String jsonString) throws JsonProcessingException {
return JSON.getMapper().readValue(jsonString, DocumentDetail.class);
}
/**
* Convert an instance of DocumentDetail to an JSON string
*
* @return JSON string
*/
public String toJson() throws JsonProcessingException {
return JSON.getMapper().writeValueAsString(this);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy