From b15e538407e872e9d63fc40b610e869aee8c5236 Mon Sep 17 00:00:00 2001 From: AdyenAutomationBot <38424300+AdyenAutomationBot@users.noreply.github.com> Date: Thu, 8 Oct 2026 14:22:29 +0000 Subject: [PATCH] [management] Automated update from Adyen/adyen-openapi@45520ee --- sdk-generation-log/management.json | 8 +- .../model/management/AlipayPlusInfo.java | 170 ++++- .../com/adyen/model/management/AncvInfo.java | 193 +++++ .../model/management/AncvResponseInfo.java | 193 +++++ .../management/AssociatedPaymentMethod.java | 18 + .../management/CertificateSearchResponse.java | 187 +++++ .../management/ClientCertificateRequest.java | 261 +++++++ .../ClientCertificateWithChain.java | 404 +++++++++++ .../model/management/CreateThemeRequest.java | 229 ++++++ .../model/management/CreateThemeResponse.java | 274 ++++++++ .../com/adyen/model/management/EbtInfo.java | 175 +++++ .../model/management/EbtResponseInfo.java | 175 +++++ .../adyen/model/management/EbtUpdateInfo.java | 175 +++++ .../model/management/ListThemesResponse.java | 238 +++++++ .../adyen/model/management/PaymentMethod.java | 223 ++++++ .../management/PaymentMethodResponse.java | 8 +- .../management/PaymentMethodSetupInfo.java | 129 +++- .../management/SplitConfigurationRule.java | 221 ++++-- .../com/adyen/model/management/Surcharge.java | 9 +- .../model/management/TerminalSettings.java | 71 ++ .../adyen/model/management/ThemeAsset.java | 288 ++++++++ .../com/adyen/model/management/ThemeMode.java | 58 ++ .../adyen/model/management/ThemeSummary.java | 273 ++++++++ .../model/management/ThemeUpdateRequest.java | 268 +++++++ .../management/ThemeWithAssetDetails.java | 335 +++++++++ .../management/UpdatePaymentMethodInfo.java | 50 ++ .../UpdateSplitConfigurationRuleRequest.java | 127 +++- .../model/management/UpdateThemeResponse.java | 274 ++++++++ .../adyen/model/management/ValuelinkInfo.java | 105 +-- .../management/ValuelinkResponseInfo.java | 106 +-- .../AndroidFilesCompanyLevelApi.java | 4 +- .../ClientCertificatesCompanyLevelApi.java | 140 ++++ .../TerminalThemesCompanyLevelApi.java | 655 +++++++++++++++++ .../TerminalThemesMerchantLevelApi.java | 661 ++++++++++++++++++ .../TerminalThemesStoreLevelApi.java | 125 ++++ .../TerminalThemesTerminalLevelApi.java | 127 ++++ 36 files changed, 6789 insertions(+), 168 deletions(-) create mode 100644 src/main/java/com/adyen/model/management/AncvInfo.java create mode 100644 src/main/java/com/adyen/model/management/AncvResponseInfo.java create mode 100644 src/main/java/com/adyen/model/management/CertificateSearchResponse.java create mode 100644 src/main/java/com/adyen/model/management/ClientCertificateRequest.java create mode 100644 src/main/java/com/adyen/model/management/ClientCertificateWithChain.java create mode 100644 src/main/java/com/adyen/model/management/CreateThemeRequest.java create mode 100644 src/main/java/com/adyen/model/management/CreateThemeResponse.java create mode 100644 src/main/java/com/adyen/model/management/EbtInfo.java create mode 100644 src/main/java/com/adyen/model/management/EbtResponseInfo.java create mode 100644 src/main/java/com/adyen/model/management/EbtUpdateInfo.java create mode 100644 src/main/java/com/adyen/model/management/ListThemesResponse.java create mode 100644 src/main/java/com/adyen/model/management/ThemeAsset.java create mode 100644 src/main/java/com/adyen/model/management/ThemeMode.java create mode 100644 src/main/java/com/adyen/model/management/ThemeSummary.java create mode 100644 src/main/java/com/adyen/model/management/ThemeUpdateRequest.java create mode 100644 src/main/java/com/adyen/model/management/ThemeWithAssetDetails.java create mode 100644 src/main/java/com/adyen/model/management/UpdateThemeResponse.java create mode 100644 src/main/java/com/adyen/service/management/ClientCertificatesCompanyLevelApi.java create mode 100644 src/main/java/com/adyen/service/management/TerminalThemesCompanyLevelApi.java create mode 100644 src/main/java/com/adyen/service/management/TerminalThemesMerchantLevelApi.java create mode 100644 src/main/java/com/adyen/service/management/TerminalThemesStoreLevelApi.java create mode 100644 src/main/java/com/adyen/service/management/TerminalThemesTerminalLevelApi.java diff --git a/sdk-generation-log/management.json b/sdk-generation-log/management.json index 27b9ebf7c2..49391cd9f9 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-10-08T14:22:29Z", + "openapiCommitSha": "45520ee6246d7e3d8074c3c5c5e991e65c2c02d6", + "automationCommitSha": "82147244fd717b50362f88a20e4436e693d0aed6", + "libraryCommitSha": "00947dacaaee54f8ed6e4929cc04f243e32ad898" } diff --git a/src/main/java/com/adyen/model/management/AlipayPlusInfo.java b/src/main/java/com/adyen/model/management/AlipayPlusInfo.java index 3ab61895d7..9b77acf618 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 0000000000..0ee4f06d2b --- /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 0000000000..d88aeabfb6 --- /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 85625dc2d7..e9b6d6aa05 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/CertificateSearchResponse.java b/src/main/java/com/adyen/model/management/CertificateSearchResponse.java new file mode 100644 index 0000000000..2991c67df3 --- /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 0000000000..50e9128da6 --- /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 0000000000..f56eaa965c --- /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 0000000000..4307b32425 --- /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 0000000000..3318460dba --- /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 0000000000..8ea4612bf9 --- /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 0000000000..bd410c24dd --- /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 0000000000..36e2243ebc --- /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/ListThemesResponse.java b/src/main/java/com/adyen/model/management/ListThemesResponse.java new file mode 100644 index 0000000000..46eeb254ac --- /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/PaymentMethod.java b/src/main/java/com/adyen/model/management/PaymentMethod.java index da6d02b24d..b07b480b90 100644 --- a/src/main/java/com/adyen/model/management/PaymentMethod.java +++ b/src/main/java/com/adyen/model/management/PaymentMethod.java @@ -33,6 +33,7 @@ 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, @@ -46,6 +47,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,6 +63,8 @@ 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_PAYME, @@ -123,6 +127,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; @@ -201,6 +211,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 +307,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; @@ -706,6 +734,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 * @@ -1219,6 +1282,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 +1845,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 * @@ -2356,9 +2527,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 +2547,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 +2566,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 +2838,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) @@ -2676,6 +2867,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,6 +2899,10 @@ 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) @@ -2771,6 +2968,8 @@ public int hashCode() { isSetAllowed, amex, isSetAmex, + ancv, + isSetAncv, applePay, isSetApplePay, associatedPaymentMethods, @@ -2797,6 +2996,8 @@ public int hashCode() { isSetDiners, discover, isSetDiscover, + ebt, + isSetEbt, eftDirectdebitCA, isSetEftDirectdebitCA, eftposAustralia, @@ -2827,6 +3028,10 @@ public int hashCode() { isSetMc, mealVoucherFR, isSetMealVoucherFR, + merchantCategoryCode, + isSetMerchantCategoryCode, + mid, + isSetMid, nyce, isSetNyce, paybybankPlaid, @@ -2887,6 +3092,7 @@ 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)) @@ -2902,6 +3108,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,6 +3124,10 @@ 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(" payme: ").append(toIndentedString(payme)).append("\n"); @@ -2983,6 +3194,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); } @@ -3022,6 +3236,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,6 +3284,12 @@ 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); } diff --git a/src/main/java/com/adyen/model/management/PaymentMethodResponse.java b/src/main/java/com/adyen/model/management/PaymentMethodResponse.java index 678ad38d07..e7c63d631d 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")), @@ -176,6 +178,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")), @@ -354,7 +358,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 5b1cffefe2..6328c170e4 100644 --- a/src/main/java/com/adyen/model/management/PaymentMethodSetupInfo.java +++ b/src/main/java/com/adyen/model/management/PaymentMethodSetupInfo.java @@ -32,6 +32,7 @@ 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_BUSINESS_LINE_ID, @@ -44,6 +45,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, @@ -112,6 +114,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; @@ -184,6 +192,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; @@ -417,6 +431,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 +486,8 @@ public enum TypeEnum { AMEX(String.valueOf("amex")), + ANCV(String.valueOf("ancv")), + APPLEPAY(String.valueOf("applepay")), AVANCARD(String.valueOf("avancard")), @@ -535,6 +554,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")), @@ -713,7 +734,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 +992,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 * @@ -1434,6 +1492,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 * @@ -2516,9 +2609,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 +2629,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 +2648,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,6 +2880,8 @@ 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) @@ -2794,6 +2907,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) @@ -2882,6 +2997,8 @@ public int hashCode() { isSetAlipayPlus, amex, isSetAmex, + ancv, + isSetAncv, applePay, isSetApplePay, bcmc, @@ -2906,6 +3023,8 @@ public int hashCode() { isSetDiners, discover, isSetDiscover, + ebt, + isSetEbt, eftDirectdebitCA, isSetEftDirectdebitCA, eftposAustralia, @@ -2989,6 +3108,7 @@ 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(" businessLineId: ").append(toIndentedString(businessLineId)).append("\n"); @@ -3001,6 +3121,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"); @@ -3076,6 +3197,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); } @@ -3112,6 +3236,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); } diff --git a/src/main/java/com/adyen/model/management/SplitConfigurationRule.java b/src/main/java/com/adyen/model/management/SplitConfigurationRule.java index c3d3688aea..1b051727b1 100644 --- a/src/main/java/com/adyen/model/management/SplitConfigurationRule.java +++ b/src/main/java/com/adyen/model/management/SplitConfigurationRule.java @@ -26,6 +26,7 @@ /** SplitConfigurationRule */ @JsonPropertyOrder({ SplitConfigurationRule.JSON_PROPERTY_CARD_REGION, + SplitConfigurationRule.JSON_PROPERTY_CARD_USAGE_TYPE, SplitConfigurationRule.JSON_PROPERTY_CURRENCY, SplitConfigurationRule.JSON_PROPERTY_FUNDING_SOURCE, SplitConfigurationRule.JSON_PROPERTY_PAYMENT_METHOD, @@ -37,11 +38,10 @@ public class SplitConfigurationRule { /** * The card region condition that determines whether the [split * logic](https://docs.adyen.com/api-explorer/Management/latest/post/merchants/(merchantId)/splitConfigurations#request-rules-splitLogic) - * applies to the transaction. > This condition is in pilot phase, and not yet available for - * all platforms. Possible values: * **domestic**: The card issuer and the store where the - * transaction is processed are registered in the same country. * **international**: The card - * issuer and the store where the transaction is processed are registered in different countries - * or regions. Includes all **interRegional** and **intraRegional** transactions. * + * applies to the transaction. Possible values: * **domestic**: The card issuer and the store + * where the transaction is processed are registered in the same country. * **international**: The + * card issuer and the store where the transaction is processed are registered in different + * countries or regions. Includes all **interRegional** and **intraRegional** transactions. * * **interRegional**: The card issuer and the store where the transaction is processed are * registered in different regions. * **intraRegional**: The card issuer and the store where the * transaction is processed are registered in different countries, but in the same region. * @@ -103,6 +103,60 @@ public static CardRegionEnum fromValue(String value) { /** Mark when the attribute has been explicitly set. */ private boolean isSetCardRegion = false; + /** + * The card usage type condition that determines whether the split logic applies to commercial + * cards, consumer cards, or all cards. * **ANY** (default): The split logic applies to all cards, + * regardless of its usage type. * **commercial**: The split logic applies to commercial cards + * only. * **consumer**: The split logic applies to consumer cards only. + */ + public enum CardUsageTypeEnum { + COMMERCIAL(String.valueOf("commercial")), + + CONSUMER(String.valueOf("consumer")), + + ANY(String.valueOf("ANY")); + + private static final Logger LOG = Logger.getLogger(CardUsageTypeEnum.class.getName()); + + private String value; + + CardUsageTypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static CardUsageTypeEnum fromValue(String value) { + for (CardUsageTypeEnum b : CardUsageTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + // handling unexpected value + LOG.warning( + "CardUsageTypeEnum: unexpected enum value '" + + value + + "' - Supported values are " + + Arrays.toString(CardUsageTypeEnum.values())); + return null; + } + } + + public static final String JSON_PROPERTY_CARD_USAGE_TYPE = "cardUsageType"; + private CardUsageTypeEnum cardUsageType; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetCardUsageType = false; + public static final String JSON_PROPERTY_CURRENCY = "currency"; private String currency; @@ -263,11 +317,10 @@ public SplitConfigurationRule(@JsonProperty(JSON_PROPERTY_RULE_ID) String ruleId /** * The card region condition that determines whether the [split * logic](https://docs.adyen.com/api-explorer/Management/latest/post/merchants/(merchantId)/splitConfigurations#request-rules-splitLogic) - * applies to the transaction. > This condition is in pilot phase, and not yet available for - * all platforms. Possible values: * **domestic**: The card issuer and the store where the - * transaction is processed are registered in the same country. * **international**: The card - * issuer and the store where the transaction is processed are registered in different countries - * or regions. Includes all **interRegional** and **intraRegional** transactions. * + * applies to the transaction. Possible values: * **domestic**: The card issuer and the store + * where the transaction is processed are registered in the same country. * **international**: The + * card issuer and the store where the transaction is processed are registered in different + * countries or regions. Includes all **interRegional** and **intraRegional** transactions. * * **interRegional**: The card issuer and the store where the transaction is processed are * registered in different regions. * **intraRegional**: The card issuer and the store where the * transaction is processed are registered in different countries, but in the same region. * @@ -277,17 +330,17 @@ public SplitConfigurationRule(@JsonProperty(JSON_PROPERTY_RULE_ID) String ruleId * * @param cardRegion The card region condition that determines whether the [split * logic](https://docs.adyen.com/api-explorer/Management/latest/post/merchants/(merchantId)/splitConfigurations#request-rules-splitLogic) - * applies to the transaction. > This condition is in pilot phase, and not yet available - * for all platforms. Possible values: * **domestic**: The card issuer and the store where the - * transaction is processed are registered in the same country. * **international**: The card - * issuer and the store where the transaction is processed are registered in different - * countries or regions. Includes all **interRegional** and **intraRegional** transactions. * - * **interRegional**: The card issuer and the store where the transaction is processed are - * registered in different regions. * **intraRegional**: The card issuer and the store where - * the transaction is processed are registered in different countries, but in the same region. - * * **intraEEA**: The card issuer and the store where the transaction is processed are - * registered in different countries, but in the European Economic Area (EEA). * **ANY**: - * Applies to all transactions, regardless of the processing and issuing country/region. + * applies to the transaction. Possible values: * **domestic**: The card issuer and the store + * where the transaction is processed are registered in the same country. * **international**: + * The card issuer and the store where the transaction is processed are registered in + * different countries or regions. Includes all **interRegional** and **intraRegional** + * transactions. * **interRegional**: The card issuer and the store where the transaction is + * processed are registered in different regions. * **intraRegional**: The card issuer and the + * store where the transaction is processed are registered in different countries, but in the + * same region. * **intraEEA**: The card issuer and the store where the transaction is + * processed are registered in different countries, but in the European Economic Area (EEA). * + * **ANY**: Applies to all transactions, regardless of the processing and issuing + * country/region. * @return the current {@code SplitConfigurationRule} instance, allowing for method chaining */ public SplitConfigurationRule cardRegion(CardRegionEnum cardRegion) { @@ -299,11 +352,10 @@ public SplitConfigurationRule cardRegion(CardRegionEnum cardRegion) { /** * The card region condition that determines whether the [split * logic](https://docs.adyen.com/api-explorer/Management/latest/post/merchants/(merchantId)/splitConfigurations#request-rules-splitLogic) - * applies to the transaction. > This condition is in pilot phase, and not yet available for - * all platforms. Possible values: * **domestic**: The card issuer and the store where the - * transaction is processed are registered in the same country. * **international**: The card - * issuer and the store where the transaction is processed are registered in different countries - * or regions. Includes all **interRegional** and **intraRegional** transactions. * + * applies to the transaction. Possible values: * **domestic**: The card issuer and the store + * where the transaction is processed are registered in the same country. * **international**: The + * card issuer and the store where the transaction is processed are registered in different + * countries or regions. Includes all **interRegional** and **intraRegional** transactions. * * **interRegional**: The card issuer and the store where the transaction is processed are * registered in different regions. * **intraRegional**: The card issuer and the store where the * transaction is processed are registered in different countries, but in the same region. * @@ -313,17 +365,17 @@ public SplitConfigurationRule cardRegion(CardRegionEnum cardRegion) { * * @return cardRegion The card region condition that determines whether the [split * logic](https://docs.adyen.com/api-explorer/Management/latest/post/merchants/(merchantId)/splitConfigurations#request-rules-splitLogic) - * applies to the transaction. > This condition is in pilot phase, and not yet available - * for all platforms. Possible values: * **domestic**: The card issuer and the store where the - * transaction is processed are registered in the same country. * **international**: The card - * issuer and the store where the transaction is processed are registered in different - * countries or regions. Includes all **interRegional** and **intraRegional** transactions. * - * **interRegional**: The card issuer and the store where the transaction is processed are - * registered in different regions. * **intraRegional**: The card issuer and the store where - * the transaction is processed are registered in different countries, but in the same region. - * * **intraEEA**: The card issuer and the store where the transaction is processed are - * registered in different countries, but in the European Economic Area (EEA). * **ANY**: - * Applies to all transactions, regardless of the processing and issuing country/region. + * applies to the transaction. Possible values: * **domestic**: The card issuer and the store + * where the transaction is processed are registered in the same country. * **international**: + * The card issuer and the store where the transaction is processed are registered in + * different countries or regions. Includes all **interRegional** and **intraRegional** + * transactions. * **interRegional**: The card issuer and the store where the transaction is + * processed are registered in different regions. * **intraRegional**: The card issuer and the + * store where the transaction is processed are registered in different countries, but in the + * same region. * **intraEEA**: The card issuer and the store where the transaction is + * processed are registered in different countries, but in the European Economic Area (EEA). * + * **ANY**: Applies to all transactions, regardless of the processing and issuing + * country/region. */ @JsonProperty(JSON_PROPERTY_CARD_REGION) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -334,11 +386,10 @@ public CardRegionEnum getCardRegion() { /** * The card region condition that determines whether the [split * logic](https://docs.adyen.com/api-explorer/Management/latest/post/merchants/(merchantId)/splitConfigurations#request-rules-splitLogic) - * applies to the transaction. > This condition is in pilot phase, and not yet available for - * all platforms. Possible values: * **domestic**: The card issuer and the store where the - * transaction is processed are registered in the same country. * **international**: The card - * issuer and the store where the transaction is processed are registered in different countries - * or regions. Includes all **interRegional** and **intraRegional** transactions. * + * applies to the transaction. Possible values: * **domestic**: The card issuer and the store + * where the transaction is processed are registered in the same country. * **international**: The + * card issuer and the store where the transaction is processed are registered in different + * countries or regions. Includes all **interRegional** and **intraRegional** transactions. * * **interRegional**: The card issuer and the store where the transaction is processed are * registered in different regions. * **intraRegional**: The card issuer and the store where the * transaction is processed are registered in different countries, but in the same region. * @@ -348,17 +399,17 @@ public CardRegionEnum getCardRegion() { * * @param cardRegion The card region condition that determines whether the [split * logic](https://docs.adyen.com/api-explorer/Management/latest/post/merchants/(merchantId)/splitConfigurations#request-rules-splitLogic) - * applies to the transaction. > This condition is in pilot phase, and not yet available - * for all platforms. Possible values: * **domestic**: The card issuer and the store where the - * transaction is processed are registered in the same country. * **international**: The card - * issuer and the store where the transaction is processed are registered in different - * countries or regions. Includes all **interRegional** and **intraRegional** transactions. * - * **interRegional**: The card issuer and the store where the transaction is processed are - * registered in different regions. * **intraRegional**: The card issuer and the store where - * the transaction is processed are registered in different countries, but in the same region. - * * **intraEEA**: The card issuer and the store where the transaction is processed are - * registered in different countries, but in the European Economic Area (EEA). * **ANY**: - * Applies to all transactions, regardless of the processing and issuing country/region. + * applies to the transaction. Possible values: * **domestic**: The card issuer and the store + * where the transaction is processed are registered in the same country. * **international**: + * The card issuer and the store where the transaction is processed are registered in + * different countries or regions. Includes all **interRegional** and **intraRegional** + * transactions. * **interRegional**: The card issuer and the store where the transaction is + * processed are registered in different regions. * **intraRegional**: The card issuer and the + * store where the transaction is processed are registered in different countries, but in the + * same region. * **intraEEA**: The card issuer and the store where the transaction is + * processed are registered in different countries, but in the European Economic Area (EEA). * + * **ANY**: Applies to all transactions, regardless of the processing and issuing + * country/region. */ @JsonProperty(JSON_PROPERTY_CARD_REGION) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -367,6 +418,62 @@ public void setCardRegion(CardRegionEnum cardRegion) { isSetCardRegion = true; // mark as set } + /** + * The card usage type condition that determines whether the split logic applies to commercial + * cards, consumer cards, or all cards. * **ANY** (default): The split logic applies to all cards, + * regardless of its usage type. * **commercial**: The split logic applies to commercial cards + * only. * **consumer**: The split logic applies to consumer cards only. + * + * @param cardUsageType The card usage type condition that determines whether the split logic + * applies to commercial cards, consumer cards, or all cards. * **ANY** (default): The split + * logic applies to all cards, regardless of its usage type. * **commercial**: The split logic + * applies to commercial cards only. * **consumer**: The split logic applies to consumer cards + * only. + * @return the current {@code SplitConfigurationRule} instance, allowing for method chaining + */ + public SplitConfigurationRule cardUsageType(CardUsageTypeEnum cardUsageType) { + this.cardUsageType = cardUsageType; + isSetCardUsageType = true; // mark as set + return this; + } + + /** + * The card usage type condition that determines whether the split logic applies to commercial + * cards, consumer cards, or all cards. * **ANY** (default): The split logic applies to all cards, + * regardless of its usage type. * **commercial**: The split logic applies to commercial cards + * only. * **consumer**: The split logic applies to consumer cards only. + * + * @return cardUsageType The card usage type condition that determines whether the split logic + * applies to commercial cards, consumer cards, or all cards. * **ANY** (default): The split + * logic applies to all cards, regardless of its usage type. * **commercial**: The split logic + * applies to commercial cards only. * **consumer**: The split logic applies to consumer cards + * only. + */ + @JsonProperty(JSON_PROPERTY_CARD_USAGE_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public CardUsageTypeEnum getCardUsageType() { + return cardUsageType; + } + + /** + * The card usage type condition that determines whether the split logic applies to commercial + * cards, consumer cards, or all cards. * **ANY** (default): The split logic applies to all cards, + * regardless of its usage type. * **commercial**: The split logic applies to commercial cards + * only. * **consumer**: The split logic applies to consumer cards only. + * + * @param cardUsageType The card usage type condition that determines whether the split logic + * applies to commercial cards, consumer cards, or all cards. * **ANY** (default): The split + * logic applies to all cards, regardless of its usage type. * **commercial**: The split logic + * applies to commercial cards only. * **consumer**: The split logic applies to consumer cards + * only. + */ + @JsonProperty(JSON_PROPERTY_CARD_USAGE_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCardUsageType(CardUsageTypeEnum cardUsageType) { + this.cardUsageType = cardUsageType; + isSetCardUsageType = true; // mark as set + } + /** * The currency condition that defines whether the split logic applies. Its value must be a * three-character [ISO currency code](https://en.wikipedia.org/wiki/ISO_4217). @@ -654,6 +761,8 @@ public boolean equals(Object o) { SplitConfigurationRule splitConfigurationRule = (SplitConfigurationRule) o; return Objects.equals(this.cardRegion, splitConfigurationRule.cardRegion) && Objects.equals(this.isSetCardRegion, splitConfigurationRule.isSetCardRegion) + && Objects.equals(this.cardUsageType, splitConfigurationRule.cardUsageType) + && Objects.equals(this.isSetCardUsageType, splitConfigurationRule.isSetCardUsageType) && Objects.equals(this.currency, splitConfigurationRule.currency) && Objects.equals(this.isSetCurrency, splitConfigurationRule.isSetCurrency) && Objects.equals(this.fundingSource, splitConfigurationRule.fundingSource) @@ -674,6 +783,8 @@ public int hashCode() { return Objects.hash( cardRegion, isSetCardRegion, + cardUsageType, + isSetCardUsageType, currency, isSetCurrency, fundingSource, @@ -693,6 +804,7 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class SplitConfigurationRule {\n"); sb.append(" cardRegion: ").append(toIndentedString(cardRegion)).append("\n"); + sb.append(" cardUsageType: ").append(toIndentedString(cardUsageType)).append("\n"); sb.append(" currency: ").append(toIndentedString(currency)).append("\n"); sb.append(" fundingSource: ").append(toIndentedString(fundingSource)).append("\n"); sb.append(" paymentMethod: ").append(toIndentedString(paymentMethod)).append("\n"); @@ -726,6 +838,9 @@ public Map getExplicitNulls() { if (isSetCardRegion) { addIfNull(nulls, JSON_PROPERTY_CARD_REGION, this.cardRegion); } + if (isSetCardUsageType) { + addIfNull(nulls, JSON_PROPERTY_CARD_USAGE_TYPE, this.cardUsageType); + } if (isSetCurrency) { addIfNull(nulls, JSON_PROPERTY_CURRENCY, this.currency); } diff --git a/src/main/java/com/adyen/model/management/Surcharge.java b/src/main/java/com/adyen/model/management/Surcharge.java index e5a6ade256..8f260245be 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 a00ab6932d..9e7e46c126 100644 --- a/src/main/java/com/adyen/model/management/TerminalSettings.java +++ b/src/main/java/com/adyen/model/management/TerminalSettings.java @@ -41,6 +41,7 @@ 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_STANDALONE, TerminalSettings.JSON_PROPERTY_STORE_AND_FORWARD, @@ -159,6 +160,13 @@ 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; @@ -862,6 +870,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 * @@ -1208,6 +1262,12 @@ 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.standalone, terminalSettings.standalone) @@ -1266,6 +1326,8 @@ public int hashCode() { isSetReceiptPrinting, refunds, isSetRefunds, + showCalculatedPercentageTippingAmount, + isSetShowCalculatedPercentageTippingAmount, signature, isSetSignature, standalone, @@ -1306,6 +1368,9 @@ 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(" standalone: ").append(toIndentedString(standalone)).append("\n"); sb.append(" storeAndForward: ").append(toIndentedString(storeAndForward)).append("\n"); @@ -1394,6 +1459,12 @@ 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); } 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 0000000000..db925d51c4 --- /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 0000000000..96772b38a3 --- /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 0000000000..d0bbe14de4 --- /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 0000000000..9fc9da5a0b --- /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 0000000000..641af0d1ab --- /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 f08b644616..7567126816 100644 --- a/src/main/java/com/adyen/model/management/UpdatePaymentMethodInfo.java +++ b/src/main/java/com/adyen/model/management/UpdatePaymentMethodInfo.java @@ -35,6 +35,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, @@ -127,6 +128,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; @@ -700,6 +707,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 * @@ -1405,6 +1447,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) @@ -1470,6 +1514,8 @@ public int hashCode() { isSetDiners, discover, isSetDiscover, + ebt, + isSetEbt, eftDirectdebitCA, isSetEftDirectdebitCA, eftposAustralia, @@ -1524,6 +1570,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"); @@ -1602,6 +1649,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); } diff --git a/src/main/java/com/adyen/model/management/UpdateSplitConfigurationRuleRequest.java b/src/main/java/com/adyen/model/management/UpdateSplitConfigurationRuleRequest.java index e6b38e9c4c..40db0b91db 100644 --- a/src/main/java/com/adyen/model/management/UpdateSplitConfigurationRuleRequest.java +++ b/src/main/java/com/adyen/model/management/UpdateSplitConfigurationRuleRequest.java @@ -12,21 +12,80 @@ 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; /** UpdateSplitConfigurationRuleRequest */ @JsonPropertyOrder({ + UpdateSplitConfigurationRuleRequest.JSON_PROPERTY_CARD_USAGE_TYPE, UpdateSplitConfigurationRuleRequest.JSON_PROPERTY_CURRENCY, UpdateSplitConfigurationRuleRequest.JSON_PROPERTY_FUNDING_SOURCE, UpdateSplitConfigurationRuleRequest.JSON_PROPERTY_PAYMENT_METHOD, UpdateSplitConfigurationRuleRequest.JSON_PROPERTY_SHOPPER_INTERACTION }) public class UpdateSplitConfigurationRuleRequest { + /** + * The card usage type condition that determines whether the split logic applies to commercial + * cards, consumer cards, or all cards. * **ANY** (default): The split logic applies to all cards, + * regardless of its usage type. * **commercial**: The split logic applies to commercial cards + * only. * **consumer**: The split logic applies to consumer cards only. + */ + public enum CardUsageTypeEnum { + COMMERCIAL(String.valueOf("commercial")), + + CONSUMER(String.valueOf("consumer")), + + ANY(String.valueOf("ANY")); + + private static final Logger LOG = Logger.getLogger(CardUsageTypeEnum.class.getName()); + + private String value; + + CardUsageTypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static CardUsageTypeEnum fromValue(String value) { + for (CardUsageTypeEnum b : CardUsageTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + // handling unexpected value + LOG.warning( + "CardUsageTypeEnum: unexpected enum value '" + + value + + "' - Supported values are " + + Arrays.toString(CardUsageTypeEnum.values())); + return null; + } + } + + public static final String JSON_PROPERTY_CARD_USAGE_TYPE = "cardUsageType"; + private CardUsageTypeEnum cardUsageType; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetCardUsageType = false; + public static final String JSON_PROPERTY_CURRENCY = "currency"; private String currency; @@ -59,6 +118,63 @@ public class UpdateSplitConfigurationRuleRequest { public UpdateSplitConfigurationRuleRequest() {} + /** + * The card usage type condition that determines whether the split logic applies to commercial + * cards, consumer cards, or all cards. * **ANY** (default): The split logic applies to all cards, + * regardless of its usage type. * **commercial**: The split logic applies to commercial cards + * only. * **consumer**: The split logic applies to consumer cards only. + * + * @param cardUsageType The card usage type condition that determines whether the split logic + * applies to commercial cards, consumer cards, or all cards. * **ANY** (default): The split + * logic applies to all cards, regardless of its usage type. * **commercial**: The split logic + * applies to commercial cards only. * **consumer**: The split logic applies to consumer cards + * only. + * @return the current {@code UpdateSplitConfigurationRuleRequest} instance, allowing for method + * chaining + */ + public UpdateSplitConfigurationRuleRequest cardUsageType(CardUsageTypeEnum cardUsageType) { + this.cardUsageType = cardUsageType; + isSetCardUsageType = true; // mark as set + return this; + } + + /** + * The card usage type condition that determines whether the split logic applies to commercial + * cards, consumer cards, or all cards. * **ANY** (default): The split logic applies to all cards, + * regardless of its usage type. * **commercial**: The split logic applies to commercial cards + * only. * **consumer**: The split logic applies to consumer cards only. + * + * @return cardUsageType The card usage type condition that determines whether the split logic + * applies to commercial cards, consumer cards, or all cards. * **ANY** (default): The split + * logic applies to all cards, regardless of its usage type. * **commercial**: The split logic + * applies to commercial cards only. * **consumer**: The split logic applies to consumer cards + * only. + */ + @JsonProperty(JSON_PROPERTY_CARD_USAGE_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public CardUsageTypeEnum getCardUsageType() { + return cardUsageType; + } + + /** + * The card usage type condition that determines whether the split logic applies to commercial + * cards, consumer cards, or all cards. * **ANY** (default): The split logic applies to all cards, + * regardless of its usage type. * **commercial**: The split logic applies to commercial cards + * only. * **consumer**: The split logic applies to consumer cards only. + * + * @param cardUsageType The card usage type condition that determines whether the split logic + * applies to commercial cards, consumer cards, or all cards. * **ANY** (default): The split + * logic applies to all cards, regardless of its usage type. * **commercial**: The split logic + * applies to commercial cards only. * **consumer**: The split logic applies to consumer cards + * only. + */ + @JsonProperty(JSON_PROPERTY_CARD_USAGE_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCardUsageType(CardUsageTypeEnum cardUsageType) { + this.cardUsageType = cardUsageType; + isSetCardUsageType = true; // mark as set + } + /** * The currency condition that defines whether the split logic applies. Its value must be a * three-character [ISO currency code](https://en.wikipedia.org/wiki/ISO_4217). @@ -303,7 +419,10 @@ public boolean equals(Object o) { } UpdateSplitConfigurationRuleRequest updateSplitConfigurationRuleRequest = (UpdateSplitConfigurationRuleRequest) o; - return Objects.equals(this.currency, updateSplitConfigurationRuleRequest.currency) + return Objects.equals(this.cardUsageType, updateSplitConfigurationRuleRequest.cardUsageType) + && Objects.equals( + this.isSetCardUsageType, updateSplitConfigurationRuleRequest.isSetCardUsageType) + && Objects.equals(this.currency, updateSplitConfigurationRuleRequest.currency) && Objects.equals(this.isSetCurrency, updateSplitConfigurationRuleRequest.isSetCurrency) && Objects.equals(this.fundingSource, updateSplitConfigurationRuleRequest.fundingSource) && Objects.equals( @@ -321,6 +440,8 @@ public boolean equals(Object o) { @Override public int hashCode() { return Objects.hash( + cardUsageType, + isSetCardUsageType, currency, isSetCurrency, fundingSource, @@ -335,6 +456,7 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class UpdateSplitConfigurationRuleRequest {\n"); + sb.append(" cardUsageType: ").append(toIndentedString(cardUsageType)).append("\n"); sb.append(" currency: ").append(toIndentedString(currency)).append("\n"); sb.append(" fundingSource: ").append(toIndentedString(fundingSource)).append("\n"); sb.append(" paymentMethod: ").append(toIndentedString(paymentMethod)).append("\n"); @@ -363,6 +485,9 @@ public Map getExplicitNulls() { Map nulls = new HashMap<>(); + if (isSetCardUsageType) { + addIfNull(nulls, JSON_PROPERTY_CARD_USAGE_TYPE, this.cardUsageType); + } if (isSetCurrency) { addIfNull(nulls, JSON_PROPERTY_CURRENCY, this.currency); } 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 0000000000..1092374289 --- /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 865037595a..0ee916e0d6 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 f69042da14..56feba340a 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 02409dfe43..a9ff3c8f78 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 0000000000..860122dfea --- /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 0000000000..9bc0c61e74 --- /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 0000000000..56daa90ef7 --- /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 0000000000..5a35161ee2 --- /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 0000000000..c2dc85697a --- /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); + } +}