From 8b6a94e1cbf7740ecb2ef6d1a68ccada0dbb1fb7 Mon Sep 17 00:00:00 2001 From: AdyenAutomationBot <38424300+AdyenAutomationBot@users.noreply.github.com> Date: Wed, 28 Jan 2026 12:57:53 +0000 Subject: [PATCH] [management] Automated update from Adyen/adyen-openapi@87ad29a --- .../model/management/ForceRebootDetails.java | 228 ++++++++++++++ .../adyen/model/management/InstalledAPKs.java | 280 ++++++++++++++++++ .../management/LocalShopperStatement.java | 229 ++++++++++++++ .../management/LocalizedInformation.java | 200 +++++++++++++ .../java/com/adyen/model/management/Moto.java | 56 +--- .../com/adyen/model/management/Payment.java | 36 ++- .../management/PaymentMethodResponse.java | 2 + .../management/PaymentMethodSetupInfo.java | 2 + ...leTerminalActionsRequestActionDetails.java | 66 ++++- .../com/adyen/model/management/Store.java | 52 ++++ .../management/StoreCreationRequest.java | 53 ++++ .../StoreCreationWithMerchantCodeRequest.java | 57 ++++ .../com/adyen/model/management/Terminal.java | 60 ++++ 13 files changed, 1247 insertions(+), 74 deletions(-) create mode 100644 src/main/java/com/adyen/model/management/ForceRebootDetails.java create mode 100644 src/main/java/com/adyen/model/management/InstalledAPKs.java create mode 100644 src/main/java/com/adyen/model/management/LocalShopperStatement.java create mode 100644 src/main/java/com/adyen/model/management/LocalizedInformation.java diff --git a/src/main/java/com/adyen/model/management/ForceRebootDetails.java b/src/main/java/com/adyen/model/management/ForceRebootDetails.java new file mode 100644 index 000000000..2bd374040 --- /dev/null +++ b/src/main/java/com/adyen/model/management/ForceRebootDetails.java @@ -0,0 +1,228 @@ +/* + * 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; + +/** ForceRebootDetails */ +@JsonPropertyOrder({ForceRebootDetails.JSON_PROPERTY_TYPE}) +public class ForceRebootDetails { + /** + * The type of terminal action. The value **ForceReboot** triggers an immediate reboot of the + * specified terminal(s). + */ + public enum TypeEnum { + FORCEREBOOT(String.valueOf("ForceReboot")); + + private static final Logger LOG = Logger.getLogger(TypeEnum.class.getName()); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + // handling unexpected value + LOG.warning( + "TypeEnum: unexpected enum value '" + + value + + "' - Supported values are " + + Arrays.toString(TypeEnum.values())); + return null; + } + } + + public static final String JSON_PROPERTY_TYPE = "type"; + private TypeEnum type; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetType = false; + + /** + * Sets whether attributes with null values should be explicitly included in the JSON payload. + * Default is false. + */ + @JsonIgnore private boolean includeNullValues = false; + + public ForceRebootDetails() {} + + /** + * The type of terminal action. The value **ForceReboot** triggers an immediate reboot of the + * specified terminal(s). + * + * @param type The type of terminal action. The value **ForceReboot** triggers an immediate reboot + * of the specified terminal(s). + * @return the current {@code ForceRebootDetails} instance, allowing for method chaining + */ + public ForceRebootDetails type(TypeEnum type) { + this.type = type; + isSetType = true; // mark as set + return this; + } + + /** + * The type of terminal action. The value **ForceReboot** triggers an immediate reboot of the + * specified terminal(s). + * + * @return type The type of terminal action. The value **ForceReboot** triggers an immediate + * reboot of the specified terminal(s). + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public TypeEnum getType() { + return type; + } + + /** + * The type of terminal action. The value **ForceReboot** triggers an immediate reboot of the + * specified terminal(s). + * + * @param type The type of terminal action. The value **ForceReboot** triggers an immediate reboot + * of the specified terminal(s). + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setType(TypeEnum type) { + this.type = type; + isSetType = true; // mark as set + } + + /** + * Configures whether null values are explicitly serialized in the JSON payload. Default is false. + */ + public ForceRebootDetails 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 ForceRebootDetails object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ForceRebootDetails forceRebootDetails = (ForceRebootDetails) o; + return Objects.equals(this.type, forceRebootDetails.type) + && Objects.equals(this.isSetType, forceRebootDetails.isSetType); + } + + @Override + public int hashCode() { + return Objects.hash(type, isSetType); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ForceRebootDetails {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** 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 (isSetType) { + addIfNull(nulls, JSON_PROPERTY_TYPE, this.type); + } + + 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 ForceRebootDetails given an JSON string + * + * @param jsonString JSON string + * @return An instance of ForceRebootDetails + * @throws JsonProcessingException if the JSON string is invalid with respect to + * ForceRebootDetails + */ + public static ForceRebootDetails fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, ForceRebootDetails.class); + } + + /** + * Convert an instance of ForceRebootDetails 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/InstalledAPKs.java b/src/main/java/com/adyen/model/management/InstalledAPKs.java new file mode 100644 index 000000000..27ad0439c --- /dev/null +++ b/src/main/java/com/adyen/model/management/InstalledAPKs.java @@ -0,0 +1,280 @@ +/* + * 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.time.OffsetDateTime; +import java.util.*; + +/** InstalledAPKs */ +@JsonPropertyOrder({ + InstalledAPKs.JSON_PROPERTY_CONFIRMATION_DATE, + InstalledAPKs.JSON_PROPERTY_PACKAGE_NAME, + InstalledAPKs.JSON_PROPERTY_VERSION_NAME +}) +public class InstalledAPKs { + public static final String JSON_PROPERTY_CONFIRMATION_DATE = "confirmationDate"; + private OffsetDateTime confirmationDate; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetConfirmationDate = false; + + public static final String JSON_PROPERTY_PACKAGE_NAME = "packageName"; + private String packageName; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetPackageName = false; + + public static final String JSON_PROPERTY_VERSION_NAME = "versionName"; + private String versionName; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetVersionName = false; + + /** + * Sets whether attributes with null values should be explicitly included in the JSON payload. + * Default is false. + */ + @JsonIgnore private boolean includeNullValues = false; + + public InstalledAPKs() {} + + /** + * The date and time when the app was installed. + * + * @param confirmationDate The date and time when the app was installed. + * @return the current {@code InstalledAPKs} instance, allowing for method chaining + */ + public InstalledAPKs confirmationDate(OffsetDateTime confirmationDate) { + this.confirmationDate = confirmationDate; + isSetConfirmationDate = true; // mark as set + return this; + } + + /** + * The date and time when the app was installed. + * + * @return confirmationDate The date and time when the app was installed. + */ + @JsonProperty(JSON_PROPERTY_CONFIRMATION_DATE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getConfirmationDate() { + return confirmationDate; + } + + /** + * The date and time when the app was installed. + * + * @param confirmationDate The date and time when the app was installed. + */ + @JsonProperty(JSON_PROPERTY_CONFIRMATION_DATE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setConfirmationDate(OffsetDateTime confirmationDate) { + this.confirmationDate = confirmationDate; + isSetConfirmationDate = true; // mark as set + } + + /** + * The package name of the app. + * + * @param packageName The package name of the app. + * @return the current {@code InstalledAPKs} instance, allowing for method chaining + */ + public InstalledAPKs packageName(String packageName) { + this.packageName = packageName; + isSetPackageName = true; // mark as set + return this; + } + + /** + * The package name of the app. + * + * @return packageName The package name of the app. + */ + @JsonProperty(JSON_PROPERTY_PACKAGE_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getPackageName() { + return packageName; + } + + /** + * The package name of the app. + * + * @param packageName The package name of the app. + */ + @JsonProperty(JSON_PROPERTY_PACKAGE_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPackageName(String packageName) { + this.packageName = packageName; + isSetPackageName = true; // mark as set + } + + /** + * The version name of the app. + * + * @param versionName The version name of the app. + * @return the current {@code InstalledAPKs} instance, allowing for method chaining + */ + public InstalledAPKs versionName(String versionName) { + this.versionName = versionName; + isSetVersionName = true; // mark as set + return this; + } + + /** + * The version name of the app. + * + * @return versionName The version name of the app. + */ + @JsonProperty(JSON_PROPERTY_VERSION_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getVersionName() { + return versionName; + } + + /** + * The version name of the app. + * + * @param versionName The version name of the app. + */ + @JsonProperty(JSON_PROPERTY_VERSION_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setVersionName(String versionName) { + this.versionName = versionName; + isSetVersionName = true; // mark as set + } + + /** + * Configures whether null values are explicitly serialized in the JSON payload. Default is false. + */ + public InstalledAPKs 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 InstalledAPKs object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + InstalledAPKs installedAPKs = (InstalledAPKs) o; + return Objects.equals(this.confirmationDate, installedAPKs.confirmationDate) + && Objects.equals(this.isSetConfirmationDate, installedAPKs.isSetConfirmationDate) + && Objects.equals(this.packageName, installedAPKs.packageName) + && Objects.equals(this.isSetPackageName, installedAPKs.isSetPackageName) + && Objects.equals(this.versionName, installedAPKs.versionName) + && Objects.equals(this.isSetVersionName, installedAPKs.isSetVersionName); + } + + @Override + public int hashCode() { + return Objects.hash( + confirmationDate, + isSetConfirmationDate, + packageName, + isSetPackageName, + versionName, + isSetVersionName); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class InstalledAPKs {\n"); + sb.append(" confirmationDate: ").append(toIndentedString(confirmationDate)).append("\n"); + sb.append(" packageName: ").append(toIndentedString(packageName)).append("\n"); + sb.append(" versionName: ").append(toIndentedString(versionName)).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 (isSetConfirmationDate) { + addIfNull(nulls, JSON_PROPERTY_CONFIRMATION_DATE, this.confirmationDate); + } + if (isSetPackageName) { + addIfNull(nulls, JSON_PROPERTY_PACKAGE_NAME, this.packageName); + } + if (isSetVersionName) { + addIfNull(nulls, JSON_PROPERTY_VERSION_NAME, this.versionName); + } + + 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 InstalledAPKs given an JSON string + * + * @param jsonString JSON string + * @return An instance of InstalledAPKs + * @throws JsonProcessingException if the JSON string is invalid with respect to InstalledAPKs + */ + public static InstalledAPKs fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, InstalledAPKs.class); + } + + /** + * Convert an instance of InstalledAPKs to an JSON string + * + * @return JSON string + */ + public String toJson() throws JsonProcessingException { + return JSON.getMapper().writeValueAsString(this); + } +} diff --git a/src/main/java/com/adyen/model/management/LocalShopperStatement.java b/src/main/java/com/adyen/model/management/LocalShopperStatement.java new file mode 100644 index 000000000..acfe4cd97 --- /dev/null +++ b/src/main/java/com/adyen/model/management/LocalShopperStatement.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.*; + +/** LocalShopperStatement */ +@JsonPropertyOrder({ + LocalShopperStatement.JSON_PROPERTY_SCRIPT, + LocalShopperStatement.JSON_PROPERTY_VALUE +}) +public class LocalShopperStatement { + public static final String JSON_PROPERTY_SCRIPT = "script"; + private String script; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetScript = false; + + public static final String JSON_PROPERTY_VALUE = "value"; + private String value; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetValue = false; + + /** + * Sets whether attributes with null values should be explicitly included in the JSON payload. + * Default is false. + */ + @JsonIgnore private boolean includeNullValues = false; + + public LocalShopperStatement() {} + + /** + * The character set of the local shopper statement. Possible values: **ja-Hani**, **ja-Kana**. + * + * @param script The character set of the local shopper statement. Possible values: **ja-Hani**, + * **ja-Kana**. + * @return the current {@code LocalShopperStatement} instance, allowing for method chaining + */ + public LocalShopperStatement script(String script) { + this.script = script; + isSetScript = true; // mark as set + return this; + } + + /** + * The character set of the local shopper statement. Possible values: **ja-Hani**, **ja-Kana**. + * + * @return script The character set of the local shopper statement. Possible values: **ja-Hani**, + * **ja-Kana**. + */ + @JsonProperty(JSON_PROPERTY_SCRIPT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getScript() { + return script; + } + + /** + * The character set of the local shopper statement. Possible values: **ja-Hani**, **ja-Kana**. + * + * @param script The character set of the local shopper statement. Possible values: **ja-Hani**, + * **ja-Kana**. + */ + @JsonProperty(JSON_PROPERTY_SCRIPT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setScript(String script) { + this.script = script; + isSetScript = true; // mark as set + } + + /** + * The text of the local shopper statement in the specified character set. + * + * @param value The text of the local shopper statement in the specified character set. + * @return the current {@code LocalShopperStatement} instance, allowing for method chaining + */ + public LocalShopperStatement value(String value) { + this.value = value; + isSetValue = true; // mark as set + return this; + } + + /** + * The text of the local shopper statement in the specified character set. + * + * @return value The text of the local shopper statement in the specified character set. + */ + @JsonProperty(JSON_PROPERTY_VALUE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getValue() { + return value; + } + + /** + * The text of the local shopper statement in the specified character set. + * + * @param value The text of the local shopper statement in the specified character set. + */ + @JsonProperty(JSON_PROPERTY_VALUE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setValue(String value) { + this.value = value; + isSetValue = true; // mark as set + } + + /** + * Configures whether null values are explicitly serialized in the JSON payload. Default is false. + */ + public LocalShopperStatement 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 LocalShopperStatement object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LocalShopperStatement localShopperStatement = (LocalShopperStatement) o; + return Objects.equals(this.script, localShopperStatement.script) + && Objects.equals(this.isSetScript, localShopperStatement.isSetScript) + && Objects.equals(this.value, localShopperStatement.value) + && Objects.equals(this.isSetValue, localShopperStatement.isSetValue); + } + + @Override + public int hashCode() { + return Objects.hash(script, isSetScript, value, isSetValue); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LocalShopperStatement {\n"); + sb.append(" script: ").append(toIndentedString(script)).append("\n"); + sb.append(" value: ").append(toIndentedString(value)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** Returns a map of properties to be merged into the JSON payload as explicit null values. */ + @JsonInclude(JsonInclude.Include.ALWAYS) + @JsonAnyGetter + public Map getExplicitNulls() { + if (!this.includeNullValues) { + return Collections.emptyMap(); + } + + Map nulls = new HashMap<>(); + + if (isSetScript) { + addIfNull(nulls, JSON_PROPERTY_SCRIPT, this.script); + } + if (isSetValue) { + addIfNull(nulls, JSON_PROPERTY_VALUE, this.value); + } + + return nulls; + } + + // add to map when value is null + private void addIfNull(Map map, String key, Object value) { + if (value == null) { + map.put(key, null); + } + } + + /** + * Create an instance of LocalShopperStatement given an JSON string + * + * @param jsonString JSON string + * @return An instance of LocalShopperStatement + * @throws JsonProcessingException if the JSON string is invalid with respect to + * LocalShopperStatement + */ + public static LocalShopperStatement fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, LocalShopperStatement.class); + } + + /** + * Convert an instance of LocalShopperStatement to an JSON string + * + * @return JSON string + */ + public String toJson() throws JsonProcessingException { + return JSON.getMapper().writeValueAsString(this); + } +} diff --git a/src/main/java/com/adyen/model/management/LocalizedInformation.java b/src/main/java/com/adyen/model/management/LocalizedInformation.java new file mode 100644 index 000000000..b5820df6f --- /dev/null +++ b/src/main/java/com/adyen/model/management/LocalizedInformation.java @@ -0,0 +1,200 @@ +/* + * 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; + +/** LocalizedInformation */ +@JsonPropertyOrder({LocalizedInformation.JSON_PROPERTY_LOCAL_SHOPPER_STATEMENT}) +public class LocalizedInformation { + public static final String JSON_PROPERTY_LOCAL_SHOPPER_STATEMENT = "localShopperStatement"; + private List localShopperStatement; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetLocalShopperStatement = false; + + /** + * Sets whether attributes with null values should be explicitly included in the JSON payload. + * Default is false. + */ + @JsonIgnore private boolean includeNullValues = false; + + public LocalizedInformation() {} + + /** + * An array of local shopper statements. Card schemes use this in the bank statement. For Japan + * local shopper statements in both ja-Hani and ja-Kana are required. + * + * @param localShopperStatement An array of local shopper statements. Card schemes use this in the + * bank statement. For Japan local shopper statements in both ja-Hani and ja-Kana are + * required. + * @return the current {@code LocalizedInformation} instance, allowing for method chaining + */ + public LocalizedInformation localShopperStatement( + List localShopperStatement) { + this.localShopperStatement = localShopperStatement; + isSetLocalShopperStatement = true; // mark as set + return this; + } + + public LocalizedInformation addLocalShopperStatementItem( + LocalShopperStatement localShopperStatementItem) { + if (this.localShopperStatement == null) { + this.localShopperStatement = new ArrayList<>(); + } + this.localShopperStatement.add(localShopperStatementItem); + return this; + } + + /** + * An array of local shopper statements. Card schemes use this in the bank statement. For Japan + * local shopper statements in both ja-Hani and ja-Kana are required. + * + * @return localShopperStatement An array of local shopper statements. Card schemes use this in + * the bank statement. For Japan local shopper statements in both ja-Hani and ja-Kana are + * required. + */ + @JsonProperty(JSON_PROPERTY_LOCAL_SHOPPER_STATEMENT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getLocalShopperStatement() { + return localShopperStatement; + } + + /** + * An array of local shopper statements. Card schemes use this in the bank statement. For Japan + * local shopper statements in both ja-Hani and ja-Kana are required. + * + * @param localShopperStatement An array of local shopper statements. Card schemes use this in the + * bank statement. For Japan local shopper statements in both ja-Hani and ja-Kana are + * required. + */ + @JsonProperty(JSON_PROPERTY_LOCAL_SHOPPER_STATEMENT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setLocalShopperStatement(List localShopperStatement) { + this.localShopperStatement = localShopperStatement; + isSetLocalShopperStatement = true; // mark as set + } + + /** + * Configures whether null values are explicitly serialized in the JSON payload. Default is false. + */ + public LocalizedInformation 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 LocalizedInformation object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LocalizedInformation localizedInformation = (LocalizedInformation) o; + return Objects.equals(this.localShopperStatement, localizedInformation.localShopperStatement) + && Objects.equals( + this.isSetLocalShopperStatement, localizedInformation.isSetLocalShopperStatement); + } + + @Override + public int hashCode() { + return Objects.hash(localShopperStatement, isSetLocalShopperStatement); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LocalizedInformation {\n"); + sb.append(" localShopperStatement: ") + .append(toIndentedString(localShopperStatement)) + .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 (isSetLocalShopperStatement) { + addIfNull(nulls, JSON_PROPERTY_LOCAL_SHOPPER_STATEMENT, this.localShopperStatement); + } + + 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 LocalizedInformation given an JSON string + * + * @param jsonString JSON string + * @return An instance of LocalizedInformation + * @throws JsonProcessingException if the JSON string is invalid with respect to + * LocalizedInformation + */ + public static LocalizedInformation fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, LocalizedInformation.class); + } + + /** + * Convert an instance of LocalizedInformation 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/Moto.java b/src/main/java/com/adyen/model/management/Moto.java index 27b27e585..208d44d96 100644 --- a/src/main/java/com/adyen/model/management/Moto.java +++ b/src/main/java/com/adyen/model/management/Moto.java @@ -20,11 +20,7 @@ import java.util.*; /** Moto */ -@JsonPropertyOrder({ - Moto.JSON_PROPERTY_ENABLE_MOTO, - Moto.JSON_PROPERTY_ENABLE_REFUNDS, - Moto.JSON_PROPERTY_MAX_AMOUNT -}) +@JsonPropertyOrder({Moto.JSON_PROPERTY_ENABLE_MOTO, Moto.JSON_PROPERTY_MAX_AMOUNT}) public class Moto { public static final String JSON_PROPERTY_ENABLE_MOTO = "enableMoto"; private Boolean enableMoto; @@ -32,12 +28,6 @@ public class Moto { /** Mark when the attribute has been explicitly set. */ private boolean isSetEnableMoto = false; - public static final String JSON_PROPERTY_ENABLE_REFUNDS = "enableRefunds"; - private Boolean enableRefunds; - - /** Mark when the attribute has been explicitly set. */ - private boolean isSetEnableRefunds = false; - public static final String JSON_PROPERTY_MAX_AMOUNT = "maxAmount"; private Integer maxAmount; @@ -87,41 +77,6 @@ public void setEnableMoto(Boolean enableMoto) { isSetEnableMoto = true; // mark as set } - /** - * Enable MOTO refunds. - * - * @param enableRefunds Enable MOTO refunds. - * @return the current {@code Moto} instance, allowing for method chaining - */ - public Moto enableRefunds(Boolean enableRefunds) { - this.enableRefunds = enableRefunds; - isSetEnableRefunds = true; // mark as set - return this; - } - - /** - * Enable MOTO refunds. - * - * @return enableRefunds Enable MOTO refunds. - */ - @JsonProperty(JSON_PROPERTY_ENABLE_REFUNDS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getEnableRefunds() { - return enableRefunds; - } - - /** - * Enable MOTO refunds. - * - * @param enableRefunds Enable MOTO refunds. - */ - @JsonProperty(JSON_PROPERTY_ENABLE_REFUNDS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setEnableRefunds(Boolean enableRefunds) { - this.enableRefunds = enableRefunds; - isSetEnableRefunds = true; // mark as set - } - /** * The maximum amount for MOTO transactions. You need to set the currency for this amount using * the @@ -207,16 +162,13 @@ public boolean equals(Object o) { Moto moto = (Moto) o; return Objects.equals(this.enableMoto, moto.enableMoto) && Objects.equals(this.isSetEnableMoto, moto.isSetEnableMoto) - && Objects.equals(this.enableRefunds, moto.enableRefunds) - && Objects.equals(this.isSetEnableRefunds, moto.isSetEnableRefunds) && Objects.equals(this.maxAmount, moto.maxAmount) && Objects.equals(this.isSetMaxAmount, moto.isSetMaxAmount); } @Override public int hashCode() { - return Objects.hash( - enableMoto, isSetEnableMoto, enableRefunds, isSetEnableRefunds, maxAmount, isSetMaxAmount); + return Objects.hash(enableMoto, isSetEnableMoto, maxAmount, isSetMaxAmount); } @Override @@ -224,7 +176,6 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Moto {\n"); sb.append(" enableMoto: ").append(toIndentedString(enableMoto)).append("\n"); - sb.append(" enableRefunds: ").append(toIndentedString(enableRefunds)).append("\n"); sb.append(" maxAmount: ").append(toIndentedString(maxAmount)).append("\n"); sb.append("}"); return sb.toString(); @@ -253,9 +204,6 @@ public Map getExplicitNulls() { if (isSetEnableMoto) { addIfNull(nulls, JSON_PROPERTY_ENABLE_MOTO, this.enableMoto); } - if (isSetEnableRefunds) { - addIfNull(nulls, JSON_PROPERTY_ENABLE_REFUNDS, this.enableRefunds); - } if (isSetMaxAmount) { addIfNull(nulls, JSON_PROPERTY_MAX_AMOUNT, this.maxAmount); } diff --git a/src/main/java/com/adyen/model/management/Payment.java b/src/main/java/com/adyen/model/management/Payment.java index 02ac77659..67c707189 100644 --- a/src/main/java/com/adyen/model/management/Payment.java +++ b/src/main/java/com/adyen/model/management/Payment.java @@ -49,12 +49,16 @@ public class Payment { public Payment() {} /** - * The default currency for contactless payments on the payment terminal, as the three-letter [ISO - * 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code. + * The default currency for contactless payments on the payment terminal, in three-letter [ISO + * 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code format. Contact Adyen before you + * update this setting for the first time. To enable you to change the contactless currency, we + * first need to check if you meet the compliance requirements. * * @param contactlessCurrency The default currency for contactless payments on the payment - * terminal, as the three-letter [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency - * code. + * terminal, in three-letter [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code + * format. Contact Adyen before you update this setting for the first time. To enable you to + * change the contactless currency, we first need to check if you meet the compliance + * requirements. * @return the current {@code Payment} instance, allowing for method chaining */ public Payment contactlessCurrency(String contactlessCurrency) { @@ -64,12 +68,16 @@ public Payment contactlessCurrency(String contactlessCurrency) { } /** - * The default currency for contactless payments on the payment terminal, as the three-letter [ISO - * 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code. + * The default currency for contactless payments on the payment terminal, in three-letter [ISO + * 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code format. Contact Adyen before you + * update this setting for the first time. To enable you to change the contactless currency, we + * first need to check if you meet the compliance requirements. * * @return contactlessCurrency The default currency for contactless payments on the payment - * terminal, as the three-letter [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency - * code. + * terminal, in three-letter [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code + * format. Contact Adyen before you update this setting for the first time. To enable you to + * change the contactless currency, we first need to check if you meet the compliance + * requirements. */ @JsonProperty(JSON_PROPERTY_CONTACTLESS_CURRENCY) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -78,12 +86,16 @@ public String getContactlessCurrency() { } /** - * The default currency for contactless payments on the payment terminal, as the three-letter [ISO - * 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code. + * The default currency for contactless payments on the payment terminal, in three-letter [ISO + * 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code format. Contact Adyen before you + * update this setting for the first time. To enable you to change the contactless currency, we + * first need to check if you meet the compliance requirements. * * @param contactlessCurrency The default currency for contactless payments on the payment - * terminal, as the three-letter [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency - * code. + * terminal, in three-letter [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code + * format. Contact Adyen before you update this setting for the first time. To enable you to + * change the contactless currency, we first need to check if you meet the compliance + * requirements. */ @JsonProperty(JSON_PROPERTY_CONTACTLESS_CURRENCY) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) diff --git a/src/main/java/com/adyen/model/management/PaymentMethodResponse.java b/src/main/java/com/adyen/model/management/PaymentMethodResponse.java index 39057ab7c..ac0d52891 100644 --- a/src/main/java/com/adyen/model/management/PaymentMethodResponse.java +++ b/src/main/java/com/adyen/model/management/PaymentMethodResponse.java @@ -108,6 +108,8 @@ public enum TypesWithErrorsEnum { BLIK(String.valueOf("blik")), + BLIK_POS(String.valueOf("blik_pos")), + BR_SCHEMES(String.valueOf("br_schemes")), CARTEBANCAIRE(String.valueOf("cartebancaire")), diff --git a/src/main/java/com/adyen/model/management/PaymentMethodSetupInfo.java b/src/main/java/com/adyen/model/management/PaymentMethodSetupInfo.java index 151a3b89f..96f81da91 100644 --- a/src/main/java/com/adyen/model/management/PaymentMethodSetupInfo.java +++ b/src/main/java/com/adyen/model/management/PaymentMethodSetupInfo.java @@ -459,6 +459,8 @@ public enum TypeEnum { BLIK(String.valueOf("blik")), + BLIK_POS(String.valueOf("blik_pos")), + BR_SCHEMES(String.valueOf("br_schemes")), CARTEBANCAIRE(String.valueOf("cartebancaire")), diff --git a/src/main/java/com/adyen/model/management/ScheduleTerminalActionsRequestActionDetails.java b/src/main/java/com/adyen/model/management/ScheduleTerminalActionsRequestActionDetails.java index 94436e76c..3381a85ad 100644 --- a/src/main/java/com/adyen/model/management/ScheduleTerminalActionsRequestActionDetails.java +++ b/src/main/java/com/adyen/model/management/ScheduleTerminalActionsRequestActionDetails.java @@ -84,6 +84,32 @@ public ScheduleTerminalActionsRequestActionDetails deserialize( boolean typeCoercion = ctxt.isEnabled(MapperFeature.ALLOW_COERCION_OF_SCALARS); int match = 0; JsonToken token = tree.traverse(jp.getCodec()).nextToken(); + // deserialize ForceRebootDetails + try { + boolean attemptParsing = true; + if (attemptParsing) { + // Checks if the unique type of the oneOf json matches any of the object TypeEnum values + boolean typeMatch = false; + if (tree.findValue("type") != null) { + typeMatch = + Arrays.stream(ForceRebootDetails.TypeEnum.values()) + .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText())); + } + + if (typeMatch) { + deserialized = tree.traverse(jp.getCodec()).readValueAs(ForceRebootDetails.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + match++; + log.log(Level.FINER, "Input data matches schema 'ForceRebootDetails'"); + } + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'ForceRebootDetails'", e); + } + // deserialize InstallAndroidAppDetails try { boolean attemptParsing = true; @@ -249,6 +275,11 @@ public ScheduleTerminalActionsRequestActionDetails() { super("oneOf", Boolean.FALSE); } + public ScheduleTerminalActionsRequestActionDetails(ForceRebootDetails o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + public ScheduleTerminalActionsRequestActionDetails(InstallAndroidAppDetails o) { super("oneOf", Boolean.FALSE); setActualInstance(o); @@ -275,6 +306,7 @@ public ScheduleTerminalActionsRequestActionDetails(UninstallAndroidCertificateDe } static { + schemas.put("ForceRebootDetails", new GenericType() {}); schemas.put("InstallAndroidAppDetails", new GenericType() {}); schemas.put( "InstallAndroidCertificateDetails", new GenericType() {}); @@ -294,14 +326,20 @@ public Map> getSchemas() { /** * Set the instance that matches the oneOf child schema, check the instance parameter is valid - * against the oneOf child schemas: InstallAndroidAppDetails, InstallAndroidCertificateDetails, - * ReleaseUpdateDetails, UninstallAndroidAppDetails, UninstallAndroidCertificateDetails + * against the oneOf child schemas: ForceRebootDetails, InstallAndroidAppDetails, + * InstallAndroidCertificateDetails, ReleaseUpdateDetails, UninstallAndroidAppDetails, + * UninstallAndroidCertificateDetails * *

It could be an instance of the 'oneOf' schemas. The oneOf child schemas may themselves be a * composed schema (allOf, anyOf, oneOf). */ @Override public void setActualInstance(Object instance) { + if (JSON.isInstanceOf(ForceRebootDetails.class, instance, new HashSet<>())) { + super.setActualInstance(instance); + return; + } + if (JSON.isInstanceOf(InstallAndroidAppDetails.class, instance, new HashSet<>())) { super.setActualInstance(instance); return; @@ -328,22 +366,34 @@ public void setActualInstance(Object instance) { } throw new RuntimeException( - "Invalid instance type. Must be InstallAndroidAppDetails, InstallAndroidCertificateDetails, ReleaseUpdateDetails, UninstallAndroidAppDetails, UninstallAndroidCertificateDetails"); + "Invalid instance type. Must be ForceRebootDetails, InstallAndroidAppDetails, InstallAndroidCertificateDetails, ReleaseUpdateDetails, UninstallAndroidAppDetails, UninstallAndroidCertificateDetails"); } /** - * Get the actual instance, which can be the following: InstallAndroidAppDetails, - * InstallAndroidCertificateDetails, ReleaseUpdateDetails, UninstallAndroidAppDetails, - * UninstallAndroidCertificateDetails + * Get the actual instance, which can be the following: ForceRebootDetails, + * InstallAndroidAppDetails, InstallAndroidCertificateDetails, ReleaseUpdateDetails, + * UninstallAndroidAppDetails, UninstallAndroidCertificateDetails * - * @return The actual instance (InstallAndroidAppDetails, InstallAndroidCertificateDetails, - * ReleaseUpdateDetails, UninstallAndroidAppDetails, UninstallAndroidCertificateDetails) + * @return The actual instance (ForceRebootDetails, InstallAndroidAppDetails, + * InstallAndroidCertificateDetails, ReleaseUpdateDetails, UninstallAndroidAppDetails, + * UninstallAndroidCertificateDetails) */ @Override public Object getActualInstance() { return super.getActualInstance(); } + /** + * Get the actual instance of `ForceRebootDetails`. If the actual instance is not + * `ForceRebootDetails`, the ClassCastException will be thrown. + * + * @return The actual instance of `ForceRebootDetails` + * @throws ClassCastException if the instance is not `ForceRebootDetails` + */ + public ForceRebootDetails getForceRebootDetails() throws ClassCastException { + return (ForceRebootDetails) super.getActualInstance(); + } + /** * Get the actual instance of `InstallAndroidAppDetails`. If the actual instance is not * `InstallAndroidAppDetails`, the ClassCastException will be thrown. diff --git a/src/main/java/com/adyen/model/management/Store.java b/src/main/java/com/adyen/model/management/Store.java index 4b2d9b586..bbc089679 100644 --- a/src/main/java/com/adyen/model/management/Store.java +++ b/src/main/java/com/adyen/model/management/Store.java @@ -33,6 +33,7 @@ Store.JSON_PROPERTY_DESCRIPTION, Store.JSON_PROPERTY_EXTERNAL_REFERENCE_ID, Store.JSON_PROPERTY_ID, + Store.JSON_PROPERTY_LOCALIZED_INFORMATION, Store.JSON_PROPERTY_MERCHANT_ID, Store.JSON_PROPERTY_PHONE_NUMBER, Store.JSON_PROPERTY_REFERENCE, @@ -78,6 +79,12 @@ public class Store { /** Mark when the attribute has been explicitly set. */ private boolean isSetId = false; + public static final String JSON_PROPERTY_LOCALIZED_INFORMATION = "localizedInformation"; + private LocalizedInformation localizedInformation; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetLocalizedInformation = false; + public static final String JSON_PROPERTY_MERCHANT_ID = "merchantId"; private String merchantId; @@ -434,6 +441,41 @@ public void setId(String id) { isSetId = true; // mark as set } + /** + * localizedInformation + * + * @param localizedInformation + * @return the current {@code Store} instance, allowing for method chaining + */ + public Store localizedInformation(LocalizedInformation localizedInformation) { + this.localizedInformation = localizedInformation; + isSetLocalizedInformation = true; // mark as set + return this; + } + + /** + * Get localizedInformation + * + * @return localizedInformation + */ + @JsonProperty(JSON_PROPERTY_LOCALIZED_INFORMATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public LocalizedInformation getLocalizedInformation() { + return localizedInformation; + } + + /** + * localizedInformation + * + * @param localizedInformation + */ + @JsonProperty(JSON_PROPERTY_LOCALIZED_INFORMATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setLocalizedInformation(LocalizedInformation localizedInformation) { + this.localizedInformation = localizedInformation; + isSetLocalizedInformation = true; // mark as set + } + /** * The unique identifier of the merchant account that the store belongs to. * @@ -775,6 +817,8 @@ public boolean equals(Object o) { && Objects.equals(this.isSetExternalReferenceId, store.isSetExternalReferenceId) && Objects.equals(this.id, store.id) && Objects.equals(this.isSetId, store.isSetId) + && Objects.equals(this.localizedInformation, store.localizedInformation) + && Objects.equals(this.isSetLocalizedInformation, store.isSetLocalizedInformation) && Objects.equals(this.merchantId, store.merchantId) && Objects.equals(this.isSetMerchantId, store.isSetMerchantId) && Objects.equals(this.phoneNumber, store.phoneNumber) @@ -806,6 +850,8 @@ public int hashCode() { isSetExternalReferenceId, id, isSetId, + localizedInformation, + isSetLocalizedInformation, merchantId, isSetMerchantId, phoneNumber, @@ -834,6 +880,9 @@ public String toString() { .append(toIndentedString(externalReferenceId)) .append("\n"); sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" localizedInformation: ") + .append(toIndentedString(localizedInformation)) + .append("\n"); sb.append(" merchantId: ").append(toIndentedString(merchantId)).append("\n"); sb.append(" phoneNumber: ").append(toIndentedString(phoneNumber)).append("\n"); sb.append(" reference: ").append(toIndentedString(reference)).append("\n"); @@ -883,6 +932,9 @@ public Map getExplicitNulls() { if (isSetId) { addIfNull(nulls, JSON_PROPERTY_ID, this.id); } + if (isSetLocalizedInformation) { + addIfNull(nulls, JSON_PROPERTY_LOCALIZED_INFORMATION, this.localizedInformation); + } if (isSetMerchantId) { addIfNull(nulls, JSON_PROPERTY_MERCHANT_ID, this.merchantId); } diff --git a/src/main/java/com/adyen/model/management/StoreCreationRequest.java b/src/main/java/com/adyen/model/management/StoreCreationRequest.java index 039edf7df..648ad2ec6 100644 --- a/src/main/java/com/adyen/model/management/StoreCreationRequest.java +++ b/src/main/java/com/adyen/model/management/StoreCreationRequest.java @@ -27,6 +27,7 @@ StoreCreationRequest.JSON_PROPERTY_BUSINESS_LINE_IDS, StoreCreationRequest.JSON_PROPERTY_DESCRIPTION, StoreCreationRequest.JSON_PROPERTY_EXTERNAL_REFERENCE_ID, + StoreCreationRequest.JSON_PROPERTY_LOCALIZED_INFORMATION, StoreCreationRequest.JSON_PROPERTY_PHONE_NUMBER, StoreCreationRequest.JSON_PROPERTY_REFERENCE, StoreCreationRequest.JSON_PROPERTY_SHOPPER_STATEMENT, @@ -58,6 +59,12 @@ public class StoreCreationRequest { /** Mark when the attribute has been explicitly set. */ private boolean isSetExternalReferenceId = false; + public static final String JSON_PROPERTY_LOCALIZED_INFORMATION = "localizedInformation"; + private LocalizedInformation localizedInformation; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetLocalizedInformation = false; + public static final String JSON_PROPERTY_PHONE_NUMBER = "phoneNumber"; private String phoneNumber; @@ -283,6 +290,41 @@ public void setExternalReferenceId(String externalReferenceId) { isSetExternalReferenceId = true; // mark as set } + /** + * localizedInformation + * + * @param localizedInformation + * @return the current {@code StoreCreationRequest} instance, allowing for method chaining + */ + public StoreCreationRequest localizedInformation(LocalizedInformation localizedInformation) { + this.localizedInformation = localizedInformation; + isSetLocalizedInformation = true; // mark as set + return this; + } + + /** + * Get localizedInformation + * + * @return localizedInformation + */ + @JsonProperty(JSON_PROPERTY_LOCALIZED_INFORMATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public LocalizedInformation getLocalizedInformation() { + return localizedInformation; + } + + /** + * localizedInformation + * + * @param localizedInformation + */ + @JsonProperty(JSON_PROPERTY_LOCALIZED_INFORMATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setLocalizedInformation(LocalizedInformation localizedInformation) { + this.localizedInformation = localizedInformation; + isSetLocalizedInformation = true; // mark as set + } + /** * The phone number of the store, including '+' and country code in the * [E.164](https://en.wikipedia.org/wiki/E.164) format. If passed in a different format, we @@ -542,6 +584,9 @@ public boolean equals(Object o) { && Objects.equals(this.externalReferenceId, storeCreationRequest.externalReferenceId) && Objects.equals( this.isSetExternalReferenceId, storeCreationRequest.isSetExternalReferenceId) + && Objects.equals(this.localizedInformation, storeCreationRequest.localizedInformation) + && Objects.equals( + this.isSetLocalizedInformation, storeCreationRequest.isSetLocalizedInformation) && Objects.equals(this.phoneNumber, storeCreationRequest.phoneNumber) && Objects.equals(this.isSetPhoneNumber, storeCreationRequest.isSetPhoneNumber) && Objects.equals(this.reference, storeCreationRequest.reference) @@ -566,6 +611,8 @@ public int hashCode() { isSetDescription, externalReferenceId, isSetExternalReferenceId, + localizedInformation, + isSetLocalizedInformation, phoneNumber, isSetPhoneNumber, reference, @@ -588,6 +635,9 @@ public String toString() { sb.append(" externalReferenceId: ") .append(toIndentedString(externalReferenceId)) .append("\n"); + sb.append(" localizedInformation: ") + .append(toIndentedString(localizedInformation)) + .append("\n"); sb.append(" phoneNumber: ").append(toIndentedString(phoneNumber)).append("\n"); sb.append(" reference: ").append(toIndentedString(reference)).append("\n"); sb.append(" shopperStatement: ").append(toIndentedString(shopperStatement)).append("\n"); @@ -629,6 +679,9 @@ public Map getExplicitNulls() { if (isSetExternalReferenceId) { addIfNull(nulls, JSON_PROPERTY_EXTERNAL_REFERENCE_ID, this.externalReferenceId); } + if (isSetLocalizedInformation) { + addIfNull(nulls, JSON_PROPERTY_LOCALIZED_INFORMATION, this.localizedInformation); + } if (isSetPhoneNumber) { addIfNull(nulls, JSON_PROPERTY_PHONE_NUMBER, this.phoneNumber); } diff --git a/src/main/java/com/adyen/model/management/StoreCreationWithMerchantCodeRequest.java b/src/main/java/com/adyen/model/management/StoreCreationWithMerchantCodeRequest.java index 3aa113c02..a8630552a 100644 --- a/src/main/java/com/adyen/model/management/StoreCreationWithMerchantCodeRequest.java +++ b/src/main/java/com/adyen/model/management/StoreCreationWithMerchantCodeRequest.java @@ -27,6 +27,7 @@ StoreCreationWithMerchantCodeRequest.JSON_PROPERTY_BUSINESS_LINE_IDS, StoreCreationWithMerchantCodeRequest.JSON_PROPERTY_DESCRIPTION, StoreCreationWithMerchantCodeRequest.JSON_PROPERTY_EXTERNAL_REFERENCE_ID, + StoreCreationWithMerchantCodeRequest.JSON_PROPERTY_LOCALIZED_INFORMATION, StoreCreationWithMerchantCodeRequest.JSON_PROPERTY_MERCHANT_ID, StoreCreationWithMerchantCodeRequest.JSON_PROPERTY_PHONE_NUMBER, StoreCreationWithMerchantCodeRequest.JSON_PROPERTY_REFERENCE, @@ -59,6 +60,12 @@ public class StoreCreationWithMerchantCodeRequest { /** Mark when the attribute has been explicitly set. */ private boolean isSetExternalReferenceId = false; + public static final String JSON_PROPERTY_LOCALIZED_INFORMATION = "localizedInformation"; + private LocalizedInformation localizedInformation; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetLocalizedInformation = false; + public static final String JSON_PROPERTY_MERCHANT_ID = "merchantId"; private String merchantId; @@ -294,6 +301,43 @@ public void setExternalReferenceId(String externalReferenceId) { isSetExternalReferenceId = true; // mark as set } + /** + * localizedInformation + * + * @param localizedInformation + * @return the current {@code StoreCreationWithMerchantCodeRequest} instance, allowing for method + * chaining + */ + public StoreCreationWithMerchantCodeRequest localizedInformation( + LocalizedInformation localizedInformation) { + this.localizedInformation = localizedInformation; + isSetLocalizedInformation = true; // mark as set + return this; + } + + /** + * Get localizedInformation + * + * @return localizedInformation + */ + @JsonProperty(JSON_PROPERTY_LOCALIZED_INFORMATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public LocalizedInformation getLocalizedInformation() { + return localizedInformation; + } + + /** + * localizedInformation + * + * @param localizedInformation + */ + @JsonProperty(JSON_PROPERTY_LOCALIZED_INFORMATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setLocalizedInformation(LocalizedInformation localizedInformation) { + this.localizedInformation = localizedInformation; + isSetLocalizedInformation = true; // mark as set + } + /** * The unique identifier of the merchant account that the store belongs to. * @@ -601,6 +645,11 @@ public boolean equals(Object o) { && Objects.equals( this.isSetExternalReferenceId, storeCreationWithMerchantCodeRequest.isSetExternalReferenceId) + && Objects.equals( + this.localizedInformation, storeCreationWithMerchantCodeRequest.localizedInformation) + && Objects.equals( + this.isSetLocalizedInformation, + storeCreationWithMerchantCodeRequest.isSetLocalizedInformation) && Objects.equals(this.merchantId, storeCreationWithMerchantCodeRequest.merchantId) && Objects.equals( this.isSetMerchantId, storeCreationWithMerchantCodeRequest.isSetMerchantId) @@ -635,6 +684,8 @@ public int hashCode() { isSetDescription, externalReferenceId, isSetExternalReferenceId, + localizedInformation, + isSetLocalizedInformation, merchantId, isSetMerchantId, phoneNumber, @@ -659,6 +710,9 @@ public String toString() { sb.append(" externalReferenceId: ") .append(toIndentedString(externalReferenceId)) .append("\n"); + sb.append(" localizedInformation: ") + .append(toIndentedString(localizedInformation)) + .append("\n"); sb.append(" merchantId: ").append(toIndentedString(merchantId)).append("\n"); sb.append(" phoneNumber: ").append(toIndentedString(phoneNumber)).append("\n"); sb.append(" reference: ").append(toIndentedString(reference)).append("\n"); @@ -701,6 +755,9 @@ public Map getExplicitNulls() { if (isSetExternalReferenceId) { addIfNull(nulls, JSON_PROPERTY_EXTERNAL_REFERENCE_ID, this.externalReferenceId); } + if (isSetLocalizedInformation) { + addIfNull(nulls, JSON_PROPERTY_LOCALIZED_INFORMATION, this.localizedInformation); + } if (isSetMerchantId) { addIfNull(nulls, JSON_PROPERTY_MERCHANT_ID, this.merchantId); } diff --git a/src/main/java/com/adyen/model/management/Terminal.java b/src/main/java/com/adyen/model/management/Terminal.java index 452a406f5..acf739b19 100644 --- a/src/main/java/com/adyen/model/management/Terminal.java +++ b/src/main/java/com/adyen/model/management/Terminal.java @@ -19,6 +19,8 @@ import com.fasterxml.jackson.core.JsonProcessingException; import java.time.OffsetDateTime; import java.util.*; +import java.util.ArrayList; +import java.util.List; /** Terminal */ @JsonPropertyOrder({ @@ -26,6 +28,7 @@ Terminal.JSON_PROPERTY_CONNECTIVITY, Terminal.JSON_PROPERTY_FIRMWARE_VERSION, Terminal.JSON_PROPERTY_ID, + Terminal.JSON_PROPERTY_INSTALLED_A_P_KS, Terminal.JSON_PROPERTY_LAST_ACTIVITY_AT, Terminal.JSON_PROPERTY_LAST_TRANSACTION_AT, Terminal.JSON_PROPERTY_MODEL, @@ -57,6 +60,12 @@ public class Terminal { /** Mark when the attribute has been explicitly set. */ private boolean isSetId = false; + public static final String JSON_PROPERTY_INSTALLED_A_P_KS = "installedAPKs"; + private List installedAPKs; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetInstalledAPKs = false; + public static final String JSON_PROPERTY_LAST_ACTIVITY_AT = "lastActivityAt"; private OffsetDateTime lastActivityAt; @@ -235,6 +244,49 @@ public void setId(String id) { isSetId = true; // mark as set } + /** + * A list of Android apps installed on the terminal. + * + * @param installedAPKs A list of Android apps installed on the terminal. + * @return the current {@code Terminal} instance, allowing for method chaining + */ + public Terminal installedAPKs(List installedAPKs) { + this.installedAPKs = installedAPKs; + isSetInstalledAPKs = true; // mark as set + return this; + } + + public Terminal addInstalledAPKsItem(InstalledAPKs installedAPKsItem) { + if (this.installedAPKs == null) { + this.installedAPKs = new ArrayList<>(); + } + this.installedAPKs.add(installedAPKsItem); + return this; + } + + /** + * A list of Android apps installed on the terminal. + * + * @return installedAPKs A list of Android apps installed on the terminal. + */ + @JsonProperty(JSON_PROPERTY_INSTALLED_A_P_KS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getInstalledAPKs() { + return installedAPKs; + } + + /** + * A list of Android apps installed on the terminal. + * + * @param installedAPKs A list of Android apps installed on the terminal. + */ + @JsonProperty(JSON_PROPERTY_INSTALLED_A_P_KS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setInstalledAPKs(List installedAPKs) { + this.installedAPKs = installedAPKs; + isSetInstalledAPKs = true; // mark as set + } + /** * Date and time of the last activity on the terminal. Not included when the last activity was * more than 14 days ago. @@ -463,6 +515,8 @@ public boolean equals(Object o) { && Objects.equals(this.isSetFirmwareVersion, terminal.isSetFirmwareVersion) && Objects.equals(this.id, terminal.id) && Objects.equals(this.isSetId, terminal.isSetId) + && Objects.equals(this.installedAPKs, terminal.installedAPKs) + && Objects.equals(this.isSetInstalledAPKs, terminal.isSetInstalledAPKs) && Objects.equals(this.lastActivityAt, terminal.lastActivityAt) && Objects.equals(this.isSetLastActivityAt, terminal.isSetLastActivityAt) && Objects.equals(this.lastTransactionAt, terminal.lastTransactionAt) @@ -486,6 +540,8 @@ public int hashCode() { isSetFirmwareVersion, id, isSetId, + installedAPKs, + isSetInstalledAPKs, lastActivityAt, isSetLastActivityAt, lastTransactionAt, @@ -506,6 +562,7 @@ public String toString() { sb.append(" connectivity: ").append(toIndentedString(connectivity)).append("\n"); sb.append(" firmwareVersion: ").append(toIndentedString(firmwareVersion)).append("\n"); sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" installedAPKs: ").append(toIndentedString(installedAPKs)).append("\n"); sb.append(" lastActivityAt: ").append(toIndentedString(lastActivityAt)).append("\n"); sb.append(" lastTransactionAt: ").append(toIndentedString(lastTransactionAt)).append("\n"); sb.append(" model: ").append(toIndentedString(model)).append("\n"); @@ -547,6 +604,9 @@ public Map getExplicitNulls() { if (isSetId) { addIfNull(nulls, JSON_PROPERTY_ID, this.id); } + if (isSetInstalledAPKs) { + addIfNull(nulls, JSON_PROPERTY_INSTALLED_A_P_KS, this.installedAPKs); + } if (isSetLastActivityAt) { addIfNull(nulls, JSON_PROPERTY_LAST_ACTIVITY_AT, this.lastActivityAt); }