Package com.adyen.model.checkout
Class DonationPaymentResponse
- java.lang.Object
-
- com.adyen.model.checkout.DonationPaymentResponse
-
public class DonationPaymentResponse extends Object
DonationPaymentResponse
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classDonationPaymentResponse.StatusEnumThe status of the donation transaction.
-
Field Summary
Fields Modifier and Type Field Description static StringJSON_PROPERTY_AMOUNTstatic StringJSON_PROPERTY_DONATION_ACCOUNTstatic StringJSON_PROPERTY_IDstatic StringJSON_PROPERTY_MERCHANT_ACCOUNTstatic StringJSON_PROPERTY_PAYMENTstatic StringJSON_PROPERTY_REFERENCEstatic StringJSON_PROPERTY_STATUS
-
Constructor Summary
Constructors Constructor Description DonationPaymentResponse()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description DonationPaymentResponseamount(Amount amount)DonationPaymentResponsedonationAccount(String donationAccount)booleanequals(Object o)Return true if this DonationPaymentResponse object is equal to o.static DonationPaymentResponsefromJson(String jsonString)Create an instance of DonationPaymentResponse given an JSON stringAmountgetAmount()Get amountStringgetDonationAccount()The Adyen account name of your charity.StringgetId()Your unique resource identifier.StringgetMerchantAccount()The merchant account identifier, with which you want to process the transaction.PaymentResponsegetPayment()Get paymentStringgetReference()The reference to uniquely identify a payment.DonationPaymentResponse.StatusEnumgetStatus()The status of the donation transaction.inthashCode()DonationPaymentResponseid(String id)DonationPaymentResponsemerchantAccount(String merchantAccount)DonationPaymentResponsepayment(PaymentResponse payment)DonationPaymentResponsereference(String reference)voidsetAmount(Amount amount)amountvoidsetDonationAccount(String donationAccount)The Adyen account name of your charity.voidsetId(String id)Your unique resource identifier.voidsetMerchantAccount(String merchantAccount)The merchant account identifier, with which you want to process the transaction.voidsetPayment(PaymentResponse payment)paymentvoidsetReference(String reference)The reference to uniquely identify a payment.voidsetStatus(DonationPaymentResponse.StatusEnum status)The status of the donation transaction.DonationPaymentResponsestatus(DonationPaymentResponse.StatusEnum status)StringtoJson()Convert an instance of DonationPaymentResponse to an JSON stringStringtoString()
-
-
-
Field Detail
-
JSON_PROPERTY_AMOUNT
public static final String JSON_PROPERTY_AMOUNT
- See Also:
- Constant Field Values
-
JSON_PROPERTY_DONATION_ACCOUNT
public static final String JSON_PROPERTY_DONATION_ACCOUNT
- See Also:
- Constant Field Values
-
JSON_PROPERTY_ID
public static final String JSON_PROPERTY_ID
- See Also:
- Constant Field Values
-
JSON_PROPERTY_MERCHANT_ACCOUNT
public static final String JSON_PROPERTY_MERCHANT_ACCOUNT
- See Also:
- Constant Field Values
-
JSON_PROPERTY_PAYMENT
public static final String JSON_PROPERTY_PAYMENT
- 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
-
-
Method Detail
-
amount
public DonationPaymentResponse amount(Amount amount)
-
getAmount
public Amount getAmount()
Get amount- Returns:
- amount
-
setAmount
public void setAmount(Amount amount)
amount- Parameters:
amount-
-
donationAccount
public DonationPaymentResponse donationAccount(String donationAccount)
-
getDonationAccount
public String getDonationAccount()
The Adyen account name of your charity. We will provide you with this account name once your chosen charity has been [onboarded](https://docs.adyen.com/online-payments/donations#onboarding).- Returns:
- donationAccount
-
setDonationAccount
public void setDonationAccount(String donationAccount)
The Adyen account name of your charity. We will provide you with this account name once your chosen charity has been [onboarded](https://docs.adyen.com/online-payments/donations#onboarding).- Parameters:
donationAccount-
-
id
public DonationPaymentResponse id(String id)
-
getId
public String getId()
Your unique resource identifier.- Returns:
- id
-
setId
public void setId(String id)
Your unique resource identifier.- Parameters:
id-
-
merchantAccount
public DonationPaymentResponse merchantAccount(String merchantAccount)
-
getMerchantAccount
public String getMerchantAccount()
The merchant account identifier, with which you want to process the transaction.- Returns:
- merchantAccount
-
setMerchantAccount
public void setMerchantAccount(String merchantAccount)
The merchant account identifier, with which you want to process the transaction.- Parameters:
merchantAccount-
-
payment
public DonationPaymentResponse payment(PaymentResponse payment)
-
getPayment
public PaymentResponse getPayment()
Get payment- Returns:
- payment
-
setPayment
public void setPayment(PaymentResponse payment)
payment- Parameters:
payment-
-
reference
public DonationPaymentResponse reference(String reference)
-
getReference
public String getReference()
The reference to uniquely identify a payment. This reference is used in all communication with you about the payment status. We recommend using a unique value per payment; however, it is not a requirement. If you need to provide multiple references for a transaction, separate them with hyphens (\"-\"). Maximum length: 80 characters.- Returns:
- reference
-
setReference
public void setReference(String reference)
The reference to uniquely identify a payment. This reference is used in all communication with you about the payment status. We recommend using a unique value per payment; however, it is not a requirement. If you need to provide multiple references for a transaction, separate them with hyphens (\"-\"). Maximum length: 80 characters.- Parameters:
reference-
-
status
public DonationPaymentResponse status(DonationPaymentResponse.StatusEnum status)
-
getStatus
public DonationPaymentResponse.StatusEnum getStatus()
The status of the donation transaction. Possible values: * **completed** * **pending** * **refused**- Returns:
- status
-
setStatus
public void setStatus(DonationPaymentResponse.StatusEnum status)
The status of the donation transaction. Possible values: * **completed** * **pending** * **refused**- Parameters:
status-
-
equals
public boolean equals(Object o)
Return true if this DonationPaymentResponse object is equal to o.
-
fromJson
public static DonationPaymentResponse fromJson(String jsonString) throws com.fasterxml.jackson.core.JsonProcessingException
Create an instance of DonationPaymentResponse given an JSON string- Parameters:
jsonString- JSON string- Returns:
- An instance of DonationPaymentResponse
- Throws:
com.fasterxml.jackson.core.JsonProcessingException- if the JSON string is invalid with respect to DonationPaymentResponse
-
toJson
public String toJson() throws com.fasterxml.jackson.core.JsonProcessingException
Convert an instance of DonationPaymentResponse to an JSON string- Returns:
- JSON string
- Throws:
com.fasterxml.jackson.core.JsonProcessingException
-
-