Package com.adyen.model.balanceplatform
Class PaymentInstrumentUpdateRequest
- java.lang.Object
-
- com.adyen.model.balanceplatform.PaymentInstrumentUpdateRequest
-
public class PaymentInstrumentUpdateRequest extends Object
PaymentInstrumentUpdateRequest
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classPaymentInstrumentUpdateRequest.StatusEnumThe status of the payment instrument.static classPaymentInstrumentUpdateRequest.StatusReasonEnumThe reason for updating the status of the payment instrument.
-
Field Summary
Fields Modifier and Type Field Description static StringJSON_PROPERTY_BALANCE_ACCOUNT_IDstatic StringJSON_PROPERTY_CARDstatic StringJSON_PROPERTY_STATUSstatic StringJSON_PROPERTY_STATUS_COMMENTstatic StringJSON_PROPERTY_STATUS_REASON
-
Constructor Summary
Constructors Constructor Description PaymentInstrumentUpdateRequest()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description PaymentInstrumentUpdateRequestbalanceAccountId(String balanceAccountId)The unique identifier of the balance account associated with this payment instrument.PaymentInstrumentUpdateRequestcard(CardInfo card)cardbooleanequals(Object o)Return true if this PaymentInstrumentUpdateRequest object is equal to o.static PaymentInstrumentUpdateRequestfromJson(String jsonString)Create an instance of PaymentInstrumentUpdateRequest given an JSON stringStringgetBalanceAccountId()The unique identifier of the balance account associated with this payment instrument.CardInfogetCard()cardPaymentInstrumentUpdateRequest.StatusEnumgetStatus()The status of the payment instrument.StringgetStatusComment()Comment for the status of the payment instrument.PaymentInstrumentUpdateRequest.StatusReasonEnumgetStatusReason()The reason for updating the status of the payment instrument.inthashCode()voidsetBalanceAccountId(String balanceAccountId)The unique identifier of the balance account associated with this payment instrument.voidsetCard(CardInfo card)cardvoidsetStatus(PaymentInstrumentUpdateRequest.StatusEnum status)The status of the payment instrument.voidsetStatusComment(String statusComment)Comment for the status of the payment instrument.voidsetStatusReason(PaymentInstrumentUpdateRequest.StatusReasonEnum statusReason)The reason for updating the status of the payment instrument.PaymentInstrumentUpdateRequeststatus(PaymentInstrumentUpdateRequest.StatusEnum status)The status of the payment instrument.PaymentInstrumentUpdateRequeststatusComment(String statusComment)Comment for the status of the payment instrument.PaymentInstrumentUpdateRequeststatusReason(PaymentInstrumentUpdateRequest.StatusReasonEnum statusReason)The reason for updating the status of the payment instrument.StringtoJson()Convert an instance of PaymentInstrumentUpdateRequest to an JSON stringStringtoString()
-
-
-
Field Detail
-
JSON_PROPERTY_BALANCE_ACCOUNT_ID
public static final String JSON_PROPERTY_BALANCE_ACCOUNT_ID
- See Also:
- Constant Field Values
-
JSON_PROPERTY_CARD
public static final String JSON_PROPERTY_CARD
- 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
-
-
Method Detail
-
balanceAccountId
public PaymentInstrumentUpdateRequest balanceAccountId(String balanceAccountId)
The unique identifier of the balance account associated with this payment instrument. >You can only change the balance account ID if the payment instrument has **inactive** status.- Parameters:
balanceAccountId-- Returns:
- the current
PaymentInstrumentUpdateRequestinstance, allowing for method chaining
-
getBalanceAccountId
public String getBalanceAccountId()
The unique identifier of the balance account associated with this payment instrument. >You can only change the balance account ID if the payment instrument has **inactive** status.- Returns:
- balanceAccountId
-
setBalanceAccountId
public void setBalanceAccountId(String balanceAccountId)
The unique identifier of the balance account associated with this payment instrument. >You can only change the balance account ID if the payment instrument has **inactive** status.- Parameters:
balanceAccountId-
-
card
public PaymentInstrumentUpdateRequest card(CardInfo card)
card- Parameters:
card-- Returns:
- the current
PaymentInstrumentUpdateRequestinstance, allowing for method chaining
-
getCard
public CardInfo getCard()
card- Returns:
- card
-
setCard
public void setCard(CardInfo card)
card- Parameters:
card-
-
status
public PaymentInstrumentUpdateRequest status(PaymentInstrumentUpdateRequest.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
PaymentInstrumentUpdateRequestinstance, allowing for method chaining
-
getStatus
public PaymentInstrumentUpdateRequest.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(PaymentInstrumentUpdateRequest.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 PaymentInstrumentUpdateRequest statusComment(String statusComment)
Comment for the status of the payment instrument. Required if `statusReason` is **other**.- Parameters:
statusComment-- Returns:
- the current
PaymentInstrumentUpdateRequestinstance, allowing for method chaining
-
getStatusComment
public String getStatusComment()
Comment for the status of the payment instrument. Required if `statusReason` is **other**.- Returns:
- statusComment
-
setStatusComment
public void setStatusComment(String statusComment)
Comment for the status of the payment instrument. Required if `statusReason` is **other**.- Parameters:
statusComment-
-
statusReason
public PaymentInstrumentUpdateRequest statusReason(PaymentInstrumentUpdateRequest.StatusReasonEnum statusReason)
The reason for updating the status of the payment instrument. Possible values: **lost**, **stolen**, **damaged**, **suspectedFraud**, **expired**, **endOfLife**, **accountClosure**, **other**. If the reason is **other**, you must also send the `statusComment` parameter describing the status change.- Parameters:
statusReason-- Returns:
- the current
PaymentInstrumentUpdateRequestinstance, allowing for method chaining
-
getStatusReason
public PaymentInstrumentUpdateRequest.StatusReasonEnum getStatusReason()
The reason for updating the status of the payment instrument. Possible values: **lost**, **stolen**, **damaged**, **suspectedFraud**, **expired**, **endOfLife**, **accountClosure**, **other**. If the reason is **other**, you must also send the `statusComment` parameter describing the status change.- Returns:
- statusReason
-
setStatusReason
public void setStatusReason(PaymentInstrumentUpdateRequest.StatusReasonEnum statusReason)
The reason for updating the status of the payment instrument. Possible values: **lost**, **stolen**, **damaged**, **suspectedFraud**, **expired**, **endOfLife**, **accountClosure**, **other**. If the reason is **other**, you must also send the `statusComment` parameter describing the status change.- Parameters:
statusReason-
-
equals
public boolean equals(Object o)
Return true if this PaymentInstrumentUpdateRequest object is equal to o.
-
fromJson
public static PaymentInstrumentUpdateRequest fromJson(String jsonString) throws com.fasterxml.jackson.core.JsonProcessingException
Create an instance of PaymentInstrumentUpdateRequest given an JSON string- Parameters:
jsonString- JSON string- Returns:
- An instance of PaymentInstrumentUpdateRequest
- Throws:
com.fasterxml.jackson.core.JsonProcessingException- if the JSON string is invalid with respect to PaymentInstrumentUpdateRequest
-
toJson
public String toJson() throws com.fasterxml.jackson.core.JsonProcessingException
Convert an instance of PaymentInstrumentUpdateRequest to an JSON string- Returns:
- JSON string
- Throws:
com.fasterxml.jackson.core.JsonProcessingException
-
-