
com.adyen.model.marketpaywebhooks.Split Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of adyen-java-api-library Show documentation
Show all versions of adyen-java-api-library Show documentation
Adyen API Client Library for Java
/*
* Classic Platforms - Notifications
*
* The version of the OpenAPI document: 6
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
package com.adyen.model.marketpaywebhooks;
import java.util.Objects;
import java.util.Arrays;
import java.util.Map;
import java.util.HashMap;
import com.adyen.model.marketpaywebhooks.SplitAmount;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonTypeName;
import com.fasterxml.jackson.annotation.JsonValue;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.fasterxml.jackson.core.JsonProcessingException;
/**
* Split
*/
@JsonPropertyOrder({
Split.JSON_PROPERTY_ACCOUNT,
Split.JSON_PROPERTY_AMOUNT,
Split.JSON_PROPERTY_DESCRIPTION,
Split.JSON_PROPERTY_REFERENCE,
Split.JSON_PROPERTY_TYPE
})
public class Split {
public static final String JSON_PROPERTY_ACCOUNT = "account";
private String account;
public static final String JSON_PROPERTY_AMOUNT = "amount";
private SplitAmount amount;
public static final String JSON_PROPERTY_DESCRIPTION = "description";
private String description;
public static final String JSON_PROPERTY_REFERENCE = "reference";
private String reference;
/**
* The type of split. Possible values: **Default**, **PaymentFee**, **VAT**, **Commission**, **MarketPlace**, **BalanceAccount**, **Remainder**, **Surcharge**, **Tip**.
*/
public enum TypeEnum {
BALANCEACCOUNT("BalanceAccount"),
COMMISSION("Commission"),
DEFAULT("Default"),
MARKETPLACE("MarketPlace"),
PAYMENTFEE("PaymentFee"),
PAYMENTFEEACQUIRING("PaymentFeeAcquiring"),
PAYMENTFEEADYEN("PaymentFeeAdyen"),
PAYMENTFEEADYENCOMMISSION("PaymentFeeAdyenCommission"),
PAYMENTFEEADYENMARKUP("PaymentFeeAdyenMarkup"),
PAYMENTFEEINTERCHANGE("PaymentFeeInterchange"),
PAYMENTFEESCHEMEFEE("PaymentFeeSchemeFee"),
REMAINDER("Remainder"),
SURCHARGE("Surcharge"),
TIP("Tip"),
VAT("VAT"),
VERIFICATION("Verification");
private String value;
TypeEnum(String value) {
this.value = value;
}
@JsonValue
public String getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
@JsonCreator
public static TypeEnum fromValue(String value) {
for (TypeEnum b : TypeEnum.values()) {
if (b.value.equals(value)) {
return b;
}
}
throw new IllegalArgumentException("Unexpected value '" + value + "'");
}
}
public static final String JSON_PROPERTY_TYPE = "type";
private TypeEnum type;
public Split() {
}
public Split account(String account) {
this.account = account;
return this;
}
/**
* Unique identifier of the account where the split amount should be sent. This is required if `type` is **MarketPlace** or **BalanceAccount**.
* @return account
**/
@ApiModelProperty(value = "Unique identifier of the account where the split amount should be sent. This is required if `type` is **MarketPlace** or **BalanceAccount**. ")
@JsonProperty(JSON_PROPERTY_ACCOUNT)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getAccount() {
return account;
}
@JsonProperty(JSON_PROPERTY_ACCOUNT)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setAccount(String account) {
this.account = account;
}
public Split amount(SplitAmount amount) {
this.amount = amount;
return this;
}
/**
* Get amount
* @return amount
**/
@ApiModelProperty(required = true, value = "")
@JsonProperty(JSON_PROPERTY_AMOUNT)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public SplitAmount getAmount() {
return amount;
}
@JsonProperty(JSON_PROPERTY_AMOUNT)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setAmount(SplitAmount amount) {
this.amount = amount;
}
public Split description(String description) {
this.description = description;
return this;
}
/**
* A description of this split.
* @return description
**/
@ApiModelProperty(value = "A description of this split.")
@JsonProperty(JSON_PROPERTY_DESCRIPTION)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getDescription() {
return description;
}
@JsonProperty(JSON_PROPERTY_DESCRIPTION)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setDescription(String description) {
this.description = description;
}
public Split reference(String reference) {
this.reference = reference;
return this;
}
/**
* 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.
* @return reference
**/
@ApiModelProperty(value = "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.")
@JsonProperty(JSON_PROPERTY_REFERENCE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getReference() {
return reference;
}
@JsonProperty(JSON_PROPERTY_REFERENCE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setReference(String reference) {
this.reference = reference;
}
public Split type(TypeEnum type) {
this.type = type;
return this;
}
/**
* The type of split. Possible values: **Default**, **PaymentFee**, **VAT**, **Commission**, **MarketPlace**, **BalanceAccount**, **Remainder**, **Surcharge**, **Tip**.
* @return type
**/
@ApiModelProperty(required = true, value = "The type of split. Possible values: **Default**, **PaymentFee**, **VAT**, **Commission**, **MarketPlace**, **BalanceAccount**, **Remainder**, **Surcharge**, **Tip**.")
@JsonProperty(JSON_PROPERTY_TYPE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public TypeEnum getType() {
return type;
}
@JsonProperty(JSON_PROPERTY_TYPE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setType(TypeEnum type) {
this.type = type;
}
/**
* Return true if this Split object is equal to o.
*/
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
Split split = (Split) o;
return Objects.equals(this.account, split.account) &&
Objects.equals(this.amount, split.amount) &&
Objects.equals(this.description, split.description) &&
Objects.equals(this.reference, split.reference) &&
Objects.equals(this.type, split.type);
}
@Override
public int hashCode() {
return Objects.hash(account, amount, description, reference, type);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class Split {\n");
sb.append(" account: ").append(toIndentedString(account)).append("\n");
sb.append(" amount: ").append(toIndentedString(amount)).append("\n");
sb.append(" description: ").append(toIndentedString(description)).append("\n");
sb.append(" reference: ").append(toIndentedString(reference)).append("\n");
sb.append(" type: ").append(toIndentedString(type)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
/**
* Create an instance of Split given an JSON string
*
* @param jsonString JSON string
* @return An instance of Split
* @throws JsonProcessingException if the JSON string is invalid with respect to Split
*/
public static Split fromJson(String jsonString) throws JsonProcessingException {
return JSON.getMapper().readValue(jsonString, Split.class);
}
/**
* Convert an instance of Split to an JSON string
*
* @return JSON string
*/
public String toJson() throws JsonProcessingException {
return JSON.getMapper().writeValueAsString(this);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy