Package com.adyen.model.checkout
Class Split
- java.lang.Object
-
- com.adyen.model.checkout.Split
-
public class Split extends Object
Split
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classSplit.TypeEnumThe type of the split item.
-
Field Summary
Fields Modifier and Type Field Description static StringJSON_PROPERTY_ACCOUNTstatic StringJSON_PROPERTY_AMOUNTstatic StringJSON_PROPERTY_DESCRIPTIONstatic StringJSON_PROPERTY_REFERENCEstatic StringJSON_PROPERTY_TYPE
-
Constructor Summary
Constructors Constructor Description Split()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Splitaccount(String account)Splitamount(SplitAmount amount)Splitdescription(String description)booleanequals(Object o)Return true if this Split object is equal to o.static SplitfromJson(String jsonString)Create an instance of Split given an JSON stringStringgetAccount()The unique identifier of the account to which the split amount is booked.SplitAmountgetAmount()Get amountStringgetDescription()Your description for the split item.StringgetReference()Your unique reference for the split item.Split.TypeEnumgetType()The type of the split item.inthashCode()Splitreference(String reference)voidsetAccount(String account)The unique identifier of the account to which the split amount is booked.voidsetAmount(SplitAmount amount)amountvoidsetDescription(String description)Your description for the split item.voidsetReference(String reference)Your unique reference for the split item.voidsetType(Split.TypeEnum type)The type of the split item.StringtoJson()Convert an instance of Split to an JSON stringStringtoString()Splittype(Split.TypeEnum type)
-
-
-
Field Detail
-
JSON_PROPERTY_ACCOUNT
public static final String JSON_PROPERTY_ACCOUNT
- See Also:
- Constant Field Values
-
JSON_PROPERTY_AMOUNT
public static final String JSON_PROPERTY_AMOUNT
- See Also:
- Constant Field Values
-
JSON_PROPERTY_DESCRIPTION
public static final String JSON_PROPERTY_DESCRIPTION
- See Also:
- Constant Field Values
-
JSON_PROPERTY_REFERENCE
public static final String JSON_PROPERTY_REFERENCE
- See Also:
- Constant Field Values
-
JSON_PROPERTY_TYPE
public static final String JSON_PROPERTY_TYPE
- See Also:
- Constant Field Values
-
-
Method Detail
-
getAccount
public String getAccount()
The unique identifier of the account to which the split amount is booked. Required if `type` is **MarketPlace** or **BalanceAccount**. * [Classic Platforms integration](https://docs.adyen.com/marketplaces-and-platforms/classic): The [`accountCode`](https://docs.adyen.com/api-explorer/Account/latest/post/updateAccount#request-accountCode) of the account to which the split amount is booked. * [Balance Platform](https://docs.adyen.com/marketplaces-and-platforms): The [`balanceAccountId`](https://docs.adyen.com/api-explorer/balanceplatform/latest/get/balanceAccounts/_id_#path-id) of the account to which the split amount is booked.- Returns:
- account
-
setAccount
public void setAccount(String account)
The unique identifier of the account to which the split amount is booked. Required if `type` is **MarketPlace** or **BalanceAccount**. * [Classic Platforms integration](https://docs.adyen.com/marketplaces-and-platforms/classic): The [`accountCode`](https://docs.adyen.com/api-explorer/Account/latest/post/updateAccount#request-accountCode) of the account to which the split amount is booked. * [Balance Platform](https://docs.adyen.com/marketplaces-and-platforms): The [`balanceAccountId`](https://docs.adyen.com/api-explorer/balanceplatform/latest/get/balanceAccounts/_id_#path-id) of the account to which the split amount is booked.- Parameters:
account-
-
amount
public Split amount(SplitAmount amount)
-
getAmount
public SplitAmount getAmount()
Get amount- Returns:
- amount
-
setAmount
public void setAmount(SplitAmount amount)
amount- Parameters:
amount-
-
getDescription
public String getDescription()
Your description for the split item.- Returns:
- description
-
setDescription
public void setDescription(String description)
Your description for the split item.- Parameters:
description-
-
getReference
public String getReference()
Your unique reference for the split item. This is required if `type` is **MarketPlace** ([Classic Platforms integration](https://docs.adyen.com/marketplaces-and-platforms/classic)) or **BalanceAccount** ([Balance Platform](https://docs.adyen.com/marketplaces-and-platforms)). For the other types, we also recommend providing a **unique** reference so you can reconcile the split and the associated payment in the transaction overview and in the reports.- Returns:
- reference
-
setReference
public void setReference(String reference)
Your unique reference for the split item. This is required if `type` is **MarketPlace** ([Classic Platforms integration](https://docs.adyen.com/marketplaces-and-platforms/classic)) or **BalanceAccount** ([Balance Platform](https://docs.adyen.com/marketplaces-and-platforms)). For the other types, we also recommend providing a **unique** reference so you can reconcile the split and the associated payment in the transaction overview and in the reports.- Parameters:
reference-
-
type
public Split type(Split.TypeEnum type)
-
getType
public Split.TypeEnum getType()
The type of the split item. Possible values: * [Classic Platforms integration](https://docs.adyen.com/marketplaces-and-platforms/classic): **Commission**, **Default**, **Marketplace**, **PaymentFee**, **VAT**. * [Balance Platform](https://docs.adyen.com/marketplaces-and-platforms): **BalanceAccount**, **Commission**, **Default**, **PaymentFee**, **Remainder**, **Surcharge**, **Tip**, **VAT**.- Returns:
- type
-
setType
public void setType(Split.TypeEnum type)
The type of the split item. Possible values: * [Classic Platforms integration](https://docs.adyen.com/marketplaces-and-platforms/classic): **Commission**, **Default**, **Marketplace**, **PaymentFee**, **VAT**. * [Balance Platform](https://docs.adyen.com/marketplaces-and-platforms): **BalanceAccount**, **Commission**, **Default**, **PaymentFee**, **Remainder**, **Surcharge**, **Tip**, **VAT**.- Parameters:
type-
-
equals
public boolean equals(Object o)
Return true if this Split object is equal to o.
-
fromJson
public static Split fromJson(String jsonString) throws com.fasterxml.jackson.core.JsonProcessingException
Create an instance of Split given an JSON string- Parameters:
jsonString- JSON string- Returns:
- An instance of Split
- Throws:
com.fasterxml.jackson.core.JsonProcessingException- if the JSON string is invalid with respect to Split
-
toJson
public String toJson() throws com.fasterxml.jackson.core.JsonProcessingException
Convert an instance of Split to an JSON string- Returns:
- JSON string
- Throws:
com.fasterxml.jackson.core.JsonProcessingException
-
-