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.CustomTypeAdapterFactorystatic 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 HashSet<String>openapiFieldsstatic HashSet<String>openapiRequiredFieldsstatic StringSERIALIZED_NAME_BALANCE_ACCOUNT_IDstatic StringSERIALIZED_NAME_CARDstatic StringSERIALIZED_NAME_STATUSstatic StringSERIALIZED_NAME_STATUS_COMMENTstatic StringSERIALIZED_NAME_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)PaymentInstrumentUpdateRequestcard(CardInfo card)booleanequals(Object 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()Get 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)voidsetCard(CardInfo card)voidsetStatus(PaymentInstrumentUpdateRequest.StatusEnum status)voidsetStatusComment(String statusComment)voidsetStatusReason(PaymentInstrumentUpdateRequest.StatusReasonEnum statusReason)PaymentInstrumentUpdateRequeststatus(PaymentInstrumentUpdateRequest.StatusEnum status)PaymentInstrumentUpdateRequeststatusComment(String statusComment)PaymentInstrumentUpdateRequeststatusReason(PaymentInstrumentUpdateRequest.StatusReasonEnum statusReason)StringtoJson()Convert an instance of PaymentInstrumentUpdateRequest to an JSON stringStringtoString()static voidvalidateJsonObject(com.google.gson.JsonObject jsonObj)static voidvalidateJsonObject(com.google.gson.JsonObject jsonObj, boolean strictValidation)Validates the JSON Object and throws an exception if issues found
-
-
-
Field Detail
-
SERIALIZED_NAME_BALANCE_ACCOUNT_ID
public static final String SERIALIZED_NAME_BALANCE_ACCOUNT_ID
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_CARD
public static final String SERIALIZED_NAME_CARD
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_STATUS
public static final String SERIALIZED_NAME_STATUS
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_STATUS_COMMENT
public static final String SERIALIZED_NAME_STATUS_COMMENT
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_STATUS_REASON
public static final String SERIALIZED_NAME_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)
-
validateJsonObject
public static void validateJsonObject(com.google.gson.JsonObject jsonObj) throws IOException- Throws:
IOException
-
validateJsonObject
public static void validateJsonObject(com.google.gson.JsonObject jsonObj, boolean strictValidation) throws IOExceptionValidates the JSON Object and throws an exception if issues found- Parameters:
jsonObj- JSON ObjectstrictValidation- reject (new) fields missing from the specifications- Throws:
IOException- if the JSON Object is invalid with respect to PaymentInstrumentUpdateRequest
-
fromJson
public static PaymentInstrumentUpdateRequest fromJson(String jsonString) throws IOException
Create an instance of PaymentInstrumentUpdateRequest given an JSON string- Parameters:
jsonString- JSON string- Returns:
- An instance of PaymentInstrumentUpdateRequest
- Throws:
IOException- if the JSON string is invalid with respect to PaymentInstrumentUpdateRequest
-
toJson
public String toJson()
Convert an instance of PaymentInstrumentUpdateRequest to an JSON string- Returns:
- JSON string
-
-