Package com.adyen.model.payment
Class Split
- java.lang.Object
-
- com.adyen.model.payment.Split
-
public class Split extends Object
Split
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classSplit.CustomTypeAdapterFactorystatic classSplit.TypeEnumThe type of split.
-
Field Summary
Fields Modifier and Type Field Description static HashSet<String>openapiFieldsstatic HashSet<String>openapiRequiredFieldsstatic StringSERIALIZED_NAME_ACCOUNTstatic StringSERIALIZED_NAME_AMOUNTstatic StringSERIALIZED_NAME_DESCRIPTIONstatic StringSERIALIZED_NAME_REFERENCEstatic StringSERIALIZED_NAME_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)static SplitfromJson(String jsonString)Create an instance of Split given an JSON stringStringgetAccount()Unique identifier of the account where the split amount should be sent.SplitAmountgetAmount()Get amountStringgetDescription()A description of this split.StringgetReference()Your reference for the split, which you can use to link the split to other operations such as captures and refunds.Split.TypeEnumgetType()The type of split.inthashCode()Splitreference(String reference)voidsetAccount(String account)voidsetAmount(SplitAmount amount)voidsetDescription(String description)voidsetReference(String reference)voidsetType(Split.TypeEnum type)StringtoJson()Convert an instance of Split to an JSON stringStringtoString()Splittype(Split.TypeEnum type)static voidvalidateJsonObject(com.google.gson.JsonObject jsonObj)Validates the JSON Object and throws an exception if issues found
-
-
-
Field Detail
-
SERIALIZED_NAME_ACCOUNT
public static final String SERIALIZED_NAME_ACCOUNT
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_AMOUNT
public static final String SERIALIZED_NAME_AMOUNT
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_DESCRIPTION
public static final String SERIALIZED_NAME_DESCRIPTION
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_REFERENCE
public static final String SERIALIZED_NAME_REFERENCE
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_TYPE
public static final String SERIALIZED_NAME_TYPE
- See Also:
- Constant Field Values
-
-
Method Detail
-
getAccount
public String getAccount()
Unique identifier of the account where the split amount should be sent. This is required if `type` is **MarketPlace** or **BalanceAccount**.- Returns:
- account
-
setAccount
public void setAccount(String account)
-
amount
public Split amount(SplitAmount amount)
-
getAmount
public SplitAmount getAmount()
Get amount- Returns:
- amount
-
setAmount
public void setAmount(SplitAmount amount)
-
getDescription
public String getDescription()
A description of this split.- Returns:
- description
-
setDescription
public void setDescription(String description)
-
getReference
public String getReference()
Your reference for the split, which you can use to link the split to other operations such as captures and refunds. This is required if `type` is **MarketPlace** or **BalanceAccount**. For the other types, we also recommend sending a reference so you can reconcile the split and the associated payment in the transaction overview and in the reports. If the reference is not provided, the split is reported as part of the aggregated [TransferBalance record type](https://docs.adyen.com/reporting/marketpay-payments-accounting-report) in Adyen for Platforms.- Returns:
- reference
-
setReference
public void setReference(String reference)
-
type
public Split type(Split.TypeEnum type)
-
getType
public Split.TypeEnum getType()
The type of split. Possible values: **Default**, **PaymentFee**, **VAT**, **Commission**, **MarketPlace**, **BalanceAccount**, **Remainder**, **Surcharge**, **Tip**.- Returns:
- type
-
setType
public void setType(Split.TypeEnum type)
-
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 Split
-
fromJson
public static Split fromJson(String jsonString) throws IOException
Create an instance of Split given an JSON string- Parameters:
jsonString- JSON string- Returns:
- An instance of Split
- Throws:
IOException- if the JSON string is invalid with respect to Split
-
toJson
public String toJson()
Convert an instance of Split to an JSON string- Returns:
- JSON string
-
-