diff --git a/sdk-generation-log/management.json b/sdk-generation-log/management.json index 27b9ebf7c..0ec259b2a 100644 --- a/sdk-generation-log/management.json +++ b/sdk-generation-log/management.json @@ -1,8 +1,8 @@ { "service": "management", "project": "java", - "generatedAt": "2026-07-21T13:17:05Z", - "openapiCommitSha": "c2ff0637d25d1c34aa1b19113e1b4e5eaa289960", - "automationCommitSha": "0c108bd8050cf480d2710b78b770afdfbdd89397", - "libraryCommitSha": "eebe7978ae86e44506c5a2dc292a119d58212d88" + "generatedAt": "2026-11-09T15:34:51Z", + "openapiCommitSha": "d449f090b9a4842b63b562cd057fe12dfbf4bcad", + "automationCommitSha": "ae7e57613c3a29391a4adb4ff02e9ddda4611b16", + "libraryCommitSha": "a0311148dd88e802816e5e63c9cea41df2276cd3" } diff --git a/src/main/java/com/adyen/model/management/AccelInfo.java b/src/main/java/com/adyen/model/management/AccelInfo.java index 669f93e46..c4833074b 100644 --- a/src/main/java/com/adyen/model/management/AccelInfo.java +++ b/src/main/java/com/adyen/model/management/AccelInfo.java @@ -30,12 +30,13 @@ }) public class AccelInfo { /** - * The type of transactions processed over this payment method. Allowed values: - **pos** for - * in-person payments. - **billpay** for subscription payments, both the initial payment and the - * later recurring payments. These transactions have `recurringProcessingModel` - * **Subscription**. - **ecom** for all other card not present transactions. This includes - * non-recurring transactions and transactions with `recurringProcessingModel` - * **CardOnFile** or **UnscheduledCardOnFile**. + * The type of transactions processed over this payment method. The recommended usage is to not + * specify a processing type. We then set up the payment method to process all transaction types. + * Allowed values: - **pos** for in-person payments. - **billpay** for subscription payments, both + * the initial payment and the later recurring payments. These transactions have + * `recurringProcessingModel` **Subscription**. - **ecom** for all other card not + * present transactions. This includes non-recurring transactions and transactions with + * `recurringProcessingModel` **CardOnFile** or **UnscheduledCardOnFile**. */ public enum ProcessingTypeEnum { BILLPAY(String.valueOf("billpay")), @@ -100,19 +101,22 @@ public static ProcessingTypeEnum fromValue(String value) { public AccelInfo() {} /** - * The type of transactions processed over this payment method. Allowed values: - **pos** for - * in-person payments. - **billpay** for subscription payments, both the initial payment and the - * later recurring payments. These transactions have `recurringProcessingModel` - * **Subscription**. - **ecom** for all other card not present transactions. This includes - * non-recurring transactions and transactions with `recurringProcessingModel` - * **CardOnFile** or **UnscheduledCardOnFile**. + * The type of transactions processed over this payment method. The recommended usage is to not + * specify a processing type. We then set up the payment method to process all transaction types. + * Allowed values: - **pos** for in-person payments. - **billpay** for subscription payments, both + * the initial payment and the later recurring payments. These transactions have + * `recurringProcessingModel` **Subscription**. - **ecom** for all other card not + * present transactions. This includes non-recurring transactions and transactions with + * `recurringProcessingModel` **CardOnFile** or **UnscheduledCardOnFile**. * - * @param processingType The type of transactions processed over this payment method. Allowed - * values: - **pos** for in-person payments. - **billpay** for subscription payments, both the - * initial payment and the later recurring payments. These transactions have - * `recurringProcessingModel` **Subscription**. - **ecom** for all other card not - * present transactions. This includes non-recurring transactions and transactions with - * `recurringProcessingModel` **CardOnFile** or **UnscheduledCardOnFile**. + * @param processingType The type of transactions processed over this payment method. The + * recommended usage is to not specify a processing type. We then set up the payment method to + * process all transaction types. Allowed values: - **pos** for in-person payments. - + * **billpay** for subscription payments, both the initial payment and the later recurring + * payments. These transactions have `recurringProcessingModel` **Subscription**. - + * **ecom** for all other card not present transactions. This includes non-recurring + * transactions and transactions with `recurringProcessingModel` **CardOnFile** or + * **UnscheduledCardOnFile**. * @return the current {@code AccelInfo} instance, allowing for method chaining */ public AccelInfo processingType(ProcessingTypeEnum processingType) { @@ -122,19 +126,22 @@ public AccelInfo processingType(ProcessingTypeEnum processingType) { } /** - * The type of transactions processed over this payment method. Allowed values: - **pos** for - * in-person payments. - **billpay** for subscription payments, both the initial payment and the - * later recurring payments. These transactions have `recurringProcessingModel` - * **Subscription**. - **ecom** for all other card not present transactions. This includes - * non-recurring transactions and transactions with `recurringProcessingModel` - * **CardOnFile** or **UnscheduledCardOnFile**. + * The type of transactions processed over this payment method. The recommended usage is to not + * specify a processing type. We then set up the payment method to process all transaction types. + * Allowed values: - **pos** for in-person payments. - **billpay** for subscription payments, both + * the initial payment and the later recurring payments. These transactions have + * `recurringProcessingModel` **Subscription**. - **ecom** for all other card not + * present transactions. This includes non-recurring transactions and transactions with + * `recurringProcessingModel` **CardOnFile** or **UnscheduledCardOnFile**. * - * @return processingType The type of transactions processed over this payment method. Allowed - * values: - **pos** for in-person payments. - **billpay** for subscription payments, both the - * initial payment and the later recurring payments. These transactions have - * `recurringProcessingModel` **Subscription**. - **ecom** for all other card not - * present transactions. This includes non-recurring transactions and transactions with - * `recurringProcessingModel` **CardOnFile** or **UnscheduledCardOnFile**. + * @return processingType The type of transactions processed over this payment method. The + * recommended usage is to not specify a processing type. We then set up the payment method to + * process all transaction types. Allowed values: - **pos** for in-person payments. - + * **billpay** for subscription payments, both the initial payment and the later recurring + * payments. These transactions have `recurringProcessingModel` **Subscription**. - + * **ecom** for all other card not present transactions. This includes non-recurring + * transactions and transactions with `recurringProcessingModel` **CardOnFile** or + * **UnscheduledCardOnFile**. */ @JsonProperty(JSON_PROPERTY_PROCESSING_TYPE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -143,19 +150,22 @@ public ProcessingTypeEnum getProcessingType() { } /** - * The type of transactions processed over this payment method. Allowed values: - **pos** for - * in-person payments. - **billpay** for subscription payments, both the initial payment and the - * later recurring payments. These transactions have `recurringProcessingModel` - * **Subscription**. - **ecom** for all other card not present transactions. This includes - * non-recurring transactions and transactions with `recurringProcessingModel` - * **CardOnFile** or **UnscheduledCardOnFile**. + * The type of transactions processed over this payment method. The recommended usage is to not + * specify a processing type. We then set up the payment method to process all transaction types. + * Allowed values: - **pos** for in-person payments. - **billpay** for subscription payments, both + * the initial payment and the later recurring payments. These transactions have + * `recurringProcessingModel` **Subscription**. - **ecom** for all other card not + * present transactions. This includes non-recurring transactions and transactions with + * `recurringProcessingModel` **CardOnFile** or **UnscheduledCardOnFile**. * - * @param processingType The type of transactions processed over this payment method. Allowed - * values: - **pos** for in-person payments. - **billpay** for subscription payments, both the - * initial payment and the later recurring payments. These transactions have - * `recurringProcessingModel` **Subscription**. - **ecom** for all other card not - * present transactions. This includes non-recurring transactions and transactions with - * `recurringProcessingModel` **CardOnFile** or **UnscheduledCardOnFile**. + * @param processingType The type of transactions processed over this payment method. The + * recommended usage is to not specify a processing type. We then set up the payment method to + * process all transaction types. Allowed values: - **pos** for in-person payments. - + * **billpay** for subscription payments, both the initial payment and the later recurring + * payments. These transactions have `recurringProcessingModel` **Subscription**. - + * **ecom** for all other card not present transactions. This includes non-recurring + * transactions and transactions with `recurringProcessingModel` **CardOnFile** or + * **UnscheduledCardOnFile**. */ @JsonProperty(JSON_PROPERTY_PROCESSING_TYPE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) diff --git a/src/main/java/com/adyen/model/management/AccelResponseInfo.java b/src/main/java/com/adyen/model/management/AccelResponseInfo.java index 921ffde19..6eed4bf25 100644 --- a/src/main/java/com/adyen/model/management/AccelResponseInfo.java +++ b/src/main/java/com/adyen/model/management/AccelResponseInfo.java @@ -25,10 +25,65 @@ /** AccelResponseInfo */ @JsonPropertyOrder({ + AccelResponseInfo.JSON_PROPERTY_NETWORK_PROCESSING_MODE, AccelResponseInfo.JSON_PROPERTY_PROCESSING_TYPE, AccelResponseInfo.JSON_PROPERTY_TRANSACTION_DESCRIPTION }) public class AccelResponseInfo { + /** + * Indicates the processing flow for the payment method. Possible values: - **auth**: If you have + * not [configured automatic + * capture](https://docs.adyen.com/online-payments/capture#types-of-capture) for the transaction, + * you must manually capture the funds. - **sale**: You do not need to separately capture the + * funds, because capture happens automatically as part of the transaction, together with + * authorization. + */ + public enum NetworkProcessingModeEnum { + AUTH(String.valueOf("auth")), + + SALE(String.valueOf("sale")); + + private static final Logger LOG = Logger.getLogger(NetworkProcessingModeEnum.class.getName()); + + private String value; + + NetworkProcessingModeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static NetworkProcessingModeEnum fromValue(String value) { + for (NetworkProcessingModeEnum b : NetworkProcessingModeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + // handling unexpected value + LOG.warning( + "NetworkProcessingModeEnum: unexpected enum value '" + + value + + "' - Supported values are " + + Arrays.toString(NetworkProcessingModeEnum.values())); + return null; + } + } + + public static final String JSON_PROPERTY_NETWORK_PROCESSING_MODE = "networkProcessingMode"; + private NetworkProcessingModeEnum networkProcessingMode; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetNetworkProcessingMode = false; + /** * The type of transactions processed over this payment method. Allowed values: - **pos** for * in-person payments. - **billpay** for subscription payments, both the initial payment and the @@ -99,6 +154,71 @@ public static ProcessingTypeEnum fromValue(String value) { public AccelResponseInfo() {} + /** + * Indicates the processing flow for the payment method. Possible values: - **auth**: If you have + * not [configured automatic + * capture](https://docs.adyen.com/online-payments/capture#types-of-capture) for the transaction, + * you must manually capture the funds. - **sale**: You do not need to separately capture the + * funds, because capture happens automatically as part of the transaction, together with + * authorization. + * + * @param networkProcessingMode Indicates the processing flow for the payment method. Possible + * values: - **auth**: If you have not [configured automatic + * capture](https://docs.adyen.com/online-payments/capture#types-of-capture) for the + * transaction, you must manually capture the funds. - **sale**: You do not need to separately + * capture the funds, because capture happens automatically as part of the transaction, + * together with authorization. + * @return the current {@code AccelResponseInfo} instance, allowing for method chaining + */ + public AccelResponseInfo networkProcessingMode(NetworkProcessingModeEnum networkProcessingMode) { + this.networkProcessingMode = networkProcessingMode; + isSetNetworkProcessingMode = true; // mark as set + return this; + } + + /** + * Indicates the processing flow for the payment method. Possible values: - **auth**: If you have + * not [configured automatic + * capture](https://docs.adyen.com/online-payments/capture#types-of-capture) for the transaction, + * you must manually capture the funds. - **sale**: You do not need to separately capture the + * funds, because capture happens automatically as part of the transaction, together with + * authorization. + * + * @return networkProcessingMode Indicates the processing flow for the payment method. Possible + * values: - **auth**: If you have not [configured automatic + * capture](https://docs.adyen.com/online-payments/capture#types-of-capture) for the + * transaction, you must manually capture the funds. - **sale**: You do not need to separately + * capture the funds, because capture happens automatically as part of the transaction, + * together with authorization. + */ + @JsonProperty(JSON_PROPERTY_NETWORK_PROCESSING_MODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public NetworkProcessingModeEnum getNetworkProcessingMode() { + return networkProcessingMode; + } + + /** + * Indicates the processing flow for the payment method. Possible values: - **auth**: If you have + * not [configured automatic + * capture](https://docs.adyen.com/online-payments/capture#types-of-capture) for the transaction, + * you must manually capture the funds. - **sale**: You do not need to separately capture the + * funds, because capture happens automatically as part of the transaction, together with + * authorization. + * + * @param networkProcessingMode Indicates the processing flow for the payment method. Possible + * values: - **auth**: If you have not [configured automatic + * capture](https://docs.adyen.com/online-payments/capture#types-of-capture) for the + * transaction, you must manually capture the funds. - **sale**: You do not need to separately + * capture the funds, because capture happens automatically as part of the transaction, + * together with authorization. + */ + @JsonProperty(JSON_PROPERTY_NETWORK_PROCESSING_MODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setNetworkProcessingMode(NetworkProcessingModeEnum networkProcessingMode) { + this.networkProcessingMode = networkProcessingMode; + isSetNetworkProcessingMode = true; // mark as set + } + /** * The type of transactions processed over this payment method. Allowed values: - **pos** for * in-person payments. - **billpay** for subscription payments, both the initial payment and the @@ -230,7 +350,10 @@ public boolean equals(Object o) { return false; } AccelResponseInfo accelResponseInfo = (AccelResponseInfo) o; - return Objects.equals(this.processingType, accelResponseInfo.processingType) + return Objects.equals(this.networkProcessingMode, accelResponseInfo.networkProcessingMode) + && Objects.equals( + this.isSetNetworkProcessingMode, accelResponseInfo.isSetNetworkProcessingMode) + && Objects.equals(this.processingType, accelResponseInfo.processingType) && Objects.equals(this.isSetProcessingType, accelResponseInfo.isSetProcessingType) && Objects.equals(this.transactionDescription, accelResponseInfo.transactionDescription) && Objects.equals( @@ -240,13 +363,21 @@ public boolean equals(Object o) { @Override public int hashCode() { return Objects.hash( - processingType, isSetProcessingType, transactionDescription, isSetTransactionDescription); + networkProcessingMode, + isSetNetworkProcessingMode, + processingType, + isSetProcessingType, + transactionDescription, + isSetTransactionDescription); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class AccelResponseInfo {\n"); + sb.append(" networkProcessingMode: ") + .append(toIndentedString(networkProcessingMode)) + .append("\n"); sb.append(" processingType: ").append(toIndentedString(processingType)).append("\n"); sb.append(" transactionDescription: ") .append(toIndentedString(transactionDescription)) @@ -275,6 +406,9 @@ public Map getExplicitNulls() { Map nulls = new HashMap<>(); + if (isSetNetworkProcessingMode) { + addIfNull(nulls, JSON_PROPERTY_NETWORK_PROCESSING_MODE, this.networkProcessingMode); + } if (isSetProcessingType) { addIfNull(nulls, JSON_PROPERTY_PROCESSING_TYPE, this.processingType); } diff --git a/src/main/java/com/adyen/model/management/AlipayPlusInfo.java b/src/main/java/com/adyen/model/management/AlipayPlusInfo.java index 3ab61895d..9b77acf61 100644 --- a/src/main/java/com/adyen/model/management/AlipayPlusInfo.java +++ b/src/main/java/com/adyen/model/management/AlipayPlusInfo.java @@ -20,8 +20,32 @@ import java.util.*; /** AlipayPlusInfo */ -@JsonPropertyOrder({AlipayPlusInfo.JSON_PROPERTY_SETTLEMENT_CURRENCY_CODE}) +@JsonPropertyOrder({ + AlipayPlusInfo.JSON_PROPERTY_BRANCH_NAME, + AlipayPlusInfo.JSON_PROPERTY_MERCHANT_MOBILE_APP_NAME, + AlipayPlusInfo.JSON_PROPERTY_PRODUCT_SERVICE_DESCRIPTION, + AlipayPlusInfo.JSON_PROPERTY_SETTLEMENT_CURRENCY_CODE +}) public class AlipayPlusInfo { + public static final String JSON_PROPERTY_BRANCH_NAME = "branchName"; + private String branchName; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetBranchName = false; + + public static final String JSON_PROPERTY_MERCHANT_MOBILE_APP_NAME = "merchantMobileAppName"; + private String merchantMobileAppName; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetMerchantMobileAppName = false; + + public static final String JSON_PROPERTY_PRODUCT_SERVICE_DESCRIPTION = + "productServiceDescription"; + private String productServiceDescription; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetProductServiceDescription = false; + public static final String JSON_PROPERTY_SETTLEMENT_CURRENCY_CODE = "settlementCurrencyCode"; private String settlementCurrencyCode; @@ -36,6 +60,114 @@ public class AlipayPlusInfo { public AlipayPlusInfo() {} + /** + * The name of the company branch. Required for TrueMoney. + * + * @param branchName The name of the company branch. Required for TrueMoney. + * @return the current {@code AlipayPlusInfo} instance, allowing for method chaining + */ + public AlipayPlusInfo branchName(String branchName) { + this.branchName = branchName; + isSetBranchName = true; // mark as set + return this; + } + + /** + * The name of the company branch. Required for TrueMoney. + * + * @return branchName The name of the company branch. Required for TrueMoney. + */ + @JsonProperty(JSON_PROPERTY_BRANCH_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getBranchName() { + return branchName; + } + + /** + * The name of the company branch. Required for TrueMoney. + * + * @param branchName The name of the company branch. Required for TrueMoney. + */ + @JsonProperty(JSON_PROPERTY_BRANCH_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setBranchName(String branchName) { + this.branchName = branchName; + isSetBranchName = true; // mark as set + } + + /** + * The name of your mobile app. Required for TrueMoney. + * + * @param merchantMobileAppName The name of your mobile app. Required for TrueMoney. + * @return the current {@code AlipayPlusInfo} instance, allowing for method chaining + */ + public AlipayPlusInfo merchantMobileAppName(String merchantMobileAppName) { + this.merchantMobileAppName = merchantMobileAppName; + isSetMerchantMobileAppName = true; // mark as set + return this; + } + + /** + * The name of your mobile app. Required for TrueMoney. + * + * @return merchantMobileAppName The name of your mobile app. Required for TrueMoney. + */ + @JsonProperty(JSON_PROPERTY_MERCHANT_MOBILE_APP_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getMerchantMobileAppName() { + return merchantMobileAppName; + } + + /** + * The name of your mobile app. Required for TrueMoney. + * + * @param merchantMobileAppName The name of your mobile app. Required for TrueMoney. + */ + @JsonProperty(JSON_PROPERTY_MERCHANT_MOBILE_APP_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMerchantMobileAppName(String merchantMobileAppName) { + this.merchantMobileAppName = merchantMobileAppName; + isSetMerchantMobileAppName = true; // mark as set + } + + /** + * The description of the product or service. Required for TrueMoney. + * + * @param productServiceDescription The description of the product or service. Required for + * TrueMoney. + * @return the current {@code AlipayPlusInfo} instance, allowing for method chaining + */ + public AlipayPlusInfo productServiceDescription(String productServiceDescription) { + this.productServiceDescription = productServiceDescription; + isSetProductServiceDescription = true; // mark as set + return this; + } + + /** + * The description of the product or service. Required for TrueMoney. + * + * @return productServiceDescription The description of the product or service. Required for + * TrueMoney. + */ + @JsonProperty(JSON_PROPERTY_PRODUCT_SERVICE_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getProductServiceDescription() { + return productServiceDescription; + } + + /** + * The description of the product or service. Required for TrueMoney. + * + * @param productServiceDescription The description of the product or service. Required for + * TrueMoney. + */ + @JsonProperty(JSON_PROPERTY_PRODUCT_SERVICE_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setProductServiceDescription(String productServiceDescription) { + this.productServiceDescription = productServiceDescription; + isSetProductServiceDescription = true; // mark as set + } + /** * The currency used for settlement. Defaults to USD. * @@ -101,20 +233,43 @@ public boolean equals(Object o) { return false; } AlipayPlusInfo alipayPlusInfo = (AlipayPlusInfo) o; - return Objects.equals(this.settlementCurrencyCode, alipayPlusInfo.settlementCurrencyCode) + return Objects.equals(this.branchName, alipayPlusInfo.branchName) + && Objects.equals(this.isSetBranchName, alipayPlusInfo.isSetBranchName) + && Objects.equals(this.merchantMobileAppName, alipayPlusInfo.merchantMobileAppName) + && Objects.equals( + this.isSetMerchantMobileAppName, alipayPlusInfo.isSetMerchantMobileAppName) + && Objects.equals(this.productServiceDescription, alipayPlusInfo.productServiceDescription) + && Objects.equals( + this.isSetProductServiceDescription, alipayPlusInfo.isSetProductServiceDescription) + && Objects.equals(this.settlementCurrencyCode, alipayPlusInfo.settlementCurrencyCode) && Objects.equals( this.isSetSettlementCurrencyCode, alipayPlusInfo.isSetSettlementCurrencyCode); } @Override public int hashCode() { - return Objects.hash(settlementCurrencyCode, isSetSettlementCurrencyCode); + return Objects.hash( + branchName, + isSetBranchName, + merchantMobileAppName, + isSetMerchantMobileAppName, + productServiceDescription, + isSetProductServiceDescription, + settlementCurrencyCode, + isSetSettlementCurrencyCode); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class AlipayPlusInfo {\n"); + sb.append(" branchName: ").append(toIndentedString(branchName)).append("\n"); + sb.append(" merchantMobileAppName: ") + .append(toIndentedString(merchantMobileAppName)) + .append("\n"); + sb.append(" productServiceDescription: ") + .append(toIndentedString(productServiceDescription)) + .append("\n"); sb.append(" settlementCurrencyCode: ") .append(toIndentedString(settlementCurrencyCode)) .append("\n"); @@ -142,6 +297,15 @@ public Map getExplicitNulls() { Map nulls = new HashMap<>(); + if (isSetBranchName) { + addIfNull(nulls, JSON_PROPERTY_BRANCH_NAME, this.branchName); + } + if (isSetMerchantMobileAppName) { + addIfNull(nulls, JSON_PROPERTY_MERCHANT_MOBILE_APP_NAME, this.merchantMobileAppName); + } + if (isSetProductServiceDescription) { + addIfNull(nulls, JSON_PROPERTY_PRODUCT_SERVICE_DESCRIPTION, this.productServiceDescription); + } if (isSetSettlementCurrencyCode) { addIfNull(nulls, JSON_PROPERTY_SETTLEMENT_CURRENCY_CODE, this.settlementCurrencyCode); } diff --git a/src/main/java/com/adyen/model/management/AncvInfo.java b/src/main/java/com/adyen/model/management/AncvInfo.java new file mode 100644 index 000000000..0ee4f06d2 --- /dev/null +++ b/src/main/java/com/adyen/model/management/AncvInfo.java @@ -0,0 +1,193 @@ +/* + * 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 com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.core.JsonProcessingException; +import java.util.*; + +/** AncvInfo */ +@JsonPropertyOrder({AncvInfo.JSON_PROPERTY_SHOP_ID}) +public class AncvInfo { + public static final String JSON_PROPERTY_SHOP_ID = "shopId"; + private String shopId; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetShopId = false; + + /** + * Sets whether attributes with null values should be explicitly included in the JSON payload. + * Default is false. + */ + @JsonIgnore private boolean includeNullValues = false; + + public AncvInfo() {} + + /** + * ANCV [Shop + * ID](https://static.ancv.com/ddmc/connect/PTL/PAP_PTL_avec_interm%C3%A9diaire_Raccordement_et_Shop_ID.pdf). + * Format: exactly 8 numeric characters with the first digit set as **1** in the live environment + * and **9** in the test environment. Example: 10000008. + * + * @param shopId ANCV [Shop + * ID](https://static.ancv.com/ddmc/connect/PTL/PAP_PTL_avec_interm%C3%A9diaire_Raccordement_et_Shop_ID.pdf). + * Format: exactly 8 numeric characters with the first digit set as **1** in the live + * environment and **9** in the test environment. Example: 10000008. + * @return the current {@code AncvInfo} instance, allowing for method chaining + */ + public AncvInfo shopId(String shopId) { + this.shopId = shopId; + isSetShopId = true; // mark as set + return this; + } + + /** + * ANCV [Shop + * ID](https://static.ancv.com/ddmc/connect/PTL/PAP_PTL_avec_interm%C3%A9diaire_Raccordement_et_Shop_ID.pdf). + * Format: exactly 8 numeric characters with the first digit set as **1** in the live environment + * and **9** in the test environment. Example: 10000008. + * + * @return shopId ANCV [Shop + * ID](https://static.ancv.com/ddmc/connect/PTL/PAP_PTL_avec_interm%C3%A9diaire_Raccordement_et_Shop_ID.pdf). + * Format: exactly 8 numeric characters with the first digit set as **1** in the live + * environment and **9** in the test environment. Example: 10000008. + */ + @JsonProperty(JSON_PROPERTY_SHOP_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getShopId() { + return shopId; + } + + /** + * ANCV [Shop + * ID](https://static.ancv.com/ddmc/connect/PTL/PAP_PTL_avec_interm%C3%A9diaire_Raccordement_et_Shop_ID.pdf). + * Format: exactly 8 numeric characters with the first digit set as **1** in the live environment + * and **9** in the test environment. Example: 10000008. + * + * @param shopId ANCV [Shop + * ID](https://static.ancv.com/ddmc/connect/PTL/PAP_PTL_avec_interm%C3%A9diaire_Raccordement_et_Shop_ID.pdf). + * Format: exactly 8 numeric characters with the first digit set as **1** in the live + * environment and **9** in the test environment. Example: 10000008. + */ + @JsonProperty(JSON_PROPERTY_SHOP_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setShopId(String shopId) { + this.shopId = shopId; + isSetShopId = true; // mark as set + } + + /** + * Configures whether null values are explicitly serialized in the JSON payload. Default is false. + */ + public AncvInfo includeNullValues(boolean includeNullValues) { + this.includeNullValues = includeNullValues; + return this; + } + + /** Returns whether null values are explicitly serialized in the JSON payload. */ + public boolean isIncludeNullValues() { + return includeNullValues; + } + + /** + * Sets whether null values should be explicitly serialized in the JSON payload. Default is false. + */ + public void setIncludeNullValues(boolean includeNullValues) { + this.includeNullValues = includeNullValues; + } + + /** Return true if this AncvInfo object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AncvInfo ancvInfo = (AncvInfo) o; + return Objects.equals(this.shopId, ancvInfo.shopId) + && Objects.equals(this.isSetShopId, ancvInfo.isSetShopId); + } + + @Override + public int hashCode() { + return Objects.hash(shopId, isSetShopId); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AncvInfo {\n"); + sb.append(" shopId: ").append(toIndentedString(shopId)).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 "); + } + + /** Returns a map of properties to be merged into the JSON payload as explicit null values. */ + @JsonInclude(JsonInclude.Include.ALWAYS) + @JsonAnyGetter + public Map getExplicitNulls() { + if (!this.includeNullValues) { + return Collections.emptyMap(); + } + + Map nulls = new HashMap<>(); + + if (isSetShopId) { + addIfNull(nulls, JSON_PROPERTY_SHOP_ID, this.shopId); + } + + return nulls; + } + + // add to map when value is null + private void addIfNull(Map map, String key, Object value) { + if (value == null) { + map.put(key, null); + } + } + + /** + * Create an instance of AncvInfo given an JSON string + * + * @param jsonString JSON string + * @return An instance of AncvInfo + * @throws JsonProcessingException if the JSON string is invalid with respect to AncvInfo + */ + public static AncvInfo fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, AncvInfo.class); + } + + /** + * Convert an instance of AncvInfo to an JSON string + * + * @return JSON string + */ + public String toJson() throws JsonProcessingException { + return JSON.getMapper().writeValueAsString(this); + } +} diff --git a/src/main/java/com/adyen/model/management/AncvResponseInfo.java b/src/main/java/com/adyen/model/management/AncvResponseInfo.java new file mode 100644 index 000000000..d88aeabfb --- /dev/null +++ b/src/main/java/com/adyen/model/management/AncvResponseInfo.java @@ -0,0 +1,193 @@ +/* + * 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 com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.core.JsonProcessingException; +import java.util.*; + +/** AncvResponseInfo */ +@JsonPropertyOrder({AncvResponseInfo.JSON_PROPERTY_SHOP_ID}) +public class AncvResponseInfo { + public static final String JSON_PROPERTY_SHOP_ID = "shopId"; + private String shopId; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetShopId = false; + + /** + * Sets whether attributes with null values should be explicitly included in the JSON payload. + * Default is false. + */ + @JsonIgnore private boolean includeNullValues = false; + + public AncvResponseInfo() {} + + /** + * ANCV [Shop + * ID](https://static.ancv.com/ddmc/connect/PTL/PAP_PTL_avec_interm%C3%A9diaire_Raccordement_et_Shop_ID.pdf). + * Format: exactly 8 numeric characters with the first digit set as **1** in the live environment + * and **9** in the test environment. Example: 10000008. + * + * @param shopId ANCV [Shop + * ID](https://static.ancv.com/ddmc/connect/PTL/PAP_PTL_avec_interm%C3%A9diaire_Raccordement_et_Shop_ID.pdf). + * Format: exactly 8 numeric characters with the first digit set as **1** in the live + * environment and **9** in the test environment. Example: 10000008. + * @return the current {@code AncvResponseInfo} instance, allowing for method chaining + */ + public AncvResponseInfo shopId(String shopId) { + this.shopId = shopId; + isSetShopId = true; // mark as set + return this; + } + + /** + * ANCV [Shop + * ID](https://static.ancv.com/ddmc/connect/PTL/PAP_PTL_avec_interm%C3%A9diaire_Raccordement_et_Shop_ID.pdf). + * Format: exactly 8 numeric characters with the first digit set as **1** in the live environment + * and **9** in the test environment. Example: 10000008. + * + * @return shopId ANCV [Shop + * ID](https://static.ancv.com/ddmc/connect/PTL/PAP_PTL_avec_interm%C3%A9diaire_Raccordement_et_Shop_ID.pdf). + * Format: exactly 8 numeric characters with the first digit set as **1** in the live + * environment and **9** in the test environment. Example: 10000008. + */ + @JsonProperty(JSON_PROPERTY_SHOP_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getShopId() { + return shopId; + } + + /** + * ANCV [Shop + * ID](https://static.ancv.com/ddmc/connect/PTL/PAP_PTL_avec_interm%C3%A9diaire_Raccordement_et_Shop_ID.pdf). + * Format: exactly 8 numeric characters with the first digit set as **1** in the live environment + * and **9** in the test environment. Example: 10000008. + * + * @param shopId ANCV [Shop + * ID](https://static.ancv.com/ddmc/connect/PTL/PAP_PTL_avec_interm%C3%A9diaire_Raccordement_et_Shop_ID.pdf). + * Format: exactly 8 numeric characters with the first digit set as **1** in the live + * environment and **9** in the test environment. Example: 10000008. + */ + @JsonProperty(JSON_PROPERTY_SHOP_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setShopId(String shopId) { + this.shopId = shopId; + isSetShopId = true; // mark as set + } + + /** + * Configures whether null values are explicitly serialized in the JSON payload. Default is false. + */ + public AncvResponseInfo includeNullValues(boolean includeNullValues) { + this.includeNullValues = includeNullValues; + return this; + } + + /** Returns whether null values are explicitly serialized in the JSON payload. */ + public boolean isIncludeNullValues() { + return includeNullValues; + } + + /** + * Sets whether null values should be explicitly serialized in the JSON payload. Default is false. + */ + public void setIncludeNullValues(boolean includeNullValues) { + this.includeNullValues = includeNullValues; + } + + /** Return true if this AncvResponseInfo object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AncvResponseInfo ancvResponseInfo = (AncvResponseInfo) o; + return Objects.equals(this.shopId, ancvResponseInfo.shopId) + && Objects.equals(this.isSetShopId, ancvResponseInfo.isSetShopId); + } + + @Override + public int hashCode() { + return Objects.hash(shopId, isSetShopId); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AncvResponseInfo {\n"); + sb.append(" shopId: ").append(toIndentedString(shopId)).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 "); + } + + /** Returns a map of properties to be merged into the JSON payload as explicit null values. */ + @JsonInclude(JsonInclude.Include.ALWAYS) + @JsonAnyGetter + public Map getExplicitNulls() { + if (!this.includeNullValues) { + return Collections.emptyMap(); + } + + Map nulls = new HashMap<>(); + + if (isSetShopId) { + addIfNull(nulls, JSON_PROPERTY_SHOP_ID, this.shopId); + } + + return nulls; + } + + // add to map when value is null + private void addIfNull(Map map, String key, Object value) { + if (value == null) { + map.put(key, null); + } + } + + /** + * Create an instance of AncvResponseInfo given an JSON string + * + * @param jsonString JSON string + * @return An instance of AncvResponseInfo + * @throws JsonProcessingException if the JSON string is invalid with respect to AncvResponseInfo + */ + public static AncvResponseInfo fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, AncvResponseInfo.class); + } + + /** + * Convert an instance of AncvResponseInfo to an JSON string + * + * @return JSON string + */ + public String toJson() throws JsonProcessingException { + return JSON.getMapper().writeValueAsString(this); + } +} diff --git a/src/main/java/com/adyen/model/management/AssociatedPaymentMethod.java b/src/main/java/com/adyen/model/management/AssociatedPaymentMethod.java index 85625dc2d..e9b6d6aa0 100644 --- a/src/main/java/com/adyen/model/management/AssociatedPaymentMethod.java +++ b/src/main/java/com/adyen/model/management/AssociatedPaymentMethod.java @@ -128,9 +128,15 @@ public void setId(String id) { /** * Payment method * [variant](https://docs.adyen.com/development-resources/paymentmethodvariant#management-api). + * For payment method variant **cartebancaire**, method-specific details are returned in the + * [`cartesBancaires`](https://docs.adyen.com/api-explorer/Management/3/post/merchants/(merchantId)/paymentMethodSettings#responses-200-cartesBancaires) + * object. * * @param type Payment method * [variant](https://docs.adyen.com/development-resources/paymentmethodvariant#management-api). + * For payment method variant **cartebancaire**, method-specific details are returned in the + * [`cartesBancaires`](https://docs.adyen.com/api-explorer/Management/3/post/merchants/(merchantId)/paymentMethodSettings#responses-200-cartesBancaires) + * object. * @return the current {@code AssociatedPaymentMethod} instance, allowing for method chaining */ public AssociatedPaymentMethod type(String type) { @@ -142,9 +148,15 @@ public AssociatedPaymentMethod type(String type) { /** * Payment method * [variant](https://docs.adyen.com/development-resources/paymentmethodvariant#management-api). + * For payment method variant **cartebancaire**, method-specific details are returned in the + * [`cartesBancaires`](https://docs.adyen.com/api-explorer/Management/3/post/merchants/(merchantId)/paymentMethodSettings#responses-200-cartesBancaires) + * object. * * @return type Payment method * [variant](https://docs.adyen.com/development-resources/paymentmethodvariant#management-api). + * For payment method variant **cartebancaire**, method-specific details are returned in the + * [`cartesBancaires`](https://docs.adyen.com/api-explorer/Management/3/post/merchants/(merchantId)/paymentMethodSettings#responses-200-cartesBancaires) + * object. */ @JsonProperty(JSON_PROPERTY_TYPE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -155,9 +167,15 @@ public String getType() { /** * Payment method * [variant](https://docs.adyen.com/development-resources/paymentmethodvariant#management-api). + * For payment method variant **cartebancaire**, method-specific details are returned in the + * [`cartesBancaires`](https://docs.adyen.com/api-explorer/Management/3/post/merchants/(merchantId)/paymentMethodSettings#responses-200-cartesBancaires) + * object. * * @param type Payment method * [variant](https://docs.adyen.com/development-resources/paymentmethodvariant#management-api). + * For payment method variant **cartebancaire**, method-specific details are returned in the + * [`cartesBancaires`](https://docs.adyen.com/api-explorer/Management/3/post/merchants/(merchantId)/paymentMethodSettings#responses-200-cartesBancaires) + * object. */ @JsonProperty(JSON_PROPERTY_TYPE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) diff --git a/src/main/java/com/adyen/model/management/BoncardInfo.java b/src/main/java/com/adyen/model/management/BoncardInfo.java new file mode 100644 index 000000000..1b577e9d0 --- /dev/null +++ b/src/main/java/com/adyen/model/management/BoncardInfo.java @@ -0,0 +1,181 @@ +/* + * 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 com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.core.JsonProcessingException; +import java.util.*; + +/** BoncardInfo */ +@JsonPropertyOrder({BoncardInfo.JSON_PROPERTY_TERMINAL_ID}) +public class BoncardInfo { + public static final String JSON_PROPERTY_TERMINAL_ID = "terminalId"; + private String terminalId; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetTerminalId = false; + + /** + * Sets whether attributes with null values should be explicitly included in the JSON payload. + * Default is false. + */ + @JsonIgnore private boolean includeNullValues = false; + + public BoncardInfo() {} + + /** + * The TerminalID that Boncard assigns to the merchant. Format: 6 to 10 alphanumeric characters. + * Example: 5Z6G8PV9. + * + * @param terminalId The TerminalID that Boncard assigns to the merchant. Format: 6 to 10 + * alphanumeric characters. Example: 5Z6G8PV9. + * @return the current {@code BoncardInfo} instance, allowing for method chaining + */ + public BoncardInfo terminalId(String terminalId) { + this.terminalId = terminalId; + isSetTerminalId = true; // mark as set + return this; + } + + /** + * The TerminalID that Boncard assigns to the merchant. Format: 6 to 10 alphanumeric characters. + * Example: 5Z6G8PV9. + * + * @return terminalId The TerminalID that Boncard assigns to the merchant. Format: 6 to 10 + * alphanumeric characters. Example: 5Z6G8PV9. + */ + @JsonProperty(JSON_PROPERTY_TERMINAL_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getTerminalId() { + return terminalId; + } + + /** + * The TerminalID that Boncard assigns to the merchant. Format: 6 to 10 alphanumeric characters. + * Example: 5Z6G8PV9. + * + * @param terminalId The TerminalID that Boncard assigns to the merchant. Format: 6 to 10 + * alphanumeric characters. Example: 5Z6G8PV9. + */ + @JsonProperty(JSON_PROPERTY_TERMINAL_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTerminalId(String terminalId) { + this.terminalId = terminalId; + isSetTerminalId = true; // mark as set + } + + /** + * Configures whether null values are explicitly serialized in the JSON payload. Default is false. + */ + public BoncardInfo includeNullValues(boolean includeNullValues) { + this.includeNullValues = includeNullValues; + return this; + } + + /** Returns whether null values are explicitly serialized in the JSON payload. */ + public boolean isIncludeNullValues() { + return includeNullValues; + } + + /** + * Sets whether null values should be explicitly serialized in the JSON payload. Default is false. + */ + public void setIncludeNullValues(boolean includeNullValues) { + this.includeNullValues = includeNullValues; + } + + /** Return true if this BoncardInfo object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + BoncardInfo boncardInfo = (BoncardInfo) o; + return Objects.equals(this.terminalId, boncardInfo.terminalId) + && Objects.equals(this.isSetTerminalId, boncardInfo.isSetTerminalId); + } + + @Override + public int hashCode() { + return Objects.hash(terminalId, isSetTerminalId); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class BoncardInfo {\n"); + sb.append(" terminalId: ").append(toIndentedString(terminalId)).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 "); + } + + /** Returns a map of properties to be merged into the JSON payload as explicit null values. */ + @JsonInclude(JsonInclude.Include.ALWAYS) + @JsonAnyGetter + public Map getExplicitNulls() { + if (!this.includeNullValues) { + return Collections.emptyMap(); + } + + Map nulls = new HashMap<>(); + + if (isSetTerminalId) { + addIfNull(nulls, JSON_PROPERTY_TERMINAL_ID, this.terminalId); + } + + return nulls; + } + + // add to map when value is null + private void addIfNull(Map map, String key, Object value) { + if (value == null) { + map.put(key, null); + } + } + + /** + * Create an instance of BoncardInfo given an JSON string + * + * @param jsonString JSON string + * @return An instance of BoncardInfo + * @throws JsonProcessingException if the JSON string is invalid with respect to BoncardInfo + */ + public static BoncardInfo fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, BoncardInfo.class); + } + + /** + * Convert an instance of BoncardInfo to an JSON string + * + * @return JSON string + */ + public String toJson() throws JsonProcessingException { + return JSON.getMapper().writeValueAsString(this); + } +} diff --git a/src/main/java/com/adyen/model/management/BoncardResponseInfo.java b/src/main/java/com/adyen/model/management/BoncardResponseInfo.java new file mode 100644 index 000000000..87b4d9c8a --- /dev/null +++ b/src/main/java/com/adyen/model/management/BoncardResponseInfo.java @@ -0,0 +1,182 @@ +/* + * 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 com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.core.JsonProcessingException; +import java.util.*; + +/** BoncardResponseInfo */ +@JsonPropertyOrder({BoncardResponseInfo.JSON_PROPERTY_TERMINAL_ID}) +public class BoncardResponseInfo { + public static final String JSON_PROPERTY_TERMINAL_ID = "terminalId"; + private String terminalId; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetTerminalId = false; + + /** + * Sets whether attributes with null values should be explicitly included in the JSON payload. + * Default is false. + */ + @JsonIgnore private boolean includeNullValues = false; + + public BoncardResponseInfo() {} + + /** + * The TerminalID that Boncard assigns to the merchant. Format: 6 to 10 alphanumeric characters. + * Example: 5Z6G8PV9. + * + * @param terminalId The TerminalID that Boncard assigns to the merchant. Format: 6 to 10 + * alphanumeric characters. Example: 5Z6G8PV9. + * @return the current {@code BoncardResponseInfo} instance, allowing for method chaining + */ + public BoncardResponseInfo terminalId(String terminalId) { + this.terminalId = terminalId; + isSetTerminalId = true; // mark as set + return this; + } + + /** + * The TerminalID that Boncard assigns to the merchant. Format: 6 to 10 alphanumeric characters. + * Example: 5Z6G8PV9. + * + * @return terminalId The TerminalID that Boncard assigns to the merchant. Format: 6 to 10 + * alphanumeric characters. Example: 5Z6G8PV9. + */ + @JsonProperty(JSON_PROPERTY_TERMINAL_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getTerminalId() { + return terminalId; + } + + /** + * The TerminalID that Boncard assigns to the merchant. Format: 6 to 10 alphanumeric characters. + * Example: 5Z6G8PV9. + * + * @param terminalId The TerminalID that Boncard assigns to the merchant. Format: 6 to 10 + * alphanumeric characters. Example: 5Z6G8PV9. + */ + @JsonProperty(JSON_PROPERTY_TERMINAL_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTerminalId(String terminalId) { + this.terminalId = terminalId; + isSetTerminalId = true; // mark as set + } + + /** + * Configures whether null values are explicitly serialized in the JSON payload. Default is false. + */ + public BoncardResponseInfo includeNullValues(boolean includeNullValues) { + this.includeNullValues = includeNullValues; + return this; + } + + /** Returns whether null values are explicitly serialized in the JSON payload. */ + public boolean isIncludeNullValues() { + return includeNullValues; + } + + /** + * Sets whether null values should be explicitly serialized in the JSON payload. Default is false. + */ + public void setIncludeNullValues(boolean includeNullValues) { + this.includeNullValues = includeNullValues; + } + + /** Return true if this BoncardResponseInfo object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + BoncardResponseInfo boncardResponseInfo = (BoncardResponseInfo) o; + return Objects.equals(this.terminalId, boncardResponseInfo.terminalId) + && Objects.equals(this.isSetTerminalId, boncardResponseInfo.isSetTerminalId); + } + + @Override + public int hashCode() { + return Objects.hash(terminalId, isSetTerminalId); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class BoncardResponseInfo {\n"); + sb.append(" terminalId: ").append(toIndentedString(terminalId)).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 "); + } + + /** Returns a map of properties to be merged into the JSON payload as explicit null values. */ + @JsonInclude(JsonInclude.Include.ALWAYS) + @JsonAnyGetter + public Map getExplicitNulls() { + if (!this.includeNullValues) { + return Collections.emptyMap(); + } + + Map nulls = new HashMap<>(); + + if (isSetTerminalId) { + addIfNull(nulls, JSON_PROPERTY_TERMINAL_ID, this.terminalId); + } + + return nulls; + } + + // add to map when value is null + private void addIfNull(Map map, String key, Object value) { + if (value == null) { + map.put(key, null); + } + } + + /** + * Create an instance of BoncardResponseInfo given an JSON string + * + * @param jsonString JSON string + * @return An instance of BoncardResponseInfo + * @throws JsonProcessingException if the JSON string is invalid with respect to + * BoncardResponseInfo + */ + public static BoncardResponseInfo fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, BoncardResponseInfo.class); + } + + /** + * Convert an instance of BoncardResponseInfo to an JSON string + * + * @return JSON string + */ + public String toJson() throws JsonProcessingException { + return JSON.getMapper().writeValueAsString(this); + } +} diff --git a/src/main/java/com/adyen/model/management/BoncardUpdateInfo.java b/src/main/java/com/adyen/model/management/BoncardUpdateInfo.java new file mode 100644 index 000000000..df26e02a2 --- /dev/null +++ b/src/main/java/com/adyen/model/management/BoncardUpdateInfo.java @@ -0,0 +1,181 @@ +/* + * 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 com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.core.JsonProcessingException; +import java.util.*; + +/** BoncardUpdateInfo */ +@JsonPropertyOrder({BoncardUpdateInfo.JSON_PROPERTY_TERMINAL_ID}) +public class BoncardUpdateInfo { + public static final String JSON_PROPERTY_TERMINAL_ID = "terminalId"; + private String terminalId; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetTerminalId = false; + + /** + * Sets whether attributes with null values should be explicitly included in the JSON payload. + * Default is false. + */ + @JsonIgnore private boolean includeNullValues = false; + + public BoncardUpdateInfo() {} + + /** + * The TerminalID that Boncard assigns to the merchant. Format: 6 to 10 alphanumeric characters. + * Example: 5Z6G8PV9. + * + * @param terminalId The TerminalID that Boncard assigns to the merchant. Format: 6 to 10 + * alphanumeric characters. Example: 5Z6G8PV9. + * @return the current {@code BoncardUpdateInfo} instance, allowing for method chaining + */ + public BoncardUpdateInfo terminalId(String terminalId) { + this.terminalId = terminalId; + isSetTerminalId = true; // mark as set + return this; + } + + /** + * The TerminalID that Boncard assigns to the merchant. Format: 6 to 10 alphanumeric characters. + * Example: 5Z6G8PV9. + * + * @return terminalId The TerminalID that Boncard assigns to the merchant. Format: 6 to 10 + * alphanumeric characters. Example: 5Z6G8PV9. + */ + @JsonProperty(JSON_PROPERTY_TERMINAL_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getTerminalId() { + return terminalId; + } + + /** + * The TerminalID that Boncard assigns to the merchant. Format: 6 to 10 alphanumeric characters. + * Example: 5Z6G8PV9. + * + * @param terminalId The TerminalID that Boncard assigns to the merchant. Format: 6 to 10 + * alphanumeric characters. Example: 5Z6G8PV9. + */ + @JsonProperty(JSON_PROPERTY_TERMINAL_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTerminalId(String terminalId) { + this.terminalId = terminalId; + isSetTerminalId = true; // mark as set + } + + /** + * Configures whether null values are explicitly serialized in the JSON payload. Default is false. + */ + public BoncardUpdateInfo includeNullValues(boolean includeNullValues) { + this.includeNullValues = includeNullValues; + return this; + } + + /** Returns whether null values are explicitly serialized in the JSON payload. */ + public boolean isIncludeNullValues() { + return includeNullValues; + } + + /** + * Sets whether null values should be explicitly serialized in the JSON payload. Default is false. + */ + public void setIncludeNullValues(boolean includeNullValues) { + this.includeNullValues = includeNullValues; + } + + /** Return true if this BoncardUpdateInfo object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + BoncardUpdateInfo boncardUpdateInfo = (BoncardUpdateInfo) o; + return Objects.equals(this.terminalId, boncardUpdateInfo.terminalId) + && Objects.equals(this.isSetTerminalId, boncardUpdateInfo.isSetTerminalId); + } + + @Override + public int hashCode() { + return Objects.hash(terminalId, isSetTerminalId); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class BoncardUpdateInfo {\n"); + sb.append(" terminalId: ").append(toIndentedString(terminalId)).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 "); + } + + /** Returns a map of properties to be merged into the JSON payload as explicit null values. */ + @JsonInclude(JsonInclude.Include.ALWAYS) + @JsonAnyGetter + public Map getExplicitNulls() { + if (!this.includeNullValues) { + return Collections.emptyMap(); + } + + Map nulls = new HashMap<>(); + + if (isSetTerminalId) { + addIfNull(nulls, JSON_PROPERTY_TERMINAL_ID, this.terminalId); + } + + return nulls; + } + + // add to map when value is null + private void addIfNull(Map map, String key, Object value) { + if (value == null) { + map.put(key, null); + } + } + + /** + * Create an instance of BoncardUpdateInfo given an JSON string + * + * @param jsonString JSON string + * @return An instance of BoncardUpdateInfo + * @throws JsonProcessingException if the JSON string is invalid with respect to BoncardUpdateInfo + */ + public static BoncardUpdateInfo fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, BoncardUpdateInfo.class); + } + + /** + * Convert an instance of BoncardUpdateInfo to an JSON string + * + * @return JSON string + */ + public String toJson() throws JsonProcessingException { + return JSON.getMapper().writeValueAsString(this); + } +} diff --git a/src/main/java/com/adyen/model/management/CertificateSearchResponse.java b/src/main/java/com/adyen/model/management/CertificateSearchResponse.java new file mode 100644 index 000000000..2991c67df --- /dev/null +++ b/src/main/java/com/adyen/model/management/CertificateSearchResponse.java @@ -0,0 +1,187 @@ +/* + * 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 com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.core.JsonProcessingException; +import java.util.*; +import java.util.ArrayList; +import java.util.List; + +/** CertificateSearchResponse */ +@JsonPropertyOrder({CertificateSearchResponse.JSON_PROPERTY_DATA}) +public class CertificateSearchResponse { + public static final String JSON_PROPERTY_DATA = "data"; + private List data; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetData = false; + + /** + * Sets whether attributes with null values should be explicitly included in the JSON payload. + * Default is false. + */ + @JsonIgnore private boolean includeNullValues = false; + + public CertificateSearchResponse() {} + + /** + * data + * + * @param data + * @return the current {@code CertificateSearchResponse} instance, allowing for method chaining + */ + public CertificateSearchResponse data(List data) { + this.data = data; + isSetData = true; // mark as set + return this; + } + + public CertificateSearchResponse addDataItem(ClientCertificateWithChain dataItem) { + if (this.data == null) { + this.data = new ArrayList<>(); + } + this.data.add(dataItem); + return this; + } + + /** + * Get data + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getData() { + return data; + } + + /** + * data + * + * @param data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setData(List data) { + this.data = data; + isSetData = true; // mark as set + } + + /** + * Configures whether null values are explicitly serialized in the JSON payload. Default is false. + */ + public CertificateSearchResponse includeNullValues(boolean includeNullValues) { + this.includeNullValues = includeNullValues; + return this; + } + + /** Returns whether null values are explicitly serialized in the JSON payload. */ + public boolean isIncludeNullValues() { + return includeNullValues; + } + + /** + * Sets whether null values should be explicitly serialized in the JSON payload. Default is false. + */ + public void setIncludeNullValues(boolean includeNullValues) { + this.includeNullValues = includeNullValues; + } + + /** Return true if this CertificateSearchResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CertificateSearchResponse certificateSearchResponse = (CertificateSearchResponse) o; + return Objects.equals(this.data, certificateSearchResponse.data) + && Objects.equals(this.isSetData, certificateSearchResponse.isSetData); + } + + @Override + public int hashCode() { + return Objects.hash(data, isSetData); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CertificateSearchResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).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 "); + } + + /** Returns a map of properties to be merged into the JSON payload as explicit null values. */ + @JsonInclude(JsonInclude.Include.ALWAYS) + @JsonAnyGetter + public Map getExplicitNulls() { + if (!this.includeNullValues) { + return Collections.emptyMap(); + } + + Map nulls = new HashMap<>(); + + if (isSetData) { + addIfNull(nulls, JSON_PROPERTY_DATA, this.data); + } + + return nulls; + } + + // add to map when value is null + private void addIfNull(Map map, String key, Object value) { + if (value == null) { + map.put(key, null); + } + } + + /** + * Create an instance of CertificateSearchResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of CertificateSearchResponse + * @throws JsonProcessingException if the JSON string is invalid with respect to + * CertificateSearchResponse + */ + public static CertificateSearchResponse fromJson(String jsonString) + throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, CertificateSearchResponse.class); + } + + /** + * Convert an instance of CertificateSearchResponse to an JSON string + * + * @return JSON string + */ + public String toJson() throws JsonProcessingException { + return JSON.getMapper().writeValueAsString(this); + } +} diff --git a/src/main/java/com/adyen/model/management/ClientCertificateRequest.java b/src/main/java/com/adyen/model/management/ClientCertificateRequest.java new file mode 100644 index 000000000..50e9128da --- /dev/null +++ b/src/main/java/com/adyen/model/management/ClientCertificateRequest.java @@ -0,0 +1,261 @@ +/* + * 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 com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.core.JsonProcessingException; +import java.util.*; + +/** ClientCertificateRequest */ +@JsonPropertyOrder({ + ClientCertificateRequest.JSON_PROPERTY_API_CREDENTIAL, + ClientCertificateRequest.JSON_PROPERTY_CERTIFICATE_SIGNING_REQUEST +}) +public class ClientCertificateRequest { + public static final String JSON_PROPERTY_API_CREDENTIAL = "apiCredential"; + private String apiCredential; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetApiCredential = false; + + public static final String JSON_PROPERTY_CERTIFICATE_SIGNING_REQUEST = + "certificateSigningRequest"; + private String certificateSigningRequest; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetCertificateSigningRequest = false; + + /** + * Sets whether attributes with null values should be explicitly included in the JSON payload. + * Default is false. + */ + @JsonIgnore private boolean includeNullValues = false; + + public ClientCertificateRequest() {} + + /** + * The API Credential that you want to use this certificate with, in the format + * 'ws_*@Company.*'. NOTE: You must assign the DN on that specified API credential with + * the one from the generated client certificate. Accomplish this either through the Customer Area + * API Credential page or the PATCH endpoint for apiCredentials + * + * @param apiCredential The API Credential that you want to use this certificate with, in the + * format 'ws_*@Company.*'. NOTE: You must assign the DN on that specified API + * credential with the one from the generated client certificate. Accomplish this either + * through the Customer Area API Credential page or the PATCH endpoint for apiCredentials + * @return the current {@code ClientCertificateRequest} instance, allowing for method chaining + */ + public ClientCertificateRequest apiCredential(String apiCredential) { + this.apiCredential = apiCredential; + isSetApiCredential = true; // mark as set + return this; + } + + /** + * The API Credential that you want to use this certificate with, in the format + * 'ws_*@Company.*'. NOTE: You must assign the DN on that specified API credential with + * the one from the generated client certificate. Accomplish this either through the Customer Area + * API Credential page or the PATCH endpoint for apiCredentials + * + * @return apiCredential The API Credential that you want to use this certificate with, in the + * format 'ws_*@Company.*'. NOTE: You must assign the DN on that specified API + * credential with the one from the generated client certificate. Accomplish this either + * through the Customer Area API Credential page or the PATCH endpoint for apiCredentials + */ + @JsonProperty(JSON_PROPERTY_API_CREDENTIAL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getApiCredential() { + return apiCredential; + } + + /** + * The API Credential that you want to use this certificate with, in the format + * 'ws_*@Company.*'. NOTE: You must assign the DN on that specified API credential with + * the one from the generated client certificate. Accomplish this either through the Customer Area + * API Credential page or the PATCH endpoint for apiCredentials + * + * @param apiCredential The API Credential that you want to use this certificate with, in the + * format 'ws_*@Company.*'. NOTE: You must assign the DN on that specified API + * credential with the one from the generated client certificate. Accomplish this either + * through the Customer Area API Credential page or the PATCH endpoint for apiCredentials + */ + @JsonProperty(JSON_PROPERTY_API_CREDENTIAL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setApiCredential(String apiCredential) { + this.apiCredential = apiCredential; + isSetApiCredential = true; // mark as set + } + + /** + * Certificate signing request. Must be a Base64-encoded DER string. Only the public key is + * enrolled; see the enroll operation for subject handling. + * + * @param certificateSigningRequest Certificate signing request. Must be a Base64-encoded DER + * string. Only the public key is enrolled; see the enroll operation for subject handling. + * @return the current {@code ClientCertificateRequest} instance, allowing for method chaining + */ + public ClientCertificateRequest certificateSigningRequest(String certificateSigningRequest) { + this.certificateSigningRequest = certificateSigningRequest; + isSetCertificateSigningRequest = true; // mark as set + return this; + } + + /** + * Certificate signing request. Must be a Base64-encoded DER string. Only the public key is + * enrolled; see the enroll operation for subject handling. + * + * @return certificateSigningRequest Certificate signing request. Must be a Base64-encoded DER + * string. Only the public key is enrolled; see the enroll operation for subject handling. + */ + @JsonProperty(JSON_PROPERTY_CERTIFICATE_SIGNING_REQUEST) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getCertificateSigningRequest() { + return certificateSigningRequest; + } + + /** + * Certificate signing request. Must be a Base64-encoded DER string. Only the public key is + * enrolled; see the enroll operation for subject handling. + * + * @param certificateSigningRequest Certificate signing request. Must be a Base64-encoded DER + * string. Only the public key is enrolled; see the enroll operation for subject handling. + */ + @JsonProperty(JSON_PROPERTY_CERTIFICATE_SIGNING_REQUEST) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCertificateSigningRequest(String certificateSigningRequest) { + this.certificateSigningRequest = certificateSigningRequest; + isSetCertificateSigningRequest = true; // mark as set + } + + /** + * Configures whether null values are explicitly serialized in the JSON payload. Default is false. + */ + public ClientCertificateRequest includeNullValues(boolean includeNullValues) { + this.includeNullValues = includeNullValues; + return this; + } + + /** Returns whether null values are explicitly serialized in the JSON payload. */ + public boolean isIncludeNullValues() { + return includeNullValues; + } + + /** + * Sets whether null values should be explicitly serialized in the JSON payload. Default is false. + */ + public void setIncludeNullValues(boolean includeNullValues) { + this.includeNullValues = includeNullValues; + } + + /** Return true if this ClientCertificateRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ClientCertificateRequest clientCertificateRequest = (ClientCertificateRequest) o; + return Objects.equals(this.apiCredential, clientCertificateRequest.apiCredential) + && Objects.equals(this.isSetApiCredential, clientCertificateRequest.isSetApiCredential) + && Objects.equals( + this.certificateSigningRequest, clientCertificateRequest.certificateSigningRequest) + && Objects.equals( + this.isSetCertificateSigningRequest, + clientCertificateRequest.isSetCertificateSigningRequest); + } + + @Override + public int hashCode() { + return Objects.hash( + apiCredential, + isSetApiCredential, + certificateSigningRequest, + isSetCertificateSigningRequest); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ClientCertificateRequest {\n"); + sb.append(" apiCredential: ").append(toIndentedString(apiCredential)).append("\n"); + sb.append(" certificateSigningRequest: ") + .append(toIndentedString(certificateSigningRequest)) + .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 "); + } + + /** Returns a map of properties to be merged into the JSON payload as explicit null values. */ + @JsonInclude(JsonInclude.Include.ALWAYS) + @JsonAnyGetter + public Map getExplicitNulls() { + if (!this.includeNullValues) { + return Collections.emptyMap(); + } + + Map nulls = new HashMap<>(); + + if (isSetApiCredential) { + addIfNull(nulls, JSON_PROPERTY_API_CREDENTIAL, this.apiCredential); + } + if (isSetCertificateSigningRequest) { + addIfNull(nulls, JSON_PROPERTY_CERTIFICATE_SIGNING_REQUEST, this.certificateSigningRequest); + } + + return nulls; + } + + // add to map when value is null + private void addIfNull(Map map, String key, Object value) { + if (value == null) { + map.put(key, null); + } + } + + /** + * Create an instance of ClientCertificateRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of ClientCertificateRequest + * @throws JsonProcessingException if the JSON string is invalid with respect to + * ClientCertificateRequest + */ + public static ClientCertificateRequest fromJson(String jsonString) + throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, ClientCertificateRequest.class); + } + + /** + * Convert an instance of ClientCertificateRequest to an JSON string + * + * @return JSON string + */ + public String toJson() throws JsonProcessingException { + return JSON.getMapper().writeValueAsString(this); + } +} diff --git a/src/main/java/com/adyen/model/management/ClientCertificateWithChain.java b/src/main/java/com/adyen/model/management/ClientCertificateWithChain.java new file mode 100644 index 000000000..f56eaa965 --- /dev/null +++ b/src/main/java/com/adyen/model/management/ClientCertificateWithChain.java @@ -0,0 +1,404 @@ +/* + * 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 com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.core.JsonProcessingException; +import java.util.*; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +/** ClientCertificateWithChain */ +@JsonPropertyOrder({ + ClientCertificateWithChain.JSON_PROPERTY_CA_CHAIN, + ClientCertificateWithChain.JSON_PROPERTY_ID, + ClientCertificateWithChain.JSON_PROPERTY_LEAF, + ClientCertificateWithChain.JSON_PROPERTY_SERIAL_NUMBER, + ClientCertificateWithChain.JSON_PROPERTY_SUBJECT_D_N +}) +public class ClientCertificateWithChain { + public static final String JSON_PROPERTY_CA_CHAIN = "caChain"; + private List caChain; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetCaChain = false; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetId = false; + + public static final String JSON_PROPERTY_LEAF = "leaf"; + private byte[] leaf; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetLeaf = false; + + public static final String JSON_PROPERTY_SERIAL_NUMBER = "serialNumber"; + private String serialNumber; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetSerialNumber = false; + + public static final String JSON_PROPERTY_SUBJECT_D_N = "subjectDN"; + private String subjectDN; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetSubjectDN = false; + + /** + * Sets whether attributes with null values should be explicitly included in the JSON payload. + * Default is false. + */ + @JsonIgnore private boolean includeNullValues = false; + + public ClientCertificateWithChain() {} + + /** + * Certificate chain with intermediates and Management Certificate Authority Root which excludes + * the signed client certificate leaf + * + * @param caChain Certificate chain with intermediates and Management Certificate Authority Root + * which excludes the signed client certificate leaf + * @return the current {@code ClientCertificateWithChain} instance, allowing for method chaining + */ + public ClientCertificateWithChain caChain(List caChain) { + this.caChain = caChain; + isSetCaChain = true; // mark as set + return this; + } + + public ClientCertificateWithChain addCaChainItem(byte[] caChainItem) { + if (this.caChain == null) { + this.caChain = new ArrayList<>(); + } + this.caChain.add(caChainItem); + return this; + } + + /** + * Certificate chain with intermediates and Management Certificate Authority Root which excludes + * the signed client certificate leaf + * + * @return caChain Certificate chain with intermediates and Management Certificate Authority Root + * which excludes the signed client certificate leaf + */ + @JsonProperty(JSON_PROPERTY_CA_CHAIN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getCaChain() { + return caChain; + } + + /** + * Certificate chain with intermediates and Management Certificate Authority Root which excludes + * the signed client certificate leaf + * + * @param caChain Certificate chain with intermediates and Management Certificate Authority Root + * which excludes the signed client certificate leaf + */ + @JsonProperty(JSON_PROPERTY_CA_CHAIN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCaChain(List caChain) { + this.caChain = caChain; + isSetCaChain = true; // mark as set + } + + /** + * The unique identifier of the client certificate + * + * @param id The unique identifier of the client certificate + * @return the current {@code ClientCertificateWithChain} instance, allowing for method chaining + */ + public ClientCertificateWithChain id(String id) { + this.id = id; + isSetId = true; // mark as set + return this; + } + + /** + * The unique identifier of the client certificate + * + * @return id The unique identifier of the client certificate + */ + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getId() { + return id; + } + + /** + * The unique identifier of the client certificate + * + * @param id The unique identifier of the client certificate + */ + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setId(String id) { + this.id = id; + isSetId = true; // mark as set + } + + /** + * Signed client certificate as a Base64-encoded DER string + * + * @param leaf Signed client certificate as a Base64-encoded DER string + * @return the current {@code ClientCertificateWithChain} instance, allowing for method chaining + */ + public ClientCertificateWithChain leaf(byte[] leaf) { + this.leaf = leaf; + isSetLeaf = true; // mark as set + return this; + } + + /** + * Signed client certificate as a Base64-encoded DER string + * + * @return leaf Signed client certificate as a Base64-encoded DER string + */ + @JsonProperty(JSON_PROPERTY_LEAF) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public byte[] getLeaf() { + return leaf; + } + + /** + * Signed client certificate as a Base64-encoded DER string + * + * @param leaf Signed client certificate as a Base64-encoded DER string + */ + @JsonProperty(JSON_PROPERTY_LEAF) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setLeaf(byte[] leaf) { + this.leaf = leaf; + isSetLeaf = true; // mark as set + } + + /** + * Serial number of client certificate + * + * @param serialNumber Serial number of client certificate + * @return the current {@code ClientCertificateWithChain} instance, allowing for method chaining + */ + public ClientCertificateWithChain serialNumber(String serialNumber) { + this.serialNumber = serialNumber; + isSetSerialNumber = true; // mark as set + return this; + } + + /** + * Serial number of client certificate + * + * @return serialNumber Serial number of client certificate + */ + @JsonProperty(JSON_PROPERTY_SERIAL_NUMBER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getSerialNumber() { + return serialNumber; + } + + /** + * Serial number of client certificate + * + * @param serialNumber Serial number of client certificate + */ + @JsonProperty(JSON_PROPERTY_SERIAL_NUMBER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSerialNumber(String serialNumber) { + this.serialNumber = serialNumber; + isSetSerialNumber = true; // mark as set + } + + /** + * Subject DN (Distinguished Name) of client certificate. Server-generated from + * `companyId` and `apiCredential`; see the enroll operation for details. + * + * @param subjectDN Subject DN (Distinguished Name) of client certificate. Server-generated from + * `companyId` and `apiCredential`; see the enroll operation for details. + * @return the current {@code ClientCertificateWithChain} instance, allowing for method chaining + */ + public ClientCertificateWithChain subjectDN(String subjectDN) { + this.subjectDN = subjectDN; + isSetSubjectDN = true; // mark as set + return this; + } + + /** + * Subject DN (Distinguished Name) of client certificate. Server-generated from + * `companyId` and `apiCredential`; see the enroll operation for details. + * + * @return subjectDN Subject DN (Distinguished Name) of client certificate. Server-generated from + * `companyId` and `apiCredential`; see the enroll operation for details. + */ + @JsonProperty(JSON_PROPERTY_SUBJECT_D_N) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getSubjectDN() { + return subjectDN; + } + + /** + * Subject DN (Distinguished Name) of client certificate. Server-generated from + * `companyId` and `apiCredential`; see the enroll operation for details. + * + * @param subjectDN Subject DN (Distinguished Name) of client certificate. Server-generated from + * `companyId` and `apiCredential`; see the enroll operation for details. + */ + @JsonProperty(JSON_PROPERTY_SUBJECT_D_N) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSubjectDN(String subjectDN) { + this.subjectDN = subjectDN; + isSetSubjectDN = true; // mark as set + } + + /** + * Configures whether null values are explicitly serialized in the JSON payload. Default is false. + */ + public ClientCertificateWithChain includeNullValues(boolean includeNullValues) { + this.includeNullValues = includeNullValues; + return this; + } + + /** Returns whether null values are explicitly serialized in the JSON payload. */ + public boolean isIncludeNullValues() { + return includeNullValues; + } + + /** + * Sets whether null values should be explicitly serialized in the JSON payload. Default is false. + */ + public void setIncludeNullValues(boolean includeNullValues) { + this.includeNullValues = includeNullValues; + } + + /** Return true if this ClientCertificateWithChain object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ClientCertificateWithChain clientCertificateWithChain = (ClientCertificateWithChain) o; + return Objects.equals(this.caChain, clientCertificateWithChain.caChain) + && Objects.equals(this.isSetCaChain, clientCertificateWithChain.isSetCaChain) + && Objects.equals(this.id, clientCertificateWithChain.id) + && Objects.equals(this.isSetId, clientCertificateWithChain.isSetId) + && Arrays.equals(this.leaf, clientCertificateWithChain.leaf) + && Objects.equals(this.isSetLeaf, clientCertificateWithChain.isSetLeaf) + && Objects.equals(this.serialNumber, clientCertificateWithChain.serialNumber) + && Objects.equals(this.isSetSerialNumber, clientCertificateWithChain.isSetSerialNumber) + && Objects.equals(this.subjectDN, clientCertificateWithChain.subjectDN) + && Objects.equals(this.isSetSubjectDN, clientCertificateWithChain.isSetSubjectDN); + } + + @Override + public int hashCode() { + return Objects.hash( + caChain, + isSetCaChain, + id, + isSetId, + Arrays.hashCode(leaf), + isSetLeaf, + serialNumber, + isSetSerialNumber, + subjectDN, + isSetSubjectDN); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ClientCertificateWithChain {\n"); + sb.append(" caChain: ").append(toIndentedString(caChain)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" leaf: ").append(toIndentedString(leaf)).append("\n"); + sb.append(" serialNumber: ").append(toIndentedString(serialNumber)).append("\n"); + sb.append(" subjectDN: ").append(toIndentedString(subjectDN)).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 "); + } + + /** Returns a map of properties to be merged into the JSON payload as explicit null values. */ + @JsonInclude(JsonInclude.Include.ALWAYS) + @JsonAnyGetter + public Map getExplicitNulls() { + if (!this.includeNullValues) { + return Collections.emptyMap(); + } + + Map nulls = new HashMap<>(); + + if (isSetCaChain) { + addIfNull(nulls, JSON_PROPERTY_CA_CHAIN, this.caChain); + } + if (isSetId) { + addIfNull(nulls, JSON_PROPERTY_ID, this.id); + } + if (isSetLeaf) { + addIfNull(nulls, JSON_PROPERTY_LEAF, this.leaf); + } + if (isSetSerialNumber) { + addIfNull(nulls, JSON_PROPERTY_SERIAL_NUMBER, this.serialNumber); + } + if (isSetSubjectDN) { + addIfNull(nulls, JSON_PROPERTY_SUBJECT_D_N, this.subjectDN); + } + + return nulls; + } + + // add to map when value is null + private void addIfNull(Map map, String key, Object value) { + if (value == null) { + map.put(key, null); + } + } + + /** + * Create an instance of ClientCertificateWithChain given an JSON string + * + * @param jsonString JSON string + * @return An instance of ClientCertificateWithChain + * @throws JsonProcessingException if the JSON string is invalid with respect to + * ClientCertificateWithChain + */ + public static ClientCertificateWithChain fromJson(String jsonString) + throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, ClientCertificateWithChain.class); + } + + /** + * Convert an instance of ClientCertificateWithChain to an JSON string + * + * @return JSON string + */ + public String toJson() throws JsonProcessingException { + return JSON.getMapper().writeValueAsString(this); + } +} diff --git a/src/main/java/com/adyen/model/management/CreateThemeRequest.java b/src/main/java/com/adyen/model/management/CreateThemeRequest.java new file mode 100644 index 000000000..4307b3242 --- /dev/null +++ b/src/main/java/com/adyen/model/management/CreateThemeRequest.java @@ -0,0 +1,229 @@ +/* + * 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 com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.core.JsonProcessingException; +import java.util.*; + +/** The request body for creating a new terminal theme. */ +@JsonPropertyOrder({CreateThemeRequest.JSON_PROPERTY_MODE, CreateThemeRequest.JSON_PROPERTY_NAME}) +public class CreateThemeRequest { + public static final String JSON_PROPERTY_MODE = "mode"; + private ThemeMode mode; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetMode = false; + + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetName = false; + + /** + * Sets whether attributes with null values should be explicitly included in the JSON payload. + * Default is false. + */ + @JsonIgnore private boolean includeNullValues = false; + + public CreateThemeRequest() {} + + /** + * mode + * + * @param mode + * @return the current {@code CreateThemeRequest} instance, allowing for method chaining + */ + public CreateThemeRequest mode(ThemeMode mode) { + this.mode = mode; + isSetMode = true; // mark as set + return this; + } + + /** + * Get mode + * + * @return mode + */ + @JsonProperty(JSON_PROPERTY_MODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public ThemeMode getMode() { + return mode; + } + + /** + * mode + * + * @param mode + */ + @JsonProperty(JSON_PROPERTY_MODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMode(ThemeMode mode) { + this.mode = mode; + isSetMode = true; // mark as set + } + + /** + * The name of the theme. Must be unique within the account specified in the path. Maximum 255 + * characters. + * + * @param name The name of the theme. Must be unique within the account specified in the path. + * Maximum 255 characters. + * @return the current {@code CreateThemeRequest} instance, allowing for method chaining + */ + public CreateThemeRequest name(String name) { + this.name = name; + isSetName = true; // mark as set + return this; + } + + /** + * The name of the theme. Must be unique within the account specified in the path. Maximum 255 + * characters. + * + * @return name The name of the theme. Must be unique within the account specified in the path. + * Maximum 255 characters. + */ + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getName() { + return name; + } + + /** + * The name of the theme. Must be unique within the account specified in the path. Maximum 255 + * characters. + * + * @param name The name of the theme. Must be unique within the account specified in the path. + * Maximum 255 characters. + */ + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setName(String name) { + this.name = name; + isSetName = true; // mark as set + } + + /** + * Configures whether null values are explicitly serialized in the JSON payload. Default is false. + */ + public CreateThemeRequest includeNullValues(boolean includeNullValues) { + this.includeNullValues = includeNullValues; + return this; + } + + /** Returns whether null values are explicitly serialized in the JSON payload. */ + public boolean isIncludeNullValues() { + return includeNullValues; + } + + /** + * Sets whether null values should be explicitly serialized in the JSON payload. Default is false. + */ + public void setIncludeNullValues(boolean includeNullValues) { + this.includeNullValues = includeNullValues; + } + + /** Return true if this CreateThemeRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateThemeRequest createThemeRequest = (CreateThemeRequest) o; + return Objects.equals(this.mode, createThemeRequest.mode) + && Objects.equals(this.isSetMode, createThemeRequest.isSetMode) + && Objects.equals(this.name, createThemeRequest.name) + && Objects.equals(this.isSetName, createThemeRequest.isSetName); + } + + @Override + public int hashCode() { + return Objects.hash(mode, isSetMode, name, isSetName); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateThemeRequest {\n"); + sb.append(" mode: ").append(toIndentedString(mode)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).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 "); + } + + /** Returns a map of properties to be merged into the JSON payload as explicit null values. */ + @JsonInclude(JsonInclude.Include.ALWAYS) + @JsonAnyGetter + public Map getExplicitNulls() { + if (!this.includeNullValues) { + return Collections.emptyMap(); + } + + Map nulls = new HashMap<>(); + + if (isSetMode) { + addIfNull(nulls, JSON_PROPERTY_MODE, this.mode); + } + if (isSetName) { + addIfNull(nulls, JSON_PROPERTY_NAME, this.name); + } + + return nulls; + } + + // add to map when value is null + private void addIfNull(Map map, String key, Object value) { + if (value == null) { + map.put(key, null); + } + } + + /** + * Create an instance of CreateThemeRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of CreateThemeRequest + * @throws JsonProcessingException if the JSON string is invalid with respect to + * CreateThemeRequest + */ + public static CreateThemeRequest fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, CreateThemeRequest.class); + } + + /** + * Convert an instance of CreateThemeRequest to an JSON string + * + * @return JSON string + */ + public String toJson() throws JsonProcessingException { + return JSON.getMapper().writeValueAsString(this); + } +} diff --git a/src/main/java/com/adyen/model/management/CreateThemeResponse.java b/src/main/java/com/adyen/model/management/CreateThemeResponse.java new file mode 100644 index 000000000..3318460db --- /dev/null +++ b/src/main/java/com/adyen/model/management/CreateThemeResponse.java @@ -0,0 +1,274 @@ +/* + * 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 com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.core.JsonProcessingException; +import java.util.*; + +/** The response containing the created terminal theme details. */ +@JsonPropertyOrder({ + CreateThemeResponse.JSON_PROPERTY_ID, + CreateThemeResponse.JSON_PROPERTY_MODE, + CreateThemeResponse.JSON_PROPERTY_NAME +}) +public class CreateThemeResponse { + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetId = false; + + public static final String JSON_PROPERTY_MODE = "mode"; + private ThemeMode mode; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetMode = false; + + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetName = false; + + /** + * Sets whether attributes with null values should be explicitly included in the JSON payload. + * Default is false. + */ + @JsonIgnore private boolean includeNullValues = false; + + public CreateThemeResponse() {} + + /** + * The unique identifier of the theme. This value is generated by Adyen. + * + * @param id The unique identifier of the theme. This value is generated by Adyen. + * @return the current {@code CreateThemeResponse} instance, allowing for method chaining + */ + public CreateThemeResponse id(String id) { + this.id = id; + isSetId = true; // mark as set + return this; + } + + /** + * The unique identifier of the theme. This value is generated by Adyen. + * + * @return id The unique identifier of the theme. This value is generated by Adyen. + */ + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getId() { + return id; + } + + /** + * The unique identifier of the theme. This value is generated by Adyen. + * + * @param id The unique identifier of the theme. This value is generated by Adyen. + */ + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setId(String id) { + this.id = id; + isSetId = true; // mark as set + } + + /** + * mode + * + * @param mode + * @return the current {@code CreateThemeResponse} instance, allowing for method chaining + */ + public CreateThemeResponse mode(ThemeMode mode) { + this.mode = mode; + isSetMode = true; // mark as set + return this; + } + + /** + * Get mode + * + * @return mode + */ + @JsonProperty(JSON_PROPERTY_MODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public ThemeMode getMode() { + return mode; + } + + /** + * mode + * + * @param mode + */ + @JsonProperty(JSON_PROPERTY_MODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMode(ThemeMode mode) { + this.mode = mode; + isSetMode = true; // mark as set + } + + /** + * The name of the theme. + * + * @param name The name of the theme. + * @return the current {@code CreateThemeResponse} instance, allowing for method chaining + */ + public CreateThemeResponse name(String name) { + this.name = name; + isSetName = true; // mark as set + return this; + } + + /** + * The name of the theme. + * + * @return name The name of the theme. + */ + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getName() { + return name; + } + + /** + * The name of the theme. + * + * @param name The name of the theme. + */ + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setName(String name) { + this.name = name; + isSetName = true; // mark as set + } + + /** + * Configures whether null values are explicitly serialized in the JSON payload. Default is false. + */ + public CreateThemeResponse includeNullValues(boolean includeNullValues) { + this.includeNullValues = includeNullValues; + return this; + } + + /** Returns whether null values are explicitly serialized in the JSON payload. */ + public boolean isIncludeNullValues() { + return includeNullValues; + } + + /** + * Sets whether null values should be explicitly serialized in the JSON payload. Default is false. + */ + public void setIncludeNullValues(boolean includeNullValues) { + this.includeNullValues = includeNullValues; + } + + /** Return true if this CreateThemeResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateThemeResponse createThemeResponse = (CreateThemeResponse) o; + return Objects.equals(this.id, createThemeResponse.id) + && Objects.equals(this.isSetId, createThemeResponse.isSetId) + && Objects.equals(this.mode, createThemeResponse.mode) + && Objects.equals(this.isSetMode, createThemeResponse.isSetMode) + && Objects.equals(this.name, createThemeResponse.name) + && Objects.equals(this.isSetName, createThemeResponse.isSetName); + } + + @Override + public int hashCode() { + return Objects.hash(id, isSetId, mode, isSetMode, name, isSetName); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateThemeResponse {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" mode: ").append(toIndentedString(mode)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).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 "); + } + + /** Returns a map of properties to be merged into the JSON payload as explicit null values. */ + @JsonInclude(JsonInclude.Include.ALWAYS) + @JsonAnyGetter + public Map getExplicitNulls() { + if (!this.includeNullValues) { + return Collections.emptyMap(); + } + + Map nulls = new HashMap<>(); + + if (isSetId) { + addIfNull(nulls, JSON_PROPERTY_ID, this.id); + } + if (isSetMode) { + addIfNull(nulls, JSON_PROPERTY_MODE, this.mode); + } + if (isSetName) { + addIfNull(nulls, JSON_PROPERTY_NAME, this.name); + } + + return nulls; + } + + // add to map when value is null + private void addIfNull(Map map, String key, Object value) { + if (value == null) { + map.put(key, null); + } + } + + /** + * Create an instance of CreateThemeResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of CreateThemeResponse + * @throws JsonProcessingException if the JSON string is invalid with respect to + * CreateThemeResponse + */ + public static CreateThemeResponse fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, CreateThemeResponse.class); + } + + /** + * Convert an instance of CreateThemeResponse to an JSON string + * + * @return JSON string + */ + public String toJson() throws JsonProcessingException { + return JSON.getMapper().writeValueAsString(this); + } +} diff --git a/src/main/java/com/adyen/model/management/EbtInfo.java b/src/main/java/com/adyen/model/management/EbtInfo.java new file mode 100644 index 000000000..8ea4612bf --- /dev/null +++ b/src/main/java/com/adyen/model/management/EbtInfo.java @@ -0,0 +1,175 @@ +/* + * 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 com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.core.JsonProcessingException; +import java.util.*; + +/** EbtInfo */ +@JsonPropertyOrder({EbtInfo.JSON_PROPERTY_FNA_NUMBER}) +public class EbtInfo { + public static final String JSON_PROPERTY_FNA_NUMBER = "fnaNumber"; + private String fnaNumber; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetFnaNumber = false; + + /** + * Sets whether attributes with null values should be explicitly included in the JSON payload. + * Default is false. + */ + @JsonIgnore private boolean includeNullValues = false; + + public EbtInfo() {} + + /** + * Food and Nutrition Administration (FNA) number for EBT. + * + * @param fnaNumber Food and Nutrition Administration (FNA) number for EBT. + * @return the current {@code EbtInfo} instance, allowing for method chaining + */ + public EbtInfo fnaNumber(String fnaNumber) { + this.fnaNumber = fnaNumber; + isSetFnaNumber = true; // mark as set + return this; + } + + /** + * Food and Nutrition Administration (FNA) number for EBT. + * + * @return fnaNumber Food and Nutrition Administration (FNA) number for EBT. + */ + @JsonProperty(JSON_PROPERTY_FNA_NUMBER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getFnaNumber() { + return fnaNumber; + } + + /** + * Food and Nutrition Administration (FNA) number for EBT. + * + * @param fnaNumber Food and Nutrition Administration (FNA) number for EBT. + */ + @JsonProperty(JSON_PROPERTY_FNA_NUMBER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setFnaNumber(String fnaNumber) { + this.fnaNumber = fnaNumber; + isSetFnaNumber = true; // mark as set + } + + /** + * Configures whether null values are explicitly serialized in the JSON payload. Default is false. + */ + public EbtInfo includeNullValues(boolean includeNullValues) { + this.includeNullValues = includeNullValues; + return this; + } + + /** Returns whether null values are explicitly serialized in the JSON payload. */ + public boolean isIncludeNullValues() { + return includeNullValues; + } + + /** + * Sets whether null values should be explicitly serialized in the JSON payload. Default is false. + */ + public void setIncludeNullValues(boolean includeNullValues) { + this.includeNullValues = includeNullValues; + } + + /** Return true if this EbtInfo object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EbtInfo ebtInfo = (EbtInfo) o; + return Objects.equals(this.fnaNumber, ebtInfo.fnaNumber) + && Objects.equals(this.isSetFnaNumber, ebtInfo.isSetFnaNumber); + } + + @Override + public int hashCode() { + return Objects.hash(fnaNumber, isSetFnaNumber); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class EbtInfo {\n"); + sb.append(" fnaNumber: ").append(toIndentedString(fnaNumber)).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 "); + } + + /** Returns a map of properties to be merged into the JSON payload as explicit null values. */ + @JsonInclude(JsonInclude.Include.ALWAYS) + @JsonAnyGetter + public Map getExplicitNulls() { + if (!this.includeNullValues) { + return Collections.emptyMap(); + } + + Map nulls = new HashMap<>(); + + if (isSetFnaNumber) { + addIfNull(nulls, JSON_PROPERTY_FNA_NUMBER, this.fnaNumber); + } + + return nulls; + } + + // add to map when value is null + private void addIfNull(Map map, String key, Object value) { + if (value == null) { + map.put(key, null); + } + } + + /** + * Create an instance of EbtInfo given an JSON string + * + * @param jsonString JSON string + * @return An instance of EbtInfo + * @throws JsonProcessingException if the JSON string is invalid with respect to EbtInfo + */ + public static EbtInfo fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, EbtInfo.class); + } + + /** + * Convert an instance of EbtInfo to an JSON string + * + * @return JSON string + */ + public String toJson() throws JsonProcessingException { + return JSON.getMapper().writeValueAsString(this); + } +} diff --git a/src/main/java/com/adyen/model/management/EbtResponseInfo.java b/src/main/java/com/adyen/model/management/EbtResponseInfo.java new file mode 100644 index 000000000..bd410c24d --- /dev/null +++ b/src/main/java/com/adyen/model/management/EbtResponseInfo.java @@ -0,0 +1,175 @@ +/* + * 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 com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.core.JsonProcessingException; +import java.util.*; + +/** EbtResponseInfo */ +@JsonPropertyOrder({EbtResponseInfo.JSON_PROPERTY_FNA_NUMBER}) +public class EbtResponseInfo { + public static final String JSON_PROPERTY_FNA_NUMBER = "fnaNumber"; + private String fnaNumber; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetFnaNumber = false; + + /** + * Sets whether attributes with null values should be explicitly included in the JSON payload. + * Default is false. + */ + @JsonIgnore private boolean includeNullValues = false; + + public EbtResponseInfo() {} + + /** + * Food and Nutrition Administration (FNA) number for EBT. + * + * @param fnaNumber Food and Nutrition Administration (FNA) number for EBT. + * @return the current {@code EbtResponseInfo} instance, allowing for method chaining + */ + public EbtResponseInfo fnaNumber(String fnaNumber) { + this.fnaNumber = fnaNumber; + isSetFnaNumber = true; // mark as set + return this; + } + + /** + * Food and Nutrition Administration (FNA) number for EBT. + * + * @return fnaNumber Food and Nutrition Administration (FNA) number for EBT. + */ + @JsonProperty(JSON_PROPERTY_FNA_NUMBER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getFnaNumber() { + return fnaNumber; + } + + /** + * Food and Nutrition Administration (FNA) number for EBT. + * + * @param fnaNumber Food and Nutrition Administration (FNA) number for EBT. + */ + @JsonProperty(JSON_PROPERTY_FNA_NUMBER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setFnaNumber(String fnaNumber) { + this.fnaNumber = fnaNumber; + isSetFnaNumber = true; // mark as set + } + + /** + * Configures whether null values are explicitly serialized in the JSON payload. Default is false. + */ + public EbtResponseInfo includeNullValues(boolean includeNullValues) { + this.includeNullValues = includeNullValues; + return this; + } + + /** Returns whether null values are explicitly serialized in the JSON payload. */ + public boolean isIncludeNullValues() { + return includeNullValues; + } + + /** + * Sets whether null values should be explicitly serialized in the JSON payload. Default is false. + */ + public void setIncludeNullValues(boolean includeNullValues) { + this.includeNullValues = includeNullValues; + } + + /** Return true if this EbtResponseInfo object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EbtResponseInfo ebtResponseInfo = (EbtResponseInfo) o; + return Objects.equals(this.fnaNumber, ebtResponseInfo.fnaNumber) + && Objects.equals(this.isSetFnaNumber, ebtResponseInfo.isSetFnaNumber); + } + + @Override + public int hashCode() { + return Objects.hash(fnaNumber, isSetFnaNumber); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class EbtResponseInfo {\n"); + sb.append(" fnaNumber: ").append(toIndentedString(fnaNumber)).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 "); + } + + /** Returns a map of properties to be merged into the JSON payload as explicit null values. */ + @JsonInclude(JsonInclude.Include.ALWAYS) + @JsonAnyGetter + public Map getExplicitNulls() { + if (!this.includeNullValues) { + return Collections.emptyMap(); + } + + Map nulls = new HashMap<>(); + + if (isSetFnaNumber) { + addIfNull(nulls, JSON_PROPERTY_FNA_NUMBER, this.fnaNumber); + } + + return nulls; + } + + // add to map when value is null + private void addIfNull(Map map, String key, Object value) { + if (value == null) { + map.put(key, null); + } + } + + /** + * Create an instance of EbtResponseInfo given an JSON string + * + * @param jsonString JSON string + * @return An instance of EbtResponseInfo + * @throws JsonProcessingException if the JSON string is invalid with respect to EbtResponseInfo + */ + public static EbtResponseInfo fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, EbtResponseInfo.class); + } + + /** + * Convert an instance of EbtResponseInfo to an JSON string + * + * @return JSON string + */ + public String toJson() throws JsonProcessingException { + return JSON.getMapper().writeValueAsString(this); + } +} diff --git a/src/main/java/com/adyen/model/management/EbtUpdateInfo.java b/src/main/java/com/adyen/model/management/EbtUpdateInfo.java new file mode 100644 index 000000000..36e2243eb --- /dev/null +++ b/src/main/java/com/adyen/model/management/EbtUpdateInfo.java @@ -0,0 +1,175 @@ +/* + * 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 com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.core.JsonProcessingException; +import java.util.*; + +/** EbtUpdateInfo */ +@JsonPropertyOrder({EbtUpdateInfo.JSON_PROPERTY_FNA_NUMBER}) +public class EbtUpdateInfo { + public static final String JSON_PROPERTY_FNA_NUMBER = "fnaNumber"; + private String fnaNumber; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetFnaNumber = false; + + /** + * Sets whether attributes with null values should be explicitly included in the JSON payload. + * Default is false. + */ + @JsonIgnore private boolean includeNullValues = false; + + public EbtUpdateInfo() {} + + /** + * Food and Nutrition Administration (FNA) number for EBT. + * + * @param fnaNumber Food and Nutrition Administration (FNA) number for EBT. + * @return the current {@code EbtUpdateInfo} instance, allowing for method chaining + */ + public EbtUpdateInfo fnaNumber(String fnaNumber) { + this.fnaNumber = fnaNumber; + isSetFnaNumber = true; // mark as set + return this; + } + + /** + * Food and Nutrition Administration (FNA) number for EBT. + * + * @return fnaNumber Food and Nutrition Administration (FNA) number for EBT. + */ + @JsonProperty(JSON_PROPERTY_FNA_NUMBER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getFnaNumber() { + return fnaNumber; + } + + /** + * Food and Nutrition Administration (FNA) number for EBT. + * + * @param fnaNumber Food and Nutrition Administration (FNA) number for EBT. + */ + @JsonProperty(JSON_PROPERTY_FNA_NUMBER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setFnaNumber(String fnaNumber) { + this.fnaNumber = fnaNumber; + isSetFnaNumber = true; // mark as set + } + + /** + * Configures whether null values are explicitly serialized in the JSON payload. Default is false. + */ + public EbtUpdateInfo includeNullValues(boolean includeNullValues) { + this.includeNullValues = includeNullValues; + return this; + } + + /** Returns whether null values are explicitly serialized in the JSON payload. */ + public boolean isIncludeNullValues() { + return includeNullValues; + } + + /** + * Sets whether null values should be explicitly serialized in the JSON payload. Default is false. + */ + public void setIncludeNullValues(boolean includeNullValues) { + this.includeNullValues = includeNullValues; + } + + /** Return true if this EbtUpdateInfo object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EbtUpdateInfo ebtUpdateInfo = (EbtUpdateInfo) o; + return Objects.equals(this.fnaNumber, ebtUpdateInfo.fnaNumber) + && Objects.equals(this.isSetFnaNumber, ebtUpdateInfo.isSetFnaNumber); + } + + @Override + public int hashCode() { + return Objects.hash(fnaNumber, isSetFnaNumber); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class EbtUpdateInfo {\n"); + sb.append(" fnaNumber: ").append(toIndentedString(fnaNumber)).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 "); + } + + /** Returns a map of properties to be merged into the JSON payload as explicit null values. */ + @JsonInclude(JsonInclude.Include.ALWAYS) + @JsonAnyGetter + public Map getExplicitNulls() { + if (!this.includeNullValues) { + return Collections.emptyMap(); + } + + Map nulls = new HashMap<>(); + + if (isSetFnaNumber) { + addIfNull(nulls, JSON_PROPERTY_FNA_NUMBER, this.fnaNumber); + } + + return nulls; + } + + // add to map when value is null + private void addIfNull(Map map, String key, Object value) { + if (value == null) { + map.put(key, null); + } + } + + /** + * Create an instance of EbtUpdateInfo given an JSON string + * + * @param jsonString JSON string + * @return An instance of EbtUpdateInfo + * @throws JsonProcessingException if the JSON string is invalid with respect to EbtUpdateInfo + */ + public static EbtUpdateInfo fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, EbtUpdateInfo.class); + } + + /** + * Convert an instance of EbtUpdateInfo to an JSON string + * + * @return JSON string + */ + public String toJson() throws JsonProcessingException { + return JSON.getMapper().writeValueAsString(this); + } +} diff --git a/src/main/java/com/adyen/model/management/JapaneseLocalizedAddress.java b/src/main/java/com/adyen/model/management/JapaneseLocalizedAddress.java new file mode 100644 index 000000000..2cf281e97 --- /dev/null +++ b/src/main/java/com/adyen/model/management/JapaneseLocalizedAddress.java @@ -0,0 +1,275 @@ +/* + * 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 com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonProcessingException; +import java.util.*; +import java.util.Arrays; +import java.util.logging.Logger; + +/** JapaneseLocalizedAddress */ +@JsonPropertyOrder({ + JapaneseLocalizedAddress.JSON_PROPERTY_FIELDS, + JapaneseLocalizedAddress.JSON_PROPERTY_SCRIPT +}) +public class JapaneseLocalizedAddress { + public static final String JSON_PROPERTY_FIELDS = "fields"; + private JapaneseLocalizedAddressFields fields; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetFields = false; + + /** The character set of the localized address. Possible values: **ja-Hani**, **ja-Kana**. */ + public enum ScriptEnum { + JA_KANA(String.valueOf("ja-Kana")), + + JA_HANI(String.valueOf("ja-Hani")); + + private static final Logger LOG = Logger.getLogger(ScriptEnum.class.getName()); + + private String value; + + ScriptEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static ScriptEnum fromValue(String value) { + for (ScriptEnum b : ScriptEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + // handling unexpected value + LOG.warning( + "ScriptEnum: unexpected enum value '" + + value + + "' - Supported values are " + + Arrays.toString(ScriptEnum.values())); + return null; + } + } + + public static final String JSON_PROPERTY_SCRIPT = "script"; + private ScriptEnum script; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetScript = false; + + /** + * Sets whether attributes with null values should be explicitly included in the JSON payload. + * Default is false. + */ + @JsonIgnore private boolean includeNullValues = false; + + public JapaneseLocalizedAddress() {} + + /** + * fields + * + * @param fields + * @return the current {@code JapaneseLocalizedAddress} instance, allowing for method chaining + */ + public JapaneseLocalizedAddress fields(JapaneseLocalizedAddressFields fields) { + this.fields = fields; + isSetFields = true; // mark as set + return this; + } + + /** + * Get fields + * + * @return fields + */ + @JsonProperty(JSON_PROPERTY_FIELDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public JapaneseLocalizedAddressFields getFields() { + return fields; + } + + /** + * fields + * + * @param fields + */ + @JsonProperty(JSON_PROPERTY_FIELDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setFields(JapaneseLocalizedAddressFields fields) { + this.fields = fields; + isSetFields = true; // mark as set + } + + /** + * The character set of the localized address. Possible values: **ja-Hani**, **ja-Kana**. + * + * @param script The character set of the localized address. Possible values: **ja-Hani**, + * **ja-Kana**. + * @return the current {@code JapaneseLocalizedAddress} instance, allowing for method chaining + */ + public JapaneseLocalizedAddress script(ScriptEnum script) { + this.script = script; + isSetScript = true; // mark as set + return this; + } + + /** + * The character set of the localized address. Possible values: **ja-Hani**, **ja-Kana**. + * + * @return script The character set of the localized address. Possible values: **ja-Hani**, + * **ja-Kana**. + */ + @JsonProperty(JSON_PROPERTY_SCRIPT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public ScriptEnum getScript() { + return script; + } + + /** + * The character set of the localized address. Possible values: **ja-Hani**, **ja-Kana**. + * + * @param script The character set of the localized address. Possible values: **ja-Hani**, + * **ja-Kana**. + */ + @JsonProperty(JSON_PROPERTY_SCRIPT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setScript(ScriptEnum script) { + this.script = script; + isSetScript = true; // mark as set + } + + /** + * Configures whether null values are explicitly serialized in the JSON payload. Default is false. + */ + public JapaneseLocalizedAddress includeNullValues(boolean includeNullValues) { + this.includeNullValues = includeNullValues; + return this; + } + + /** Returns whether null values are explicitly serialized in the JSON payload. */ + public boolean isIncludeNullValues() { + return includeNullValues; + } + + /** + * Sets whether null values should be explicitly serialized in the JSON payload. Default is false. + */ + public void setIncludeNullValues(boolean includeNullValues) { + this.includeNullValues = includeNullValues; + } + + /** Return true if this JapaneseLocalizedAddress object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + JapaneseLocalizedAddress japaneseLocalizedAddress = (JapaneseLocalizedAddress) o; + return Objects.equals(this.fields, japaneseLocalizedAddress.fields) + && Objects.equals(this.isSetFields, japaneseLocalizedAddress.isSetFields) + && Objects.equals(this.script, japaneseLocalizedAddress.script) + && Objects.equals(this.isSetScript, japaneseLocalizedAddress.isSetScript); + } + + @Override + public int hashCode() { + return Objects.hash(fields, isSetFields, script, isSetScript); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class JapaneseLocalizedAddress {\n"); + sb.append(" fields: ").append(toIndentedString(fields)).append("\n"); + sb.append(" script: ").append(toIndentedString(script)).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 "); + } + + /** Returns a map of properties to be merged into the JSON payload as explicit null values. */ + @JsonInclude(JsonInclude.Include.ALWAYS) + @JsonAnyGetter + public Map getExplicitNulls() { + if (!this.includeNullValues) { + return Collections.emptyMap(); + } + + Map nulls = new HashMap<>(); + + if (isSetFields) { + addIfNull(nulls, JSON_PROPERTY_FIELDS, this.fields); + } + if (isSetScript) { + addIfNull(nulls, JSON_PROPERTY_SCRIPT, this.script); + } + + return nulls; + } + + // add to map when value is null + private void addIfNull(Map map, String key, Object value) { + if (value == null) { + map.put(key, null); + } + } + + /** + * Create an instance of JapaneseLocalizedAddress given an JSON string + * + * @param jsonString JSON string + * @return An instance of JapaneseLocalizedAddress + * @throws JsonProcessingException if the JSON string is invalid with respect to + * JapaneseLocalizedAddress + */ + public static JapaneseLocalizedAddress fromJson(String jsonString) + throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, JapaneseLocalizedAddress.class); + } + + /** + * Convert an instance of JapaneseLocalizedAddress to an JSON string + * + * @return JSON string + */ + public String toJson() throws JsonProcessingException { + return JSON.getMapper().writeValueAsString(this); + } +} diff --git a/src/main/java/com/adyen/model/management/JapaneseLocalizedAddressFields.java b/src/main/java/com/adyen/model/management/JapaneseLocalizedAddressFields.java new file mode 100644 index 000000000..9600da37d --- /dev/null +++ b/src/main/java/com/adyen/model/management/JapaneseLocalizedAddressFields.java @@ -0,0 +1,465 @@ +/* + * 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 com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.core.JsonProcessingException; +import java.util.*; + +/** JapaneseLocalizedAddressFields */ +@JsonPropertyOrder({ + JapaneseLocalizedAddressFields.JSON_PROPERTY_BUILDING, + JapaneseLocalizedAddressFields.JSON_PROPERTY_CITY, + JapaneseLocalizedAddressFields.JSON_PROPERTY_DISTRICT, + JapaneseLocalizedAddressFields.JSON_PROPERTY_LINE1, + JapaneseLocalizedAddressFields.JSON_PROPERTY_POSTAL_CODE, + JapaneseLocalizedAddressFields.JSON_PROPERTY_PREFECTURE +}) +public class JapaneseLocalizedAddressFields { + public static final String JSON_PROPERTY_BUILDING = "building"; + private String building; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetBuilding = false; + + public static final String JSON_PROPERTY_CITY = "city"; + private String city; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetCity = false; + + public static final String JSON_PROPERTY_DISTRICT = "district"; + private String district; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetDistrict = false; + + public static final String JSON_PROPERTY_LINE1 = "line1"; + private String line1; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetLine1 = false; + + public static final String JSON_PROPERTY_POSTAL_CODE = "postalCode"; + private String postalCode; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetPostalCode = false; + + public static final String JSON_PROPERTY_PREFECTURE = "prefecture"; + private String prefecture; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetPrefecture = false; + + /** + * Sets whether attributes with null values should be explicitly included in the JSON payload. + * Default is false. + */ + @JsonIgnore private boolean includeNullValues = false; + + public JapaneseLocalizedAddressFields() {} + + /** + * The building name, floor, and room number (建物名・階・部屋番号). + * + * @param building The building name, floor, and room number (建物名・階・部屋番号). + * @return the current {@code JapaneseLocalizedAddressFields} instance, allowing for method + * chaining + */ + public JapaneseLocalizedAddressFields building(String building) { + this.building = building; + isSetBuilding = true; // mark as set + return this; + } + + /** + * The building name, floor, and room number (建物名・階・部屋番号). + * + * @return building The building name, floor, and room number (建物名・階・部屋番号). + */ + @JsonProperty(JSON_PROPERTY_BUILDING) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getBuilding() { + return building; + } + + /** + * The building name, floor, and room number (建物名・階・部屋番号). + * + * @param building The building name, floor, and room number (建物名・階・部屋番号). + */ + @JsonProperty(JSON_PROPERTY_BUILDING) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setBuilding(String building) { + this.building = building; + isSetBuilding = true; // mark as set + } + + /** + * The city (市区町村). Required for both `ja-Hani` and `ja-Kana` addresses. + * + * @param city The city (市区町村). Required for both `ja-Hani` and `ja-Kana` + * addresses. + * @return the current {@code JapaneseLocalizedAddressFields} instance, allowing for method + * chaining + */ + public JapaneseLocalizedAddressFields city(String city) { + this.city = city; + isSetCity = true; // mark as set + return this; + } + + /** + * The city (市区町村). Required for both `ja-Hani` and `ja-Kana` addresses. + * + * @return city The city (市区町村). Required for both `ja-Hani` and `ja-Kana` + * addresses. + */ + @JsonProperty(JSON_PROPERTY_CITY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getCity() { + return city; + } + + /** + * The city (市区町村). Required for both `ja-Hani` and `ja-Kana` addresses. + * + * @param city The city (市区町村). Required for both `ja-Hani` and `ja-Kana` + * addresses. + */ + @JsonProperty(JSON_PROPERTY_CITY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCity(String city) { + this.city = city; + isSetCity = true; // mark as set + } + + /** + * The town or locality (町域 / 町名). + * + * @param district The town or locality (町域 / 町名). + * @return the current {@code JapaneseLocalizedAddressFields} instance, allowing for method + * chaining + */ + public JapaneseLocalizedAddressFields district(String district) { + this.district = district; + isSetDistrict = true; // mark as set + return this; + } + + /** + * The town or locality (町域 / 町名). + * + * @return district The town or locality (町域 / 町名). + */ + @JsonProperty(JSON_PROPERTY_DISTRICT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getDistrict() { + return district; + } + + /** + * The town or locality (町域 / 町名). + * + * @param district The town or locality (町域 / 町名). + */ + @JsonProperty(JSON_PROPERTY_DISTRICT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDistrict(String district) { + this.district = district; + isSetDistrict = true; // mark as set + } + + /** + * The street address including chōme, block/lot, and house number (丁目・番地・号等). Required for both + * `ja-Hani` and `ja-Kana` addresses. + * + * @param line1 The street address including chōme, block/lot, and house number (丁目・番地・号等). + * Required for both `ja-Hani` and `ja-Kana` addresses. + * @return the current {@code JapaneseLocalizedAddressFields} instance, allowing for method + * chaining + */ + public JapaneseLocalizedAddressFields line1(String line1) { + this.line1 = line1; + isSetLine1 = true; // mark as set + return this; + } + + /** + * The street address including chōme, block/lot, and house number (丁目・番地・号等). Required for both + * `ja-Hani` and `ja-Kana` addresses. + * + * @return line1 The street address including chōme, block/lot, and house number (丁目・番地・号等). + * Required for both `ja-Hani` and `ja-Kana` addresses. + */ + @JsonProperty(JSON_PROPERTY_LINE1) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getLine1() { + return line1; + } + + /** + * The street address including chōme, block/lot, and house number (丁目・番地・号等). Required for both + * `ja-Hani` and `ja-Kana` addresses. + * + * @param line1 The street address including chōme, block/lot, and house number (丁目・番地・号等). + * Required for both `ja-Hani` and `ja-Kana` addresses. + */ + @JsonProperty(JSON_PROPERTY_LINE1) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setLine1(String line1) { + this.line1 = line1; + isSetLine1 = true; // mark as set + } + + /** + * The postal code (郵便番号). Required for both `ja-Hani` and `ja-Kana` addresses + * only when `address.postalCode` is omitted. Otherwise, the value in + * `address.postalCode` is used. + * + * @param postalCode The postal code (郵便番号). Required for both `ja-Hani` and + * `ja-Kana` addresses only when `address.postalCode` is omitted. + * Otherwise, the value in `address.postalCode` is used. + * @return the current {@code JapaneseLocalizedAddressFields} instance, allowing for method + * chaining + */ + public JapaneseLocalizedAddressFields postalCode(String postalCode) { + this.postalCode = postalCode; + isSetPostalCode = true; // mark as set + return this; + } + + /** + * The postal code (郵便番号). Required for both `ja-Hani` and `ja-Kana` addresses + * only when `address.postalCode` is omitted. Otherwise, the value in + * `address.postalCode` is used. + * + * @return postalCode The postal code (郵便番号). Required for both `ja-Hani` and + * `ja-Kana` addresses only when `address.postalCode` is omitted. + * Otherwise, the value in `address.postalCode` is used. + */ + @JsonProperty(JSON_PROPERTY_POSTAL_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getPostalCode() { + return postalCode; + } + + /** + * The postal code (郵便番号). Required for both `ja-Hani` and `ja-Kana` addresses + * only when `address.postalCode` is omitted. Otherwise, the value in + * `address.postalCode` is used. + * + * @param postalCode The postal code (郵便番号). Required for both `ja-Hani` and + * `ja-Kana` addresses only when `address.postalCode` is omitted. + * Otherwise, the value in `address.postalCode` is used. + */ + @JsonProperty(JSON_PROPERTY_POSTAL_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPostalCode(String postalCode) { + this.postalCode = postalCode; + isSetPostalCode = true; // mark as set + } + + /** + * The prefecture, state, or province (都道府県). Required for both `ja-Hani` and + * `ja-Kana` addresses. + * + * @param prefecture The prefecture, state, or province (都道府県). Required for both + * `ja-Hani` and `ja-Kana` addresses. + * @return the current {@code JapaneseLocalizedAddressFields} instance, allowing for method + * chaining + */ + public JapaneseLocalizedAddressFields prefecture(String prefecture) { + this.prefecture = prefecture; + isSetPrefecture = true; // mark as set + return this; + } + + /** + * The prefecture, state, or province (都道府県). Required for both `ja-Hani` and + * `ja-Kana` addresses. + * + * @return prefecture The prefecture, state, or province (都道府県). Required for both + * `ja-Hani` and `ja-Kana` addresses. + */ + @JsonProperty(JSON_PROPERTY_PREFECTURE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getPrefecture() { + return prefecture; + } + + /** + * The prefecture, state, or province (都道府県). Required for both `ja-Hani` and + * `ja-Kana` addresses. + * + * @param prefecture The prefecture, state, or province (都道府県). Required for both + * `ja-Hani` and `ja-Kana` addresses. + */ + @JsonProperty(JSON_PROPERTY_PREFECTURE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPrefecture(String prefecture) { + this.prefecture = prefecture; + isSetPrefecture = true; // mark as set + } + + /** + * Configures whether null values are explicitly serialized in the JSON payload. Default is false. + */ + public JapaneseLocalizedAddressFields includeNullValues(boolean includeNullValues) { + this.includeNullValues = includeNullValues; + return this; + } + + /** Returns whether null values are explicitly serialized in the JSON payload. */ + public boolean isIncludeNullValues() { + return includeNullValues; + } + + /** + * Sets whether null values should be explicitly serialized in the JSON payload. Default is false. + */ + public void setIncludeNullValues(boolean includeNullValues) { + this.includeNullValues = includeNullValues; + } + + /** Return true if this JapaneseLocalizedAddressFields object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + JapaneseLocalizedAddressFields japaneseLocalizedAddressFields = + (JapaneseLocalizedAddressFields) o; + return Objects.equals(this.building, japaneseLocalizedAddressFields.building) + && Objects.equals(this.isSetBuilding, japaneseLocalizedAddressFields.isSetBuilding) + && Objects.equals(this.city, japaneseLocalizedAddressFields.city) + && Objects.equals(this.isSetCity, japaneseLocalizedAddressFields.isSetCity) + && Objects.equals(this.district, japaneseLocalizedAddressFields.district) + && Objects.equals(this.isSetDistrict, japaneseLocalizedAddressFields.isSetDistrict) + && Objects.equals(this.line1, japaneseLocalizedAddressFields.line1) + && Objects.equals(this.isSetLine1, japaneseLocalizedAddressFields.isSetLine1) + && Objects.equals(this.postalCode, japaneseLocalizedAddressFields.postalCode) + && Objects.equals(this.isSetPostalCode, japaneseLocalizedAddressFields.isSetPostalCode) + && Objects.equals(this.prefecture, japaneseLocalizedAddressFields.prefecture) + && Objects.equals(this.isSetPrefecture, japaneseLocalizedAddressFields.isSetPrefecture); + } + + @Override + public int hashCode() { + return Objects.hash( + building, + isSetBuilding, + city, + isSetCity, + district, + isSetDistrict, + line1, + isSetLine1, + postalCode, + isSetPostalCode, + prefecture, + isSetPrefecture); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class JapaneseLocalizedAddressFields {\n"); + sb.append(" building: ").append(toIndentedString(building)).append("\n"); + sb.append(" city: ").append(toIndentedString(city)).append("\n"); + sb.append(" district: ").append(toIndentedString(district)).append("\n"); + sb.append(" line1: ").append(toIndentedString(line1)).append("\n"); + sb.append(" postalCode: ").append(toIndentedString(postalCode)).append("\n"); + sb.append(" prefecture: ").append(toIndentedString(prefecture)).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 "); + } + + /** Returns a map of properties to be merged into the JSON payload as explicit null values. */ + @JsonInclude(JsonInclude.Include.ALWAYS) + @JsonAnyGetter + public Map getExplicitNulls() { + if (!this.includeNullValues) { + return Collections.emptyMap(); + } + + Map nulls = new HashMap<>(); + + if (isSetBuilding) { + addIfNull(nulls, JSON_PROPERTY_BUILDING, this.building); + } + if (isSetCity) { + addIfNull(nulls, JSON_PROPERTY_CITY, this.city); + } + if (isSetDistrict) { + addIfNull(nulls, JSON_PROPERTY_DISTRICT, this.district); + } + if (isSetLine1) { + addIfNull(nulls, JSON_PROPERTY_LINE1, this.line1); + } + if (isSetPostalCode) { + addIfNull(nulls, JSON_PROPERTY_POSTAL_CODE, this.postalCode); + } + if (isSetPrefecture) { + addIfNull(nulls, JSON_PROPERTY_PREFECTURE, this.prefecture); + } + + return nulls; + } + + // add to map when value is null + private void addIfNull(Map map, String key, Object value) { + if (value == null) { + map.put(key, null); + } + } + + /** + * Create an instance of JapaneseLocalizedAddressFields given an JSON string + * + * @param jsonString JSON string + * @return An instance of JapaneseLocalizedAddressFields + * @throws JsonProcessingException if the JSON string is invalid with respect to + * JapaneseLocalizedAddressFields + */ + public static JapaneseLocalizedAddressFields fromJson(String jsonString) + throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, JapaneseLocalizedAddressFields.class); + } + + /** + * Convert an instance of JapaneseLocalizedAddressFields to an JSON string + * + * @return JSON string + */ + public String toJson() throws JsonProcessingException { + return JSON.getMapper().writeValueAsString(this); + } +} diff --git a/src/main/java/com/adyen/model/management/ListThemesResponse.java b/src/main/java/com/adyen/model/management/ListThemesResponse.java new file mode 100644 index 000000000..46eeb254a --- /dev/null +++ b/src/main/java/com/adyen/model/management/ListThemesResponse.java @@ -0,0 +1,238 @@ +/* + * 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 com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.core.JsonProcessingException; +import java.util.*; +import java.util.ArrayList; +import java.util.List; + +/** + * The response with the paginated list of terminal themes containing the metadata of the themes. + */ +@JsonPropertyOrder({ + ListThemesResponse.JSON_PROPERTY_DATA, + ListThemesResponse.JSON_PROPERTY_HAS_NEXT_PAGE +}) +public class ListThemesResponse { + public static final String JSON_PROPERTY_DATA = "data"; + private List data; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetData = false; + + public static final String JSON_PROPERTY_HAS_NEXT_PAGE = "hasNextPage"; + private Boolean hasNextPage; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetHasNextPage = false; + + /** + * Sets whether attributes with null values should be explicitly included in the JSON payload. + * Default is false. + */ + @JsonIgnore private boolean includeNullValues = false; + + public ListThemesResponse() {} + + /** + * The list of themes for the requested page. + * + * @param data The list of themes for the requested page. + * @return the current {@code ListThemesResponse} instance, allowing for method chaining + */ + public ListThemesResponse data(List data) { + this.data = data; + isSetData = true; // mark as set + return this; + } + + public ListThemesResponse addDataItem(ThemeSummary dataItem) { + if (this.data == null) { + this.data = new ArrayList<>(); + } + this.data.add(dataItem); + return this; + } + + /** + * The list of themes for the requested page. + * + * @return data The list of themes for the requested page. + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getData() { + return data; + } + + /** + * The list of themes for the requested page. + * + * @param data The list of themes for the requested page. + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setData(List data) { + this.data = data; + isSetData = true; // mark as set + } + + /** + * Indicates whether there are more themes after the current page. + * + * @param hasNextPage Indicates whether there are more themes after the current page. + * @return the current {@code ListThemesResponse} instance, allowing for method chaining + */ + public ListThemesResponse hasNextPage(Boolean hasNextPage) { + this.hasNextPage = hasNextPage; + isSetHasNextPage = true; // mark as set + return this; + } + + /** + * Indicates whether there are more themes after the current page. + * + * @return hasNextPage Indicates whether there are more themes after the current page. + */ + @JsonProperty(JSON_PROPERTY_HAS_NEXT_PAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getHasNextPage() { + return hasNextPage; + } + + /** + * Indicates whether there are more themes after the current page. + * + * @param hasNextPage Indicates whether there are more themes after the current page. + */ + @JsonProperty(JSON_PROPERTY_HAS_NEXT_PAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setHasNextPage(Boolean hasNextPage) { + this.hasNextPage = hasNextPage; + isSetHasNextPage = true; // mark as set + } + + /** + * Configures whether null values are explicitly serialized in the JSON payload. Default is false. + */ + public ListThemesResponse includeNullValues(boolean includeNullValues) { + this.includeNullValues = includeNullValues; + return this; + } + + /** Returns whether null values are explicitly serialized in the JSON payload. */ + public boolean isIncludeNullValues() { + return includeNullValues; + } + + /** + * Sets whether null values should be explicitly serialized in the JSON payload. Default is false. + */ + public void setIncludeNullValues(boolean includeNullValues) { + this.includeNullValues = includeNullValues; + } + + /** Return true if this ListThemesResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ListThemesResponse listThemesResponse = (ListThemesResponse) o; + return Objects.equals(this.data, listThemesResponse.data) + && Objects.equals(this.isSetData, listThemesResponse.isSetData) + && Objects.equals(this.hasNextPage, listThemesResponse.hasNextPage) + && Objects.equals(this.isSetHasNextPage, listThemesResponse.isSetHasNextPage); + } + + @Override + public int hashCode() { + return Objects.hash(data, isSetData, hasNextPage, isSetHasNextPage); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ListThemesResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" hasNextPage: ").append(toIndentedString(hasNextPage)).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 "); + } + + /** Returns a map of properties to be merged into the JSON payload as explicit null values. */ + @JsonInclude(JsonInclude.Include.ALWAYS) + @JsonAnyGetter + public Map getExplicitNulls() { + if (!this.includeNullValues) { + return Collections.emptyMap(); + } + + Map nulls = new HashMap<>(); + + if (isSetData) { + addIfNull(nulls, JSON_PROPERTY_DATA, this.data); + } + if (isSetHasNextPage) { + addIfNull(nulls, JSON_PROPERTY_HAS_NEXT_PAGE, this.hasNextPage); + } + + return nulls; + } + + // add to map when value is null + private void addIfNull(Map map, String key, Object value) { + if (value == null) { + map.put(key, null); + } + } + + /** + * Create an instance of ListThemesResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of ListThemesResponse + * @throws JsonProcessingException if the JSON string is invalid with respect to + * ListThemesResponse + */ + public static ListThemesResponse fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, ListThemesResponse.class); + } + + /** + * Convert an instance of ListThemesResponse to an JSON string + * + * @return JSON string + */ + public String toJson() throws JsonProcessingException { + return JSON.getMapper().writeValueAsString(this); + } +} diff --git a/src/main/java/com/adyen/model/management/LocalShopperStatement.java b/src/main/java/com/adyen/model/management/LocalShopperStatement.java index acfe4cd97..b514d4111 100644 --- a/src/main/java/com/adyen/model/management/LocalShopperStatement.java +++ b/src/main/java/com/adyen/model/management/LocalShopperStatement.java @@ -84,9 +84,30 @@ public void setScript(String script) { } /** - * The text of the local shopper statement in the specified character set. + * The localized shopper statement in the specified character set. * For `ja-Hani` the + * allowed characters are: Full-width kanji including letters, numbers, and symbols. * For + * `ja-Kana` the allowed characters are: * `Half-width katakana` * Letters: + * `a-z`, `A-Z` * Numbers: `0-9` * Symbols: `!`, + * `\"`, `#`, `$`, `%`, `&`, + * `'`, `(`, `)`, `*`, `+`, `,`, + * `-`, `.`, `/`, `:`, `;`, `<`, + * `=`, `>`, `?`, `@`, `[`, + * `\\`, `]`, `^`, `_`, `` ` ``, + * `{`, `|`, `}`, `~`, `。`, `「`, + * `」`, `、`, `・`, `ー` * - * @param value The text of the local shopper statement in the specified character set. + * @param value The localized shopper statement in the specified character set. * For + * `ja-Hani` the allowed characters are: Full-width kanji including letters, + * numbers, and symbols. * For `ja-Kana` the allowed characters are: * + * `Half-width katakana` * Letters: `a-z`, `A-Z` * Numbers: + * `0-9` * Symbols: `!`, `\"`, `#`, + * `$`, `%`, `&`, `'`, `(`, + * `)`, `*`, `+`, `,`, `-`, `.`, + * `/`, `:`, `;`, `<`, `=`, + * `>`, `?`, `@`, `[`, `\\`, + * `]`, `^`, `_`, `` ` ``, + * `{`, `|`, `}`, `~`, `。`, `「`, + * `」`, `、`, `・`, `ー` * @return the current {@code LocalShopperStatement} instance, allowing for method chaining */ public LocalShopperStatement value(String value) { @@ -96,9 +117,30 @@ public LocalShopperStatement value(String value) { } /** - * The text of the local shopper statement in the specified character set. + * The localized shopper statement in the specified character set. * For `ja-Hani` the + * allowed characters are: Full-width kanji including letters, numbers, and symbols. * For + * `ja-Kana` the allowed characters are: * `Half-width katakana` * Letters: + * `a-z`, `A-Z` * Numbers: `0-9` * Symbols: `!`, + * `\"`, `#`, `$`, `%`, `&`, + * `'`, `(`, `)`, `*`, `+`, `,`, + * `-`, `.`, `/`, `:`, `;`, `<`, + * `=`, `>`, `?`, `@`, `[`, + * `\\`, `]`, `^`, `_`, `` ` ``, + * `{`, `|`, `}`, `~`, `。`, `「`, + * `」`, `、`, `・`, `ー` * - * @return value The text of the local shopper statement in the specified character set. + * @return value The localized shopper statement in the specified character set. * For + * `ja-Hani` the allowed characters are: Full-width kanji including letters, + * numbers, and symbols. * For `ja-Kana` the allowed characters are: * + * `Half-width katakana` * Letters: `a-z`, `A-Z` * Numbers: + * `0-9` * Symbols: `!`, `\"`, `#`, + * `$`, `%`, `&`, `'`, `(`, + * `)`, `*`, `+`, `,`, `-`, `.`, + * `/`, `:`, `;`, `<`, `=`, + * `>`, `?`, `@`, `[`, `\\`, + * `]`, `^`, `_`, `` ` ``, + * `{`, `|`, `}`, `~`, `。`, `「`, + * `」`, `、`, `・`, `ー` */ @JsonProperty(JSON_PROPERTY_VALUE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -107,9 +149,30 @@ public String getValue() { } /** - * The text of the local shopper statement in the specified character set. + * The localized shopper statement in the specified character set. * For `ja-Hani` the + * allowed characters are: Full-width kanji including letters, numbers, and symbols. * For + * `ja-Kana` the allowed characters are: * `Half-width katakana` * Letters: + * `a-z`, `A-Z` * Numbers: `0-9` * Symbols: `!`, + * `\"`, `#`, `$`, `%`, `&`, + * `'`, `(`, `)`, `*`, `+`, `,`, + * `-`, `.`, `/`, `:`, `;`, `<`, + * `=`, `>`, `?`, `@`, `[`, + * `\\`, `]`, `^`, `_`, `` ` ``, + * `{`, `|`, `}`, `~`, `。`, `「`, + * `」`, `、`, `・`, `ー` * - * @param value The text of the local shopper statement in the specified character set. + * @param value The localized shopper statement in the specified character set. * For + * `ja-Hani` the allowed characters are: Full-width kanji including letters, + * numbers, and symbols. * For `ja-Kana` the allowed characters are: * + * `Half-width katakana` * Letters: `a-z`, `A-Z` * Numbers: + * `0-9` * Symbols: `!`, `\"`, `#`, + * `$`, `%`, `&`, `'`, `(`, + * `)`, `*`, `+`, `,`, `-`, `.`, + * `/`, `:`, `;`, `<`, `=`, + * `>`, `?`, `@`, `[`, `\\`, + * `]`, `^`, `_`, `` ` ``, + * `{`, `|`, `}`, `~`, `。`, `「`, + * `」`, `、`, `・`, `ー` */ @JsonProperty(JSON_PROPERTY_VALUE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) diff --git a/src/main/java/com/adyen/model/management/LocalStoreName.java b/src/main/java/com/adyen/model/management/LocalStoreName.java new file mode 100644 index 000000000..266b3cf9d --- /dev/null +++ b/src/main/java/com/adyen/model/management/LocalStoreName.java @@ -0,0 +1,249 @@ +/* + * 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 com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.core.JsonProcessingException; +import java.util.*; + +/** LocalStoreName */ +@JsonPropertyOrder({LocalStoreName.JSON_PROPERTY_SCRIPT, LocalStoreName.JSON_PROPERTY_VALUE}) +public class LocalStoreName { + public static final String JSON_PROPERTY_SCRIPT = "script"; + private String script; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetScript = false; + + public static final String JSON_PROPERTY_VALUE = "value"; + private String value; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetValue = false; + + /** + * Sets whether attributes with null values should be explicitly included in the JSON payload. + * Default is false. + */ + @JsonIgnore private boolean includeNullValues = false; + + public LocalStoreName() {} + + /** + * The character set of the localized store name. Possible values: **ja-Hani**, **ja-Kana**. + * + * @param script The character set of the localized store name. Possible values: **ja-Hani**, + * **ja-Kana**. + * @return the current {@code LocalStoreName} instance, allowing for method chaining + */ + public LocalStoreName script(String script) { + this.script = script; + isSetScript = true; // mark as set + return this; + } + + /** + * The character set of the localized store name. Possible values: **ja-Hani**, **ja-Kana**. + * + * @return script The character set of the localized store name. Possible values: **ja-Hani**, + * **ja-Kana**. + */ + @JsonProperty(JSON_PROPERTY_SCRIPT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getScript() { + return script; + } + + /** + * The character set of the localized store name. Possible values: **ja-Hani**, **ja-Kana**. + * + * @param script The character set of the localized store name. Possible values: **ja-Hani**, + * **ja-Kana**. + */ + @JsonProperty(JSON_PROPERTY_SCRIPT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setScript(String script) { + this.script = script; + isSetScript = true; // mark as set + } + + /** + * The text of the localized store name in the specified character set. * For `ja-Hani` + * the allowed characters are: Full-width kanji including letters, numbers and symbols. * For + * `ja-Kana` the allowed characters are: * Half-width katakana * Letters: + * `a-z`, `A-Z` * Numbers: `0-9` * Symbols: + * `-`,`ー`,`・`,`.` + * + * @param value The text of the localized store name in the specified character set. * For + * `ja-Hani` the allowed characters are: Full-width kanji including letters, numbers + * and symbols. * For `ja-Kana` the allowed characters are: * Half-width katakana * + * Letters: `a-z`, `A-Z` * Numbers: `0-9` * Symbols: + * `-`,`ー`,`・`,`.` + * @return the current {@code LocalStoreName} instance, allowing for method chaining + */ + public LocalStoreName value(String value) { + this.value = value; + isSetValue = true; // mark as set + return this; + } + + /** + * The text of the localized store name in the specified character set. * For `ja-Hani` + * the allowed characters are: Full-width kanji including letters, numbers and symbols. * For + * `ja-Kana` the allowed characters are: * Half-width katakana * Letters: + * `a-z`, `A-Z` * Numbers: `0-9` * Symbols: + * `-`,`ー`,`・`,`.` + * + * @return value The text of the localized store name in the specified character set. * For + * `ja-Hani` the allowed characters are: Full-width kanji including letters, numbers + * and symbols. * For `ja-Kana` the allowed characters are: * Half-width katakana * + * Letters: `a-z`, `A-Z` * Numbers: `0-9` * Symbols: + * `-`,`ー`,`・`,`.` + */ + @JsonProperty(JSON_PROPERTY_VALUE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getValue() { + return value; + } + + /** + * The text of the localized store name in the specified character set. * For `ja-Hani` + * the allowed characters are: Full-width kanji including letters, numbers and symbols. * For + * `ja-Kana` the allowed characters are: * Half-width katakana * Letters: + * `a-z`, `A-Z` * Numbers: `0-9` * Symbols: + * `-`,`ー`,`・`,`.` + * + * @param value The text of the localized store name in the specified character set. * For + * `ja-Hani` the allowed characters are: Full-width kanji including letters, numbers + * and symbols. * For `ja-Kana` the allowed characters are: * Half-width katakana * + * Letters: `a-z`, `A-Z` * Numbers: `0-9` * Symbols: + * `-`,`ー`,`・`,`.` + */ + @JsonProperty(JSON_PROPERTY_VALUE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setValue(String value) { + this.value = value; + isSetValue = true; // mark as set + } + + /** + * Configures whether null values are explicitly serialized in the JSON payload. Default is false. + */ + public LocalStoreName includeNullValues(boolean includeNullValues) { + this.includeNullValues = includeNullValues; + return this; + } + + /** Returns whether null values are explicitly serialized in the JSON payload. */ + public boolean isIncludeNullValues() { + return includeNullValues; + } + + /** + * Sets whether null values should be explicitly serialized in the JSON payload. Default is false. + */ + public void setIncludeNullValues(boolean includeNullValues) { + this.includeNullValues = includeNullValues; + } + + /** Return true if this LocalStoreName object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LocalStoreName localStoreName = (LocalStoreName) o; + return Objects.equals(this.script, localStoreName.script) + && Objects.equals(this.isSetScript, localStoreName.isSetScript) + && Objects.equals(this.value, localStoreName.value) + && Objects.equals(this.isSetValue, localStoreName.isSetValue); + } + + @Override + public int hashCode() { + return Objects.hash(script, isSetScript, value, isSetValue); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LocalStoreName {\n"); + sb.append(" script: ").append(toIndentedString(script)).append("\n"); + sb.append(" value: ").append(toIndentedString(value)).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 "); + } + + /** Returns a map of properties to be merged into the JSON payload as explicit null values. */ + @JsonInclude(JsonInclude.Include.ALWAYS) + @JsonAnyGetter + public Map getExplicitNulls() { + if (!this.includeNullValues) { + return Collections.emptyMap(); + } + + Map nulls = new HashMap<>(); + + if (isSetScript) { + addIfNull(nulls, JSON_PROPERTY_SCRIPT, this.script); + } + if (isSetValue) { + addIfNull(nulls, JSON_PROPERTY_VALUE, this.value); + } + + return nulls; + } + + // add to map when value is null + private void addIfNull(Map map, String key, Object value) { + if (value == null) { + map.put(key, null); + } + } + + /** + * Create an instance of LocalStoreName given an JSON string + * + * @param jsonString JSON string + * @return An instance of LocalStoreName + * @throws JsonProcessingException if the JSON string is invalid with respect to LocalStoreName + */ + public static LocalStoreName fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, LocalStoreName.class); + } + + /** + * Convert an instance of LocalStoreName to an JSON string + * + * @return JSON string + */ + public String toJson() throws JsonProcessingException { + return JSON.getMapper().writeValueAsString(this); + } +} diff --git a/src/main/java/com/adyen/model/management/LocalizedInformation.java b/src/main/java/com/adyen/model/management/LocalizedInformation.java index b5820df6f..263e42b6b 100644 --- a/src/main/java/com/adyen/model/management/LocalizedInformation.java +++ b/src/main/java/com/adyen/model/management/LocalizedInformation.java @@ -22,7 +22,11 @@ import java.util.List; /** LocalizedInformation */ -@JsonPropertyOrder({LocalizedInformation.JSON_PROPERTY_LOCAL_SHOPPER_STATEMENT}) +@JsonPropertyOrder({ + LocalizedInformation.JSON_PROPERTY_LOCAL_SHOPPER_STATEMENT, + LocalizedInformation.JSON_PROPERTY_LOCAL_STORE_NAME, + LocalizedInformation.JSON_PROPERTY_LOCALIZED_ADDRESS +}) public class LocalizedInformation { public static final String JSON_PROPERTY_LOCAL_SHOPPER_STATEMENT = "localShopperStatement"; private List localShopperStatement; @@ -30,6 +34,18 @@ public class LocalizedInformation { /** Mark when the attribute has been explicitly set. */ private boolean isSetLocalShopperStatement = false; + public static final String JSON_PROPERTY_LOCAL_STORE_NAME = "localStoreName"; + private List localStoreName; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetLocalStoreName = false; + + public static final String JSON_PROPERTY_LOCALIZED_ADDRESS = "localizedAddress"; + private List localizedAddress; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetLocalizedAddress = false; + /** * Sets whether attributes with null values should be explicitly included in the JSON payload. * Default is false. @@ -92,6 +108,119 @@ public void setLocalShopperStatement(List localShopperSta isSetLocalShopperStatement = true; // mark as set } + /** + * An array of localized store names. Used for payment method onboarding in Japan. Possible + * scripts: **ja-Hani**, **ja-Kana**. + * + * @param localStoreName An array of localized store names. Used for payment method onboarding in + * Japan. Possible scripts: **ja-Hani**, **ja-Kana**. + * @return the current {@code LocalizedInformation} instance, allowing for method chaining + */ + public LocalizedInformation localStoreName(List localStoreName) { + this.localStoreName = localStoreName; + isSetLocalStoreName = true; // mark as set + return this; + } + + public LocalizedInformation addLocalStoreNameItem(LocalStoreName localStoreNameItem) { + if (this.localStoreName == null) { + this.localStoreName = new ArrayList<>(); + } + this.localStoreName.add(localStoreNameItem); + return this; + } + + /** + * An array of localized store names. Used for payment method onboarding in Japan. Possible + * scripts: **ja-Hani**, **ja-Kana**. + * + * @return localStoreName An array of localized store names. Used for payment method onboarding in + * Japan. Possible scripts: **ja-Hani**, **ja-Kana**. + */ + @JsonProperty(JSON_PROPERTY_LOCAL_STORE_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getLocalStoreName() { + return localStoreName; + } + + /** + * An array of localized store names. Used for payment method onboarding in Japan. Possible + * scripts: **ja-Hani**, **ja-Kana**. + * + * @param localStoreName An array of localized store names. Used for payment method onboarding in + * Japan. Possible scripts: **ja-Hani**, **ja-Kana**. + */ + @JsonProperty(JSON_PROPERTY_LOCAL_STORE_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setLocalStoreName(List localStoreName) { + this.localStoreName = localStoreName; + isSetLocalStoreName = true; // mark as set + } + + /** + * An array of localized addresses. Used for payment method onboarding in Japan. The + * `script` of each address selects which fields it carries, so each locale sends the + * fields its addresses have. For Japanese stores, both **ja-Hani** and **ja-Kana** addresses are + * required. + * + * @param localizedAddress An array of localized addresses. Used for payment method onboarding in + * Japan. The `script` of each address selects which fields it carries, so each + * locale sends the fields its addresses have. For Japanese stores, both **ja-Hani** and + * **ja-Kana** addresses are required. + * @return the current {@code LocalizedInformation} instance, allowing for method chaining + */ + public LocalizedInformation localizedAddress( + List localizedAddress) { + this.localizedAddress = localizedAddress; + isSetLocalizedAddress = true; // mark as set + return this; + } + + public LocalizedInformation addLocalizedAddressItem( + LocalizedInformationLocalizedAddressInner localizedAddressItem) { + if (this.localizedAddress == null) { + this.localizedAddress = new ArrayList<>(); + } + this.localizedAddress.add(localizedAddressItem); + return this; + } + + /** + * An array of localized addresses. Used for payment method onboarding in Japan. The + * `script` of each address selects which fields it carries, so each locale sends the + * fields its addresses have. For Japanese stores, both **ja-Hani** and **ja-Kana** addresses are + * required. + * + * @return localizedAddress An array of localized addresses. Used for payment method onboarding in + * Japan. The `script` of each address selects which fields it carries, so each + * locale sends the fields its addresses have. For Japanese stores, both **ja-Hani** and + * **ja-Kana** addresses are required. + */ + @JsonProperty(JSON_PROPERTY_LOCALIZED_ADDRESS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getLocalizedAddress() { + return localizedAddress; + } + + /** + * An array of localized addresses. Used for payment method onboarding in Japan. The + * `script` of each address selects which fields it carries, so each locale sends the + * fields its addresses have. For Japanese stores, both **ja-Hani** and **ja-Kana** addresses are + * required. + * + * @param localizedAddress An array of localized addresses. Used for payment method onboarding in + * Japan. The `script` of each address selects which fields it carries, so each + * locale sends the fields its addresses have. For Japanese stores, both **ja-Hani** and + * **ja-Kana** addresses are required. + */ + @JsonProperty(JSON_PROPERTY_LOCALIZED_ADDRESS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setLocalizedAddress( + List localizedAddress) { + this.localizedAddress = localizedAddress; + isSetLocalizedAddress = true; // mark as set + } + /** * Configures whether null values are explicitly serialized in the JSON payload. Default is false. */ @@ -124,12 +253,22 @@ public boolean equals(Object o) { LocalizedInformation localizedInformation = (LocalizedInformation) o; return Objects.equals(this.localShopperStatement, localizedInformation.localShopperStatement) && Objects.equals( - this.isSetLocalShopperStatement, localizedInformation.isSetLocalShopperStatement); + this.isSetLocalShopperStatement, localizedInformation.isSetLocalShopperStatement) + && Objects.equals(this.localStoreName, localizedInformation.localStoreName) + && Objects.equals(this.isSetLocalStoreName, localizedInformation.isSetLocalStoreName) + && Objects.equals(this.localizedAddress, localizedInformation.localizedAddress) + && Objects.equals(this.isSetLocalizedAddress, localizedInformation.isSetLocalizedAddress); } @Override public int hashCode() { - return Objects.hash(localShopperStatement, isSetLocalShopperStatement); + return Objects.hash( + localShopperStatement, + isSetLocalShopperStatement, + localStoreName, + isSetLocalStoreName, + localizedAddress, + isSetLocalizedAddress); } @Override @@ -139,6 +278,8 @@ public String toString() { sb.append(" localShopperStatement: ") .append(toIndentedString(localShopperStatement)) .append("\n"); + sb.append(" localStoreName: ").append(toIndentedString(localStoreName)).append("\n"); + sb.append(" localizedAddress: ").append(toIndentedString(localizedAddress)).append("\n"); sb.append("}"); return sb.toString(); } @@ -166,6 +307,12 @@ public Map getExplicitNulls() { if (isSetLocalShopperStatement) { addIfNull(nulls, JSON_PROPERTY_LOCAL_SHOPPER_STATEMENT, this.localShopperStatement); } + if (isSetLocalStoreName) { + addIfNull(nulls, JSON_PROPERTY_LOCAL_STORE_NAME, this.localStoreName); + } + if (isSetLocalizedAddress) { + addIfNull(nulls, JSON_PROPERTY_LOCALIZED_ADDRESS, this.localizedAddress); + } return nulls; } diff --git a/src/main/java/com/adyen/model/management/LocalizedInformationLocalizedAddressInner.java b/src/main/java/com/adyen/model/management/LocalizedInformationLocalizedAddressInner.java new file mode 100644 index 000000000..e38203ad9 --- /dev/null +++ b/src/main/java/com/adyen/model/management/LocalizedInformationLocalizedAddressInner.java @@ -0,0 +1,225 @@ +/* + * 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 com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.core.JsonToken; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.JsonMappingException; +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.MapperFeature; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import jakarta.ws.rs.core.GenericType; +import java.io.IOException; +import java.util.*; +import java.util.Arrays; +import java.util.Collections; +import java.util.HashSet; +import java.util.logging.Level; +import java.util.logging.Logger; + +@JsonDeserialize( + using = + LocalizedInformationLocalizedAddressInner + .LocalizedInformationLocalizedAddressInnerDeserializer.class) +@JsonSerialize( + using = + LocalizedInformationLocalizedAddressInner + .LocalizedInformationLocalizedAddressInnerSerializer.class) +public class LocalizedInformationLocalizedAddressInner extends AbstractOpenApiSchema { + private static final Logger log = + Logger.getLogger(LocalizedInformationLocalizedAddressInner.class.getName()); + + public static class LocalizedInformationLocalizedAddressInnerSerializer + extends StdSerializer { + public LocalizedInformationLocalizedAddressInnerSerializer( + Class t) { + super(t); + } + + public LocalizedInformationLocalizedAddressInnerSerializer() { + this(null); + } + + @Override + public void serialize( + LocalizedInformationLocalizedAddressInner value, + JsonGenerator jgen, + SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.getActualInstance()); + } + } + + public static class LocalizedInformationLocalizedAddressInnerDeserializer + extends StdDeserializer { + public LocalizedInformationLocalizedAddressInnerDeserializer() { + this(LocalizedInformationLocalizedAddressInner.class); + } + + public LocalizedInformationLocalizedAddressInnerDeserializer(Class vc) { + super(vc); + } + + @Override + public LocalizedInformationLocalizedAddressInner deserialize( + JsonParser jp, DeserializationContext ctxt) throws IOException, JsonProcessingException { + JsonNode tree = jp.readValueAsTree(); + Object deserialized = null; + boolean typeCoercion = ctxt.isEnabled(MapperFeature.ALLOW_COERCION_OF_SCALARS); + int match = 0; + JsonToken token = tree.traverse(jp.getCodec()).nextToken(); + // deserialize JapaneseLocalizedAddress + try { + boolean attemptParsing = true; + if (attemptParsing) { + // Checks if the unique type of the oneOf json matches any of the object TypeEnum values + boolean typeMatch = false; + if (tree.findValue("type") != null) { + typeMatch = + Arrays.stream(JapaneseLocalizedAddress.TypeEnum.values()) + .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + } + + if (typeMatch) { + deserialized = tree.traverse(jp.getCodec()).readValueAs(JapaneseLocalizedAddress.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + match++; + log.log(Level.FINER, "Input data matches schema 'JapaneseLocalizedAddress'"); + } + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'JapaneseLocalizedAddress'", e); + } + + if (match == 1) { + LocalizedInformationLocalizedAddressInner ret = + new LocalizedInformationLocalizedAddressInner(); + ret.setActualInstance(deserialized); + return ret; + } + throw new IOException( + String.format( + "Failed deserialization for LocalizedInformationLocalizedAddressInner: %d classes match result, expected 1", + match)); + } + + /** Handle deserialization of the 'null' value. */ + @Override + public LocalizedInformationLocalizedAddressInner getNullValue(DeserializationContext ctxt) + throws JsonMappingException { + throw new JsonMappingException( + ctxt.getParser(), "LocalizedInformationLocalizedAddressInner cannot be null"); + } + } + + // store a list of schema names defined in oneOf + public static final Map> schemas = new HashMap<>(); + + public LocalizedInformationLocalizedAddressInner() { + super("oneOf", Boolean.FALSE); + } + + public LocalizedInformationLocalizedAddressInner(JapaneseLocalizedAddress o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + static { + schemas.put("JapaneseLocalizedAddress", new GenericType() {}); + JSON.registerDescendants( + LocalizedInformationLocalizedAddressInner.class, Collections.unmodifiableMap(schemas)); + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap<>(); + mappings.put("ja-Hani", JapaneseLocalizedAddress.class); + mappings.put("ja-Kana", JapaneseLocalizedAddress.class); + mappings.put("JapaneseLocalizedAddress", JapaneseLocalizedAddress.class); + mappings.put( + "LocalizedInformation_localizedAddress_inner", + LocalizedInformationLocalizedAddressInner.class); + JSON.registerDiscriminator(LocalizedInformationLocalizedAddressInner.class, "script", mappings); + } + + @Override + public Map> getSchemas() { + return LocalizedInformationLocalizedAddressInner.schemas; + } + + /** + * Set the instance that matches the oneOf child schema, check the instance parameter is valid + * against the oneOf child schemas: JapaneseLocalizedAddress + * + *

It could be an instance of the 'oneOf' schemas. The oneOf child schemas may themselves be a + * composed schema (allOf, anyOf, oneOf). + */ + @Override + public void setActualInstance(Object instance) { + if (JSON.isInstanceOf(JapaneseLocalizedAddress.class, instance, new HashSet<>())) { + super.setActualInstance(instance); + return; + } + + throw new RuntimeException("Invalid instance type. Must be JapaneseLocalizedAddress"); + } + + /** + * Get the actual instance, which can be the following: JapaneseLocalizedAddress + * + * @return The actual instance (JapaneseLocalizedAddress) + */ + @Override + public Object getActualInstance() { + return super.getActualInstance(); + } + + /** + * Get the actual instance of `JapaneseLocalizedAddress`. If the actual instance is not + * `JapaneseLocalizedAddress`, the ClassCastException will be thrown. + * + * @return The actual instance of `JapaneseLocalizedAddress` + * @throws ClassCastException if the instance is not `JapaneseLocalizedAddress` + */ + public JapaneseLocalizedAddress getJapaneseLocalizedAddress() throws ClassCastException { + return (JapaneseLocalizedAddress) super.getActualInstance(); + } + + /** + * Create an instance of LocalizedInformationLocalizedAddressInner given an JSON string + * + * @param jsonString JSON string + * @return An instance of LocalizedInformationLocalizedAddressInner + * @throws IOException if the JSON string is invalid with respect to + * LocalizedInformationLocalizedAddressInner + */ + public static LocalizedInformationLocalizedAddressInner fromJson(String jsonString) + throws IOException { + return JSON.getMapper().readValue(jsonString, LocalizedInformationLocalizedAddressInner.class); + } + + /** + * Convert an instance of LocalizedInformationLocalizedAddressInner to an JSON string + * + * @return JSON string + */ + public String toJson() throws JsonProcessingException { + return JSON.getMapper().writeValueAsString(this); + } +} diff --git a/src/main/java/com/adyen/model/management/NyceInfo.java b/src/main/java/com/adyen/model/management/NyceInfo.java index 764681709..c29e81d80 100644 --- a/src/main/java/com/adyen/model/management/NyceInfo.java +++ b/src/main/java/com/adyen/model/management/NyceInfo.java @@ -30,12 +30,13 @@ }) public class NyceInfo { /** - * The type of transactions processed over this payment method. Allowed values: - **pos** for - * in-person payments. - **billpay** for subscription payments, both the initial payment and the - * later recurring payments. These transactions have `recurringProcessingModel` - * **Subscription**. - **ecom** for all other card not present transactions. This includes - * non-recurring transactions and transactions with `recurringProcessingModel` - * **CardOnFile** or **UnscheduledCardOnFile**. + * The type of transactions processed over this payment method. The recommended usage is to not + * specify a processing type. We then set up the payment method to process all transaction types. + * Allowed values: - **pos** for in-person payments. - **billpay** for subscription payments, both + * the initial payment and the later recurring payments. These transactions have + * `recurringProcessingModel` **Subscription**. - **ecom** for all other card not + * present transactions. This includes non-recurring transactions and transactions with + * `recurringProcessingModel` **CardOnFile** or **UnscheduledCardOnFile**. */ public enum ProcessingTypeEnum { BILLPAY(String.valueOf("billpay")), @@ -100,19 +101,22 @@ public static ProcessingTypeEnum fromValue(String value) { public NyceInfo() {} /** - * The type of transactions processed over this payment method. Allowed values: - **pos** for - * in-person payments. - **billpay** for subscription payments, both the initial payment and the - * later recurring payments. These transactions have `recurringProcessingModel` - * **Subscription**. - **ecom** for all other card not present transactions. This includes - * non-recurring transactions and transactions with `recurringProcessingModel` - * **CardOnFile** or **UnscheduledCardOnFile**. + * The type of transactions processed over this payment method. The recommended usage is to not + * specify a processing type. We then set up the payment method to process all transaction types. + * Allowed values: - **pos** for in-person payments. - **billpay** for subscription payments, both + * the initial payment and the later recurring payments. These transactions have + * `recurringProcessingModel` **Subscription**. - **ecom** for all other card not + * present transactions. This includes non-recurring transactions and transactions with + * `recurringProcessingModel` **CardOnFile** or **UnscheduledCardOnFile**. * - * @param processingType The type of transactions processed over this payment method. Allowed - * values: - **pos** for in-person payments. - **billpay** for subscription payments, both the - * initial payment and the later recurring payments. These transactions have - * `recurringProcessingModel` **Subscription**. - **ecom** for all other card not - * present transactions. This includes non-recurring transactions and transactions with - * `recurringProcessingModel` **CardOnFile** or **UnscheduledCardOnFile**. + * @param processingType The type of transactions processed over this payment method. The + * recommended usage is to not specify a processing type. We then set up the payment method to + * process all transaction types. Allowed values: - **pos** for in-person payments. - + * **billpay** for subscription payments, both the initial payment and the later recurring + * payments. These transactions have `recurringProcessingModel` **Subscription**. - + * **ecom** for all other card not present transactions. This includes non-recurring + * transactions and transactions with `recurringProcessingModel` **CardOnFile** or + * **UnscheduledCardOnFile**. * @return the current {@code NyceInfo} instance, allowing for method chaining */ public NyceInfo processingType(ProcessingTypeEnum processingType) { @@ -122,19 +126,22 @@ public NyceInfo processingType(ProcessingTypeEnum processingType) { } /** - * The type of transactions processed over this payment method. Allowed values: - **pos** for - * in-person payments. - **billpay** for subscription payments, both the initial payment and the - * later recurring payments. These transactions have `recurringProcessingModel` - * **Subscription**. - **ecom** for all other card not present transactions. This includes - * non-recurring transactions and transactions with `recurringProcessingModel` - * **CardOnFile** or **UnscheduledCardOnFile**. + * The type of transactions processed over this payment method. The recommended usage is to not + * specify a processing type. We then set up the payment method to process all transaction types. + * Allowed values: - **pos** for in-person payments. - **billpay** for subscription payments, both + * the initial payment and the later recurring payments. These transactions have + * `recurringProcessingModel` **Subscription**. - **ecom** for all other card not + * present transactions. This includes non-recurring transactions and transactions with + * `recurringProcessingModel` **CardOnFile** or **UnscheduledCardOnFile**. * - * @return processingType The type of transactions processed over this payment method. Allowed - * values: - **pos** for in-person payments. - **billpay** for subscription payments, both the - * initial payment and the later recurring payments. These transactions have - * `recurringProcessingModel` **Subscription**. - **ecom** for all other card not - * present transactions. This includes non-recurring transactions and transactions with - * `recurringProcessingModel` **CardOnFile** or **UnscheduledCardOnFile**. + * @return processingType The type of transactions processed over this payment method. The + * recommended usage is to not specify a processing type. We then set up the payment method to + * process all transaction types. Allowed values: - **pos** for in-person payments. - + * **billpay** for subscription payments, both the initial payment and the later recurring + * payments. These transactions have `recurringProcessingModel` **Subscription**. - + * **ecom** for all other card not present transactions. This includes non-recurring + * transactions and transactions with `recurringProcessingModel` **CardOnFile** or + * **UnscheduledCardOnFile**. */ @JsonProperty(JSON_PROPERTY_PROCESSING_TYPE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -143,19 +150,22 @@ public ProcessingTypeEnum getProcessingType() { } /** - * The type of transactions processed over this payment method. Allowed values: - **pos** for - * in-person payments. - **billpay** for subscription payments, both the initial payment and the - * later recurring payments. These transactions have `recurringProcessingModel` - * **Subscription**. - **ecom** for all other card not present transactions. This includes - * non-recurring transactions and transactions with `recurringProcessingModel` - * **CardOnFile** or **UnscheduledCardOnFile**. + * The type of transactions processed over this payment method. The recommended usage is to not + * specify a processing type. We then set up the payment method to process all transaction types. + * Allowed values: - **pos** for in-person payments. - **billpay** for subscription payments, both + * the initial payment and the later recurring payments. These transactions have + * `recurringProcessingModel` **Subscription**. - **ecom** for all other card not + * present transactions. This includes non-recurring transactions and transactions with + * `recurringProcessingModel` **CardOnFile** or **UnscheduledCardOnFile**. * - * @param processingType The type of transactions processed over this payment method. Allowed - * values: - **pos** for in-person payments. - **billpay** for subscription payments, both the - * initial payment and the later recurring payments. These transactions have - * `recurringProcessingModel` **Subscription**. - **ecom** for all other card not - * present transactions. This includes non-recurring transactions and transactions with - * `recurringProcessingModel` **CardOnFile** or **UnscheduledCardOnFile**. + * @param processingType The type of transactions processed over this payment method. The + * recommended usage is to not specify a processing type. We then set up the payment method to + * process all transaction types. Allowed values: - **pos** for in-person payments. - + * **billpay** for subscription payments, both the initial payment and the later recurring + * payments. These transactions have `recurringProcessingModel` **Subscription**. - + * **ecom** for all other card not present transactions. This includes non-recurring + * transactions and transactions with `recurringProcessingModel` **CardOnFile** or + * **UnscheduledCardOnFile**. */ @JsonProperty(JSON_PROPERTY_PROCESSING_TYPE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) diff --git a/src/main/java/com/adyen/model/management/NyceResponseInfo.java b/src/main/java/com/adyen/model/management/NyceResponseInfo.java index f9685e484..0c410c4e1 100644 --- a/src/main/java/com/adyen/model/management/NyceResponseInfo.java +++ b/src/main/java/com/adyen/model/management/NyceResponseInfo.java @@ -25,10 +25,65 @@ /** NyceResponseInfo */ @JsonPropertyOrder({ + NyceResponseInfo.JSON_PROPERTY_NETWORK_PROCESSING_MODE, NyceResponseInfo.JSON_PROPERTY_PROCESSING_TYPE, NyceResponseInfo.JSON_PROPERTY_TRANSACTION_DESCRIPTION }) public class NyceResponseInfo { + /** + * Indicates the processing flow for the payment method. Possible values: - **auth**: If you have + * not [configured automatic + * capture](https://docs.adyen.com/online-payments/capture#types-of-capture) for the transaction, + * you must manually capture the funds. - **sale**: You do not need to separately capture the + * funds, because capture happens automatically as part of the transaction, together with + * authorization. + */ + public enum NetworkProcessingModeEnum { + AUTH(String.valueOf("auth")), + + SALE(String.valueOf("sale")); + + private static final Logger LOG = Logger.getLogger(NetworkProcessingModeEnum.class.getName()); + + private String value; + + NetworkProcessingModeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static NetworkProcessingModeEnum fromValue(String value) { + for (NetworkProcessingModeEnum b : NetworkProcessingModeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + // handling unexpected value + LOG.warning( + "NetworkProcessingModeEnum: unexpected enum value '" + + value + + "' - Supported values are " + + Arrays.toString(NetworkProcessingModeEnum.values())); + return null; + } + } + + public static final String JSON_PROPERTY_NETWORK_PROCESSING_MODE = "networkProcessingMode"; + private NetworkProcessingModeEnum networkProcessingMode; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetNetworkProcessingMode = false; + /** * The type of transactions processed over this payment method. Allowed values: - **pos** for * in-person payments. - **billpay** for subscription payments, both the initial payment and the @@ -99,6 +154,71 @@ public static ProcessingTypeEnum fromValue(String value) { public NyceResponseInfo() {} + /** + * Indicates the processing flow for the payment method. Possible values: - **auth**: If you have + * not [configured automatic + * capture](https://docs.adyen.com/online-payments/capture#types-of-capture) for the transaction, + * you must manually capture the funds. - **sale**: You do not need to separately capture the + * funds, because capture happens automatically as part of the transaction, together with + * authorization. + * + * @param networkProcessingMode Indicates the processing flow for the payment method. Possible + * values: - **auth**: If you have not [configured automatic + * capture](https://docs.adyen.com/online-payments/capture#types-of-capture) for the + * transaction, you must manually capture the funds. - **sale**: You do not need to separately + * capture the funds, because capture happens automatically as part of the transaction, + * together with authorization. + * @return the current {@code NyceResponseInfo} instance, allowing for method chaining + */ + public NyceResponseInfo networkProcessingMode(NetworkProcessingModeEnum networkProcessingMode) { + this.networkProcessingMode = networkProcessingMode; + isSetNetworkProcessingMode = true; // mark as set + return this; + } + + /** + * Indicates the processing flow for the payment method. Possible values: - **auth**: If you have + * not [configured automatic + * capture](https://docs.adyen.com/online-payments/capture#types-of-capture) for the transaction, + * you must manually capture the funds. - **sale**: You do not need to separately capture the + * funds, because capture happens automatically as part of the transaction, together with + * authorization. + * + * @return networkProcessingMode Indicates the processing flow for the payment method. Possible + * values: - **auth**: If you have not [configured automatic + * capture](https://docs.adyen.com/online-payments/capture#types-of-capture) for the + * transaction, you must manually capture the funds. - **sale**: You do not need to separately + * capture the funds, because capture happens automatically as part of the transaction, + * together with authorization. + */ + @JsonProperty(JSON_PROPERTY_NETWORK_PROCESSING_MODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public NetworkProcessingModeEnum getNetworkProcessingMode() { + return networkProcessingMode; + } + + /** + * Indicates the processing flow for the payment method. Possible values: - **auth**: If you have + * not [configured automatic + * capture](https://docs.adyen.com/online-payments/capture#types-of-capture) for the transaction, + * you must manually capture the funds. - **sale**: You do not need to separately capture the + * funds, because capture happens automatically as part of the transaction, together with + * authorization. + * + * @param networkProcessingMode Indicates the processing flow for the payment method. Possible + * values: - **auth**: If you have not [configured automatic + * capture](https://docs.adyen.com/online-payments/capture#types-of-capture) for the + * transaction, you must manually capture the funds. - **sale**: You do not need to separately + * capture the funds, because capture happens automatically as part of the transaction, + * together with authorization. + */ + @JsonProperty(JSON_PROPERTY_NETWORK_PROCESSING_MODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setNetworkProcessingMode(NetworkProcessingModeEnum networkProcessingMode) { + this.networkProcessingMode = networkProcessingMode; + isSetNetworkProcessingMode = true; // mark as set + } + /** * The type of transactions processed over this payment method. Allowed values: - **pos** for * in-person payments. - **billpay** for subscription payments, both the initial payment and the @@ -230,7 +350,10 @@ public boolean equals(Object o) { return false; } NyceResponseInfo nyceResponseInfo = (NyceResponseInfo) o; - return Objects.equals(this.processingType, nyceResponseInfo.processingType) + return Objects.equals(this.networkProcessingMode, nyceResponseInfo.networkProcessingMode) + && Objects.equals( + this.isSetNetworkProcessingMode, nyceResponseInfo.isSetNetworkProcessingMode) + && Objects.equals(this.processingType, nyceResponseInfo.processingType) && Objects.equals(this.isSetProcessingType, nyceResponseInfo.isSetProcessingType) && Objects.equals(this.transactionDescription, nyceResponseInfo.transactionDescription) && Objects.equals( @@ -240,13 +363,21 @@ public boolean equals(Object o) { @Override public int hashCode() { return Objects.hash( - processingType, isSetProcessingType, transactionDescription, isSetTransactionDescription); + networkProcessingMode, + isSetNetworkProcessingMode, + processingType, + isSetProcessingType, + transactionDescription, + isSetTransactionDescription); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class NyceResponseInfo {\n"); + sb.append(" networkProcessingMode: ") + .append(toIndentedString(networkProcessingMode)) + .append("\n"); sb.append(" processingType: ").append(toIndentedString(processingType)).append("\n"); sb.append(" transactionDescription: ") .append(toIndentedString(transactionDescription)) @@ -275,6 +406,9 @@ public Map getExplicitNulls() { Map nulls = new HashMap<>(); + if (isSetNetworkProcessingMode) { + addIfNull(nulls, JSON_PROPERTY_NETWORK_PROCESSING_MODE, this.networkProcessingMode); + } if (isSetProcessingType) { addIfNull(nulls, JSON_PROPERTY_PROCESSING_TYPE, this.processingType); } diff --git a/src/main/java/com/adyen/model/management/PaymentMethod.java b/src/main/java/com/adyen/model/management/PaymentMethod.java index da6d02b24..b6e73d85a 100644 --- a/src/main/java/com/adyen/model/management/PaymentMethod.java +++ b/src/main/java/com/adyen/model/management/PaymentMethod.java @@ -33,9 +33,11 @@ PaymentMethod.JSON_PROPERTY_ALIPAY_PLUS, PaymentMethod.JSON_PROPERTY_ALLOWED, PaymentMethod.JSON_PROPERTY_AMEX, + PaymentMethod.JSON_PROPERTY_ANCV, PaymentMethod.JSON_PROPERTY_APPLE_PAY, PaymentMethod.JSON_PROPERTY_ASSOCIATED_PAYMENT_METHODS, PaymentMethod.JSON_PROPERTY_BCMC, + PaymentMethod.JSON_PROPERTY_BONCARD, PaymentMethod.JSON_PROPERTY_BUSINESS_LINE_ID, PaymentMethod.JSON_PROPERTY_CARNET, PaymentMethod.JSON_PROPERTY_CARTES_BANCAIRES, @@ -46,6 +48,7 @@ PaymentMethod.JSON_PROPERTY_CUSTOM_ROUTING_FLAGS, PaymentMethod.JSON_PROPERTY_DINERS, PaymentMethod.JSON_PROPERTY_DISCOVER, + PaymentMethod.JSON_PROPERTY_EBT, PaymentMethod.JSON_PROPERTY_EFT_DIRECTDEBIT_C_A, PaymentMethod.JSON_PROPERTY_EFTPOS_AUSTRALIA, PaymentMethod.JSON_PROPERTY_ENABLED, @@ -61,11 +64,15 @@ PaymentMethod.JSON_PROPERTY_MAESTRO_USA, PaymentMethod.JSON_PROPERTY_MC, PaymentMethod.JSON_PROPERTY_MEAL_VOUCHER_F_R, + PaymentMethod.JSON_PROPERTY_MERCHANT_CATEGORY_CODE, + PaymentMethod.JSON_PROPERTY_MID, PaymentMethod.JSON_PROPERTY_NYCE, PaymentMethod.JSON_PROPERTY_PAYBYBANK_PLAID, + PaymentMethod.JSON_PROPERTY_PAYBYBANK_PLAID_CA, PaymentMethod.JSON_PROPERTY_PAYME, PaymentMethod.JSON_PROPERTY_PAYPAL, PaymentMethod.JSON_PROPERTY_PAYTO, + PaymentMethod.JSON_PROPERTY_PIX, PaymentMethod.JSON_PROPERTY_PULSE, PaymentMethod.JSON_PROPERTY_REFERENCE, PaymentMethod.JSON_PROPERTY_SEPADIRECTDEBIT, @@ -123,6 +130,12 @@ public class PaymentMethod { /** Mark when the attribute has been explicitly set. */ private boolean isSetAmex = false; + public static final String JSON_PROPERTY_ANCV = "ancv"; + private AncvResponseInfo ancv; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetAncv = false; + public static final String JSON_PROPERTY_APPLE_PAY = "applePay"; private ApplePayResponseInfo applePay; @@ -141,6 +154,12 @@ public class PaymentMethod { /** Mark when the attribute has been explicitly set. */ private boolean isSetBcmc = false; + public static final String JSON_PROPERTY_BONCARD = "boncard"; + private BoncardResponseInfo boncard; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetBoncard = false; + public static final String JSON_PROPERTY_BUSINESS_LINE_ID = "businessLineId"; private String businessLineId; @@ -201,6 +220,12 @@ public class PaymentMethod { /** Mark when the attribute has been explicitly set. */ private boolean isSetDiscover = false; + public static final String JSON_PROPERTY_EBT = "ebt"; + private EbtResponseInfo ebt; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetEbt = false; + public static final String JSON_PROPERTY_EFT_DIRECTDEBIT_C_A = "eft_directdebit_CA"; private EFTDirectDebitCAResponseInfo eftDirectdebitCA; @@ -291,6 +316,18 @@ public class PaymentMethod { /** Mark when the attribute has been explicitly set. */ private boolean isSetMealVoucherFR = false; + public static final String JSON_PROPERTY_MERCHANT_CATEGORY_CODE = "merchantCategoryCode"; + private String merchantCategoryCode; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetMerchantCategoryCode = false; + + public static final String JSON_PROPERTY_MID = "mid"; + private String mid; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetMid = false; + public static final String JSON_PROPERTY_NYCE = "nyce"; private NyceResponseInfo nyce; @@ -303,6 +340,12 @@ public class PaymentMethod { /** Mark when the attribute has been explicitly set. */ private boolean isSetPaybybankPlaid = false; + public static final String JSON_PROPERTY_PAYBYBANK_PLAID_CA = "paybybank_plaid_ca"; + private PayByBankPlaidResponseInfo paybybankPlaidCa; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetPaybybankPlaidCa = false; + public static final String JSON_PROPERTY_PAYME = "payme"; private PayMeResponseInfo payme; @@ -321,6 +364,12 @@ public class PaymentMethod { /** Mark when the attribute has been explicitly set. */ private boolean isSetPayto = false; + public static final String JSON_PROPERTY_PIX = "pix"; + private PixResponseInfo pix; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetPix = false; + public static final String JSON_PROPERTY_PULSE = "pulse"; private PulseResponseInfo pulse; @@ -706,6 +755,41 @@ public void setAmex(AmexResponseInfo amex) { isSetAmex = true; // mark as set } + /** + * ancv + * + * @param ancv + * @return the current {@code PaymentMethod} instance, allowing for method chaining + */ + public PaymentMethod ancv(AncvResponseInfo ancv) { + this.ancv = ancv; + isSetAncv = true; // mark as set + return this; + } + + /** + * Get ancv + * + * @return ancv + */ + @JsonProperty(JSON_PROPERTY_ANCV) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public AncvResponseInfo getAncv() { + return ancv; + } + + /** + * ancv + * + * @param ancv + */ + @JsonProperty(JSON_PROPERTY_ANCV) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAncv(AncvResponseInfo ancv) { + this.ancv = ancv; + isSetAncv = true; // mark as set + } + /** * applePay * @@ -824,6 +908,41 @@ public void setBcmc(BcmcResponseInfo bcmc) { isSetBcmc = true; // mark as set } + /** + * boncard + * + * @param boncard + * @return the current {@code PaymentMethod} instance, allowing for method chaining + */ + public PaymentMethod boncard(BoncardResponseInfo boncard) { + this.boncard = boncard; + isSetBoncard = true; // mark as set + return this; + } + + /** + * Get boncard + * + * @return boncard + */ + @JsonProperty(JSON_PROPERTY_BONCARD) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public BoncardResponseInfo getBoncard() { + return boncard; + } + + /** + * boncard + * + * @param boncard + */ + @JsonProperty(JSON_PROPERTY_BONCARD) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setBoncard(BoncardResponseInfo boncard) { + this.boncard = boncard; + isSetBoncard = true; // mark as set + } + /** * The unique identifier of the business line. Required if you are a [platform * model](https://docs.adyen.com/platforms). @@ -1219,6 +1338,41 @@ public void setDiscover(DiscoverResponseInfo discover) { isSetDiscover = true; // mark as set } + /** + * ebt + * + * @param ebt + * @return the current {@code PaymentMethod} instance, allowing for method chaining + */ + public PaymentMethod ebt(EbtResponseInfo ebt) { + this.ebt = ebt; + isSetEbt = true; // mark as set + return this; + } + + /** + * Get ebt + * + * @return ebt + */ + @JsonProperty(JSON_PROPERTY_EBT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public EbtResponseInfo getEbt() { + return ebt; + } + + /** + * ebt + * + * @param ebt + */ + @JsonProperty(JSON_PROPERTY_EBT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEbt(EbtResponseInfo ebt) { + this.ebt = ebt; + isSetEbt = true; // mark as set + } + /** * eftDirectdebitCA * @@ -1747,6 +1901,79 @@ public void setMealVoucherFR(MealVoucherFRResponseInfo mealVoucherFR) { isSetMealVoucherFR = true; // mark as set } + /** + * The Merchant Category Code (MCC) associated with the payment method. + * + * @param merchantCategoryCode The Merchant Category Code (MCC) associated with the payment + * method. + * @return the current {@code PaymentMethod} instance, allowing for method chaining + */ + public PaymentMethod merchantCategoryCode(String merchantCategoryCode) { + this.merchantCategoryCode = merchantCategoryCode; + isSetMerchantCategoryCode = true; // mark as set + return this; + } + + /** + * The Merchant Category Code (MCC) associated with the payment method. + * + * @return merchantCategoryCode The Merchant Category Code (MCC) associated with the payment + * method. + */ + @JsonProperty(JSON_PROPERTY_MERCHANT_CATEGORY_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getMerchantCategoryCode() { + return merchantCategoryCode; + } + + /** + * The Merchant Category Code (MCC) associated with the payment method. + * + * @param merchantCategoryCode The Merchant Category Code (MCC) associated with the payment + * method. + */ + @JsonProperty(JSON_PROPERTY_MERCHANT_CATEGORY_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMerchantCategoryCode(String merchantCategoryCode) { + this.merchantCategoryCode = merchantCategoryCode; + isSetMerchantCategoryCode = true; // mark as set + } + + /** + * The Merchant Identifier (MID) associated with the payment method. + * + * @param mid The Merchant Identifier (MID) associated with the payment method. + * @return the current {@code PaymentMethod} instance, allowing for method chaining + */ + public PaymentMethod mid(String mid) { + this.mid = mid; + isSetMid = true; // mark as set + return this; + } + + /** + * The Merchant Identifier (MID) associated with the payment method. + * + * @return mid The Merchant Identifier (MID) associated with the payment method. + */ + @JsonProperty(JSON_PROPERTY_MID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getMid() { + return mid; + } + + /** + * The Merchant Identifier (MID) associated with the payment method. + * + * @param mid The Merchant Identifier (MID) associated with the payment method. + */ + @JsonProperty(JSON_PROPERTY_MID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMid(String mid) { + this.mid = mid; + isSetMid = true; // mark as set + } + /** * nyce * @@ -1817,6 +2044,41 @@ public void setPaybybankPlaid(PayByBankPlaidResponseInfo paybybankPlaid) { isSetPaybybankPlaid = true; // mark as set } + /** + * paybybankPlaidCa + * + * @param paybybankPlaidCa + * @return the current {@code PaymentMethod} instance, allowing for method chaining + */ + public PaymentMethod paybybankPlaidCa(PayByBankPlaidResponseInfo paybybankPlaidCa) { + this.paybybankPlaidCa = paybybankPlaidCa; + isSetPaybybankPlaidCa = true; // mark as set + return this; + } + + /** + * Get paybybankPlaidCa + * + * @return paybybankPlaidCa + */ + @JsonProperty(JSON_PROPERTY_PAYBYBANK_PLAID_CA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public PayByBankPlaidResponseInfo getPaybybankPlaidCa() { + return paybybankPlaidCa; + } + + /** + * paybybankPlaidCa + * + * @param paybybankPlaidCa + */ + @JsonProperty(JSON_PROPERTY_PAYBYBANK_PLAID_CA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPaybybankPlaidCa(PayByBankPlaidResponseInfo paybybankPlaidCa) { + this.paybybankPlaidCa = paybybankPlaidCa; + isSetPaybybankPlaidCa = true; // mark as set + } + /** * payme * @@ -1922,6 +2184,41 @@ public void setPayto(PayToResponseInfo payto) { isSetPayto = true; // mark as set } + /** + * pix + * + * @param pix + * @return the current {@code PaymentMethod} instance, allowing for method chaining + */ + public PaymentMethod pix(PixResponseInfo pix) { + this.pix = pix; + isSetPix = true; // mark as set + return this; + } + + /** + * Get pix + * + * @return pix + */ + @JsonProperty(JSON_PROPERTY_PIX) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public PixResponseInfo getPix() { + return pix; + } + + /** + * pix + * + * @param pix + */ + @JsonProperty(JSON_PROPERTY_PIX) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPix(PixResponseInfo pix) { + this.pix = pix; + isSetPix = true; // mark as set + } + /** * pulse * @@ -2356,9 +2653,15 @@ public void setTwint(TwintResponseInfo twint) { /** * Payment method * [variant](https://docs.adyen.com/development-resources/paymentmethodvariant#management-api). + * For payment method variant **cartebancaire**, method-specific details are returned in the + * [`cartesBancaires`](https://docs.adyen.com/api-explorer/Management/latest/post/merchants/(merchantId)/paymentMethodSettings#responses-200-cartesBancaires) + * object. * * @param type Payment method * [variant](https://docs.adyen.com/development-resources/paymentmethodvariant#management-api). + * For payment method variant **cartebancaire**, method-specific details are returned in the + * [`cartesBancaires`](https://docs.adyen.com/api-explorer/Management/latest/post/merchants/(merchantId)/paymentMethodSettings#responses-200-cartesBancaires) + * object. * @return the current {@code PaymentMethod} instance, allowing for method chaining */ public PaymentMethod type(String type) { @@ -2370,9 +2673,15 @@ public PaymentMethod type(String type) { /** * Payment method * [variant](https://docs.adyen.com/development-resources/paymentmethodvariant#management-api). + * For payment method variant **cartebancaire**, method-specific details are returned in the + * [`cartesBancaires`](https://docs.adyen.com/api-explorer/Management/latest/post/merchants/(merchantId)/paymentMethodSettings#responses-200-cartesBancaires) + * object. * * @return type Payment method * [variant](https://docs.adyen.com/development-resources/paymentmethodvariant#management-api). + * For payment method variant **cartebancaire**, method-specific details are returned in the + * [`cartesBancaires`](https://docs.adyen.com/api-explorer/Management/latest/post/merchants/(merchantId)/paymentMethodSettings#responses-200-cartesBancaires) + * object. */ @JsonProperty(JSON_PROPERTY_TYPE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -2383,9 +2692,15 @@ public String getType() { /** * Payment method * [variant](https://docs.adyen.com/development-resources/paymentmethodvariant#management-api). + * For payment method variant **cartebancaire**, method-specific details are returned in the + * [`cartesBancaires`](https://docs.adyen.com/api-explorer/Management/latest/post/merchants/(merchantId)/paymentMethodSettings#responses-200-cartesBancaires) + * object. * * @param type Payment method * [variant](https://docs.adyen.com/development-resources/paymentmethodvariant#management-api). + * For payment method variant **cartebancaire**, method-specific details are returned in the + * [`cartesBancaires`](https://docs.adyen.com/api-explorer/Management/latest/post/merchants/(merchantId)/paymentMethodSettings#responses-200-cartesBancaires) + * object. */ @JsonProperty(JSON_PROPERTY_TYPE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -2649,6 +2964,8 @@ public boolean equals(Object o) { && Objects.equals(this.isSetAllowed, paymentMethod.isSetAllowed) && Objects.equals(this.amex, paymentMethod.amex) && Objects.equals(this.isSetAmex, paymentMethod.isSetAmex) + && Objects.equals(this.ancv, paymentMethod.ancv) + && Objects.equals(this.isSetAncv, paymentMethod.isSetAncv) && Objects.equals(this.applePay, paymentMethod.applePay) && Objects.equals(this.isSetApplePay, paymentMethod.isSetApplePay) && Objects.equals(this.associatedPaymentMethods, paymentMethod.associatedPaymentMethods) @@ -2656,6 +2973,8 @@ public boolean equals(Object o) { this.isSetAssociatedPaymentMethods, paymentMethod.isSetAssociatedPaymentMethods) && Objects.equals(this.bcmc, paymentMethod.bcmc) && Objects.equals(this.isSetBcmc, paymentMethod.isSetBcmc) + && Objects.equals(this.boncard, paymentMethod.boncard) + && Objects.equals(this.isSetBoncard, paymentMethod.isSetBoncard) && Objects.equals(this.businessLineId, paymentMethod.businessLineId) && Objects.equals(this.isSetBusinessLineId, paymentMethod.isSetBusinessLineId) && Objects.equals(this.carnet, paymentMethod.carnet) @@ -2676,6 +2995,8 @@ public boolean equals(Object o) { && Objects.equals(this.isSetDiners, paymentMethod.isSetDiners) && Objects.equals(this.discover, paymentMethod.discover) && Objects.equals(this.isSetDiscover, paymentMethod.isSetDiscover) + && Objects.equals(this.ebt, paymentMethod.ebt) + && Objects.equals(this.isSetEbt, paymentMethod.isSetEbt) && Objects.equals(this.eftDirectdebitCA, paymentMethod.eftDirectdebitCA) && Objects.equals(this.isSetEftDirectdebitCA, paymentMethod.isSetEftDirectdebitCA) && Objects.equals(this.eftposAustralia, paymentMethod.eftposAustralia) @@ -2706,16 +3027,24 @@ public boolean equals(Object o) { && Objects.equals(this.isSetMc, paymentMethod.isSetMc) && Objects.equals(this.mealVoucherFR, paymentMethod.mealVoucherFR) && Objects.equals(this.isSetMealVoucherFR, paymentMethod.isSetMealVoucherFR) + && Objects.equals(this.merchantCategoryCode, paymentMethod.merchantCategoryCode) + && Objects.equals(this.isSetMerchantCategoryCode, paymentMethod.isSetMerchantCategoryCode) + && Objects.equals(this.mid, paymentMethod.mid) + && Objects.equals(this.isSetMid, paymentMethod.isSetMid) && Objects.equals(this.nyce, paymentMethod.nyce) && Objects.equals(this.isSetNyce, paymentMethod.isSetNyce) && Objects.equals(this.paybybankPlaid, paymentMethod.paybybankPlaid) && Objects.equals(this.isSetPaybybankPlaid, paymentMethod.isSetPaybybankPlaid) + && Objects.equals(this.paybybankPlaidCa, paymentMethod.paybybankPlaidCa) + && Objects.equals(this.isSetPaybybankPlaidCa, paymentMethod.isSetPaybybankPlaidCa) && Objects.equals(this.payme, paymentMethod.payme) && Objects.equals(this.isSetPayme, paymentMethod.isSetPayme) && Objects.equals(this.paypal, paymentMethod.paypal) && Objects.equals(this.isSetPaypal, paymentMethod.isSetPaypal) && Objects.equals(this.payto, paymentMethod.payto) && Objects.equals(this.isSetPayto, paymentMethod.isSetPayto) + && Objects.equals(this.pix, paymentMethod.pix) + && Objects.equals(this.isSetPix, paymentMethod.isSetPix) && Objects.equals(this.pulse, paymentMethod.pulse) && Objects.equals(this.isSetPulse, paymentMethod.isSetPulse) && Objects.equals(this.reference, paymentMethod.reference) @@ -2771,12 +3100,16 @@ public int hashCode() { isSetAllowed, amex, isSetAmex, + ancv, + isSetAncv, applePay, isSetApplePay, associatedPaymentMethods, isSetAssociatedPaymentMethods, bcmc, isSetBcmc, + boncard, + isSetBoncard, businessLineId, isSetBusinessLineId, carnet, @@ -2797,6 +3130,8 @@ public int hashCode() { isSetDiners, discover, isSetDiscover, + ebt, + isSetEbt, eftDirectdebitCA, isSetEftDirectdebitCA, eftposAustralia, @@ -2827,16 +3162,24 @@ public int hashCode() { isSetMc, mealVoucherFR, isSetMealVoucherFR, + merchantCategoryCode, + isSetMerchantCategoryCode, + mid, + isSetMid, nyce, isSetNyce, paybybankPlaid, isSetPaybybankPlaid, + paybybankPlaidCa, + isSetPaybybankPlaidCa, payme, isSetPayme, paypal, isSetPaypal, payto, isSetPayto, + pix, + isSetPix, pulse, isSetPulse, reference, @@ -2887,11 +3230,13 @@ public String toString() { sb.append(" alipayPlus: ").append(toIndentedString(alipayPlus)).append("\n"); sb.append(" allowed: ").append(toIndentedString(allowed)).append("\n"); sb.append(" amex: ").append(toIndentedString(amex)).append("\n"); + sb.append(" ancv: ").append(toIndentedString(ancv)).append("\n"); sb.append(" applePay: ").append(toIndentedString(applePay)).append("\n"); sb.append(" associatedPaymentMethods: ") .append(toIndentedString(associatedPaymentMethods)) .append("\n"); sb.append(" bcmc: ").append(toIndentedString(bcmc)).append("\n"); + sb.append(" boncard: ").append(toIndentedString(boncard)).append("\n"); sb.append(" businessLineId: ").append(toIndentedString(businessLineId)).append("\n"); sb.append(" carnet: ").append(toIndentedString(carnet)).append("\n"); sb.append(" cartesBancaires: ").append(toIndentedString(cartesBancaires)).append("\n"); @@ -2902,6 +3247,7 @@ public String toString() { sb.append(" customRoutingFlags: ").append(toIndentedString(customRoutingFlags)).append("\n"); sb.append(" diners: ").append(toIndentedString(diners)).append("\n"); sb.append(" discover: ").append(toIndentedString(discover)).append("\n"); + sb.append(" ebt: ").append(toIndentedString(ebt)).append("\n"); sb.append(" eftDirectdebitCA: ").append(toIndentedString(eftDirectdebitCA)).append("\n"); sb.append(" eftposAustralia: ").append(toIndentedString(eftposAustralia)).append("\n"); sb.append(" enabled: ").append(toIndentedString(enabled)).append("\n"); @@ -2917,11 +3263,17 @@ public String toString() { sb.append(" maestroUsa: ").append(toIndentedString(maestroUsa)).append("\n"); sb.append(" mc: ").append(toIndentedString(mc)).append("\n"); sb.append(" mealVoucherFR: ").append(toIndentedString(mealVoucherFR)).append("\n"); + sb.append(" merchantCategoryCode: ") + .append(toIndentedString(merchantCategoryCode)) + .append("\n"); + sb.append(" mid: ").append(toIndentedString(mid)).append("\n"); sb.append(" nyce: ").append(toIndentedString(nyce)).append("\n"); sb.append(" paybybankPlaid: ").append(toIndentedString(paybybankPlaid)).append("\n"); + sb.append(" paybybankPlaidCa: ").append(toIndentedString(paybybankPlaidCa)).append("\n"); sb.append(" payme: ").append(toIndentedString(payme)).append("\n"); sb.append(" paypal: ").append(toIndentedString(paypal)).append("\n"); sb.append(" payto: ").append(toIndentedString(payto)).append("\n"); + sb.append(" pix: ").append(toIndentedString(pix)).append("\n"); sb.append(" pulse: ").append(toIndentedString(pulse)).append("\n"); sb.append(" reference: ").append(toIndentedString(reference)).append("\n"); sb.append(" sepadirectdebit: ").append(toIndentedString(sepadirectdebit)).append("\n"); @@ -2983,6 +3335,9 @@ public Map getExplicitNulls() { if (isSetAmex) { addIfNull(nulls, JSON_PROPERTY_AMEX, this.amex); } + if (isSetAncv) { + addIfNull(nulls, JSON_PROPERTY_ANCV, this.ancv); + } if (isSetApplePay) { addIfNull(nulls, JSON_PROPERTY_APPLE_PAY, this.applePay); } @@ -2992,6 +3347,9 @@ public Map getExplicitNulls() { if (isSetBcmc) { addIfNull(nulls, JSON_PROPERTY_BCMC, this.bcmc); } + if (isSetBoncard) { + addIfNull(nulls, JSON_PROPERTY_BONCARD, this.boncard); + } if (isSetBusinessLineId) { addIfNull(nulls, JSON_PROPERTY_BUSINESS_LINE_ID, this.businessLineId); } @@ -3022,6 +3380,9 @@ public Map getExplicitNulls() { if (isSetDiscover) { addIfNull(nulls, JSON_PROPERTY_DISCOVER, this.discover); } + if (isSetEbt) { + addIfNull(nulls, JSON_PROPERTY_EBT, this.ebt); + } if (isSetEftDirectdebitCA) { addIfNull(nulls, JSON_PROPERTY_EFT_DIRECTDEBIT_C_A, this.eftDirectdebitCA); } @@ -3067,12 +3428,21 @@ public Map getExplicitNulls() { if (isSetMealVoucherFR) { addIfNull(nulls, JSON_PROPERTY_MEAL_VOUCHER_F_R, this.mealVoucherFR); } + if (isSetMerchantCategoryCode) { + addIfNull(nulls, JSON_PROPERTY_MERCHANT_CATEGORY_CODE, this.merchantCategoryCode); + } + if (isSetMid) { + addIfNull(nulls, JSON_PROPERTY_MID, this.mid); + } if (isSetNyce) { addIfNull(nulls, JSON_PROPERTY_NYCE, this.nyce); } if (isSetPaybybankPlaid) { addIfNull(nulls, JSON_PROPERTY_PAYBYBANK_PLAID, this.paybybankPlaid); } + if (isSetPaybybankPlaidCa) { + addIfNull(nulls, JSON_PROPERTY_PAYBYBANK_PLAID_CA, this.paybybankPlaidCa); + } if (isSetPayme) { addIfNull(nulls, JSON_PROPERTY_PAYME, this.payme); } @@ -3082,6 +3452,9 @@ public Map getExplicitNulls() { if (isSetPayto) { addIfNull(nulls, JSON_PROPERTY_PAYTO, this.payto); } + if (isSetPix) { + addIfNull(nulls, JSON_PROPERTY_PIX, this.pix); + } if (isSetPulse) { addIfNull(nulls, JSON_PROPERTY_PULSE, this.pulse); } diff --git a/src/main/java/com/adyen/model/management/PaymentMethodResponse.java b/src/main/java/com/adyen/model/management/PaymentMethodResponse.java index 678ad38d0..fa2f8eb80 100644 --- a/src/main/java/com/adyen/model/management/PaymentMethodResponse.java +++ b/src/main/java/com/adyen/model/management/PaymentMethodResponse.java @@ -110,6 +110,8 @@ public enum TypesWithErrorsEnum { AMEX(String.valueOf("amex")), + ANCV(String.valueOf("ancv")), + APPLEPAY(String.valueOf("applepay")), AVANCARD(String.valueOf("avancard")), @@ -132,6 +134,8 @@ public enum TypesWithErrorsEnum { BLIK_POS(String.valueOf("blik_pos")), + BONCARD(String.valueOf("boncard")), + BR_SCHEMES(String.valueOf("br_schemes")), CARNET(String.valueOf("carnet")), @@ -176,6 +180,8 @@ public enum TypesWithErrorsEnum { EBANKING_FI(String.valueOf("ebanking_FI")), + EBT(String.valueOf("ebt")), + EFT_DIRECTDEBIT_CA(String.valueOf("eft_directdebit_CA")), EFTPOS_AUSTRALIA(String.valueOf("eftpos_australia")), @@ -266,6 +272,8 @@ public enum TypesWithErrorsEnum { PAYBYBANK_PLAID(String.valueOf("paybybank_plaid")), + PAYBYBANK_PLAID_CA(String.valueOf("paybybank_plaid_ca")), + PAYME(String.valueOf("payme")), PAYME_POS(String.valueOf("payme_pos")), @@ -284,6 +292,8 @@ public enum TypesWithErrorsEnum { PERSONAL_CARD_DEBIT(String.valueOf("personal_card_debit")), + PIX(String.valueOf("pix")), + PULSE(String.valueOf("pulse")), ROMCARD(String.valueOf("romcard")), @@ -354,7 +364,9 @@ public enum TypesWithErrorsEnum { WECHATPAY(String.valueOf("wechatpay")), - WECHATPAY_POS(String.valueOf("wechatpay_pos")); + WECHATPAY_POS(String.valueOf("wechatpay_pos")), + + WERO(String.valueOf("wero")); private static final Logger LOG = Logger.getLogger(TypesWithErrorsEnum.class.getName()); diff --git a/src/main/java/com/adyen/model/management/PaymentMethodSetupInfo.java b/src/main/java/com/adyen/model/management/PaymentMethodSetupInfo.java index 5b1cffefe..ada95ef04 100644 --- a/src/main/java/com/adyen/model/management/PaymentMethodSetupInfo.java +++ b/src/main/java/com/adyen/model/management/PaymentMethodSetupInfo.java @@ -32,8 +32,10 @@ PaymentMethodSetupInfo.JSON_PROPERTY_AFTERPAY_TOUCH, PaymentMethodSetupInfo.JSON_PROPERTY_ALIPAY_PLUS, PaymentMethodSetupInfo.JSON_PROPERTY_AMEX, + PaymentMethodSetupInfo.JSON_PROPERTY_ANCV, PaymentMethodSetupInfo.JSON_PROPERTY_APPLE_PAY, PaymentMethodSetupInfo.JSON_PROPERTY_BCMC, + PaymentMethodSetupInfo.JSON_PROPERTY_BONCARD, PaymentMethodSetupInfo.JSON_PROPERTY_BUSINESS_LINE_ID, PaymentMethodSetupInfo.JSON_PROPERTY_CARNET, PaymentMethodSetupInfo.JSON_PROPERTY_CARTES_BANCAIRES, @@ -44,6 +46,7 @@ PaymentMethodSetupInfo.JSON_PROPERTY_CUSTOM_ROUTING_FLAGS, PaymentMethodSetupInfo.JSON_PROPERTY_DINERS, PaymentMethodSetupInfo.JSON_PROPERTY_DISCOVER, + PaymentMethodSetupInfo.JSON_PROPERTY_EBT, PaymentMethodSetupInfo.JSON_PROPERTY_EFT_DIRECTDEBIT_C_A, PaymentMethodSetupInfo.JSON_PROPERTY_EFTPOS_AUSTRALIA, PaymentMethodSetupInfo.JSON_PROPERTY_GIROCARD, @@ -59,9 +62,11 @@ PaymentMethodSetupInfo.JSON_PROPERTY_MEAL_VOUCHER_F_R, PaymentMethodSetupInfo.JSON_PROPERTY_NYCE, PaymentMethodSetupInfo.JSON_PROPERTY_PAYBYBANK_PLAID, + PaymentMethodSetupInfo.JSON_PROPERTY_PAYBYBANK_PLAID_CA, PaymentMethodSetupInfo.JSON_PROPERTY_PAYME, PaymentMethodSetupInfo.JSON_PROPERTY_PAYPAL, PaymentMethodSetupInfo.JSON_PROPERTY_PAYTO, + PaymentMethodSetupInfo.JSON_PROPERTY_PIX, PaymentMethodSetupInfo.JSON_PROPERTY_PULSE, PaymentMethodSetupInfo.JSON_PROPERTY_REFERENCE, PaymentMethodSetupInfo.JSON_PROPERTY_SEPADIRECTDEBIT, @@ -112,6 +117,12 @@ public class PaymentMethodSetupInfo { /** Mark when the attribute has been explicitly set. */ private boolean isSetAmex = false; + public static final String JSON_PROPERTY_ANCV = "ancv"; + private AncvInfo ancv; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetAncv = false; + public static final String JSON_PROPERTY_APPLE_PAY = "applePay"; private ApplePayInfo applePay; @@ -124,6 +135,12 @@ public class PaymentMethodSetupInfo { /** Mark when the attribute has been explicitly set. */ private boolean isSetBcmc = false; + public static final String JSON_PROPERTY_BONCARD = "boncard"; + private BoncardInfo boncard; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetBoncard = false; + public static final String JSON_PROPERTY_BUSINESS_LINE_ID = "businessLineId"; private String businessLineId; @@ -184,6 +201,12 @@ public class PaymentMethodSetupInfo { /** Mark when the attribute has been explicitly set. */ private boolean isSetDiscover = false; + public static final String JSON_PROPERTY_EBT = "ebt"; + private EbtInfo ebt; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetEbt = false; + public static final String JSON_PROPERTY_EFT_DIRECTDEBIT_C_A = "eft_directdebit_CA"; private GenericPmWithTdiInfo eftDirectdebitCA; @@ -274,6 +297,12 @@ public class PaymentMethodSetupInfo { /** Mark when the attribute has been explicitly set. */ private boolean isSetPaybybankPlaid = false; + public static final String JSON_PROPERTY_PAYBYBANK_PLAID_CA = "paybybank_plaid_ca"; + private PayByBankPlaidInfo paybybankPlaidCa; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetPaybybankPlaidCa = false; + public static final String JSON_PROPERTY_PAYME = "payme"; private PayMeInfo payme; @@ -292,6 +321,12 @@ public class PaymentMethodSetupInfo { /** Mark when the attribute has been explicitly set. */ private boolean isSetPayto = false; + public static final String JSON_PROPERTY_PIX = "pix"; + private PixInfo pix; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetPix = false; + public static final String JSON_PROPERTY_PULSE = "pulse"; private PulseInfo pulse; @@ -417,6 +452,9 @@ public static ShopperInteractionEnum fromValue(String value) { /** * Payment method * [variant](https://docs.adyen.com/development-resources/paymentmethodvariant#management-api). + * For payment method variant **cartebancaire**, method-specific details are returned in the + * [`cartesBancaires`](https://docs.adyen.com/api-explorer/Management/latest/post/merchants/(merchantId)/paymentMethodSettings#responses-200-cartesBancaires) + * object of the response. */ public enum TypeEnum { ABRAPETITE(String.valueOf("abrapetite")), @@ -469,6 +507,8 @@ public enum TypeEnum { AMEX(String.valueOf("amex")), + ANCV(String.valueOf("ancv")), + APPLEPAY(String.valueOf("applepay")), AVANCARD(String.valueOf("avancard")), @@ -491,6 +531,8 @@ public enum TypeEnum { BLIK_POS(String.valueOf("blik_pos")), + BONCARD(String.valueOf("boncard")), + BR_SCHEMES(String.valueOf("br_schemes")), CARNET(String.valueOf("carnet")), @@ -535,6 +577,8 @@ public enum TypeEnum { EBANKING_FI(String.valueOf("ebanking_FI")), + EBT(String.valueOf("ebt")), + EFT_DIRECTDEBIT_CA(String.valueOf("eft_directdebit_CA")), EFTPOS_AUSTRALIA(String.valueOf("eftpos_australia")), @@ -625,6 +669,8 @@ public enum TypeEnum { PAYBYBANK_PLAID(String.valueOf("paybybank_plaid")), + PAYBYBANK_PLAID_CA(String.valueOf("paybybank_plaid_ca")), + PAYME(String.valueOf("payme")), PAYME_POS(String.valueOf("payme_pos")), @@ -643,6 +689,8 @@ public enum TypeEnum { PERSONAL_CARD_DEBIT(String.valueOf("personal_card_debit")), + PIX(String.valueOf("pix")), + PULSE(String.valueOf("pulse")), ROMCARD(String.valueOf("romcard")), @@ -713,7 +761,9 @@ public enum TypeEnum { WECHATPAY(String.valueOf("wechatpay")), - WECHATPAY_POS(String.valueOf("wechatpay_pos")); + WECHATPAY_POS(String.valueOf("wechatpay_pos")), + + WERO(String.valueOf("wero")); private static final Logger LOG = Logger.getLogger(TypeEnum.class.getName()); @@ -969,6 +1019,41 @@ public void setAmex(AmexInfo amex) { isSetAmex = true; // mark as set } + /** + * ancv + * + * @param ancv + * @return the current {@code PaymentMethodSetupInfo} instance, allowing for method chaining + */ + public PaymentMethodSetupInfo ancv(AncvInfo ancv) { + this.ancv = ancv; + isSetAncv = true; // mark as set + return this; + } + + /** + * Get ancv + * + * @return ancv + */ + @JsonProperty(JSON_PROPERTY_ANCV) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public AncvInfo getAncv() { + return ancv; + } + + /** + * ancv + * + * @param ancv + */ + @JsonProperty(JSON_PROPERTY_ANCV) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAncv(AncvInfo ancv) { + this.ancv = ancv; + isSetAncv = true; // mark as set + } + /** * applePay * @@ -1039,6 +1124,41 @@ public void setBcmc(BcmcInfo bcmc) { isSetBcmc = true; // mark as set } + /** + * boncard + * + * @param boncard + * @return the current {@code PaymentMethodSetupInfo} instance, allowing for method chaining + */ + public PaymentMethodSetupInfo boncard(BoncardInfo boncard) { + this.boncard = boncard; + isSetBoncard = true; // mark as set + return this; + } + + /** + * Get boncard + * + * @return boncard + */ + @JsonProperty(JSON_PROPERTY_BONCARD) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public BoncardInfo getBoncard() { + return boncard; + } + + /** + * boncard + * + * @param boncard + */ + @JsonProperty(JSON_PROPERTY_BONCARD) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setBoncard(BoncardInfo boncard) { + this.boncard = boncard; + isSetBoncard = true; // mark as set + } + /** * The unique identifier of the business line. Required if you are a [platform * model](https://docs.adyen.com/platforms). @@ -1434,6 +1554,41 @@ public void setDiscover(GenericPmWithTdiInfo discover) { isSetDiscover = true; // mark as set } + /** + * ebt + * + * @param ebt + * @return the current {@code PaymentMethodSetupInfo} instance, allowing for method chaining + */ + public PaymentMethodSetupInfo ebt(EbtInfo ebt) { + this.ebt = ebt; + isSetEbt = true; // mark as set + return this; + } + + /** + * Get ebt + * + * @return ebt + */ + @JsonProperty(JSON_PROPERTY_EBT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public EbtInfo getEbt() { + return ebt; + } + + /** + * ebt + * + * @param ebt + */ + @JsonProperty(JSON_PROPERTY_EBT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEbt(EbtInfo ebt) { + this.ebt = ebt; + isSetEbt = true; // mark as set + } + /** * eftDirectdebitCA * @@ -1959,6 +2114,41 @@ public void setPaybybankPlaid(PayByBankPlaidInfo paybybankPlaid) { isSetPaybybankPlaid = true; // mark as set } + /** + * paybybankPlaidCa + * + * @param paybybankPlaidCa + * @return the current {@code PaymentMethodSetupInfo} instance, allowing for method chaining + */ + public PaymentMethodSetupInfo paybybankPlaidCa(PayByBankPlaidInfo paybybankPlaidCa) { + this.paybybankPlaidCa = paybybankPlaidCa; + isSetPaybybankPlaidCa = true; // mark as set + return this; + } + + /** + * Get paybybankPlaidCa + * + * @return paybybankPlaidCa + */ + @JsonProperty(JSON_PROPERTY_PAYBYBANK_PLAID_CA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public PayByBankPlaidInfo getPaybybankPlaidCa() { + return paybybankPlaidCa; + } + + /** + * paybybankPlaidCa + * + * @param paybybankPlaidCa + */ + @JsonProperty(JSON_PROPERTY_PAYBYBANK_PLAID_CA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPaybybankPlaidCa(PayByBankPlaidInfo paybybankPlaidCa) { + this.paybybankPlaidCa = paybybankPlaidCa; + isSetPaybybankPlaidCa = true; // mark as set + } + /** * payme * @@ -2064,6 +2254,41 @@ public void setPayto(PayToInfo payto) { isSetPayto = true; // mark as set } + /** + * pix + * + * @param pix + * @return the current {@code PaymentMethodSetupInfo} instance, allowing for method chaining + */ + public PaymentMethodSetupInfo pix(PixInfo pix) { + this.pix = pix; + isSetPix = true; // mark as set + return this; + } + + /** + * Get pix + * + * @return pix + */ + @JsonProperty(JSON_PROPERTY_PIX) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public PixInfo getPix() { + return pix; + } + + /** + * pix + * + * @param pix + */ + @JsonProperty(JSON_PROPERTY_PIX) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPix(PixInfo pix) { + this.pix = pix; + isSetPix = true; // mark as set + } + /** * pulse * @@ -2516,9 +2741,15 @@ public void setTwint(TwintInfo twint) { /** * Payment method * [variant](https://docs.adyen.com/development-resources/paymentmethodvariant#management-api). + * For payment method variant **cartebancaire**, method-specific details are returned in the + * [`cartesBancaires`](https://docs.adyen.com/api-explorer/Management/latest/post/merchants/(merchantId)/paymentMethodSettings#responses-200-cartesBancaires) + * object of the response. * * @param type Payment method * [variant](https://docs.adyen.com/development-resources/paymentmethodvariant#management-api). + * For payment method variant **cartebancaire**, method-specific details are returned in the + * [`cartesBancaires`](https://docs.adyen.com/api-explorer/Management/latest/post/merchants/(merchantId)/paymentMethodSettings#responses-200-cartesBancaires) + * object of the response. * @return the current {@code PaymentMethodSetupInfo} instance, allowing for method chaining */ public PaymentMethodSetupInfo type(TypeEnum type) { @@ -2530,9 +2761,15 @@ public PaymentMethodSetupInfo type(TypeEnum type) { /** * Payment method * [variant](https://docs.adyen.com/development-resources/paymentmethodvariant#management-api). + * For payment method variant **cartebancaire**, method-specific details are returned in the + * [`cartesBancaires`](https://docs.adyen.com/api-explorer/Management/latest/post/merchants/(merchantId)/paymentMethodSettings#responses-200-cartesBancaires) + * object of the response. * * @return type Payment method * [variant](https://docs.adyen.com/development-resources/paymentmethodvariant#management-api). + * For payment method variant **cartebancaire**, method-specific details are returned in the + * [`cartesBancaires`](https://docs.adyen.com/api-explorer/Management/latest/post/merchants/(merchantId)/paymentMethodSettings#responses-200-cartesBancaires) + * object of the response. */ @JsonProperty(JSON_PROPERTY_TYPE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -2543,9 +2780,15 @@ public TypeEnum getType() { /** * Payment method * [variant](https://docs.adyen.com/development-resources/paymentmethodvariant#management-api). + * For payment method variant **cartebancaire**, method-specific details are returned in the + * [`cartesBancaires`](https://docs.adyen.com/api-explorer/Management/latest/post/merchants/(merchantId)/paymentMethodSettings#responses-200-cartesBancaires) + * object of the response. * * @param type Payment method * [variant](https://docs.adyen.com/development-resources/paymentmethodvariant#management-api). + * For payment method variant **cartebancaire**, method-specific details are returned in the + * [`cartesBancaires`](https://docs.adyen.com/api-explorer/Management/latest/post/merchants/(merchantId)/paymentMethodSettings#responses-200-cartesBancaires) + * object of the response. */ @JsonProperty(JSON_PROPERTY_TYPE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -2769,10 +3012,14 @@ public boolean equals(Object o) { && Objects.equals(this.isSetAlipayPlus, paymentMethodSetupInfo.isSetAlipayPlus) && Objects.equals(this.amex, paymentMethodSetupInfo.amex) && Objects.equals(this.isSetAmex, paymentMethodSetupInfo.isSetAmex) + && Objects.equals(this.ancv, paymentMethodSetupInfo.ancv) + && Objects.equals(this.isSetAncv, paymentMethodSetupInfo.isSetAncv) && Objects.equals(this.applePay, paymentMethodSetupInfo.applePay) && Objects.equals(this.isSetApplePay, paymentMethodSetupInfo.isSetApplePay) && Objects.equals(this.bcmc, paymentMethodSetupInfo.bcmc) && Objects.equals(this.isSetBcmc, paymentMethodSetupInfo.isSetBcmc) + && Objects.equals(this.boncard, paymentMethodSetupInfo.boncard) + && Objects.equals(this.isSetBoncard, paymentMethodSetupInfo.isSetBoncard) && Objects.equals(this.businessLineId, paymentMethodSetupInfo.businessLineId) && Objects.equals(this.isSetBusinessLineId, paymentMethodSetupInfo.isSetBusinessLineId) && Objects.equals(this.carnet, paymentMethodSetupInfo.carnet) @@ -2794,6 +3041,8 @@ public boolean equals(Object o) { && Objects.equals(this.isSetDiners, paymentMethodSetupInfo.isSetDiners) && Objects.equals(this.discover, paymentMethodSetupInfo.discover) && Objects.equals(this.isSetDiscover, paymentMethodSetupInfo.isSetDiscover) + && Objects.equals(this.ebt, paymentMethodSetupInfo.ebt) + && Objects.equals(this.isSetEbt, paymentMethodSetupInfo.isSetEbt) && Objects.equals(this.eftDirectdebitCA, paymentMethodSetupInfo.eftDirectdebitCA) && Objects.equals(this.isSetEftDirectdebitCA, paymentMethodSetupInfo.isSetEftDirectdebitCA) && Objects.equals(this.eftposAustralia, paymentMethodSetupInfo.eftposAustralia) @@ -2824,12 +3073,16 @@ public boolean equals(Object o) { && Objects.equals(this.isSetNyce, paymentMethodSetupInfo.isSetNyce) && Objects.equals(this.paybybankPlaid, paymentMethodSetupInfo.paybybankPlaid) && Objects.equals(this.isSetPaybybankPlaid, paymentMethodSetupInfo.isSetPaybybankPlaid) + && Objects.equals(this.paybybankPlaidCa, paymentMethodSetupInfo.paybybankPlaidCa) + && Objects.equals(this.isSetPaybybankPlaidCa, paymentMethodSetupInfo.isSetPaybybankPlaidCa) && Objects.equals(this.payme, paymentMethodSetupInfo.payme) && Objects.equals(this.isSetPayme, paymentMethodSetupInfo.isSetPayme) && Objects.equals(this.paypal, paymentMethodSetupInfo.paypal) && Objects.equals(this.isSetPaypal, paymentMethodSetupInfo.isSetPaypal) && Objects.equals(this.payto, paymentMethodSetupInfo.payto) && Objects.equals(this.isSetPayto, paymentMethodSetupInfo.isSetPayto) + && Objects.equals(this.pix, paymentMethodSetupInfo.pix) + && Objects.equals(this.isSetPix, paymentMethodSetupInfo.isSetPix) && Objects.equals(this.pulse, paymentMethodSetupInfo.pulse) && Objects.equals(this.isSetPulse, paymentMethodSetupInfo.isSetPulse) && Objects.equals(this.reference, paymentMethodSetupInfo.reference) @@ -2882,10 +3135,14 @@ public int hashCode() { isSetAlipayPlus, amex, isSetAmex, + ancv, + isSetAncv, applePay, isSetApplePay, bcmc, isSetBcmc, + boncard, + isSetBoncard, businessLineId, isSetBusinessLineId, carnet, @@ -2906,6 +3163,8 @@ public int hashCode() { isSetDiners, discover, isSetDiscover, + ebt, + isSetEbt, eftDirectdebitCA, isSetEftDirectdebitCA, eftposAustralia, @@ -2936,12 +3195,16 @@ public int hashCode() { isSetNyce, paybybankPlaid, isSetPaybybankPlaid, + paybybankPlaidCa, + isSetPaybybankPlaidCa, payme, isSetPayme, paypal, isSetPaypal, payto, isSetPayto, + pix, + isSetPix, pulse, isSetPulse, reference, @@ -2989,8 +3252,10 @@ public String toString() { sb.append(" afterpayTouch: ").append(toIndentedString(afterpayTouch)).append("\n"); sb.append(" alipayPlus: ").append(toIndentedString(alipayPlus)).append("\n"); sb.append(" amex: ").append(toIndentedString(amex)).append("\n"); + sb.append(" ancv: ").append(toIndentedString(ancv)).append("\n"); sb.append(" applePay: ").append(toIndentedString(applePay)).append("\n"); sb.append(" bcmc: ").append(toIndentedString(bcmc)).append("\n"); + sb.append(" boncard: ").append(toIndentedString(boncard)).append("\n"); sb.append(" businessLineId: ").append(toIndentedString(businessLineId)).append("\n"); sb.append(" carnet: ").append(toIndentedString(carnet)).append("\n"); sb.append(" cartesBancaires: ").append(toIndentedString(cartesBancaires)).append("\n"); @@ -3001,6 +3266,7 @@ public String toString() { sb.append(" customRoutingFlags: ").append(toIndentedString(customRoutingFlags)).append("\n"); sb.append(" diners: ").append(toIndentedString(diners)).append("\n"); sb.append(" discover: ").append(toIndentedString(discover)).append("\n"); + sb.append(" ebt: ").append(toIndentedString(ebt)).append("\n"); sb.append(" eftDirectdebitCA: ").append(toIndentedString(eftDirectdebitCA)).append("\n"); sb.append(" eftposAustralia: ").append(toIndentedString(eftposAustralia)).append("\n"); sb.append(" girocard: ").append(toIndentedString(girocard)).append("\n"); @@ -3016,9 +3282,11 @@ public String toString() { sb.append(" mealVoucherFR: ").append(toIndentedString(mealVoucherFR)).append("\n"); sb.append(" nyce: ").append(toIndentedString(nyce)).append("\n"); sb.append(" paybybankPlaid: ").append(toIndentedString(paybybankPlaid)).append("\n"); + sb.append(" paybybankPlaidCa: ").append(toIndentedString(paybybankPlaidCa)).append("\n"); sb.append(" payme: ").append(toIndentedString(payme)).append("\n"); sb.append(" paypal: ").append(toIndentedString(paypal)).append("\n"); sb.append(" payto: ").append(toIndentedString(payto)).append("\n"); + sb.append(" pix: ").append(toIndentedString(pix)).append("\n"); sb.append(" pulse: ").append(toIndentedString(pulse)).append("\n"); sb.append(" reference: ").append(toIndentedString(reference)).append("\n"); sb.append(" sepadirectdebit: ").append(toIndentedString(sepadirectdebit)).append("\n"); @@ -3076,12 +3344,18 @@ public Map getExplicitNulls() { if (isSetAmex) { addIfNull(nulls, JSON_PROPERTY_AMEX, this.amex); } + if (isSetAncv) { + addIfNull(nulls, JSON_PROPERTY_ANCV, this.ancv); + } if (isSetApplePay) { addIfNull(nulls, JSON_PROPERTY_APPLE_PAY, this.applePay); } if (isSetBcmc) { addIfNull(nulls, JSON_PROPERTY_BCMC, this.bcmc); } + if (isSetBoncard) { + addIfNull(nulls, JSON_PROPERTY_BONCARD, this.boncard); + } if (isSetBusinessLineId) { addIfNull(nulls, JSON_PROPERTY_BUSINESS_LINE_ID, this.businessLineId); } @@ -3112,6 +3386,9 @@ public Map getExplicitNulls() { if (isSetDiscover) { addIfNull(nulls, JSON_PROPERTY_DISCOVER, this.discover); } + if (isSetEbt) { + addIfNull(nulls, JSON_PROPERTY_EBT, this.ebt); + } if (isSetEftDirectdebitCA) { addIfNull(nulls, JSON_PROPERTY_EFT_DIRECTDEBIT_C_A, this.eftDirectdebitCA); } @@ -3157,6 +3434,9 @@ public Map getExplicitNulls() { if (isSetPaybybankPlaid) { addIfNull(nulls, JSON_PROPERTY_PAYBYBANK_PLAID, this.paybybankPlaid); } + if (isSetPaybybankPlaidCa) { + addIfNull(nulls, JSON_PROPERTY_PAYBYBANK_PLAID_CA, this.paybybankPlaidCa); + } if (isSetPayme) { addIfNull(nulls, JSON_PROPERTY_PAYME, this.payme); } @@ -3166,6 +3446,9 @@ public Map getExplicitNulls() { if (isSetPayto) { addIfNull(nulls, JSON_PROPERTY_PAYTO, this.payto); } + if (isSetPix) { + addIfNull(nulls, JSON_PROPERTY_PIX, this.pix); + } if (isSetPulse) { addIfNull(nulls, JSON_PROPERTY_PULSE, this.pulse); } diff --git a/src/main/java/com/adyen/model/management/PixInfo.java b/src/main/java/com/adyen/model/management/PixInfo.java new file mode 100644 index 000000000..8f020e8a3 --- /dev/null +++ b/src/main/java/com/adyen/model/management/PixInfo.java @@ -0,0 +1,234 @@ +/* + * 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 com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.core.JsonProcessingException; +import java.util.*; + +/** PixInfo */ +@JsonPropertyOrder({PixInfo.JSON_PROPERTY_ALLOW_RECURRING, PixInfo.JSON_PROPERTY_ALLOW_PAY_BY_BANK}) +public class PixInfo { + public static final String JSON_PROPERTY_ALLOW_RECURRING = "allowRecurring"; + private Boolean allowRecurring; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetAllowRecurring = false; + + public static final String JSON_PROPERTY_ALLOW_PAY_BY_BANK = "allowPayByBank"; + private Boolean allowPayByBank; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetAllowPayByBank = false; + + /** + * Sets whether attributes with null values should be explicitly included in the JSON payload. + * Default is false. + */ + @JsonIgnore private boolean includeNullValues = false; + + public PixInfo() {} + + /** + * Indicates whether to set up Pix Recurring (Pix Automático) instead of standard Pix. The default + * value is **false**. + * + * @param allowRecurring Indicates whether to set up Pix Recurring (Pix Automático) instead of + * standard Pix. The default value is **false**. + * @return the current {@code PixInfo} instance, allowing for method chaining + */ + public PixInfo allowRecurring(Boolean allowRecurring) { + this.allowRecurring = allowRecurring; + isSetAllowRecurring = true; // mark as set + return this; + } + + /** + * Indicates whether to set up Pix Recurring (Pix Automático) instead of standard Pix. The default + * value is **false**. + * + * @return allowRecurring Indicates whether to set up Pix Recurring (Pix Automático) instead of + * standard Pix. The default value is **false**. + */ + @JsonProperty(JSON_PROPERTY_ALLOW_RECURRING) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getAllowRecurring() { + return allowRecurring; + } + + /** + * Indicates whether to set up Pix Recurring (Pix Automático) instead of standard Pix. The default + * value is **false**. + * + * @param allowRecurring Indicates whether to set up Pix Recurring (Pix Automático) instead of + * standard Pix. The default value is **false**. + */ + @JsonProperty(JSON_PROPERTY_ALLOW_RECURRING) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAllowRecurring(Boolean allowRecurring) { + this.allowRecurring = allowRecurring; + isSetAllowRecurring = true; // mark as set + } + + /** + * Indicates whether to set up Pix Pay by Bank instead of standard Pix. The default value is + * **false**. + * + * @param allowPayByBank Indicates whether to set up Pix Pay by Bank instead of standard Pix. The + * default value is **false**. + * @return the current {@code PixInfo} instance, allowing for method chaining + */ + public PixInfo allowPayByBank(Boolean allowPayByBank) { + this.allowPayByBank = allowPayByBank; + isSetAllowPayByBank = true; // mark as set + return this; + } + + /** + * Indicates whether to set up Pix Pay by Bank instead of standard Pix. The default value is + * **false**. + * + * @return allowPayByBank Indicates whether to set up Pix Pay by Bank instead of standard Pix. The + * default value is **false**. + */ + @JsonProperty(JSON_PROPERTY_ALLOW_PAY_BY_BANK) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getAllowPayByBank() { + return allowPayByBank; + } + + /** + * Indicates whether to set up Pix Pay by Bank instead of standard Pix. The default value is + * **false**. + * + * @param allowPayByBank Indicates whether to set up Pix Pay by Bank instead of standard Pix. The + * default value is **false**. + */ + @JsonProperty(JSON_PROPERTY_ALLOW_PAY_BY_BANK) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAllowPayByBank(Boolean allowPayByBank) { + this.allowPayByBank = allowPayByBank; + isSetAllowPayByBank = true; // mark as set + } + + /** + * Configures whether null values are explicitly serialized in the JSON payload. Default is false. + */ + public PixInfo includeNullValues(boolean includeNullValues) { + this.includeNullValues = includeNullValues; + return this; + } + + /** Returns whether null values are explicitly serialized in the JSON payload. */ + public boolean isIncludeNullValues() { + return includeNullValues; + } + + /** + * Sets whether null values should be explicitly serialized in the JSON payload. Default is false. + */ + public void setIncludeNullValues(boolean includeNullValues) { + this.includeNullValues = includeNullValues; + } + + /** Return true if this PixInfo object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PixInfo pixInfo = (PixInfo) o; + return Objects.equals(this.allowRecurring, pixInfo.allowRecurring) + && Objects.equals(this.isSetAllowRecurring, pixInfo.isSetAllowRecurring) + && Objects.equals(this.allowPayByBank, pixInfo.allowPayByBank) + && Objects.equals(this.isSetAllowPayByBank, pixInfo.isSetAllowPayByBank); + } + + @Override + public int hashCode() { + return Objects.hash(allowRecurring, isSetAllowRecurring, allowPayByBank, isSetAllowPayByBank); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PixInfo {\n"); + sb.append(" allowRecurring: ").append(toIndentedString(allowRecurring)).append("\n"); + sb.append(" allowPayByBank: ").append(toIndentedString(allowPayByBank)).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 "); + } + + /** Returns a map of properties to be merged into the JSON payload as explicit null values. */ + @JsonInclude(JsonInclude.Include.ALWAYS) + @JsonAnyGetter + public Map getExplicitNulls() { + if (!this.includeNullValues) { + return Collections.emptyMap(); + } + + Map nulls = new HashMap<>(); + + if (isSetAllowRecurring) { + addIfNull(nulls, JSON_PROPERTY_ALLOW_RECURRING, this.allowRecurring); + } + if (isSetAllowPayByBank) { + addIfNull(nulls, JSON_PROPERTY_ALLOW_PAY_BY_BANK, this.allowPayByBank); + } + + return nulls; + } + + // add to map when value is null + private void addIfNull(Map map, String key, Object value) { + if (value == null) { + map.put(key, null); + } + } + + /** + * Create an instance of PixInfo given an JSON string + * + * @param jsonString JSON string + * @return An instance of PixInfo + * @throws JsonProcessingException if the JSON string is invalid with respect to PixInfo + */ + public static PixInfo fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, PixInfo.class); + } + + /** + * Convert an instance of PixInfo to an JSON string + * + * @return JSON string + */ + public String toJson() throws JsonProcessingException { + return JSON.getMapper().writeValueAsString(this); + } +} diff --git a/src/main/java/com/adyen/model/management/PixResponseInfo.java b/src/main/java/com/adyen/model/management/PixResponseInfo.java new file mode 100644 index 000000000..e1304533a --- /dev/null +++ b/src/main/java/com/adyen/model/management/PixResponseInfo.java @@ -0,0 +1,234 @@ +/* + * 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 com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.core.JsonProcessingException; +import java.util.*; + +/** PixResponseInfo */ +@JsonPropertyOrder({ + PixResponseInfo.JSON_PROPERTY_ALLOW_RECURRING, + PixResponseInfo.JSON_PROPERTY_ALLOW_PAY_BY_BANK +}) +public class PixResponseInfo { + public static final String JSON_PROPERTY_ALLOW_RECURRING = "allowRecurring"; + private Boolean allowRecurring; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetAllowRecurring = false; + + public static final String JSON_PROPERTY_ALLOW_PAY_BY_BANK = "allowPayByBank"; + private Boolean allowPayByBank; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetAllowPayByBank = false; + + /** + * Sets whether attributes with null values should be explicitly included in the JSON payload. + * Default is false. + */ + @JsonIgnore private boolean includeNullValues = false; + + public PixResponseInfo() {} + + /** + * Indicates whether the Pix payment method is set up as Pix Recurring (Pix Automático) instead of + * standard Pix. + * + * @param allowRecurring Indicates whether the Pix payment method is set up as Pix Recurring (Pix + * Automático) instead of standard Pix. + * @return the current {@code PixResponseInfo} instance, allowing for method chaining + */ + public PixResponseInfo allowRecurring(Boolean allowRecurring) { + this.allowRecurring = allowRecurring; + isSetAllowRecurring = true; // mark as set + return this; + } + + /** + * Indicates whether the Pix payment method is set up as Pix Recurring (Pix Automático) instead of + * standard Pix. + * + * @return allowRecurring Indicates whether the Pix payment method is set up as Pix Recurring (Pix + * Automático) instead of standard Pix. + */ + @JsonProperty(JSON_PROPERTY_ALLOW_RECURRING) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getAllowRecurring() { + return allowRecurring; + } + + /** + * Indicates whether the Pix payment method is set up as Pix Recurring (Pix Automático) instead of + * standard Pix. + * + * @param allowRecurring Indicates whether the Pix payment method is set up as Pix Recurring (Pix + * Automático) instead of standard Pix. + */ + @JsonProperty(JSON_PROPERTY_ALLOW_RECURRING) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAllowRecurring(Boolean allowRecurring) { + this.allowRecurring = allowRecurring; + isSetAllowRecurring = true; // mark as set + } + + /** + * Indicates whether the Pix payment method is set up as Pix Pay by Bank instead of standard Pix. + * + * @param allowPayByBank Indicates whether the Pix payment method is set up as Pix Pay by Bank + * instead of standard Pix. + * @return the current {@code PixResponseInfo} instance, allowing for method chaining + */ + public PixResponseInfo allowPayByBank(Boolean allowPayByBank) { + this.allowPayByBank = allowPayByBank; + isSetAllowPayByBank = true; // mark as set + return this; + } + + /** + * Indicates whether the Pix payment method is set up as Pix Pay by Bank instead of standard Pix. + * + * @return allowPayByBank Indicates whether the Pix payment method is set up as Pix Pay by Bank + * instead of standard Pix. + */ + @JsonProperty(JSON_PROPERTY_ALLOW_PAY_BY_BANK) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getAllowPayByBank() { + return allowPayByBank; + } + + /** + * Indicates whether the Pix payment method is set up as Pix Pay by Bank instead of standard Pix. + * + * @param allowPayByBank Indicates whether the Pix payment method is set up as Pix Pay by Bank + * instead of standard Pix. + */ + @JsonProperty(JSON_PROPERTY_ALLOW_PAY_BY_BANK) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAllowPayByBank(Boolean allowPayByBank) { + this.allowPayByBank = allowPayByBank; + isSetAllowPayByBank = true; // mark as set + } + + /** + * Configures whether null values are explicitly serialized in the JSON payload. Default is false. + */ + public PixResponseInfo includeNullValues(boolean includeNullValues) { + this.includeNullValues = includeNullValues; + return this; + } + + /** Returns whether null values are explicitly serialized in the JSON payload. */ + public boolean isIncludeNullValues() { + return includeNullValues; + } + + /** + * Sets whether null values should be explicitly serialized in the JSON payload. Default is false. + */ + public void setIncludeNullValues(boolean includeNullValues) { + this.includeNullValues = includeNullValues; + } + + /** Return true if this PixResponseInfo object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PixResponseInfo pixResponseInfo = (PixResponseInfo) o; + return Objects.equals(this.allowRecurring, pixResponseInfo.allowRecurring) + && Objects.equals(this.isSetAllowRecurring, pixResponseInfo.isSetAllowRecurring) + && Objects.equals(this.allowPayByBank, pixResponseInfo.allowPayByBank) + && Objects.equals(this.isSetAllowPayByBank, pixResponseInfo.isSetAllowPayByBank); + } + + @Override + public int hashCode() { + return Objects.hash(allowRecurring, isSetAllowRecurring, allowPayByBank, isSetAllowPayByBank); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PixResponseInfo {\n"); + sb.append(" allowRecurring: ").append(toIndentedString(allowRecurring)).append("\n"); + sb.append(" allowPayByBank: ").append(toIndentedString(allowPayByBank)).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 "); + } + + /** Returns a map of properties to be merged into the JSON payload as explicit null values. */ + @JsonInclude(JsonInclude.Include.ALWAYS) + @JsonAnyGetter + public Map getExplicitNulls() { + if (!this.includeNullValues) { + return Collections.emptyMap(); + } + + Map nulls = new HashMap<>(); + + if (isSetAllowRecurring) { + addIfNull(nulls, JSON_PROPERTY_ALLOW_RECURRING, this.allowRecurring); + } + if (isSetAllowPayByBank) { + addIfNull(nulls, JSON_PROPERTY_ALLOW_PAY_BY_BANK, this.allowPayByBank); + } + + return nulls; + } + + // add to map when value is null + private void addIfNull(Map map, String key, Object value) { + if (value == null) { + map.put(key, null); + } + } + + /** + * Create an instance of PixResponseInfo given an JSON string + * + * @param jsonString JSON string + * @return An instance of PixResponseInfo + * @throws JsonProcessingException if the JSON string is invalid with respect to PixResponseInfo + */ + public static PixResponseInfo fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, PixResponseInfo.class); + } + + /** + * Convert an instance of PixResponseInfo to an JSON string + * + * @return JSON string + */ + public String toJson() throws JsonProcessingException { + return JSON.getMapper().writeValueAsString(this); + } +} diff --git a/src/main/java/com/adyen/model/management/PulseInfo.java b/src/main/java/com/adyen/model/management/PulseInfo.java index 5966b5f12..58eee1c1d 100644 --- a/src/main/java/com/adyen/model/management/PulseInfo.java +++ b/src/main/java/com/adyen/model/management/PulseInfo.java @@ -30,12 +30,13 @@ }) public class PulseInfo { /** - * The type of transactions processed over this payment method. Allowed values: - **pos** for - * in-person payments. - **billpay** for subscription payments, both the initial payment and the - * later recurring payments. These transactions have `recurringProcessingModel` - * **Subscription**. - **ecom** for all other card not present transactions. This includes - * non-recurring transactions and transactions with `recurringProcessingModel` - * **CardOnFile** or **UnscheduledCardOnFile**. + * The type of transactions processed over this payment method. The recommended usage is to not + * specify a processing type. We then set up the payment method to process all transaction types. + * Allowed values: - **pos** for in-person payments. - **billpay** for subscription payments, both + * the initial payment and the later recurring payments. These transactions have + * `recurringProcessingModel` **Subscription**. - **ecom** for all other card not + * present transactions. This includes non-recurring transactions and transactions with + * `recurringProcessingModel` **CardOnFile** or **UnscheduledCardOnFile**. */ public enum ProcessingTypeEnum { BILLPAY(String.valueOf("billpay")), @@ -100,19 +101,22 @@ public static ProcessingTypeEnum fromValue(String value) { public PulseInfo() {} /** - * The type of transactions processed over this payment method. Allowed values: - **pos** for - * in-person payments. - **billpay** for subscription payments, both the initial payment and the - * later recurring payments. These transactions have `recurringProcessingModel` - * **Subscription**. - **ecom** for all other card not present transactions. This includes - * non-recurring transactions and transactions with `recurringProcessingModel` - * **CardOnFile** or **UnscheduledCardOnFile**. + * The type of transactions processed over this payment method. The recommended usage is to not + * specify a processing type. We then set up the payment method to process all transaction types. + * Allowed values: - **pos** for in-person payments. - **billpay** for subscription payments, both + * the initial payment and the later recurring payments. These transactions have + * `recurringProcessingModel` **Subscription**. - **ecom** for all other card not + * present transactions. This includes non-recurring transactions and transactions with + * `recurringProcessingModel` **CardOnFile** or **UnscheduledCardOnFile**. * - * @param processingType The type of transactions processed over this payment method. Allowed - * values: - **pos** for in-person payments. - **billpay** for subscription payments, both the - * initial payment and the later recurring payments. These transactions have - * `recurringProcessingModel` **Subscription**. - **ecom** for all other card not - * present transactions. This includes non-recurring transactions and transactions with - * `recurringProcessingModel` **CardOnFile** or **UnscheduledCardOnFile**. + * @param processingType The type of transactions processed over this payment method. The + * recommended usage is to not specify a processing type. We then set up the payment method to + * process all transaction types. Allowed values: - **pos** for in-person payments. - + * **billpay** for subscription payments, both the initial payment and the later recurring + * payments. These transactions have `recurringProcessingModel` **Subscription**. - + * **ecom** for all other card not present transactions. This includes non-recurring + * transactions and transactions with `recurringProcessingModel` **CardOnFile** or + * **UnscheduledCardOnFile**. * @return the current {@code PulseInfo} instance, allowing for method chaining */ public PulseInfo processingType(ProcessingTypeEnum processingType) { @@ -122,19 +126,22 @@ public PulseInfo processingType(ProcessingTypeEnum processingType) { } /** - * The type of transactions processed over this payment method. Allowed values: - **pos** for - * in-person payments. - **billpay** for subscription payments, both the initial payment and the - * later recurring payments. These transactions have `recurringProcessingModel` - * **Subscription**. - **ecom** for all other card not present transactions. This includes - * non-recurring transactions and transactions with `recurringProcessingModel` - * **CardOnFile** or **UnscheduledCardOnFile**. + * The type of transactions processed over this payment method. The recommended usage is to not + * specify a processing type. We then set up the payment method to process all transaction types. + * Allowed values: - **pos** for in-person payments. - **billpay** for subscription payments, both + * the initial payment and the later recurring payments. These transactions have + * `recurringProcessingModel` **Subscription**. - **ecom** for all other card not + * present transactions. This includes non-recurring transactions and transactions with + * `recurringProcessingModel` **CardOnFile** or **UnscheduledCardOnFile**. * - * @return processingType The type of transactions processed over this payment method. Allowed - * values: - **pos** for in-person payments. - **billpay** for subscription payments, both the - * initial payment and the later recurring payments. These transactions have - * `recurringProcessingModel` **Subscription**. - **ecom** for all other card not - * present transactions. This includes non-recurring transactions and transactions with - * `recurringProcessingModel` **CardOnFile** or **UnscheduledCardOnFile**. + * @return processingType The type of transactions processed over this payment method. The + * recommended usage is to not specify a processing type. We then set up the payment method to + * process all transaction types. Allowed values: - **pos** for in-person payments. - + * **billpay** for subscription payments, both the initial payment and the later recurring + * payments. These transactions have `recurringProcessingModel` **Subscription**. - + * **ecom** for all other card not present transactions. This includes non-recurring + * transactions and transactions with `recurringProcessingModel` **CardOnFile** or + * **UnscheduledCardOnFile**. */ @JsonProperty(JSON_PROPERTY_PROCESSING_TYPE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -143,19 +150,22 @@ public ProcessingTypeEnum getProcessingType() { } /** - * The type of transactions processed over this payment method. Allowed values: - **pos** for - * in-person payments. - **billpay** for subscription payments, both the initial payment and the - * later recurring payments. These transactions have `recurringProcessingModel` - * **Subscription**. - **ecom** for all other card not present transactions. This includes - * non-recurring transactions and transactions with `recurringProcessingModel` - * **CardOnFile** or **UnscheduledCardOnFile**. + * The type of transactions processed over this payment method. The recommended usage is to not + * specify a processing type. We then set up the payment method to process all transaction types. + * Allowed values: - **pos** for in-person payments. - **billpay** for subscription payments, both + * the initial payment and the later recurring payments. These transactions have + * `recurringProcessingModel` **Subscription**. - **ecom** for all other card not + * present transactions. This includes non-recurring transactions and transactions with + * `recurringProcessingModel` **CardOnFile** or **UnscheduledCardOnFile**. * - * @param processingType The type of transactions processed over this payment method. Allowed - * values: - **pos** for in-person payments. - **billpay** for subscription payments, both the - * initial payment and the later recurring payments. These transactions have - * `recurringProcessingModel` **Subscription**. - **ecom** for all other card not - * present transactions. This includes non-recurring transactions and transactions with - * `recurringProcessingModel` **CardOnFile** or **UnscheduledCardOnFile**. + * @param processingType The type of transactions processed over this payment method. The + * recommended usage is to not specify a processing type. We then set up the payment method to + * process all transaction types. Allowed values: - **pos** for in-person payments. - + * **billpay** for subscription payments, both the initial payment and the later recurring + * payments. These transactions have `recurringProcessingModel` **Subscription**. - + * **ecom** for all other card not present transactions. This includes non-recurring + * transactions and transactions with `recurringProcessingModel` **CardOnFile** or + * **UnscheduledCardOnFile**. */ @JsonProperty(JSON_PROPERTY_PROCESSING_TYPE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) diff --git a/src/main/java/com/adyen/model/management/PulseResponseInfo.java b/src/main/java/com/adyen/model/management/PulseResponseInfo.java index 541eaf823..ffa850ce0 100644 --- a/src/main/java/com/adyen/model/management/PulseResponseInfo.java +++ b/src/main/java/com/adyen/model/management/PulseResponseInfo.java @@ -25,10 +25,65 @@ /** PulseResponseInfo */ @JsonPropertyOrder({ + PulseResponseInfo.JSON_PROPERTY_NETWORK_PROCESSING_MODE, PulseResponseInfo.JSON_PROPERTY_PROCESSING_TYPE, PulseResponseInfo.JSON_PROPERTY_TRANSACTION_DESCRIPTION }) public class PulseResponseInfo { + /** + * Indicates the processing flow for the payment method. Possible values: - **auth**: If you have + * not [configured automatic + * capture](https://docs.adyen.com/online-payments/capture#types-of-capture) for the transaction, + * you must manually capture the funds. - **sale**: You do not need to separately capture the + * funds, because capture happens automatically as part of the transaction, together with + * authorization. + */ + public enum NetworkProcessingModeEnum { + AUTH(String.valueOf("auth")), + + SALE(String.valueOf("sale")); + + private static final Logger LOG = Logger.getLogger(NetworkProcessingModeEnum.class.getName()); + + private String value; + + NetworkProcessingModeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static NetworkProcessingModeEnum fromValue(String value) { + for (NetworkProcessingModeEnum b : NetworkProcessingModeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + // handling unexpected value + LOG.warning( + "NetworkProcessingModeEnum: unexpected enum value '" + + value + + "' - Supported values are " + + Arrays.toString(NetworkProcessingModeEnum.values())); + return null; + } + } + + public static final String JSON_PROPERTY_NETWORK_PROCESSING_MODE = "networkProcessingMode"; + private NetworkProcessingModeEnum networkProcessingMode; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetNetworkProcessingMode = false; + /** * The type of transactions processed over this payment method. Allowed values: - **pos** for * in-person payments. - **billpay** for subscription payments, both the initial payment and the @@ -99,6 +154,71 @@ public static ProcessingTypeEnum fromValue(String value) { public PulseResponseInfo() {} + /** + * Indicates the processing flow for the payment method. Possible values: - **auth**: If you have + * not [configured automatic + * capture](https://docs.adyen.com/online-payments/capture#types-of-capture) for the transaction, + * you must manually capture the funds. - **sale**: You do not need to separately capture the + * funds, because capture happens automatically as part of the transaction, together with + * authorization. + * + * @param networkProcessingMode Indicates the processing flow for the payment method. Possible + * values: - **auth**: If you have not [configured automatic + * capture](https://docs.adyen.com/online-payments/capture#types-of-capture) for the + * transaction, you must manually capture the funds. - **sale**: You do not need to separately + * capture the funds, because capture happens automatically as part of the transaction, + * together with authorization. + * @return the current {@code PulseResponseInfo} instance, allowing for method chaining + */ + public PulseResponseInfo networkProcessingMode(NetworkProcessingModeEnum networkProcessingMode) { + this.networkProcessingMode = networkProcessingMode; + isSetNetworkProcessingMode = true; // mark as set + return this; + } + + /** + * Indicates the processing flow for the payment method. Possible values: - **auth**: If you have + * not [configured automatic + * capture](https://docs.adyen.com/online-payments/capture#types-of-capture) for the transaction, + * you must manually capture the funds. - **sale**: You do not need to separately capture the + * funds, because capture happens automatically as part of the transaction, together with + * authorization. + * + * @return networkProcessingMode Indicates the processing flow for the payment method. Possible + * values: - **auth**: If you have not [configured automatic + * capture](https://docs.adyen.com/online-payments/capture#types-of-capture) for the + * transaction, you must manually capture the funds. - **sale**: You do not need to separately + * capture the funds, because capture happens automatically as part of the transaction, + * together with authorization. + */ + @JsonProperty(JSON_PROPERTY_NETWORK_PROCESSING_MODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public NetworkProcessingModeEnum getNetworkProcessingMode() { + return networkProcessingMode; + } + + /** + * Indicates the processing flow for the payment method. Possible values: - **auth**: If you have + * not [configured automatic + * capture](https://docs.adyen.com/online-payments/capture#types-of-capture) for the transaction, + * you must manually capture the funds. - **sale**: You do not need to separately capture the + * funds, because capture happens automatically as part of the transaction, together with + * authorization. + * + * @param networkProcessingMode Indicates the processing flow for the payment method. Possible + * values: - **auth**: If you have not [configured automatic + * capture](https://docs.adyen.com/online-payments/capture#types-of-capture) for the + * transaction, you must manually capture the funds. - **sale**: You do not need to separately + * capture the funds, because capture happens automatically as part of the transaction, + * together with authorization. + */ + @JsonProperty(JSON_PROPERTY_NETWORK_PROCESSING_MODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setNetworkProcessingMode(NetworkProcessingModeEnum networkProcessingMode) { + this.networkProcessingMode = networkProcessingMode; + isSetNetworkProcessingMode = true; // mark as set + } + /** * The type of transactions processed over this payment method. Allowed values: - **pos** for * in-person payments. - **billpay** for subscription payments, both the initial payment and the @@ -230,7 +350,10 @@ public boolean equals(Object o) { return false; } PulseResponseInfo pulseResponseInfo = (PulseResponseInfo) o; - return Objects.equals(this.processingType, pulseResponseInfo.processingType) + return Objects.equals(this.networkProcessingMode, pulseResponseInfo.networkProcessingMode) + && Objects.equals( + this.isSetNetworkProcessingMode, pulseResponseInfo.isSetNetworkProcessingMode) + && Objects.equals(this.processingType, pulseResponseInfo.processingType) && Objects.equals(this.isSetProcessingType, pulseResponseInfo.isSetProcessingType) && Objects.equals(this.transactionDescription, pulseResponseInfo.transactionDescription) && Objects.equals( @@ -240,13 +363,21 @@ public boolean equals(Object o) { @Override public int hashCode() { return Objects.hash( - processingType, isSetProcessingType, transactionDescription, isSetTransactionDescription); + networkProcessingMode, + isSetNetworkProcessingMode, + processingType, + isSetProcessingType, + transactionDescription, + isSetTransactionDescription); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class PulseResponseInfo {\n"); + sb.append(" networkProcessingMode: ") + .append(toIndentedString(networkProcessingMode)) + .append("\n"); sb.append(" processingType: ").append(toIndentedString(processingType)).append("\n"); sb.append(" transactionDescription: ") .append(toIndentedString(transactionDescription)) @@ -275,6 +406,9 @@ public Map getExplicitNulls() { Map nulls = new HashMap<>(); + if (isSetNetworkProcessingMode) { + addIfNull(nulls, JSON_PROPERTY_NETWORK_PROCESSING_MODE, this.networkProcessingMode); + } if (isSetProcessingType) { addIfNull(nulls, JSON_PROPERTY_PROCESSING_TYPE, this.processingType); } diff --git a/src/main/java/com/adyen/model/management/Standalone.java b/src/main/java/com/adyen/model/management/Standalone.java index e8e17d167..bade80da9 100644 --- a/src/main/java/com/adyen/model/management/Standalone.java +++ b/src/main/java/com/adyen/model/management/Standalone.java @@ -23,7 +23,8 @@ @JsonPropertyOrder({ Standalone.JSON_PROPERTY_CURRENCY_CODE, Standalone.JSON_PROPERTY_ENABLE_GRATUITIES, - Standalone.JSON_PROPERTY_ENABLE_STANDALONE + Standalone.JSON_PROPERTY_ENABLE_STANDALONE, + Standalone.JSON_PROPERTY_MERCHANT_REFERENCE }) public class Standalone { public static final String JSON_PROPERTY_CURRENCY_CODE = "currencyCode"; @@ -44,6 +45,12 @@ public class Standalone { /** Mark when the attribute has been explicitly set. */ private boolean isSetEnableStandalone = false; + public static final String JSON_PROPERTY_MERCHANT_REFERENCE = "merchantReference"; + private String merchantReference; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetMerchantReference = false; + /** * Sets whether attributes with null values should be explicitly included in the JSON payload. * Default is false. @@ -169,6 +176,71 @@ public void setEnableStandalone(Boolean enableStandalone) { isSetEnableStandalone = true; // mark as set } + /** + * The merchant reference to be sent with every transaction when the terminal is in standalone + * mode. Used for reconciliation. This property also accepts one or more variables as input, + * together with plain text. When this property reaches the terminal, the terminal replaces the + * variables with the values that apply to it. For the list of allowed variables, see [Configure + * the merchant + * reference](https://docs.adyen.com/point-of-sale/standalone/standalone-build/set-up-standalone#configure-merchant-reference). + * + * @param merchantReference The merchant reference to be sent with every transaction when the + * terminal is in standalone mode. Used for reconciliation. This property also accepts one or + * more variables as input, together with plain text. When this property reaches the terminal, + * the terminal replaces the variables with the values that apply to it. For the list of + * allowed variables, see [Configure the merchant + * reference](https://docs.adyen.com/point-of-sale/standalone/standalone-build/set-up-standalone#configure-merchant-reference). + * @return the current {@code Standalone} instance, allowing for method chaining + */ + public Standalone merchantReference(String merchantReference) { + this.merchantReference = merchantReference; + isSetMerchantReference = true; // mark as set + return this; + } + + /** + * The merchant reference to be sent with every transaction when the terminal is in standalone + * mode. Used for reconciliation. This property also accepts one or more variables as input, + * together with plain text. When this property reaches the terminal, the terminal replaces the + * variables with the values that apply to it. For the list of allowed variables, see [Configure + * the merchant + * reference](https://docs.adyen.com/point-of-sale/standalone/standalone-build/set-up-standalone#configure-merchant-reference). + * + * @return merchantReference The merchant reference to be sent with every transaction when the + * terminal is in standalone mode. Used for reconciliation. This property also accepts one or + * more variables as input, together with plain text. When this property reaches the terminal, + * the terminal replaces the variables with the values that apply to it. For the list of + * allowed variables, see [Configure the merchant + * reference](https://docs.adyen.com/point-of-sale/standalone/standalone-build/set-up-standalone#configure-merchant-reference). + */ + @JsonProperty(JSON_PROPERTY_MERCHANT_REFERENCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getMerchantReference() { + return merchantReference; + } + + /** + * The merchant reference to be sent with every transaction when the terminal is in standalone + * mode. Used for reconciliation. This property also accepts one or more variables as input, + * together with plain text. When this property reaches the terminal, the terminal replaces the + * variables with the values that apply to it. For the list of allowed variables, see [Configure + * the merchant + * reference](https://docs.adyen.com/point-of-sale/standalone/standalone-build/set-up-standalone#configure-merchant-reference). + * + * @param merchantReference The merchant reference to be sent with every transaction when the + * terminal is in standalone mode. Used for reconciliation. This property also accepts one or + * more variables as input, together with plain text. When this property reaches the terminal, + * the terminal replaces the variables with the values that apply to it. For the list of + * allowed variables, see [Configure the merchant + * reference](https://docs.adyen.com/point-of-sale/standalone/standalone-build/set-up-standalone#configure-merchant-reference). + */ + @JsonProperty(JSON_PROPERTY_MERCHANT_REFERENCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMerchantReference(String merchantReference) { + this.merchantReference = merchantReference; + isSetMerchantReference = true; // mark as set + } + /** * Configures whether null values are explicitly serialized in the JSON payload. Default is false. */ @@ -204,7 +276,9 @@ public boolean equals(Object o) { && Objects.equals(this.enableGratuities, standalone.enableGratuities) && Objects.equals(this.isSetEnableGratuities, standalone.isSetEnableGratuities) && Objects.equals(this.enableStandalone, standalone.enableStandalone) - && Objects.equals(this.isSetEnableStandalone, standalone.isSetEnableStandalone); + && Objects.equals(this.isSetEnableStandalone, standalone.isSetEnableStandalone) + && Objects.equals(this.merchantReference, standalone.merchantReference) + && Objects.equals(this.isSetMerchantReference, standalone.isSetMerchantReference); } @Override @@ -215,7 +289,9 @@ public int hashCode() { enableGratuities, isSetEnableGratuities, enableStandalone, - isSetEnableStandalone); + isSetEnableStandalone, + merchantReference, + isSetMerchantReference); } @Override @@ -225,6 +301,7 @@ public String toString() { sb.append(" currencyCode: ").append(toIndentedString(currencyCode)).append("\n"); sb.append(" enableGratuities: ").append(toIndentedString(enableGratuities)).append("\n"); sb.append(" enableStandalone: ").append(toIndentedString(enableStandalone)).append("\n"); + sb.append(" merchantReference: ").append(toIndentedString(merchantReference)).append("\n"); sb.append("}"); return sb.toString(); } @@ -258,6 +335,9 @@ public Map getExplicitNulls() { if (isSetEnableStandalone) { addIfNull(nulls, JSON_PROPERTY_ENABLE_STANDALONE, this.enableStandalone); } + if (isSetMerchantReference) { + addIfNull(nulls, JSON_PROPERTY_MERCHANT_REFERENCE, this.merchantReference); + } return nulls; } diff --git a/src/main/java/com/adyen/model/management/StarInfo.java b/src/main/java/com/adyen/model/management/StarInfo.java index 7d1f3f665..167bec330 100644 --- a/src/main/java/com/adyen/model/management/StarInfo.java +++ b/src/main/java/com/adyen/model/management/StarInfo.java @@ -30,12 +30,13 @@ }) public class StarInfo { /** - * The type of transactions processed over this payment method. Allowed values: - **pos** for - * in-person payments. - **billpay** for subscription payments, both the initial payment and the - * later recurring payments. These transactions have `recurringProcessingModel` - * **Subscription**. - **ecom** for all other card not present transactions. This includes - * non-recurring transactions and transactions with `recurringProcessingModel` - * **CardOnFile** or **UnscheduledCardOnFile**. + * The type of transactions processed over this payment method. The recommended usage is to not + * specify a processing type. We then set up the payment method to process all transaction types. + * Allowed values: - **pos** for in-person payments. - **billpay** for subscription payments, both + * the initial payment and the later recurring payments. These transactions have + * `recurringProcessingModel` **Subscription**. - **ecom** for all other card not + * present transactions. This includes non-recurring transactions and transactions with + * `recurringProcessingModel` **CardOnFile** or **UnscheduledCardOnFile**. */ public enum ProcessingTypeEnum { BILLPAY(String.valueOf("billpay")), @@ -100,19 +101,22 @@ public static ProcessingTypeEnum fromValue(String value) { public StarInfo() {} /** - * The type of transactions processed over this payment method. Allowed values: - **pos** for - * in-person payments. - **billpay** for subscription payments, both the initial payment and the - * later recurring payments. These transactions have `recurringProcessingModel` - * **Subscription**. - **ecom** for all other card not present transactions. This includes - * non-recurring transactions and transactions with `recurringProcessingModel` - * **CardOnFile** or **UnscheduledCardOnFile**. + * The type of transactions processed over this payment method. The recommended usage is to not + * specify a processing type. We then set up the payment method to process all transaction types. + * Allowed values: - **pos** for in-person payments. - **billpay** for subscription payments, both + * the initial payment and the later recurring payments. These transactions have + * `recurringProcessingModel` **Subscription**. - **ecom** for all other card not + * present transactions. This includes non-recurring transactions and transactions with + * `recurringProcessingModel` **CardOnFile** or **UnscheduledCardOnFile**. * - * @param processingType The type of transactions processed over this payment method. Allowed - * values: - **pos** for in-person payments. - **billpay** for subscription payments, both the - * initial payment and the later recurring payments. These transactions have - * `recurringProcessingModel` **Subscription**. - **ecom** for all other card not - * present transactions. This includes non-recurring transactions and transactions with - * `recurringProcessingModel` **CardOnFile** or **UnscheduledCardOnFile**. + * @param processingType The type of transactions processed over this payment method. The + * recommended usage is to not specify a processing type. We then set up the payment method to + * process all transaction types. Allowed values: - **pos** for in-person payments. - + * **billpay** for subscription payments, both the initial payment and the later recurring + * payments. These transactions have `recurringProcessingModel` **Subscription**. - + * **ecom** for all other card not present transactions. This includes non-recurring + * transactions and transactions with `recurringProcessingModel` **CardOnFile** or + * **UnscheduledCardOnFile**. * @return the current {@code StarInfo} instance, allowing for method chaining */ public StarInfo processingType(ProcessingTypeEnum processingType) { @@ -122,19 +126,22 @@ public StarInfo processingType(ProcessingTypeEnum processingType) { } /** - * The type of transactions processed over this payment method. Allowed values: - **pos** for - * in-person payments. - **billpay** for subscription payments, both the initial payment and the - * later recurring payments. These transactions have `recurringProcessingModel` - * **Subscription**. - **ecom** for all other card not present transactions. This includes - * non-recurring transactions and transactions with `recurringProcessingModel` - * **CardOnFile** or **UnscheduledCardOnFile**. + * The type of transactions processed over this payment method. The recommended usage is to not + * specify a processing type. We then set up the payment method to process all transaction types. + * Allowed values: - **pos** for in-person payments. - **billpay** for subscription payments, both + * the initial payment and the later recurring payments. These transactions have + * `recurringProcessingModel` **Subscription**. - **ecom** for all other card not + * present transactions. This includes non-recurring transactions and transactions with + * `recurringProcessingModel` **CardOnFile** or **UnscheduledCardOnFile**. * - * @return processingType The type of transactions processed over this payment method. Allowed - * values: - **pos** for in-person payments. - **billpay** for subscription payments, both the - * initial payment and the later recurring payments. These transactions have - * `recurringProcessingModel` **Subscription**. - **ecom** for all other card not - * present transactions. This includes non-recurring transactions and transactions with - * `recurringProcessingModel` **CardOnFile** or **UnscheduledCardOnFile**. + * @return processingType The type of transactions processed over this payment method. The + * recommended usage is to not specify a processing type. We then set up the payment method to + * process all transaction types. Allowed values: - **pos** for in-person payments. - + * **billpay** for subscription payments, both the initial payment and the later recurring + * payments. These transactions have `recurringProcessingModel` **Subscription**. - + * **ecom** for all other card not present transactions. This includes non-recurring + * transactions and transactions with `recurringProcessingModel` **CardOnFile** or + * **UnscheduledCardOnFile**. */ @JsonProperty(JSON_PROPERTY_PROCESSING_TYPE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -143,19 +150,22 @@ public ProcessingTypeEnum getProcessingType() { } /** - * The type of transactions processed over this payment method. Allowed values: - **pos** for - * in-person payments. - **billpay** for subscription payments, both the initial payment and the - * later recurring payments. These transactions have `recurringProcessingModel` - * **Subscription**. - **ecom** for all other card not present transactions. This includes - * non-recurring transactions and transactions with `recurringProcessingModel` - * **CardOnFile** or **UnscheduledCardOnFile**. + * The type of transactions processed over this payment method. The recommended usage is to not + * specify a processing type. We then set up the payment method to process all transaction types. + * Allowed values: - **pos** for in-person payments. - **billpay** for subscription payments, both + * the initial payment and the later recurring payments. These transactions have + * `recurringProcessingModel` **Subscription**. - **ecom** for all other card not + * present transactions. This includes non-recurring transactions and transactions with + * `recurringProcessingModel` **CardOnFile** or **UnscheduledCardOnFile**. * - * @param processingType The type of transactions processed over this payment method. Allowed - * values: - **pos** for in-person payments. - **billpay** for subscription payments, both the - * initial payment and the later recurring payments. These transactions have - * `recurringProcessingModel` **Subscription**. - **ecom** for all other card not - * present transactions. This includes non-recurring transactions and transactions with - * `recurringProcessingModel` **CardOnFile** or **UnscheduledCardOnFile**. + * @param processingType The type of transactions processed over this payment method. The + * recommended usage is to not specify a processing type. We then set up the payment method to + * process all transaction types. Allowed values: - **pos** for in-person payments. - + * **billpay** for subscription payments, both the initial payment and the later recurring + * payments. These transactions have `recurringProcessingModel` **Subscription**. - + * **ecom** for all other card not present transactions. This includes non-recurring + * transactions and transactions with `recurringProcessingModel` **CardOnFile** or + * **UnscheduledCardOnFile**. */ @JsonProperty(JSON_PROPERTY_PROCESSING_TYPE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) diff --git a/src/main/java/com/adyen/model/management/StarResponseInfo.java b/src/main/java/com/adyen/model/management/StarResponseInfo.java index 44039b1fa..5771ef3ab 100644 --- a/src/main/java/com/adyen/model/management/StarResponseInfo.java +++ b/src/main/java/com/adyen/model/management/StarResponseInfo.java @@ -25,10 +25,65 @@ /** StarResponseInfo */ @JsonPropertyOrder({ + StarResponseInfo.JSON_PROPERTY_NETWORK_PROCESSING_MODE, StarResponseInfo.JSON_PROPERTY_PROCESSING_TYPE, StarResponseInfo.JSON_PROPERTY_TRANSACTION_DESCRIPTION }) public class StarResponseInfo { + /** + * Indicates the processing flow for the payment method. Possible values: - **auth**: If you have + * not [configured automatic + * capture](https://docs.adyen.com/online-payments/capture#types-of-capture) for the transaction, + * you must manually capture the funds. - **sale**: You do not need to separately capture the + * funds, because capture happens automatically as part of the transaction, together with + * authorization. + */ + public enum NetworkProcessingModeEnum { + AUTH(String.valueOf("auth")), + + SALE(String.valueOf("sale")); + + private static final Logger LOG = Logger.getLogger(NetworkProcessingModeEnum.class.getName()); + + private String value; + + NetworkProcessingModeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static NetworkProcessingModeEnum fromValue(String value) { + for (NetworkProcessingModeEnum b : NetworkProcessingModeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + // handling unexpected value + LOG.warning( + "NetworkProcessingModeEnum: unexpected enum value '" + + value + + "' - Supported values are " + + Arrays.toString(NetworkProcessingModeEnum.values())); + return null; + } + } + + public static final String JSON_PROPERTY_NETWORK_PROCESSING_MODE = "networkProcessingMode"; + private NetworkProcessingModeEnum networkProcessingMode; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetNetworkProcessingMode = false; + /** * The type of transactions processed over this payment method. Allowed values: - **pos** for * in-person payments. - **billpay** for subscription payments, both the initial payment and the @@ -99,6 +154,71 @@ public static ProcessingTypeEnum fromValue(String value) { public StarResponseInfo() {} + /** + * Indicates the processing flow for the payment method. Possible values: - **auth**: If you have + * not [configured automatic + * capture](https://docs.adyen.com/online-payments/capture#types-of-capture) for the transaction, + * you must manually capture the funds. - **sale**: You do not need to separately capture the + * funds, because capture happens automatically as part of the transaction, together with + * authorization. + * + * @param networkProcessingMode Indicates the processing flow for the payment method. Possible + * values: - **auth**: If you have not [configured automatic + * capture](https://docs.adyen.com/online-payments/capture#types-of-capture) for the + * transaction, you must manually capture the funds. - **sale**: You do not need to separately + * capture the funds, because capture happens automatically as part of the transaction, + * together with authorization. + * @return the current {@code StarResponseInfo} instance, allowing for method chaining + */ + public StarResponseInfo networkProcessingMode(NetworkProcessingModeEnum networkProcessingMode) { + this.networkProcessingMode = networkProcessingMode; + isSetNetworkProcessingMode = true; // mark as set + return this; + } + + /** + * Indicates the processing flow for the payment method. Possible values: - **auth**: If you have + * not [configured automatic + * capture](https://docs.adyen.com/online-payments/capture#types-of-capture) for the transaction, + * you must manually capture the funds. - **sale**: You do not need to separately capture the + * funds, because capture happens automatically as part of the transaction, together with + * authorization. + * + * @return networkProcessingMode Indicates the processing flow for the payment method. Possible + * values: - **auth**: If you have not [configured automatic + * capture](https://docs.adyen.com/online-payments/capture#types-of-capture) for the + * transaction, you must manually capture the funds. - **sale**: You do not need to separately + * capture the funds, because capture happens automatically as part of the transaction, + * together with authorization. + */ + @JsonProperty(JSON_PROPERTY_NETWORK_PROCESSING_MODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public NetworkProcessingModeEnum getNetworkProcessingMode() { + return networkProcessingMode; + } + + /** + * Indicates the processing flow for the payment method. Possible values: - **auth**: If you have + * not [configured automatic + * capture](https://docs.adyen.com/online-payments/capture#types-of-capture) for the transaction, + * you must manually capture the funds. - **sale**: You do not need to separately capture the + * funds, because capture happens automatically as part of the transaction, together with + * authorization. + * + * @param networkProcessingMode Indicates the processing flow for the payment method. Possible + * values: - **auth**: If you have not [configured automatic + * capture](https://docs.adyen.com/online-payments/capture#types-of-capture) for the + * transaction, you must manually capture the funds. - **sale**: You do not need to separately + * capture the funds, because capture happens automatically as part of the transaction, + * together with authorization. + */ + @JsonProperty(JSON_PROPERTY_NETWORK_PROCESSING_MODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setNetworkProcessingMode(NetworkProcessingModeEnum networkProcessingMode) { + this.networkProcessingMode = networkProcessingMode; + isSetNetworkProcessingMode = true; // mark as set + } + /** * The type of transactions processed over this payment method. Allowed values: - **pos** for * in-person payments. - **billpay** for subscription payments, both the initial payment and the @@ -230,7 +350,10 @@ public boolean equals(Object o) { return false; } StarResponseInfo starResponseInfo = (StarResponseInfo) o; - return Objects.equals(this.processingType, starResponseInfo.processingType) + return Objects.equals(this.networkProcessingMode, starResponseInfo.networkProcessingMode) + && Objects.equals( + this.isSetNetworkProcessingMode, starResponseInfo.isSetNetworkProcessingMode) + && Objects.equals(this.processingType, starResponseInfo.processingType) && Objects.equals(this.isSetProcessingType, starResponseInfo.isSetProcessingType) && Objects.equals(this.transactionDescription, starResponseInfo.transactionDescription) && Objects.equals( @@ -240,13 +363,21 @@ public boolean equals(Object o) { @Override public int hashCode() { return Objects.hash( - processingType, isSetProcessingType, transactionDescription, isSetTransactionDescription); + networkProcessingMode, + isSetNetworkProcessingMode, + processingType, + isSetProcessingType, + transactionDescription, + isSetTransactionDescription); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class StarResponseInfo {\n"); + sb.append(" networkProcessingMode: ") + .append(toIndentedString(networkProcessingMode)) + .append("\n"); sb.append(" processingType: ").append(toIndentedString(processingType)).append("\n"); sb.append(" transactionDescription: ") .append(toIndentedString(transactionDescription)) @@ -275,6 +406,9 @@ public Map getExplicitNulls() { Map nulls = new HashMap<>(); + if (isSetNetworkProcessingMode) { + addIfNull(nulls, JSON_PROPERTY_NETWORK_PROCESSING_MODE, this.networkProcessingMode); + } if (isSetProcessingType) { addIfNull(nulls, JSON_PROPERTY_PROCESSING_TYPE, this.processingType); } diff --git a/src/main/java/com/adyen/model/management/Store.java b/src/main/java/com/adyen/model/management/Store.java index bbc089679..23328c6a7 100644 --- a/src/main/java/com/adyen/model/management/Store.java +++ b/src/main/java/com/adyen/model/management/Store.java @@ -513,12 +513,10 @@ public void setMerchantId(String merchantId) { /** * The phone number of the store, including '+' and country code in the - * [E.164](https://en.wikipedia.org/wiki/E.164) format. If passed in a different format, we - * convert and validate the phone number against E.164. + * [E.164](https://en.wikipedia.org/wiki/E.164) format. * * @param phoneNumber The phone number of the store, including '+' and country code in the - * [E.164](https://en.wikipedia.org/wiki/E.164) format. If passed in a different format, we - * convert and validate the phone number against E.164. + * [E.164](https://en.wikipedia.org/wiki/E.164) format. * @return the current {@code Store} instance, allowing for method chaining */ public Store phoneNumber(String phoneNumber) { @@ -529,12 +527,10 @@ public Store phoneNumber(String phoneNumber) { /** * The phone number of the store, including '+' and country code in the - * [E.164](https://en.wikipedia.org/wiki/E.164) format. If passed in a different format, we - * convert and validate the phone number against E.164. + * [E.164](https://en.wikipedia.org/wiki/E.164) format. * * @return phoneNumber The phone number of the store, including '+' and country code in - * the [E.164](https://en.wikipedia.org/wiki/E.164) format. If passed in a different format, - * we convert and validate the phone number against E.164. + * the [E.164](https://en.wikipedia.org/wiki/E.164) format. */ @JsonProperty(JSON_PROPERTY_PHONE_NUMBER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -544,12 +540,10 @@ public String getPhoneNumber() { /** * The phone number of the store, including '+' and country code in the - * [E.164](https://en.wikipedia.org/wiki/E.164) format. If passed in a different format, we - * convert and validate the phone number against E.164. + * [E.164](https://en.wikipedia.org/wiki/E.164) format. * * @param phoneNumber The phone number of the store, including '+' and country code in the - * [E.164](https://en.wikipedia.org/wiki/E.164) format. If passed in a different format, we - * convert and validate the phone number against E.164. + * [E.164](https://en.wikipedia.org/wiki/E.164) format. */ @JsonProperty(JSON_PROPERTY_PHONE_NUMBER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) diff --git a/src/main/java/com/adyen/model/management/StoreCreationRequest.java b/src/main/java/com/adyen/model/management/StoreCreationRequest.java index 648ad2ec6..57f8d21d2 100644 --- a/src/main/java/com/adyen/model/management/StoreCreationRequest.java +++ b/src/main/java/com/adyen/model/management/StoreCreationRequest.java @@ -326,13 +326,18 @@ public void setLocalizedInformation(LocalizedInformation localizedInformation) { } /** - * The phone number of the store, including '+' and country code in the - * [E.164](https://en.wikipedia.org/wiki/E.164) format. If passed in a different format, we - * convert and validate the phone number against E.164. - * - * @param phoneNumber The phone number of the store, including '+' and country code in the - * [E.164](https://en.wikipedia.org/wiki/E.164) format. If passed in a different format, we - * convert and validate the phone number against E.164. + * The phone number of the store in [E.164](https://en.wikipedia.org/wiki/E.164) format: a plus + * sign (`+`), the country code, and the phone number. For example, **+13123456789**. + * You can include spaces, hyphens, or brackets, such as **+1 (312) 345-6789**. We reject phone + * numbers that do not start with `+` and the country code, such as **3123456789** or + * **0031201234567**. The phone number can be from a different country than the store address. + * + * @param phoneNumber The phone number of the store in + * [E.164](https://en.wikipedia.org/wiki/E.164) format: a plus sign (`+`), the + * country code, and the phone number. For example, **+13123456789**. You can include spaces, + * hyphens, or brackets, such as **+1 (312) 345-6789**. We reject phone numbers that do not + * start with `+` and the country code, such as **3123456789** or **0031201234567**. + * The phone number can be from a different country than the store address. * @return the current {@code StoreCreationRequest} instance, allowing for method chaining */ public StoreCreationRequest phoneNumber(String phoneNumber) { @@ -342,13 +347,18 @@ public StoreCreationRequest phoneNumber(String phoneNumber) { } /** - * The phone number of the store, including '+' and country code in the - * [E.164](https://en.wikipedia.org/wiki/E.164) format. If passed in a different format, we - * convert and validate the phone number against E.164. + * The phone number of the store in [E.164](https://en.wikipedia.org/wiki/E.164) format: a plus + * sign (`+`), the country code, and the phone number. For example, **+13123456789**. + * You can include spaces, hyphens, or brackets, such as **+1 (312) 345-6789**. We reject phone + * numbers that do not start with `+` and the country code, such as **3123456789** or + * **0031201234567**. The phone number can be from a different country than the store address. * - * @return phoneNumber The phone number of the store, including '+' and country code in - * the [E.164](https://en.wikipedia.org/wiki/E.164) format. If passed in a different format, - * we convert and validate the phone number against E.164. + * @return phoneNumber The phone number of the store in + * [E.164](https://en.wikipedia.org/wiki/E.164) format: a plus sign (`+`), the + * country code, and the phone number. For example, **+13123456789**. You can include spaces, + * hyphens, or brackets, such as **+1 (312) 345-6789**. We reject phone numbers that do not + * start with `+` and the country code, such as **3123456789** or **0031201234567**. + * The phone number can be from a different country than the store address. */ @JsonProperty(JSON_PROPERTY_PHONE_NUMBER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -357,13 +367,18 @@ public String getPhoneNumber() { } /** - * The phone number of the store, including '+' and country code in the - * [E.164](https://en.wikipedia.org/wiki/E.164) format. If passed in a different format, we - * convert and validate the phone number against E.164. + * The phone number of the store in [E.164](https://en.wikipedia.org/wiki/E.164) format: a plus + * sign (`+`), the country code, and the phone number. For example, **+13123456789**. + * You can include spaces, hyphens, or brackets, such as **+1 (312) 345-6789**. We reject phone + * numbers that do not start with `+` and the country code, such as **3123456789** or + * **0031201234567**. The phone number can be from a different country than the store address. * - * @param phoneNumber The phone number of the store, including '+' and country code in the - * [E.164](https://en.wikipedia.org/wiki/E.164) format. If passed in a different format, we - * convert and validate the phone number against E.164. + * @param phoneNumber The phone number of the store in + * [E.164](https://en.wikipedia.org/wiki/E.164) format: a plus sign (`+`), the + * country code, and the phone number. For example, **+13123456789**. You can include spaces, + * hyphens, or brackets, such as **+1 (312) 345-6789**. We reject phone numbers that do not + * start with `+` and the country code, such as **3123456789** or **0031201234567**. + * The phone number can be from a different country than the store address. */ @JsonProperty(JSON_PROPERTY_PHONE_NUMBER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) diff --git a/src/main/java/com/adyen/model/management/StoreCreationWithMerchantCodeRequest.java b/src/main/java/com/adyen/model/management/StoreCreationWithMerchantCodeRequest.java index a8630552a..d9a94f16c 100644 --- a/src/main/java/com/adyen/model/management/StoreCreationWithMerchantCodeRequest.java +++ b/src/main/java/com/adyen/model/management/StoreCreationWithMerchantCodeRequest.java @@ -375,13 +375,18 @@ public void setMerchantId(String merchantId) { } /** - * The phone number of the store, including '+' and country code in the - * [E.164](https://en.wikipedia.org/wiki/E.164) format. If passed in a different format, we - * convert and validate the phone number against E.164. - * - * @param phoneNumber The phone number of the store, including '+' and country code in the - * [E.164](https://en.wikipedia.org/wiki/E.164) format. If passed in a different format, we - * convert and validate the phone number against E.164. + * The phone number of the store in [E.164](https://en.wikipedia.org/wiki/E.164) format: a plus + * sign (`+`), the country code, and the phone number. For example, **+13123456789**. + * You can include spaces, hyphens, or brackets, such as **+1 (312) 345-6789**. We reject phone + * numbers that do not start with `+` and the country code, such as **3123456789** or + * **0031201234567**. The phone number can be from a different country than the store address. + * + * @param phoneNumber The phone number of the store in + * [E.164](https://en.wikipedia.org/wiki/E.164) format: a plus sign (`+`), the + * country code, and the phone number. For example, **+13123456789**. You can include spaces, + * hyphens, or brackets, such as **+1 (312) 345-6789**. We reject phone numbers that do not + * start with `+` and the country code, such as **3123456789** or **0031201234567**. + * The phone number can be from a different country than the store address. * @return the current {@code StoreCreationWithMerchantCodeRequest} instance, allowing for method * chaining */ @@ -392,13 +397,18 @@ public StoreCreationWithMerchantCodeRequest phoneNumber(String phoneNumber) { } /** - * The phone number of the store, including '+' and country code in the - * [E.164](https://en.wikipedia.org/wiki/E.164) format. If passed in a different format, we - * convert and validate the phone number against E.164. + * The phone number of the store in [E.164](https://en.wikipedia.org/wiki/E.164) format: a plus + * sign (`+`), the country code, and the phone number. For example, **+13123456789**. + * You can include spaces, hyphens, or brackets, such as **+1 (312) 345-6789**. We reject phone + * numbers that do not start with `+` and the country code, such as **3123456789** or + * **0031201234567**. The phone number can be from a different country than the store address. * - * @return phoneNumber The phone number of the store, including '+' and country code in - * the [E.164](https://en.wikipedia.org/wiki/E.164) format. If passed in a different format, - * we convert and validate the phone number against E.164. + * @return phoneNumber The phone number of the store in + * [E.164](https://en.wikipedia.org/wiki/E.164) format: a plus sign (`+`), the + * country code, and the phone number. For example, **+13123456789**. You can include spaces, + * hyphens, or brackets, such as **+1 (312) 345-6789**. We reject phone numbers that do not + * start with `+` and the country code, such as **3123456789** or **0031201234567**. + * The phone number can be from a different country than the store address. */ @JsonProperty(JSON_PROPERTY_PHONE_NUMBER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -407,13 +417,18 @@ public String getPhoneNumber() { } /** - * The phone number of the store, including '+' and country code in the - * [E.164](https://en.wikipedia.org/wiki/E.164) format. If passed in a different format, we - * convert and validate the phone number against E.164. + * The phone number of the store in [E.164](https://en.wikipedia.org/wiki/E.164) format: a plus + * sign (`+`), the country code, and the phone number. For example, **+13123456789**. + * You can include spaces, hyphens, or brackets, such as **+1 (312) 345-6789**. We reject phone + * numbers that do not start with `+` and the country code, such as **3123456789** or + * **0031201234567**. The phone number can be from a different country than the store address. * - * @param phoneNumber The phone number of the store, including '+' and country code in the - * [E.164](https://en.wikipedia.org/wiki/E.164) format. If passed in a different format, we - * convert and validate the phone number against E.164. + * @param phoneNumber The phone number of the store in + * [E.164](https://en.wikipedia.org/wiki/E.164) format: a plus sign (`+`), the + * country code, and the phone number. For example, **+13123456789**. You can include spaces, + * hyphens, or brackets, such as **+1 (312) 345-6789**. We reject phone numbers that do not + * start with `+` and the country code, such as **3123456789** or **0031201234567**. + * The phone number can be from a different country than the store address. */ @JsonProperty(JSON_PROPERTY_PHONE_NUMBER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) diff --git a/src/main/java/com/adyen/model/management/Surcharge.java b/src/main/java/com/adyen/model/management/Surcharge.java index e5a6ade25..8f260245b 100644 --- a/src/main/java/com/adyen/model/management/Surcharge.java +++ b/src/main/java/com/adyen/model/management/Surcharge.java @@ -42,7 +42,8 @@ public class Surcharge { private boolean isSetConfigurations = false; public static final String JSON_PROPERTY_DISCLOSURE_ON_PRESENT_CARD = "disclosureOnPresentCard"; - private Boolean disclosureOnPresentCard; + /* deprecated since Management API v1 */ + @Deprecated private Boolean disclosureOnPresentCard; /** Mark when the attribute has been explicitly set. */ private boolean isSetDisclosureOnPresentCard = false; @@ -152,7 +153,9 @@ public void setConfigurations(List configurations) { * @param disclosureOnPresentCard Show the maximum surcharge rate to the shopper on the present * card screen before they tap. * @return the current {@code Surcharge} instance, allowing for method chaining + * @deprecated since Management API v1 */ + @Deprecated public Surcharge disclosureOnPresentCard(Boolean disclosureOnPresentCard) { this.disclosureOnPresentCard = disclosureOnPresentCard; isSetDisclosureOnPresentCard = true; // mark as set @@ -164,7 +167,9 @@ public Surcharge disclosureOnPresentCard(Boolean disclosureOnPresentCard) { * * @return disclosureOnPresentCard Show the maximum surcharge rate to the shopper on the present * card screen before they tap. + * @deprecated since Management API v1 */ + @Deprecated @JsonProperty(JSON_PROPERTY_DISCLOSURE_ON_PRESENT_CARD) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public Boolean getDisclosureOnPresentCard() { @@ -176,7 +181,9 @@ public Boolean getDisclosureOnPresentCard() { * * @param disclosureOnPresentCard Show the maximum surcharge rate to the shopper on the present * card screen before they tap. + * @deprecated since Management API v1 */ + @Deprecated @JsonProperty(JSON_PROPERTY_DISCLOSURE_ON_PRESENT_CARD) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public void setDisclosureOnPresentCard(Boolean disclosureOnPresentCard) { diff --git a/src/main/java/com/adyen/model/management/TerminalSettings.java b/src/main/java/com/adyen/model/management/TerminalSettings.java index a00ab6932..09fc569db 100644 --- a/src/main/java/com/adyen/model/management/TerminalSettings.java +++ b/src/main/java/com/adyen/model/management/TerminalSettings.java @@ -41,7 +41,9 @@ TerminalSettings.JSON_PROPERTY_RECEIPT_OPTIONS, TerminalSettings.JSON_PROPERTY_RECEIPT_PRINTING, TerminalSettings.JSON_PROPERTY_REFUNDS, + TerminalSettings.JSON_PROPERTY_SHOW_CALCULATED_PERCENTAGE_TIPPING_AMOUNT, TerminalSettings.JSON_PROPERTY_SIGNATURE, + TerminalSettings.JSON_PROPERTY_SKIP_TIP_CONFIRMATION_ON_TERMINAL, TerminalSettings.JSON_PROPERTY_STANDALONE, TerminalSettings.JSON_PROPERTY_STORE_AND_FORWARD, TerminalSettings.JSON_PROPERTY_SURCHARGE, @@ -159,12 +161,26 @@ public class TerminalSettings { /** Mark when the attribute has been explicitly set. */ private boolean isSetRefunds = false; + public static final String JSON_PROPERTY_SHOW_CALCULATED_PERCENTAGE_TIPPING_AMOUNT = + "showCalculatedPercentageTippingAmount"; + private Boolean showCalculatedPercentageTippingAmount; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetShowCalculatedPercentageTippingAmount = false; + public static final String JSON_PROPERTY_SIGNATURE = "signature"; private Signature signature; /** Mark when the attribute has been explicitly set. */ private boolean isSetSignature = false; + public static final String JSON_PROPERTY_SKIP_TIP_CONFIRMATION_ON_TERMINAL = + "skipTipConfirmationOnTerminal"; + private Boolean skipTipConfirmationOnTerminal; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetSkipTipConfirmationOnTerminal = false; + public static final String JSON_PROPERTY_STANDALONE = "standalone"; private Standalone standalone; @@ -862,6 +878,52 @@ public void setRefunds(Refunds refunds) { isSetRefunds = true; // mark as set } + /** + * Show the tipping amount calculated from the percentage next to each tipping percentage option + * on the terminal screen, for example `10 % | 10 EUR` for a 100 EUR payment. + * + * @param showCalculatedPercentageTippingAmount Show the tipping amount calculated from the + * percentage next to each tipping percentage option on the terminal screen, for example + * `10 % | 10 EUR` for a 100 EUR payment. + * @return the current {@code TerminalSettings} instance, allowing for method chaining + */ + public TerminalSettings showCalculatedPercentageTippingAmount( + Boolean showCalculatedPercentageTippingAmount) { + this.showCalculatedPercentageTippingAmount = showCalculatedPercentageTippingAmount; + isSetShowCalculatedPercentageTippingAmount = true; // mark as set + return this; + } + + /** + * Show the tipping amount calculated from the percentage next to each tipping percentage option + * on the terminal screen, for example `10 % | 10 EUR` for a 100 EUR payment. + * + * @return showCalculatedPercentageTippingAmount Show the tipping amount calculated from the + * percentage next to each tipping percentage option on the terminal screen, for example + * `10 % | 10 EUR` for a 100 EUR payment. + */ + @JsonProperty(JSON_PROPERTY_SHOW_CALCULATED_PERCENTAGE_TIPPING_AMOUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getShowCalculatedPercentageTippingAmount() { + return showCalculatedPercentageTippingAmount; + } + + /** + * Show the tipping amount calculated from the percentage next to each tipping percentage option + * on the terminal screen, for example `10 % | 10 EUR` for a 100 EUR payment. + * + * @param showCalculatedPercentageTippingAmount Show the tipping amount calculated from the + * percentage next to each tipping percentage option on the terminal screen, for example + * `10 % | 10 EUR` for a 100 EUR payment. + */ + @JsonProperty(JSON_PROPERTY_SHOW_CALCULATED_PERCENTAGE_TIPPING_AMOUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setShowCalculatedPercentageTippingAmount( + Boolean showCalculatedPercentageTippingAmount) { + this.showCalculatedPercentageTippingAmount = showCalculatedPercentageTippingAmount; + isSetShowCalculatedPercentageTippingAmount = true; // mark as set + } + /** * signature * @@ -897,6 +959,53 @@ public void setSignature(Signature signature) { isSetSignature = true; // mark as set } + /** + * Skip the tip confirmation step of the Adyen payment app on the terminal. Set to **true** only + * if your own app that handles tipping is installed on the same terminal. If your app is not + * installed on the terminal, set to **false**. + * + * @param skipTipConfirmationOnTerminal Skip the tip confirmation step of the Adyen payment app on + * the terminal. Set to **true** only if your own app that handles tipping is installed on the + * same terminal. If your app is not installed on the terminal, set to **false**. + * @return the current {@code TerminalSettings} instance, allowing for method chaining + */ + public TerminalSettings skipTipConfirmationOnTerminal(Boolean skipTipConfirmationOnTerminal) { + this.skipTipConfirmationOnTerminal = skipTipConfirmationOnTerminal; + isSetSkipTipConfirmationOnTerminal = true; // mark as set + return this; + } + + /** + * Skip the tip confirmation step of the Adyen payment app on the terminal. Set to **true** only + * if your own app that handles tipping is installed on the same terminal. If your app is not + * installed on the terminal, set to **false**. + * + * @return skipTipConfirmationOnTerminal Skip the tip confirmation step of the Adyen payment app + * on the terminal. Set to **true** only if your own app that handles tipping is installed on + * the same terminal. If your app is not installed on the terminal, set to **false**. + */ + @JsonProperty(JSON_PROPERTY_SKIP_TIP_CONFIRMATION_ON_TERMINAL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getSkipTipConfirmationOnTerminal() { + return skipTipConfirmationOnTerminal; + } + + /** + * Skip the tip confirmation step of the Adyen payment app on the terminal. Set to **true** only + * if your own app that handles tipping is installed on the same terminal. If your app is not + * installed on the terminal, set to **false**. + * + * @param skipTipConfirmationOnTerminal Skip the tip confirmation step of the Adyen payment app on + * the terminal. Set to **true** only if your own app that handles tipping is installed on the + * same terminal. If your app is not installed on the terminal, set to **false**. + */ + @JsonProperty(JSON_PROPERTY_SKIP_TIP_CONFIRMATION_ON_TERMINAL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSkipTipConfirmationOnTerminal(Boolean skipTipConfirmationOnTerminal) { + this.skipTipConfirmationOnTerminal = skipTipConfirmationOnTerminal; + isSetSkipTipConfirmationOnTerminal = true; // mark as set + } + /** * standalone * @@ -1208,8 +1317,19 @@ public boolean equals(Object o) { && Objects.equals(this.isSetReceiptPrinting, terminalSettings.isSetReceiptPrinting) && Objects.equals(this.refunds, terminalSettings.refunds) && Objects.equals(this.isSetRefunds, terminalSettings.isSetRefunds) + && Objects.equals( + this.showCalculatedPercentageTippingAmount, + terminalSettings.showCalculatedPercentageTippingAmount) + && Objects.equals( + this.isSetShowCalculatedPercentageTippingAmount, + terminalSettings.isSetShowCalculatedPercentageTippingAmount) && Objects.equals(this.signature, terminalSettings.signature) && Objects.equals(this.isSetSignature, terminalSettings.isSetSignature) + && Objects.equals( + this.skipTipConfirmationOnTerminal, terminalSettings.skipTipConfirmationOnTerminal) + && Objects.equals( + this.isSetSkipTipConfirmationOnTerminal, + terminalSettings.isSetSkipTipConfirmationOnTerminal) && Objects.equals(this.standalone, terminalSettings.standalone) && Objects.equals(this.isSetStandalone, terminalSettings.isSetStandalone) && Objects.equals(this.storeAndForward, terminalSettings.storeAndForward) @@ -1266,8 +1386,12 @@ public int hashCode() { isSetReceiptPrinting, refunds, isSetRefunds, + showCalculatedPercentageTippingAmount, + isSetShowCalculatedPercentageTippingAmount, signature, isSetSignature, + skipTipConfirmationOnTerminal, + isSetSkipTipConfirmationOnTerminal, standalone, isSetStandalone, storeAndForward, @@ -1306,7 +1430,13 @@ public String toString() { sb.append(" receiptOptions: ").append(toIndentedString(receiptOptions)).append("\n"); sb.append(" receiptPrinting: ").append(toIndentedString(receiptPrinting)).append("\n"); sb.append(" refunds: ").append(toIndentedString(refunds)).append("\n"); + sb.append(" showCalculatedPercentageTippingAmount: ") + .append(toIndentedString(showCalculatedPercentageTippingAmount)) + .append("\n"); sb.append(" signature: ").append(toIndentedString(signature)).append("\n"); + sb.append(" skipTipConfirmationOnTerminal: ") + .append(toIndentedString(skipTipConfirmationOnTerminal)) + .append("\n"); sb.append(" standalone: ").append(toIndentedString(standalone)).append("\n"); sb.append(" storeAndForward: ").append(toIndentedString(storeAndForward)).append("\n"); sb.append(" surcharge: ").append(toIndentedString(surcharge)).append("\n"); @@ -1394,9 +1524,21 @@ public Map getExplicitNulls() { if (isSetRefunds) { addIfNull(nulls, JSON_PROPERTY_REFUNDS, this.refunds); } + if (isSetShowCalculatedPercentageTippingAmount) { + addIfNull( + nulls, + JSON_PROPERTY_SHOW_CALCULATED_PERCENTAGE_TIPPING_AMOUNT, + this.showCalculatedPercentageTippingAmount); + } if (isSetSignature) { addIfNull(nulls, JSON_PROPERTY_SIGNATURE, this.signature); } + if (isSetSkipTipConfirmationOnTerminal) { + addIfNull( + nulls, + JSON_PROPERTY_SKIP_TIP_CONFIRMATION_ON_TERMINAL, + this.skipTipConfirmationOnTerminal); + } if (isSetStandalone) { addIfNull(nulls, JSON_PROPERTY_STANDALONE, this.standalone); } diff --git a/src/main/java/com/adyen/model/management/ThemeAsset.java b/src/main/java/com/adyen/model/management/ThemeAsset.java new file mode 100644 index 000000000..db925d51c --- /dev/null +++ b/src/main/java/com/adyen/model/management/ThemeAsset.java @@ -0,0 +1,288 @@ +/* + * 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 com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.core.JsonProcessingException; +import java.util.*; + +/** A single asset within a terminal theme, with a CDN URL. */ +@JsonPropertyOrder({ + ThemeAsset.JSON_PROPERTY_MODEL, + ThemeAsset.JSON_PROPERTY_TYPE, + ThemeAsset.JSON_PROPERTY_URL +}) +public class ThemeAsset { + public static final String JSON_PROPERTY_MODEL = "model"; + private String model; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetModel = false; + + public static final String JSON_PROPERTY_TYPE = "type"; + private String type; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetType = false; + + public static final String JSON_PROPERTY_URL = "url"; + private String url; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetUrl = false; + + /** + * Sets whether attributes with null values should be explicitly included in the JSON payload. + * Default is false. + */ + @JsonIgnore private boolean includeNullValues = false; + + public ThemeAsset() {} + + /** + * The terminal model that the asset is for. Must be one of the supported terminal models. + * + * @param model The terminal model that the asset is for. Must be one of the supported terminal + * models. + * @return the current {@code ThemeAsset} instance, allowing for method chaining + */ + public ThemeAsset model(String model) { + this.model = model; + isSetModel = true; // mark as set + return this; + } + + /** + * The terminal model that the asset is for. Must be one of the supported terminal models. + * + * @return model The terminal model that the asset is for. Must be one of the supported terminal + * models. + */ + @JsonProperty(JSON_PROPERTY_MODEL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getModel() { + return model; + } + + /** + * The terminal model that the asset is for. Must be one of the supported terminal models. + * + * @param model The terminal model that the asset is for. Must be one of the supported terminal + * models. + */ + @JsonProperty(JSON_PROPERTY_MODEL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setModel(String model) { + this.model = model; + isSetModel = true; // mark as set + } + + /** + * The screen type that the asset is for. Possible values: **logo**, **homeScreen**, + * **idleScreen**, **afterPaymentScreen**, **shopperEngagementScreen**. + * + * @param type The screen type that the asset is for. Possible values: **logo**, **homeScreen**, + * **idleScreen**, **afterPaymentScreen**, **shopperEngagementScreen**. + * @return the current {@code ThemeAsset} instance, allowing for method chaining + */ + public ThemeAsset type(String type) { + this.type = type; + isSetType = true; // mark as set + return this; + } + + /** + * The screen type that the asset is for. Possible values: **logo**, **homeScreen**, + * **idleScreen**, **afterPaymentScreen**, **shopperEngagementScreen**. + * + * @return type The screen type that the asset is for. Possible values: **logo**, **homeScreen**, + * **idleScreen**, **afterPaymentScreen**, **shopperEngagementScreen**. + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getType() { + return type; + } + + /** + * The screen type that the asset is for. Possible values: **logo**, **homeScreen**, + * **idleScreen**, **afterPaymentScreen**, **shopperEngagementScreen**. + * + * @param type The screen type that the asset is for. Possible values: **logo**, **homeScreen**, + * **idleScreen**, **afterPaymentScreen**, **shopperEngagementScreen**. + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setType(String type) { + this.type = type; + isSetType = true; // mark as set + } + + /** + * The CDN URL for this asset, including the token as a query parameter (?token=). This URL + * is valid for 24 hours. + * + * @param url The CDN URL for this asset, including the token as a query parameter (?token=). + * This URL is valid for 24 hours. + * @return the current {@code ThemeAsset} instance, allowing for method chaining + */ + public ThemeAsset url(String url) { + this.url = url; + isSetUrl = true; // mark as set + return this; + } + + /** + * The CDN URL for this asset, including the token as a query parameter (?token=). This URL + * is valid for 24 hours. + * + * @return url The CDN URL for this asset, including the token as a query parameter + * (?token=). This URL is valid for 24 hours. + */ + @JsonProperty(JSON_PROPERTY_URL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getUrl() { + return url; + } + + /** + * The CDN URL for this asset, including the token as a query parameter (?token=). This URL + * is valid for 24 hours. + * + * @param url The CDN URL for this asset, including the token as a query parameter (?token=). + * This URL is valid for 24 hours. + */ + @JsonProperty(JSON_PROPERTY_URL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setUrl(String url) { + this.url = url; + isSetUrl = true; // mark as set + } + + /** + * Configures whether null values are explicitly serialized in the JSON payload. Default is false. + */ + public ThemeAsset includeNullValues(boolean includeNullValues) { + this.includeNullValues = includeNullValues; + return this; + } + + /** Returns whether null values are explicitly serialized in the JSON payload. */ + public boolean isIncludeNullValues() { + return includeNullValues; + } + + /** + * Sets whether null values should be explicitly serialized in the JSON payload. Default is false. + */ + public void setIncludeNullValues(boolean includeNullValues) { + this.includeNullValues = includeNullValues; + } + + /** Return true if this ThemeAsset object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ThemeAsset themeAsset = (ThemeAsset) o; + return Objects.equals(this.model, themeAsset.model) + && Objects.equals(this.isSetModel, themeAsset.isSetModel) + && Objects.equals(this.type, themeAsset.type) + && Objects.equals(this.isSetType, themeAsset.isSetType) + && Objects.equals(this.url, themeAsset.url) + && Objects.equals(this.isSetUrl, themeAsset.isSetUrl); + } + + @Override + public int hashCode() { + return Objects.hash(model, isSetModel, type, isSetType, url, isSetUrl); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ThemeAsset {\n"); + sb.append(" model: ").append(toIndentedString(model)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" url: ").append(toIndentedString(url)).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 "); + } + + /** Returns a map of properties to be merged into the JSON payload as explicit null values. */ + @JsonInclude(JsonInclude.Include.ALWAYS) + @JsonAnyGetter + public Map getExplicitNulls() { + if (!this.includeNullValues) { + return Collections.emptyMap(); + } + + Map nulls = new HashMap<>(); + + if (isSetModel) { + addIfNull(nulls, JSON_PROPERTY_MODEL, this.model); + } + if (isSetType) { + addIfNull(nulls, JSON_PROPERTY_TYPE, this.type); + } + if (isSetUrl) { + addIfNull(nulls, JSON_PROPERTY_URL, this.url); + } + + return nulls; + } + + // add to map when value is null + private void addIfNull(Map map, String key, Object value) { + if (value == null) { + map.put(key, null); + } + } + + /** + * Create an instance of ThemeAsset given an JSON string + * + * @param jsonString JSON string + * @return An instance of ThemeAsset + * @throws JsonProcessingException if the JSON string is invalid with respect to ThemeAsset + */ + public static ThemeAsset fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, ThemeAsset.class); + } + + /** + * Convert an instance of ThemeAsset to an JSON string + * + * @return JSON string + */ + public String toJson() throws JsonProcessingException { + return JSON.getMapper().writeValueAsString(this); + } +} diff --git a/src/main/java/com/adyen/model/management/ThemeMode.java b/src/main/java/com/adyen/model/management/ThemeMode.java new file mode 100644 index 000000000..96772b38a --- /dev/null +++ b/src/main/java/com/adyen/model/management/ThemeMode.java @@ -0,0 +1,58 @@ +/* + * 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 com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.*; +import java.util.logging.Logger; + +/** The terminal display mode. Possible values: **dark**, **light**. */ +public enum ThemeMode { + DARK("dark"), + + LIGHT("light"); + + private static final Logger LOG = Logger.getLogger(ThemeMode.class.getName()); + + private String value; + + ThemeMode(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static ThemeMode fromValue(String value) { + for (ThemeMode b : ThemeMode.values()) { + if (b.value.equals(value)) { + return b; + } + } + // handling unexpected value + LOG.warning( + "ThemeMode: unexpected enum value '" + + value + + "' - Supported values are " + + Arrays.toString(ThemeMode.values())); + return null; + } +} diff --git a/src/main/java/com/adyen/model/management/ThemeSummary.java b/src/main/java/com/adyen/model/management/ThemeSummary.java new file mode 100644 index 000000000..d0bbe14de --- /dev/null +++ b/src/main/java/com/adyen/model/management/ThemeSummary.java @@ -0,0 +1,273 @@ +/* + * 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 com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.core.JsonProcessingException; +import java.util.*; + +/** The summary for a terminal theme in a list response. */ +@JsonPropertyOrder({ + ThemeSummary.JSON_PROPERTY_ID, + ThemeSummary.JSON_PROPERTY_MODE, + ThemeSummary.JSON_PROPERTY_NAME +}) +public class ThemeSummary { + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetId = false; + + public static final String JSON_PROPERTY_MODE = "mode"; + private ThemeMode mode; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetMode = false; + + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetName = false; + + /** + * Sets whether attributes with null values should be explicitly included in the JSON payload. + * Default is false. + */ + @JsonIgnore private boolean includeNullValues = false; + + public ThemeSummary() {} + + /** + * The unique identifier of the theme. + * + * @param id The unique identifier of the theme. + * @return the current {@code ThemeSummary} instance, allowing for method chaining + */ + public ThemeSummary id(String id) { + this.id = id; + isSetId = true; // mark as set + return this; + } + + /** + * The unique identifier of the theme. + * + * @return id The unique identifier of the theme. + */ + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getId() { + return id; + } + + /** + * The unique identifier of the theme. + * + * @param id The unique identifier of the theme. + */ + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setId(String id) { + this.id = id; + isSetId = true; // mark as set + } + + /** + * mode + * + * @param mode + * @return the current {@code ThemeSummary} instance, allowing for method chaining + */ + public ThemeSummary mode(ThemeMode mode) { + this.mode = mode; + isSetMode = true; // mark as set + return this; + } + + /** + * Get mode + * + * @return mode + */ + @JsonProperty(JSON_PROPERTY_MODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public ThemeMode getMode() { + return mode; + } + + /** + * mode + * + * @param mode + */ + @JsonProperty(JSON_PROPERTY_MODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMode(ThemeMode mode) { + this.mode = mode; + isSetMode = true; // mark as set + } + + /** + * The name of the theme. + * + * @param name The name of the theme. + * @return the current {@code ThemeSummary} instance, allowing for method chaining + */ + public ThemeSummary name(String name) { + this.name = name; + isSetName = true; // mark as set + return this; + } + + /** + * The name of the theme. + * + * @return name The name of the theme. + */ + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getName() { + return name; + } + + /** + * The name of the theme. + * + * @param name The name of the theme. + */ + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setName(String name) { + this.name = name; + isSetName = true; // mark as set + } + + /** + * Configures whether null values are explicitly serialized in the JSON payload. Default is false. + */ + public ThemeSummary includeNullValues(boolean includeNullValues) { + this.includeNullValues = includeNullValues; + return this; + } + + /** Returns whether null values are explicitly serialized in the JSON payload. */ + public boolean isIncludeNullValues() { + return includeNullValues; + } + + /** + * Sets whether null values should be explicitly serialized in the JSON payload. Default is false. + */ + public void setIncludeNullValues(boolean includeNullValues) { + this.includeNullValues = includeNullValues; + } + + /** Return true if this ThemeSummary object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ThemeSummary themeSummary = (ThemeSummary) o; + return Objects.equals(this.id, themeSummary.id) + && Objects.equals(this.isSetId, themeSummary.isSetId) + && Objects.equals(this.mode, themeSummary.mode) + && Objects.equals(this.isSetMode, themeSummary.isSetMode) + && Objects.equals(this.name, themeSummary.name) + && Objects.equals(this.isSetName, themeSummary.isSetName); + } + + @Override + public int hashCode() { + return Objects.hash(id, isSetId, mode, isSetMode, name, isSetName); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ThemeSummary {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" mode: ").append(toIndentedString(mode)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).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 "); + } + + /** Returns a map of properties to be merged into the JSON payload as explicit null values. */ + @JsonInclude(JsonInclude.Include.ALWAYS) + @JsonAnyGetter + public Map getExplicitNulls() { + if (!this.includeNullValues) { + return Collections.emptyMap(); + } + + Map nulls = new HashMap<>(); + + if (isSetId) { + addIfNull(nulls, JSON_PROPERTY_ID, this.id); + } + if (isSetMode) { + addIfNull(nulls, JSON_PROPERTY_MODE, this.mode); + } + if (isSetName) { + addIfNull(nulls, JSON_PROPERTY_NAME, this.name); + } + + return nulls; + } + + // add to map when value is null + private void addIfNull(Map map, String key, Object value) { + if (value == null) { + map.put(key, null); + } + } + + /** + * Create an instance of ThemeSummary given an JSON string + * + * @param jsonString JSON string + * @return An instance of ThemeSummary + * @throws JsonProcessingException if the JSON string is invalid with respect to ThemeSummary + */ + public static ThemeSummary fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, ThemeSummary.class); + } + + /** + * Convert an instance of ThemeSummary to an JSON string + * + * @return JSON string + */ + public String toJson() throws JsonProcessingException { + return JSON.getMapper().writeValueAsString(this); + } +} diff --git a/src/main/java/com/adyen/model/management/ThemeUpdateRequest.java b/src/main/java/com/adyen/model/management/ThemeUpdateRequest.java new file mode 100644 index 000000000..9fc9da5a0 --- /dev/null +++ b/src/main/java/com/adyen/model/management/ThemeUpdateRequest.java @@ -0,0 +1,268 @@ +/* + * 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 com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonProcessingException; +import java.util.*; +import java.util.Arrays; +import java.util.logging.Logger; + +/** The request body for updating the metadata of a terminal theme. */ +@JsonPropertyOrder({ThemeUpdateRequest.JSON_PROPERTY_MODE, ThemeUpdateRequest.JSON_PROPERTY_NAME}) +public class ThemeUpdateRequest { + /** The terminal display mode. Possible values: **dark**, **light**. */ + public enum ModeEnum { + DARK(String.valueOf("dark")), + + LIGHT(String.valueOf("light")); + + private static final Logger LOG = Logger.getLogger(ModeEnum.class.getName()); + + private String value; + + ModeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static ModeEnum fromValue(String value) { + for (ModeEnum b : ModeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + // handling unexpected value + LOG.warning( + "ModeEnum: unexpected enum value '" + + value + + "' - Supported values are " + + Arrays.toString(ModeEnum.values())); + return null; + } + } + + public static final String JSON_PROPERTY_MODE = "mode"; + private ModeEnum mode; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetMode = false; + + public static final String JSON_PROPERTY_NAME = "name"; + private Object name; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetName = false; + + /** + * Sets whether attributes with null values should be explicitly included in the JSON payload. + * Default is false. + */ + @JsonIgnore private boolean includeNullValues = false; + + public ThemeUpdateRequest() {} + + /** + * The terminal display mode. Possible values: **dark**, **light**. + * + * @param mode The terminal display mode. Possible values: **dark**, **light**. + * @return the current {@code ThemeUpdateRequest} instance, allowing for method chaining + */ + public ThemeUpdateRequest mode(ModeEnum mode) { + this.mode = mode; + isSetMode = true; // mark as set + return this; + } + + /** + * The terminal display mode. Possible values: **dark**, **light**. + * + * @return mode The terminal display mode. Possible values: **dark**, **light**. + */ + @JsonProperty(JSON_PROPERTY_MODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public ModeEnum getMode() { + return mode; + } + + /** + * The terminal display mode. Possible values: **dark**, **light**. + * + * @param mode The terminal display mode. Possible values: **dark**, **light**. + */ + @JsonProperty(JSON_PROPERTY_MODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMode(ModeEnum mode) { + this.mode = mode; + isSetMode = true; // mark as set + } + + /** + * The name of the theme. Must be unique per account within the same company context. + * + * @param name The name of the theme. Must be unique per account within the same company context. + * @return the current {@code ThemeUpdateRequest} instance, allowing for method chaining + */ + public ThemeUpdateRequest name(Object name) { + this.name = name; + isSetName = true; // mark as set + return this; + } + + /** + * The name of the theme. Must be unique per account within the same company context. + * + * @return name The name of the theme. Must be unique per account within the same company context. + */ + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Object getName() { + return name; + } + + /** + * The name of the theme. Must be unique per account within the same company context. + * + * @param name The name of the theme. Must be unique per account within the same company context. + */ + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setName(Object name) { + this.name = name; + isSetName = true; // mark as set + } + + /** + * Configures whether null values are explicitly serialized in the JSON payload. Default is false. + */ + public ThemeUpdateRequest includeNullValues(boolean includeNullValues) { + this.includeNullValues = includeNullValues; + return this; + } + + /** Returns whether null values are explicitly serialized in the JSON payload. */ + public boolean isIncludeNullValues() { + return includeNullValues; + } + + /** + * Sets whether null values should be explicitly serialized in the JSON payload. Default is false. + */ + public void setIncludeNullValues(boolean includeNullValues) { + this.includeNullValues = includeNullValues; + } + + /** Return true if this ThemeUpdateRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ThemeUpdateRequest themeUpdateRequest = (ThemeUpdateRequest) o; + return Objects.equals(this.mode, themeUpdateRequest.mode) + && Objects.equals(this.isSetMode, themeUpdateRequest.isSetMode) + && Objects.equals(this.name, themeUpdateRequest.name) + && Objects.equals(this.isSetName, themeUpdateRequest.isSetName); + } + + @Override + public int hashCode() { + return Objects.hash(mode, isSetMode, name, isSetName); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ThemeUpdateRequest {\n"); + sb.append(" mode: ").append(toIndentedString(mode)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).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 "); + } + + /** Returns a map of properties to be merged into the JSON payload as explicit null values. */ + @JsonInclude(JsonInclude.Include.ALWAYS) + @JsonAnyGetter + public Map getExplicitNulls() { + if (!this.includeNullValues) { + return Collections.emptyMap(); + } + + Map nulls = new HashMap<>(); + + if (isSetMode) { + addIfNull(nulls, JSON_PROPERTY_MODE, this.mode); + } + if (isSetName) { + addIfNull(nulls, JSON_PROPERTY_NAME, this.name); + } + + return nulls; + } + + // add to map when value is null + private void addIfNull(Map map, String key, Object value) { + if (value == null) { + map.put(key, null); + } + } + + /** + * Create an instance of ThemeUpdateRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of ThemeUpdateRequest + * @throws JsonProcessingException if the JSON string is invalid with respect to + * ThemeUpdateRequest + */ + public static ThemeUpdateRequest fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, ThemeUpdateRequest.class); + } + + /** + * Convert an instance of ThemeUpdateRequest to an JSON string + * + * @return JSON string + */ + public String toJson() throws JsonProcessingException { + return JSON.getMapper().writeValueAsString(this); + } +} diff --git a/src/main/java/com/adyen/model/management/ThemeWithAssetDetails.java b/src/main/java/com/adyen/model/management/ThemeWithAssetDetails.java new file mode 100644 index 000000000..641af0d1a --- /dev/null +++ b/src/main/java/com/adyen/model/management/ThemeWithAssetDetails.java @@ -0,0 +1,335 @@ +/* + * 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 com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.core.JsonProcessingException; +import java.util.*; +import java.util.ArrayList; +import java.util.List; + +/** The response containing full terminal theme details including asset CDN URLs. */ +@JsonPropertyOrder({ + ThemeWithAssetDetails.JSON_PROPERTY_ASSETS, + ThemeWithAssetDetails.JSON_PROPERTY_ID, + ThemeWithAssetDetails.JSON_PROPERTY_MODE, + ThemeWithAssetDetails.JSON_PROPERTY_NAME +}) +public class ThemeWithAssetDetails { + public static final String JSON_PROPERTY_ASSETS = "assets"; + private List assets; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetAssets = false; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetId = false; + + public static final String JSON_PROPERTY_MODE = "mode"; + private ThemeMode mode; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetMode = false; + + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetName = false; + + /** + * Sets whether attributes with null values should be explicitly included in the JSON payload. + * Default is false. + */ + @JsonIgnore private boolean includeNullValues = false; + + public ThemeWithAssetDetails() {} + + /** + * The list of assets that have been added to the theme, including the CDN URLs of the assets. + * + * @param assets The list of assets that have been added to the theme, including the CDN URLs of + * the assets. + * @return the current {@code ThemeWithAssetDetails} instance, allowing for method chaining + */ + public ThemeWithAssetDetails assets(List assets) { + this.assets = assets; + isSetAssets = true; // mark as set + return this; + } + + public ThemeWithAssetDetails addAssetsItem(ThemeAsset assetsItem) { + if (this.assets == null) { + this.assets = new ArrayList<>(); + } + this.assets.add(assetsItem); + return this; + } + + /** + * The list of assets that have been added to the theme, including the CDN URLs of the assets. + * + * @return assets The list of assets that have been added to the theme, including the CDN URLs of + * the assets. + */ + @JsonProperty(JSON_PROPERTY_ASSETS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getAssets() { + return assets; + } + + /** + * The list of assets that have been added to the theme, including the CDN URLs of the assets. + * + * @param assets The list of assets that have been added to the theme, including the CDN URLs of + * the assets. + */ + @JsonProperty(JSON_PROPERTY_ASSETS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAssets(List assets) { + this.assets = assets; + isSetAssets = true; // mark as set + } + + /** + * The unique identifier of the theme. + * + * @param id The unique identifier of the theme. + * @return the current {@code ThemeWithAssetDetails} instance, allowing for method chaining + */ + public ThemeWithAssetDetails id(String id) { + this.id = id; + isSetId = true; // mark as set + return this; + } + + /** + * The unique identifier of the theme. + * + * @return id The unique identifier of the theme. + */ + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getId() { + return id; + } + + /** + * The unique identifier of the theme. + * + * @param id The unique identifier of the theme. + */ + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setId(String id) { + this.id = id; + isSetId = true; // mark as set + } + + /** + * mode + * + * @param mode + * @return the current {@code ThemeWithAssetDetails} instance, allowing for method chaining + */ + public ThemeWithAssetDetails mode(ThemeMode mode) { + this.mode = mode; + isSetMode = true; // mark as set + return this; + } + + /** + * Get mode + * + * @return mode + */ + @JsonProperty(JSON_PROPERTY_MODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public ThemeMode getMode() { + return mode; + } + + /** + * mode + * + * @param mode + */ + @JsonProperty(JSON_PROPERTY_MODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMode(ThemeMode mode) { + this.mode = mode; + isSetMode = true; // mark as set + } + + /** + * The name of the theme. + * + * @param name The name of the theme. + * @return the current {@code ThemeWithAssetDetails} instance, allowing for method chaining + */ + public ThemeWithAssetDetails name(String name) { + this.name = name; + isSetName = true; // mark as set + return this; + } + + /** + * The name of the theme. + * + * @return name The name of the theme. + */ + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getName() { + return name; + } + + /** + * The name of the theme. + * + * @param name The name of the theme. + */ + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setName(String name) { + this.name = name; + isSetName = true; // mark as set + } + + /** + * Configures whether null values are explicitly serialized in the JSON payload. Default is false. + */ + public ThemeWithAssetDetails includeNullValues(boolean includeNullValues) { + this.includeNullValues = includeNullValues; + return this; + } + + /** Returns whether null values are explicitly serialized in the JSON payload. */ + public boolean isIncludeNullValues() { + return includeNullValues; + } + + /** + * Sets whether null values should be explicitly serialized in the JSON payload. Default is false. + */ + public void setIncludeNullValues(boolean includeNullValues) { + this.includeNullValues = includeNullValues; + } + + /** Return true if this ThemeWithAssetDetails object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ThemeWithAssetDetails themeWithAssetDetails = (ThemeWithAssetDetails) o; + return Objects.equals(this.assets, themeWithAssetDetails.assets) + && Objects.equals(this.isSetAssets, themeWithAssetDetails.isSetAssets) + && Objects.equals(this.id, themeWithAssetDetails.id) + && Objects.equals(this.isSetId, themeWithAssetDetails.isSetId) + && Objects.equals(this.mode, themeWithAssetDetails.mode) + && Objects.equals(this.isSetMode, themeWithAssetDetails.isSetMode) + && Objects.equals(this.name, themeWithAssetDetails.name) + && Objects.equals(this.isSetName, themeWithAssetDetails.isSetName); + } + + @Override + public int hashCode() { + return Objects.hash(assets, isSetAssets, id, isSetId, mode, isSetMode, name, isSetName); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ThemeWithAssetDetails {\n"); + sb.append(" assets: ").append(toIndentedString(assets)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" mode: ").append(toIndentedString(mode)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).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 "); + } + + /** Returns a map of properties to be merged into the JSON payload as explicit null values. */ + @JsonInclude(JsonInclude.Include.ALWAYS) + @JsonAnyGetter + public Map getExplicitNulls() { + if (!this.includeNullValues) { + return Collections.emptyMap(); + } + + Map nulls = new HashMap<>(); + + if (isSetAssets) { + addIfNull(nulls, JSON_PROPERTY_ASSETS, this.assets); + } + if (isSetId) { + addIfNull(nulls, JSON_PROPERTY_ID, this.id); + } + if (isSetMode) { + addIfNull(nulls, JSON_PROPERTY_MODE, this.mode); + } + if (isSetName) { + addIfNull(nulls, JSON_PROPERTY_NAME, this.name); + } + + return nulls; + } + + // add to map when value is null + private void addIfNull(Map map, String key, Object value) { + if (value == null) { + map.put(key, null); + } + } + + /** + * Create an instance of ThemeWithAssetDetails given an JSON string + * + * @param jsonString JSON string + * @return An instance of ThemeWithAssetDetails + * @throws JsonProcessingException if the JSON string is invalid with respect to + * ThemeWithAssetDetails + */ + public static ThemeWithAssetDetails fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, ThemeWithAssetDetails.class); + } + + /** + * Convert an instance of ThemeWithAssetDetails to an JSON string + * + * @return JSON string + */ + public String toJson() throws JsonProcessingException { + return JSON.getMapper().writeValueAsString(this); + } +} diff --git a/src/main/java/com/adyen/model/management/UpdatePaymentMethodInfo.java b/src/main/java/com/adyen/model/management/UpdatePaymentMethodInfo.java index f08b64461..fd07faf26 100644 --- a/src/main/java/com/adyen/model/management/UpdatePaymentMethodInfo.java +++ b/src/main/java/com/adyen/model/management/UpdatePaymentMethodInfo.java @@ -26,6 +26,7 @@ UpdatePaymentMethodInfo.JSON_PROPERTY_ACCEL, UpdatePaymentMethodInfo.JSON_PROPERTY_AFFIRM, UpdatePaymentMethodInfo.JSON_PROPERTY_BCMC, + UpdatePaymentMethodInfo.JSON_PROPERTY_BONCARD, UpdatePaymentMethodInfo.JSON_PROPERTY_CARNET, UpdatePaymentMethodInfo.JSON_PROPERTY_CARTES_BANCAIRES, UpdatePaymentMethodInfo.JSON_PROPERTY_CASHAPP, @@ -35,6 +36,7 @@ UpdatePaymentMethodInfo.JSON_PROPERTY_CUSTOM_ROUTING_FLAGS, UpdatePaymentMethodInfo.JSON_PROPERTY_DINERS, UpdatePaymentMethodInfo.JSON_PROPERTY_DISCOVER, + UpdatePaymentMethodInfo.JSON_PROPERTY_EBT, UpdatePaymentMethodInfo.JSON_PROPERTY_EFT_DIRECTDEBIT_C_A, UpdatePaymentMethodInfo.JSON_PROPERTY_EFTPOS_AUSTRALIA, UpdatePaymentMethodInfo.JSON_PROPERTY_ENABLED, @@ -47,6 +49,7 @@ UpdatePaymentMethodInfo.JSON_PROPERTY_MC, UpdatePaymentMethodInfo.JSON_PROPERTY_NYCE, UpdatePaymentMethodInfo.JSON_PROPERTY_PAYBYBANK_PLAID, + UpdatePaymentMethodInfo.JSON_PROPERTY_PAYBYBANK_PLAID_CA, UpdatePaymentMethodInfo.JSON_PROPERTY_PULSE, UpdatePaymentMethodInfo.JSON_PROPERTY_SEPADIRECTDEBIT, UpdatePaymentMethodInfo.JSON_PROPERTY_STAR, @@ -73,6 +76,12 @@ public class UpdatePaymentMethodInfo { /** Mark when the attribute has been explicitly set. */ private boolean isSetBcmc = false; + public static final String JSON_PROPERTY_BONCARD = "boncard"; + private BoncardUpdateInfo boncard; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetBoncard = false; + public static final String JSON_PROPERTY_CARNET = "carnet"; private GenericPmWithTdiUpdateInfo carnet; @@ -127,6 +136,12 @@ public class UpdatePaymentMethodInfo { /** Mark when the attribute has been explicitly set. */ private boolean isSetDiscover = false; + public static final String JSON_PROPERTY_EBT = "ebt"; + private EbtUpdateInfo ebt; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetEbt = false; + public static final String JSON_PROPERTY_EFT_DIRECTDEBIT_C_A = "eft_directdebit_CA"; private GenericPmWithTdiUpdateInfo eftDirectdebitCA; @@ -199,6 +214,12 @@ public class UpdatePaymentMethodInfo { /** Mark when the attribute has been explicitly set. */ private boolean isSetPaybybankPlaid = false; + public static final String JSON_PROPERTY_PAYBYBANK_PLAID_CA = "paybybank_plaid_ca"; + private PayByBankPlaidUpdateInfo paybybankPlaidCa; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetPaybybankPlaidCa = false; + public static final String JSON_PROPERTY_PULSE = "pulse"; private PulseUpdateInfo pulse; @@ -349,6 +370,41 @@ public void setBcmc(BcmcUpdateInfo bcmc) { isSetBcmc = true; // mark as set } + /** + * boncard + * + * @param boncard + * @return the current {@code UpdatePaymentMethodInfo} instance, allowing for method chaining + */ + public UpdatePaymentMethodInfo boncard(BoncardUpdateInfo boncard) { + this.boncard = boncard; + isSetBoncard = true; // mark as set + return this; + } + + /** + * Get boncard + * + * @return boncard + */ + @JsonProperty(JSON_PROPERTY_BONCARD) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public BoncardUpdateInfo getBoncard() { + return boncard; + } + + /** + * boncard + * + * @param boncard + */ + @JsonProperty(JSON_PROPERTY_BONCARD) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setBoncard(BoncardUpdateInfo boncard) { + this.boncard = boncard; + isSetBoncard = true; // mark as set + } + /** * carnet * @@ -700,6 +756,41 @@ public void setDiscover(GenericPmWithTdiUpdateInfo discover) { isSetDiscover = true; // mark as set } + /** + * ebt + * + * @param ebt + * @return the current {@code UpdatePaymentMethodInfo} instance, allowing for method chaining + */ + public UpdatePaymentMethodInfo ebt(EbtUpdateInfo ebt) { + this.ebt = ebt; + isSetEbt = true; // mark as set + return this; + } + + /** + * Get ebt + * + * @return ebt + */ + @JsonProperty(JSON_PROPERTY_EBT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public EbtUpdateInfo getEbt() { + return ebt; + } + + /** + * ebt + * + * @param ebt + */ + @JsonProperty(JSON_PROPERTY_EBT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEbt(EbtUpdateInfo ebt) { + this.ebt = ebt; + isSetEbt = true; // mark as set + } + /** * eftDirectdebitCA * @@ -1123,6 +1214,41 @@ public void setPaybybankPlaid(PayByBankPlaidUpdateInfo paybybankPlaid) { isSetPaybybankPlaid = true; // mark as set } + /** + * paybybankPlaidCa + * + * @param paybybankPlaidCa + * @return the current {@code UpdatePaymentMethodInfo} instance, allowing for method chaining + */ + public UpdatePaymentMethodInfo paybybankPlaidCa(PayByBankPlaidUpdateInfo paybybankPlaidCa) { + this.paybybankPlaidCa = paybybankPlaidCa; + isSetPaybybankPlaidCa = true; // mark as set + return this; + } + + /** + * Get paybybankPlaidCa + * + * @return paybybankPlaidCa + */ + @JsonProperty(JSON_PROPERTY_PAYBYBANK_PLAID_CA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public PayByBankPlaidUpdateInfo getPaybybankPlaidCa() { + return paybybankPlaidCa; + } + + /** + * paybybankPlaidCa + * + * @param paybybankPlaidCa + */ + @JsonProperty(JSON_PROPERTY_PAYBYBANK_PLAID_CA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPaybybankPlaidCa(PayByBankPlaidUpdateInfo paybybankPlaidCa) { + this.paybybankPlaidCa = paybybankPlaidCa; + isSetPaybybankPlaidCa = true; // mark as set + } + /** * pulse * @@ -1386,6 +1512,8 @@ public boolean equals(Object o) { && Objects.equals(this.isSetAffirm, updatePaymentMethodInfo.isSetAffirm) && Objects.equals(this.bcmc, updatePaymentMethodInfo.bcmc) && Objects.equals(this.isSetBcmc, updatePaymentMethodInfo.isSetBcmc) + && Objects.equals(this.boncard, updatePaymentMethodInfo.boncard) + && Objects.equals(this.isSetBoncard, updatePaymentMethodInfo.isSetBoncard) && Objects.equals(this.carnet, updatePaymentMethodInfo.carnet) && Objects.equals(this.isSetCarnet, updatePaymentMethodInfo.isSetCarnet) && Objects.equals(this.cartesBancaires, updatePaymentMethodInfo.cartesBancaires) @@ -1405,6 +1533,8 @@ public boolean equals(Object o) { && Objects.equals(this.isSetDiners, updatePaymentMethodInfo.isSetDiners) && Objects.equals(this.discover, updatePaymentMethodInfo.discover) && Objects.equals(this.isSetDiscover, updatePaymentMethodInfo.isSetDiscover) + && Objects.equals(this.ebt, updatePaymentMethodInfo.ebt) + && Objects.equals(this.isSetEbt, updatePaymentMethodInfo.isSetEbt) && Objects.equals(this.eftDirectdebitCA, updatePaymentMethodInfo.eftDirectdebitCA) && Objects.equals(this.isSetEftDirectdebitCA, updatePaymentMethodInfo.isSetEftDirectdebitCA) && Objects.equals(this.eftposAustralia, updatePaymentMethodInfo.eftposAustralia) @@ -1429,6 +1559,8 @@ public boolean equals(Object o) { && Objects.equals(this.isSetNyce, updatePaymentMethodInfo.isSetNyce) && Objects.equals(this.paybybankPlaid, updatePaymentMethodInfo.paybybankPlaid) && Objects.equals(this.isSetPaybybankPlaid, updatePaymentMethodInfo.isSetPaybybankPlaid) + && Objects.equals(this.paybybankPlaidCa, updatePaymentMethodInfo.paybybankPlaidCa) + && Objects.equals(this.isSetPaybybankPlaidCa, updatePaymentMethodInfo.isSetPaybybankPlaidCa) && Objects.equals(this.pulse, updatePaymentMethodInfo.pulse) && Objects.equals(this.isSetPulse, updatePaymentMethodInfo.isSetPulse) && Objects.equals(this.sepadirectdebit, updatePaymentMethodInfo.sepadirectdebit) @@ -1452,6 +1584,8 @@ public int hashCode() { isSetAffirm, bcmc, isSetBcmc, + boncard, + isSetBoncard, carnet, isSetCarnet, cartesBancaires, @@ -1470,6 +1604,8 @@ public int hashCode() { isSetDiners, discover, isSetDiscover, + ebt, + isSetEbt, eftDirectdebitCA, isSetEftDirectdebitCA, eftposAustralia, @@ -1494,6 +1630,8 @@ public int hashCode() { isSetNyce, paybybankPlaid, isSetPaybybankPlaid, + paybybankPlaidCa, + isSetPaybybankPlaidCa, pulse, isSetPulse, sepadirectdebit, @@ -1515,6 +1653,7 @@ public String toString() { sb.append(" accel: ").append(toIndentedString(accel)).append("\n"); sb.append(" affirm: ").append(toIndentedString(affirm)).append("\n"); sb.append(" bcmc: ").append(toIndentedString(bcmc)).append("\n"); + sb.append(" boncard: ").append(toIndentedString(boncard)).append("\n"); sb.append(" carnet: ").append(toIndentedString(carnet)).append("\n"); sb.append(" cartesBancaires: ").append(toIndentedString(cartesBancaires)).append("\n"); sb.append(" cashapp: ").append(toIndentedString(cashapp)).append("\n"); @@ -1524,6 +1663,7 @@ public String toString() { sb.append(" customRoutingFlags: ").append(toIndentedString(customRoutingFlags)).append("\n"); sb.append(" diners: ").append(toIndentedString(diners)).append("\n"); sb.append(" discover: ").append(toIndentedString(discover)).append("\n"); + sb.append(" ebt: ").append(toIndentedString(ebt)).append("\n"); sb.append(" eftDirectdebitCA: ").append(toIndentedString(eftDirectdebitCA)).append("\n"); sb.append(" eftposAustralia: ").append(toIndentedString(eftposAustralia)).append("\n"); sb.append(" enabled: ").append(toIndentedString(enabled)).append("\n"); @@ -1536,6 +1676,7 @@ public String toString() { sb.append(" mc: ").append(toIndentedString(mc)).append("\n"); sb.append(" nyce: ").append(toIndentedString(nyce)).append("\n"); sb.append(" paybybankPlaid: ").append(toIndentedString(paybybankPlaid)).append("\n"); + sb.append(" paybybankPlaidCa: ").append(toIndentedString(paybybankPlaidCa)).append("\n"); sb.append(" pulse: ").append(toIndentedString(pulse)).append("\n"); sb.append(" sepadirectdebit: ").append(toIndentedString(sepadirectdebit)).append("\n"); sb.append(" star: ").append(toIndentedString(star)).append("\n"); @@ -1575,6 +1716,9 @@ public Map getExplicitNulls() { if (isSetBcmc) { addIfNull(nulls, JSON_PROPERTY_BCMC, this.bcmc); } + if (isSetBoncard) { + addIfNull(nulls, JSON_PROPERTY_BONCARD, this.boncard); + } if (isSetCarnet) { addIfNull(nulls, JSON_PROPERTY_CARNET, this.carnet); } @@ -1602,6 +1746,9 @@ public Map getExplicitNulls() { if (isSetDiscover) { addIfNull(nulls, JSON_PROPERTY_DISCOVER, this.discover); } + if (isSetEbt) { + addIfNull(nulls, JSON_PROPERTY_EBT, this.ebt); + } if (isSetEftDirectdebitCA) { addIfNull(nulls, JSON_PROPERTY_EFT_DIRECTDEBIT_C_A, this.eftDirectdebitCA); } @@ -1638,6 +1785,9 @@ public Map getExplicitNulls() { if (isSetPaybybankPlaid) { addIfNull(nulls, JSON_PROPERTY_PAYBYBANK_PLAID, this.paybybankPlaid); } + if (isSetPaybybankPlaidCa) { + addIfNull(nulls, JSON_PROPERTY_PAYBYBANK_PLAID_CA, this.paybybankPlaidCa); + } if (isSetPulse) { addIfNull(nulls, JSON_PROPERTY_PULSE, this.pulse); } diff --git a/src/main/java/com/adyen/model/management/UpdateStoreRequest.java b/src/main/java/com/adyen/model/management/UpdateStoreRequest.java index 7860d417e..fe792aa91 100644 --- a/src/main/java/com/adyen/model/management/UpdateStoreRequest.java +++ b/src/main/java/com/adyen/model/management/UpdateStoreRequest.java @@ -324,13 +324,18 @@ public void setExternalReferenceId(String externalReferenceId) { } /** - * The phone number of the store, including '+' and country code in the - * [E.164](https://en.wikipedia.org/wiki/E.164) format. If passed in a different format, we - * convert and validate the phone number against E.164. + * The phone number of the store in [E.164](https://en.wikipedia.org/wiki/E.164) format: a plus + * sign (`+`), the country code, and the phone number. For example, **+13123456789**. + * You can include spaces, hyphens, or brackets, such as **+1 (312) 345-6789**. We reject phone + * numbers that do not start with `+` and the country code, such as **3123456789** or + * **0031201234567**. The phone number can be from a different country than the store address. * - * @param phoneNumber The phone number of the store, including '+' and country code in the - * [E.164](https://en.wikipedia.org/wiki/E.164) format. If passed in a different format, we - * convert and validate the phone number against E.164. + * @param phoneNumber The phone number of the store in + * [E.164](https://en.wikipedia.org/wiki/E.164) format: a plus sign (`+`), the + * country code, and the phone number. For example, **+13123456789**. You can include spaces, + * hyphens, or brackets, such as **+1 (312) 345-6789**. We reject phone numbers that do not + * start with `+` and the country code, such as **3123456789** or **0031201234567**. + * The phone number can be from a different country than the store address. * @return the current {@code UpdateStoreRequest} instance, allowing for method chaining */ public UpdateStoreRequest phoneNumber(String phoneNumber) { @@ -340,13 +345,18 @@ public UpdateStoreRequest phoneNumber(String phoneNumber) { } /** - * The phone number of the store, including '+' and country code in the - * [E.164](https://en.wikipedia.org/wiki/E.164) format. If passed in a different format, we - * convert and validate the phone number against E.164. + * The phone number of the store in [E.164](https://en.wikipedia.org/wiki/E.164) format: a plus + * sign (`+`), the country code, and the phone number. For example, **+13123456789**. + * You can include spaces, hyphens, or brackets, such as **+1 (312) 345-6789**. We reject phone + * numbers that do not start with `+` and the country code, such as **3123456789** or + * **0031201234567**. The phone number can be from a different country than the store address. * - * @return phoneNumber The phone number of the store, including '+' and country code in - * the [E.164](https://en.wikipedia.org/wiki/E.164) format. If passed in a different format, - * we convert and validate the phone number against E.164. + * @return phoneNumber The phone number of the store in + * [E.164](https://en.wikipedia.org/wiki/E.164) format: a plus sign (`+`), the + * country code, and the phone number. For example, **+13123456789**. You can include spaces, + * hyphens, or brackets, such as **+1 (312) 345-6789**. We reject phone numbers that do not + * start with `+` and the country code, such as **3123456789** or **0031201234567**. + * The phone number can be from a different country than the store address. */ @JsonProperty(JSON_PROPERTY_PHONE_NUMBER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -355,13 +365,18 @@ public String getPhoneNumber() { } /** - * The phone number of the store, including '+' and country code in the - * [E.164](https://en.wikipedia.org/wiki/E.164) format. If passed in a different format, we - * convert and validate the phone number against E.164. + * The phone number of the store in [E.164](https://en.wikipedia.org/wiki/E.164) format: a plus + * sign (`+`), the country code, and the phone number. For example, **+13123456789**. + * You can include spaces, hyphens, or brackets, such as **+1 (312) 345-6789**. We reject phone + * numbers that do not start with `+` and the country code, such as **3123456789** or + * **0031201234567**. The phone number can be from a different country than the store address. * - * @param phoneNumber The phone number of the store, including '+' and country code in the - * [E.164](https://en.wikipedia.org/wiki/E.164) format. If passed in a different format, we - * convert and validate the phone number against E.164. + * @param phoneNumber The phone number of the store in + * [E.164](https://en.wikipedia.org/wiki/E.164) format: a plus sign (`+`), the + * country code, and the phone number. For example, **+13123456789**. You can include spaces, + * hyphens, or brackets, such as **+1 (312) 345-6789**. We reject phone numbers that do not + * start with `+` and the country code, such as **3123456789** or **0031201234567**. + * The phone number can be from a different country than the store address. */ @JsonProperty(JSON_PROPERTY_PHONE_NUMBER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) diff --git a/src/main/java/com/adyen/model/management/UpdateThemeResponse.java b/src/main/java/com/adyen/model/management/UpdateThemeResponse.java new file mode 100644 index 000000000..109237428 --- /dev/null +++ b/src/main/java/com/adyen/model/management/UpdateThemeResponse.java @@ -0,0 +1,274 @@ +/* + * 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 com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.core.JsonProcessingException; +import java.util.*; + +/** The response containing the updated terminal theme details. */ +@JsonPropertyOrder({ + UpdateThemeResponse.JSON_PROPERTY_ID, + UpdateThemeResponse.JSON_PROPERTY_MODE, + UpdateThemeResponse.JSON_PROPERTY_NAME +}) +public class UpdateThemeResponse { + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetId = false; + + public static final String JSON_PROPERTY_MODE = "mode"; + private ThemeMode mode; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetMode = false; + + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetName = false; + + /** + * Sets whether attributes with null values should be explicitly included in the JSON payload. + * Default is false. + */ + @JsonIgnore private boolean includeNullValues = false; + + public UpdateThemeResponse() {} + + /** + * The unique identifier of the theme. + * + * @param id The unique identifier of the theme. + * @return the current {@code UpdateThemeResponse} instance, allowing for method chaining + */ + public UpdateThemeResponse id(String id) { + this.id = id; + isSetId = true; // mark as set + return this; + } + + /** + * The unique identifier of the theme. + * + * @return id The unique identifier of the theme. + */ + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getId() { + return id; + } + + /** + * The unique identifier of the theme. + * + * @param id The unique identifier of the theme. + */ + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setId(String id) { + this.id = id; + isSetId = true; // mark as set + } + + /** + * mode + * + * @param mode + * @return the current {@code UpdateThemeResponse} instance, allowing for method chaining + */ + public UpdateThemeResponse mode(ThemeMode mode) { + this.mode = mode; + isSetMode = true; // mark as set + return this; + } + + /** + * Get mode + * + * @return mode + */ + @JsonProperty(JSON_PROPERTY_MODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public ThemeMode getMode() { + return mode; + } + + /** + * mode + * + * @param mode + */ + @JsonProperty(JSON_PROPERTY_MODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMode(ThemeMode mode) { + this.mode = mode; + isSetMode = true; // mark as set + } + + /** + * The name of the theme. + * + * @param name The name of the theme. + * @return the current {@code UpdateThemeResponse} instance, allowing for method chaining + */ + public UpdateThemeResponse name(String name) { + this.name = name; + isSetName = true; // mark as set + return this; + } + + /** + * The name of the theme. + * + * @return name The name of the theme. + */ + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getName() { + return name; + } + + /** + * The name of the theme. + * + * @param name The name of the theme. + */ + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setName(String name) { + this.name = name; + isSetName = true; // mark as set + } + + /** + * Configures whether null values are explicitly serialized in the JSON payload. Default is false. + */ + public UpdateThemeResponse includeNullValues(boolean includeNullValues) { + this.includeNullValues = includeNullValues; + return this; + } + + /** Returns whether null values are explicitly serialized in the JSON payload. */ + public boolean isIncludeNullValues() { + return includeNullValues; + } + + /** + * Sets whether null values should be explicitly serialized in the JSON payload. Default is false. + */ + public void setIncludeNullValues(boolean includeNullValues) { + this.includeNullValues = includeNullValues; + } + + /** Return true if this UpdateThemeResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UpdateThemeResponse updateThemeResponse = (UpdateThemeResponse) o; + return Objects.equals(this.id, updateThemeResponse.id) + && Objects.equals(this.isSetId, updateThemeResponse.isSetId) + && Objects.equals(this.mode, updateThemeResponse.mode) + && Objects.equals(this.isSetMode, updateThemeResponse.isSetMode) + && Objects.equals(this.name, updateThemeResponse.name) + && Objects.equals(this.isSetName, updateThemeResponse.isSetName); + } + + @Override + public int hashCode() { + return Objects.hash(id, isSetId, mode, isSetMode, name, isSetName); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UpdateThemeResponse {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" mode: ").append(toIndentedString(mode)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).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 "); + } + + /** Returns a map of properties to be merged into the JSON payload as explicit null values. */ + @JsonInclude(JsonInclude.Include.ALWAYS) + @JsonAnyGetter + public Map getExplicitNulls() { + if (!this.includeNullValues) { + return Collections.emptyMap(); + } + + Map nulls = new HashMap<>(); + + if (isSetId) { + addIfNull(nulls, JSON_PROPERTY_ID, this.id); + } + if (isSetMode) { + addIfNull(nulls, JSON_PROPERTY_MODE, this.mode); + } + if (isSetName) { + addIfNull(nulls, JSON_PROPERTY_NAME, this.name); + } + + return nulls; + } + + // add to map when value is null + private void addIfNull(Map map, String key, Object value) { + if (value == null) { + map.put(key, null); + } + } + + /** + * Create an instance of UpdateThemeResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of UpdateThemeResponse + * @throws JsonProcessingException if the JSON string is invalid with respect to + * UpdateThemeResponse + */ + public static UpdateThemeResponse fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, UpdateThemeResponse.class); + } + + /** + * Convert an instance of UpdateThemeResponse to an JSON string + * + * @return JSON string + */ + public String toJson() throws JsonProcessingException { + return JSON.getMapper().writeValueAsString(this); + } +} diff --git a/src/main/java/com/adyen/model/management/ValuelinkInfo.java b/src/main/java/com/adyen/model/management/ValuelinkInfo.java index 865037595..0ee916e0d 100644 --- a/src/main/java/com/adyen/model/management/ValuelinkInfo.java +++ b/src/main/java/com/adyen/model/management/ValuelinkInfo.java @@ -25,12 +25,18 @@ /** ValuelinkInfo */ @JsonPropertyOrder({ + ValuelinkInfo.JSON_PROPERTY_ALTERNATE_MERCHANT_NUMBER, ValuelinkInfo.JSON_PROPERTY_AUTHORISATION_MID, ValuelinkInfo.JSON_PROPERTY_PIN_SUPPORT, - ValuelinkInfo.JSON_PROPERTY_SUBMITTER_ID, ValuelinkInfo.JSON_PROPERTY_TERMINAL_ID }) public class ValuelinkInfo { + public static final String JSON_PROPERTY_ALTERNATE_MERCHANT_NUMBER = "alternateMerchantNumber"; + private String alternateMerchantNumber; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetAlternateMerchantNumber = false; + public static final String JSON_PROPERTY_AUTHORISATION_MID = "authorisationMid"; private String authorisationMid; @@ -84,12 +90,6 @@ public static PinSupportEnum fromValue(String value) { /** Mark when the attribute has been explicitly set. */ private boolean isSetPinSupport = false; - public static final String JSON_PROPERTY_SUBMITTER_ID = "submitterId"; - private String submitterId; - - /** Mark when the attribute has been explicitly set. */ - private boolean isSetSubmitterId = false; - public static final String JSON_PROPERTY_TERMINAL_ID = "terminalId"; private String terminalId; @@ -104,6 +104,41 @@ public static PinSupportEnum fromValue(String value) { public ValuelinkInfo() {} + /** + * Alternate Merchant Number + * + * @param alternateMerchantNumber Alternate Merchant Number + * @return the current {@code ValuelinkInfo} instance, allowing for method chaining + */ + public ValuelinkInfo alternateMerchantNumber(String alternateMerchantNumber) { + this.alternateMerchantNumber = alternateMerchantNumber; + isSetAlternateMerchantNumber = true; // mark as set + return this; + } + + /** + * Alternate Merchant Number + * + * @return alternateMerchantNumber Alternate Merchant Number + */ + @JsonProperty(JSON_PROPERTY_ALTERNATE_MERCHANT_NUMBER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getAlternateMerchantNumber() { + return alternateMerchantNumber; + } + + /** + * Alternate Merchant Number + * + * @param alternateMerchantNumber Alternate Merchant Number + */ + @JsonProperty(JSON_PROPERTY_ALTERNATE_MERCHANT_NUMBER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAlternateMerchantNumber(String alternateMerchantNumber) { + this.alternateMerchantNumber = alternateMerchantNumber; + isSetAlternateMerchantNumber = true; // mark as set + } + /** * Authorisation Mid * @@ -174,41 +209,6 @@ public void setPinSupport(PinSupportEnum pinSupport) { isSetPinSupport = true; // mark as set } - /** - * Submitter ID - * - * @param submitterId Submitter ID - * @return the current {@code ValuelinkInfo} instance, allowing for method chaining - */ - public ValuelinkInfo submitterId(String submitterId) { - this.submitterId = submitterId; - isSetSubmitterId = true; // mark as set - return this; - } - - /** - * Submitter ID - * - * @return submitterId Submitter ID - */ - @JsonProperty(JSON_PROPERTY_SUBMITTER_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getSubmitterId() { - return submitterId; - } - - /** - * Submitter ID - * - * @param submitterId Submitter ID - */ - @JsonProperty(JSON_PROPERTY_SUBMITTER_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSubmitterId(String submitterId) { - this.submitterId = submitterId; - isSetSubmitterId = true; // mark as set - } - /** * Terminal ID * @@ -274,12 +274,13 @@ public boolean equals(Object o) { return false; } ValuelinkInfo valuelinkInfo = (ValuelinkInfo) o; - return Objects.equals(this.authorisationMid, valuelinkInfo.authorisationMid) + return Objects.equals(this.alternateMerchantNumber, valuelinkInfo.alternateMerchantNumber) + && Objects.equals( + this.isSetAlternateMerchantNumber, valuelinkInfo.isSetAlternateMerchantNumber) + && Objects.equals(this.authorisationMid, valuelinkInfo.authorisationMid) && Objects.equals(this.isSetAuthorisationMid, valuelinkInfo.isSetAuthorisationMid) && Objects.equals(this.pinSupport, valuelinkInfo.pinSupport) && Objects.equals(this.isSetPinSupport, valuelinkInfo.isSetPinSupport) - && Objects.equals(this.submitterId, valuelinkInfo.submitterId) - && Objects.equals(this.isSetSubmitterId, valuelinkInfo.isSetSubmitterId) && Objects.equals(this.terminalId, valuelinkInfo.terminalId) && Objects.equals(this.isSetTerminalId, valuelinkInfo.isSetTerminalId); } @@ -287,12 +288,12 @@ public boolean equals(Object o) { @Override public int hashCode() { return Objects.hash( + alternateMerchantNumber, + isSetAlternateMerchantNumber, authorisationMid, isSetAuthorisationMid, pinSupport, isSetPinSupport, - submitterId, - isSetSubmitterId, terminalId, isSetTerminalId); } @@ -301,9 +302,11 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ValuelinkInfo {\n"); + sb.append(" alternateMerchantNumber: ") + .append(toIndentedString(alternateMerchantNumber)) + .append("\n"); sb.append(" authorisationMid: ").append(toIndentedString(authorisationMid)).append("\n"); sb.append(" pinSupport: ").append(toIndentedString(pinSupport)).append("\n"); - sb.append(" submitterId: ").append(toIndentedString(submitterId)).append("\n"); sb.append(" terminalId: ").append(toIndentedString(terminalId)).append("\n"); sb.append("}"); return sb.toString(); @@ -329,15 +332,15 @@ public Map getExplicitNulls() { Map nulls = new HashMap<>(); + if (isSetAlternateMerchantNumber) { + addIfNull(nulls, JSON_PROPERTY_ALTERNATE_MERCHANT_NUMBER, this.alternateMerchantNumber); + } if (isSetAuthorisationMid) { addIfNull(nulls, JSON_PROPERTY_AUTHORISATION_MID, this.authorisationMid); } if (isSetPinSupport) { addIfNull(nulls, JSON_PROPERTY_PIN_SUPPORT, this.pinSupport); } - if (isSetSubmitterId) { - addIfNull(nulls, JSON_PROPERTY_SUBMITTER_ID, this.submitterId); - } if (isSetTerminalId) { addIfNull(nulls, JSON_PROPERTY_TERMINAL_ID, this.terminalId); } diff --git a/src/main/java/com/adyen/model/management/ValuelinkResponseInfo.java b/src/main/java/com/adyen/model/management/ValuelinkResponseInfo.java index f69042da1..56feba340 100644 --- a/src/main/java/com/adyen/model/management/ValuelinkResponseInfo.java +++ b/src/main/java/com/adyen/model/management/ValuelinkResponseInfo.java @@ -25,12 +25,18 @@ /** ValuelinkResponseInfo */ @JsonPropertyOrder({ + ValuelinkResponseInfo.JSON_PROPERTY_ALTERNATE_MERCHANT_NUMBER, ValuelinkResponseInfo.JSON_PROPERTY_AUTHORISATION_MID, ValuelinkResponseInfo.JSON_PROPERTY_PIN_SUPPORT, - ValuelinkResponseInfo.JSON_PROPERTY_SUBMITTER_ID, ValuelinkResponseInfo.JSON_PROPERTY_TERMINAL_ID }) public class ValuelinkResponseInfo { + public static final String JSON_PROPERTY_ALTERNATE_MERCHANT_NUMBER = "alternateMerchantNumber"; + private String alternateMerchantNumber; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetAlternateMerchantNumber = false; + public static final String JSON_PROPERTY_AUTHORISATION_MID = "authorisationMid"; private String authorisationMid; @@ -84,12 +90,6 @@ public static PinSupportEnum fromValue(String value) { /** Mark when the attribute has been explicitly set. */ private boolean isSetPinSupport = false; - public static final String JSON_PROPERTY_SUBMITTER_ID = "submitterId"; - private String submitterId; - - /** Mark when the attribute has been explicitly set. */ - private boolean isSetSubmitterId = false; - public static final String JSON_PROPERTY_TERMINAL_ID = "terminalId"; private String terminalId; @@ -104,6 +104,41 @@ public static PinSupportEnum fromValue(String value) { public ValuelinkResponseInfo() {} + /** + * Alternate Merchant Number + * + * @param alternateMerchantNumber Alternate Merchant Number + * @return the current {@code ValuelinkResponseInfo} instance, allowing for method chaining + */ + public ValuelinkResponseInfo alternateMerchantNumber(String alternateMerchantNumber) { + this.alternateMerchantNumber = alternateMerchantNumber; + isSetAlternateMerchantNumber = true; // mark as set + return this; + } + + /** + * Alternate Merchant Number + * + * @return alternateMerchantNumber Alternate Merchant Number + */ + @JsonProperty(JSON_PROPERTY_ALTERNATE_MERCHANT_NUMBER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getAlternateMerchantNumber() { + return alternateMerchantNumber; + } + + /** + * Alternate Merchant Number + * + * @param alternateMerchantNumber Alternate Merchant Number + */ + @JsonProperty(JSON_PROPERTY_ALTERNATE_MERCHANT_NUMBER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAlternateMerchantNumber(String alternateMerchantNumber) { + this.alternateMerchantNumber = alternateMerchantNumber; + isSetAlternateMerchantNumber = true; // mark as set + } + /** * Authorisation Mid * @@ -174,41 +209,6 @@ public void setPinSupport(PinSupportEnum pinSupport) { isSetPinSupport = true; // mark as set } - /** - * Submitter ID - * - * @param submitterId Submitter ID - * @return the current {@code ValuelinkResponseInfo} instance, allowing for method chaining - */ - public ValuelinkResponseInfo submitterId(String submitterId) { - this.submitterId = submitterId; - isSetSubmitterId = true; // mark as set - return this; - } - - /** - * Submitter ID - * - * @return submitterId Submitter ID - */ - @JsonProperty(JSON_PROPERTY_SUBMITTER_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getSubmitterId() { - return submitterId; - } - - /** - * Submitter ID - * - * @param submitterId Submitter ID - */ - @JsonProperty(JSON_PROPERTY_SUBMITTER_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSubmitterId(String submitterId) { - this.submitterId = submitterId; - isSetSubmitterId = true; // mark as set - } - /** * Terminal ID * @@ -274,12 +274,14 @@ public boolean equals(Object o) { return false; } ValuelinkResponseInfo valuelinkResponseInfo = (ValuelinkResponseInfo) o; - return Objects.equals(this.authorisationMid, valuelinkResponseInfo.authorisationMid) + return Objects.equals( + this.alternateMerchantNumber, valuelinkResponseInfo.alternateMerchantNumber) + && Objects.equals( + this.isSetAlternateMerchantNumber, valuelinkResponseInfo.isSetAlternateMerchantNumber) + && Objects.equals(this.authorisationMid, valuelinkResponseInfo.authorisationMid) && Objects.equals(this.isSetAuthorisationMid, valuelinkResponseInfo.isSetAuthorisationMid) && Objects.equals(this.pinSupport, valuelinkResponseInfo.pinSupport) && Objects.equals(this.isSetPinSupport, valuelinkResponseInfo.isSetPinSupport) - && Objects.equals(this.submitterId, valuelinkResponseInfo.submitterId) - && Objects.equals(this.isSetSubmitterId, valuelinkResponseInfo.isSetSubmitterId) && Objects.equals(this.terminalId, valuelinkResponseInfo.terminalId) && Objects.equals(this.isSetTerminalId, valuelinkResponseInfo.isSetTerminalId); } @@ -287,12 +289,12 @@ public boolean equals(Object o) { @Override public int hashCode() { return Objects.hash( + alternateMerchantNumber, + isSetAlternateMerchantNumber, authorisationMid, isSetAuthorisationMid, pinSupport, isSetPinSupport, - submitterId, - isSetSubmitterId, terminalId, isSetTerminalId); } @@ -301,9 +303,11 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ValuelinkResponseInfo {\n"); + sb.append(" alternateMerchantNumber: ") + .append(toIndentedString(alternateMerchantNumber)) + .append("\n"); sb.append(" authorisationMid: ").append(toIndentedString(authorisationMid)).append("\n"); sb.append(" pinSupport: ").append(toIndentedString(pinSupport)).append("\n"); - sb.append(" submitterId: ").append(toIndentedString(submitterId)).append("\n"); sb.append(" terminalId: ").append(toIndentedString(terminalId)).append("\n"); sb.append("}"); return sb.toString(); @@ -329,15 +333,15 @@ public Map getExplicitNulls() { Map nulls = new HashMap<>(); + if (isSetAlternateMerchantNumber) { + addIfNull(nulls, JSON_PROPERTY_ALTERNATE_MERCHANT_NUMBER, this.alternateMerchantNumber); + } if (isSetAuthorisationMid) { addIfNull(nulls, JSON_PROPERTY_AUTHORISATION_MID, this.authorisationMid); } if (isSetPinSupport) { addIfNull(nulls, JSON_PROPERTY_PIN_SUPPORT, this.pinSupport); } - if (isSetSubmitterId) { - addIfNull(nulls, JSON_PROPERTY_SUBMITTER_ID, this.submitterId); - } if (isSetTerminalId) { addIfNull(nulls, JSON_PROPERTY_TERMINAL_ID, this.terminalId); } diff --git a/src/main/java/com/adyen/service/management/AndroidFilesCompanyLevelApi.java b/src/main/java/com/adyen/service/management/AndroidFilesCompanyLevelApi.java index 02409dfe4..a9ff3c8f7 100644 --- a/src/main/java/com/adyen/service/management/AndroidFilesCompanyLevelApi.java +++ b/src/main/java/com/adyen/service/management/AndroidFilesCompanyLevelApi.java @@ -307,7 +307,7 @@ public UploadAndroidAppResponse uploadAndroidApp(String companyId, RequestOption } /** - * Upload Android Certificate + * Upload Android certificate * * @param companyId {@link String } The unique identifier of the company account. (required) * @return {@link UploadAndroidCertificateResponse } @@ -319,7 +319,7 @@ public UploadAndroidCertificateResponse uploadAndroidCertificate(String companyI } /** - * Upload Android Certificate + * Upload Android certificate * * @param companyId {@link String } The unique identifier of the company account. (required) * @param requestOptions {@link RequestOptions } Object to store additional HTTP headers such as diff --git a/src/main/java/com/adyen/service/management/ClientCertificatesCompanyLevelApi.java b/src/main/java/com/adyen/service/management/ClientCertificatesCompanyLevelApi.java new file mode 100644 index 000000000..860122dfe --- /dev/null +++ b/src/main/java/com/adyen/service/management/ClientCertificatesCompanyLevelApi.java @@ -0,0 +1,140 @@ +/* + * 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.service.management; + +import com.adyen.Client; +import com.adyen.Service; +import com.adyen.constants.ApiConstants; +import com.adyen.model.RequestOptions; +import com.adyen.model.management.CertificateSearchResponse; +import com.adyen.model.management.ClientCertificateRequest; +import com.adyen.model.management.ClientCertificateWithChain; +import com.adyen.service.exception.ApiException; +import com.adyen.service.resource.Resource; +import java.io.IOException; +import java.util.HashMap; +import java.util.Map; + +public class ClientCertificatesCompanyLevelApi extends Service { + + public static final String API_VERSION = "3"; + + protected String baseURL; + + /** + * Client certificates - company level constructor in {@link com.adyen.service.management + * package}. + * + * @param client {@link Client } (required) + */ + public ClientCertificatesCompanyLevelApi(Client client) { + super(client); + this.baseURL = createBaseURL("https://management-test.adyen.com/v3"); + } + + /** + * Client certificates - company level constructor in {@link com.adyen.service.management + * package}. Please use this constructor only if you would like to pass along your own url for + * routing or testing purposes. The latest API version is defined in this class as a constant. + * + * @param client {@link Client } (required) + * @param baseURL {@link String } (required) + */ + public ClientCertificatesCompanyLevelApi(Client client, String baseURL) { + super(client); + this.baseURL = baseURL; + } + + /** + * Generate a client certificate + * + * @param companyId {@link String } (required) + * @param clientCertificateRequest {@link ClientCertificateRequest } Certificate signing request + * details. (required) + * @return {@link ClientCertificateWithChain } + * @throws ApiException if fails to make API call + */ + public ClientCertificateWithChain generateClientCertificate( + String companyId, ClientCertificateRequest clientCertificateRequest) + throws ApiException, IOException { + return generateClientCertificate(companyId, clientCertificateRequest, null); + } + + /** + * Generate a client certificate + * + * @param companyId {@link String } (required) + * @param clientCertificateRequest {@link ClientCertificateRequest } Certificate signing request + * details. (required) + * @param requestOptions {@link RequestOptions } Object to store additional HTTP headers such as + * idempotency-keys (optional) + * @return {@link ClientCertificateWithChain } + * @throws ApiException if fails to make API call + */ + public ClientCertificateWithChain generateClientCertificate( + String companyId, + ClientCertificateRequest clientCertificateRequest, + RequestOptions requestOptions) + throws ApiException, IOException { + // Add path params + Map pathParams = new HashMap<>(); + if (companyId == null) { + throw new IllegalArgumentException("Please provide the companyId path parameter"); + } + pathParams.put("companyId", companyId); + + String requestBody = clientCertificateRequest.toJson(); + Resource resource = + new Resource(this, this.baseURL + "/companies/{companyId}/clientCertificates", null); + String jsonResult = + resource.request(requestBody, requestOptions, ApiConstants.HttpMethod.POST, pathParams); + return ClientCertificateWithChain.fromJson(jsonResult); + } + + /** + * Retrieve all valid client certificates for this company + * + * @param companyId {@link String } (required) + * @return {@link CertificateSearchResponse } + * @throws ApiException if fails to make API call + */ + public CertificateSearchResponse listClientCertificates(String companyId) + throws ApiException, IOException { + return listClientCertificates(companyId, null); + } + + /** + * Retrieve all valid client certificates for this company + * + * @param companyId {@link String } (required) + * @param requestOptions {@link RequestOptions } Object to store additional HTTP headers such as + * idempotency-keys (optional) + * @return {@link CertificateSearchResponse } + * @throws ApiException if fails to make API call + */ + public CertificateSearchResponse listClientCertificates( + String companyId, RequestOptions requestOptions) throws ApiException, IOException { + // Add path params + Map pathParams = new HashMap<>(); + if (companyId == null) { + throw new IllegalArgumentException("Please provide the companyId path parameter"); + } + pathParams.put("companyId", companyId); + + String requestBody = null; + Resource resource = + new Resource(this, this.baseURL + "/companies/{companyId}/clientCertificates", null); + String jsonResult = + resource.request(requestBody, requestOptions, ApiConstants.HttpMethod.GET, pathParams); + return CertificateSearchResponse.fromJson(jsonResult); + } +} diff --git a/src/main/java/com/adyen/service/management/TerminalThemesCompanyLevelApi.java b/src/main/java/com/adyen/service/management/TerminalThemesCompanyLevelApi.java new file mode 100644 index 000000000..9bc0c61e7 --- /dev/null +++ b/src/main/java/com/adyen/service/management/TerminalThemesCompanyLevelApi.java @@ -0,0 +1,655 @@ +/* + * 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.service.management; + +import com.adyen.Client; +import com.adyen.Service; +import com.adyen.constants.ApiConstants; +import com.adyen.model.RequestOptions; +import com.adyen.model.management.CreateThemeRequest; +import com.adyen.model.management.CreateThemeResponse; +import com.adyen.model.management.ListThemesResponse; +import com.adyen.model.management.ThemeAsset; +import com.adyen.model.management.ThemeUpdateRequest; +import com.adyen.model.management.ThemeWithAssetDetails; +import com.adyen.model.management.UpdateThemeResponse; +import com.adyen.service.exception.ApiException; +import com.adyen.service.resource.Resource; +import java.io.File; +import java.io.IOException; +import java.util.HashMap; +import java.util.LinkedHashMap; +import java.util.Map; + +public class TerminalThemesCompanyLevelApi extends Service { + + public static final String API_VERSION = "3"; + + protected String baseURL; + + /** + * Terminal themes - company level constructor in {@link com.adyen.service.management package}. + * + * @param client {@link Client } (required) + */ + public TerminalThemesCompanyLevelApi(Client client) { + super(client); + this.baseURL = createBaseURL("https://management-test.adyen.com/v3"); + } + + /** + * Terminal themes - company level constructor in {@link com.adyen.service.management package}. + * Please use this constructor only if you would like to pass along your own url for routing or + * testing purposes. The latest API version is defined in this class as a constant. + * + * @param client {@link Client } (required) + * @param baseURL {@link String } (required) + */ + public TerminalThemesCompanyLevelApi(Client client, String baseURL) { + super(client); + this.baseURL = baseURL; + } + + /** + * Add an asset to a terminal theme + * + * @param companyId {@link String } The unique identifier of the company account. (required) + * @param id {@link String } The unique identifier of the terminal theme. (required) + * @param _file {@link File } The asset file. The part must declare a specific supported + * Content-Type; which Content-Type is accepted depends on the asset `type` and + * terminal `model` (see the endpoint description for the full mapping). The file + * extension is derived from it. A request with a generic or missing Content-Type such as + * application/octet-stream is rejected with response code **422**. The maximum asset size + * depends on the terminal model: up to 100 MB for SFO1 and M450, or 10 MB for all other + * models. (required) + * @param type {@link String } Query: The screen type or screen element that the asset is for: - + * **logo**: your logo. Only supported if `model` is **All**. - **homeScreen**: the + * default background screen. - **idleScreen**: a screensaver shown when the terminal is + * inactive. Only supported if `model` is **SFO1** or **M450**. - + * **afterPaymentScreen**: a screen shown after the payment is completed. - + * **shopperEngagementScreen**: a screen shown during a [shopper + * engagement](https://docs.adyen.com/point-of-sale/shopper-engagement) request. Only + * supported if `model` is **SFO1** or **M450**. (required) + * @param model {@link String } Query: The Android terminal model that the asset is for. Use + * **All** only if the `type` is **logo**. For every other screen type specify a + * single Android terminal model such as **AMS1**. (required) + * @return {@link ThemeAsset } + * @throws ApiException if fails to make API call + */ + public ThemeAsset addTerminalThemeAssetForCompany( + String companyId, String id, String type, String model, File _file) + throws ApiException, IOException { + return addTerminalThemeAssetForCompany(companyId, id, type, model, _file, null); + } + + /** + * Add an asset to a terminal theme + * + * @param companyId {@link String } The unique identifier of the company account. (required) + * @param id {@link String } The unique identifier of the terminal theme. (required) + * @param _file {@link File } The asset file. The part must declare a specific supported + * Content-Type; which Content-Type is accepted depends on the asset `type` and + * terminal `model` (see the endpoint description for the full mapping). The file + * extension is derived from it. A request with a generic or missing Content-Type such as + * application/octet-stream is rejected with response code **422**. The maximum asset size + * depends on the terminal model: up to 100 MB for SFO1 and M450, or 10 MB for all other + * models. (required) + * @param type {@link String } Query: The screen type or screen element that the asset is for: - + * **logo**: your logo. Only supported if `model` is **All**. - **homeScreen**: the + * default background screen. - **idleScreen**: a screensaver shown when the terminal is + * inactive. Only supported if `model` is **SFO1** or **M450**. - + * **afterPaymentScreen**: a screen shown after the payment is completed. - + * **shopperEngagementScreen**: a screen shown during a [shopper + * engagement](https://docs.adyen.com/point-of-sale/shopper-engagement) request. Only + * supported if `model` is **SFO1** or **M450**. (required) + * @param model {@link String } Query: The Android terminal model that the asset is for. Use + * **All** only if the `type` is **logo**. For every other screen type specify a + * single Android terminal model such as **AMS1**. (required) + * @param requestOptions {@link RequestOptions } Object to store additional HTTP headers such as + * idempotency-keys (optional) + * @return {@link ThemeAsset } + * @throws ApiException if fails to make API call + */ + public ThemeAsset addTerminalThemeAssetForCompany( + String companyId, + String id, + String type, + String model, + File _file, + RequestOptions requestOptions) + throws ApiException, IOException { + // Add path params + Map pathParams = new HashMap<>(); + if (companyId == null) { + throw new IllegalArgumentException("Please provide the companyId path parameter"); + } + pathParams.put("companyId", companyId); + if (id == null) { + throw new IllegalArgumentException("Please provide the id path parameter"); + } + pathParams.put("id", id); + + // Add query params + Map queryParams = new HashMap<>(); + if (type != null) { + queryParams.put("type", type); + } + if (model != null) { + queryParams.put("model", model); + } + + // Add form params + Map formParams = new LinkedHashMap<>(); + if (_file == null) { + throw new IllegalArgumentException("Please provide the _file form parameter"); + } + formParams.put("file", _file); + + Resource resource = + new Resource( + this, this.baseURL + "/companies/{companyId}/terminalThemes/{id}/assets", null); + String jsonResult = + resource.requestMultipart( + formParams, requestOptions, ApiConstants.HttpMethod.POST, pathParams, queryParams); + return ThemeAsset.fromJson(jsonResult); + } + + /** + * Apply a terminal theme + * + * @param companyId {@link String } The unique identifier of the company account. (required) + * @param id {@link String } The unique identifier of the terminal theme. (required) + * @throws ApiException if fails to make API call + */ + public void applyTerminalThemeForCompany(String companyId, String id) + throws ApiException, IOException { + applyTerminalThemeForCompany(companyId, id, null); + } + + /** + * Apply a terminal theme + * + * @param companyId {@link String } The unique identifier of the company account. (required) + * @param id {@link String } The unique identifier of the terminal theme. (required) + * @param requestOptions {@link RequestOptions } Object to store additional HTTP headers such as + * idempotency-keys (optional) + * @throws ApiException if fails to make API call + */ + public void applyTerminalThemeForCompany( + String companyId, String id, RequestOptions requestOptions) throws ApiException, IOException { + // Add path params + Map pathParams = new HashMap<>(); + if (companyId == null) { + throw new IllegalArgumentException("Please provide the companyId path parameter"); + } + pathParams.put("companyId", companyId); + if (id == null) { + throw new IllegalArgumentException("Please provide the id path parameter"); + } + pathParams.put("id", id); + + String requestBody = null; + Resource resource = + new Resource(this, this.baseURL + "/companies/{companyId}/terminalThemes/{id}/apply", null); + resource.request(requestBody, requestOptions, ApiConstants.HttpMethod.POST, pathParams); + } + + /** + * Create a terminal theme + * + * @param companyId {@link String } The unique identifier of the company account. (required) + * @param createThemeRequest {@link CreateThemeRequest } The theme to create. (required) + * @return {@link CreateThemeResponse } + * @throws ApiException if fails to make API call + */ + public CreateThemeResponse createTerminalThemeForCompany( + String companyId, CreateThemeRequest createThemeRequest) throws ApiException, IOException { + return createTerminalThemeForCompany(companyId, createThemeRequest, null); + } + + /** + * Create a terminal theme + * + * @param companyId {@link String } The unique identifier of the company account. (required) + * @param createThemeRequest {@link CreateThemeRequest } The theme to create. (required) + * @param requestOptions {@link RequestOptions } Object to store additional HTTP headers such as + * idempotency-keys (optional) + * @return {@link CreateThemeResponse } + * @throws ApiException if fails to make API call + */ + public CreateThemeResponse createTerminalThemeForCompany( + String companyId, CreateThemeRequest createThemeRequest, RequestOptions requestOptions) + throws ApiException, IOException { + // Add path params + Map pathParams = new HashMap<>(); + if (companyId == null) { + throw new IllegalArgumentException("Please provide the companyId path parameter"); + } + pathParams.put("companyId", companyId); + + String requestBody = createThemeRequest.toJson(); + Resource resource = + new Resource(this, this.baseURL + "/companies/{companyId}/terminalThemes", null); + String jsonResult = + resource.request(requestBody, requestOptions, ApiConstants.HttpMethod.POST, pathParams); + return CreateThemeResponse.fromJson(jsonResult); + } + + /** + * Delete an asset from a terminal theme + * + * @param companyId {@link String } The unique identifier of the company account. (required) + * @param id {@link String } The unique identifier of the terminal theme. (required) + * @param type {@link String } Query: The screen type or screen element that the asset is for: - + * **logo**: your logo. Only supported if `model` is **All**. - **homeScreen**: the + * default background screen. - **idleScreen**: a screensaver shown when the terminal is + * inactive. Only supported if `model` is **SFO1** or **M450**. - + * **afterPaymentScreen**: a screen shown after the payment is completed. - + * **shopperEngagementScreen**: a screen shown during a [shopper + * engagement](https://docs.adyen.com/point-of-sale/shopper-engagement) request. Only + * supported if `model` is **SFO1** or **M450**. (required) + * @param model {@link String } Query: The Android terminal model that the asset is for. Use + * **All** only if the `type` is **logo**. For every other screen type specify a + * single Android terminal model such as **AMS1**. (required) + * @throws ApiException if fails to make API call + */ + public void deleteTerminalThemeAssetForCompany( + String companyId, String id, String type, String model) throws ApiException, IOException { + deleteTerminalThemeAssetForCompany(companyId, id, type, model, null); + } + + /** + * Delete an asset from a terminal theme + * + * @param companyId {@link String } The unique identifier of the company account. (required) + * @param id {@link String } The unique identifier of the terminal theme. (required) + * @param type {@link String } Query: The screen type or screen element that the asset is for: - + * **logo**: your logo. Only supported if `model` is **All**. - **homeScreen**: the + * default background screen. - **idleScreen**: a screensaver shown when the terminal is + * inactive. Only supported if `model` is **SFO1** or **M450**. - + * **afterPaymentScreen**: a screen shown after the payment is completed. - + * **shopperEngagementScreen**: a screen shown during a [shopper + * engagement](https://docs.adyen.com/point-of-sale/shopper-engagement) request. Only + * supported if `model` is **SFO1** or **M450**. (required) + * @param model {@link String } Query: The Android terminal model that the asset is for. Use + * **All** only if the `type` is **logo**. For every other screen type specify a + * single Android terminal model such as **AMS1**. (required) + * @param requestOptions {@link RequestOptions } Object to store additional HTTP headers such as + * idempotency-keys (optional) + * @throws ApiException if fails to make API call + */ + public void deleteTerminalThemeAssetForCompany( + String companyId, String id, String type, String model, RequestOptions requestOptions) + throws ApiException, IOException { + // Add path params + Map pathParams = new HashMap<>(); + if (companyId == null) { + throw new IllegalArgumentException("Please provide the companyId path parameter"); + } + pathParams.put("companyId", companyId); + if (id == null) { + throw new IllegalArgumentException("Please provide the id path parameter"); + } + pathParams.put("id", id); + + // Add query params + Map queryParams = new HashMap<>(); + if (type != null) { + queryParams.put("type", type); + } + if (model != null) { + queryParams.put("model", model); + } + + String requestBody = null; + Resource resource = + new Resource( + this, this.baseURL + "/companies/{companyId}/terminalThemes/{id}/assets", null); + resource.request( + requestBody, requestOptions, ApiConstants.HttpMethod.DELETE, pathParams, queryParams); + } + + /** + * Delete a terminal theme + * + * @param companyId {@link String } The unique identifier of the company account. (required) + * @param id {@link String } The unique identifier of the terminal theme. (required) + * @throws ApiException if fails to make API call + */ + public void deleteTerminalThemeForCompany(String companyId, String id) + throws ApiException, IOException { + deleteTerminalThemeForCompany(companyId, id, null); + } + + /** + * Delete a terminal theme + * + * @param companyId {@link String } The unique identifier of the company account. (required) + * @param id {@link String } The unique identifier of the terminal theme. (required) + * @param requestOptions {@link RequestOptions } Object to store additional HTTP headers such as + * idempotency-keys (optional) + * @throws ApiException if fails to make API call + */ + public void deleteTerminalThemeForCompany( + String companyId, String id, RequestOptions requestOptions) throws ApiException, IOException { + // Add path params + Map pathParams = new HashMap<>(); + if (companyId == null) { + throw new IllegalArgumentException("Please provide the companyId path parameter"); + } + pathParams.put("companyId", companyId); + if (id == null) { + throw new IllegalArgumentException("Please provide the id path parameter"); + } + pathParams.put("id", id); + + String requestBody = null; + Resource resource = + new Resource(this, this.baseURL + "/companies/{companyId}/terminalThemes/{id}", null); + resource.request(requestBody, requestOptions, ApiConstants.HttpMethod.DELETE, pathParams); + } + + /** + * Replace a theme asset + * + * @param companyId {@link String } The unique identifier of the company account. (required) + * @param id {@link String } The unique identifier of the terminal theme. (required) + * @param _file {@link File } The asset file. The part must declare a specific supported + * Content-Type; which Content-Type is accepted depends on the asset `type` and + * terminal `model` (see the endpoint description for the full mapping). The file + * extension is derived from it. A request with a generic or missing Content-Type such as + * application/octet-stream is rejected with response code **422**. The maximum asset size + * depends on the terminal model: up to 100 MB for SFO1 and M450, or 10 MB for all other + * models. (required) + * @param type {@link String } Query: The screen type or screen element that the asset is for: - + * **logo**: your logo. Only supported if `model` is **All**. - **homeScreen**: the + * default background screen. - **idleScreen**: a screensaver shown when the terminal is + * inactive. Only supported if `model` is **SFO1** or **M450**. - + * **afterPaymentScreen**: a screen shown after the payment is completed. - + * **shopperEngagementScreen**: a screen shown during a [shopper + * engagement](https://docs.adyen.com/point-of-sale/shopper-engagement) request. Only + * supported if `model` is **SFO1** or **M450**. (required) + * @param model {@link String } Query: The Android terminal model that the asset is for. Use + * **All** only if the `type` is **logo**. For every other screen type specify a + * single Android terminal model such as **AMS1**. (required) + * @return {@link ThemeAsset } + * @throws ApiException if fails to make API call + */ + public ThemeAsset editTerminalThemeAssetForCompany( + String companyId, String id, String type, String model, File _file) + throws ApiException, IOException { + return editTerminalThemeAssetForCompany(companyId, id, type, model, _file, null); + } + + /** + * Replace a theme asset + * + * @param companyId {@link String } The unique identifier of the company account. (required) + * @param id {@link String } The unique identifier of the terminal theme. (required) + * @param _file {@link File } The asset file. The part must declare a specific supported + * Content-Type; which Content-Type is accepted depends on the asset `type` and + * terminal `model` (see the endpoint description for the full mapping). The file + * extension is derived from it. A request with a generic or missing Content-Type such as + * application/octet-stream is rejected with response code **422**. The maximum asset size + * depends on the terminal model: up to 100 MB for SFO1 and M450, or 10 MB for all other + * models. (required) + * @param type {@link String } Query: The screen type or screen element that the asset is for: - + * **logo**: your logo. Only supported if `model` is **All**. - **homeScreen**: the + * default background screen. - **idleScreen**: a screensaver shown when the terminal is + * inactive. Only supported if `model` is **SFO1** or **M450**. - + * **afterPaymentScreen**: a screen shown after the payment is completed. - + * **shopperEngagementScreen**: a screen shown during a [shopper + * engagement](https://docs.adyen.com/point-of-sale/shopper-engagement) request. Only + * supported if `model` is **SFO1** or **M450**. (required) + * @param model {@link String } Query: The Android terminal model that the asset is for. Use + * **All** only if the `type` is **logo**. For every other screen type specify a + * single Android terminal model such as **AMS1**. (required) + * @param requestOptions {@link RequestOptions } Object to store additional HTTP headers such as + * idempotency-keys (optional) + * @return {@link ThemeAsset } + * @throws ApiException if fails to make API call + */ + public ThemeAsset editTerminalThemeAssetForCompany( + String companyId, + String id, + String type, + String model, + File _file, + RequestOptions requestOptions) + throws ApiException, IOException { + // Add path params + Map pathParams = new HashMap<>(); + if (companyId == null) { + throw new IllegalArgumentException("Please provide the companyId path parameter"); + } + pathParams.put("companyId", companyId); + if (id == null) { + throw new IllegalArgumentException("Please provide the id path parameter"); + } + pathParams.put("id", id); + + // Add query params + Map queryParams = new HashMap<>(); + if (type != null) { + queryParams.put("type", type); + } + if (model != null) { + queryParams.put("model", model); + } + + // Add form params + Map formParams = new LinkedHashMap<>(); + if (_file == null) { + throw new IllegalArgumentException("Please provide the _file form parameter"); + } + formParams.put("file", _file); + + Resource resource = + new Resource( + this, this.baseURL + "/companies/{companyId}/terminalThemes/{id}/assets/replace", null); + String jsonResult = + resource.requestMultipart( + formParams, requestOptions, ApiConstants.HttpMethod.POST, pathParams, queryParams); + return ThemeAsset.fromJson(jsonResult); + } + + /** + * Get a terminal theme + * + * @param companyId {@link String } The unique identifier of the company account. (required) + * @param id {@link String } The unique identifier of the terminal theme. (required) + * @return {@link ThemeWithAssetDetails } + * @throws ApiException if fails to make API call + */ + public ThemeWithAssetDetails getTerminalThemeByIdForCompany(String companyId, String id) + throws ApiException, IOException { + return getTerminalThemeByIdForCompany(companyId, id, null); + } + + /** + * Get a terminal theme + * + * @param companyId {@link String } The unique identifier of the company account. (required) + * @param id {@link String } The unique identifier of the terminal theme. (required) + * @param requestOptions {@link RequestOptions } Object to store additional HTTP headers such as + * idempotency-keys (optional) + * @return {@link ThemeWithAssetDetails } + * @throws ApiException if fails to make API call + */ + public ThemeWithAssetDetails getTerminalThemeByIdForCompany( + String companyId, String id, RequestOptions requestOptions) throws ApiException, IOException { + // Add path params + Map pathParams = new HashMap<>(); + if (companyId == null) { + throw new IllegalArgumentException("Please provide the companyId path parameter"); + } + pathParams.put("companyId", companyId); + if (id == null) { + throw new IllegalArgumentException("Please provide the id path parameter"); + } + pathParams.put("id", id); + + String requestBody = null; + Resource resource = + new Resource(this, this.baseURL + "/companies/{companyId}/terminalThemes/{id}", null); + String jsonResult = + resource.request(requestBody, requestOptions, ApiConstants.HttpMethod.GET, pathParams); + return ThemeWithAssetDetails.fromJson(jsonResult); + } + + /** + * List terminal themes + * + * @param companyId {@link String } The unique identifier of the company account. (required) + * @return {@link ListThemesResponse } + * @throws ApiException if fails to make API call + */ + public ListThemesResponse listTerminalThemesForCompany(String companyId) + throws ApiException, IOException { + return listTerminalThemesForCompany(companyId, null, null, null, null); + } + + /** + * List terminal themes + * + * @param companyId {@link String } The unique identifier of the company account. (required) + * @param pageSize {@link Integer } Query: The number of themes to return per page. If not + * specified, the list has 10 themes per page. (optional, default to 10) + * @param page {@link Integer } Query: The number of the page to fetch. If not specified, the list + * starts from page 1. (optional, default to 1) + * @param search {@link String } Query: A search term to filter themes by name. The match is + * case-insensitive and returns any theme with a name that contains the search term. + * (optional) + * @param requestOptions {@link RequestOptions } Object to store additional HTTP headers such as + * idempotency-keys (optional) + * @return {@link ListThemesResponse } + * @throws ApiException if fails to make API call + */ + public ListThemesResponse listTerminalThemesForCompany( + String companyId, + Integer pageSize, + Integer page, + String search, + RequestOptions requestOptions) + throws ApiException, IOException { + // Add path params + Map pathParams = new HashMap<>(); + if (companyId == null) { + throw new IllegalArgumentException("Please provide the companyId path parameter"); + } + pathParams.put("companyId", companyId); + + // Add query params + Map queryParams = new HashMap<>(); + if (pageSize != null) { + queryParams.put("pageSize", pageSize.toString()); + } + if (page != null) { + queryParams.put("page", page.toString()); + } + if (search != null) { + queryParams.put("search", search); + } + + String requestBody = null; + Resource resource = + new Resource(this, this.baseURL + "/companies/{companyId}/terminalThemes", null); + String jsonResult = + resource.request( + requestBody, requestOptions, ApiConstants.HttpMethod.GET, pathParams, queryParams); + return ListThemesResponse.fromJson(jsonResult); + } + + /** + * Unapply a terminal theme + * + * @param companyId {@link String } The unique identifier of the company account. (required) + * @throws ApiException if fails to make API call + */ + public void unapplyTerminalThemeForCompany(String companyId) throws ApiException, IOException { + unapplyTerminalThemeForCompany(companyId, null); + } + + /** + * Unapply a terminal theme + * + * @param companyId {@link String } The unique identifier of the company account. (required) + * @param requestOptions {@link RequestOptions } Object to store additional HTTP headers such as + * idempotency-keys (optional) + * @throws ApiException if fails to make API call + */ + public void unapplyTerminalThemeForCompany(String companyId, RequestOptions requestOptions) + throws ApiException, IOException { + // Add path params + Map pathParams = new HashMap<>(); + if (companyId == null) { + throw new IllegalArgumentException("Please provide the companyId path parameter"); + } + pathParams.put("companyId", companyId); + + String requestBody = null; + Resource resource = + new Resource(this, this.baseURL + "/companies/{companyId}/terminalThemes/unapply", null); + resource.request(requestBody, requestOptions, ApiConstants.HttpMethod.POST, pathParams); + } + + /** + * Update the metadata of a terminal theme + * + * @param companyId {@link String } The unique identifier of the company account. (required) + * @param id {@link String } The unique identifier of the terminal theme. (required) + * @param themeUpdateRequest {@link ThemeUpdateRequest } The updated theme metadata. (required) + * @return {@link UpdateThemeResponse } + * @throws ApiException if fails to make API call + */ + public UpdateThemeResponse updateTerminalThemeForCompany( + String companyId, String id, ThemeUpdateRequest themeUpdateRequest) + throws ApiException, IOException { + return updateTerminalThemeForCompany(companyId, id, themeUpdateRequest, null); + } + + /** + * Update the metadata of a terminal theme + * + * @param companyId {@link String } The unique identifier of the company account. (required) + * @param id {@link String } The unique identifier of the terminal theme. (required) + * @param themeUpdateRequest {@link ThemeUpdateRequest } The updated theme metadata. (required) + * @param requestOptions {@link RequestOptions } Object to store additional HTTP headers such as + * idempotency-keys (optional) + * @return {@link UpdateThemeResponse } + * @throws ApiException if fails to make API call + */ + public UpdateThemeResponse updateTerminalThemeForCompany( + String companyId, + String id, + ThemeUpdateRequest themeUpdateRequest, + RequestOptions requestOptions) + throws ApiException, IOException { + // Add path params + Map pathParams = new HashMap<>(); + if (companyId == null) { + throw new IllegalArgumentException("Please provide the companyId path parameter"); + } + pathParams.put("companyId", companyId); + if (id == null) { + throw new IllegalArgumentException("Please provide the id path parameter"); + } + pathParams.put("id", id); + + String requestBody = themeUpdateRequest.toJson(); + Resource resource = + new Resource(this, this.baseURL + "/companies/{companyId}/terminalThemes/{id}", null); + String jsonResult = + resource.request(requestBody, requestOptions, ApiConstants.HttpMethod.PATCH, pathParams); + return UpdateThemeResponse.fromJson(jsonResult); + } +} diff --git a/src/main/java/com/adyen/service/management/TerminalThemesMerchantLevelApi.java b/src/main/java/com/adyen/service/management/TerminalThemesMerchantLevelApi.java new file mode 100644 index 000000000..56daa90ef --- /dev/null +++ b/src/main/java/com/adyen/service/management/TerminalThemesMerchantLevelApi.java @@ -0,0 +1,661 @@ +/* + * 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.service.management; + +import com.adyen.Client; +import com.adyen.Service; +import com.adyen.constants.ApiConstants; +import com.adyen.model.RequestOptions; +import com.adyen.model.management.CreateThemeRequest; +import com.adyen.model.management.CreateThemeResponse; +import com.adyen.model.management.ListThemesResponse; +import com.adyen.model.management.ThemeAsset; +import com.adyen.model.management.ThemeUpdateRequest; +import com.adyen.model.management.ThemeWithAssetDetails; +import com.adyen.model.management.UpdateThemeResponse; +import com.adyen.service.exception.ApiException; +import com.adyen.service.resource.Resource; +import java.io.File; +import java.io.IOException; +import java.util.HashMap; +import java.util.LinkedHashMap; +import java.util.Map; + +public class TerminalThemesMerchantLevelApi extends Service { + + public static final String API_VERSION = "3"; + + protected String baseURL; + + /** + * Terminal themes - merchant level constructor in {@link com.adyen.service.management package}. + * + * @param client {@link Client } (required) + */ + public TerminalThemesMerchantLevelApi(Client client) { + super(client); + this.baseURL = createBaseURL("https://management-test.adyen.com/v3"); + } + + /** + * Terminal themes - merchant level constructor in {@link com.adyen.service.management package}. + * Please use this constructor only if you would like to pass along your own url for routing or + * testing purposes. The latest API version is defined in this class as a constant. + * + * @param client {@link Client } (required) + * @param baseURL {@link String } (required) + */ + public TerminalThemesMerchantLevelApi(Client client, String baseURL) { + super(client); + this.baseURL = baseURL; + } + + /** + * Add an asset to a terminal theme + * + * @param merchantId {@link String } The unique identifier of the merchant account. (required) + * @param id {@link String } The unique identifier of the terminal theme. (required) + * @param _file {@link File } The asset file. The part must declare a specific supported + * Content-Type; which Content-Type is accepted depends on the asset `type` and + * terminal `model` (see the endpoint description for the full mapping). The file + * extension is derived from it. A request with a generic or missing Content-Type such as + * application/octet-stream is rejected with response code **422**. The maximum asset size + * depends on the terminal model: up to 100 MB for SFO1 and M450, or 10 MB for all other + * models. (required) + * @param type {@link String } Query: The screen type or screen element that the asset is for: - + * **logo**: your logo. Only supported if `model` is **All**. - **homeScreen**: the + * default background screen. - **idleScreen**: a screensaver shown when the terminal is + * inactive. Only supported if `model` is **SFO1** or **M450**. - + * **afterPaymentScreen**: a screen shown after the payment is completed. - + * **shopperEngagementScreen**: a screen shown during a [shopper + * engagement](https://docs.adyen.com/point-of-sale/shopper-engagement) request. Only + * supported if `model` is **SFO1** or **M450**. (required) + * @param model {@link String } Query: The Android terminal model that the asset is for. Use + * **All** only if the `type` is **logo**. For every other screen type specify a + * single Android terminal model such as **AMS1**. (required) + * @return {@link ThemeAsset } + * @throws ApiException if fails to make API call + */ + public ThemeAsset addTerminalThemeAssetForMerchant( + String merchantId, String id, String type, String model, File _file) + throws ApiException, IOException { + return addTerminalThemeAssetForMerchant(merchantId, id, type, model, _file, null); + } + + /** + * Add an asset to a terminal theme + * + * @param merchantId {@link String } The unique identifier of the merchant account. (required) + * @param id {@link String } The unique identifier of the terminal theme. (required) + * @param _file {@link File } The asset file. The part must declare a specific supported + * Content-Type; which Content-Type is accepted depends on the asset `type` and + * terminal `model` (see the endpoint description for the full mapping). The file + * extension is derived from it. A request with a generic or missing Content-Type such as + * application/octet-stream is rejected with response code **422**. The maximum asset size + * depends on the terminal model: up to 100 MB for SFO1 and M450, or 10 MB for all other + * models. (required) + * @param type {@link String } Query: The screen type or screen element that the asset is for: - + * **logo**: your logo. Only supported if `model` is **All**. - **homeScreen**: the + * default background screen. - **idleScreen**: a screensaver shown when the terminal is + * inactive. Only supported if `model` is **SFO1** or **M450**. - + * **afterPaymentScreen**: a screen shown after the payment is completed. - + * **shopperEngagementScreen**: a screen shown during a [shopper + * engagement](https://docs.adyen.com/point-of-sale/shopper-engagement) request. Only + * supported if `model` is **SFO1** or **M450**. (required) + * @param model {@link String } Query: The Android terminal model that the asset is for. Use + * **All** only if the `type` is **logo**. For every other screen type specify a + * single Android terminal model such as **AMS1**. (required) + * @param requestOptions {@link RequestOptions } Object to store additional HTTP headers such as + * idempotency-keys (optional) + * @return {@link ThemeAsset } + * @throws ApiException if fails to make API call + */ + public ThemeAsset addTerminalThemeAssetForMerchant( + String merchantId, + String id, + String type, + String model, + File _file, + RequestOptions requestOptions) + throws ApiException, IOException { + // Add path params + Map pathParams = new HashMap<>(); + if (merchantId == null) { + throw new IllegalArgumentException("Please provide the merchantId path parameter"); + } + pathParams.put("merchantId", merchantId); + if (id == null) { + throw new IllegalArgumentException("Please provide the id path parameter"); + } + pathParams.put("id", id); + + // Add query params + Map queryParams = new HashMap<>(); + if (type != null) { + queryParams.put("type", type); + } + if (model != null) { + queryParams.put("model", model); + } + + // Add form params + Map formParams = new LinkedHashMap<>(); + if (_file == null) { + throw new IllegalArgumentException("Please provide the _file form parameter"); + } + formParams.put("file", _file); + + Resource resource = + new Resource( + this, this.baseURL + "/merchants/{merchantId}/terminalThemes/{id}/assets", null); + String jsonResult = + resource.requestMultipart( + formParams, requestOptions, ApiConstants.HttpMethod.POST, pathParams, queryParams); + return ThemeAsset.fromJson(jsonResult); + } + + /** + * Apply a terminal theme + * + * @param merchantId {@link String } The unique identifier of the merchant account. (required) + * @param id {@link String } The unique identifier of the terminal theme. (required) + * @throws ApiException if fails to make API call + */ + public void applyTerminalThemeForMerchant(String merchantId, String id) + throws ApiException, IOException { + applyTerminalThemeForMerchant(merchantId, id, null); + } + + /** + * Apply a terminal theme + * + * @param merchantId {@link String } The unique identifier of the merchant account. (required) + * @param id {@link String } The unique identifier of the terminal theme. (required) + * @param requestOptions {@link RequestOptions } Object to store additional HTTP headers such as + * idempotency-keys (optional) + * @throws ApiException if fails to make API call + */ + public void applyTerminalThemeForMerchant( + String merchantId, String id, RequestOptions requestOptions) + throws ApiException, IOException { + // Add path params + Map pathParams = new HashMap<>(); + if (merchantId == null) { + throw new IllegalArgumentException("Please provide the merchantId path parameter"); + } + pathParams.put("merchantId", merchantId); + if (id == null) { + throw new IllegalArgumentException("Please provide the id path parameter"); + } + pathParams.put("id", id); + + String requestBody = null; + Resource resource = + new Resource( + this, this.baseURL + "/merchants/{merchantId}/terminalThemes/{id}/apply", null); + resource.request(requestBody, requestOptions, ApiConstants.HttpMethod.POST, pathParams); + } + + /** + * Create a terminal theme + * + * @param merchantId {@link String } The unique identifier of the merchant account. (required) + * @param createThemeRequest {@link CreateThemeRequest } The theme to create. (required) + * @return {@link CreateThemeResponse } + * @throws ApiException if fails to make API call + */ + public CreateThemeResponse createTerminalThemeForMerchant( + String merchantId, CreateThemeRequest createThemeRequest) throws ApiException, IOException { + return createTerminalThemeForMerchant(merchantId, createThemeRequest, null); + } + + /** + * Create a terminal theme + * + * @param merchantId {@link String } The unique identifier of the merchant account. (required) + * @param createThemeRequest {@link CreateThemeRequest } The theme to create. (required) + * @param requestOptions {@link RequestOptions } Object to store additional HTTP headers such as + * idempotency-keys (optional) + * @return {@link CreateThemeResponse } + * @throws ApiException if fails to make API call + */ + public CreateThemeResponse createTerminalThemeForMerchant( + String merchantId, CreateThemeRequest createThemeRequest, RequestOptions requestOptions) + throws ApiException, IOException { + // Add path params + Map pathParams = new HashMap<>(); + if (merchantId == null) { + throw new IllegalArgumentException("Please provide the merchantId path parameter"); + } + pathParams.put("merchantId", merchantId); + + String requestBody = createThemeRequest.toJson(); + Resource resource = + new Resource(this, this.baseURL + "/merchants/{merchantId}/terminalThemes", null); + String jsonResult = + resource.request(requestBody, requestOptions, ApiConstants.HttpMethod.POST, pathParams); + return CreateThemeResponse.fromJson(jsonResult); + } + + /** + * Delete an asset from a terminal theme + * + * @param merchantId {@link String } The unique identifier of the merchant account. (required) + * @param id {@link String } The unique identifier of the terminal theme. (required) + * @param type {@link String } Query: The screen type or screen element that the asset is for: - + * **logo**: your logo. Only supported if `model` is **All**. - **homeScreen**: the + * default background screen. - **idleScreen**: a screensaver shown when the terminal is + * inactive. Only supported if `model` is **SFO1** or **M450**. - + * **afterPaymentScreen**: a screen shown after the payment is completed. - + * **shopperEngagementScreen**: a screen shown during [shopper + * engagement](https://docs.adyen.com/point-of-sale/shopper-engagement) requests. Only + * supported if `model` is **SFO1** or **M450**. (required) + * @param model {@link String } Query: The Android terminal model that the asset is for. Use + * **All** only if the `type` is **logo**. For every other screen type specify a + * single Android terminal model such as **AMS1**. (required) + * @throws ApiException if fails to make API call + */ + public void deleteTerminalThemeAssetForMerchant( + String merchantId, String id, String type, String model) throws ApiException, IOException { + deleteTerminalThemeAssetForMerchant(merchantId, id, type, model, null); + } + + /** + * Delete an asset from a terminal theme + * + * @param merchantId {@link String } The unique identifier of the merchant account. (required) + * @param id {@link String } The unique identifier of the terminal theme. (required) + * @param type {@link String } Query: The screen type or screen element that the asset is for: - + * **logo**: your logo. Only supported if `model` is **All**. - **homeScreen**: the + * default background screen. - **idleScreen**: a screensaver shown when the terminal is + * inactive. Only supported if `model` is **SFO1** or **M450**. - + * **afterPaymentScreen**: a screen shown after the payment is completed. - + * **shopperEngagementScreen**: a screen shown during [shopper + * engagement](https://docs.adyen.com/point-of-sale/shopper-engagement) requests. Only + * supported if `model` is **SFO1** or **M450**. (required) + * @param model {@link String } Query: The Android terminal model that the asset is for. Use + * **All** only if the `type` is **logo**. For every other screen type specify a + * single Android terminal model such as **AMS1**. (required) + * @param requestOptions {@link RequestOptions } Object to store additional HTTP headers such as + * idempotency-keys (optional) + * @throws ApiException if fails to make API call + */ + public void deleteTerminalThemeAssetForMerchant( + String merchantId, String id, String type, String model, RequestOptions requestOptions) + throws ApiException, IOException { + // Add path params + Map pathParams = new HashMap<>(); + if (merchantId == null) { + throw new IllegalArgumentException("Please provide the merchantId path parameter"); + } + pathParams.put("merchantId", merchantId); + if (id == null) { + throw new IllegalArgumentException("Please provide the id path parameter"); + } + pathParams.put("id", id); + + // Add query params + Map queryParams = new HashMap<>(); + if (type != null) { + queryParams.put("type", type); + } + if (model != null) { + queryParams.put("model", model); + } + + String requestBody = null; + Resource resource = + new Resource( + this, this.baseURL + "/merchants/{merchantId}/terminalThemes/{id}/assets", null); + resource.request( + requestBody, requestOptions, ApiConstants.HttpMethod.DELETE, pathParams, queryParams); + } + + /** + * Delete a terminal theme + * + * @param merchantId {@link String } The unique identifier of the merchant account. (required) + * @param id {@link String } The unique identifier of the terminal theme. (required) + * @throws ApiException if fails to make API call + */ + public void deleteTerminalThemeForMerchant(String merchantId, String id) + throws ApiException, IOException { + deleteTerminalThemeForMerchant(merchantId, id, null); + } + + /** + * Delete a terminal theme + * + * @param merchantId {@link String } The unique identifier of the merchant account. (required) + * @param id {@link String } The unique identifier of the terminal theme. (required) + * @param requestOptions {@link RequestOptions } Object to store additional HTTP headers such as + * idempotency-keys (optional) + * @throws ApiException if fails to make API call + */ + public void deleteTerminalThemeForMerchant( + String merchantId, String id, RequestOptions requestOptions) + throws ApiException, IOException { + // Add path params + Map pathParams = new HashMap<>(); + if (merchantId == null) { + throw new IllegalArgumentException("Please provide the merchantId path parameter"); + } + pathParams.put("merchantId", merchantId); + if (id == null) { + throw new IllegalArgumentException("Please provide the id path parameter"); + } + pathParams.put("id", id); + + String requestBody = null; + Resource resource = + new Resource(this, this.baseURL + "/merchants/{merchantId}/terminalThemes/{id}", null); + resource.request(requestBody, requestOptions, ApiConstants.HttpMethod.DELETE, pathParams); + } + + /** + * Replace a theme asset + * + * @param merchantId {@link String } The unique identifier of the merchant account. (required) + * @param id {@link String } The unique identifier of the terminal theme. (required) + * @param _file {@link File } The asset file. The part must declare a specific supported + * Content-Type; which Content-Type is accepted depends on the asset `type` and + * terminal `model` (see the endpoint description for the full mapping). The file + * extension is derived from it. A request with a generic or missing Content-Type such as + * application/octet-stream is rejected with response code **422**. The maximum asset size + * depends on the terminal model: up to 100 MB for SFO1 and M450, or 10 MB for all other + * models. (required) + * @param type {@link String } Query: The screen type or screen element that the asset is for: - + * **logo**: your logo. Only supported if `model` is **All**. - **homeScreen**: the + * default background screen. - **idleScreen**: a screensaver shown when the terminal is + * inactive. Only supported if `model` is **SFO1** or **M450**. - + * **afterPaymentScreen**: a screen shown after the payment is completed. - + * **shopperEngagementScreen**: a screen shown during [shopper + * engagement](https://docs.adyen.com/point-of-sale/shopper-engagement) requests. Only + * supported if `model` is **SFO1** or **M450**. (required) + * @param model {@link String } Query: The Android terminal model that the asset is for. Use + * **All** only if the `type` is **logo**. For every other screen type specify a + * single Android terminal model such as **AMS1**. (required) + * @return {@link ThemeAsset } + * @throws ApiException if fails to make API call + */ + public ThemeAsset editTerminalThemeAssetForMerchant( + String merchantId, String id, String type, String model, File _file) + throws ApiException, IOException { + return editTerminalThemeAssetForMerchant(merchantId, id, type, model, _file, null); + } + + /** + * Replace a theme asset + * + * @param merchantId {@link String } The unique identifier of the merchant account. (required) + * @param id {@link String } The unique identifier of the terminal theme. (required) + * @param _file {@link File } The asset file. The part must declare a specific supported + * Content-Type; which Content-Type is accepted depends on the asset `type` and + * terminal `model` (see the endpoint description for the full mapping). The file + * extension is derived from it. A request with a generic or missing Content-Type such as + * application/octet-stream is rejected with response code **422**. The maximum asset size + * depends on the terminal model: up to 100 MB for SFO1 and M450, or 10 MB for all other + * models. (required) + * @param type {@link String } Query: The screen type or screen element that the asset is for: - + * **logo**: your logo. Only supported if `model` is **All**. - **homeScreen**: the + * default background screen. - **idleScreen**: a screensaver shown when the terminal is + * inactive. Only supported if `model` is **SFO1** or **M450**. - + * **afterPaymentScreen**: a screen shown after the payment is completed. - + * **shopperEngagementScreen**: a screen shown during [shopper + * engagement](https://docs.adyen.com/point-of-sale/shopper-engagement) requests. Only + * supported if `model` is **SFO1** or **M450**. (required) + * @param model {@link String } Query: The Android terminal model that the asset is for. Use + * **All** only if the `type` is **logo**. For every other screen type specify a + * single Android terminal model such as **AMS1**. (required) + * @param requestOptions {@link RequestOptions } Object to store additional HTTP headers such as + * idempotency-keys (optional) + * @return {@link ThemeAsset } + * @throws ApiException if fails to make API call + */ + public ThemeAsset editTerminalThemeAssetForMerchant( + String merchantId, + String id, + String type, + String model, + File _file, + RequestOptions requestOptions) + throws ApiException, IOException { + // Add path params + Map pathParams = new HashMap<>(); + if (merchantId == null) { + throw new IllegalArgumentException("Please provide the merchantId path parameter"); + } + pathParams.put("merchantId", merchantId); + if (id == null) { + throw new IllegalArgumentException("Please provide the id path parameter"); + } + pathParams.put("id", id); + + // Add query params + Map queryParams = new HashMap<>(); + if (type != null) { + queryParams.put("type", type); + } + if (model != null) { + queryParams.put("model", model); + } + + // Add form params + Map formParams = new LinkedHashMap<>(); + if (_file == null) { + throw new IllegalArgumentException("Please provide the _file form parameter"); + } + formParams.put("file", _file); + + Resource resource = + new Resource( + this, + this.baseURL + "/merchants/{merchantId}/terminalThemes/{id}/assets/replace", + null); + String jsonResult = + resource.requestMultipart( + formParams, requestOptions, ApiConstants.HttpMethod.POST, pathParams, queryParams); + return ThemeAsset.fromJson(jsonResult); + } + + /** + * Get a terminal theme + * + * @param merchantId {@link String } The unique identifier of the merchant account. (required) + * @param id {@link String } The unique identifier of the terminal theme. (required) + * @return {@link ThemeWithAssetDetails } + * @throws ApiException if fails to make API call + */ + public ThemeWithAssetDetails getTerminalThemeByIdForMerchant(String merchantId, String id) + throws ApiException, IOException { + return getTerminalThemeByIdForMerchant(merchantId, id, null); + } + + /** + * Get a terminal theme + * + * @param merchantId {@link String } The unique identifier of the merchant account. (required) + * @param id {@link String } The unique identifier of the terminal theme. (required) + * @param requestOptions {@link RequestOptions } Object to store additional HTTP headers such as + * idempotency-keys (optional) + * @return {@link ThemeWithAssetDetails } + * @throws ApiException if fails to make API call + */ + public ThemeWithAssetDetails getTerminalThemeByIdForMerchant( + String merchantId, String id, RequestOptions requestOptions) + throws ApiException, IOException { + // Add path params + Map pathParams = new HashMap<>(); + if (merchantId == null) { + throw new IllegalArgumentException("Please provide the merchantId path parameter"); + } + pathParams.put("merchantId", merchantId); + if (id == null) { + throw new IllegalArgumentException("Please provide the id path parameter"); + } + pathParams.put("id", id); + + String requestBody = null; + Resource resource = + new Resource(this, this.baseURL + "/merchants/{merchantId}/terminalThemes/{id}", null); + String jsonResult = + resource.request(requestBody, requestOptions, ApiConstants.HttpMethod.GET, pathParams); + return ThemeWithAssetDetails.fromJson(jsonResult); + } + + /** + * List terminal themes + * + * @param merchantId {@link String } The unique identifier of the merchant account. (required) + * @return {@link ListThemesResponse } + * @throws ApiException if fails to make API call + */ + public ListThemesResponse listTerminalThemesForMerchant(String merchantId) + throws ApiException, IOException { + return listTerminalThemesForMerchant(merchantId, null, null, null, null); + } + + /** + * List terminal themes + * + * @param merchantId {@link String } The unique identifier of the merchant account. (required) + * @param pageSize {@link Integer } Query: The number of themes to return per page. If not + * specified, the list has 10 themes per page. (optional, default to 10) + * @param page {@link Integer } Query: The number of the page to fetch. If not specified, the list + * starts from page 1. (optional, default to 1) + * @param search {@link String } Query: A search term to filter themes by name. The match is + * case-insensitive and returns any theme with a name that contains the search term. + * (optional) + * @param requestOptions {@link RequestOptions } Object to store additional HTTP headers such as + * idempotency-keys (optional) + * @return {@link ListThemesResponse } + * @throws ApiException if fails to make API call + */ + public ListThemesResponse listTerminalThemesForMerchant( + String merchantId, + Integer pageSize, + Integer page, + String search, + RequestOptions requestOptions) + throws ApiException, IOException { + // Add path params + Map pathParams = new HashMap<>(); + if (merchantId == null) { + throw new IllegalArgumentException("Please provide the merchantId path parameter"); + } + pathParams.put("merchantId", merchantId); + + // Add query params + Map queryParams = new HashMap<>(); + if (pageSize != null) { + queryParams.put("pageSize", pageSize.toString()); + } + if (page != null) { + queryParams.put("page", page.toString()); + } + if (search != null) { + queryParams.put("search", search); + } + + String requestBody = null; + Resource resource = + new Resource(this, this.baseURL + "/merchants/{merchantId}/terminalThemes", null); + String jsonResult = + resource.request( + requestBody, requestOptions, ApiConstants.HttpMethod.GET, pathParams, queryParams); + return ListThemesResponse.fromJson(jsonResult); + } + + /** + * Unapply a terminal theme + * + * @param merchantId {@link String } The unique identifier of the merchant account. (required) + * @throws ApiException if fails to make API call + */ + public void unapplyTerminalThemeForMerchant(String merchantId) throws ApiException, IOException { + unapplyTerminalThemeForMerchant(merchantId, null); + } + + /** + * Unapply a terminal theme + * + * @param merchantId {@link String } The unique identifier of the merchant account. (required) + * @param requestOptions {@link RequestOptions } Object to store additional HTTP headers such as + * idempotency-keys (optional) + * @throws ApiException if fails to make API call + */ + public void unapplyTerminalThemeForMerchant(String merchantId, RequestOptions requestOptions) + throws ApiException, IOException { + // Add path params + Map pathParams = new HashMap<>(); + if (merchantId == null) { + throw new IllegalArgumentException("Please provide the merchantId path parameter"); + } + pathParams.put("merchantId", merchantId); + + String requestBody = null; + Resource resource = + new Resource(this, this.baseURL + "/merchants/{merchantId}/terminalThemes/unapply", null); + resource.request(requestBody, requestOptions, ApiConstants.HttpMethod.POST, pathParams); + } + + /** + * Update the metadata of a terminal theme + * + * @param merchantId {@link String } The unique identifier of the merchant account. (required) + * @param id {@link String } The unique identifier of the terminal theme. (required) + * @param themeUpdateRequest {@link ThemeUpdateRequest } The updated theme metadata. (required) + * @return {@link UpdateThemeResponse } + * @throws ApiException if fails to make API call + */ + public UpdateThemeResponse updateTerminalThemeForMerchant( + String merchantId, String id, ThemeUpdateRequest themeUpdateRequest) + throws ApiException, IOException { + return updateTerminalThemeForMerchant(merchantId, id, themeUpdateRequest, null); + } + + /** + * Update the metadata of a terminal theme + * + * @param merchantId {@link String } The unique identifier of the merchant account. (required) + * @param id {@link String } The unique identifier of the terminal theme. (required) + * @param themeUpdateRequest {@link ThemeUpdateRequest } The updated theme metadata. (required) + * @param requestOptions {@link RequestOptions } Object to store additional HTTP headers such as + * idempotency-keys (optional) + * @return {@link UpdateThemeResponse } + * @throws ApiException if fails to make API call + */ + public UpdateThemeResponse updateTerminalThemeForMerchant( + String merchantId, + String id, + ThemeUpdateRequest themeUpdateRequest, + RequestOptions requestOptions) + throws ApiException, IOException { + // Add path params + Map pathParams = new HashMap<>(); + if (merchantId == null) { + throw new IllegalArgumentException("Please provide the merchantId path parameter"); + } + pathParams.put("merchantId", merchantId); + if (id == null) { + throw new IllegalArgumentException("Please provide the id path parameter"); + } + pathParams.put("id", id); + + String requestBody = themeUpdateRequest.toJson(); + Resource resource = + new Resource(this, this.baseURL + "/merchants/{merchantId}/terminalThemes/{id}", null); + String jsonResult = + resource.request(requestBody, requestOptions, ApiConstants.HttpMethod.PATCH, pathParams); + return UpdateThemeResponse.fromJson(jsonResult); + } +} diff --git a/src/main/java/com/adyen/service/management/TerminalThemesStoreLevelApi.java b/src/main/java/com/adyen/service/management/TerminalThemesStoreLevelApi.java new file mode 100644 index 000000000..5a35161ee --- /dev/null +++ b/src/main/java/com/adyen/service/management/TerminalThemesStoreLevelApi.java @@ -0,0 +1,125 @@ +/* + * 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.service.management; + +import com.adyen.Client; +import com.adyen.Service; +import com.adyen.constants.ApiConstants; +import com.adyen.model.RequestOptions; +import com.adyen.service.exception.ApiException; +import com.adyen.service.resource.Resource; +import java.io.IOException; +import java.util.HashMap; +import java.util.Map; + +public class TerminalThemesStoreLevelApi extends Service { + + public static final String API_VERSION = "3"; + + protected String baseURL; + + /** + * Terminal themes - store level constructor in {@link com.adyen.service.management package}. + * + * @param client {@link Client } (required) + */ + public TerminalThemesStoreLevelApi(Client client) { + super(client); + this.baseURL = createBaseURL("https://management-test.adyen.com/v3"); + } + + /** + * Terminal themes - store level constructor in {@link com.adyen.service.management package}. + * Please use this constructor only if you would like to pass along your own url for routing or + * testing purposes. The latest API version is defined in this class as a constant. + * + * @param client {@link Client } (required) + * @param baseURL {@link String } (required) + */ + public TerminalThemesStoreLevelApi(Client client, String baseURL) { + super(client); + this.baseURL = baseURL; + } + + /** + * Apply a terminal theme + * + * @param storeId {@link String } The unique identifier of the store. (required) + * @param id {@link String } The unique identifier of the terminal theme. (required) + * @throws ApiException if fails to make API call + */ + public void applyTerminalThemeForStore(String storeId, String id) + throws ApiException, IOException { + applyTerminalThemeForStore(storeId, id, null); + } + + /** + * Apply a terminal theme + * + * @param storeId {@link String } The unique identifier of the store. (required) + * @param id {@link String } The unique identifier of the terminal theme. (required) + * @param requestOptions {@link RequestOptions } Object to store additional HTTP headers such as + * idempotency-keys (optional) + * @throws ApiException if fails to make API call + */ + public void applyTerminalThemeForStore(String storeId, String id, RequestOptions requestOptions) + throws ApiException, IOException { + // Add path params + Map pathParams = new HashMap<>(); + if (storeId == null) { + throw new IllegalArgumentException("Please provide the storeId path parameter"); + } + pathParams.put("storeId", storeId); + if (id == null) { + throw new IllegalArgumentException("Please provide the id path parameter"); + } + pathParams.put("id", id); + + String requestBody = null; + Resource resource = + new Resource(this, this.baseURL + "/stores/{storeId}/terminalThemes/{id}/apply", null); + resource.request(requestBody, requestOptions, ApiConstants.HttpMethod.POST, pathParams); + } + + /** + * Unapply a terminal theme + * + * @param storeId {@link String } The unique identifier of the store. (required) + * @throws ApiException if fails to make API call + */ + public void unapplyTerminalThemeForStore(String storeId) throws ApiException, IOException { + unapplyTerminalThemeForStore(storeId, null); + } + + /** + * Unapply a terminal theme + * + * @param storeId {@link String } The unique identifier of the store. (required) + * @param requestOptions {@link RequestOptions } Object to store additional HTTP headers such as + * idempotency-keys (optional) + * @throws ApiException if fails to make API call + */ + public void unapplyTerminalThemeForStore(String storeId, RequestOptions requestOptions) + throws ApiException, IOException { + // Add path params + Map pathParams = new HashMap<>(); + if (storeId == null) { + throw new IllegalArgumentException("Please provide the storeId path parameter"); + } + pathParams.put("storeId", storeId); + + String requestBody = null; + Resource resource = + new Resource(this, this.baseURL + "/stores/{storeId}/terminalThemes/unapply", null); + resource.request(requestBody, requestOptions, ApiConstants.HttpMethod.POST, pathParams); + } +} diff --git a/src/main/java/com/adyen/service/management/TerminalThemesTerminalLevelApi.java b/src/main/java/com/adyen/service/management/TerminalThemesTerminalLevelApi.java new file mode 100644 index 000000000..c2dc85697 --- /dev/null +++ b/src/main/java/com/adyen/service/management/TerminalThemesTerminalLevelApi.java @@ -0,0 +1,127 @@ +/* + * 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.service.management; + +import com.adyen.Client; +import com.adyen.Service; +import com.adyen.constants.ApiConstants; +import com.adyen.model.RequestOptions; +import com.adyen.service.exception.ApiException; +import com.adyen.service.resource.Resource; +import java.io.IOException; +import java.util.HashMap; +import java.util.Map; + +public class TerminalThemesTerminalLevelApi extends Service { + + public static final String API_VERSION = "3"; + + protected String baseURL; + + /** + * Terminal themes - terminal level constructor in {@link com.adyen.service.management package}. + * + * @param client {@link Client } (required) + */ + public TerminalThemesTerminalLevelApi(Client client) { + super(client); + this.baseURL = createBaseURL("https://management-test.adyen.com/v3"); + } + + /** + * Terminal themes - terminal level constructor in {@link com.adyen.service.management package}. + * Please use this constructor only if you would like to pass along your own url for routing or + * testing purposes. The latest API version is defined in this class as a constant. + * + * @param client {@link Client } (required) + * @param baseURL {@link String } (required) + */ + public TerminalThemesTerminalLevelApi(Client client, String baseURL) { + super(client); + this.baseURL = baseURL; + } + + /** + * Apply a terminal theme + * + * @param terminalId {@link String } The unique identifier of the terminal. (required) + * @param id {@link String } The unique identifier of the terminal theme. (required) + * @throws ApiException if fails to make API call + */ + public void applyTerminalThemeForTerminal(String terminalId, String id) + throws ApiException, IOException { + applyTerminalThemeForTerminal(terminalId, id, null); + } + + /** + * Apply a terminal theme + * + * @param terminalId {@link String } The unique identifier of the terminal. (required) + * @param id {@link String } The unique identifier of the terminal theme. (required) + * @param requestOptions {@link RequestOptions } Object to store additional HTTP headers such as + * idempotency-keys (optional) + * @throws ApiException if fails to make API call + */ + public void applyTerminalThemeForTerminal( + String terminalId, String id, RequestOptions requestOptions) + throws ApiException, IOException { + // Add path params + Map pathParams = new HashMap<>(); + if (terminalId == null) { + throw new IllegalArgumentException("Please provide the terminalId path parameter"); + } + pathParams.put("terminalId", terminalId); + if (id == null) { + throw new IllegalArgumentException("Please provide the id path parameter"); + } + pathParams.put("id", id); + + String requestBody = null; + Resource resource = + new Resource( + this, this.baseURL + "/terminals/{terminalId}/terminalThemes/{id}/apply", null); + resource.request(requestBody, requestOptions, ApiConstants.HttpMethod.POST, pathParams); + } + + /** + * Unapply a terminal theme + * + * @param terminalId {@link String } The unique identifier of the terminal. (required) + * @throws ApiException if fails to make API call + */ + public void unapplyTerminalThemeForTerminal(String terminalId) throws ApiException, IOException { + unapplyTerminalThemeForTerminal(terminalId, null); + } + + /** + * Unapply a terminal theme + * + * @param terminalId {@link String } The unique identifier of the terminal. (required) + * @param requestOptions {@link RequestOptions } Object to store additional HTTP headers such as + * idempotency-keys (optional) + * @throws ApiException if fails to make API call + */ + public void unapplyTerminalThemeForTerminal(String terminalId, RequestOptions requestOptions) + throws ApiException, IOException { + // Add path params + Map pathParams = new HashMap<>(); + if (terminalId == null) { + throw new IllegalArgumentException("Please provide the terminalId path parameter"); + } + pathParams.put("terminalId", terminalId); + + String requestBody = null; + Resource resource = + new Resource(this, this.baseURL + "/terminals/{terminalId}/terminalThemes/unapply", null); + resource.request(requestBody, requestOptions, ApiConstants.HttpMethod.POST, pathParams); + } +}