
com.adyen.model.management.SplitConfigurationRule 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
/*
* Management API
*
* The version of the OpenAPI document: 3
*
*
* 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.management;
import java.util.Objects;
import java.util.Map;
import java.util.HashMap;
import com.adyen.model.management.SplitConfigurationLogic;
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 java.util.Arrays;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.fasterxml.jackson.core.JsonProcessingException;
/**
* SplitConfigurationRule
*/
@JsonPropertyOrder({
SplitConfigurationRule.JSON_PROPERTY_CURRENCY,
SplitConfigurationRule.JSON_PROPERTY_FUNDING_SOURCE,
SplitConfigurationRule.JSON_PROPERTY_PAYMENT_METHOD,
SplitConfigurationRule.JSON_PROPERTY_RULE_ID,
SplitConfigurationRule.JSON_PROPERTY_SHOPPER_INTERACTION,
SplitConfigurationRule.JSON_PROPERTY_SPLIT_LOGIC
})
public class SplitConfigurationRule {
public static final String JSON_PROPERTY_CURRENCY = "currency";
private String currency;
/**
* The funding source of the payment method. This only applies to card transactions. Possible values: * **credit** * **debit** * **prepaid** * **deferred_debit** * **charged** * **ANY**
*/
public enum FundingSourceEnum {
CHARGED(String.valueOf("charged")),
CREDIT(String.valueOf("credit")),
DEBIT(String.valueOf("debit")),
DEFERRED_DEBIT(String.valueOf("deferred_debit")),
PREPAID(String.valueOf("prepaid")),
ANY(String.valueOf("ANY"));
private String value;
FundingSourceEnum(String value) {
this.value = value;
}
@JsonValue
public String getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
@JsonCreator
public static FundingSourceEnum fromValue(String value) {
for (FundingSourceEnum b : FundingSourceEnum.values()) {
if (b.value.equals(value)) {
return b;
}
}
throw new IllegalArgumentException("Unexpected value '" + value + "'");
}
}
public static final String JSON_PROPERTY_FUNDING_SOURCE = "fundingSource";
private FundingSourceEnum fundingSource;
public static final String JSON_PROPERTY_PAYMENT_METHOD = "paymentMethod";
private String paymentMethod;
public static final String JSON_PROPERTY_RULE_ID = "ruleId";
private String ruleId;
/**
* The sales channel condition that defines whether the split logic applies. Possible values: * **Ecommerce**: Online transactions where the cardholder is present. * **ContAuth**: Card on file and/or subscription transactions, where the cardholder is known to the merchant (returning customer). * **Moto**: Mail-order and telephone-order transactions where the customer is in contact with the merchant via email or telephone. * **POS**: Point-of-sale transactions where the customer is physically present to make a payment using a secure payment terminal. * **ANY**: All sales channels.
*/
public enum ShopperInteractionEnum {
ECOMMERCE(String.valueOf("Ecommerce")),
CONTAUTH(String.valueOf("ContAuth")),
MOTO(String.valueOf("Moto")),
POS(String.valueOf("POS")),
ANY(String.valueOf("ANY"));
private String value;
ShopperInteractionEnum(String value) {
this.value = value;
}
@JsonValue
public String getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
@JsonCreator
public static ShopperInteractionEnum fromValue(String value) {
for (ShopperInteractionEnum b : ShopperInteractionEnum.values()) {
if (b.value.equals(value)) {
return b;
}
}
throw new IllegalArgumentException("Unexpected value '" + value + "'");
}
}
public static final String JSON_PROPERTY_SHOPPER_INTERACTION = "shopperInteraction";
private ShopperInteractionEnum shopperInteraction;
public static final String JSON_PROPERTY_SPLIT_LOGIC = "splitLogic";
private SplitConfigurationLogic splitLogic;
public SplitConfigurationRule() {
}
@JsonCreator
public SplitConfigurationRule(
@JsonProperty(JSON_PROPERTY_RULE_ID) String ruleId
) {
this();
this.ruleId = ruleId;
}
/**
* The currency condition that defines whether the split logic applies. Its value must be a three-character [ISO currency code](https://en.wikipedia.org/wiki/ISO_4217).
*
* @param currency The currency condition that defines whether the split logic applies. Its value must be a three-character [ISO currency code](https://en.wikipedia.org/wiki/ISO_4217).
* @return the current {@code SplitConfigurationRule} instance, allowing for method chaining
*/
public SplitConfigurationRule currency(String currency) {
this.currency = currency;
return this;
}
/**
* The currency condition that defines whether the split logic applies. Its value must be a three-character [ISO currency code](https://en.wikipedia.org/wiki/ISO_4217).
* @return currency The currency condition that defines whether the split logic applies. Its value must be a three-character [ISO currency code](https://en.wikipedia.org/wiki/ISO_4217).
*/
@JsonProperty(JSON_PROPERTY_CURRENCY)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getCurrency() {
return currency;
}
/**
* The currency condition that defines whether the split logic applies. Its value must be a three-character [ISO currency code](https://en.wikipedia.org/wiki/ISO_4217).
*
* @param currency The currency condition that defines whether the split logic applies. Its value must be a three-character [ISO currency code](https://en.wikipedia.org/wiki/ISO_4217).
*/
@JsonProperty(JSON_PROPERTY_CURRENCY)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setCurrency(String currency) {
this.currency = currency;
}
/**
* The funding source of the payment method. This only applies to card transactions. Possible values: * **credit** * **debit** * **prepaid** * **deferred_debit** * **charged** * **ANY**
*
* @param fundingSource The funding source of the payment method. This only applies to card transactions. Possible values: * **credit** * **debit** * **prepaid** * **deferred_debit** * **charged** * **ANY**
* @return the current {@code SplitConfigurationRule} instance, allowing for method chaining
*/
public SplitConfigurationRule fundingSource(FundingSourceEnum fundingSource) {
this.fundingSource = fundingSource;
return this;
}
/**
* The funding source of the payment method. This only applies to card transactions. Possible values: * **credit** * **debit** * **prepaid** * **deferred_debit** * **charged** * **ANY**
* @return fundingSource The funding source of the payment method. This only applies to card transactions. Possible values: * **credit** * **debit** * **prepaid** * **deferred_debit** * **charged** * **ANY**
*/
@JsonProperty(JSON_PROPERTY_FUNDING_SOURCE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public FundingSourceEnum getFundingSource() {
return fundingSource;
}
/**
* The funding source of the payment method. This only applies to card transactions. Possible values: * **credit** * **debit** * **prepaid** * **deferred_debit** * **charged** * **ANY**
*
* @param fundingSource The funding source of the payment method. This only applies to card transactions. Possible values: * **credit** * **debit** * **prepaid** * **deferred_debit** * **charged** * **ANY**
*/
@JsonProperty(JSON_PROPERTY_FUNDING_SOURCE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setFundingSource(FundingSourceEnum fundingSource) {
this.fundingSource = fundingSource;
}
/**
* The payment method condition that defines whether the split logic applies. Possible values: * [Payment method variant](https://docs.adyen.com/development-resources/paymentmethodvariant): Apply the split logic for a specific payment method. * **ANY**: Apply the split logic for all available payment methods.
*
* @param paymentMethod The payment method condition that defines whether the split logic applies. Possible values: * [Payment method variant](https://docs.adyen.com/development-resources/paymentmethodvariant): Apply the split logic for a specific payment method. * **ANY**: Apply the split logic for all available payment methods.
* @return the current {@code SplitConfigurationRule} instance, allowing for method chaining
*/
public SplitConfigurationRule paymentMethod(String paymentMethod) {
this.paymentMethod = paymentMethod;
return this;
}
/**
* The payment method condition that defines whether the split logic applies. Possible values: * [Payment method variant](https://docs.adyen.com/development-resources/paymentmethodvariant): Apply the split logic for a specific payment method. * **ANY**: Apply the split logic for all available payment methods.
* @return paymentMethod The payment method condition that defines whether the split logic applies. Possible values: * [Payment method variant](https://docs.adyen.com/development-resources/paymentmethodvariant): Apply the split logic for a specific payment method. * **ANY**: Apply the split logic for all available payment methods.
*/
@JsonProperty(JSON_PROPERTY_PAYMENT_METHOD)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getPaymentMethod() {
return paymentMethod;
}
/**
* The payment method condition that defines whether the split logic applies. Possible values: * [Payment method variant](https://docs.adyen.com/development-resources/paymentmethodvariant): Apply the split logic for a specific payment method. * **ANY**: Apply the split logic for all available payment methods.
*
* @param paymentMethod The payment method condition that defines whether the split logic applies. Possible values: * [Payment method variant](https://docs.adyen.com/development-resources/paymentmethodvariant): Apply the split logic for a specific payment method. * **ANY**: Apply the split logic for all available payment methods.
*/
@JsonProperty(JSON_PROPERTY_PAYMENT_METHOD)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setPaymentMethod(String paymentMethod) {
this.paymentMethod = paymentMethod;
}
/**
* The unique identifier of the split configuration rule.
* @return ruleId The unique identifier of the split configuration rule.
*/
@JsonProperty(JSON_PROPERTY_RULE_ID)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getRuleId() {
return ruleId;
}
/**
* The sales channel condition that defines whether the split logic applies. Possible values: * **Ecommerce**: Online transactions where the cardholder is present. * **ContAuth**: Card on file and/or subscription transactions, where the cardholder is known to the merchant (returning customer). * **Moto**: Mail-order and telephone-order transactions where the customer is in contact with the merchant via email or telephone. * **POS**: Point-of-sale transactions where the customer is physically present to make a payment using a secure payment terminal. * **ANY**: All sales channels.
*
* @param shopperInteraction The sales channel condition that defines whether the split logic applies. Possible values: * **Ecommerce**: Online transactions where the cardholder is present. * **ContAuth**: Card on file and/or subscription transactions, where the cardholder is known to the merchant (returning customer). * **Moto**: Mail-order and telephone-order transactions where the customer is in contact with the merchant via email or telephone. * **POS**: Point-of-sale transactions where the customer is physically present to make a payment using a secure payment terminal. * **ANY**: All sales channels.
* @return the current {@code SplitConfigurationRule} instance, allowing for method chaining
*/
public SplitConfigurationRule shopperInteraction(ShopperInteractionEnum shopperInteraction) {
this.shopperInteraction = shopperInteraction;
return this;
}
/**
* The sales channel condition that defines whether the split logic applies. Possible values: * **Ecommerce**: Online transactions where the cardholder is present. * **ContAuth**: Card on file and/or subscription transactions, where the cardholder is known to the merchant (returning customer). * **Moto**: Mail-order and telephone-order transactions where the customer is in contact with the merchant via email or telephone. * **POS**: Point-of-sale transactions where the customer is physically present to make a payment using a secure payment terminal. * **ANY**: All sales channels.
* @return shopperInteraction The sales channel condition that defines whether the split logic applies. Possible values: * **Ecommerce**: Online transactions where the cardholder is present. * **ContAuth**: Card on file and/or subscription transactions, where the cardholder is known to the merchant (returning customer). * **Moto**: Mail-order and telephone-order transactions where the customer is in contact with the merchant via email or telephone. * **POS**: Point-of-sale transactions where the customer is physically present to make a payment using a secure payment terminal. * **ANY**: All sales channels.
*/
@JsonProperty(JSON_PROPERTY_SHOPPER_INTERACTION)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public ShopperInteractionEnum getShopperInteraction() {
return shopperInteraction;
}
/**
* The sales channel condition that defines whether the split logic applies. Possible values: * **Ecommerce**: Online transactions where the cardholder is present. * **ContAuth**: Card on file and/or subscription transactions, where the cardholder is known to the merchant (returning customer). * **Moto**: Mail-order and telephone-order transactions where the customer is in contact with the merchant via email or telephone. * **POS**: Point-of-sale transactions where the customer is physically present to make a payment using a secure payment terminal. * **ANY**: All sales channels.
*
* @param shopperInteraction The sales channel condition that defines whether the split logic applies. Possible values: * **Ecommerce**: Online transactions where the cardholder is present. * **ContAuth**: Card on file and/or subscription transactions, where the cardholder is known to the merchant (returning customer). * **Moto**: Mail-order and telephone-order transactions where the customer is in contact with the merchant via email or telephone. * **POS**: Point-of-sale transactions where the customer is physically present to make a payment using a secure payment terminal. * **ANY**: All sales channels.
*/
@JsonProperty(JSON_PROPERTY_SHOPPER_INTERACTION)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setShopperInteraction(ShopperInteractionEnum shopperInteraction) {
this.shopperInteraction = shopperInteraction;
}
/**
* splitLogic
*
* @param splitLogic
* @return the current {@code SplitConfigurationRule} instance, allowing for method chaining
*/
public SplitConfigurationRule splitLogic(SplitConfigurationLogic splitLogic) {
this.splitLogic = splitLogic;
return this;
}
/**
* Get splitLogic
* @return splitLogic
*/
@JsonProperty(JSON_PROPERTY_SPLIT_LOGIC)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public SplitConfigurationLogic getSplitLogic() {
return splitLogic;
}
/**
* splitLogic
*
* @param splitLogic
*/
@JsonProperty(JSON_PROPERTY_SPLIT_LOGIC)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setSplitLogic(SplitConfigurationLogic splitLogic) {
this.splitLogic = splitLogic;
}
/**
* Return true if this SplitConfigurationRule object is equal to o.
*/
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
SplitConfigurationRule splitConfigurationRule = (SplitConfigurationRule) o;
return Objects.equals(this.currency, splitConfigurationRule.currency) &&
Objects.equals(this.fundingSource, splitConfigurationRule.fundingSource) &&
Objects.equals(this.paymentMethod, splitConfigurationRule.paymentMethod) &&
Objects.equals(this.ruleId, splitConfigurationRule.ruleId) &&
Objects.equals(this.shopperInteraction, splitConfigurationRule.shopperInteraction) &&
Objects.equals(this.splitLogic, splitConfigurationRule.splitLogic);
}
@Override
public int hashCode() {
return Objects.hash(currency, fundingSource, paymentMethod, ruleId, shopperInteraction, splitLogic);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class SplitConfigurationRule {\n");
sb.append(" currency: ").append(toIndentedString(currency)).append("\n");
sb.append(" fundingSource: ").append(toIndentedString(fundingSource)).append("\n");
sb.append(" paymentMethod: ").append(toIndentedString(paymentMethod)).append("\n");
sb.append(" ruleId: ").append(toIndentedString(ruleId)).append("\n");
sb.append(" shopperInteraction: ").append(toIndentedString(shopperInteraction)).append("\n");
sb.append(" splitLogic: ").append(toIndentedString(splitLogic)).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 SplitConfigurationRule given an JSON string
*
* @param jsonString JSON string
* @return An instance of SplitConfigurationRule
* @throws JsonProcessingException if the JSON string is invalid with respect to SplitConfigurationRule
*/
public static SplitConfigurationRule fromJson(String jsonString) throws JsonProcessingException {
return JSON.getMapper().readValue(jsonString, SplitConfigurationRule.class);
}
/**
* Convert an instance of SplitConfigurationRule to an JSON string
*
* @return JSON string
*/
public String toJson() throws JsonProcessingException {
return JSON.getMapper().writeValueAsString(this);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy