Package com.adyen.model.checkout
Class PaymentRefundResource
- java.lang.Object
-
- com.adyen.model.checkout.PaymentRefundResource
-
public class PaymentRefundResource extends Object
PaymentRefundResource
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classPaymentRefundResource.CustomTypeAdapterFactorystatic classPaymentRefundResource.StatusEnumThe status of your request.
-
Field Summary
Fields Modifier and Type Field Description static HashSet<String>openapiFieldsstatic HashSet<String>openapiRequiredFieldsstatic StringSERIALIZED_NAME_AMOUNTstatic StringSERIALIZED_NAME_LINE_ITEMSstatic StringSERIALIZED_NAME_MERCHANT_ACCOUNTstatic StringSERIALIZED_NAME_PAYMENT_PSP_REFERENCEstatic StringSERIALIZED_NAME_PSP_REFERENCEstatic StringSERIALIZED_NAME_REFERENCEstatic StringSERIALIZED_NAME_SPLITSstatic StringSERIALIZED_NAME_STATUS
-
Constructor Summary
Constructors Constructor Description PaymentRefundResource()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description PaymentRefundResourceaddLineItemsItem(LineItem lineItemsItem)PaymentRefundResourceaddSplitsItem(Split splitsItem)PaymentRefundResourceamount(Amount amount)booleanequals(Object o)static PaymentRefundResourcefromJson(String jsonString)Create an instance of PaymentRefundResource given an JSON stringAmountgetAmount()Get amountList<LineItem>getLineItems()Price and product information of the refunded items, required for [partial refunds](https://docs.adyen.com/online-payments/refund#refund-a-payment).StringgetMerchantAccount()The merchant account that is used to process the payment.StringgetPaymentPspReference()The [`pspReference`](https://docs.adyen.com/api-explorer/#/CheckoutService/latest/post/payments__resParam_pspReference) of the payment to refund.StringgetPspReference()Adyen's 16-character reference associated with the refund request.StringgetReference()Your reference for the refund request.List<Split>getSplits()An array of objects specifying how the amount should be split between accounts when using Adyen for Platforms.PaymentRefundResource.StatusEnumgetStatus()The status of your request.inthashCode()PaymentRefundResourcelineItems(List<LineItem> lineItems)PaymentRefundResourcemerchantAccount(String merchantAccount)PaymentRefundResourcepaymentPspReference(String paymentPspReference)PaymentRefundResourcepspReference(String pspReference)PaymentRefundResourcereference(String reference)voidsetAmount(Amount amount)voidsetLineItems(List<LineItem> lineItems)voidsetMerchantAccount(String merchantAccount)voidsetPaymentPspReference(String paymentPspReference)voidsetPspReference(String pspReference)voidsetReference(String reference)voidsetSplits(List<Split> splits)voidsetStatus(PaymentRefundResource.StatusEnum status)PaymentRefundResourcesplits(List<Split> splits)PaymentRefundResourcestatus(PaymentRefundResource.StatusEnum status)StringtoJson()Convert an instance of PaymentRefundResource to an JSON stringStringtoString()static voidvalidateJsonObject(com.google.gson.JsonObject jsonObj)Validates the JSON Object and throws an exception if issues found
-
-
-
Field Detail
-
SERIALIZED_NAME_AMOUNT
public static final String SERIALIZED_NAME_AMOUNT
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_LINE_ITEMS
public static final String SERIALIZED_NAME_LINE_ITEMS
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_MERCHANT_ACCOUNT
public static final String SERIALIZED_NAME_MERCHANT_ACCOUNT
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_PAYMENT_PSP_REFERENCE
public static final String SERIALIZED_NAME_PAYMENT_PSP_REFERENCE
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_PSP_REFERENCE
public static final String SERIALIZED_NAME_PSP_REFERENCE
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_REFERENCE
public static final String SERIALIZED_NAME_REFERENCE
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_SPLITS
public static final String SERIALIZED_NAME_SPLITS
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_STATUS
public static final String SERIALIZED_NAME_STATUS
- See Also:
- Constant Field Values
-
-
Method Detail
-
amount
public PaymentRefundResource amount(Amount amount)
-
getAmount
public Amount getAmount()
Get amount- Returns:
- amount
-
setAmount
public void setAmount(Amount amount)
-
lineItems
public PaymentRefundResource lineItems(List<LineItem> lineItems)
-
addLineItemsItem
public PaymentRefundResource addLineItemsItem(LineItem lineItemsItem)
-
getLineItems
public List<LineItem> getLineItems()
Price and product information of the refunded items, required for [partial refunds](https://docs.adyen.com/online-payments/refund#refund-a-payment). > This field is required for partial refunds with 3x 4x Oney, Affirm, Afterpay, Clearpay, Klarna, Ratepay, Zip and Atome.- Returns:
- lineItems
-
merchantAccount
public PaymentRefundResource merchantAccount(String merchantAccount)
-
getMerchantAccount
public String getMerchantAccount()
The merchant account that is used to process the payment.- Returns:
- merchantAccount
-
setMerchantAccount
public void setMerchantAccount(String merchantAccount)
-
paymentPspReference
public PaymentRefundResource paymentPspReference(String paymentPspReference)
-
getPaymentPspReference
public String getPaymentPspReference()
The [`pspReference`](https://docs.adyen.com/api-explorer/#/CheckoutService/latest/post/payments__resParam_pspReference) of the payment to refund.- Returns:
- paymentPspReference
-
setPaymentPspReference
public void setPaymentPspReference(String paymentPspReference)
-
pspReference
public PaymentRefundResource pspReference(String pspReference)
-
getPspReference
public String getPspReference()
Adyen's 16-character reference associated with the refund request.- Returns:
- pspReference
-
setPspReference
public void setPspReference(String pspReference)
-
reference
public PaymentRefundResource reference(String reference)
-
getReference
public String getReference()
Your reference for the refund request.- Returns:
- reference
-
setReference
public void setReference(String reference)
-
splits
public PaymentRefundResource splits(List<Split> splits)
-
addSplitsItem
public PaymentRefundResource addSplitsItem(Split splitsItem)
-
getSplits
public List<Split> getSplits()
An array of objects specifying how the amount should be split between accounts when using Adyen for Platforms. For details, refer to [Providing split information](https://docs.adyen.com/marketplaces-and-platforms/processing-payments#providing-split-information).- Returns:
- splits
-
status
public PaymentRefundResource status(PaymentRefundResource.StatusEnum status)
-
getStatus
public PaymentRefundResource.StatusEnum getStatus()
The status of your request. This will always have the value **received**.- Returns:
- status
-
setStatus
public void setStatus(PaymentRefundResource.StatusEnum status)
-
validateJsonObject
public static void validateJsonObject(com.google.gson.JsonObject jsonObj) throws IOExceptionValidates the JSON Object and throws an exception if issues found- Parameters:
jsonObj- JSON Object- Throws:
IOException- if the JSON Object is invalid with respect to PaymentRefundResource
-
fromJson
public static PaymentRefundResource fromJson(String jsonString) throws IOException
Create an instance of PaymentRefundResource given an JSON string- Parameters:
jsonString- JSON string- Returns:
- An instance of PaymentRefundResource
- Throws:
IOException- if the JSON string is invalid with respect to PaymentRefundResource
-
toJson
public String toJson()
Convert an instance of PaymentRefundResource to an JSON string- Returns:
- JSON string
-
-