From 34fe0177269ff8e7ba391663041f5a3ce4f3557c Mon Sep 17 00:00:00 2001 From: gcatanese Date: Thu, 30 Oct 2025 16:17:03 +0100 Subject: [PATCH 1/5] Add addAdditionalServiceHeader method --- src/main/java/com/adyen/model/RequestOptions.java | 8 ++++++++ src/test/java/com/adyen/httpclient/ClientTest.java | 11 +++++++++++ 2 files changed, 19 insertions(+) diff --git a/src/main/java/com/adyen/model/RequestOptions.java b/src/main/java/com/adyen/model/RequestOptions.java index fd819ae7a..5090631b3 100644 --- a/src/main/java/com/adyen/model/RequestOptions.java +++ b/src/main/java/com/adyen/model/RequestOptions.java @@ -22,6 +22,14 @@ public RequestOptions additionalServiceHeaders(HashMap additiona return this; } + public RequestOptions addAdditionalServiceHeader(String key, String value) { + if (this.additionalServiceHeaders == null) { + this.additionalServiceHeaders = new HashMap<>(); + } + this.additionalServiceHeaders.put(key, value); + return this; + } + public String getIdempotencyKey() { return idempotencyKey; } diff --git a/src/test/java/com/adyen/httpclient/ClientTest.java b/src/test/java/com/adyen/httpclient/ClientTest.java index 5e0eea105..764a1623a 100644 --- a/src/test/java/com/adyen/httpclient/ClientTest.java +++ b/src/test/java/com/adyen/httpclient/ClientTest.java @@ -139,6 +139,17 @@ public void testRequestOptionsBuilderPattern() { assertEquals(requestOptions.getAdditionalServiceHeaders(), map); } + @Test + public void testRequestOptionsAddAdditionalServiceHeader() { + RequestOptions requestOptions = + new RequestOptions() + .addAdditionalServiceHeader("key1", "value1") + .addAdditionalServiceHeader("key2", "value2") + .addAdditionalServiceHeader("key3", "value3"); + assertNotNull(requestOptions.getAdditionalServiceHeaders()); + assertEquals(3, requestOptions.getAdditionalServiceHeaders().size()); + } + @Test public void testUserAgentWithApplicationName() throws Exception { From 934d1f3d5d05aa489b9c8ecdc5ca39eea9ec4265 Mon Sep 17 00:00:00 2001 From: gcatanese Date: Thu, 30 Oct 2025 16:17:19 +0100 Subject: [PATCH 2/5] Modify Mustache templates --- templates-v7/libraries/jersey3/api.mustache | 4 ++++ templates-v7/libraries/jersey3/api_overload_invoke.mustache | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/templates-v7/libraries/jersey3/api.mustache b/templates-v7/libraries/jersey3/api.mustache index cdf01dece..17a133d39 100644 --- a/templates-v7/libraries/jersey3/api.mustache +++ b/templates-v7/libraries/jersey3/api.mustache @@ -47,6 +47,10 @@ public class {{classname}} extends Service { @Deprecated {{/isDeprecated}} public {{#returnType}}{{{.}}} {{/returnType}}{{^returnType}}void {{/returnType}}{{#vendorExtensions.x-methodName}}{{.}}{{/vendorExtensions.x-methodName}}{{^vendorExtensions.x-methodName}}{{operationId}}{{/vendorExtensions.x-methodName}}({{>api_overload}}) throws ApiException, IOException { + RequestOptions requestOptions = null;{{#requiredParams}}{{#isHeaderParam}}{{#-first}} + requestOptions = new RequestOptions() + .addAdditionalServiceHeader("{{baseName}}", {{paramName}}){{/-first}}{{^-first}} + .addAdditionalServiceHeader("{{baseName}}", {{paramName}}){{/-first}};{{/isHeaderParam}}{{/requiredParams}} {{#returnType}}return {{/returnType}}{{#vendorExtensions.x-methodName}}{{.}}{{/vendorExtensions.x-methodName}}{{^vendorExtensions.x-methodName}}{{operationId}}{{/vendorExtensions.x-methodName}}({{>api_overload_invoke}}); } diff --git a/templates-v7/libraries/jersey3/api_overload_invoke.mustache b/templates-v7/libraries/jersey3/api_overload_invoke.mustache index 52479b036..a91a9252b 100644 --- a/templates-v7/libraries/jersey3/api_overload_invoke.mustache +++ b/templates-v7/libraries/jersey3/api_overload_invoke.mustache @@ -1,2 +1,2 @@ {{! Overload contains just required and body params, null on the remaining }} -{{#pathParams}}{{paramName}}, {{/pathParams}}{{#queryParams}}{{#required}}{{paramName}}, {{/required}}{{^required}}null, {{/required}} {{/queryParams}}{{#bodyParams}}{{paramName}}, {{/bodyParams}}null \ No newline at end of file +{{#pathParams}}{{paramName}}, {{/pathParams}}{{#queryParams}}{{#required}}{{paramName}}, {{/required}}{{^required}}null, {{/required}} {{/queryParams}}{{#bodyParams}}{{paramName}}, {{/bodyParams}}requestOptions \ No newline at end of file From 8218eb4b917f543ba5211db6e94b0299139b8a04 Mon Sep 17 00:00:00 2001 From: gcatanese Date: Thu, 30 Oct 2025 16:17:56 +0100 Subject: [PATCH 3/5] Generate BalancePlatform models --- .../ApproveAssociationRequest.java | 248 ++++++++++++ .../ApproveAssociationResponse.java | 129 +++++++ .../model/balanceplatform/Association.java | 236 ++++++++++++ .../balanceplatform/AssociationListing.java | 356 ++++++++++++++++++ .../balanceplatform/AssociationStatus.java | 49 +++ .../BalanceWebhookSettingAllOf.java | 137 +++++++ .../BeginScaDeviceRegistrationRequest.java | 175 +++++++++ .../BeginScaDeviceRegistrationResponse.java | 169 +++++++++ .../FinishScaDeviceRegistrationRequest.java | 127 +++++++ .../FinishScaDeviceRegistrationResponse.java | 121 ++++++ .../ListAssociationsResponse.java | 248 ++++++++++++ .../RemoveAssociationRequest.java | 209 ++++++++++ .../model/balanceplatform/ScaDevice.java | 203 ++++++++++ .../model/balanceplatform/ScaDeviceType.java | 51 +++ .../model/balanceplatform/ScaEntity.java | 154 ++++++++ .../model/balanceplatform/ScaEntityType.java | 49 +++ .../SubmitScaAssociationRequest.java | 129 +++++++ .../SubmitScaAssociationResponse.java | 129 +++++++ .../balanceplatform/TransactionRule.java | 88 +++-- .../balanceplatform/TransactionRuleInfo.java | 88 +++-- 20 files changed, 3031 insertions(+), 64 deletions(-) create mode 100644 src/main/java/com/adyen/model/balanceplatform/ApproveAssociationRequest.java create mode 100644 src/main/java/com/adyen/model/balanceplatform/ApproveAssociationResponse.java create mode 100644 src/main/java/com/adyen/model/balanceplatform/Association.java create mode 100644 src/main/java/com/adyen/model/balanceplatform/AssociationListing.java create mode 100644 src/main/java/com/adyen/model/balanceplatform/AssociationStatus.java create mode 100644 src/main/java/com/adyen/model/balanceplatform/BalanceWebhookSettingAllOf.java create mode 100644 src/main/java/com/adyen/model/balanceplatform/BeginScaDeviceRegistrationRequest.java create mode 100644 src/main/java/com/adyen/model/balanceplatform/BeginScaDeviceRegistrationResponse.java create mode 100644 src/main/java/com/adyen/model/balanceplatform/FinishScaDeviceRegistrationRequest.java create mode 100644 src/main/java/com/adyen/model/balanceplatform/FinishScaDeviceRegistrationResponse.java create mode 100644 src/main/java/com/adyen/model/balanceplatform/ListAssociationsResponse.java create mode 100644 src/main/java/com/adyen/model/balanceplatform/RemoveAssociationRequest.java create mode 100644 src/main/java/com/adyen/model/balanceplatform/ScaDevice.java create mode 100644 src/main/java/com/adyen/model/balanceplatform/ScaDeviceType.java create mode 100644 src/main/java/com/adyen/model/balanceplatform/ScaEntity.java create mode 100644 src/main/java/com/adyen/model/balanceplatform/ScaEntityType.java create mode 100644 src/main/java/com/adyen/model/balanceplatform/SubmitScaAssociationRequest.java create mode 100644 src/main/java/com/adyen/model/balanceplatform/SubmitScaAssociationResponse.java diff --git a/src/main/java/com/adyen/model/balanceplatform/ApproveAssociationRequest.java b/src/main/java/com/adyen/model/balanceplatform/ApproveAssociationRequest.java new file mode 100644 index 000000000..c1833fecc --- /dev/null +++ b/src/main/java/com/adyen/model/balanceplatform/ApproveAssociationRequest.java @@ -0,0 +1,248 @@ +/* + * Configuration API + * + * The version of the OpenAPI document: 2 + * + * + * 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.balanceplatform; + +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; + +/** ApproveAssociationRequest */ +@JsonPropertyOrder({ + ApproveAssociationRequest.JSON_PROPERTY_ENTITY_ID, + ApproveAssociationRequest.JSON_PROPERTY_ENTITY_TYPE, + ApproveAssociationRequest.JSON_PROPERTY_SCA_DEVICE_IDS, + ApproveAssociationRequest.JSON_PROPERTY_STATUS +}) +public class ApproveAssociationRequest { + public static final String JSON_PROPERTY_ENTITY_ID = "entityId"; + private String entityId; + + public static final String JSON_PROPERTY_ENTITY_TYPE = "entityType"; + private ScaEntityType entityType; + + public static final String JSON_PROPERTY_SCA_DEVICE_IDS = "scaDeviceIds"; + private List scaDeviceIds; + + public static final String JSON_PROPERTY_STATUS = "status"; + private AssociationStatus status; + + public ApproveAssociationRequest() {} + + /** + * The unique identifier of the entity. + * + * @param entityId The unique identifier of the entity. + * @return the current {@code ApproveAssociationRequest} instance, allowing for method chaining + */ + public ApproveAssociationRequest entityId(String entityId) { + this.entityId = entityId; + return this; + } + + /** + * The unique identifier of the entity. + * + * @return entityId The unique identifier of the entity. + */ + @JsonProperty(JSON_PROPERTY_ENTITY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getEntityId() { + return entityId; + } + + /** + * The unique identifier of the entity. + * + * @param entityId The unique identifier of the entity. + */ + @JsonProperty(JSON_PROPERTY_ENTITY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEntityId(String entityId) { + this.entityId = entityId; + } + + /** + * entityType + * + * @param entityType + * @return the current {@code ApproveAssociationRequest} instance, allowing for method chaining + */ + public ApproveAssociationRequest entityType(ScaEntityType entityType) { + this.entityType = entityType; + return this; + } + + /** + * Get entityType + * + * @return entityType + */ + @JsonProperty(JSON_PROPERTY_ENTITY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public ScaEntityType getEntityType() { + return entityType; + } + + /** + * entityType + * + * @param entityType + */ + @JsonProperty(JSON_PROPERTY_ENTITY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEntityType(ScaEntityType entityType) { + this.entityType = entityType; + } + + /** + * List of device ids associated to the entity that will be approved. + * + * @param scaDeviceIds List of device ids associated to the entity that will be approved. + * @return the current {@code ApproveAssociationRequest} instance, allowing for method chaining + */ + public ApproveAssociationRequest scaDeviceIds(List scaDeviceIds) { + this.scaDeviceIds = scaDeviceIds; + return this; + } + + public ApproveAssociationRequest addScaDeviceIdsItem(String scaDeviceIdsItem) { + if (this.scaDeviceIds == null) { + this.scaDeviceIds = new ArrayList<>(); + } + this.scaDeviceIds.add(scaDeviceIdsItem); + return this; + } + + /** + * List of device ids associated to the entity that will be approved. + * + * @return scaDeviceIds List of device ids associated to the entity that will be approved. + */ + @JsonProperty(JSON_PROPERTY_SCA_DEVICE_IDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getScaDeviceIds() { + return scaDeviceIds; + } + + /** + * List of device ids associated to the entity that will be approved. + * + * @param scaDeviceIds List of device ids associated to the entity that will be approved. + */ + @JsonProperty(JSON_PROPERTY_SCA_DEVICE_IDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setScaDeviceIds(List scaDeviceIds) { + this.scaDeviceIds = scaDeviceIds; + } + + /** + * status + * + * @param status + * @return the current {@code ApproveAssociationRequest} instance, allowing for method chaining + */ + public ApproveAssociationRequest status(AssociationStatus status) { + this.status = status; + return this; + } + + /** + * Get status + * + * @return status + */ + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public AssociationStatus getStatus() { + return status; + } + + /** + * status + * + * @param status + */ + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setStatus(AssociationStatus status) { + this.status = status; + } + + /** Return true if this ApproveAssociationRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ApproveAssociationRequest approveAssociationRequest = (ApproveAssociationRequest) o; + return Objects.equals(this.entityId, approveAssociationRequest.entityId) + && Objects.equals(this.entityType, approveAssociationRequest.entityType) + && Objects.equals(this.scaDeviceIds, approveAssociationRequest.scaDeviceIds) + && Objects.equals(this.status, approveAssociationRequest.status); + } + + @Override + public int hashCode() { + return Objects.hash(entityId, entityType, scaDeviceIds, status); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ApproveAssociationRequest {\n"); + sb.append(" entityId: ").append(toIndentedString(entityId)).append("\n"); + sb.append(" entityType: ").append(toIndentedString(entityType)).append("\n"); + sb.append(" scaDeviceIds: ").append(toIndentedString(scaDeviceIds)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Create an instance of ApproveAssociationRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of ApproveAssociationRequest + * @throws JsonProcessingException if the JSON string is invalid with respect to + * ApproveAssociationRequest + */ + public static ApproveAssociationRequest fromJson(String jsonString) + throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, ApproveAssociationRequest.class); + } + + /** + * Convert an instance of ApproveAssociationRequest 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/balanceplatform/ApproveAssociationResponse.java b/src/main/java/com/adyen/model/balanceplatform/ApproveAssociationResponse.java new file mode 100644 index 000000000..b4b635d03 --- /dev/null +++ b/src/main/java/com/adyen/model/balanceplatform/ApproveAssociationResponse.java @@ -0,0 +1,129 @@ +/* + * Configuration API + * + * The version of the OpenAPI document: 2 + * + * + * 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.balanceplatform; + +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; + +/** ApproveAssociationResponse */ +@JsonPropertyOrder({ApproveAssociationResponse.JSON_PROPERTY_SCA_ASSOCIATIONS}) +public class ApproveAssociationResponse { + public static final String JSON_PROPERTY_SCA_ASSOCIATIONS = "scaAssociations"; + private List scaAssociations; + + public ApproveAssociationResponse() {} + + /** + * The list of associations. + * + * @param scaAssociations The list of associations. + * @return the current {@code ApproveAssociationResponse} instance, allowing for method chaining + */ + public ApproveAssociationResponse scaAssociations(List scaAssociations) { + this.scaAssociations = scaAssociations; + return this; + } + + public ApproveAssociationResponse addScaAssociationsItem(Association scaAssociationsItem) { + if (this.scaAssociations == null) { + this.scaAssociations = new ArrayList<>(); + } + this.scaAssociations.add(scaAssociationsItem); + return this; + } + + /** + * The list of associations. + * + * @return scaAssociations The list of associations. + */ + @JsonProperty(JSON_PROPERTY_SCA_ASSOCIATIONS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getScaAssociations() { + return scaAssociations; + } + + /** + * The list of associations. + * + * @param scaAssociations The list of associations. + */ + @JsonProperty(JSON_PROPERTY_SCA_ASSOCIATIONS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setScaAssociations(List scaAssociations) { + this.scaAssociations = scaAssociations; + } + + /** Return true if this ApproveAssociationResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ApproveAssociationResponse approveAssociationResponse = (ApproveAssociationResponse) o; + return Objects.equals(this.scaAssociations, approveAssociationResponse.scaAssociations); + } + + @Override + public int hashCode() { + return Objects.hash(scaAssociations); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ApproveAssociationResponse {\n"); + sb.append(" scaAssociations: ").append(toIndentedString(scaAssociations)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Create an instance of ApproveAssociationResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of ApproveAssociationResponse + * @throws JsonProcessingException if the JSON string is invalid with respect to + * ApproveAssociationResponse + */ + public static ApproveAssociationResponse fromJson(String jsonString) + throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, ApproveAssociationResponse.class); + } + + /** + * Convert an instance of ApproveAssociationResponse 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/balanceplatform/Association.java b/src/main/java/com/adyen/model/balanceplatform/Association.java new file mode 100644 index 000000000..8790afdde --- /dev/null +++ b/src/main/java/com/adyen/model/balanceplatform/Association.java @@ -0,0 +1,236 @@ +/* + * Configuration API + * + * The version of the OpenAPI document: 2 + * + * + * 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.balanceplatform; + +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.*; + +/** Association */ +@JsonPropertyOrder({ + Association.JSON_PROPERTY_ENTITY_ID, + Association.JSON_PROPERTY_ENTITY_TYPE, + Association.JSON_PROPERTY_SCA_DEVICE_ID, + Association.JSON_PROPERTY_STATUS +}) +public class Association { + public static final String JSON_PROPERTY_ENTITY_ID = "entityId"; + private String entityId; + + public static final String JSON_PROPERTY_ENTITY_TYPE = "entityType"; + private ScaEntityType entityType; + + public static final String JSON_PROPERTY_SCA_DEVICE_ID = "scaDeviceId"; + private String scaDeviceId; + + public static final String JSON_PROPERTY_STATUS = "status"; + private AssociationStatus status; + + public Association() {} + + /** + * The unique identifier of the entity. + * + * @param entityId The unique identifier of the entity. + * @return the current {@code Association} instance, allowing for method chaining + */ + public Association entityId(String entityId) { + this.entityId = entityId; + return this; + } + + /** + * The unique identifier of the entity. + * + * @return entityId The unique identifier of the entity. + */ + @JsonProperty(JSON_PROPERTY_ENTITY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getEntityId() { + return entityId; + } + + /** + * The unique identifier of the entity. + * + * @param entityId The unique identifier of the entity. + */ + @JsonProperty(JSON_PROPERTY_ENTITY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEntityId(String entityId) { + this.entityId = entityId; + } + + /** + * entityType + * + * @param entityType + * @return the current {@code Association} instance, allowing for method chaining + */ + public Association entityType(ScaEntityType entityType) { + this.entityType = entityType; + return this; + } + + /** + * Get entityType + * + * @return entityType + */ + @JsonProperty(JSON_PROPERTY_ENTITY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public ScaEntityType getEntityType() { + return entityType; + } + + /** + * entityType + * + * @param entityType + */ + @JsonProperty(JSON_PROPERTY_ENTITY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEntityType(ScaEntityType entityType) { + this.entityType = entityType; + } + + /** + * The unique identifier for the SCA device. + * + * @param scaDeviceId The unique identifier for the SCA device. + * @return the current {@code Association} instance, allowing for method chaining + */ + public Association scaDeviceId(String scaDeviceId) { + this.scaDeviceId = scaDeviceId; + return this; + } + + /** + * The unique identifier for the SCA device. + * + * @return scaDeviceId The unique identifier for the SCA device. + */ + @JsonProperty(JSON_PROPERTY_SCA_DEVICE_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getScaDeviceId() { + return scaDeviceId; + } + + /** + * The unique identifier for the SCA device. + * + * @param scaDeviceId The unique identifier for the SCA device. + */ + @JsonProperty(JSON_PROPERTY_SCA_DEVICE_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setScaDeviceId(String scaDeviceId) { + this.scaDeviceId = scaDeviceId; + } + + /** + * status + * + * @param status + * @return the current {@code Association} instance, allowing for method chaining + */ + public Association status(AssociationStatus status) { + this.status = status; + return this; + } + + /** + * Get status + * + * @return status + */ + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public AssociationStatus getStatus() { + return status; + } + + /** + * status + * + * @param status + */ + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setStatus(AssociationStatus status) { + this.status = status; + } + + /** Return true if this Association object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Association association = (Association) o; + return Objects.equals(this.entityId, association.entityId) + && Objects.equals(this.entityType, association.entityType) + && Objects.equals(this.scaDeviceId, association.scaDeviceId) + && Objects.equals(this.status, association.status); + } + + @Override + public int hashCode() { + return Objects.hash(entityId, entityType, scaDeviceId, status); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Association {\n"); + sb.append(" entityId: ").append(toIndentedString(entityId)).append("\n"); + sb.append(" entityType: ").append(toIndentedString(entityType)).append("\n"); + sb.append(" scaDeviceId: ").append(toIndentedString(scaDeviceId)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Create an instance of Association given an JSON string + * + * @param jsonString JSON string + * @return An instance of Association + * @throws JsonProcessingException if the JSON string is invalid with respect to Association + */ + public static Association fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, Association.class); + } + + /** + * Convert an instance of Association 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/balanceplatform/AssociationListing.java b/src/main/java/com/adyen/model/balanceplatform/AssociationListing.java new file mode 100644 index 000000000..d9607c7ec --- /dev/null +++ b/src/main/java/com/adyen/model/balanceplatform/AssociationListing.java @@ -0,0 +1,356 @@ +/* + * Configuration API + * + * The version of the OpenAPI document: 2 + * + * + * 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.balanceplatform; + +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.*; + +/** AssociationListing */ +@JsonPropertyOrder({ + AssociationListing.JSON_PROPERTY_CREATED_AT, + AssociationListing.JSON_PROPERTY_ENTITY_ID, + AssociationListing.JSON_PROPERTY_ENTITY_TYPE, + AssociationListing.JSON_PROPERTY_SCA_DEVICE_ID, + AssociationListing.JSON_PROPERTY_SCA_DEVICE_NAME, + AssociationListing.JSON_PROPERTY_SCA_DEVICE_TYPE, + AssociationListing.JSON_PROPERTY_STATUS +}) +public class AssociationListing { + public static final String JSON_PROPERTY_CREATED_AT = "createdAt"; + private OffsetDateTime createdAt; + + public static final String JSON_PROPERTY_ENTITY_ID = "entityId"; + private String entityId; + + public static final String JSON_PROPERTY_ENTITY_TYPE = "entityType"; + private ScaEntityType entityType; + + public static final String JSON_PROPERTY_SCA_DEVICE_ID = "scaDeviceId"; + private String scaDeviceId; + + public static final String JSON_PROPERTY_SCA_DEVICE_NAME = "scaDeviceName"; + private String scaDeviceName; + + public static final String JSON_PROPERTY_SCA_DEVICE_TYPE = "scaDeviceType"; + private ScaDeviceType scaDeviceType; + + public static final String JSON_PROPERTY_STATUS = "status"; + private AssociationStatus status; + + public AssociationListing() {} + + /** + * The date and time when the association was created. + * + * @param createdAt The date and time when the association was created. + * @return the current {@code AssociationListing} instance, allowing for method chaining + */ + public AssociationListing createdAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * The date and time when the association was created. + * + * @return createdAt The date and time when the association was created. + */ + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + /** + * The date and time when the association was created. + * + * @param createdAt The date and time when the association was created. + */ + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCreatedAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + } + + /** + * The unique identifier of the entity. + * + * @param entityId The unique identifier of the entity. + * @return the current {@code AssociationListing} instance, allowing for method chaining + */ + public AssociationListing entityId(String entityId) { + this.entityId = entityId; + return this; + } + + /** + * The unique identifier of the entity. + * + * @return entityId The unique identifier of the entity. + */ + @JsonProperty(JSON_PROPERTY_ENTITY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getEntityId() { + return entityId; + } + + /** + * The unique identifier of the entity. + * + * @param entityId The unique identifier of the entity. + */ + @JsonProperty(JSON_PROPERTY_ENTITY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEntityId(String entityId) { + this.entityId = entityId; + } + + /** + * entityType + * + * @param entityType + * @return the current {@code AssociationListing} instance, allowing for method chaining + */ + public AssociationListing entityType(ScaEntityType entityType) { + this.entityType = entityType; + return this; + } + + /** + * Get entityType + * + * @return entityType + */ + @JsonProperty(JSON_PROPERTY_ENTITY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public ScaEntityType getEntityType() { + return entityType; + } + + /** + * entityType + * + * @param entityType + */ + @JsonProperty(JSON_PROPERTY_ENTITY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEntityType(ScaEntityType entityType) { + this.entityType = entityType; + } + + /** + * The unique identifier of the SCA device. + * + * @param scaDeviceId The unique identifier of the SCA device. + * @return the current {@code AssociationListing} instance, allowing for method chaining + */ + public AssociationListing scaDeviceId(String scaDeviceId) { + this.scaDeviceId = scaDeviceId; + return this; + } + + /** + * The unique identifier of the SCA device. + * + * @return scaDeviceId The unique identifier of the SCA device. + */ + @JsonProperty(JSON_PROPERTY_SCA_DEVICE_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getScaDeviceId() { + return scaDeviceId; + } + + /** + * The unique identifier of the SCA device. + * + * @param scaDeviceId The unique identifier of the SCA device. + */ + @JsonProperty(JSON_PROPERTY_SCA_DEVICE_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setScaDeviceId(String scaDeviceId) { + this.scaDeviceId = scaDeviceId; + } + + /** + * The human-readable name for the SCA device that was registered. + * + * @param scaDeviceName The human-readable name for the SCA device that was registered. + * @return the current {@code AssociationListing} instance, allowing for method chaining + */ + public AssociationListing scaDeviceName(String scaDeviceName) { + this.scaDeviceName = scaDeviceName; + return this; + } + + /** + * The human-readable name for the SCA device that was registered. + * + * @return scaDeviceName The human-readable name for the SCA device that was registered. + */ + @JsonProperty(JSON_PROPERTY_SCA_DEVICE_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getScaDeviceName() { + return scaDeviceName; + } + + /** + * The human-readable name for the SCA device that was registered. + * + * @param scaDeviceName The human-readable name for the SCA device that was registered. + */ + @JsonProperty(JSON_PROPERTY_SCA_DEVICE_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setScaDeviceName(String scaDeviceName) { + this.scaDeviceName = scaDeviceName; + } + + /** + * scaDeviceType + * + * @param scaDeviceType + * @return the current {@code AssociationListing} instance, allowing for method chaining + */ + public AssociationListing scaDeviceType(ScaDeviceType scaDeviceType) { + this.scaDeviceType = scaDeviceType; + return this; + } + + /** + * Get scaDeviceType + * + * @return scaDeviceType + */ + @JsonProperty(JSON_PROPERTY_SCA_DEVICE_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public ScaDeviceType getScaDeviceType() { + return scaDeviceType; + } + + /** + * scaDeviceType + * + * @param scaDeviceType + */ + @JsonProperty(JSON_PROPERTY_SCA_DEVICE_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setScaDeviceType(ScaDeviceType scaDeviceType) { + this.scaDeviceType = scaDeviceType; + } + + /** + * status + * + * @param status + * @return the current {@code AssociationListing} instance, allowing for method chaining + */ + public AssociationListing status(AssociationStatus status) { + this.status = status; + return this; + } + + /** + * Get status + * + * @return status + */ + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public AssociationStatus getStatus() { + return status; + } + + /** + * status + * + * @param status + */ + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setStatus(AssociationStatus status) { + this.status = status; + } + + /** Return true if this AssociationListing object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AssociationListing associationListing = (AssociationListing) o; + return Objects.equals(this.createdAt, associationListing.createdAt) + && Objects.equals(this.entityId, associationListing.entityId) + && Objects.equals(this.entityType, associationListing.entityType) + && Objects.equals(this.scaDeviceId, associationListing.scaDeviceId) + && Objects.equals(this.scaDeviceName, associationListing.scaDeviceName) + && Objects.equals(this.scaDeviceType, associationListing.scaDeviceType) + && Objects.equals(this.status, associationListing.status); + } + + @Override + public int hashCode() { + return Objects.hash( + createdAt, entityId, entityType, scaDeviceId, scaDeviceName, scaDeviceType, status); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AssociationListing {\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" entityId: ").append(toIndentedString(entityId)).append("\n"); + sb.append(" entityType: ").append(toIndentedString(entityType)).append("\n"); + sb.append(" scaDeviceId: ").append(toIndentedString(scaDeviceId)).append("\n"); + sb.append(" scaDeviceName: ").append(toIndentedString(scaDeviceName)).append("\n"); + sb.append(" scaDeviceType: ").append(toIndentedString(scaDeviceType)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Create an instance of AssociationListing given an JSON string + * + * @param jsonString JSON string + * @return An instance of AssociationListing + * @throws JsonProcessingException if the JSON string is invalid with respect to + * AssociationListing + */ + public static AssociationListing fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, AssociationListing.class); + } + + /** + * Convert an instance of AssociationListing 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/balanceplatform/AssociationStatus.java b/src/main/java/com/adyen/model/balanceplatform/AssociationStatus.java new file mode 100644 index 000000000..e4a80744e --- /dev/null +++ b/src/main/java/com/adyen/model/balanceplatform/AssociationStatus.java @@ -0,0 +1,49 @@ +/* + * Configuration API + * + * The version of the OpenAPI document: 2 + * + * + * 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.balanceplatform; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.*; + +/** Gets or Sets AssociationStatus */ +public enum AssociationStatus { + PENDINGAPPROVAL("pendingApproval"), + + ACTIVE("active"); + + private String value; + + AssociationStatus(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static AssociationStatus fromValue(String value) { + for (AssociationStatus b : AssociationStatus.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } +} diff --git a/src/main/java/com/adyen/model/balanceplatform/BalanceWebhookSettingAllOf.java b/src/main/java/com/adyen/model/balanceplatform/BalanceWebhookSettingAllOf.java new file mode 100644 index 000000000..1802c763e --- /dev/null +++ b/src/main/java/com/adyen/model/balanceplatform/BalanceWebhookSettingAllOf.java @@ -0,0 +1,137 @@ +/* + * Configuration API + * + * The version of the OpenAPI document: 2 + * + * + * 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.balanceplatform; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.core.JsonProcessingException; +import java.util.*; +import java.util.ArrayList; +import java.util.List; + +/** BalanceWebhookSettingAllOf */ +@JsonPropertyOrder({BalanceWebhookSettingAllOf.JSON_PROPERTY_CONDITIONS}) +@JsonTypeName("BalanceWebhookSetting_allOf") +public class BalanceWebhookSettingAllOf { + public static final String JSON_PROPERTY_CONDITIONS = "conditions"; + private List conditions; + + public BalanceWebhookSettingAllOf() {} + + /** + * The list of settings and criteria for triggering the [balance + * webhook](https://docs.adyen.com/api-explorer/balance-webhooks/latest/post/balanceAccount.balance.updated). + * + * @param conditions The list of settings and criteria for triggering the [balance + * webhook](https://docs.adyen.com/api-explorer/balance-webhooks/latest/post/balanceAccount.balance.updated). + * @return the current {@code BalanceWebhookSettingAllOf} instance, allowing for method chaining + */ + public BalanceWebhookSettingAllOf conditions(List conditions) { + this.conditions = conditions; + return this; + } + + public BalanceWebhookSettingAllOf addItem(Condition conditionsItem) { + if (this.conditions == null) { + this.conditions = new ArrayList<>(); + } + this.conditions.add(conditionsItem); + return this; + } + + /** + * The list of settings and criteria for triggering the [balance + * webhook](https://docs.adyen.com/api-explorer/balance-webhooks/latest/post/balanceAccount.balance.updated). + * + * @return conditions The list of settings and criteria for triggering the [balance + * webhook](https://docs.adyen.com/api-explorer/balance-webhooks/latest/post/balanceAccount.balance.updated). + */ + @JsonProperty(JSON_PROPERTY_CONDITIONS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getConditions() { + return conditions; + } + + /** + * The list of settings and criteria for triggering the [balance + * webhook](https://docs.adyen.com/api-explorer/balance-webhooks/latest/post/balanceAccount.balance.updated). + * + * @param conditions The list of settings and criteria for triggering the [balance + * webhook](https://docs.adyen.com/api-explorer/balance-webhooks/latest/post/balanceAccount.balance.updated). + */ + @JsonProperty(JSON_PROPERTY_CONDITIONS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setConditions(List conditions) { + this.conditions = conditions; + } + + /** Return true if this BalanceWebhookSetting_allOf object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + BalanceWebhookSettingAllOf balanceWebhookSettingAllOf = (BalanceWebhookSettingAllOf) o; + return Objects.equals(this.conditions, balanceWebhookSettingAllOf.conditions); + } + + @Override + public int hashCode() { + return Objects.hash(conditions); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class BalanceWebhookSettingAllOf {\n"); + sb.append(" conditions: ").append(toIndentedString(conditions)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Create an instance of BalanceWebhookSettingAllOf given an JSON string + * + * @param jsonString JSON string + * @return An instance of BalanceWebhookSettingAllOf + * @throws JsonProcessingException if the JSON string is invalid with respect to + * BalanceWebhookSettingAllOf + */ + public static BalanceWebhookSettingAllOf fromJson(String jsonString) + throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, BalanceWebhookSettingAllOf.class); + } + + /** + * Convert an instance of BalanceWebhookSettingAllOf 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/balanceplatform/BeginScaDeviceRegistrationRequest.java b/src/main/java/com/adyen/model/balanceplatform/BeginScaDeviceRegistrationRequest.java new file mode 100644 index 000000000..cb12b21c4 --- /dev/null +++ b/src/main/java/com/adyen/model/balanceplatform/BeginScaDeviceRegistrationRequest.java @@ -0,0 +1,175 @@ +/* + * Configuration API + * + * The version of the OpenAPI document: 2 + * + * + * 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.balanceplatform; + +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.*; + +/** BeginScaDeviceRegistrationRequest */ +@JsonPropertyOrder({ + BeginScaDeviceRegistrationRequest.JSON_PROPERTY_NAME, + BeginScaDeviceRegistrationRequest.JSON_PROPERTY_SDK_OUTPUT +}) +public class BeginScaDeviceRegistrationRequest { + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public static final String JSON_PROPERTY_SDK_OUTPUT = "sdkOutput"; + private String sdkOutput; + + public BeginScaDeviceRegistrationRequest() {} + + /** + * The name of the SCA device that you are registering. You can use it to help your users identify + * the device. + * + * @param name The name of the SCA device that you are registering. You can use it to help your + * users identify the device. + * @return the current {@code BeginScaDeviceRegistrationRequest} instance, allowing for method + * chaining + */ + public BeginScaDeviceRegistrationRequest name(String name) { + this.name = name; + return this; + } + + /** + * The name of the SCA device that you are registering. You can use it to help your users identify + * the device. + * + * @return name The name of the SCA device that you are registering. You can use it to help your + * users identify the device. + */ + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getName() { + return name; + } + + /** + * The name of the SCA device that you are registering. You can use it to help your users identify + * the device. + * + * @param name The name of the SCA device that you are registering. You can use it to help your + * users identify the device. + */ + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setName(String name) { + this.name = name; + } + + /** + * A base64-encoded block with the data required to register the SCA device. You obtain this + * information by using Adyen's authentication SDK. + * + * @param sdkOutput A base64-encoded block with the data required to register the SCA device. You + * obtain this information by using Adyen's authentication SDK. + * @return the current {@code BeginScaDeviceRegistrationRequest} instance, allowing for method + * chaining + */ + public BeginScaDeviceRegistrationRequest sdkOutput(String sdkOutput) { + this.sdkOutput = sdkOutput; + return this; + } + + /** + * A base64-encoded block with the data required to register the SCA device. You obtain this + * information by using Adyen's authentication SDK. + * + * @return sdkOutput A base64-encoded block with the data required to register the SCA device. You + * obtain this information by using Adyen's authentication SDK. + */ + @JsonProperty(JSON_PROPERTY_SDK_OUTPUT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getSdkOutput() { + return sdkOutput; + } + + /** + * A base64-encoded block with the data required to register the SCA device. You obtain this + * information by using Adyen's authentication SDK. + * + * @param sdkOutput A base64-encoded block with the data required to register the SCA device. You + * obtain this information by using Adyen's authentication SDK. + */ + @JsonProperty(JSON_PROPERTY_SDK_OUTPUT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSdkOutput(String sdkOutput) { + this.sdkOutput = sdkOutput; + } + + /** Return true if this BeginScaDeviceRegistrationRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + BeginScaDeviceRegistrationRequest beginScaDeviceRegistrationRequest = + (BeginScaDeviceRegistrationRequest) o; + return Objects.equals(this.name, beginScaDeviceRegistrationRequest.name) + && Objects.equals(this.sdkOutput, beginScaDeviceRegistrationRequest.sdkOutput); + } + + @Override + public int hashCode() { + return Objects.hash(name, sdkOutput); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class BeginScaDeviceRegistrationRequest {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" sdkOutput: ").append(toIndentedString(sdkOutput)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Create an instance of BeginScaDeviceRegistrationRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of BeginScaDeviceRegistrationRequest + * @throws JsonProcessingException if the JSON string is invalid with respect to + * BeginScaDeviceRegistrationRequest + */ + public static BeginScaDeviceRegistrationRequest fromJson(String jsonString) + throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, BeginScaDeviceRegistrationRequest.class); + } + + /** + * Convert an instance of BeginScaDeviceRegistrationRequest 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/balanceplatform/BeginScaDeviceRegistrationResponse.java b/src/main/java/com/adyen/model/balanceplatform/BeginScaDeviceRegistrationResponse.java new file mode 100644 index 000000000..21eb14e82 --- /dev/null +++ b/src/main/java/com/adyen/model/balanceplatform/BeginScaDeviceRegistrationResponse.java @@ -0,0 +1,169 @@ +/* + * Configuration API + * + * The version of the OpenAPI document: 2 + * + * + * 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.balanceplatform; + +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.*; + +/** BeginScaDeviceRegistrationResponse */ +@JsonPropertyOrder({ + BeginScaDeviceRegistrationResponse.JSON_PROPERTY_SCA_DEVICE, + BeginScaDeviceRegistrationResponse.JSON_PROPERTY_SDK_INPUT +}) +public class BeginScaDeviceRegistrationResponse { + public static final String JSON_PROPERTY_SCA_DEVICE = "scaDevice"; + private ScaDevice scaDevice; + + public static final String JSON_PROPERTY_SDK_INPUT = "sdkInput"; + private String sdkInput; + + public BeginScaDeviceRegistrationResponse() {} + + /** + * scaDevice + * + * @param scaDevice + * @return the current {@code BeginScaDeviceRegistrationResponse} instance, allowing for method + * chaining + */ + public BeginScaDeviceRegistrationResponse scaDevice(ScaDevice scaDevice) { + this.scaDevice = scaDevice; + return this; + } + + /** + * Get scaDevice + * + * @return scaDevice + */ + @JsonProperty(JSON_PROPERTY_SCA_DEVICE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public ScaDevice getScaDevice() { + return scaDevice; + } + + /** + * scaDevice + * + * @param scaDevice + */ + @JsonProperty(JSON_PROPERTY_SCA_DEVICE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setScaDevice(ScaDevice scaDevice) { + this.scaDevice = scaDevice; + } + + /** + * A string that you must pass to the authentication SDK to continue with the registration + * process. + * + * @param sdkInput A string that you must pass to the authentication SDK to continue with the + * registration process. + * @return the current {@code BeginScaDeviceRegistrationResponse} instance, allowing for method + * chaining + */ + public BeginScaDeviceRegistrationResponse sdkInput(String sdkInput) { + this.sdkInput = sdkInput; + return this; + } + + /** + * A string that you must pass to the authentication SDK to continue with the registration + * process. + * + * @return sdkInput A string that you must pass to the authentication SDK to continue with the + * registration process. + */ + @JsonProperty(JSON_PROPERTY_SDK_INPUT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getSdkInput() { + return sdkInput; + } + + /** + * A string that you must pass to the authentication SDK to continue with the registration + * process. + * + * @param sdkInput A string that you must pass to the authentication SDK to continue with the + * registration process. + */ + @JsonProperty(JSON_PROPERTY_SDK_INPUT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSdkInput(String sdkInput) { + this.sdkInput = sdkInput; + } + + /** Return true if this BeginScaDeviceRegistrationResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + BeginScaDeviceRegistrationResponse beginScaDeviceRegistrationResponse = + (BeginScaDeviceRegistrationResponse) o; + return Objects.equals(this.scaDevice, beginScaDeviceRegistrationResponse.scaDevice) + && Objects.equals(this.sdkInput, beginScaDeviceRegistrationResponse.sdkInput); + } + + @Override + public int hashCode() { + return Objects.hash(scaDevice, sdkInput); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class BeginScaDeviceRegistrationResponse {\n"); + sb.append(" scaDevice: ").append(toIndentedString(scaDevice)).append("\n"); + sb.append(" sdkInput: ").append(toIndentedString(sdkInput)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Create an instance of BeginScaDeviceRegistrationResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of BeginScaDeviceRegistrationResponse + * @throws JsonProcessingException if the JSON string is invalid with respect to + * BeginScaDeviceRegistrationResponse + */ + public static BeginScaDeviceRegistrationResponse fromJson(String jsonString) + throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, BeginScaDeviceRegistrationResponse.class); + } + + /** + * Convert an instance of BeginScaDeviceRegistrationResponse 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/balanceplatform/FinishScaDeviceRegistrationRequest.java b/src/main/java/com/adyen/model/balanceplatform/FinishScaDeviceRegistrationRequest.java new file mode 100644 index 000000000..e6a010450 --- /dev/null +++ b/src/main/java/com/adyen/model/balanceplatform/FinishScaDeviceRegistrationRequest.java @@ -0,0 +1,127 @@ +/* + * Configuration API + * + * The version of the OpenAPI document: 2 + * + * + * 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.balanceplatform; + +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.*; + +/** FinishScaDeviceRegistrationRequest */ +@JsonPropertyOrder({FinishScaDeviceRegistrationRequest.JSON_PROPERTY_SDK_OUTPUT}) +public class FinishScaDeviceRegistrationRequest { + public static final String JSON_PROPERTY_SDK_OUTPUT = "sdkOutput"; + private String sdkOutput; + + public FinishScaDeviceRegistrationRequest() {} + + /** + * A base64-encoded block with the data required to register the SCA device. You obtain this + * information by using Adyen's authentication SDK. + * + * @param sdkOutput A base64-encoded block with the data required to register the SCA device. You + * obtain this information by using Adyen's authentication SDK. + * @return the current {@code FinishScaDeviceRegistrationRequest} instance, allowing for method + * chaining + */ + public FinishScaDeviceRegistrationRequest sdkOutput(String sdkOutput) { + this.sdkOutput = sdkOutput; + return this; + } + + /** + * A base64-encoded block with the data required to register the SCA device. You obtain this + * information by using Adyen's authentication SDK. + * + * @return sdkOutput A base64-encoded block with the data required to register the SCA device. You + * obtain this information by using Adyen's authentication SDK. + */ + @JsonProperty(JSON_PROPERTY_SDK_OUTPUT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getSdkOutput() { + return sdkOutput; + } + + /** + * A base64-encoded block with the data required to register the SCA device. You obtain this + * information by using Adyen's authentication SDK. + * + * @param sdkOutput A base64-encoded block with the data required to register the SCA device. You + * obtain this information by using Adyen's authentication SDK. + */ + @JsonProperty(JSON_PROPERTY_SDK_OUTPUT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSdkOutput(String sdkOutput) { + this.sdkOutput = sdkOutput; + } + + /** Return true if this FinishScaDeviceRegistrationRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FinishScaDeviceRegistrationRequest finishScaDeviceRegistrationRequest = + (FinishScaDeviceRegistrationRequest) o; + return Objects.equals(this.sdkOutput, finishScaDeviceRegistrationRequest.sdkOutput); + } + + @Override + public int hashCode() { + return Objects.hash(sdkOutput); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FinishScaDeviceRegistrationRequest {\n"); + sb.append(" sdkOutput: ").append(toIndentedString(sdkOutput)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Create an instance of FinishScaDeviceRegistrationRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of FinishScaDeviceRegistrationRequest + * @throws JsonProcessingException if the JSON string is invalid with respect to + * FinishScaDeviceRegistrationRequest + */ + public static FinishScaDeviceRegistrationRequest fromJson(String jsonString) + throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, FinishScaDeviceRegistrationRequest.class); + } + + /** + * Convert an instance of FinishScaDeviceRegistrationRequest 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/balanceplatform/FinishScaDeviceRegistrationResponse.java b/src/main/java/com/adyen/model/balanceplatform/FinishScaDeviceRegistrationResponse.java new file mode 100644 index 000000000..201bd5cd0 --- /dev/null +++ b/src/main/java/com/adyen/model/balanceplatform/FinishScaDeviceRegistrationResponse.java @@ -0,0 +1,121 @@ +/* + * Configuration API + * + * The version of the OpenAPI document: 2 + * + * + * 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.balanceplatform; + +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.*; + +/** FinishScaDeviceRegistrationResponse */ +@JsonPropertyOrder({FinishScaDeviceRegistrationResponse.JSON_PROPERTY_SCA_DEVICE}) +public class FinishScaDeviceRegistrationResponse { + public static final String JSON_PROPERTY_SCA_DEVICE = "scaDevice"; + private ScaDevice scaDevice; + + public FinishScaDeviceRegistrationResponse() {} + + /** + * scaDevice + * + * @param scaDevice + * @return the current {@code FinishScaDeviceRegistrationResponse} instance, allowing for method + * chaining + */ + public FinishScaDeviceRegistrationResponse scaDevice(ScaDevice scaDevice) { + this.scaDevice = scaDevice; + return this; + } + + /** + * Get scaDevice + * + * @return scaDevice + */ + @JsonProperty(JSON_PROPERTY_SCA_DEVICE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public ScaDevice getScaDevice() { + return scaDevice; + } + + /** + * scaDevice + * + * @param scaDevice + */ + @JsonProperty(JSON_PROPERTY_SCA_DEVICE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setScaDevice(ScaDevice scaDevice) { + this.scaDevice = scaDevice; + } + + /** Return true if this FinishScaDeviceRegistrationResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FinishScaDeviceRegistrationResponse finishScaDeviceRegistrationResponse = + (FinishScaDeviceRegistrationResponse) o; + return Objects.equals(this.scaDevice, finishScaDeviceRegistrationResponse.scaDevice); + } + + @Override + public int hashCode() { + return Objects.hash(scaDevice); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FinishScaDeviceRegistrationResponse {\n"); + sb.append(" scaDevice: ").append(toIndentedString(scaDevice)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Create an instance of FinishScaDeviceRegistrationResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of FinishScaDeviceRegistrationResponse + * @throws JsonProcessingException if the JSON string is invalid with respect to + * FinishScaDeviceRegistrationResponse + */ + public static FinishScaDeviceRegistrationResponse fromJson(String jsonString) + throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, FinishScaDeviceRegistrationResponse.class); + } + + /** + * Convert an instance of FinishScaDeviceRegistrationResponse 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/balanceplatform/ListAssociationsResponse.java b/src/main/java/com/adyen/model/balanceplatform/ListAssociationsResponse.java new file mode 100644 index 000000000..8b2f837fa --- /dev/null +++ b/src/main/java/com/adyen/model/balanceplatform/ListAssociationsResponse.java @@ -0,0 +1,248 @@ +/* + * Configuration API + * + * The version of the OpenAPI document: 2 + * + * + * 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.balanceplatform; + +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; + +/** ListAssociationsResponse */ +@JsonPropertyOrder({ + ListAssociationsResponse.JSON_PROPERTY_LINKS, + ListAssociationsResponse.JSON_PROPERTY_DATA, + ListAssociationsResponse.JSON_PROPERTY_ITEMS_TOTAL, + ListAssociationsResponse.JSON_PROPERTY_PAGES_TOTAL +}) +public class ListAssociationsResponse { + public static final String JSON_PROPERTY_LINKS = "_links"; + private Link links; + + public static final String JSON_PROPERTY_DATA = "data"; + private List data; + + public static final String JSON_PROPERTY_ITEMS_TOTAL = "itemsTotal"; + private Integer itemsTotal; + + public static final String JSON_PROPERTY_PAGES_TOTAL = "pagesTotal"; + private Integer pagesTotal; + + public ListAssociationsResponse() {} + + /** + * links + * + * @param links + * @return the current {@code ListAssociationsResponse} instance, allowing for method chaining + */ + public ListAssociationsResponse links(Link links) { + this.links = links; + return this; + } + + /** + * Get links + * + * @return links + */ + @JsonProperty(JSON_PROPERTY_LINKS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Link getLinks() { + return links; + } + + /** + * links + * + * @param links + */ + @JsonProperty(JSON_PROPERTY_LINKS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setLinks(Link links) { + this.links = links; + } + + /** + * Contains a list of associations and their corresponding details. + * + * @param data Contains a list of associations and their corresponding details. + * @return the current {@code ListAssociationsResponse} instance, allowing for method chaining + */ + public ListAssociationsResponse data(List data) { + this.data = data; + return this; + } + + public ListAssociationsResponse addDataItem(AssociationListing dataItem) { + if (this.data == null) { + this.data = new ArrayList<>(); + } + this.data.add(dataItem); + return this; + } + + /** + * Contains a list of associations and their corresponding details. + * + * @return data Contains a list of associations and their corresponding details. + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getData() { + return data; + } + + /** + * Contains a list of associations and their corresponding details. + * + * @param data Contains a list of associations and their corresponding details. + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setData(List data) { + this.data = data; + } + + /** + * The total number of items available. + * + * @param itemsTotal The total number of items available. + * @return the current {@code ListAssociationsResponse} instance, allowing for method chaining + */ + public ListAssociationsResponse itemsTotal(Integer itemsTotal) { + this.itemsTotal = itemsTotal; + return this; + } + + /** + * The total number of items available. + * + * @return itemsTotal The total number of items available. + */ + @JsonProperty(JSON_PROPERTY_ITEMS_TOTAL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getItemsTotal() { + return itemsTotal; + } + + /** + * The total number of items available. + * + * @param itemsTotal The total number of items available. + */ + @JsonProperty(JSON_PROPERTY_ITEMS_TOTAL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setItemsTotal(Integer itemsTotal) { + this.itemsTotal = itemsTotal; + } + + /** + * The total number of pages available. + * + * @param pagesTotal The total number of pages available. + * @return the current {@code ListAssociationsResponse} instance, allowing for method chaining + */ + public ListAssociationsResponse pagesTotal(Integer pagesTotal) { + this.pagesTotal = pagesTotal; + return this; + } + + /** + * The total number of pages available. + * + * @return pagesTotal The total number of pages available. + */ + @JsonProperty(JSON_PROPERTY_PAGES_TOTAL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getPagesTotal() { + return pagesTotal; + } + + /** + * The total number of pages available. + * + * @param pagesTotal The total number of pages available. + */ + @JsonProperty(JSON_PROPERTY_PAGES_TOTAL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPagesTotal(Integer pagesTotal) { + this.pagesTotal = pagesTotal; + } + + /** Return true if this ListAssociationsResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ListAssociationsResponse listAssociationsResponse = (ListAssociationsResponse) o; + return Objects.equals(this.links, listAssociationsResponse.links) + && Objects.equals(this.data, listAssociationsResponse.data) + && Objects.equals(this.itemsTotal, listAssociationsResponse.itemsTotal) + && Objects.equals(this.pagesTotal, listAssociationsResponse.pagesTotal); + } + + @Override + public int hashCode() { + return Objects.hash(links, data, itemsTotal, pagesTotal); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ListAssociationsResponse {\n"); + sb.append(" links: ").append(toIndentedString(links)).append("\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" itemsTotal: ").append(toIndentedString(itemsTotal)).append("\n"); + sb.append(" pagesTotal: ").append(toIndentedString(pagesTotal)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Create an instance of ListAssociationsResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of ListAssociationsResponse + * @throws JsonProcessingException if the JSON string is invalid with respect to + * ListAssociationsResponse + */ + public static ListAssociationsResponse fromJson(String jsonString) + throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, ListAssociationsResponse.class); + } + + /** + * Convert an instance of ListAssociationsResponse 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/balanceplatform/RemoveAssociationRequest.java b/src/main/java/com/adyen/model/balanceplatform/RemoveAssociationRequest.java new file mode 100644 index 000000000..db98f637e --- /dev/null +++ b/src/main/java/com/adyen/model/balanceplatform/RemoveAssociationRequest.java @@ -0,0 +1,209 @@ +/* + * Configuration API + * + * The version of the OpenAPI document: 2 + * + * + * 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.balanceplatform; + +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; + +/** RemoveAssociationRequest */ +@JsonPropertyOrder({ + RemoveAssociationRequest.JSON_PROPERTY_ENTITY_ID, + RemoveAssociationRequest.JSON_PROPERTY_ENTITY_TYPE, + RemoveAssociationRequest.JSON_PROPERTY_SCA_DEVICE_IDS +}) +public class RemoveAssociationRequest { + public static final String JSON_PROPERTY_ENTITY_ID = "entityId"; + private String entityId; + + public static final String JSON_PROPERTY_ENTITY_TYPE = "entityType"; + private ScaEntityType entityType; + + public static final String JSON_PROPERTY_SCA_DEVICE_IDS = "scaDeviceIds"; + private List scaDeviceIds; + + public RemoveAssociationRequest() {} + + /** + * The unique identifier of the entity. + * + * @param entityId The unique identifier of the entity. + * @return the current {@code RemoveAssociationRequest} instance, allowing for method chaining + */ + public RemoveAssociationRequest entityId(String entityId) { + this.entityId = entityId; + return this; + } + + /** + * The unique identifier of the entity. + * + * @return entityId The unique identifier of the entity. + */ + @JsonProperty(JSON_PROPERTY_ENTITY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getEntityId() { + return entityId; + } + + /** + * The unique identifier of the entity. + * + * @param entityId The unique identifier of the entity. + */ + @JsonProperty(JSON_PROPERTY_ENTITY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEntityId(String entityId) { + this.entityId = entityId; + } + + /** + * entityType + * + * @param entityType + * @return the current {@code RemoveAssociationRequest} instance, allowing for method chaining + */ + public RemoveAssociationRequest entityType(ScaEntityType entityType) { + this.entityType = entityType; + return this; + } + + /** + * Get entityType + * + * @return entityType + */ + @JsonProperty(JSON_PROPERTY_ENTITY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public ScaEntityType getEntityType() { + return entityType; + } + + /** + * entityType + * + * @param entityType + */ + @JsonProperty(JSON_PROPERTY_ENTITY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEntityType(ScaEntityType entityType) { + this.entityType = entityType; + } + + /** + * A list of device ids associated with the entity that should be removed. + * + * @param scaDeviceIds A list of device ids associated with the entity that should be removed. + * @return the current {@code RemoveAssociationRequest} instance, allowing for method chaining + */ + public RemoveAssociationRequest scaDeviceIds(List scaDeviceIds) { + this.scaDeviceIds = scaDeviceIds; + return this; + } + + public RemoveAssociationRequest addScaDeviceIdsItem(String scaDeviceIdsItem) { + if (this.scaDeviceIds == null) { + this.scaDeviceIds = new ArrayList<>(); + } + this.scaDeviceIds.add(scaDeviceIdsItem); + return this; + } + + /** + * A list of device ids associated with the entity that should be removed. + * + * @return scaDeviceIds A list of device ids associated with the entity that should be removed. + */ + @JsonProperty(JSON_PROPERTY_SCA_DEVICE_IDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getScaDeviceIds() { + return scaDeviceIds; + } + + /** + * A list of device ids associated with the entity that should be removed. + * + * @param scaDeviceIds A list of device ids associated with the entity that should be removed. + */ + @JsonProperty(JSON_PROPERTY_SCA_DEVICE_IDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setScaDeviceIds(List scaDeviceIds) { + this.scaDeviceIds = scaDeviceIds; + } + + /** Return true if this RemoveAssociationRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RemoveAssociationRequest removeAssociationRequest = (RemoveAssociationRequest) o; + return Objects.equals(this.entityId, removeAssociationRequest.entityId) + && Objects.equals(this.entityType, removeAssociationRequest.entityType) + && Objects.equals(this.scaDeviceIds, removeAssociationRequest.scaDeviceIds); + } + + @Override + public int hashCode() { + return Objects.hash(entityId, entityType, scaDeviceIds); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RemoveAssociationRequest {\n"); + sb.append(" entityId: ").append(toIndentedString(entityId)).append("\n"); + sb.append(" entityType: ").append(toIndentedString(entityType)).append("\n"); + sb.append(" scaDeviceIds: ").append(toIndentedString(scaDeviceIds)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Create an instance of RemoveAssociationRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of RemoveAssociationRequest + * @throws JsonProcessingException if the JSON string is invalid with respect to + * RemoveAssociationRequest + */ + public static RemoveAssociationRequest fromJson(String jsonString) + throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, RemoveAssociationRequest.class); + } + + /** + * Convert an instance of RemoveAssociationRequest 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/balanceplatform/ScaDevice.java b/src/main/java/com/adyen/model/balanceplatform/ScaDevice.java new file mode 100644 index 000000000..774e5178d --- /dev/null +++ b/src/main/java/com/adyen/model/balanceplatform/ScaDevice.java @@ -0,0 +1,203 @@ +/* + * Configuration API + * + * The version of the OpenAPI document: 2 + * + * + * 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.balanceplatform; + +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 resource that contains information about a device, including its unique ID, name, and type. */ +@JsonPropertyOrder({ + ScaDevice.JSON_PROPERTY_ID, + ScaDevice.JSON_PROPERTY_NAME, + ScaDevice.JSON_PROPERTY_TYPE +}) +public class ScaDevice { + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public static final String JSON_PROPERTY_TYPE = "type"; + private ScaDeviceType type; + + public ScaDevice() {} + + /** + * The unique identifier of the SCA device you are registering. + * + * @param id The unique identifier of the SCA device you are registering. + * @return the current {@code ScaDevice} instance, allowing for method chaining + */ + public ScaDevice id(String id) { + this.id = id; + return this; + } + + /** + * The unique identifier of the SCA device you are registering. + * + * @return id The unique identifier of the SCA device you are registering. + */ + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getId() { + return id; + } + + /** + * The unique identifier of the SCA device you are registering. + * + * @param id The unique identifier of the SCA device you are registering. + */ + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setId(String id) { + this.id = id; + } + + /** + * The name of the SCA device that you are registering. You can use it to help your users identify + * the device. + * + * @param name The name of the SCA device that you are registering. You can use it to help your + * users identify the device. + * @return the current {@code ScaDevice} instance, allowing for method chaining + */ + public ScaDevice name(String name) { + this.name = name; + return this; + } + + /** + * The name of the SCA device that you are registering. You can use it to help your users identify + * the device. + * + * @return name The name of the SCA device that you are registering. You can use it to help your + * users identify the device. + */ + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getName() { + return name; + } + + /** + * The name of the SCA device that you are registering. You can use it to help your users identify + * the device. + * + * @param name The name of the SCA device that you are registering. You can use it to help your + * users identify the device. + */ + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setName(String name) { + this.name = name; + } + + /** + * type + * + * @param type + * @return the current {@code ScaDevice} instance, allowing for method chaining + */ + public ScaDevice type(ScaDeviceType type) { + this.type = type; + return this; + } + + /** + * Get type + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public ScaDeviceType getType() { + return type; + } + + /** + * type + * + * @param type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setType(ScaDeviceType type) { + this.type = type; + } + + /** Return true if this ScaDevice object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ScaDevice scaDevice = (ScaDevice) o; + return Objects.equals(this.id, scaDevice.id) + && Objects.equals(this.name, scaDevice.name) + && Objects.equals(this.type, scaDevice.type); + } + + @Override + public int hashCode() { + return Objects.hash(id, name, type); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ScaDevice {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\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 "); + } + + /** + * Create an instance of ScaDevice given an JSON string + * + * @param jsonString JSON string + * @return An instance of ScaDevice + * @throws JsonProcessingException if the JSON string is invalid with respect to ScaDevice + */ + public static ScaDevice fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, ScaDevice.class); + } + + /** + * Convert an instance of ScaDevice 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/balanceplatform/ScaDeviceType.java b/src/main/java/com/adyen/model/balanceplatform/ScaDeviceType.java new file mode 100644 index 000000000..8f1613422 --- /dev/null +++ b/src/main/java/com/adyen/model/balanceplatform/ScaDeviceType.java @@ -0,0 +1,51 @@ +/* + * Configuration API + * + * The version of the OpenAPI document: 2 + * + * + * 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.balanceplatform; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.*; + +/** Gets or Sets ScaDeviceType */ +public enum ScaDeviceType { + BROWSER("browser"), + + IOS("ios"), + + ANDROID("android"); + + private String value; + + ScaDeviceType(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static ScaDeviceType fromValue(String value) { + for (ScaDeviceType b : ScaDeviceType.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } +} diff --git a/src/main/java/com/adyen/model/balanceplatform/ScaEntity.java b/src/main/java/com/adyen/model/balanceplatform/ScaEntity.java new file mode 100644 index 000000000..67442f106 --- /dev/null +++ b/src/main/java/com/adyen/model/balanceplatform/ScaEntity.java @@ -0,0 +1,154 @@ +/* + * Configuration API + * + * The version of the OpenAPI document: 2 + * + * + * 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.balanceplatform; + +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.*; + +/** ScaEntity */ +@JsonPropertyOrder({ScaEntity.JSON_PROPERTY_ID, ScaEntity.JSON_PROPERTY_TYPE}) +public class ScaEntity { + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private ScaEntityType type; + + public ScaEntity() {} + + /** + * The unique identifier of the entity. + * + * @param id The unique identifier of the entity. + * @return the current {@code ScaEntity} instance, allowing for method chaining + */ + public ScaEntity id(String id) { + this.id = id; + return this; + } + + /** + * The unique identifier of the entity. + * + * @return id The unique identifier of the entity. + */ + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getId() { + return id; + } + + /** + * The unique identifier of the entity. + * + * @param id The unique identifier of the entity. + */ + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setId(String id) { + this.id = id; + } + + /** + * type + * + * @param type + * @return the current {@code ScaEntity} instance, allowing for method chaining + */ + public ScaEntity type(ScaEntityType type) { + this.type = type; + return this; + } + + /** + * Get type + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public ScaEntityType getType() { + return type; + } + + /** + * type + * + * @param type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setType(ScaEntityType type) { + this.type = type; + } + + /** Return true if this ScaEntity object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ScaEntity scaEntity = (ScaEntity) o; + return Objects.equals(this.id, scaEntity.id) && Objects.equals(this.type, scaEntity.type); + } + + @Override + public int hashCode() { + return Objects.hash(id, type); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ScaEntity {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\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 "); + } + + /** + * Create an instance of ScaEntity given an JSON string + * + * @param jsonString JSON string + * @return An instance of ScaEntity + * @throws JsonProcessingException if the JSON string is invalid with respect to ScaEntity + */ + public static ScaEntity fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, ScaEntity.class); + } + + /** + * Convert an instance of ScaEntity 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/balanceplatform/ScaEntityType.java b/src/main/java/com/adyen/model/balanceplatform/ScaEntityType.java new file mode 100644 index 000000000..3c23a8859 --- /dev/null +++ b/src/main/java/com/adyen/model/balanceplatform/ScaEntityType.java @@ -0,0 +1,49 @@ +/* + * Configuration API + * + * The version of the OpenAPI document: 2 + * + * + * 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.balanceplatform; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.*; + +/** Gets or Sets ScaEntityType */ +public enum ScaEntityType { + ACCOUNTHOLDER("accountHolder"), + + PAYMENTINSTRUMENT("paymentInstrument"); + + private String value; + + ScaEntityType(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static ScaEntityType fromValue(String value) { + for (ScaEntityType b : ScaEntityType.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } +} diff --git a/src/main/java/com/adyen/model/balanceplatform/SubmitScaAssociationRequest.java b/src/main/java/com/adyen/model/balanceplatform/SubmitScaAssociationRequest.java new file mode 100644 index 000000000..a52b29041 --- /dev/null +++ b/src/main/java/com/adyen/model/balanceplatform/SubmitScaAssociationRequest.java @@ -0,0 +1,129 @@ +/* + * Configuration API + * + * The version of the OpenAPI document: 2 + * + * + * 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.balanceplatform; + +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; + +/** SubmitScaAssociationRequest */ +@JsonPropertyOrder({SubmitScaAssociationRequest.JSON_PROPERTY_ENTITIES}) +public class SubmitScaAssociationRequest { + public static final String JSON_PROPERTY_ENTITIES = "entities"; + private List entities; + + public SubmitScaAssociationRequest() {} + + /** + * The list of entities to be associated. + * + * @param entities The list of entities to be associated. + * @return the current {@code SubmitScaAssociationRequest} instance, allowing for method chaining + */ + public SubmitScaAssociationRequest entities(List entities) { + this.entities = entities; + return this; + } + + public SubmitScaAssociationRequest addEntitiesItem(ScaEntity entitiesItem) { + if (this.entities == null) { + this.entities = new ArrayList<>(); + } + this.entities.add(entitiesItem); + return this; + } + + /** + * The list of entities to be associated. + * + * @return entities The list of entities to be associated. + */ + @JsonProperty(JSON_PROPERTY_ENTITIES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getEntities() { + return entities; + } + + /** + * The list of entities to be associated. + * + * @param entities The list of entities to be associated. + */ + @JsonProperty(JSON_PROPERTY_ENTITIES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEntities(List entities) { + this.entities = entities; + } + + /** Return true if this SubmitScaAssociationRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SubmitScaAssociationRequest submitScaAssociationRequest = (SubmitScaAssociationRequest) o; + return Objects.equals(this.entities, submitScaAssociationRequest.entities); + } + + @Override + public int hashCode() { + return Objects.hash(entities); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SubmitScaAssociationRequest {\n"); + sb.append(" entities: ").append(toIndentedString(entities)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Create an instance of SubmitScaAssociationRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of SubmitScaAssociationRequest + * @throws JsonProcessingException if the JSON string is invalid with respect to + * SubmitScaAssociationRequest + */ + public static SubmitScaAssociationRequest fromJson(String jsonString) + throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, SubmitScaAssociationRequest.class); + } + + /** + * Convert an instance of SubmitScaAssociationRequest 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/balanceplatform/SubmitScaAssociationResponse.java b/src/main/java/com/adyen/model/balanceplatform/SubmitScaAssociationResponse.java new file mode 100644 index 000000000..3de49bf54 --- /dev/null +++ b/src/main/java/com/adyen/model/balanceplatform/SubmitScaAssociationResponse.java @@ -0,0 +1,129 @@ +/* + * Configuration API + * + * The version of the OpenAPI document: 2 + * + * + * 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.balanceplatform; + +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; + +/** SubmitScaAssociationResponse */ +@JsonPropertyOrder({SubmitScaAssociationResponse.JSON_PROPERTY_SCA_ASSOCIATIONS}) +public class SubmitScaAssociationResponse { + public static final String JSON_PROPERTY_SCA_ASSOCIATIONS = "scaAssociations"; + private List scaAssociations; + + public SubmitScaAssociationResponse() {} + + /** + * List of associations created to the entities and their statuses. + * + * @param scaAssociations List of associations created to the entities and their statuses. + * @return the current {@code SubmitScaAssociationResponse} instance, allowing for method chaining + */ + public SubmitScaAssociationResponse scaAssociations(List scaAssociations) { + this.scaAssociations = scaAssociations; + return this; + } + + public SubmitScaAssociationResponse addScaAssociationsItem(Association scaAssociationsItem) { + if (this.scaAssociations == null) { + this.scaAssociations = new ArrayList<>(); + } + this.scaAssociations.add(scaAssociationsItem); + return this; + } + + /** + * List of associations created to the entities and their statuses. + * + * @return scaAssociations List of associations created to the entities and their statuses. + */ + @JsonProperty(JSON_PROPERTY_SCA_ASSOCIATIONS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getScaAssociations() { + return scaAssociations; + } + + /** + * List of associations created to the entities and their statuses. + * + * @param scaAssociations List of associations created to the entities and their statuses. + */ + @JsonProperty(JSON_PROPERTY_SCA_ASSOCIATIONS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setScaAssociations(List scaAssociations) { + this.scaAssociations = scaAssociations; + } + + /** Return true if this SubmitScaAssociationResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SubmitScaAssociationResponse submitScaAssociationResponse = (SubmitScaAssociationResponse) o; + return Objects.equals(this.scaAssociations, submitScaAssociationResponse.scaAssociations); + } + + @Override + public int hashCode() { + return Objects.hash(scaAssociations); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SubmitScaAssociationResponse {\n"); + sb.append(" scaAssociations: ").append(toIndentedString(scaAssociations)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Create an instance of SubmitScaAssociationResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of SubmitScaAssociationResponse + * @throws JsonProcessingException if the JSON string is invalid with respect to + * SubmitScaAssociationResponse + */ + public static SubmitScaAssociationResponse fromJson(String jsonString) + throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, SubmitScaAssociationResponse.class); + } + + /** + * Convert an instance of SubmitScaAssociationResponse 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/balanceplatform/TransactionRule.java b/src/main/java/com/adyen/model/balanceplatform/TransactionRule.java index c9473bd3a..55cbd7732 100644 --- a/src/main/java/com/adyen/model/balanceplatform/TransactionRule.java +++ b/src/main/java/com/adyen/model/balanceplatform/TransactionRule.java @@ -59,11 +59,14 @@ public class TransactionRule { /** * The [outcome](https://docs.adyen.com/issuing/transaction-rules#outcome) that will be applied - * when a transaction meets the conditions of the rule. Possible values: * **hardBlock**: the - * transaction is declined. * **scoreBased**: the transaction is assigned the `score` - * you specified. Adyen calculates the total score and if it exceeds 100, the transaction is - * declined. Default value: **hardBlock**. > **scoreBased** is not allowed when - * `requestType` is **bankTransfer**. + * when a transaction meets the conditions of the rule. Possible values: * **hardBlock** + * (default): the transaction is declined. * **scoreBased**: the transaction is assigned the + * `score` you specified. Adyen calculates the total score and if it exceeds 100, the + * transaction is declined. This value is not allowed when `requestType` is + * **bankTransfer**. * **enforceSCA**: your user is prompted to verify their identity using [3D + * Secure authentication](https://docs.adyen.com/issuing/3d-secure/). If the authentication fails + * or times out, the transaction is declined. This value is only allowed when + * `requestType` is **authentication**. */ public enum OutcomeTypeEnum { ENFORCESCA(String.valueOf("enforceSCA")), @@ -524,18 +527,25 @@ public void setInterval(TransactionRuleInterval interval) { /** * The [outcome](https://docs.adyen.com/issuing/transaction-rules#outcome) that will be applied - * when a transaction meets the conditions of the rule. Possible values: * **hardBlock**: the - * transaction is declined. * **scoreBased**: the transaction is assigned the `score` - * you specified. Adyen calculates the total score and if it exceeds 100, the transaction is - * declined. Default value: **hardBlock**. > **scoreBased** is not allowed when - * `requestType` is **bankTransfer**. + * when a transaction meets the conditions of the rule. Possible values: * **hardBlock** + * (default): the transaction is declined. * **scoreBased**: the transaction is assigned the + * `score` you specified. Adyen calculates the total score and if it exceeds 100, the + * transaction is declined. This value is not allowed when `requestType` is + * **bankTransfer**. * **enforceSCA**: your user is prompted to verify their identity using [3D + * Secure authentication](https://docs.adyen.com/issuing/3d-secure/). If the authentication fails + * or times out, the transaction is declined. This value is only allowed when + * `requestType` is **authentication**. * * @param outcomeType The [outcome](https://docs.adyen.com/issuing/transaction-rules#outcome) that * will be applied when a transaction meets the conditions of the rule. Possible values: * - * **hardBlock**: the transaction is declined. * **scoreBased**: the transaction is assigned - * the `score` you specified. Adyen calculates the total score and if it exceeds - * 100, the transaction is declined. Default value: **hardBlock**. > **scoreBased** is not - * allowed when `requestType` is **bankTransfer**. + * **hardBlock** (default): the transaction is declined. * **scoreBased**: the transaction is + * assigned the `score` you specified. Adyen calculates the total score and if it + * exceeds 100, the transaction is declined. This value is not allowed when + * `requestType` is **bankTransfer**. * **enforceSCA**: your user is prompted to + * verify their identity using [3D Secure + * authentication](https://docs.adyen.com/issuing/3d-secure/). If the authentication fails or + * times out, the transaction is declined. This value is only allowed when + * `requestType` is **authentication**. * @return the current {@code TransactionRule} instance, allowing for method chaining */ public TransactionRule outcomeType(OutcomeTypeEnum outcomeType) { @@ -545,18 +555,25 @@ public TransactionRule outcomeType(OutcomeTypeEnum outcomeType) { /** * The [outcome](https://docs.adyen.com/issuing/transaction-rules#outcome) that will be applied - * when a transaction meets the conditions of the rule. Possible values: * **hardBlock**: the - * transaction is declined. * **scoreBased**: the transaction is assigned the `score` - * you specified. Adyen calculates the total score and if it exceeds 100, the transaction is - * declined. Default value: **hardBlock**. > **scoreBased** is not allowed when - * `requestType` is **bankTransfer**. + * when a transaction meets the conditions of the rule. Possible values: * **hardBlock** + * (default): the transaction is declined. * **scoreBased**: the transaction is assigned the + * `score` you specified. Adyen calculates the total score and if it exceeds 100, the + * transaction is declined. This value is not allowed when `requestType` is + * **bankTransfer**. * **enforceSCA**: your user is prompted to verify their identity using [3D + * Secure authentication](https://docs.adyen.com/issuing/3d-secure/). If the authentication fails + * or times out, the transaction is declined. This value is only allowed when + * `requestType` is **authentication**. * * @return outcomeType The [outcome](https://docs.adyen.com/issuing/transaction-rules#outcome) * that will be applied when a transaction meets the conditions of the rule. Possible values: - * * **hardBlock**: the transaction is declined. * **scoreBased**: the transaction is assigned - * the `score` you specified. Adyen calculates the total score and if it exceeds - * 100, the transaction is declined. Default value: **hardBlock**. > **scoreBased** is not - * allowed when `requestType` is **bankTransfer**. + * * **hardBlock** (default): the transaction is declined. * **scoreBased**: the transaction + * is assigned the `score` you specified. Adyen calculates the total score and if it + * exceeds 100, the transaction is declined. This value is not allowed when + * `requestType` is **bankTransfer**. * **enforceSCA**: your user is prompted to + * verify their identity using [3D Secure + * authentication](https://docs.adyen.com/issuing/3d-secure/). If the authentication fails or + * times out, the transaction is declined. This value is only allowed when + * `requestType` is **authentication**. */ @JsonProperty(JSON_PROPERTY_OUTCOME_TYPE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -566,18 +583,25 @@ public OutcomeTypeEnum getOutcomeType() { /** * The [outcome](https://docs.adyen.com/issuing/transaction-rules#outcome) that will be applied - * when a transaction meets the conditions of the rule. Possible values: * **hardBlock**: the - * transaction is declined. * **scoreBased**: the transaction is assigned the `score` - * you specified. Adyen calculates the total score and if it exceeds 100, the transaction is - * declined. Default value: **hardBlock**. > **scoreBased** is not allowed when - * `requestType` is **bankTransfer**. + * when a transaction meets the conditions of the rule. Possible values: * **hardBlock** + * (default): the transaction is declined. * **scoreBased**: the transaction is assigned the + * `score` you specified. Adyen calculates the total score and if it exceeds 100, the + * transaction is declined. This value is not allowed when `requestType` is + * **bankTransfer**. * **enforceSCA**: your user is prompted to verify their identity using [3D + * Secure authentication](https://docs.adyen.com/issuing/3d-secure/). If the authentication fails + * or times out, the transaction is declined. This value is only allowed when + * `requestType` is **authentication**. * * @param outcomeType The [outcome](https://docs.adyen.com/issuing/transaction-rules#outcome) that * will be applied when a transaction meets the conditions of the rule. Possible values: * - * **hardBlock**: the transaction is declined. * **scoreBased**: the transaction is assigned - * the `score` you specified. Adyen calculates the total score and if it exceeds - * 100, the transaction is declined. Default value: **hardBlock**. > **scoreBased** is not - * allowed when `requestType` is **bankTransfer**. + * **hardBlock** (default): the transaction is declined. * **scoreBased**: the transaction is + * assigned the `score` you specified. Adyen calculates the total score and if it + * exceeds 100, the transaction is declined. This value is not allowed when + * `requestType` is **bankTransfer**. * **enforceSCA**: your user is prompted to + * verify their identity using [3D Secure + * authentication](https://docs.adyen.com/issuing/3d-secure/). If the authentication fails or + * times out, the transaction is declined. This value is only allowed when + * `requestType` is **authentication**. */ @JsonProperty(JSON_PROPERTY_OUTCOME_TYPE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) diff --git a/src/main/java/com/adyen/model/balanceplatform/TransactionRuleInfo.java b/src/main/java/com/adyen/model/balanceplatform/TransactionRuleInfo.java index 5a380710e..f80632c35 100644 --- a/src/main/java/com/adyen/model/balanceplatform/TransactionRuleInfo.java +++ b/src/main/java/com/adyen/model/balanceplatform/TransactionRuleInfo.java @@ -55,11 +55,14 @@ public class TransactionRuleInfo { /** * The [outcome](https://docs.adyen.com/issuing/transaction-rules#outcome) that will be applied - * when a transaction meets the conditions of the rule. Possible values: * **hardBlock**: the - * transaction is declined. * **scoreBased**: the transaction is assigned the `score` - * you specified. Adyen calculates the total score and if it exceeds 100, the transaction is - * declined. Default value: **hardBlock**. > **scoreBased** is not allowed when - * `requestType` is **bankTransfer**. + * when a transaction meets the conditions of the rule. Possible values: * **hardBlock** + * (default): the transaction is declined. * **scoreBased**: the transaction is assigned the + * `score` you specified. Adyen calculates the total score and if it exceeds 100, the + * transaction is declined. This value is not allowed when `requestType` is + * **bankTransfer**. * **enforceSCA**: your user is prompted to verify their identity using [3D + * Secure authentication](https://docs.adyen.com/issuing/3d-secure/). If the authentication fails + * or times out, the transaction is declined. This value is only allowed when + * `requestType` is **authentication**. */ public enum OutcomeTypeEnum { ENFORCESCA(String.valueOf("enforceSCA")), @@ -487,18 +490,25 @@ public void setInterval(TransactionRuleInterval interval) { /** * The [outcome](https://docs.adyen.com/issuing/transaction-rules#outcome) that will be applied - * when a transaction meets the conditions of the rule. Possible values: * **hardBlock**: the - * transaction is declined. * **scoreBased**: the transaction is assigned the `score` - * you specified. Adyen calculates the total score and if it exceeds 100, the transaction is - * declined. Default value: **hardBlock**. > **scoreBased** is not allowed when - * `requestType` is **bankTransfer**. + * when a transaction meets the conditions of the rule. Possible values: * **hardBlock** + * (default): the transaction is declined. * **scoreBased**: the transaction is assigned the + * `score` you specified. Adyen calculates the total score and if it exceeds 100, the + * transaction is declined. This value is not allowed when `requestType` is + * **bankTransfer**. * **enforceSCA**: your user is prompted to verify their identity using [3D + * Secure authentication](https://docs.adyen.com/issuing/3d-secure/). If the authentication fails + * or times out, the transaction is declined. This value is only allowed when + * `requestType` is **authentication**. * * @param outcomeType The [outcome](https://docs.adyen.com/issuing/transaction-rules#outcome) that * will be applied when a transaction meets the conditions of the rule. Possible values: * - * **hardBlock**: the transaction is declined. * **scoreBased**: the transaction is assigned - * the `score` you specified. Adyen calculates the total score and if it exceeds - * 100, the transaction is declined. Default value: **hardBlock**. > **scoreBased** is not - * allowed when `requestType` is **bankTransfer**. + * **hardBlock** (default): the transaction is declined. * **scoreBased**: the transaction is + * assigned the `score` you specified. Adyen calculates the total score and if it + * exceeds 100, the transaction is declined. This value is not allowed when + * `requestType` is **bankTransfer**. * **enforceSCA**: your user is prompted to + * verify their identity using [3D Secure + * authentication](https://docs.adyen.com/issuing/3d-secure/). If the authentication fails or + * times out, the transaction is declined. This value is only allowed when + * `requestType` is **authentication**. * @return the current {@code TransactionRuleInfo} instance, allowing for method chaining */ public TransactionRuleInfo outcomeType(OutcomeTypeEnum outcomeType) { @@ -508,18 +518,25 @@ public TransactionRuleInfo outcomeType(OutcomeTypeEnum outcomeType) { /** * The [outcome](https://docs.adyen.com/issuing/transaction-rules#outcome) that will be applied - * when a transaction meets the conditions of the rule. Possible values: * **hardBlock**: the - * transaction is declined. * **scoreBased**: the transaction is assigned the `score` - * you specified. Adyen calculates the total score and if it exceeds 100, the transaction is - * declined. Default value: **hardBlock**. > **scoreBased** is not allowed when - * `requestType` is **bankTransfer**. + * when a transaction meets the conditions of the rule. Possible values: * **hardBlock** + * (default): the transaction is declined. * **scoreBased**: the transaction is assigned the + * `score` you specified. Adyen calculates the total score and if it exceeds 100, the + * transaction is declined. This value is not allowed when `requestType` is + * **bankTransfer**. * **enforceSCA**: your user is prompted to verify their identity using [3D + * Secure authentication](https://docs.adyen.com/issuing/3d-secure/). If the authentication fails + * or times out, the transaction is declined. This value is only allowed when + * `requestType` is **authentication**. * * @return outcomeType The [outcome](https://docs.adyen.com/issuing/transaction-rules#outcome) * that will be applied when a transaction meets the conditions of the rule. Possible values: - * * **hardBlock**: the transaction is declined. * **scoreBased**: the transaction is assigned - * the `score` you specified. Adyen calculates the total score and if it exceeds - * 100, the transaction is declined. Default value: **hardBlock**. > **scoreBased** is not - * allowed when `requestType` is **bankTransfer**. + * * **hardBlock** (default): the transaction is declined. * **scoreBased**: the transaction + * is assigned the `score` you specified. Adyen calculates the total score and if it + * exceeds 100, the transaction is declined. This value is not allowed when + * `requestType` is **bankTransfer**. * **enforceSCA**: your user is prompted to + * verify their identity using [3D Secure + * authentication](https://docs.adyen.com/issuing/3d-secure/). If the authentication fails or + * times out, the transaction is declined. This value is only allowed when + * `requestType` is **authentication**. */ @JsonProperty(JSON_PROPERTY_OUTCOME_TYPE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -529,18 +546,25 @@ public OutcomeTypeEnum getOutcomeType() { /** * The [outcome](https://docs.adyen.com/issuing/transaction-rules#outcome) that will be applied - * when a transaction meets the conditions of the rule. Possible values: * **hardBlock**: the - * transaction is declined. * **scoreBased**: the transaction is assigned the `score` - * you specified. Adyen calculates the total score and if it exceeds 100, the transaction is - * declined. Default value: **hardBlock**. > **scoreBased** is not allowed when - * `requestType` is **bankTransfer**. + * when a transaction meets the conditions of the rule. Possible values: * **hardBlock** + * (default): the transaction is declined. * **scoreBased**: the transaction is assigned the + * `score` you specified. Adyen calculates the total score and if it exceeds 100, the + * transaction is declined. This value is not allowed when `requestType` is + * **bankTransfer**. * **enforceSCA**: your user is prompted to verify their identity using [3D + * Secure authentication](https://docs.adyen.com/issuing/3d-secure/). If the authentication fails + * or times out, the transaction is declined. This value is only allowed when + * `requestType` is **authentication**. * * @param outcomeType The [outcome](https://docs.adyen.com/issuing/transaction-rules#outcome) that * will be applied when a transaction meets the conditions of the rule. Possible values: * - * **hardBlock**: the transaction is declined. * **scoreBased**: the transaction is assigned - * the `score` you specified. Adyen calculates the total score and if it exceeds - * 100, the transaction is declined. Default value: **hardBlock**. > **scoreBased** is not - * allowed when `requestType` is **bankTransfer**. + * **hardBlock** (default): the transaction is declined. * **scoreBased**: the transaction is + * assigned the `score` you specified. Adyen calculates the total score and if it + * exceeds 100, the transaction is declined. This value is not allowed when + * `requestType` is **bankTransfer**. * **enforceSCA**: your user is prompted to + * verify their identity using [3D Secure + * authentication](https://docs.adyen.com/issuing/3d-secure/). If the authentication fails or + * times out, the transaction is declined. This value is only allowed when + * `requestType` is **authentication**. */ @JsonProperty(JSON_PROPERTY_OUTCOME_TYPE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) From 1d6266d131371be109b755b82ca5eb4d4c9520be Mon Sep 17 00:00:00 2001 From: gcatanese Date: Thu, 30 Oct 2025 16:18:11 +0100 Subject: [PATCH 4/5] Generate BalancePlatform services --- .../balanceplatform/AccountHoldersApi.java | 18 +- .../AuthorizedCardUsersApi.java | 12 +- .../balanceplatform/BalanceAccountsApi.java | 30 ++- .../service/balanceplatform/BalancesApi.java | 16 +- .../BankAccountValidationApi.java | 3 +- .../balanceplatform/CardOrdersApi.java | 7 +- .../balanceplatform/GrantAccountsApi.java | 3 +- .../balanceplatform/GrantOffersApi.java | 6 +- .../balanceplatform/ManageCardPinApi.java | 9 +- .../balanceplatform/ManageScaDevicesApi.java | 18 +- .../balanceplatform/NetworkTokensApi.java | 6 +- .../PaymentInstrumentGroupsApi.java | 9 +- .../PaymentInstrumentsApi.java | 28 ++- .../service/balanceplatform/PlatformApi.java | 9 +- .../ScaAssociationManagementApi.java | 191 ++++++++++++++++++ .../ScaDeviceManagementApi.java | 188 +++++++++++++++++ .../balanceplatform/TransactionRulesApi.java | 12 +- .../balanceplatform/TransferRoutesApi.java | 3 +- 18 files changed, 506 insertions(+), 62 deletions(-) create mode 100644 src/main/java/com/adyen/service/balanceplatform/ScaAssociationManagementApi.java create mode 100644 src/main/java/com/adyen/service/balanceplatform/ScaDeviceManagementApi.java diff --git a/src/main/java/com/adyen/service/balanceplatform/AccountHoldersApi.java b/src/main/java/com/adyen/service/balanceplatform/AccountHoldersApi.java index bc0f5be77..c2e8525b4 100644 --- a/src/main/java/com/adyen/service/balanceplatform/AccountHoldersApi.java +++ b/src/main/java/com/adyen/service/balanceplatform/AccountHoldersApi.java @@ -65,7 +65,8 @@ public AccountHoldersApi(Client client, String baseURL) { */ public AccountHolder createAccountHolder(AccountHolderInfo accountHolderInfo) throws ApiException, IOException { - return createAccountHolder(accountHolderInfo, null); + RequestOptions requestOptions = null; + return createAccountHolder(accountHolderInfo, requestOptions); } /** @@ -95,7 +96,8 @@ public AccountHolder createAccountHolder( * @throws ApiException if fails to make API call */ public AccountHolder getAccountHolder(String id) throws ApiException, IOException { - return getAccountHolder(id, null); + RequestOptions requestOptions = null; + return getAccountHolder(id, requestOptions); } /** @@ -132,7 +134,8 @@ public AccountHolder getAccountHolder(String id, RequestOptions requestOptions) */ public PaginatedBalanceAccountsResponse getAllBalanceAccountsOfAccountHolder(String id) throws ApiException, IOException { - return getAllBalanceAccountsOfAccountHolder(id, null, null, null); + RequestOptions requestOptions = null; + return getAllBalanceAccountsOfAccountHolder(id, null, null, requestOptions); } /** @@ -184,7 +187,8 @@ public PaginatedBalanceAccountsResponse getAllBalanceAccountsOfAccountHolder( */ public TransactionRulesResponse getAllTransactionRulesForAccountHolder(String id) throws ApiException, IOException { - return getAllTransactionRulesForAccountHolder(id, null); + RequestOptions requestOptions = null; + return getAllTransactionRulesForAccountHolder(id, requestOptions); } /** @@ -226,7 +230,8 @@ public TransactionRulesResponse getAllTransactionRulesForAccountHolder( */ public GetTaxFormResponse getTaxForm(String id, String formType, Integer year) throws ApiException, IOException { - return getTaxForm(id, formType, year, null, null); + RequestOptions requestOptions = null; + return getTaxForm(id, formType, year, null, requestOptions); } /** @@ -285,7 +290,8 @@ public GetTaxFormResponse getTaxForm( public AccountHolder updateAccountHolder( String id, AccountHolderUpdateRequest accountHolderUpdateRequest) throws ApiException, IOException { - return updateAccountHolder(id, accountHolderUpdateRequest, null); + RequestOptions requestOptions = null; + return updateAccountHolder(id, accountHolderUpdateRequest, requestOptions); } /** diff --git a/src/main/java/com/adyen/service/balanceplatform/AuthorizedCardUsersApi.java b/src/main/java/com/adyen/service/balanceplatform/AuthorizedCardUsersApi.java index 8dd66cc10..8ce224145 100644 --- a/src/main/java/com/adyen/service/balanceplatform/AuthorizedCardUsersApi.java +++ b/src/main/java/com/adyen/service/balanceplatform/AuthorizedCardUsersApi.java @@ -62,7 +62,8 @@ public AuthorizedCardUsersApi(Client client, String baseURL) { public void createAuthorisedCardUsers( String paymentInstrumentId, AuthorisedCardUsers authorisedCardUsers) throws ApiException, IOException { - createAuthorisedCardUsers(paymentInstrumentId, authorisedCardUsers, null); + RequestOptions requestOptions = null; + createAuthorisedCardUsers(paymentInstrumentId, authorisedCardUsers, requestOptions); } /** @@ -103,7 +104,8 @@ public void createAuthorisedCardUsers( */ public void deleteAuthorisedCardUsers(String paymentInstrumentId) throws ApiException, IOException { - deleteAuthorisedCardUsers(paymentInstrumentId, null); + RequestOptions requestOptions = null; + deleteAuthorisedCardUsers(paymentInstrumentId, requestOptions); } /** @@ -141,7 +143,8 @@ public void deleteAuthorisedCardUsers(String paymentInstrumentId, RequestOptions */ public AuthorisedCardUsers getAllAuthorisedCardUsers(String paymentInstrumentId) throws ApiException, IOException { - return getAllAuthorisedCardUsers(paymentInstrumentId, null); + RequestOptions requestOptions = null; + return getAllAuthorisedCardUsers(paymentInstrumentId, requestOptions); } /** @@ -184,7 +187,8 @@ public AuthorisedCardUsers getAllAuthorisedCardUsers( public void updateAuthorisedCardUsers( String paymentInstrumentId, AuthorisedCardUsers authorisedCardUsers) throws ApiException, IOException { - updateAuthorisedCardUsers(paymentInstrumentId, authorisedCardUsers, null); + RequestOptions requestOptions = null; + updateAuthorisedCardUsers(paymentInstrumentId, authorisedCardUsers, requestOptions); } /** diff --git a/src/main/java/com/adyen/service/balanceplatform/BalanceAccountsApi.java b/src/main/java/com/adyen/service/balanceplatform/BalanceAccountsApi.java index 174cf04d4..c31670777 100644 --- a/src/main/java/com/adyen/service/balanceplatform/BalanceAccountsApi.java +++ b/src/main/java/com/adyen/service/balanceplatform/BalanceAccountsApi.java @@ -68,7 +68,8 @@ public BalanceAccountsApi(Client client, String baseURL) { */ public BalanceAccount createBalanceAccount(BalanceAccountInfo balanceAccountInfo) throws ApiException, IOException { - return createBalanceAccount(balanceAccountInfo, null); + RequestOptions requestOptions = null; + return createBalanceAccount(balanceAccountInfo, requestOptions); } /** @@ -102,7 +103,8 @@ public BalanceAccount createBalanceAccount( public SweepConfigurationV2 createSweep( String balanceAccountId, CreateSweepConfigurationV2 createSweepConfigurationV2) throws ApiException, IOException { - return createSweep(balanceAccountId, createSweepConfigurationV2, null); + RequestOptions requestOptions = null; + return createSweep(balanceAccountId, createSweepConfigurationV2, requestOptions); } /** @@ -146,7 +148,8 @@ public SweepConfigurationV2 createSweep( */ public void deleteSweep(String balanceAccountId, String sweepId) throws ApiException, IOException { - deleteSweep(balanceAccountId, sweepId, null); + RequestOptions requestOptions = null; + deleteSweep(balanceAccountId, sweepId, requestOptions); } /** @@ -189,7 +192,8 @@ public void deleteSweep(String balanceAccountId, String sweepId, RequestOptions */ public BalanceSweepConfigurationsResponse getAllSweepsForBalanceAccount(String balanceAccountId) throws ApiException, IOException { - return getAllSweepsForBalanceAccount(balanceAccountId, null, null, null); + RequestOptions requestOptions = null; + return getAllSweepsForBalanceAccount(balanceAccountId, null, null, requestOptions); } /** @@ -242,7 +246,8 @@ public BalanceSweepConfigurationsResponse getAllSweepsForBalanceAccount( */ public TransactionRulesResponse getAllTransactionRulesForBalanceAccount(String id) throws ApiException, IOException { - return getAllTransactionRulesForBalanceAccount(id, null); + RequestOptions requestOptions = null; + return getAllTransactionRulesForBalanceAccount(id, requestOptions); } /** @@ -279,7 +284,8 @@ public TransactionRulesResponse getAllTransactionRulesForBalanceAccount( * @throws ApiException if fails to make API call */ public BalanceAccount getBalanceAccount(String id) throws ApiException, IOException { - return getBalanceAccount(id, null); + RequestOptions requestOptions = null; + return getBalanceAccount(id, requestOptions); } /** @@ -316,7 +322,8 @@ public BalanceAccount getBalanceAccount(String id, RequestOptions requestOptions */ public PaginatedPaymentInstrumentsResponse getPaymentInstrumentsLinkedToBalanceAccount(String id) throws ApiException, IOException { - return getPaymentInstrumentsLinkedToBalanceAccount(id, null, null, null, null); + RequestOptions requestOptions = null; + return getPaymentInstrumentsLinkedToBalanceAccount(id, null, null, null, requestOptions); } /** @@ -375,7 +382,8 @@ public PaginatedPaymentInstrumentsResponse getPaymentInstrumentsLinkedToBalanceA */ public SweepConfigurationV2 getSweep(String balanceAccountId, String sweepId) throws ApiException, IOException { - return getSweep(balanceAccountId, sweepId, null); + RequestOptions requestOptions = null; + return getSweep(balanceAccountId, sweepId, requestOptions); } /** @@ -423,7 +431,8 @@ public SweepConfigurationV2 getSweep( public BalanceAccount updateBalanceAccount( String id, BalanceAccountUpdateRequest balanceAccountUpdateRequest) throws ApiException, IOException { - return updateBalanceAccount(id, balanceAccountUpdateRequest, null); + RequestOptions requestOptions = null; + return updateBalanceAccount(id, balanceAccountUpdateRequest, requestOptions); } /** @@ -470,7 +479,8 @@ public SweepConfigurationV2 updateSweep( String sweepId, UpdateSweepConfigurationV2 updateSweepConfigurationV2) throws ApiException, IOException { - return updateSweep(balanceAccountId, sweepId, updateSweepConfigurationV2, null); + RequestOptions requestOptions = null; + return updateSweep(balanceAccountId, sweepId, updateSweepConfigurationV2, requestOptions); } /** diff --git a/src/main/java/com/adyen/service/balanceplatform/BalancesApi.java b/src/main/java/com/adyen/service/balanceplatform/BalancesApi.java index 6d93ac065..bc9ab50a9 100644 --- a/src/main/java/com/adyen/service/balanceplatform/BalancesApi.java +++ b/src/main/java/com/adyen/service/balanceplatform/BalancesApi.java @@ -70,7 +70,9 @@ public WebhookSetting createWebhookSetting( String webhookId, BalanceWebhookSettingInfo balanceWebhookSettingInfo) throws ApiException, IOException { - return createWebhookSetting(balancePlatformId, webhookId, balanceWebhookSettingInfo, null); + RequestOptions requestOptions = null; + return createWebhookSetting( + balancePlatformId, webhookId, balanceWebhookSettingInfo, requestOptions); } /** @@ -125,7 +127,8 @@ public WebhookSetting createWebhookSetting( */ public void deleteWebhookSetting(String balancePlatformId, String webhookId, String settingId) throws ApiException, IOException { - deleteWebhookSetting(balancePlatformId, webhookId, settingId, null); + RequestOptions requestOptions = null; + deleteWebhookSetting(balancePlatformId, webhookId, settingId, requestOptions); } /** @@ -179,7 +182,8 @@ public void deleteWebhookSetting( */ public WebhookSettings getAllWebhookSettings(String balancePlatformId, String webhookId) throws ApiException, IOException { - return getAllWebhookSettings(balancePlatformId, webhookId, null); + RequestOptions requestOptions = null; + return getAllWebhookSettings(balancePlatformId, webhookId, requestOptions); } /** @@ -232,7 +236,8 @@ public WebhookSettings getAllWebhookSettings( public WebhookSetting getWebhookSetting( String balancePlatformId, String webhookId, String settingId) throws ApiException, IOException { - return getWebhookSetting(balancePlatformId, webhookId, settingId, null); + RequestOptions requestOptions = null; + return getWebhookSetting(balancePlatformId, webhookId, settingId, requestOptions); } /** @@ -297,8 +302,9 @@ public WebhookSetting updateWebhookSetting( String settingId, BalanceWebhookSettingInfoUpdate balanceWebhookSettingInfoUpdate) throws ApiException, IOException { + RequestOptions requestOptions = null; return updateWebhookSetting( - balancePlatformId, webhookId, settingId, balanceWebhookSettingInfoUpdate, null); + balancePlatformId, webhookId, settingId, balanceWebhookSettingInfoUpdate, requestOptions); } /** diff --git a/src/main/java/com/adyen/service/balanceplatform/BankAccountValidationApi.java b/src/main/java/com/adyen/service/balanceplatform/BankAccountValidationApi.java index 1de08d0ff..c72ce990c 100644 --- a/src/main/java/com/adyen/service/balanceplatform/BankAccountValidationApi.java +++ b/src/main/java/com/adyen/service/balanceplatform/BankAccountValidationApi.java @@ -59,7 +59,8 @@ public BankAccountValidationApi(Client client, String baseURL) { public void validateBankAccountIdentification( BankAccountIdentificationValidationRequest bankAccountIdentificationValidationRequest) throws ApiException, IOException { - validateBankAccountIdentification(bankAccountIdentificationValidationRequest, null); + RequestOptions requestOptions = null; + validateBankAccountIdentification(bankAccountIdentificationValidationRequest, requestOptions); } /** diff --git a/src/main/java/com/adyen/service/balanceplatform/CardOrdersApi.java b/src/main/java/com/adyen/service/balanceplatform/CardOrdersApi.java index 8790a51de..43776b9da 100644 --- a/src/main/java/com/adyen/service/balanceplatform/CardOrdersApi.java +++ b/src/main/java/com/adyen/service/balanceplatform/CardOrdersApi.java @@ -62,7 +62,8 @@ public CardOrdersApi(Client client, String baseURL) { */ public PaginatedGetCardOrderItemResponse getCardOrderItems(String id) throws ApiException, IOException { - return getCardOrderItems(id, null, null, null); + RequestOptions requestOptions = null; + return getCardOrderItems(id, null, null, requestOptions); } /** @@ -114,7 +115,9 @@ public PaginatedGetCardOrderItemResponse getCardOrderItems( * @throws ApiException if fails to make API call */ public PaginatedGetCardOrderResponse listCardOrders() throws ApiException, IOException { - return listCardOrders(null, null, null, null, null, null, null, null, null, null, null, null); + RequestOptions requestOptions = null; + return listCardOrders( + null, null, null, null, null, null, null, null, null, null, null, requestOptions); } /** diff --git a/src/main/java/com/adyen/service/balanceplatform/GrantAccountsApi.java b/src/main/java/com/adyen/service/balanceplatform/GrantAccountsApi.java index 9ff3c47eb..3d10bac0a 100644 --- a/src/main/java/com/adyen/service/balanceplatform/GrantAccountsApi.java +++ b/src/main/java/com/adyen/service/balanceplatform/GrantAccountsApi.java @@ -62,7 +62,8 @@ public GrantAccountsApi(Client client, String baseURL) { */ @Deprecated public CapitalGrantAccount getGrantAccount(String id) throws ApiException, IOException { - return getGrantAccount(id, null); + RequestOptions requestOptions = null; + return getGrantAccount(id, requestOptions); } /** diff --git a/src/main/java/com/adyen/service/balanceplatform/GrantOffersApi.java b/src/main/java/com/adyen/service/balanceplatform/GrantOffersApi.java index 2c932c4f3..2fc3a6c94 100644 --- a/src/main/java/com/adyen/service/balanceplatform/GrantOffersApi.java +++ b/src/main/java/com/adyen/service/balanceplatform/GrantOffersApi.java @@ -64,7 +64,8 @@ public GrantOffersApi(Client client, String baseURL) { @Deprecated public GrantOffers getAllAvailableGrantOffers(String accountHolderId) throws ApiException, IOException { - return getAllAvailableGrantOffers(accountHolderId, null); + RequestOptions requestOptions = null; + return getAllAvailableGrantOffers(accountHolderId, requestOptions); } /** @@ -107,7 +108,8 @@ public GrantOffers getAllAvailableGrantOffers( */ @Deprecated public GrantOffer getGrantOffer(String grantOfferId) throws ApiException, IOException { - return getGrantOffer(grantOfferId, null); + RequestOptions requestOptions = null; + return getGrantOffer(grantOfferId, requestOptions); } /** diff --git a/src/main/java/com/adyen/service/balanceplatform/ManageCardPinApi.java b/src/main/java/com/adyen/service/balanceplatform/ManageCardPinApi.java index b880ede5e..fb2439c34 100644 --- a/src/main/java/com/adyen/service/balanceplatform/ManageCardPinApi.java +++ b/src/main/java/com/adyen/service/balanceplatform/ManageCardPinApi.java @@ -64,7 +64,8 @@ public ManageCardPinApi(Client client, String baseURL) { */ public PinChangeResponse changeCardPin(PinChangeRequest pinChangeRequest) throws ApiException, IOException { - return changeCardPin(pinChangeRequest, null); + RequestOptions requestOptions = null; + return changeCardPin(pinChangeRequest, requestOptions); } /** @@ -93,7 +94,8 @@ public PinChangeResponse changeCardPin( * @throws ApiException if fails to make API call */ public PublicKeyResponse publicKey() throws ApiException, IOException { - return publicKey(null, null, null); + RequestOptions requestOptions = null; + return publicKey(null, null, requestOptions); } /** @@ -136,7 +138,8 @@ public PublicKeyResponse publicKey(String purpose, String format, RequestOptions */ public RevealPinResponse revealCardPin(RevealPinRequest revealPinRequest) throws ApiException, IOException { - return revealCardPin(revealPinRequest, null); + RequestOptions requestOptions = null; + return revealCardPin(revealPinRequest, requestOptions); } /** diff --git a/src/main/java/com/adyen/service/balanceplatform/ManageScaDevicesApi.java b/src/main/java/com/adyen/service/balanceplatform/ManageScaDevicesApi.java index 801fa11bc..703f1234a 100644 --- a/src/main/java/com/adyen/service/balanceplatform/ManageScaDevicesApi.java +++ b/src/main/java/com/adyen/service/balanceplatform/ManageScaDevicesApi.java @@ -70,8 +70,9 @@ public ManageScaDevicesApi(Client client, String baseURL) { public AssociationFinaliseResponse completeAssociationBetweenScaDeviceAndResource( String deviceId, AssociationFinaliseRequest associationFinaliseRequest) throws ApiException, IOException { + RequestOptions requestOptions = null; return completeAssociationBetweenScaDeviceAndResource( - deviceId, associationFinaliseRequest, null); + deviceId, associationFinaliseRequest, requestOptions); } /** @@ -118,7 +119,8 @@ public AssociationFinaliseResponse completeAssociationBetweenScaDeviceAndResourc */ public RegisterSCAFinalResponse completeRegistrationOfScaDevice( String id, RegisterSCARequest registerSCARequest) throws ApiException, IOException { - return completeRegistrationOfScaDevice(id, registerSCARequest, null); + RequestOptions requestOptions = null; + return completeRegistrationOfScaDevice(id, registerSCARequest, requestOptions); } /** @@ -161,7 +163,8 @@ public RegisterSCAFinalResponse completeRegistrationOfScaDevice( */ public void deleteRegistrationOfScaDevice(String id, String paymentInstrumentId) throws ApiException, IOException { - deleteRegistrationOfScaDevice(id, paymentInstrumentId, null); + RequestOptions requestOptions = null; + deleteRegistrationOfScaDevice(id, paymentInstrumentId, requestOptions); } /** @@ -208,8 +211,9 @@ public void deleteRegistrationOfScaDevice( public AssociationInitiateResponse initiateAssociationBetweenScaDeviceAndResource( String deviceId, AssociationInitiateRequest associationInitiateRequest) throws ApiException, IOException { + RequestOptions requestOptions = null; return initiateAssociationBetweenScaDeviceAndResource( - deviceId, associationInitiateRequest, null); + deviceId, associationInitiateRequest, requestOptions); } /** @@ -252,7 +256,8 @@ public AssociationInitiateResponse initiateAssociationBetweenScaDeviceAndResourc */ public RegisterSCAResponse initiateRegistrationOfScaDevice(RegisterSCARequest registerSCARequest) throws ApiException, IOException { - return initiateRegistrationOfScaDevice(registerSCARequest, null); + RequestOptions requestOptions = null; + return initiateRegistrationOfScaDevice(registerSCARequest, requestOptions); } /** @@ -284,7 +289,8 @@ public RegisterSCAResponse initiateRegistrationOfScaDevice( */ public SearchRegisteredDevicesResponse listRegisteredScaDevices(String paymentInstrumentId) throws ApiException, IOException { - return listRegisteredScaDevices(paymentInstrumentId, null, null, null); + RequestOptions requestOptions = null; + return listRegisteredScaDevices(paymentInstrumentId, null, null, requestOptions); } /** diff --git a/src/main/java/com/adyen/service/balanceplatform/NetworkTokensApi.java b/src/main/java/com/adyen/service/balanceplatform/NetworkTokensApi.java index 208ab9982..cb272e3bf 100644 --- a/src/main/java/com/adyen/service/balanceplatform/NetworkTokensApi.java +++ b/src/main/java/com/adyen/service/balanceplatform/NetworkTokensApi.java @@ -61,7 +61,8 @@ public NetworkTokensApi(Client client, String baseURL) { */ public GetNetworkTokenResponse getNetworkToken(String networkTokenId) throws ApiException, IOException { - return getNetworkToken(networkTokenId, null); + RequestOptions requestOptions = null; + return getNetworkToken(networkTokenId, requestOptions); } /** @@ -99,7 +100,8 @@ public GetNetworkTokenResponse getNetworkToken( public void updateNetworkToken( String networkTokenId, UpdateNetworkTokenRequest updateNetworkTokenRequest) throws ApiException, IOException { - updateNetworkToken(networkTokenId, updateNetworkTokenRequest, null); + RequestOptions requestOptions = null; + updateNetworkToken(networkTokenId, updateNetworkTokenRequest, requestOptions); } /** diff --git a/src/main/java/com/adyen/service/balanceplatform/PaymentInstrumentGroupsApi.java b/src/main/java/com/adyen/service/balanceplatform/PaymentInstrumentGroupsApi.java index 6fc87b937..51fa308b2 100644 --- a/src/main/java/com/adyen/service/balanceplatform/PaymentInstrumentGroupsApi.java +++ b/src/main/java/com/adyen/service/balanceplatform/PaymentInstrumentGroupsApi.java @@ -62,7 +62,8 @@ public PaymentInstrumentGroupsApi(Client client, String baseURL) { */ public PaymentInstrumentGroup createPaymentInstrumentGroup( PaymentInstrumentGroupInfo paymentInstrumentGroupInfo) throws ApiException, IOException { - return createPaymentInstrumentGroup(paymentInstrumentGroupInfo, null); + RequestOptions requestOptions = null; + return createPaymentInstrumentGroup(paymentInstrumentGroupInfo, requestOptions); } /** @@ -93,7 +94,8 @@ public PaymentInstrumentGroup createPaymentInstrumentGroup( */ public TransactionRulesResponse getAllTransactionRulesForPaymentInstrumentGroup(String id) throws ApiException, IOException { - return getAllTransactionRulesForPaymentInstrumentGroup(id, null); + RequestOptions requestOptions = null; + return getAllTransactionRulesForPaymentInstrumentGroup(id, requestOptions); } /** @@ -131,7 +133,8 @@ public TransactionRulesResponse getAllTransactionRulesForPaymentInstrumentGroup( */ public PaymentInstrumentGroup getPaymentInstrumentGroup(String id) throws ApiException, IOException { - return getPaymentInstrumentGroup(id, null); + RequestOptions requestOptions = null; + return getPaymentInstrumentGroup(id, requestOptions); } /** diff --git a/src/main/java/com/adyen/service/balanceplatform/PaymentInstrumentsApi.java b/src/main/java/com/adyen/service/balanceplatform/PaymentInstrumentsApi.java index ef2e9446c..c67e7dfb9 100644 --- a/src/main/java/com/adyen/service/balanceplatform/PaymentInstrumentsApi.java +++ b/src/main/java/com/adyen/service/balanceplatform/PaymentInstrumentsApi.java @@ -72,7 +72,9 @@ public PaymentInstrumentsApi(Client client, String baseURL) { public NetworkTokenActivationDataResponse createNetworkTokenProvisioningData( String id, NetworkTokenActivationDataRequest networkTokenActivationDataRequest) throws ApiException, IOException { - return createNetworkTokenProvisioningData(id, networkTokenActivationDataRequest, null); + RequestOptions requestOptions = null; + return createNetworkTokenProvisioningData( + id, networkTokenActivationDataRequest, requestOptions); } /** @@ -115,7 +117,8 @@ public NetworkTokenActivationDataResponse createNetworkTokenProvisioningData( */ public PaymentInstrument createPaymentInstrument(PaymentInstrumentInfo paymentInstrumentInfo) throws ApiException, IOException { - return createPaymentInstrument(paymentInstrumentInfo, null); + RequestOptions requestOptions = null; + return createPaymentInstrument(paymentInstrumentInfo, requestOptions); } /** @@ -146,7 +149,8 @@ public PaymentInstrument createPaymentInstrument( */ public TransactionRulesResponse getAllTransactionRulesForPaymentInstrument(String id) throws ApiException, IOException { - return getAllTransactionRulesForPaymentInstrument(id, null); + RequestOptions requestOptions = null; + return getAllTransactionRulesForPaymentInstrument(id, requestOptions); } /** @@ -184,7 +188,8 @@ public TransactionRulesResponse getAllTransactionRulesForPaymentInstrument( */ public NetworkTokenActivationDataResponse getNetworkTokenActivationData(String id) throws ApiException, IOException { - return getNetworkTokenActivationData(id, null); + RequestOptions requestOptions = null; + return getNetworkTokenActivationData(id, requestOptions); } /** @@ -223,7 +228,8 @@ public NetworkTokenActivationDataResponse getNetworkTokenActivationData( */ public PaymentInstrumentRevealInfo getPanOfPaymentInstrument(String id) throws ApiException, IOException { - return getPanOfPaymentInstrument(id, null); + RequestOptions requestOptions = null; + return getPanOfPaymentInstrument(id, requestOptions); } /** @@ -259,7 +265,8 @@ public PaymentInstrumentRevealInfo getPanOfPaymentInstrument( * @throws ApiException if fails to make API call */ public PaymentInstrument getPaymentInstrument(String id) throws ApiException, IOException { - return getPaymentInstrument(id, null); + RequestOptions requestOptions = null; + return getPaymentInstrument(id, requestOptions); } /** @@ -295,7 +302,8 @@ public PaymentInstrument getPaymentInstrument(String id, RequestOptions requestO * @throws ApiException if fails to make API call */ public ListNetworkTokensResponse listNetworkTokens(String id) throws ApiException, IOException { - return listNetworkTokens(id, null); + RequestOptions requestOptions = null; + return listNetworkTokens(id, requestOptions); } /** @@ -334,7 +342,8 @@ public ListNetworkTokensResponse listNetworkTokens(String id, RequestOptions req public PaymentInstrumentRevealResponse revealDataOfPaymentInstrument( PaymentInstrumentRevealRequest paymentInstrumentRevealRequest) throws ApiException, IOException { - return revealDataOfPaymentInstrument(paymentInstrumentRevealRequest, null); + RequestOptions requestOptions = null; + return revealDataOfPaymentInstrument(paymentInstrumentRevealRequest, requestOptions); } /** @@ -367,7 +376,8 @@ public PaymentInstrumentRevealResponse revealDataOfPaymentInstrument( public UpdatePaymentInstrument updatePaymentInstrument( String id, PaymentInstrumentUpdateRequest paymentInstrumentUpdateRequest) throws ApiException, IOException { - return updatePaymentInstrument(id, paymentInstrumentUpdateRequest, null); + RequestOptions requestOptions = null; + return updatePaymentInstrument(id, paymentInstrumentUpdateRequest, requestOptions); } /** diff --git a/src/main/java/com/adyen/service/balanceplatform/PlatformApi.java b/src/main/java/com/adyen/service/balanceplatform/PlatformApi.java index 26ecfe117..97d12083b 100644 --- a/src/main/java/com/adyen/service/balanceplatform/PlatformApi.java +++ b/src/main/java/com/adyen/service/balanceplatform/PlatformApi.java @@ -62,7 +62,8 @@ public PlatformApi(Client client, String baseURL) { */ public PaginatedAccountHoldersResponse getAllAccountHoldersUnderBalancePlatform(String id) throws ApiException, IOException { - return getAllAccountHoldersUnderBalancePlatform(id, null, null, null); + RequestOptions requestOptions = null; + return getAllAccountHoldersUnderBalancePlatform(id, null, null, requestOptions); } /** @@ -114,7 +115,8 @@ public PaginatedAccountHoldersResponse getAllAccountHoldersUnderBalancePlatform( */ public TransactionRulesResponse getAllTransactionRulesForBalancePlatform(String id) throws ApiException, IOException { - return getAllTransactionRulesForBalancePlatform(id, null); + RequestOptions requestOptions = null; + return getAllTransactionRulesForBalancePlatform(id, requestOptions); } /** @@ -151,7 +153,8 @@ public TransactionRulesResponse getAllTransactionRulesForBalancePlatform( * @throws ApiException if fails to make API call */ public BalancePlatform getBalancePlatform(String id) throws ApiException, IOException { - return getBalancePlatform(id, null); + RequestOptions requestOptions = null; + return getBalancePlatform(id, requestOptions); } /** diff --git a/src/main/java/com/adyen/service/balanceplatform/ScaAssociationManagementApi.java b/src/main/java/com/adyen/service/balanceplatform/ScaAssociationManagementApi.java new file mode 100644 index 000000000..0f084fd89 --- /dev/null +++ b/src/main/java/com/adyen/service/balanceplatform/ScaAssociationManagementApi.java @@ -0,0 +1,191 @@ +/* + * Configuration API + * + * The version of the OpenAPI document: 2 + * + * + * 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.balanceplatform; + +import com.adyen.Client; +import com.adyen.Service; +import com.adyen.constants.ApiConstants; +import com.adyen.model.RequestOptions; +import com.adyen.model.balanceplatform.ApproveAssociationRequest; +import com.adyen.model.balanceplatform.ApproveAssociationResponse; +import com.adyen.model.balanceplatform.ListAssociationsResponse; +import com.adyen.model.balanceplatform.RemoveAssociationRequest; +import com.adyen.model.balanceplatform.ScaEntityType; +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 ScaAssociationManagementApi extends Service { + + public static final String API_VERSION = "2"; + + protected String baseURL; + + /** + * SCA association management constructor in {@link com.adyen.service.balanceplatform package}. + * + * @param client {@link Client } (required) + */ + public ScaAssociationManagementApi(Client client) { + super(client); + this.baseURL = createBaseURL("https://balanceplatform-api-test.adyen.com/bcl/v2"); + } + + /** + * SCA association management constructor in {@link com.adyen.service.balanceplatform 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 ScaAssociationManagementApi(Client client, String baseURL) { + super(client); + this.baseURL = baseURL; + } + + /** + * Approve a pending approval association + * + * @param wwwAuthenticate {@link String } The header for authenticating through SCA. (required) + * @param approveAssociationRequest {@link ApproveAssociationRequest } (required) + * @return {@link ApproveAssociationResponse } + * @throws ApiException if fails to make API call + */ + public ApproveAssociationResponse approveAssociation( + String wwwAuthenticate, ApproveAssociationRequest approveAssociationRequest) + throws ApiException, IOException { + RequestOptions requestOptions = null; + requestOptions = + new RequestOptions().addAdditionalServiceHeader("WWW-Authenticate", wwwAuthenticate); + return approveAssociation(approveAssociationRequest, requestOptions); + } + + /** + * Approve a pending approval association + * + * @param approveAssociationRequest {@link ApproveAssociationRequest } (required) + * @param requestOptions {@link RequestOptions } Object to store additional data such as + * idempotency-keys (optional) + * @return {@link ApproveAssociationResponse } + * @throws ApiException if fails to make API call + */ + public ApproveAssociationResponse approveAssociation( + ApproveAssociationRequest approveAssociationRequest, RequestOptions requestOptions) + throws ApiException, IOException { + String requestBody = approveAssociationRequest.toJson(); + Resource resource = new Resource(this, this.baseURL + "/scaAssociations", null); + String jsonResult = + resource.request(requestBody, requestOptions, ApiConstants.HttpMethod.PATCH, null); + return ApproveAssociationResponse.fromJson(jsonResult); + } + + /** + * Get a list of devices associated with an entity + * + * @param entityType {@link ScaEntityType } The type of entity you want to retrieve a list of + * associations for. Possible values: **accountHolder** or **paymentInstrument**. (required) + * @param entityId {@link String } The unique identifier of the entity. (required) + * @param pageSize {@link Integer } The number of items to have on a page. Default: **5**. + * (required) + * @param pageNumber {@link Integer } The index of the page to retrieve. The index of the first + * page is **0** (zero). Default: **0**. (required) + * @return {@link ListAssociationsResponse } + * @throws ApiException if fails to make API call + */ + public ListAssociationsResponse listAssociations( + ScaEntityType entityType, String entityId, Integer pageSize, Integer pageNumber) + throws ApiException, IOException { + RequestOptions requestOptions = null; + return listAssociations(entityType, entityId, pageSize, pageNumber, requestOptions); + } + + /** + * Get a list of devices associated with an entity + * + * @param entityType {@link ScaEntityType } Query: The type of entity you want to retrieve a list + * of associations for. Possible values: **accountHolder** or **paymentInstrument**. + * (required) + * @param entityId {@link String } Query: The unique identifier of the entity. (required) + * @param pageSize {@link Integer } Query: The number of items to have on a page. Default: **5**. + * (required) + * @param pageNumber {@link Integer } Query: The index of the page to retrieve. The index of the + * first page is **0** (zero). Default: **0**. (required) + * @param requestOptions {@link RequestOptions } Object to store additional data such as + * idempotency-keys (optional) + * @return {@link ListAssociationsResponse } + * @throws ApiException if fails to make API call + */ + public ListAssociationsResponse listAssociations( + ScaEntityType entityType, + String entityId, + Integer pageSize, + Integer pageNumber, + RequestOptions requestOptions) + throws ApiException, IOException { + // Add query params + Map queryParams = new HashMap<>(); + if (entityType != null) { + queryParams.put("entityType", entityType.toString()); + } + if (entityId != null) { + queryParams.put("entityId", entityId); + } + if (pageSize != null) { + queryParams.put("pageSize", pageSize.toString()); + } + if (pageNumber != null) { + queryParams.put("pageNumber", pageNumber.toString()); + } + + String requestBody = null; + Resource resource = new Resource(this, this.baseURL + "/scaAssociations", null); + String jsonResult = + resource.request( + requestBody, requestOptions, ApiConstants.HttpMethod.GET, null, queryParams); + return ListAssociationsResponse.fromJson(jsonResult); + } + + /** + * Delete association to devices + * + * @param wwwAuthenticate {@link String } The header for authenticating through SCA. (required) + * @param removeAssociationRequest {@link RemoveAssociationRequest } (required) + * @throws ApiException if fails to make API call + */ + public void removeAssociation( + String wwwAuthenticate, RemoveAssociationRequest removeAssociationRequest) + throws ApiException, IOException { + RequestOptions requestOptions = null; + requestOptions = + new RequestOptions().addAdditionalServiceHeader("WWW-Authenticate", wwwAuthenticate); + removeAssociation(removeAssociationRequest, requestOptions); + } + + /** + * Delete association to devices + * + * @param removeAssociationRequest {@link RemoveAssociationRequest } (required) + * @param requestOptions {@link RequestOptions } Object to store additional data such as + * idempotency-keys (optional) + * @throws ApiException if fails to make API call + */ + public void removeAssociation( + RemoveAssociationRequest removeAssociationRequest, RequestOptions requestOptions) + throws ApiException, IOException { + String requestBody = removeAssociationRequest.toJson(); + Resource resource = new Resource(this, this.baseURL + "/scaAssociations", null); + resource.request(requestBody, requestOptions, ApiConstants.HttpMethod.DELETE, null); + } +} diff --git a/src/main/java/com/adyen/service/balanceplatform/ScaDeviceManagementApi.java b/src/main/java/com/adyen/service/balanceplatform/ScaDeviceManagementApi.java new file mode 100644 index 000000000..b8c9f00ab --- /dev/null +++ b/src/main/java/com/adyen/service/balanceplatform/ScaDeviceManagementApi.java @@ -0,0 +1,188 @@ +/* + * Configuration API + * + * The version of the OpenAPI document: 2 + * + * + * 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.balanceplatform; + +import com.adyen.Client; +import com.adyen.Service; +import com.adyen.constants.ApiConstants; +import com.adyen.model.RequestOptions; +import com.adyen.model.balanceplatform.BeginScaDeviceRegistrationRequest; +import com.adyen.model.balanceplatform.BeginScaDeviceRegistrationResponse; +import com.adyen.model.balanceplatform.FinishScaDeviceRegistrationRequest; +import com.adyen.model.balanceplatform.FinishScaDeviceRegistrationResponse; +import com.adyen.model.balanceplatform.SubmitScaAssociationRequest; +import com.adyen.model.balanceplatform.SubmitScaAssociationResponse; +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 ScaDeviceManagementApi extends Service { + + public static final String API_VERSION = "2"; + + protected String baseURL; + + /** + * SCA device management constructor in {@link com.adyen.service.balanceplatform package}. + * + * @param client {@link Client } (required) + */ + public ScaDeviceManagementApi(Client client) { + super(client); + this.baseURL = createBaseURL("https://balanceplatform-api-test.adyen.com/bcl/v2"); + } + + /** + * SCA device management constructor in {@link com.adyen.service.balanceplatform 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 ScaDeviceManagementApi(Client client, String baseURL) { + super(client); + this.baseURL = baseURL; + } + + /** + * Begin SCA device registration + * + * @param beginScaDeviceRegistrationRequest {@link BeginScaDeviceRegistrationRequest } (required) + * @return {@link BeginScaDeviceRegistrationResponse } + * @throws ApiException if fails to make API call + */ + public BeginScaDeviceRegistrationResponse beginScaDeviceRegistration( + BeginScaDeviceRegistrationRequest beginScaDeviceRegistrationRequest) + throws ApiException, IOException { + RequestOptions requestOptions = null; + return beginScaDeviceRegistration(beginScaDeviceRegistrationRequest, requestOptions); + } + + /** + * Begin SCA device registration + * + * @param beginScaDeviceRegistrationRequest {@link BeginScaDeviceRegistrationRequest } (required) + * @param requestOptions {@link RequestOptions } Object to store additional data such as + * idempotency-keys (optional) + * @return {@link BeginScaDeviceRegistrationResponse } + * @throws ApiException if fails to make API call + */ + public BeginScaDeviceRegistrationResponse beginScaDeviceRegistration( + BeginScaDeviceRegistrationRequest beginScaDeviceRegistrationRequest, + RequestOptions requestOptions) + throws ApiException, IOException { + String requestBody = beginScaDeviceRegistrationRequest.toJson(); + Resource resource = new Resource(this, this.baseURL + "/scaDevices", null); + String jsonResult = + resource.request(requestBody, requestOptions, ApiConstants.HttpMethod.POST, null); + return BeginScaDeviceRegistrationResponse.fromJson(jsonResult); + } + + /** + * Finish registration process for a SCA device + * + * @param deviceId {@link String } The unique identifier of the SCA device that you are + * associating with a resource. (required) + * @param finishScaDeviceRegistrationRequest {@link FinishScaDeviceRegistrationRequest } + * (required) + * @return {@link FinishScaDeviceRegistrationResponse } + * @throws ApiException if fails to make API call + */ + public FinishScaDeviceRegistrationResponse finishScaDeviceRegistration( + String deviceId, FinishScaDeviceRegistrationRequest finishScaDeviceRegistrationRequest) + throws ApiException, IOException { + RequestOptions requestOptions = null; + return finishScaDeviceRegistration( + deviceId, finishScaDeviceRegistrationRequest, requestOptions); + } + + /** + * Finish registration process for a SCA device + * + * @param deviceId {@link String } The unique identifier of the SCA device that you are + * associating with a resource. (required) + * @param finishScaDeviceRegistrationRequest {@link FinishScaDeviceRegistrationRequest } + * (required) + * @param requestOptions {@link RequestOptions } Object to store additional data such as + * idempotency-keys (optional) + * @return {@link FinishScaDeviceRegistrationResponse } + * @throws ApiException if fails to make API call + */ + public FinishScaDeviceRegistrationResponse finishScaDeviceRegistration( + String deviceId, + FinishScaDeviceRegistrationRequest finishScaDeviceRegistrationRequest, + RequestOptions requestOptions) + throws ApiException, IOException { + // Add path params + Map pathParams = new HashMap<>(); + if (deviceId == null) { + throw new IllegalArgumentException("Please provide the deviceId path parameter"); + } + pathParams.put("deviceId", deviceId); + + String requestBody = finishScaDeviceRegistrationRequest.toJson(); + Resource resource = new Resource(this, this.baseURL + "/scaDevices/{deviceId}", null); + String jsonResult = + resource.request(requestBody, requestOptions, ApiConstants.HttpMethod.PATCH, pathParams); + return FinishScaDeviceRegistrationResponse.fromJson(jsonResult); + } + + /** + * Create a new SCA association for a device + * + * @param deviceId {@link String } The unique identifier of the SCA device that you are + * associating with a resource. (required) + * @param submitScaAssociationRequest {@link SubmitScaAssociationRequest } (required) + * @return {@link SubmitScaAssociationResponse } + * @throws ApiException if fails to make API call + */ + public SubmitScaAssociationResponse submitScaAssociation( + String deviceId, SubmitScaAssociationRequest submitScaAssociationRequest) + throws ApiException, IOException { + RequestOptions requestOptions = null; + return submitScaAssociation(deviceId, submitScaAssociationRequest, requestOptions); + } + + /** + * Create a new SCA association for a device + * + * @param deviceId {@link String } The unique identifier of the SCA device that you are + * associating with a resource. (required) + * @param submitScaAssociationRequest {@link SubmitScaAssociationRequest } (required) + * @param requestOptions {@link RequestOptions } Object to store additional data such as + * idempotency-keys (optional) + * @return {@link SubmitScaAssociationResponse } + * @throws ApiException if fails to make API call + */ + public SubmitScaAssociationResponse submitScaAssociation( + String deviceId, + SubmitScaAssociationRequest submitScaAssociationRequest, + RequestOptions requestOptions) + throws ApiException, IOException { + // Add path params + Map pathParams = new HashMap<>(); + if (deviceId == null) { + throw new IllegalArgumentException("Please provide the deviceId path parameter"); + } + pathParams.put("deviceId", deviceId); + + String requestBody = submitScaAssociationRequest.toJson(); + Resource resource = + new Resource(this, this.baseURL + "/scaDevices/{deviceId}/scaAssociations", null); + String jsonResult = + resource.request(requestBody, requestOptions, ApiConstants.HttpMethod.POST, pathParams); + return SubmitScaAssociationResponse.fromJson(jsonResult); + } +} diff --git a/src/main/java/com/adyen/service/balanceplatform/TransactionRulesApi.java b/src/main/java/com/adyen/service/balanceplatform/TransactionRulesApi.java index c1386eaba..6013e005b 100644 --- a/src/main/java/com/adyen/service/balanceplatform/TransactionRulesApi.java +++ b/src/main/java/com/adyen/service/balanceplatform/TransactionRulesApi.java @@ -62,7 +62,8 @@ public TransactionRulesApi(Client client, String baseURL) { */ public TransactionRule createTransactionRule(TransactionRuleInfo transactionRuleInfo) throws ApiException, IOException { - return createTransactionRule(transactionRuleInfo, null); + RequestOptions requestOptions = null; + return createTransactionRule(transactionRuleInfo, requestOptions); } /** @@ -94,7 +95,8 @@ public TransactionRule createTransactionRule( */ public TransactionRule deleteTransactionRule(String transactionRuleId) throws ApiException, IOException { - return deleteTransactionRule(transactionRuleId, null); + RequestOptions requestOptions = null; + return deleteTransactionRule(transactionRuleId, requestOptions); } /** @@ -134,7 +136,8 @@ public TransactionRule deleteTransactionRule( */ public TransactionRuleResponse getTransactionRule(String transactionRuleId) throws ApiException, IOException { - return getTransactionRule(transactionRuleId, null); + RequestOptions requestOptions = null; + return getTransactionRule(transactionRuleId, requestOptions); } /** @@ -176,7 +179,8 @@ public TransactionRuleResponse getTransactionRule( public TransactionRule updateTransactionRule( String transactionRuleId, TransactionRuleInfo transactionRuleInfo) throws ApiException, IOException { - return updateTransactionRule(transactionRuleId, transactionRuleInfo, null); + RequestOptions requestOptions = null; + return updateTransactionRule(transactionRuleId, transactionRuleInfo, requestOptions); } /** diff --git a/src/main/java/com/adyen/service/balanceplatform/TransferRoutesApi.java b/src/main/java/com/adyen/service/balanceplatform/TransferRoutesApi.java index 5de974102..d6b6ac580 100644 --- a/src/main/java/com/adyen/service/balanceplatform/TransferRoutesApi.java +++ b/src/main/java/com/adyen/service/balanceplatform/TransferRoutesApi.java @@ -59,7 +59,8 @@ public TransferRoutesApi(Client client, String baseURL) { */ public TransferRouteResponse calculateTransferRoutes(TransferRouteRequest transferRouteRequest) throws ApiException, IOException { - return calculateTransferRoutes(transferRouteRequest, null); + RequestOptions requestOptions = null; + return calculateTransferRoutes(transferRouteRequest, requestOptions); } /** From f6c0ff4294728fd09d9322c86c83c6de3fd1ac80 Mon Sep 17 00:00:00 2001 From: gcatanese Date: Thu, 30 Oct 2025 16:36:22 +0100 Subject: [PATCH 5/5] Test passing the header --- .../java/com/adyen/BalancePlatformTest.java | 35 +++++++++++++++++++ .../balancePlatform/ScaAssociations.json | 10 ++++++ 2 files changed, 45 insertions(+) create mode 100644 src/test/resources/mocks/balancePlatform/ScaAssociations.json diff --git a/src/test/java/com/adyen/BalancePlatformTest.java b/src/test/java/com/adyen/BalancePlatformTest.java index 3468b6eb3..6c9ea22a7 100644 --- a/src/test/java/com/adyen/BalancePlatformTest.java +++ b/src/test/java/com/adyen/BalancePlatformTest.java @@ -8,12 +8,15 @@ import static org.mockito.Mockito.verify; import com.adyen.constants.ApiConstants; +import com.adyen.model.RequestOptions; import com.adyen.model.balanceplatform.*; import com.adyen.service.balanceplatform.*; import com.fasterxml.jackson.core.JsonProcessingException; import java.util.HashMap; +import java.util.List; import java.util.Map; import org.junit.Test; +import org.mockito.ArgumentCaptor; public class BalancePlatformTest extends BaseTest { @Test @@ -764,4 +767,36 @@ public void updateAuthorisedCardUsersTest() throws Exception { ApiConstants.HttpMethod.PATCH, null); } + + @Test + public void scaAssociationManagementApproveAssociationTest() throws Exception { + Client client = createMockClientFromFile("mocks/balancePlatform/ScaAssociations.json"); + ScaAssociationManagementApi service = new ScaAssociationManagementApi(client); + ApproveAssociationResponse response = service.approveAssociation( + "1234567890ABCD", new ApproveAssociationRequest() + .status(AssociationStatus.ACTIVE) + .entityId("AH00000000000000000000001") + .entityType(ScaEntityType.ACCOUNTHOLDER) + .scaDeviceIds(List.of("BSDR42XV3223223S5N6CDQDGH53M8H"))); + + assertNotNull(response); + assertEquals(1, response.getScaAssociations().size()); + + ArgumentCaptor optionsCaptor = ArgumentCaptor.forClass(RequestOptions.class); + verify(client.getHttpClient()) + .request( + eq("https://balanceplatform-api-test.adyen.com/bcl/v2/scaAssociations"), + anyString(), + eq(client.getConfig()), + eq(false), + optionsCaptor.capture(), + eq(ApiConstants.HttpMethod.PATCH), + eq(null)); + + assertNotNull(optionsCaptor.getValue().getAdditionalServiceHeaders()); + assertEquals(1, optionsCaptor.getValue().getAdditionalServiceHeaders().size()); + assertEquals("1234567890ABCD", optionsCaptor.getValue().getAdditionalServiceHeaders().get("WWW-Authenticate")); + } + + } diff --git a/src/test/resources/mocks/balancePlatform/ScaAssociations.json b/src/test/resources/mocks/balancePlatform/ScaAssociations.json new file mode 100644 index 000000000..0a43449c1 --- /dev/null +++ b/src/test/resources/mocks/balancePlatform/ScaAssociations.json @@ -0,0 +1,10 @@ +{ + "scaAssociations": [ + { + "scaDeviceId": "BSDR42XV3223223S5N6CDQDGH53M8H", + "entityType": "accountHolder", + "entityId": "AH00000000000000000000001", + "status": "active" + } + ] +} \ No newline at end of file