Class PaymentInstrument
- java.lang.Object
-
- com.adyen.model.configurationwebhooks.PaymentInstrument
-
public class PaymentInstrument extends Object
PaymentInstrument
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classPaymentInstrument.StatusEnumThe status of the payment instrument.static classPaymentInstrument.StatusReasonEnumThe reason for the status of the payment instrument.static classPaymentInstrument.TypeEnumThe type of payment instrument.
-
Field Summary
Fields Modifier and Type Field Description static StringJSON_PROPERTY_ADDITIONAL_BANK_ACCOUNT_IDENTIFICATIONSstatic StringJSON_PROPERTY_BALANCE_ACCOUNT_IDstatic StringJSON_PROPERTY_BANK_ACCOUNTstatic StringJSON_PROPERTY_CARDstatic StringJSON_PROPERTY_DESCRIPTIONstatic StringJSON_PROPERTY_IDstatic StringJSON_PROPERTY_ISSUING_COUNTRY_CODEstatic StringJSON_PROPERTY_PAYMENT_INSTRUMENT_GROUP_IDstatic StringJSON_PROPERTY_REFERENCEstatic StringJSON_PROPERTY_STATUSstatic StringJSON_PROPERTY_STATUS_COMMENTstatic StringJSON_PROPERTY_STATUS_REASONstatic StringJSON_PROPERTY_TYPE
-
Constructor Summary
Constructors Constructor Description PaymentInstrument()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description PaymentInstrumentaddAdditionalBankAccountIdentificationsItem(PaymentInstrumentAdditionalBankAccountIdentificationsInner additionalBankAccountIdentificationsItem)PaymentInstrumentadditionalBankAccountIdentifications(List<PaymentInstrumentAdditionalBankAccountIdentificationsInner> additionalBankAccountIdentifications)Deprecated.since Configuration webhooks v2 Please use `bankAccount` object insteadPaymentInstrumentbalanceAccountId(String balanceAccountId)The unique identifier of the [balance account](https://docs.adyen.com/api-explorer/#/balanceplatform/v1/post/balanceAccounts__resParam_id) associated with the payment instrument.PaymentInstrumentbankAccount(BankAccountDetails bankAccount)bankAccountPaymentInstrumentcard(Card card)cardPaymentInstrumentdescription(String description)Your description for the payment instrument, maximum 300 characters.booleanequals(Object o)Return true if this PaymentInstrument object is equal to o.static PaymentInstrumentfromJson(String jsonString)Create an instance of PaymentInstrument given an JSON stringList<PaymentInstrumentAdditionalBankAccountIdentificationsInner>getAdditionalBankAccountIdentifications()Deprecated.since Configuration webhooks v2 Please use `bankAccount` object insteadStringgetBalanceAccountId()The unique identifier of the [balance account](https://docs.adyen.com/api-explorer/#/balanceplatform/v1/post/balanceAccounts__resParam_id) associated with the payment instrument.BankAccountDetailsgetBankAccount()bankAccountCardgetCard()cardStringgetDescription()Your description for the payment instrument, maximum 300 characters.StringgetId()The unique identifier of the payment instrument.StringgetIssuingCountryCode()The two-character [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code where the payment instrument is issued.StringgetPaymentInstrumentGroupId()The unique identifier of the [payment instrument group](https://docs.adyen.com/api-explorer/#/balanceplatform/v1/post/paymentInstrumentGroups__resParam_id) to which the payment instrument belongs.StringgetReference()Your reference for the payment instrument, maximum 150 characters.PaymentInstrument.StatusEnumgetStatus()The status of the payment instrument.StringgetStatusComment()The status comment provides additional information for the statusReason of the payment instrument.PaymentInstrument.StatusReasonEnumgetStatusReason()The reason for the status of the payment instrument.PaymentInstrument.TypeEnumgetType()The type of payment instrument.inthashCode()PaymentInstrumentid(String id)The unique identifier of the payment instrument.PaymentInstrumentissuingCountryCode(String issuingCountryCode)The two-character [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code where the payment instrument is issued.PaymentInstrumentpaymentInstrumentGroupId(String paymentInstrumentGroupId)The unique identifier of the [payment instrument group](https://docs.adyen.com/api-explorer/#/balanceplatform/v1/post/paymentInstrumentGroups__resParam_id) to which the payment instrument belongs.PaymentInstrumentreference(String reference)Your reference for the payment instrument, maximum 150 characters.voidsetAdditionalBankAccountIdentifications(List<PaymentInstrumentAdditionalBankAccountIdentificationsInner> additionalBankAccountIdentifications)Deprecated.since Configuration webhooks v2 Please use `bankAccount` object insteadvoidsetBalanceAccountId(String balanceAccountId)The unique identifier of the [balance account](https://docs.adyen.com/api-explorer/#/balanceplatform/v1/post/balanceAccounts__resParam_id) associated with the payment instrument.voidsetBankAccount(BankAccountDetails bankAccount)bankAccountvoidsetCard(Card card)cardvoidsetDescription(String description)Your description for the payment instrument, maximum 300 characters.voidsetId(String id)The unique identifier of the payment instrument.voidsetIssuingCountryCode(String issuingCountryCode)The two-character [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code where the payment instrument is issued.voidsetPaymentInstrumentGroupId(String paymentInstrumentGroupId)The unique identifier of the [payment instrument group](https://docs.adyen.com/api-explorer/#/balanceplatform/v1/post/paymentInstrumentGroups__resParam_id) to which the payment instrument belongs.voidsetReference(String reference)Your reference for the payment instrument, maximum 150 characters.voidsetStatus(PaymentInstrument.StatusEnum status)The status of the payment instrument.voidsetStatusComment(String statusComment)The status comment provides additional information for the statusReason of the payment instrument.voidsetStatusReason(PaymentInstrument.StatusReasonEnum statusReason)The reason for the status of the payment instrument.voidsetType(PaymentInstrument.TypeEnum type)The type of payment instrument.PaymentInstrumentstatus(PaymentInstrument.StatusEnum status)The status of the payment instrument.PaymentInstrumentstatusComment(String statusComment)The status comment provides additional information for the statusReason of the payment instrument.PaymentInstrumentstatusReason(PaymentInstrument.StatusReasonEnum statusReason)The reason for the status of the payment instrument.StringtoJson()Convert an instance of PaymentInstrument to an JSON stringStringtoString()PaymentInstrumenttype(PaymentInstrument.TypeEnum type)The type of payment instrument.
-
-
-
Field Detail
-
JSON_PROPERTY_ADDITIONAL_BANK_ACCOUNT_IDENTIFICATIONS
public static final String JSON_PROPERTY_ADDITIONAL_BANK_ACCOUNT_IDENTIFICATIONS
- See Also:
- Constant Field Values
-
JSON_PROPERTY_BALANCE_ACCOUNT_ID
public static final String JSON_PROPERTY_BALANCE_ACCOUNT_ID
- See Also:
- Constant Field Values
-
JSON_PROPERTY_BANK_ACCOUNT
public static final String JSON_PROPERTY_BANK_ACCOUNT
- See Also:
- Constant Field Values
-
JSON_PROPERTY_CARD
public static final String JSON_PROPERTY_CARD
- See Also:
- Constant Field Values
-
JSON_PROPERTY_DESCRIPTION
public static final String JSON_PROPERTY_DESCRIPTION
- See Also:
- Constant Field Values
-
JSON_PROPERTY_ID
public static final String JSON_PROPERTY_ID
- See Also:
- Constant Field Values
-
JSON_PROPERTY_ISSUING_COUNTRY_CODE
public static final String JSON_PROPERTY_ISSUING_COUNTRY_CODE
- See Also:
- Constant Field Values
-
JSON_PROPERTY_PAYMENT_INSTRUMENT_GROUP_ID
public static final String JSON_PROPERTY_PAYMENT_INSTRUMENT_GROUP_ID
- See Also:
- Constant Field Values
-
JSON_PROPERTY_REFERENCE
public static final String JSON_PROPERTY_REFERENCE
- See Also:
- Constant Field Values
-
JSON_PROPERTY_STATUS
public static final String JSON_PROPERTY_STATUS
- See Also:
- Constant Field Values
-
JSON_PROPERTY_STATUS_COMMENT
public static final String JSON_PROPERTY_STATUS_COMMENT
- See Also:
- Constant Field Values
-
JSON_PROPERTY_STATUS_REASON
public static final String JSON_PROPERTY_STATUS_REASON
- See Also:
- Constant Field Values
-
JSON_PROPERTY_TYPE
public static final String JSON_PROPERTY_TYPE
- See Also:
- Constant Field Values
-
-
Method Detail
-
additionalBankAccountIdentifications
@Deprecated public PaymentInstrument additionalBankAccountIdentifications(List<PaymentInstrumentAdditionalBankAccountIdentificationsInner> additionalBankAccountIdentifications)
Deprecated.since Configuration webhooks v2 Please use `bankAccount` object insteadContains optional, additional business account details. Returned when you create a payment instrument with `type` **bankAccount**.- Parameters:
additionalBankAccountIdentifications-- Returns:
- the current
PaymentInstrumentinstance, allowing for method chaining
-
addAdditionalBankAccountIdentificationsItem
public PaymentInstrument addAdditionalBankAccountIdentificationsItem(PaymentInstrumentAdditionalBankAccountIdentificationsInner additionalBankAccountIdentificationsItem)
-
getAdditionalBankAccountIdentifications
@Deprecated public List<PaymentInstrumentAdditionalBankAccountIdentificationsInner> getAdditionalBankAccountIdentifications()
Deprecated.since Configuration webhooks v2 Please use `bankAccount` object insteadContains optional, additional business account details. Returned when you create a payment instrument with `type` **bankAccount**.- Returns:
- additionalBankAccountIdentifications
-
setAdditionalBankAccountIdentifications
@Deprecated public void setAdditionalBankAccountIdentifications(List<PaymentInstrumentAdditionalBankAccountIdentificationsInner> additionalBankAccountIdentifications)
Deprecated.since Configuration webhooks v2 Please use `bankAccount` object insteadContains optional, additional business account details. Returned when you create a payment instrument with `type` **bankAccount**.- Parameters:
additionalBankAccountIdentifications-
-
balanceAccountId
public PaymentInstrument balanceAccountId(String balanceAccountId)
The unique identifier of the [balance account](https://docs.adyen.com/api-explorer/#/balanceplatform/v1/post/balanceAccounts__resParam_id) associated with the payment instrument.- Parameters:
balanceAccountId-- Returns:
- the current
PaymentInstrumentinstance, allowing for method chaining
-
getBalanceAccountId
public String getBalanceAccountId()
The unique identifier of the [balance account](https://docs.adyen.com/api-explorer/#/balanceplatform/v1/post/balanceAccounts__resParam_id) associated with the payment instrument.- Returns:
- balanceAccountId
-
setBalanceAccountId
public void setBalanceAccountId(String balanceAccountId)
The unique identifier of the [balance account](https://docs.adyen.com/api-explorer/#/balanceplatform/v1/post/balanceAccounts__resParam_id) associated with the payment instrument.- Parameters:
balanceAccountId-
-
bankAccount
public PaymentInstrument bankAccount(BankAccountDetails bankAccount)
bankAccount- Parameters:
bankAccount-- Returns:
- the current
PaymentInstrumentinstance, allowing for method chaining
-
getBankAccount
public BankAccountDetails getBankAccount()
bankAccount- Returns:
- bankAccount
-
setBankAccount
public void setBankAccount(BankAccountDetails bankAccount)
bankAccount- Parameters:
bankAccount-
-
card
public PaymentInstrument card(Card card)
card- Parameters:
card-- Returns:
- the current
PaymentInstrumentinstance, allowing for method chaining
-
getCard
public Card getCard()
card- Returns:
- card
-
setCard
public void setCard(Card card)
card- Parameters:
card-
-
description
public PaymentInstrument description(String description)
Your description for the payment instrument, maximum 300 characters.- Parameters:
description-- Returns:
- the current
PaymentInstrumentinstance, allowing for method chaining
-
getDescription
public String getDescription()
Your description for the payment instrument, maximum 300 characters.- Returns:
- description
-
setDescription
public void setDescription(String description)
Your description for the payment instrument, maximum 300 characters.- Parameters:
description-
-
id
public PaymentInstrument id(String id)
The unique identifier of the payment instrument.- Parameters:
id-- Returns:
- the current
PaymentInstrumentinstance, allowing for method chaining
-
getId
public String getId()
The unique identifier of the payment instrument.- Returns:
- id
-
setId
public void setId(String id)
The unique identifier of the payment instrument.- Parameters:
id-
-
issuingCountryCode
public PaymentInstrument issuingCountryCode(String issuingCountryCode)
The two-character [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code where the payment instrument is issued. For example, **NL** or **US**.- Parameters:
issuingCountryCode-- Returns:
- the current
PaymentInstrumentinstance, allowing for method chaining
-
getIssuingCountryCode
public String getIssuingCountryCode()
The two-character [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code where the payment instrument is issued. For example, **NL** or **US**.- Returns:
- issuingCountryCode
-
setIssuingCountryCode
public void setIssuingCountryCode(String issuingCountryCode)
The two-character [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code where the payment instrument is issued. For example, **NL** or **US**.- Parameters:
issuingCountryCode-
-
paymentInstrumentGroupId
public PaymentInstrument paymentInstrumentGroupId(String paymentInstrumentGroupId)
The unique identifier of the [payment instrument group](https://docs.adyen.com/api-explorer/#/balanceplatform/v1/post/paymentInstrumentGroups__resParam_id) to which the payment instrument belongs.- Parameters:
paymentInstrumentGroupId-- Returns:
- the current
PaymentInstrumentinstance, allowing for method chaining
-
getPaymentInstrumentGroupId
public String getPaymentInstrumentGroupId()
The unique identifier of the [payment instrument group](https://docs.adyen.com/api-explorer/#/balanceplatform/v1/post/paymentInstrumentGroups__resParam_id) to which the payment instrument belongs.- Returns:
- paymentInstrumentGroupId
-
setPaymentInstrumentGroupId
public void setPaymentInstrumentGroupId(String paymentInstrumentGroupId)
The unique identifier of the [payment instrument group](https://docs.adyen.com/api-explorer/#/balanceplatform/v1/post/paymentInstrumentGroups__resParam_id) to which the payment instrument belongs.- Parameters:
paymentInstrumentGroupId-
-
reference
public PaymentInstrument reference(String reference)
Your reference for the payment instrument, maximum 150 characters.- Parameters:
reference-- Returns:
- the current
PaymentInstrumentinstance, allowing for method chaining
-
getReference
public String getReference()
Your reference for the payment instrument, maximum 150 characters.- Returns:
- reference
-
setReference
public void setReference(String reference)
Your reference for the payment instrument, maximum 150 characters.- Parameters:
reference-
-
status
public PaymentInstrument status(PaymentInstrument.StatusEnum status)
The status of the payment instrument. If a status is not specified when creating a payment instrument, it is set to **active** by default. However, there can be exceptions for cards based on the `card.formFactor` and the `issuingCountryCode`. For example, when issuing physical cards in the US, the default status is **inactive**. Possible values: * **active**: The payment instrument is active and can be used to make payments. * **inactive**: The payment instrument is inactive and cannot be used to make payments. * **suspended**: The payment instrument is suspended, either because it was stolen or lost. * **closed**: The payment instrument is permanently closed. This action cannot be undone.- Parameters:
status-- Returns:
- the current
PaymentInstrumentinstance, allowing for method chaining
-
getStatus
public PaymentInstrument.StatusEnum getStatus()
The status of the payment instrument. If a status is not specified when creating a payment instrument, it is set to **active** by default. However, there can be exceptions for cards based on the `card.formFactor` and the `issuingCountryCode`. For example, when issuing physical cards in the US, the default status is **inactive**. Possible values: * **active**: The payment instrument is active and can be used to make payments. * **inactive**: The payment instrument is inactive and cannot be used to make payments. * **suspended**: The payment instrument is suspended, either because it was stolen or lost. * **closed**: The payment instrument is permanently closed. This action cannot be undone.- Returns:
- status
-
setStatus
public void setStatus(PaymentInstrument.StatusEnum status)
The status of the payment instrument. If a status is not specified when creating a payment instrument, it is set to **active** by default. However, there can be exceptions for cards based on the `card.formFactor` and the `issuingCountryCode`. For example, when issuing physical cards in the US, the default status is **inactive**. Possible values: * **active**: The payment instrument is active and can be used to make payments. * **inactive**: The payment instrument is inactive and cannot be used to make payments. * **suspended**: The payment instrument is suspended, either because it was stolen or lost. * **closed**: The payment instrument is permanently closed. This action cannot be undone.- Parameters:
status-
-
statusComment
public PaymentInstrument statusComment(String statusComment)
The status comment provides additional information for the statusReason of the payment instrument.- Parameters:
statusComment-- Returns:
- the current
PaymentInstrumentinstance, allowing for method chaining
-
getStatusComment
public String getStatusComment()
The status comment provides additional information for the statusReason of the payment instrument.- Returns:
- statusComment
-
setStatusComment
public void setStatusComment(String statusComment)
The status comment provides additional information for the statusReason of the payment instrument.- Parameters:
statusComment-
-
statusReason
public PaymentInstrument statusReason(PaymentInstrument.StatusReasonEnum statusReason)
The reason for the status of the payment instrument. Possible values: **accountClosure**, **damaged**, **endOfLife**, **expired**, **lost**, **stolen**, **suspectedFraud**, **transactionRule**, **other**. If the reason is **other**, you must also send the `statusComment` parameter describing the status change.- Parameters:
statusReason-- Returns:
- the current
PaymentInstrumentinstance, allowing for method chaining
-
getStatusReason
public PaymentInstrument.StatusReasonEnum getStatusReason()
The reason for the status of the payment instrument. Possible values: **accountClosure**, **damaged**, **endOfLife**, **expired**, **lost**, **stolen**, **suspectedFraud**, **transactionRule**, **other**. If the reason is **other**, you must also send the `statusComment` parameter describing the status change.- Returns:
- statusReason
-
setStatusReason
public void setStatusReason(PaymentInstrument.StatusReasonEnum statusReason)
The reason for the status of the payment instrument. Possible values: **accountClosure**, **damaged**, **endOfLife**, **expired**, **lost**, **stolen**, **suspectedFraud**, **transactionRule**, **other**. If the reason is **other**, you must also send the `statusComment` parameter describing the status change.- Parameters:
statusReason-
-
type
public PaymentInstrument type(PaymentInstrument.TypeEnum type)
The type of payment instrument. Possible values: **card**, **bankAccount**.- Parameters:
type-- Returns:
- the current
PaymentInstrumentinstance, allowing for method chaining
-
getType
public PaymentInstrument.TypeEnum getType()
The type of payment instrument. Possible values: **card**, **bankAccount**.- Returns:
- type
-
setType
public void setType(PaymentInstrument.TypeEnum type)
The type of payment instrument. Possible values: **card**, **bankAccount**.- Parameters:
type-
-
equals
public boolean equals(Object o)
Return true if this PaymentInstrument object is equal to o.
-
fromJson
public static PaymentInstrument fromJson(String jsonString) throws com.fasterxml.jackson.core.JsonProcessingException
Create an instance of PaymentInstrument given an JSON string- Parameters:
jsonString- JSON string- Returns:
- An instance of PaymentInstrument
- Throws:
com.fasterxml.jackson.core.JsonProcessingException- if the JSON string is invalid with respect to PaymentInstrument
-
toJson
public String toJson() throws com.fasterxml.jackson.core.JsonProcessingException
Convert an instance of PaymentInstrument to an JSON string- Returns:
- JSON string
- Throws:
com.fasterxml.jackson.core.JsonProcessingException
-
-