Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
false[adyen-sdk-automation] automated change
Browse files Browse the repository at this point in the history
AdyenAutomationBot committed Apr 16, 2024
1 parent 0e4330f commit 097c197
Showing 10 changed files with 675 additions and 108 deletions.
459 changes: 459 additions & 0 deletions src/main/java/com/adyen/model/checkout/CashAppDetails.java

Large diffs are not rendered by default.

60 changes: 56 additions & 4 deletions src/main/java/com/adyen/model/checkout/CheckoutPaymentMethod.java
Original file line number Diff line number Diff line change
@@ -26,6 +26,7 @@
import com.adyen.model.checkout.BillDeskDetails;
import com.adyen.model.checkout.BlikDetails;
import com.adyen.model.checkout.CardDetails;
import com.adyen.model.checkout.CashAppDetails;
import com.adyen.model.checkout.CellulantDetails;
import com.adyen.model.checkout.DokuDetails;
import com.adyen.model.checkout.DotpayDetails;
@@ -412,6 +413,34 @@ public CheckoutPaymentMethod deserialize(JsonParser jp, DeserializationContext c
}


// deserialize CashAppDetails
try {
boolean attemptParsing = true;
// ensure that we respect type coercion as set on the client ObjectMapper
if (CashAppDetails.class.equals(Integer.class) || CashAppDetails.class.equals(Long.class) || CashAppDetails.class.equals(Float.class) || CashAppDetails.class.equals(Double.class) || CashAppDetails.class.equals(Boolean.class) || CashAppDetails.class.equals(String.class)) {
attemptParsing = typeCoercion;
if (!attemptParsing) {
attemptParsing |= ((CashAppDetails.class.equals(Integer.class) || CashAppDetails.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT);
attemptParsing |= ((CashAppDetails.class.equals(Float.class) || CashAppDetails.class.equals(Double.class)) && token == JsonToken.VALUE_NUMBER_FLOAT);
attemptParsing |= (CashAppDetails.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE));
attemptParsing |= (CashAppDetails.class.equals(String.class) && token == JsonToken.VALUE_STRING);
}
}
// Checks if the unique type of the oneOf json matches any of the object TypeEnum values
boolean typeMatch = Arrays.stream(CashAppDetails.TypeEnum.values()).anyMatch((t) -> t.getValue().contains(tree.findValue("type").asText()));
if (attemptParsing || typeMatch) {
// Strict deserialization for oneOf models
deserialized = JSON.getMapper().readValue(tree.toString(), CashAppDetails.class);
// typeMatch should enforce proper deserialization
match++;
log.log(Level.FINER, "Input data matches schema 'CashAppDetails'");
}
} catch (Exception e) {
// deserialization failed, continue
log.log(Level.FINER, "Input data does not match schema 'CashAppDetails'", e);
}


// deserialize CellulantDetails
try {
boolean attemptParsing = true;
@@ -1331,6 +1360,11 @@ public CheckoutPaymentMethod(CardDetails o) {
setActualInstance(o);
}

public CheckoutPaymentMethod(CashAppDetails o) {
super("oneOf", Boolean.FALSE);
setActualInstance(o);
}

public CheckoutPaymentMethod(CellulantDetails o) {
super("oneOf", Boolean.FALSE);
setActualInstance(o);
@@ -1502,6 +1536,8 @@ public CheckoutPaymentMethod(ZipDetails o) {
});
schemas.put("CardDetails", new GenericType<CardDetails>() {
});
schemas.put("CashAppDetails", new GenericType<CashAppDetails>() {
});
schemas.put("CellulantDetails", new GenericType<CellulantDetails>() {
});
schemas.put("DokuDetails", new GenericType<DokuDetails>() {
@@ -1573,7 +1609,7 @@ public Map<String, GenericType> getSchemas() {
/**
* Set the instance that matches the oneOf child schema, check
* the instance parameter is valid against the oneOf child schemas:
* AchDetails, AfterpayDetails, AmazonPayDetails, AncvDetails, AndroidPayDetails, ApplePayDetails, BacsDirectDebitDetails, BillDeskDetails, BlikDetails, CardDetails, CellulantDetails, DokuDetails, DotpayDetails, DragonpayDetails, EcontextVoucherDetails, GenericIssuerPaymentMethodDetails, GiropayDetails, GooglePayDetails, IdealDetails, KlarnaDetails, MasterpassDetails, MbwayDetails, MobilePayDetails, MolPayDetails, OpenInvoiceDetails, PayPalDetails, PayUUpiDetails, PayWithGoogleDetails, PaymentDetails, RatepayDetails, SamsungPayDetails, SepaDirectDebitDetails, StoredPaymentMethodDetails, UpiCollectDetails, UpiIntentDetails, VippsDetails, VisaCheckoutDetails, WeChatPayDetails, WeChatPayMiniProgramDetails, ZipDetails
* AchDetails, AfterpayDetails, AmazonPayDetails, AncvDetails, AndroidPayDetails, ApplePayDetails, BacsDirectDebitDetails, BillDeskDetails, BlikDetails, CardDetails, CashAppDetails, CellulantDetails, DokuDetails, DotpayDetails, DragonpayDetails, EcontextVoucherDetails, GenericIssuerPaymentMethodDetails, GiropayDetails, GooglePayDetails, IdealDetails, KlarnaDetails, MasterpassDetails, MbwayDetails, MobilePayDetails, MolPayDetails, OpenInvoiceDetails, PayPalDetails, PayUUpiDetails, PayWithGoogleDetails, PaymentDetails, RatepayDetails, SamsungPayDetails, SepaDirectDebitDetails, StoredPaymentMethodDetails, UpiCollectDetails, UpiIntentDetails, VippsDetails, VisaCheckoutDetails, WeChatPayDetails, WeChatPayMiniProgramDetails, ZipDetails
*
* It could be an instance of the 'oneOf' schemas.
* The oneOf child schemas may themselves be a composed schema (allOf, anyOf, oneOf).
@@ -1630,6 +1666,11 @@ public void setActualInstance(Object instance) {
return;
}

if (JSON.isInstanceOf(CashAppDetails.class, instance, new HashSet<Class<?>>())) {
super.setActualInstance(instance);
return;
}

if (JSON.isInstanceOf(CellulantDetails.class, instance, new HashSet<Class<?>>())) {
super.setActualInstance(instance);
return;
@@ -1780,14 +1821,14 @@ public void setActualInstance(Object instance) {
return;
}

throw new RuntimeException("Invalid instance type. Must be AchDetails, AfterpayDetails, AmazonPayDetails, AncvDetails, AndroidPayDetails, ApplePayDetails, BacsDirectDebitDetails, BillDeskDetails, BlikDetails, CardDetails, CellulantDetails, DokuDetails, DotpayDetails, DragonpayDetails, EcontextVoucherDetails, GenericIssuerPaymentMethodDetails, GiropayDetails, GooglePayDetails, IdealDetails, KlarnaDetails, MasterpassDetails, MbwayDetails, MobilePayDetails, MolPayDetails, OpenInvoiceDetails, PayPalDetails, PayUUpiDetails, PayWithGoogleDetails, PaymentDetails, RatepayDetails, SamsungPayDetails, SepaDirectDebitDetails, StoredPaymentMethodDetails, UpiCollectDetails, UpiIntentDetails, VippsDetails, VisaCheckoutDetails, WeChatPayDetails, WeChatPayMiniProgramDetails, ZipDetails");
throw new RuntimeException("Invalid instance type. Must be AchDetails, AfterpayDetails, AmazonPayDetails, AncvDetails, AndroidPayDetails, ApplePayDetails, BacsDirectDebitDetails, BillDeskDetails, BlikDetails, CardDetails, CashAppDetails, CellulantDetails, DokuDetails, DotpayDetails, DragonpayDetails, EcontextVoucherDetails, GenericIssuerPaymentMethodDetails, GiropayDetails, GooglePayDetails, IdealDetails, KlarnaDetails, MasterpassDetails, MbwayDetails, MobilePayDetails, MolPayDetails, OpenInvoiceDetails, PayPalDetails, PayUUpiDetails, PayWithGoogleDetails, PaymentDetails, RatepayDetails, SamsungPayDetails, SepaDirectDebitDetails, StoredPaymentMethodDetails, UpiCollectDetails, UpiIntentDetails, VippsDetails, VisaCheckoutDetails, WeChatPayDetails, WeChatPayMiniProgramDetails, ZipDetails");
}

/**
* Get the actual instance, which can be the following:
* AchDetails, AfterpayDetails, AmazonPayDetails, AncvDetails, AndroidPayDetails, ApplePayDetails, BacsDirectDebitDetails, BillDeskDetails, BlikDetails, CardDetails, CellulantDetails, DokuDetails, DotpayDetails, DragonpayDetails, EcontextVoucherDetails, GenericIssuerPaymentMethodDetails, GiropayDetails, GooglePayDetails, IdealDetails, KlarnaDetails, MasterpassDetails, MbwayDetails, MobilePayDetails, MolPayDetails, OpenInvoiceDetails, PayPalDetails, PayUUpiDetails, PayWithGoogleDetails, PaymentDetails, RatepayDetails, SamsungPayDetails, SepaDirectDebitDetails, StoredPaymentMethodDetails, UpiCollectDetails, UpiIntentDetails, VippsDetails, VisaCheckoutDetails, WeChatPayDetails, WeChatPayMiniProgramDetails, ZipDetails
* AchDetails, AfterpayDetails, AmazonPayDetails, AncvDetails, AndroidPayDetails, ApplePayDetails, BacsDirectDebitDetails, BillDeskDetails, BlikDetails, CardDetails, CashAppDetails, CellulantDetails, DokuDetails, DotpayDetails, DragonpayDetails, EcontextVoucherDetails, GenericIssuerPaymentMethodDetails, GiropayDetails, GooglePayDetails, IdealDetails, KlarnaDetails, MasterpassDetails, MbwayDetails, MobilePayDetails, MolPayDetails, OpenInvoiceDetails, PayPalDetails, PayUUpiDetails, PayWithGoogleDetails, PaymentDetails, RatepayDetails, SamsungPayDetails, SepaDirectDebitDetails, StoredPaymentMethodDetails, UpiCollectDetails, UpiIntentDetails, VippsDetails, VisaCheckoutDetails, WeChatPayDetails, WeChatPayMiniProgramDetails, ZipDetails
*
* @return The actual instance (AchDetails, AfterpayDetails, AmazonPayDetails, AncvDetails, AndroidPayDetails, ApplePayDetails, BacsDirectDebitDetails, BillDeskDetails, BlikDetails, CardDetails, CellulantDetails, DokuDetails, DotpayDetails, DragonpayDetails, EcontextVoucherDetails, GenericIssuerPaymentMethodDetails, GiropayDetails, GooglePayDetails, IdealDetails, KlarnaDetails, MasterpassDetails, MbwayDetails, MobilePayDetails, MolPayDetails, OpenInvoiceDetails, PayPalDetails, PayUUpiDetails, PayWithGoogleDetails, PaymentDetails, RatepayDetails, SamsungPayDetails, SepaDirectDebitDetails, StoredPaymentMethodDetails, UpiCollectDetails, UpiIntentDetails, VippsDetails, VisaCheckoutDetails, WeChatPayDetails, WeChatPayMiniProgramDetails, ZipDetails)
* @return The actual instance (AchDetails, AfterpayDetails, AmazonPayDetails, AncvDetails, AndroidPayDetails, ApplePayDetails, BacsDirectDebitDetails, BillDeskDetails, BlikDetails, CardDetails, CashAppDetails, CellulantDetails, DokuDetails, DotpayDetails, DragonpayDetails, EcontextVoucherDetails, GenericIssuerPaymentMethodDetails, GiropayDetails, GooglePayDetails, IdealDetails, KlarnaDetails, MasterpassDetails, MbwayDetails, MobilePayDetails, MolPayDetails, OpenInvoiceDetails, PayPalDetails, PayUUpiDetails, PayWithGoogleDetails, PaymentDetails, RatepayDetails, SamsungPayDetails, SepaDirectDebitDetails, StoredPaymentMethodDetails, UpiCollectDetails, UpiIntentDetails, VippsDetails, VisaCheckoutDetails, WeChatPayDetails, WeChatPayMiniProgramDetails, ZipDetails)
*/
@Override
public Object getActualInstance() {
@@ -1904,6 +1945,17 @@ public CardDetails getCardDetails() throws ClassCastException {
return (CardDetails)super.getActualInstance();
}

/**
* Get the actual instance of `CashAppDetails`. If the actual instance is not `CashAppDetails`,
* the ClassCastException will be thrown.
*
* @return The actual instance of `CashAppDetails`
* @throws ClassCastException if the instance is not `CashAppDetails`
*/
public CashAppDetails getCashAppDetails() throws ClassCastException {
return (CashAppDetails)super.getActualInstance();
}

/**
* Get the actual instance of `CellulantDetails`. If the actual instance is not `CellulantDetails`,
* the ClassCastException will be thrown.
Original file line number Diff line number Diff line change
@@ -43,9 +43,23 @@ public class CheckoutSessionInstallmentOption {
* Gets or Sets plans
*/
public enum PlansEnum {
BUYNOW_PAYLATER("buynow_paylater"),

INTERES_REFUND_PRCTG("interes_refund_prctg"),

INTEREST_BONUS("interest_bonus"),

NOINTERES_REFUND_PRCTG("nointeres_refund_prctg"),

NOINTEREST_BONUS("nointerest_bonus"),

REFUND_PRCTG("refund_prctg"),

REGULAR("regular"),

REVOLVING("revolving");
REVOLVING("revolving"),

WITH_INTEREST("with_interest");

private String value;

16 changes: 15 additions & 1 deletion src/main/java/com/adyen/model/checkout/InstallmentOption.java
Original file line number Diff line number Diff line change
@@ -47,9 +47,23 @@ public class InstallmentOption {
* Gets or Sets plans
*/
public enum PlansEnum {
BUYNOW_PAYLATER("buynow_paylater"),

INTERES_REFUND_PRCTG("interes_refund_prctg"),

INTEREST_BONUS("interest_bonus"),

NOINTERES_REFUND_PRCTG("nointeres_refund_prctg"),

NOINTEREST_BONUS("nointerest_bonus"),

REFUND_PRCTG("refund_prctg"),

REGULAR("regular"),

REVOLVING("revolving");
REVOLVING("revolving"),

WITH_INTEREST("with_interest");

private String value;

70 changes: 60 additions & 10 deletions src/main/java/com/adyen/model/checkout/Installments.java
Original file line number Diff line number Diff line change
@@ -31,18 +31,36 @@
* Installments
*/
@JsonPropertyOrder({
Installments.JSON_PROPERTY_EXTRA,
Installments.JSON_PROPERTY_PLAN,
Installments.JSON_PROPERTY_VALUE
})

public class Installments {
public static final String JSON_PROPERTY_EXTRA = "extra";
private Integer extra;

/**
* The installment plan, used for [card installments in Japan](https://docs.adyen.com/payment-methods/cards/credit-card-installments#make-a-payment-japan). By default, this is set to **regular**. Possible values: * **regular** * **revolving**
* The installment plan, used for [card installments in Japan](https://docs.adyen.com/payment-methods/cards/credit-card-installments#make-a-payment-japan). and [mexico](https://docs.adyen.com/payment-methods/cards/credit-card-installments/#getting-paid-mexico). By default, this is set to **regular**.
*/
public enum PlanEnum {
BUYNOW_PAYLATER("buynow_paylater"),

INTERES_REFUND_PRCTG("interes_refund_prctg"),

INTEREST_BONUS("interest_bonus"),

NOINTERES_REFUND_PRCTG("nointeres_refund_prctg"),

NOINTEREST_BONUS("nointerest_bonus"),

REFUND_PRCTG("refund_prctg"),

REGULAR("regular"),

REVOLVING("revolving");
REVOLVING("revolving"),

WITH_INTEREST("with_interest");

private String value;

@@ -80,16 +98,46 @@ public static PlanEnum fromValue(String value) {
public Installments() {
}

public Installments extra(Integer extra) {
this.extra = extra;
return this;
}

/**
* Defines the bonus percentage, refund percentage or if the transaction is Buy now Pay later. Used for [card installments in Mexico](https://docs.adyen.com/payment-methods/cards/credit-card-installments/#getting-paid-mexico)
* @return extra
**/
@ApiModelProperty(value = "Defines the bonus percentage, refund percentage or if the transaction is Buy now Pay later. Used for [card installments in Mexico](https://docs.adyen.com/payment-methods/cards/credit-card-installments/#getting-paid-mexico) ")
@JsonProperty(JSON_PROPERTY_EXTRA)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

public Integer getExtra() {
return extra;
}


/**
* Defines the bonus percentage, refund percentage or if the transaction is Buy now Pay later. Used for [card installments in Mexico](https://docs.adyen.com/payment-methods/cards/credit-card-installments/#getting-paid-mexico)
*
* @param extra
*/
@JsonProperty(JSON_PROPERTY_EXTRA)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setExtra(Integer extra) {
this.extra = extra;
}


public Installments plan(PlanEnum plan) {
this.plan = plan;
return this;
}

/**
* The installment plan, used for [card installments in Japan](https://docs.adyen.com/payment-methods/cards/credit-card-installments#make-a-payment-japan). By default, this is set to **regular**. Possible values: * **regular** * **revolving**
* The installment plan, used for [card installments in Japan](https://docs.adyen.com/payment-methods/cards/credit-card-installments#make-a-payment-japan). and [mexico](https://docs.adyen.com/payment-methods/cards/credit-card-installments/#getting-paid-mexico). By default, this is set to **regular**.
* @return plan
**/
@ApiModelProperty(value = "The installment plan, used for [card installments in Japan](https://docs.adyen.com/payment-methods/cards/credit-card-installments#make-a-payment-japan). By default, this is set to **regular**. Possible values: * **regular** * **revolving** ")
@ApiModelProperty(value = "The installment plan, used for [card installments in Japan](https://docs.adyen.com/payment-methods/cards/credit-card-installments#make-a-payment-japan). and [mexico](https://docs.adyen.com/payment-methods/cards/credit-card-installments/#getting-paid-mexico). By default, this is set to **regular**. ")
@JsonProperty(JSON_PROPERTY_PLAN)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

@@ -99,7 +147,7 @@ public PlanEnum getPlan() {


/**
* The installment plan, used for [card installments in Japan](https://docs.adyen.com/payment-methods/cards/credit-card-installments#make-a-payment-japan). By default, this is set to **regular**. Possible values: * **regular** * **revolving**
* The installment plan, used for [card installments in Japan](https://docs.adyen.com/payment-methods/cards/credit-card-installments#make-a-payment-japan). and [mexico](https://docs.adyen.com/payment-methods/cards/credit-card-installments/#getting-paid-mexico). By default, this is set to **regular**.
*
* @param plan
*/
@@ -116,10 +164,10 @@ public Installments value(Integer value) {
}

/**
* Defines the number of installments. Its value needs to be greater than zero. Usually, the maximum allowed number of installments is capped. For example, it may not be possible to split a payment in more than 24 installments. The acquirer sets this upper limit, so its value may vary.
* Defines the number of installments. Usually, the maximum allowed number of installments is capped. For example, it may not be possible to split a payment in more than 24 installments. The acquirer sets this upper limit, so its value may vary. This value can be zero for Installments processed in Mexico
* @return value
**/
@ApiModelProperty(required = true, value = "Defines the number of installments. Its value needs to be greater than zero. Usually, the maximum allowed number of installments is capped. For example, it may not be possible to split a payment in more than 24 installments. The acquirer sets this upper limit, so its value may vary.")
@ApiModelProperty(required = true, value = "Defines the number of installments. Usually, the maximum allowed number of installments is capped. For example, it may not be possible to split a payment in more than 24 installments. The acquirer sets this upper limit, so its value may vary. This value can be zero for Installments processed in Mexico")
@JsonProperty(JSON_PROPERTY_VALUE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

@@ -129,7 +177,7 @@ public Integer getValue() {


/**
* Defines the number of installments. Its value needs to be greater than zero. Usually, the maximum allowed number of installments is capped. For example, it may not be possible to split a payment in more than 24 installments. The acquirer sets this upper limit, so its value may vary.
* Defines the number of installments. Usually, the maximum allowed number of installments is capped. For example, it may not be possible to split a payment in more than 24 installments. The acquirer sets this upper limit, so its value may vary. This value can be zero for Installments processed in Mexico
*
* @param value
*/
@@ -152,19 +200,21 @@ public boolean equals(Object o) {
return false;
}
Installments installments = (Installments) o;
return Objects.equals(this.plan, installments.plan) &&
return Objects.equals(this.extra, installments.extra) &&
Objects.equals(this.plan, installments.plan) &&
Objects.equals(this.value, installments.value);
}

@Override
public int hashCode() {
return Objects.hash(plan, value);
return Objects.hash(extra, plan, value);
}

@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class Installments {\n");
sb.append(" extra: ").append(toIndentedString(extra)).append("\n");
sb.append(" plan: ").append(toIndentedString(plan)).append("\n");
sb.append(" value: ").append(toIndentedString(value)).append("\n");
sb.append("}");
Original file line number Diff line number Diff line change
@@ -32,8 +32,6 @@
*/
@JsonPropertyOrder({
HKLocalAccountIdentification.JSON_PROPERTY_ACCOUNT_NUMBER,
HKLocalAccountIdentification.JSON_PROPERTY_BANK_NAME,
HKLocalAccountIdentification.JSON_PROPERTY_BIC,
HKLocalAccountIdentification.JSON_PROPERTY_CLEARING_CODE,
HKLocalAccountIdentification.JSON_PROPERTY_TYPE
})
@@ -42,12 +40,6 @@ public class HKLocalAccountIdentification {
public static final String JSON_PROPERTY_ACCOUNT_NUMBER = "accountNumber";
private String accountNumber;

public static final String JSON_PROPERTY_BANK_NAME = "bankName";
private String bankName;

public static final String JSON_PROPERTY_BIC = "bic";
private String bic;

public static final String JSON_PROPERTY_CLEARING_CODE = "clearingCode";
private String clearingCode;

@@ -120,66 +112,6 @@ public void setAccountNumber(String accountNumber) {
}


public HKLocalAccountIdentification bankName(String bankName) {
this.bankName = bankName;
return this;
}

/**
* The bank&#39;s name.
* @return bankName
**/
@ApiModelProperty(value = "The bank's name.")
@JsonProperty(JSON_PROPERTY_BANK_NAME)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

public String getBankName() {
return bankName;
}


/**
* The bank&#39;s name.
*
* @param bankName
*/
@JsonProperty(JSON_PROPERTY_BANK_NAME)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setBankName(String bankName) {
this.bankName = bankName;
}


public HKLocalAccountIdentification bic(String bic) {
this.bic = bic;
return this;
}

/**
* The bank&#39;s 8- or 11-character BIC or SWIFT code.
* @return bic
**/
@ApiModelProperty(value = "The bank's 8- or 11-character BIC or SWIFT code.")
@JsonProperty(JSON_PROPERTY_BIC)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

public String getBic() {
return bic;
}


/**
* The bank&#39;s 8- or 11-character BIC or SWIFT code.
*
* @param bic
*/
@JsonProperty(JSON_PROPERTY_BIC)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setBic(String bic) {
this.bic = bic;
}


public HKLocalAccountIdentification clearingCode(String clearingCode) {
this.clearingCode = clearingCode;
return this;
@@ -253,24 +185,20 @@ public boolean equals(Object o) {
}
HKLocalAccountIdentification hkLocalAccountIdentification = (HKLocalAccountIdentification) o;
return Objects.equals(this.accountNumber, hkLocalAccountIdentification.accountNumber) &&
Objects.equals(this.bankName, hkLocalAccountIdentification.bankName) &&
Objects.equals(this.bic, hkLocalAccountIdentification.bic) &&
Objects.equals(this.clearingCode, hkLocalAccountIdentification.clearingCode) &&
Objects.equals(this.type, hkLocalAccountIdentification.type);
}

@Override
public int hashCode() {
return Objects.hash(accountNumber, bankName, bic, clearingCode, type);
return Objects.hash(accountNumber, clearingCode, type);
}

@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class HKLocalAccountIdentification {\n");
sb.append(" accountNumber: ").append(toIndentedString(accountNumber)).append("\n");
sb.append(" bankName: ").append(toIndentedString(bankName)).append("\n");
sb.append(" bic: ").append(toIndentedString(bic)).append("\n");
sb.append(" clearingCode: ").append(toIndentedString(clearingCode)).append("\n");
sb.append(" type: ").append(toIndentedString(type)).append("\n");
sb.append("}");
Original file line number Diff line number Diff line change
@@ -92,10 +92,10 @@ public ScheduleTerminalActionsRequest scheduledAt(String scheduledAt) {
}

/**
* The date and time when the action should happen. Format: [RFC 3339](https://www.rfc-editor.org/rfc/rfc3339), but without the **Z** before the time offset. For example, **2021-11-15T12:16:21+01:00** The action is sent with the first [maintenance call](https://docs.adyen.com/point-of-sale/automating-terminal-management/terminal-actions-api#when-actions-take-effect) after the specified date and time in the time zone of the terminal. An empty value causes the action to be sent as soon as possible: at the next maintenance call.
* The date and time when the action should happen. Format: [RFC 3339](https://www.rfc-editor.org/rfc/rfc3339), but without the **Z** before the time offset. For example, **2021-11-15T12:16:21+0100** The action is sent with the first [maintenance call](https://docs.adyen.com/point-of-sale/automating-terminal-management/terminal-actions-api#when-actions-take-effect) after the specified date and time in the time zone of the terminal. An empty value causes the action to be sent as soon as possible: at the next maintenance call.
* @return scheduledAt
**/
@ApiModelProperty(value = "The date and time when the action should happen. Format: [RFC 3339](https://www.rfc-editor.org/rfc/rfc3339), but without the **Z** before the time offset. For example, **2021-11-15T12:16:21+01:00** The action is sent with the first [maintenance call](https://docs.adyen.com/point-of-sale/automating-terminal-management/terminal-actions-api#when-actions-take-effect) after the specified date and time in the time zone of the terminal. An empty value causes the action to be sent as soon as possible: at the next maintenance call.")
@ApiModelProperty(value = "The date and time when the action should happen. Format: [RFC 3339](https://www.rfc-editor.org/rfc/rfc3339), but without the **Z** before the time offset. For example, **2021-11-15T12:16:21+0100** The action is sent with the first [maintenance call](https://docs.adyen.com/point-of-sale/automating-terminal-management/terminal-actions-api#when-actions-take-effect) after the specified date and time in the time zone of the terminal. An empty value causes the action to be sent as soon as possible: at the next maintenance call.")
@JsonProperty(JSON_PROPERTY_SCHEDULED_AT)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

@@ -105,7 +105,7 @@ public String getScheduledAt() {


/**
* The date and time when the action should happen. Format: [RFC 3339](https://www.rfc-editor.org/rfc/rfc3339), but without the **Z** before the time offset. For example, **2021-11-15T12:16:21+01:00** The action is sent with the first [maintenance call](https://docs.adyen.com/point-of-sale/automating-terminal-management/terminal-actions-api#when-actions-take-effect) after the specified date and time in the time zone of the terminal. An empty value causes the action to be sent as soon as possible: at the next maintenance call.
* The date and time when the action should happen. Format: [RFC 3339](https://www.rfc-editor.org/rfc/rfc3339), but without the **Z** before the time offset. For example, **2021-11-15T12:16:21+0100** The action is sent with the first [maintenance call](https://docs.adyen.com/point-of-sale/automating-terminal-management/terminal-actions-api#when-actions-take-effect) after the specified date and time in the time zone of the terminal. An empty value causes the action to be sent as soon as possible: at the next maintenance call.
*
* @param scheduledAt
*/
Original file line number Diff line number Diff line change
@@ -145,10 +145,10 @@ public ScheduleTerminalActionsResponse scheduledAt(String scheduledAt) {
}

/**
* The date and time when the action should happen. Format: [RFC 3339](https://www.rfc-editor.org/rfc/rfc3339), but without the **Z** before the time offset. For example, **2021-11-15T12:16:21+01:00** The action is sent with the first [maintenance call](https://docs.adyen.com/point-of-sale/automating-terminal-management/terminal-actions-api#when-actions-take-effect) after the specified date and time in the time zone of the terminal. An empty value causes the action to be sent as soon as possible: at the next maintenance call.
* The date and time when the action should happen. Format: [RFC 3339](https://www.rfc-editor.org/rfc/rfc3339), but without the **Z** before the time offset. For example, **2021-11-15T12:16:21+0100** The action is sent with the first [maintenance call](https://docs.adyen.com/point-of-sale/automating-terminal-management/terminal-actions-api#when-actions-take-effect) after the specified date and time in the time zone of the terminal. An empty value causes the action to be sent as soon as possible: at the next maintenance call.
* @return scheduledAt
**/
@ApiModelProperty(value = "The date and time when the action should happen. Format: [RFC 3339](https://www.rfc-editor.org/rfc/rfc3339), but without the **Z** before the time offset. For example, **2021-11-15T12:16:21+01:00** The action is sent with the first [maintenance call](https://docs.adyen.com/point-of-sale/automating-terminal-management/terminal-actions-api#when-actions-take-effect) after the specified date and time in the time zone of the terminal. An empty value causes the action to be sent as soon as possible: at the next maintenance call.")
@ApiModelProperty(value = "The date and time when the action should happen. Format: [RFC 3339](https://www.rfc-editor.org/rfc/rfc3339), but without the **Z** before the time offset. For example, **2021-11-15T12:16:21+0100** The action is sent with the first [maintenance call](https://docs.adyen.com/point-of-sale/automating-terminal-management/terminal-actions-api#when-actions-take-effect) after the specified date and time in the time zone of the terminal. An empty value causes the action to be sent as soon as possible: at the next maintenance call.")
@JsonProperty(JSON_PROPERTY_SCHEDULED_AT)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

@@ -158,7 +158,7 @@ public String getScheduledAt() {


/**
* The date and time when the action should happen. Format: [RFC 3339](https://www.rfc-editor.org/rfc/rfc3339), but without the **Z** before the time offset. For example, **2021-11-15T12:16:21+01:00** The action is sent with the first [maintenance call](https://docs.adyen.com/point-of-sale/automating-terminal-management/terminal-actions-api#when-actions-take-effect) after the specified date and time in the time zone of the terminal. An empty value causes the action to be sent as soon as possible: at the next maintenance call.
* The date and time when the action should happen. Format: [RFC 3339](https://www.rfc-editor.org/rfc/rfc3339), but without the **Z** before the time offset. For example, **2021-11-15T12:16:21+0100** The action is sent with the first [maintenance call](https://docs.adyen.com/point-of-sale/automating-terminal-management/terminal-actions-api#when-actions-take-effect) after the specified date and time in the time zone of the terminal. An empty value causes the action to be sent as soon as possible: at the next maintenance call.
*
* @param scheduledAt
*/
Original file line number Diff line number Diff line change
@@ -70,10 +70,10 @@ public TerminalOrderRequest billingEntityId(String billingEntityId) {
}

/**
* The identification of the billing entity to use for the order.
* The identification of the billing entity to use for the order. &gt; When ordering products in Brazil, you do not need to include the &#x60;billingEntityId&#x60; in the request.
* @return billingEntityId
**/
@ApiModelProperty(value = "The identification of the billing entity to use for the order.")
@ApiModelProperty(value = "The identification of the billing entity to use for the order. > When ordering products in Brazil, you do not need to include the `billingEntityId` in the request.")
@JsonProperty(JSON_PROPERTY_BILLING_ENTITY_ID)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

@@ -83,7 +83,7 @@ public String getBillingEntityId() {


/**
* The identification of the billing entity to use for the order.
* The identification of the billing entity to use for the order. &gt; When ordering products in Brazil, you do not need to include the &#x60;billingEntityId&#x60; in the request.
*
* @param billingEntityId
*/
70 changes: 60 additions & 10 deletions src/main/java/com/adyen/model/payment/Installments.java
Original file line number Diff line number Diff line change
@@ -31,18 +31,36 @@
* Installments
*/
@JsonPropertyOrder({
Installments.JSON_PROPERTY_EXTRA,
Installments.JSON_PROPERTY_PLAN,
Installments.JSON_PROPERTY_VALUE
})

public class Installments {
public static final String JSON_PROPERTY_EXTRA = "extra";
private Integer extra;

/**
* The installment plan, used for [card installments in Japan](https://docs.adyen.com/payment-methods/cards/credit-card-installments#make-a-payment-japan). By default, this is set to **regular**. Possible values: * **regular** * **revolving**
* The installment plan, used for [card installments in Japan](https://docs.adyen.com/payment-methods/cards/credit-card-installments#make-a-payment-japan). and [Mexico](https://docs.adyen.com/payment-methods/cards/credit-card-installments/#getting-paid-mexico). By default, this is set to **regular**.
*/
public enum PlanEnum {
BUYNOW_PAYLATER("buynow_paylater"),

INTERES_REFUND_PRCTG("interes_refund_prctg"),

INTEREST_BONUS("interest_bonus"),

NOINTERES_REFUND_PRCTG("nointeres_refund_prctg"),

NOINTEREST_BONUS("nointerest_bonus"),

REFUND_PRCTG("refund_prctg"),

REGULAR("regular"),

REVOLVING("revolving");
REVOLVING("revolving"),

WITH_INTEREST("with_interest");

private String value;

@@ -80,16 +98,46 @@ public static PlanEnum fromValue(String value) {
public Installments() {
}

public Installments extra(Integer extra) {
this.extra = extra;
return this;
}

/**
* Defines the bonus percentage, refund percentage or if the transaction is Buy now Pay later. Used for [card installments in Mexico](https://docs.adyen.com/payment-methods/cards/credit-card-installments/#getting-paid-mexico)
* @return extra
**/
@ApiModelProperty(value = "Defines the bonus percentage, refund percentage or if the transaction is Buy now Pay later. Used for [card installments in Mexico](https://docs.adyen.com/payment-methods/cards/credit-card-installments/#getting-paid-mexico) ")
@JsonProperty(JSON_PROPERTY_EXTRA)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

public Integer getExtra() {
return extra;
}


/**
* Defines the bonus percentage, refund percentage or if the transaction is Buy now Pay later. Used for [card installments in Mexico](https://docs.adyen.com/payment-methods/cards/credit-card-installments/#getting-paid-mexico)
*
* @param extra
*/
@JsonProperty(JSON_PROPERTY_EXTRA)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setExtra(Integer extra) {
this.extra = extra;
}


public Installments plan(PlanEnum plan) {
this.plan = plan;
return this;
}

/**
* The installment plan, used for [card installments in Japan](https://docs.adyen.com/payment-methods/cards/credit-card-installments#make-a-payment-japan). By default, this is set to **regular**. Possible values: * **regular** * **revolving**
* The installment plan, used for [card installments in Japan](https://docs.adyen.com/payment-methods/cards/credit-card-installments#make-a-payment-japan). and [Mexico](https://docs.adyen.com/payment-methods/cards/credit-card-installments/#getting-paid-mexico). By default, this is set to **regular**.
* @return plan
**/
@ApiModelProperty(value = "The installment plan, used for [card installments in Japan](https://docs.adyen.com/payment-methods/cards/credit-card-installments#make-a-payment-japan). By default, this is set to **regular**. Possible values: * **regular** * **revolving** ")
@ApiModelProperty(value = "The installment plan, used for [card installments in Japan](https://docs.adyen.com/payment-methods/cards/credit-card-installments#make-a-payment-japan). and [Mexico](https://docs.adyen.com/payment-methods/cards/credit-card-installments/#getting-paid-mexico). By default, this is set to **regular**. ")
@JsonProperty(JSON_PROPERTY_PLAN)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

@@ -99,7 +147,7 @@ public PlanEnum getPlan() {


/**
* The installment plan, used for [card installments in Japan](https://docs.adyen.com/payment-methods/cards/credit-card-installments#make-a-payment-japan). By default, this is set to **regular**. Possible values: * **regular** * **revolving**
* The installment plan, used for [card installments in Japan](https://docs.adyen.com/payment-methods/cards/credit-card-installments#make-a-payment-japan). and [Mexico](https://docs.adyen.com/payment-methods/cards/credit-card-installments/#getting-paid-mexico). By default, this is set to **regular**.
*
* @param plan
*/
@@ -116,10 +164,10 @@ public Installments value(Integer value) {
}

/**
* Defines the number of installments. Its value needs to be greater than zero. Usually, the maximum allowed number of installments is capped. For example, it may not be possible to split a payment in more than 24 installments. The acquirer sets this upper limit, so its value may vary.
* Defines the number of installments. Usually, the maximum allowed number of installments is capped. For example, it may not be possible to split a payment in more than 24 installments. The acquirer sets this upper limit, so its value may vary. This value can be zero for Installments processed in Mexico.
* @return value
**/
@ApiModelProperty(required = true, value = "Defines the number of installments. Its value needs to be greater than zero. Usually, the maximum allowed number of installments is capped. For example, it may not be possible to split a payment in more than 24 installments. The acquirer sets this upper limit, so its value may vary.")
@ApiModelProperty(required = true, value = "Defines the number of installments. Usually, the maximum allowed number of installments is capped. For example, it may not be possible to split a payment in more than 24 installments. The acquirer sets this upper limit, so its value may vary. This value can be zero for Installments processed in Mexico.")
@JsonProperty(JSON_PROPERTY_VALUE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

@@ -129,7 +177,7 @@ public Integer getValue() {


/**
* Defines the number of installments. Its value needs to be greater than zero. Usually, the maximum allowed number of installments is capped. For example, it may not be possible to split a payment in more than 24 installments. The acquirer sets this upper limit, so its value may vary.
* Defines the number of installments. Usually, the maximum allowed number of installments is capped. For example, it may not be possible to split a payment in more than 24 installments. The acquirer sets this upper limit, so its value may vary. This value can be zero for Installments processed in Mexico.
*
* @param value
*/
@@ -152,19 +200,21 @@ public boolean equals(Object o) {
return false;
}
Installments installments = (Installments) o;
return Objects.equals(this.plan, installments.plan) &&
return Objects.equals(this.extra, installments.extra) &&
Objects.equals(this.plan, installments.plan) &&
Objects.equals(this.value, installments.value);
}

@Override
public int hashCode() {
return Objects.hash(plan, value);
return Objects.hash(extra, plan, value);
}

@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class Installments {\n");
sb.append(" extra: ").append(toIndentedString(extra)).append("\n");
sb.append(" plan: ").append(toIndentedString(plan)).append("\n");
sb.append(" value: ").append(toIndentedString(value)).append("\n");
sb.append("}");

0 comments on commit 097c197

Please sign in to comment.