Package com.adyen.model.checkout
Class PaymentRefundRequest
- java.lang.Object
-
- com.adyen.model.checkout.PaymentRefundRequest
-
public class PaymentRefundRequest extends Object
PaymentRefundRequest
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classPaymentRefundRequest.MerchantRefundReasonEnumThe reason for the refund request.
-
Field Summary
Fields Modifier and Type Field Description static StringJSON_PROPERTY_AMOUNTstatic StringJSON_PROPERTY_APPLICATION_INFOstatic StringJSON_PROPERTY_CAPTURE_PSP_REFERENCEstatic StringJSON_PROPERTY_LINE_ITEMSstatic StringJSON_PROPERTY_MERCHANT_ACCOUNTstatic StringJSON_PROPERTY_MERCHANT_REFUND_REASONstatic StringJSON_PROPERTY_REFERENCEstatic StringJSON_PROPERTY_SPLITSstatic StringJSON_PROPERTY_STORE
-
Constructor Summary
Constructors Constructor Description PaymentRefundRequest()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description PaymentRefundRequestaddLineItemsItem(LineItem lineItemsItem)PaymentRefundRequestaddSplitsItem(Split splitsItem)PaymentRefundRequestamount(Amount amount)amountPaymentRefundRequestapplicationInfo(ApplicationInfo applicationInfo)applicationInfoPaymentRefundRequestcapturePspReference(String capturePspReference)This is only available for PayPal refunds.booleanequals(Object o)Return true if this PaymentRefundRequest object is equal to o.static PaymentRefundRequestfromJson(String jsonString)Create an instance of PaymentRefundRequest given an JSON stringAmountgetAmount()Get amountApplicationInfogetApplicationInfo()Get applicationInfoStringgetCapturePspReference()This is only available for PayPal refunds.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).StringgetMerchantAccount()The merchant account that is used to process the payment.PaymentRefundRequest.MerchantRefundReasonEnumgetMerchantRefundReason()The reason for 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.StringgetStore()The online store or [physical store](https://docs.adyen.com/point-of-sale/design-your-integration/determine-account-structure/#create-stores) that is processing the refund.inthashCode()PaymentRefundRequestlineItems(List<LineItem> lineItems)Price and product information of the refunded items, required for [partial refunds](https://docs.adyen.com/online-payments/refund#refund-a-payment).PaymentRefundRequestmerchantAccount(String merchantAccount)The merchant account that is used to process the payment.PaymentRefundRequestmerchantRefundReason(PaymentRefundRequest.MerchantRefundReasonEnum merchantRefundReason)The reason for the refund request.PaymentRefundRequestreference(String reference)Your reference for the refund request.voidsetAmount(Amount amount)amountvoidsetApplicationInfo(ApplicationInfo applicationInfo)applicationInfovoidsetCapturePspReference(String capturePspReference)This is only available for PayPal refunds.voidsetLineItems(List<LineItem> lineItems)Price and product information of the refunded items, required for [partial refunds](https://docs.adyen.com/online-payments/refund#refund-a-payment).voidsetMerchantAccount(String merchantAccount)The merchant account that is used to process the payment.voidsetMerchantRefundReason(PaymentRefundRequest.MerchantRefundReasonEnum merchantRefundReason)The reason for the refund request.voidsetReference(String reference)Your reference for the refund request.voidsetSplits(List<Split> splits)An array of objects specifying how the amount should be split between accounts when using Adyen for Platforms.voidsetStore(String store)The online store or [physical store](https://docs.adyen.com/point-of-sale/design-your-integration/determine-account-structure/#create-stores) that is processing the refund.PaymentRefundRequestsplits(List<Split> splits)An array of objects specifying how the amount should be split between accounts when using Adyen for Platforms.PaymentRefundRequeststore(String store)The online store or [physical store](https://docs.adyen.com/point-of-sale/design-your-integration/determine-account-structure/#create-stores) that is processing the refund.StringtoJson()Convert an instance of PaymentRefundRequest to an JSON stringStringtoString()
-
-
-
Field Detail
-
JSON_PROPERTY_AMOUNT
public static final String JSON_PROPERTY_AMOUNT
- See Also:
- Constant Field Values
-
JSON_PROPERTY_APPLICATION_INFO
public static final String JSON_PROPERTY_APPLICATION_INFO
- See Also:
- Constant Field Values
-
JSON_PROPERTY_CAPTURE_PSP_REFERENCE
public static final String JSON_PROPERTY_CAPTURE_PSP_REFERENCE
- See Also:
- Constant Field Values
-
JSON_PROPERTY_LINE_ITEMS
public static final String JSON_PROPERTY_LINE_ITEMS
- See Also:
- Constant Field Values
-
JSON_PROPERTY_MERCHANT_ACCOUNT
public static final String JSON_PROPERTY_MERCHANT_ACCOUNT
- See Also:
- Constant Field Values
-
JSON_PROPERTY_MERCHANT_REFUND_REASON
public static final String JSON_PROPERTY_MERCHANT_REFUND_REASON
- See Also:
- Constant Field Values
-
JSON_PROPERTY_REFERENCE
public static final String JSON_PROPERTY_REFERENCE
- See Also:
- Constant Field Values
-
JSON_PROPERTY_SPLITS
public static final String JSON_PROPERTY_SPLITS
- See Also:
- Constant Field Values
-
JSON_PROPERTY_STORE
public static final String JSON_PROPERTY_STORE
- See Also:
- Constant Field Values
-
-
Method Detail
-
amount
public PaymentRefundRequest amount(Amount amount)
amount- Parameters:
amount-- Returns:
- the current
PaymentRefundRequestinstance, allowing for method chaining
-
getAmount
public Amount getAmount()
Get amount- Returns:
- amount
-
setAmount
public void setAmount(Amount amount)
amount- Parameters:
amount-
-
applicationInfo
public PaymentRefundRequest applicationInfo(ApplicationInfo applicationInfo)
applicationInfo- Parameters:
applicationInfo-- Returns:
- the current
PaymentRefundRequestinstance, allowing for method chaining
-
getApplicationInfo
public ApplicationInfo getApplicationInfo()
Get applicationInfo- Returns:
- applicationInfo
-
setApplicationInfo
public void setApplicationInfo(ApplicationInfo applicationInfo)
applicationInfo- Parameters:
applicationInfo-
-
capturePspReference
public PaymentRefundRequest capturePspReference(String capturePspReference)
This is only available for PayPal refunds. The [`pspReference`](https://docs.adyen.com/api-explorer/#/CheckoutService/latest/post/payments__resParam_pspReference) of the specific capture to refund.- Parameters:
capturePspReference- This is only available for PayPal refunds. The [`pspReference`](https://docs.adyen.com/api-explorer/#/CheckoutService/latest/post/payments__resParam_pspReference) of the specific capture to refund.- Returns:
- the current
PaymentRefundRequestinstance, allowing for method chaining
-
getCapturePspReference
public String getCapturePspReference()
This is only available for PayPal refunds. The [`pspReference`](https://docs.adyen.com/api-explorer/#/CheckoutService/latest/post/payments__resParam_pspReference) of the specific capture to refund.- Returns:
- capturePspReference This is only available for PayPal refunds. The [`pspReference`](https://docs.adyen.com/api-explorer/#/CheckoutService/latest/post/payments__resParam_pspReference) of the specific capture to refund.
-
setCapturePspReference
public void setCapturePspReference(String capturePspReference)
This is only available for PayPal refunds. The [`pspReference`](https://docs.adyen.com/api-explorer/#/CheckoutService/latest/post/payments__resParam_pspReference) of the specific capture to refund.- Parameters:
capturePspReference- This is only available for PayPal refunds. The [`pspReference`](https://docs.adyen.com/api-explorer/#/CheckoutService/latest/post/payments__resParam_pspReference) of the specific capture to refund.
-
lineItems
public PaymentRefundRequest lineItems(List<LineItem> lineItems)
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, Atome, Clearpay, Klarna, Ratepay, Walley, and Zip.- Parameters:
lineItems- 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, Atome, Clearpay, Klarna, Ratepay, Walley, and Zip.- Returns:
- the current
PaymentRefundRequestinstance, allowing for method chaining
-
addLineItemsItem
public PaymentRefundRequest 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, Atome, Clearpay, Klarna, Ratepay, Walley, and Zip.- Returns:
- lineItems 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, Atome, Clearpay, Klarna, Ratepay, Walley, and Zip.
-
setLineItems
public void setLineItems(List<LineItem> lineItems)
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, Atome, Clearpay, Klarna, Ratepay, Walley, and Zip.- Parameters:
lineItems- 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, Atome, Clearpay, Klarna, Ratepay, Walley, and Zip.
-
merchantAccount
public PaymentRefundRequest merchantAccount(String merchantAccount)
The merchant account that is used to process the payment.- Parameters:
merchantAccount- The merchant account that is used to process the payment.- Returns:
- the current
PaymentRefundRequestinstance, allowing for method chaining
-
getMerchantAccount
public String getMerchantAccount()
The merchant account that is used to process the payment.- Returns:
- merchantAccount The merchant account that is used to process the payment.
-
setMerchantAccount
public void setMerchantAccount(String merchantAccount)
The merchant account that is used to process the payment.- Parameters:
merchantAccount- The merchant account that is used to process the payment.
-
merchantRefundReason
public PaymentRefundRequest merchantRefundReason(PaymentRefundRequest.MerchantRefundReasonEnum merchantRefundReason)
The reason for the refund request. Possible values: * **FRAUD** * **CUSTOMER REQUEST** * **RETURN** * **DUPLICATE** * **OTHER**- Parameters:
merchantRefundReason- The reason for the refund request. Possible values: * **FRAUD** * **CUSTOMER REQUEST** * **RETURN** * **DUPLICATE** * **OTHER**- Returns:
- the current
PaymentRefundRequestinstance, allowing for method chaining
-
getMerchantRefundReason
public PaymentRefundRequest.MerchantRefundReasonEnum getMerchantRefundReason()
The reason for the refund request. Possible values: * **FRAUD** * **CUSTOMER REQUEST** * **RETURN** * **DUPLICATE** * **OTHER**- Returns:
- merchantRefundReason The reason for the refund request. Possible values: * **FRAUD** * **CUSTOMER REQUEST** * **RETURN** * **DUPLICATE** * **OTHER**
-
setMerchantRefundReason
public void setMerchantRefundReason(PaymentRefundRequest.MerchantRefundReasonEnum merchantRefundReason)
The reason for the refund request. Possible values: * **FRAUD** * **CUSTOMER REQUEST** * **RETURN** * **DUPLICATE** * **OTHER**- Parameters:
merchantRefundReason- The reason for the refund request. Possible values: * **FRAUD** * **CUSTOMER REQUEST** * **RETURN** * **DUPLICATE** * **OTHER**
-
reference
public PaymentRefundRequest reference(String reference)
Your reference for the refund request. Maximum length: 80 characters.- Parameters:
reference- Your reference for the refund request. Maximum length: 80 characters.- Returns:
- the current
PaymentRefundRequestinstance, allowing for method chaining
-
getReference
public String getReference()
Your reference for the refund request. Maximum length: 80 characters.- Returns:
- reference Your reference for the refund request. Maximum length: 80 characters.
-
setReference
public void setReference(String reference)
Your reference for the refund request. Maximum length: 80 characters.- Parameters:
reference- Your reference for the refund request. Maximum length: 80 characters.
-
splits
public PaymentRefundRequest splits(List<Split> splits)
An array of objects specifying how the amount should be split between accounts when using Adyen for Platforms. For more information, see how to process payments for [marketplaces](https://docs.adyen.com/marketplaces/split-payments) or [platforms](https://docs.adyen.com/platforms/online-payments/split-payments/).- Parameters:
splits- An array of objects specifying how the amount should be split between accounts when using Adyen for Platforms. For more information, see how to process payments for [marketplaces](https://docs.adyen.com/marketplaces/split-payments) or [platforms](https://docs.adyen.com/platforms/online-payments/split-payments/).- Returns:
- the current
PaymentRefundRequestinstance, allowing for method chaining
-
addSplitsItem
public PaymentRefundRequest 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 more information, see how to process payments for [marketplaces](https://docs.adyen.com/marketplaces/split-payments) or [platforms](https://docs.adyen.com/platforms/online-payments/split-payments/).- Returns:
- splits An array of objects specifying how the amount should be split between accounts when using Adyen for Platforms. For more information, see how to process payments for [marketplaces](https://docs.adyen.com/marketplaces/split-payments) or [platforms](https://docs.adyen.com/platforms/online-payments/split-payments/).
-
setSplits
public void setSplits(List<Split> splits)
An array of objects specifying how the amount should be split between accounts when using Adyen for Platforms. For more information, see how to process payments for [marketplaces](https://docs.adyen.com/marketplaces/split-payments) or [platforms](https://docs.adyen.com/platforms/online-payments/split-payments/).- Parameters:
splits- An array of objects specifying how the amount should be split between accounts when using Adyen for Platforms. For more information, see how to process payments for [marketplaces](https://docs.adyen.com/marketplaces/split-payments) or [platforms](https://docs.adyen.com/platforms/online-payments/split-payments/).
-
store
public PaymentRefundRequest store(String store)
The online store or [physical store](https://docs.adyen.com/point-of-sale/design-your-integration/determine-account-structure/#create-stores) that is processing the refund. This must be the same as the store name configured in your Customer Area. Otherwise, you get an error and the refund fails.- Parameters:
store- The online store or [physical store](https://docs.adyen.com/point-of-sale/design-your-integration/determine-account-structure/#create-stores) that is processing the refund. This must be the same as the store name configured in your Customer Area. Otherwise, you get an error and the refund fails.- Returns:
- the current
PaymentRefundRequestinstance, allowing for method chaining
-
getStore
public String getStore()
The online store or [physical store](https://docs.adyen.com/point-of-sale/design-your-integration/determine-account-structure/#create-stores) that is processing the refund. This must be the same as the store name configured in your Customer Area. Otherwise, you get an error and the refund fails.- Returns:
- store The online store or [physical store](https://docs.adyen.com/point-of-sale/design-your-integration/determine-account-structure/#create-stores) that is processing the refund. This must be the same as the store name configured in your Customer Area. Otherwise, you get an error and the refund fails.
-
setStore
public void setStore(String store)
The online store or [physical store](https://docs.adyen.com/point-of-sale/design-your-integration/determine-account-structure/#create-stores) that is processing the refund. This must be the same as the store name configured in your Customer Area. Otherwise, you get an error and the refund fails.- Parameters:
store- The online store or [physical store](https://docs.adyen.com/point-of-sale/design-your-integration/determine-account-structure/#create-stores) that is processing the refund. This must be the same as the store name configured in your Customer Area. Otherwise, you get an error and the refund fails.
-
equals
public boolean equals(Object o)
Return true if this PaymentRefundRequest object is equal to o.
-
fromJson
public static PaymentRefundRequest fromJson(String jsonString) throws com.fasterxml.jackson.core.JsonProcessingException
Create an instance of PaymentRefundRequest given an JSON string- Parameters:
jsonString- JSON string- Returns:
- An instance of PaymentRefundRequest
- Throws:
com.fasterxml.jackson.core.JsonProcessingException- if the JSON string is invalid with respect to PaymentRefundRequest
-
toJson
public String toJson() throws com.fasterxml.jackson.core.JsonProcessingException
Convert an instance of PaymentRefundRequest to an JSON string- Returns:
- JSON string
- Throws:
com.fasterxml.jackson.core.JsonProcessingException
-
-