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
-
-
-
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)
-
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)
-
card
public PaymentInstrumentUpdateRequest card(CardInfo card)
-
getCard
public CardInfo getCard()
Get card- Returns:
- card
-
setCard
public void setCard(CardInfo card)
-
status
public PaymentInstrumentUpdateRequest status(PaymentInstrumentUpdateRequest.StatusEnum status)
-
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)
-
statusComment
public PaymentInstrumentUpdateRequest statusComment(String statusComment)
-
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)
-
statusReason
public PaymentInstrumentUpdateRequest statusReason(PaymentInstrumentUpdateRequest.StatusReasonEnum statusReason)
-
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)
-
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
-
-