From c840580669de2bc8785fbc80977fc8bfa8e5258e Mon Sep 17 00:00:00 2001 From: gcatanese Date: Fri, 7 Nov 2025 16:20:44 +0100 Subject: [PATCH 1/5] Refactor templates --- .../libraries/jersey3/api_overload.mustache | 3 ++- .../libraries/jersey3/api_summary_overload.mustache | 13 ++++++++----- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/templates-v7/libraries/jersey3/api_overload.mustache b/templates-v7/libraries/jersey3/api_overload.mustache index 25cdc2997..e5615b7a2 100644 --- a/templates-v7/libraries/jersey3/api_overload.mustache +++ b/templates-v7/libraries/jersey3/api_overload.mustache @@ -1,2 +1,3 @@ {{! Overload contains just required and body params }} -{{#requiredParams}}{{{dataType}}} {{paramName}}{{^-last}}, {{/-last}}{{/requiredParams}}{{#bodyParams}}{{^required}}{{#hasRequiredParams}}, {{/hasRequiredParams}}{{{dataType}}} {{paramName}}{{/required}}{{/bodyParams}} \ No newline at end of file +{{#requiredParams}}{{^isHeaderParam}}{{^isBodyParam}}{{{dataType}}} {{paramName}}{{^-last}}, {{/-last}}{{#-last}}{{#hasBodyParam}}, {{/hasBodyParam}}{{/-last}}{{/isBodyParam}}{{/isHeaderParam}} +{{/requiredParams}}{{#bodyParams}}{{{dataType}}} {{paramName}}{{/bodyParams}} \ No newline at end of file diff --git a/templates-v7/libraries/jersey3/api_summary_overload.mustache b/templates-v7/libraries/jersey3/api_summary_overload.mustache index 67feed256..a9b2b7156 100644 --- a/templates-v7/libraries/jersey3/api_summary_overload.mustache +++ b/templates-v7/libraries/jersey3/api_summary_overload.mustache @@ -1,12 +1,15 @@ /** * {{summary}} * -{{#requiredParams}} + {{#pathParams}} + * @param {{paramName}} {@link {{dataType}} } {{description}}{{#required}} (required){{/required}}{{^required}} (optional{{^isContainer}}{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/isContainer}}{{/required}} + {{/pathParams}} + {{#bodyParams}} * @param {{paramName}} {@link {{dataType}} } {{description}} (required) -{{/requiredParams}} -{{#bodyParams}} - * @param {{paramName}} {@link {{dataType}} } {{description}} (required) -{{/bodyParams}} + {{/bodyParams}} + {{#queryParams}}{{#required}} + * @param {{paramName}} {@link {{dataType}} } Query: {{description}} (required) + {{/required}}{{/queryParams}} {{#returnType}} * @return {@link {{.}} } {{/returnType}} From 4b39677948be67b822f79fe342a119b74b07d926 Mon Sep 17 00:00:00 2001 From: gcatanese Date: Mon, 10 Nov 2025 11:49:40 +0100 Subject: [PATCH 2/5] Add support for WWW-Authenticate header --- .../com/adyen/constants/ApiConstants.java | 1 + .../com/adyen/httpclient/AdyenHttpClient.java | 5 ++++ .../java/com/adyen/model/RequestOptions.java | 25 +++++++++++++++++++ .../java/com/adyen/httpclient/ClientTest.java | 16 ++++++++++++ 4 files changed, 47 insertions(+) diff --git a/src/main/java/com/adyen/constants/ApiConstants.java b/src/main/java/com/adyen/constants/ApiConstants.java index 6b9213f6c..1167d057a 100644 --- a/src/main/java/com/adyen/constants/ApiConstants.java +++ b/src/main/java/com/adyen/constants/ApiConstants.java @@ -109,6 +109,7 @@ interface RequestProperty { String API_KEY = "x-api-key"; String APPLICATION_JSON_TYPE = "application/json"; String REQUESTED_VERIFICATION_CODE_HEADER = "x-requested-verification-code"; + String WWW_AUTHENTICATE_HEADER = "WWW-Authenticate"; } interface ThreeDS2Property { diff --git a/src/main/java/com/adyen/httpclient/AdyenHttpClient.java b/src/main/java/com/adyen/httpclient/AdyenHttpClient.java index c4e252ee7..ab08231a7 100644 --- a/src/main/java/com/adyen/httpclient/AdyenHttpClient.java +++ b/src/main/java/com/adyen/httpclient/AdyenHttpClient.java @@ -30,6 +30,7 @@ import static com.adyen.constants.ApiConstants.RequestProperty.IDEMPOTENCY_KEY; import static com.adyen.constants.ApiConstants.RequestProperty.REQUESTED_VERIFICATION_CODE_HEADER; import static com.adyen.constants.ApiConstants.RequestProperty.USER_AGENT; +import static com.adyen.constants.ApiConstants.RequestProperty.WWW_AUTHENTICATE_HEADER; import com.adyen.Client; import com.adyen.Config; @@ -199,6 +200,10 @@ private void setHeaders( REQUESTED_VERIFICATION_CODE_HEADER, requestOptions.getRequestedVerificationCodeHeader()); } + if (requestOptions.getWwwAuthenticateHeader() != null) { + httpUriRequest.addHeader( + WWW_AUTHENTICATE_HEADER, requestOptions.getWwwAuthenticateHeader()); + } if (requestOptions.getAdditionalServiceHeaders() != null) { requestOptions.getAdditionalServiceHeaders().forEach(httpUriRequest::addHeader); diff --git a/src/main/java/com/adyen/model/RequestOptions.java b/src/main/java/com/adyen/model/RequestOptions.java index fd819ae7a..64733d1fc 100644 --- a/src/main/java/com/adyen/model/RequestOptions.java +++ b/src/main/java/com/adyen/model/RequestOptions.java @@ -5,6 +5,7 @@ public class RequestOptions { private String idempotencyKey; private String requestedVerificationCodeHeader; + private String wwwAuthenticateHeader; private HashMap additionalServiceHeaders; public RequestOptions idempotencyKey(String idempotencyKey) { @@ -17,11 +18,24 @@ public RequestOptions requestedVerificationCodeHeader(String requestedVerificati return this; } + public RequestOptions wwwAuthenticateHeader(String wwwAuthenticateHeader) { + this.wwwAuthenticateHeader = wwwAuthenticateHeader; + return this; + } + public RequestOptions additionalServiceHeaders(HashMap additionalServiceHeaders) { this.additionalServiceHeaders = additionalServiceHeaders; 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; } @@ -46,6 +60,14 @@ public void setAdditionalServiceHeaders(HashMap additionalServic this.additionalServiceHeaders = additionalServiceHeaders; } + public String getWwwAuthenticateHeader() { + return wwwAuthenticateHeader; + } + + public void setWwwAuthenticateHeader(String wwwAuthenticateHeader) { + this.wwwAuthenticateHeader = wwwAuthenticateHeader; + } + @Override public String toString() { return "RequestOptions{" @@ -55,6 +77,9 @@ public String toString() { + ", requestedVerificationCodeHeader='" + requestedVerificationCodeHeader + '\'' + + ", wwwAuthenticateHeader='" + + wwwAuthenticateHeader + + '\'' + ", additionalServiceHeaders=" + additionalServiceHeaders + '}'; diff --git a/src/test/java/com/adyen/httpclient/ClientTest.java b/src/test/java/com/adyen/httpclient/ClientTest.java index 5e0eea105..f23f00769 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 { @@ -186,6 +197,7 @@ public void testRequestWithHttpHeaders() throws Exception { RequestOptions requestOptions = new RequestOptions() .idempotencyKey("test-idempotency-key") + .wwwAuthenticateHeader("www-authenticate-header") .additionalServiceHeaders(additionalHeaders); HttpUriRequestBase request = @@ -205,5 +217,9 @@ public void testRequestWithHttpHeaders() throws Exception { Header customHeader = request.getFirstHeader("X-Custom-Header"); assertNotNull(customHeader); assertEquals("custom-value", customHeader.getValue()); + + Header wwwAuthenticate = request.getFirstHeader("WWW-Authenticate"); + assertNotNull(wwwAuthenticate); + assertEquals("www-authenticate-header", wwwAuthenticate.getValue()); } } From b98c4f85174a17de51062f5e0a6df68225648d0e Mon Sep 17 00:00:00 2001 From: gcatanese Date: Mon, 10 Nov 2025 11:50:31 +0100 Subject: [PATCH 3/5] Generate BalancePlatform services/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 +++-- .../balanceplatform/AccountHoldersApi.java | 8 +- .../AuthorizedCardUsersApi.java | 2 - .../service/balanceplatform/BalancesApi.java | 2 - .../balanceplatform/GrantOffersApi.java | 3 +- .../balanceplatform/ManageScaDevicesApi.java | 9 +- .../ScaAssociationManagementApi.java | 181 +++++++++ .../ScaDeviceManagementApi.java | 184 +++++++++ .../TransferLimitsBalanceAccountLevelApi.java | 38 +- ...TransferLimitsBalancePlatformLevelApi.java | 37 +- 29 files changed, 3443 insertions(+), 116 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 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/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) diff --git a/src/main/java/com/adyen/service/balanceplatform/AccountHoldersApi.java b/src/main/java/com/adyen/service/balanceplatform/AccountHoldersApi.java index bc0f5be77..f74210cd5 100644 --- a/src/main/java/com/adyen/service/balanceplatform/AccountHoldersApi.java +++ b/src/main/java/com/adyen/service/balanceplatform/AccountHoldersApi.java @@ -217,10 +217,10 @@ public TransactionRulesResponse getAllTransactionRulesForAccountHolder( * Get a tax form * * @param id {@link String } The unique identifier of the account holder. (required) - * @param formType {@link String } The type of tax form you want to retrieve. Accepted values are - * **US1099k** and **US1099nec** (required) - * @param year {@link Integer } The tax year in YYYY format for the tax form you want to retrieve - * (required) + * @param formType {@link String } Query: The type of tax form you want to retrieve. Accepted + * values are **US1099k** and **US1099nec** (required) + * @param year {@link Integer } Query: The tax year in YYYY format for the tax form you want to + * retrieve (required) * @return {@link GetTaxFormResponse } * @throws ApiException if fails to make API call */ diff --git a/src/main/java/com/adyen/service/balanceplatform/AuthorizedCardUsersApi.java b/src/main/java/com/adyen/service/balanceplatform/AuthorizedCardUsersApi.java index 8dd66cc10..9d3573e82 100644 --- a/src/main/java/com/adyen/service/balanceplatform/AuthorizedCardUsersApi.java +++ b/src/main/java/com/adyen/service/balanceplatform/AuthorizedCardUsersApi.java @@ -56,7 +56,6 @@ public AuthorizedCardUsersApi(Client client, String baseURL) { * * @param paymentInstrumentId {@link String } (required) * @param authorisedCardUsers {@link AuthorisedCardUsers } (required) - * @param authorisedCardUsers {@link AuthorisedCardUsers } (required) * @throws ApiException if fails to make API call */ public void createAuthorisedCardUsers( @@ -178,7 +177,6 @@ public AuthorisedCardUsers getAllAuthorisedCardUsers( * * @param paymentInstrumentId {@link String } (required) * @param authorisedCardUsers {@link AuthorisedCardUsers } (required) - * @param authorisedCardUsers {@link AuthorisedCardUsers } (required) * @throws ApiException if fails to make API call */ public void updateAuthorisedCardUsers( diff --git a/src/main/java/com/adyen/service/balanceplatform/BalancesApi.java b/src/main/java/com/adyen/service/balanceplatform/BalancesApi.java index 6d93ac065..1c95becfd 100644 --- a/src/main/java/com/adyen/service/balanceplatform/BalancesApi.java +++ b/src/main/java/com/adyen/service/balanceplatform/BalancesApi.java @@ -61,7 +61,6 @@ public BalancesApi(Client client, String baseURL) { * (required) * @param webhookId {@link String } The unique identifier of the balance webhook. (required) * @param balanceWebhookSettingInfo {@link BalanceWebhookSettingInfo } (required) - * @param balanceWebhookSettingInfo {@link BalanceWebhookSettingInfo } (required) * @return {@link WebhookSetting } * @throws ApiException if fails to make API call */ @@ -287,7 +286,6 @@ public WebhookSetting getWebhookSetting( * @param settingId {@link String } The unique identifier of the balance webhook setting. * (required) * @param balanceWebhookSettingInfoUpdate {@link BalanceWebhookSettingInfoUpdate } (required) - * @param balanceWebhookSettingInfoUpdate {@link BalanceWebhookSettingInfoUpdate } (required) * @return {@link WebhookSetting } * @throws ApiException if fails to make API call */ diff --git a/src/main/java/com/adyen/service/balanceplatform/GrantOffersApi.java b/src/main/java/com/adyen/service/balanceplatform/GrantOffersApi.java index 2c932c4f3..5d78abc9b 100644 --- a/src/main/java/com/adyen/service/balanceplatform/GrantOffersApi.java +++ b/src/main/java/com/adyen/service/balanceplatform/GrantOffersApi.java @@ -55,7 +55,8 @@ public GrantOffersApi(Client client, String baseURL) { /** * Get all available grant offers * - * @param accountHolderId {@link String } The unique identifier of the grant account. (required) + * @param accountHolderId {@link String } Query: The unique identifier of the grant account. + * (required) * @return {@link GrantOffers } * @throws ApiException if fails to make API call * @deprecated since Configuration API v2 Use the `/grantOffers` endpoint from the [Capital diff --git a/src/main/java/com/adyen/service/balanceplatform/ManageScaDevicesApi.java b/src/main/java/com/adyen/service/balanceplatform/ManageScaDevicesApi.java index 801fa11bc..fc11b17a8 100644 --- a/src/main/java/com/adyen/service/balanceplatform/ManageScaDevicesApi.java +++ b/src/main/java/com/adyen/service/balanceplatform/ManageScaDevicesApi.java @@ -155,8 +155,8 @@ public RegisterSCAFinalResponse completeRegistrationOfScaDevice( * Delete a registration of an SCA device * * @param id {@link String } The unique identifier of the SCA device. (required) - * @param paymentInstrumentId {@link String } The unique identifier of the payment instrument - * linked to the SCA device. (required) + * @param paymentInstrumentId {@link String } Query: The unique identifier of the payment + * instrument linked to the SCA device. (required) * @throws ApiException if fails to make API call */ public void deleteRegistrationOfScaDevice(String id, String paymentInstrumentId) @@ -277,8 +277,9 @@ public RegisterSCAResponse initiateRegistrationOfScaDevice( /** * Get a list of registered SCA devices * - * @param paymentInstrumentId {@link String } The unique identifier of a payment instrument. It - * limits the returned list to SCA devices associated to this payment instrument. (required) + * @param paymentInstrumentId {@link String } Query: The unique identifier of a payment + * instrument. It limits the returned list to SCA devices associated to this payment + * instrument. (required) * @return {@link SearchRegisteredDevicesResponse } * @throws ApiException if fails to make API call */ 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..f710983f8 --- /dev/null +++ b/src/main/java/com/adyen/service/balanceplatform/ScaAssociationManagementApi.java @@ -0,0 +1,181 @@ +/* + * 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 approveAssociationRequest {@link ApproveAssociationRequest } (required) + * @return {@link ApproveAssociationResponse } + * @throws ApiException if fails to make API call + */ + public ApproveAssociationResponse approveAssociation( + ApproveAssociationRequest approveAssociationRequest) throws ApiException, IOException { + return approveAssociation(approveAssociationRequest, null); + } + + /** + * 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 } 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) + * @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 { + return listAssociations(entityType, entityId, pageSize, pageNumber, null); + } + + /** + * 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 removeAssociationRequest {@link RemoveAssociationRequest } (required) + * @throws ApiException if fails to make API call + */ + public void removeAssociation(RemoveAssociationRequest removeAssociationRequest) + throws ApiException, IOException { + removeAssociation(removeAssociationRequest, null); + } + + /** + * 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..bd76837d5 --- /dev/null +++ b/src/main/java/com/adyen/service/balanceplatform/ScaDeviceManagementApi.java @@ -0,0 +1,184 @@ +/* + * 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 { + return beginScaDeviceRegistration(beginScaDeviceRegistrationRequest, null); + } + + /** + * 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 { + return finishScaDeviceRegistration(deviceId, finishScaDeviceRegistrationRequest, null); + } + + /** + * 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 { + return submitScaAssociation(deviceId, submitScaAssociationRequest, null); + } + + /** + * 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/TransferLimitsBalanceAccountLevelApi.java b/src/main/java/com/adyen/service/balanceplatform/TransferLimitsBalanceAccountLevelApi.java index 1cfbc8142..9d1654de6 100644 --- a/src/main/java/com/adyen/service/balanceplatform/TransferLimitsBalanceAccountLevelApi.java +++ b/src/main/java/com/adyen/service/balanceplatform/TransferLimitsBalanceAccountLevelApi.java @@ -63,7 +63,6 @@ public TransferLimitsBalanceAccountLevelApi(Client client, String baseURL) { * * @param id {@link String } The unique identifier of the balance account. (required) * @param approveTransferLimitRequest {@link ApproveTransferLimitRequest } (required) - * @param approveTransferLimitRequest {@link ApproveTransferLimitRequest } (required) * @throws ApiException if fails to make API call */ public void approvePendingTransferLimits( @@ -104,7 +103,6 @@ public void approvePendingTransferLimits( * * @param id {@link String } The unique identifier of the balance account. (required) * @param createTransferLimitRequest {@link CreateTransferLimitRequest } (required) - * @param createTransferLimitRequest {@link CreateTransferLimitRequest } (required) * @return {@link TransferLimit } * @throws ApiException if fails to make API call */ @@ -147,37 +145,37 @@ public TransferLimit createTransferLimit( /** * Delete a scheduled or pending transfer limit * - * @param transferLimitId {@link String } The unique identifier of the transfer limit. (required) * @param id {@link String } The unique identifier of the balance account. (required) + * @param transferLimitId {@link String } The unique identifier of the transfer limit. (required) * @throws ApiException if fails to make API call */ - public void deletePendingTransferLimit(String transferLimitId, String id) + public void deletePendingTransferLimit(String id, String transferLimitId) throws ApiException, IOException { - deletePendingTransferLimit(transferLimitId, id, null); + deletePendingTransferLimit(id, transferLimitId, null); } /** * Delete a scheduled or pending transfer limit * - * @param transferLimitId {@link String } The unique identifier of the transfer limit. (required) * @param id {@link String } The unique identifier of the balance account. (required) + * @param transferLimitId {@link String } The unique identifier of the transfer limit. (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 deletePendingTransferLimit( - String transferLimitId, String id, RequestOptions requestOptions) + String id, String transferLimitId, RequestOptions requestOptions) throws ApiException, IOException { // Add path params Map pathParams = new HashMap<>(); - if (transferLimitId == null) { - throw new IllegalArgumentException("Please provide the transferLimitId path parameter"); - } - pathParams.put("transferLimitId", transferLimitId); if (id == null) { throw new IllegalArgumentException("Please provide the id path parameter"); } pathParams.put("id", id); + if (transferLimitId == null) { + throw new IllegalArgumentException("Please provide the transferLimitId path parameter"); + } + pathParams.put("transferLimitId", transferLimitId); String requestBody = null; Resource resource = @@ -245,39 +243,39 @@ public TransferLimitListResponse getCurrentTransferLimits( /** * Get the details of a transfer limit * - * @param transferLimitId {@link String } The unique identifier of the transfer limit. (required) * @param id {@link String } The unique identifier of the balance account. (required) + * @param transferLimitId {@link String } The unique identifier of the transfer limit. (required) * @return {@link TransferLimit } * @throws ApiException if fails to make API call */ - public TransferLimit getSpecificTransferLimit(String transferLimitId, String id) + public TransferLimit getSpecificTransferLimit(String id, String transferLimitId) throws ApiException, IOException { - return getSpecificTransferLimit(transferLimitId, id, null); + return getSpecificTransferLimit(id, transferLimitId, null); } /** * Get the details of a transfer limit * - * @param transferLimitId {@link String } The unique identifier of the transfer limit. (required) * @param id {@link String } The unique identifier of the balance account. (required) + * @param transferLimitId {@link String } The unique identifier of the transfer limit. (required) * @param requestOptions {@link RequestOptions } Object to store additional data such as * idempotency-keys (optional) * @return {@link TransferLimit } * @throws ApiException if fails to make API call */ public TransferLimit getSpecificTransferLimit( - String transferLimitId, String id, RequestOptions requestOptions) + String id, String transferLimitId, RequestOptions requestOptions) throws ApiException, IOException { // Add path params Map pathParams = new HashMap<>(); - if (transferLimitId == null) { - throw new IllegalArgumentException("Please provide the transferLimitId path parameter"); - } - pathParams.put("transferLimitId", transferLimitId); if (id == null) { throw new IllegalArgumentException("Please provide the id path parameter"); } pathParams.put("id", id); + if (transferLimitId == null) { + throw new IllegalArgumentException("Please provide the transferLimitId path parameter"); + } + pathParams.put("transferLimitId", transferLimitId); String requestBody = null; Resource resource = diff --git a/src/main/java/com/adyen/service/balanceplatform/TransferLimitsBalancePlatformLevelApi.java b/src/main/java/com/adyen/service/balanceplatform/TransferLimitsBalancePlatformLevelApi.java index 5bd78f709..e44072094 100644 --- a/src/main/java/com/adyen/service/balanceplatform/TransferLimitsBalancePlatformLevelApi.java +++ b/src/main/java/com/adyen/service/balanceplatform/TransferLimitsBalancePlatformLevelApi.java @@ -63,7 +63,6 @@ public TransferLimitsBalancePlatformLevelApi(Client client, String baseURL) { * * @param id {@link String } The unique identifier of the balance platform. (required) * @param createTransferLimitRequest {@link CreateTransferLimitRequest } (required) - * @param createTransferLimitRequest {@link CreateTransferLimitRequest } (required) * @return {@link TransferLimit } * @throws ApiException if fails to make API call */ @@ -106,37 +105,37 @@ public TransferLimit createTransferLimit( /** * Delete a scheduled or pending transfer limit * - * @param transferLimitId {@link String } The unique identifier of the transfer limit. (required) * @param id {@link String } The unique identifier of the balance platform. (required) + * @param transferLimitId {@link String } The unique identifier of the transfer limit. (required) * @throws ApiException if fails to make API call */ - public void deletePendingTransferLimit(String transferLimitId, String id) + public void deletePendingTransferLimit(String id, String transferLimitId) throws ApiException, IOException { - deletePendingTransferLimit(transferLimitId, id, null); + deletePendingTransferLimit(id, transferLimitId, null); } /** * Delete a scheduled or pending transfer limit * - * @param transferLimitId {@link String } The unique identifier of the transfer limit. (required) * @param id {@link String } The unique identifier of the balance platform. (required) + * @param transferLimitId {@link String } The unique identifier of the transfer limit. (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 deletePendingTransferLimit( - String transferLimitId, String id, RequestOptions requestOptions) + String id, String transferLimitId, RequestOptions requestOptions) throws ApiException, IOException { // Add path params Map pathParams = new HashMap<>(); - if (transferLimitId == null) { - throw new IllegalArgumentException("Please provide the transferLimitId path parameter"); - } - pathParams.put("transferLimitId", transferLimitId); if (id == null) { throw new IllegalArgumentException("Please provide the id path parameter"); } pathParams.put("id", id); + if (transferLimitId == null) { + throw new IllegalArgumentException("Please provide the transferLimitId path parameter"); + } + pathParams.put("transferLimitId", transferLimitId); String requestBody = null; Resource resource = @@ -148,39 +147,39 @@ public void deletePendingTransferLimit( /** * Get the details of a transfer limit * - * @param transferLimitId {@link String } The unique identifier of the transfer limit. (required) * @param id {@link String } The unique identifier of the balance platform. (required) + * @param transferLimitId {@link String } The unique identifier of the transfer limit. (required) * @return {@link TransferLimit } * @throws ApiException if fails to make API call */ - public TransferLimit getSpecificTransferLimit(String transferLimitId, String id) + public TransferLimit getSpecificTransferLimit(String id, String transferLimitId) throws ApiException, IOException { - return getSpecificTransferLimit(transferLimitId, id, null); + return getSpecificTransferLimit(id, transferLimitId, null); } /** * Get the details of a transfer limit * - * @param transferLimitId {@link String } The unique identifier of the transfer limit. (required) * @param id {@link String } The unique identifier of the balance platform. (required) + * @param transferLimitId {@link String } The unique identifier of the transfer limit. (required) * @param requestOptions {@link RequestOptions } Object to store additional data such as * idempotency-keys (optional) * @return {@link TransferLimit } * @throws ApiException if fails to make API call */ public TransferLimit getSpecificTransferLimit( - String transferLimitId, String id, RequestOptions requestOptions) + String id, String transferLimitId, RequestOptions requestOptions) throws ApiException, IOException { // Add path params Map pathParams = new HashMap<>(); - if (transferLimitId == null) { - throw new IllegalArgumentException("Please provide the transferLimitId path parameter"); - } - pathParams.put("transferLimitId", transferLimitId); if (id == null) { throw new IllegalArgumentException("Please provide the id path parameter"); } pathParams.put("id", id); + if (transferLimitId == null) { + throw new IllegalArgumentException("Please provide the transferLimitId path parameter"); + } + pathParams.put("transferLimitId", transferLimitId); String requestBody = null; Resource resource = From 9e072d47462960616fe588e9deb126524a246229 Mon Sep 17 00:00:00 2001 From: gcatanese Date: Mon, 10 Nov 2025 11:50:41 +0100 Subject: [PATCH 4/5] Add tests --- .../java/com/adyen/BalancePlatformTest.java | 206 ++++++++++++++++++ .../BeginScaDeviceRegistrationResponse.json | 8 + .../FinishScaDeviceRegistrationResponse.json | 7 + .../balancePlatform/ScaAssociations.json | 10 + .../balancePlatform/ScaAssociationsList.json | 29 +++ .../SubmitScaAssociationResponse.json | 10 + 6 files changed, 270 insertions(+) create mode 100644 src/test/resources/mocks/balancePlatform/BeginScaDeviceRegistrationResponse.json create mode 100644 src/test/resources/mocks/balancePlatform/FinishScaDeviceRegistrationResponse.json create mode 100644 src/test/resources/mocks/balancePlatform/ScaAssociations.json create mode 100644 src/test/resources/mocks/balancePlatform/ScaAssociationsList.json create mode 100644 src/test/resources/mocks/balancePlatform/SubmitScaAssociationResponse.json diff --git a/src/test/java/com/adyen/BalancePlatformTest.java b/src/test/java/com/adyen/BalancePlatformTest.java index 3468b6eb3..e93a873a4 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,207 @@ 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( + new ApproveAssociationRequest() + .status(AssociationStatus.ACTIVE) + .entityId("AH00000000000000000000001") + .entityType(ScaEntityType.ACCOUNTHOLDER) + .scaDeviceIds(List.of("BSDR42XV3223223S5N6CDQDGH53M8H")), + new RequestOptions().wwwAuthenticateHeader("abcd-1234-xyzw-5678")); + + 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().getWwwAuthenticateHeader()); + assertEquals("abcd-1234-xyzw-5678", optionsCaptor.getValue().getWwwAuthenticateHeader()); + } + + @Test + public void scaAssociationManagementRemoveAssociationTest() throws Exception { + Client client = createMockClientFromResponse(""); + ScaAssociationManagementApi service = new ScaAssociationManagementApi(client); + RemoveAssociationRequest removeAssociationRequest = + new RemoveAssociationRequest() + .entityId("AH00000000000000000000001") + .entityType(ScaEntityType.ACCOUNTHOLDER) + .scaDeviceIds(List.of("BSDR42XV3223223S5N6CDQDGH53M8H")); + + service.removeAssociation( + removeAssociationRequest, + new RequestOptions().wwwAuthenticateHeader("abcd-1234-xyzw-5678")); + + ArgumentCaptor requestBodyCaptor = ArgumentCaptor.forClass(String.class); + ArgumentCaptor optionsCaptor = ArgumentCaptor.forClass(RequestOptions.class); + verify(client.getHttpClient()) + .request( + eq("https://balanceplatform-api-test.adyen.com/bcl/v2/scaAssociations"), + requestBodyCaptor.capture(), + eq(client.getConfig()), + eq(false), + optionsCaptor.capture(), + eq(ApiConstants.HttpMethod.DELETE), + eq(null)); + + assertEquals(removeAssociationRequest.toJson(), requestBodyCaptor.getValue()); + assertNotNull(optionsCaptor.getValue().getWwwAuthenticateHeader()); + assertEquals("abcd-1234-xyzw-5678", optionsCaptor.getValue().getWwwAuthenticateHeader()); + } + + @Test + public void scaAssociationManagementListAssociationsTest() throws Exception { + Client client = createMockClientFromFile("mocks/balancePlatform/ScaAssociationsList.json"); + ScaAssociationManagementApi service = new ScaAssociationManagementApi(client); + ListAssociationsResponse response = + service.listAssociations(ScaEntityType.ACCOUNTHOLDER, "AH00000000000000000000001", 10, 0); + + assertNotNull(response); + assertEquals(2, response.getData().size()); + assertEquals("BSDR11111111111A1AAA1AAAAA1AA1", response.getData().get(0).getScaDeviceId()); + + ArgumentCaptor> queryParamsCaptor = ArgumentCaptor.forClass(Map.class); + verify(client.getHttpClient()) + .request( + eq("https://balanceplatform-api-test.adyen.com/bcl/v2/scaAssociations"), + eq(null), + eq(client.getConfig()), + eq(false), + eq(null), + eq(ApiConstants.HttpMethod.GET), + queryParamsCaptor.capture()); + + Map queryParams = queryParamsCaptor.getValue(); + assertEquals("accountHolder", queryParams.get("entityType")); + assertEquals("AH00000000000000000000001", queryParams.get("entityId")); + assertEquals("10", queryParams.get("pageSize")); + assertEquals("0", queryParams.get("pageNumber")); + } + + @Test + public void scaDeviceManagementBeginScaDeviceRegistrationTest() throws Exception { + Client client = + createMockClientFromFile("mocks/balancePlatform/BeginScaDeviceRegistrationResponse.json"); + ScaDeviceManagementApi service = new ScaDeviceManagementApi(client); + + BeginScaDeviceRegistrationRequest request = + new BeginScaDeviceRegistrationRequest() + .name("My Device") + .sdkOutput( + "eyJjaGFsbGVuZ2UiOiJVWEZaTURONGNXWjZUVFExUlhWV2JuaEJPVzVzTm05cVVEUktUbFZtZGtrPSJ9"); + + BeginScaDeviceRegistrationResponse response = service.beginScaDeviceRegistration(request); + + assertNotNull(response); + assertNotNull(response.getScaDevice()); + assertEquals("BSDR42XV3223223S5N6CDQDGH53M8H", response.getScaDevice().getId()); + assertEquals("My Device", response.getScaDevice().getName()); + assertEquals(ScaDeviceType.IOS, response.getScaDevice().getType()); + assertEquals( + "eyJjaGFsbGVuZ2UiOiJVWEZaTURONGNXWjZUVFExUlhWV2JuaEJPVzVzTm05cVVEUktUbFZtZGtrPSJ9", + response.getSdkInput()); + + ArgumentCaptor requestBodyCaptor = ArgumentCaptor.forClass(String.class); + verify(client.getHttpClient()) + .request( + eq("https://balanceplatform-api-test.adyen.com/bcl/v2/scaDevices"), + requestBodyCaptor.capture(), + eq(client.getConfig()), + eq(false), + eq(null), + eq(ApiConstants.HttpMethod.POST), + eq(null)); + + assertEquals(request.toJson(), requestBodyCaptor.getValue()); + } + + @Test + public void scaDeviceManagementFinishScaDeviceRegistrationTest() throws Exception { + Client client = + createMockClientFromFile("mocks/balancePlatform/FinishScaDeviceRegistrationResponse.json"); + ScaDeviceManagementApi service = new ScaDeviceManagementApi(client); + + String deviceId = "BSDR42XV3223223S5N6CDQDGH53M8H"; + FinishScaDeviceRegistrationRequest request = + new FinishScaDeviceRegistrationRequest() + .sdkOutput( + "eyJjaGFsbGVuZ2UiOiJVWEZaTURONGNXWjZUVFExUlhWV2JuaEJPVzVzTm05cVVEUktUbFZtZGtrPSJ9"); + + FinishScaDeviceRegistrationResponse response = + service.finishScaDeviceRegistration(deviceId, request); + + assertNotNull(response); + assertNotNull(response.getScaDevice()); + assertEquals("BSDR42XV3223223S5N6CDQDGH53M8H", response.getScaDevice().getId()); + assertEquals("Device", response.getScaDevice().getName()); + assertEquals(ScaDeviceType.IOS, response.getScaDevice().getType()); + + ArgumentCaptor requestBodyCaptor = ArgumentCaptor.forClass(String.class); + verify(client.getHttpClient()) + .request( + eq( + "https://balanceplatform-api-test.adyen.com/bcl/v2/scaDevices/BSDR42XV3223223S5N6CDQDGH53M8H"), + requestBodyCaptor.capture(), + eq(client.getConfig()), + eq(false), + eq(null), + eq(ApiConstants.HttpMethod.PATCH), + eq(null)); + + assertEquals(request.toJson(), requestBodyCaptor.getValue()); + } + + @Test + public void scaDeviceManagementSubmitScaAssociationTest() throws Exception { + Client client = + createMockClientFromFile("mocks/balancePlatform/SubmitScaAssociationResponse.json"); + ScaDeviceManagementApi service = new ScaDeviceManagementApi(client); + + String deviceId = "BSDR11111111111A1AAA1AAAAA1AA1"; + SubmitScaAssociationRequest request = + new SubmitScaAssociationRequest() + .addEntitiesItem( + new ScaEntity().type(ScaEntityType.ACCOUNTHOLDER).id("AH00000000000000000000001")); + + SubmitScaAssociationResponse response = service.submitScaAssociation(deviceId, request); + + assertNotNull(response); + assertNotNull(response.getScaAssociations()); + assertEquals(1, response.getScaAssociations().size()); + assertEquals( + "BSDR11111111111A1AAA1AAAAA1AA1", response.getScaAssociations().get(0).getScaDeviceId()); + assertEquals(ScaEntityType.ACCOUNTHOLDER, response.getScaAssociations().get(0).getEntityType()); + assertEquals("AH00000000000000000000001", response.getScaAssociations().get(0).getEntityId()); + assertEquals( + AssociationStatus.PENDINGAPPROVAL, response.getScaAssociations().get(0).getStatus()); + + ArgumentCaptor requestBodyCaptor = ArgumentCaptor.forClass(String.class); + verify(client.getHttpClient()) + .request( + eq( + "https://balanceplatform-api-test.adyen.com/bcl/v2/scaDevices/BSDR11111111111A1AAA1AAAAA1AA1/scaAssociations"), + requestBodyCaptor.capture(), + eq(client.getConfig()), + eq(false), + eq(null), + eq(ApiConstants.HttpMethod.POST), + eq(null)); + + assertEquals(request.toJson(), requestBodyCaptor.getValue()); + } } diff --git a/src/test/resources/mocks/balancePlatform/BeginScaDeviceRegistrationResponse.json b/src/test/resources/mocks/balancePlatform/BeginScaDeviceRegistrationResponse.json new file mode 100644 index 000000000..dd1ee346c --- /dev/null +++ b/src/test/resources/mocks/balancePlatform/BeginScaDeviceRegistrationResponse.json @@ -0,0 +1,8 @@ +{ + "scaDevice": { + "id": "BSDR42XV3223223S5N6CDQDGH53M8H", + "name": "My Device", + "type": "ios" + }, + "sdkInput": "eyJjaGFsbGVuZ2UiOiJVWEZaTURONGNXWjZUVFExUlhWV2JuaEJPVzVzTm05cVVEUktUbFZtZGtrPSJ9" +} \ No newline at end of file diff --git a/src/test/resources/mocks/balancePlatform/FinishScaDeviceRegistrationResponse.json b/src/test/resources/mocks/balancePlatform/FinishScaDeviceRegistrationResponse.json new file mode 100644 index 000000000..da1542c55 --- /dev/null +++ b/src/test/resources/mocks/balancePlatform/FinishScaDeviceRegistrationResponse.json @@ -0,0 +1,7 @@ +{ + "scaDevice": { + "id": "BSDR42XV3223223S5N6CDQDGH53M8H", + "name": "Device", + "type": "ios" + } +} \ No newline at end of file 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 diff --git a/src/test/resources/mocks/balancePlatform/ScaAssociationsList.json b/src/test/resources/mocks/balancePlatform/ScaAssociationsList.json new file mode 100644 index 000000000..f55566bbf --- /dev/null +++ b/src/test/resources/mocks/balancePlatform/ScaAssociationsList.json @@ -0,0 +1,29 @@ +{ + "_links": { + "self": { + "href": "https://exampledomain.com/bcl/api/v2/scaAssociations?pageNumber=0&entityType=accountHolder&pageSize=10&entityId=AH3227J223222D5HHM4779X6X" + } + }, + "itemsTotal": 2, + "pagesTotal": 1, + "data": [ + { + "scaDeviceId": "BSDR11111111111A1AAA1AAAAA1AA1", + "scaDeviceName": "Device 1", + "scaDeviceType": "ios", + "entityType": "accountHolder", + "entityId": "AH00000000000000000000001", + "status": "active", + "createdAt": "2025-09-02T14:39:17.232Z" + }, + { + "scaDeviceId": "BSDR22222222222B2BBB2BBBBB2BB2", + "scaDeviceName": "Device 2", + "scaDeviceType": "ios", + "entityType": "accountHolder", + "entityId": "AH00000000000000000000001", + "status": "pendingApproval", + "createdAt": "2025-09-02T14:39:17.232Z" + } + ] +} \ No newline at end of file diff --git a/src/test/resources/mocks/balancePlatform/SubmitScaAssociationResponse.json b/src/test/resources/mocks/balancePlatform/SubmitScaAssociationResponse.json new file mode 100644 index 000000000..12574780e --- /dev/null +++ b/src/test/resources/mocks/balancePlatform/SubmitScaAssociationResponse.json @@ -0,0 +1,10 @@ +{ + "scaAssociations": [ + { + "scaDeviceId": "BSDR11111111111A1AAA1AAAAA1AA1", + "entityType": "accountHolder", + "entityId": "AH00000000000000000000001", + "status": "pendingApproval" + } + ] +} \ No newline at end of file From eaa48de3287a7399c5bc94694df5bb5a00c55204 Mon Sep 17 00:00:00 2001 From: gcatanese Date: Mon, 10 Nov 2025 16:18:00 +0100 Subject: [PATCH 5/5] Test response headers in exception --- .../java/com/adyen/service/ResourceTest.java | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/src/test/java/com/adyen/service/ResourceTest.java b/src/test/java/com/adyen/service/ResourceTest.java index f03f5ec71..b41c46380 100644 --- a/src/test/java/com/adyen/service/ResourceTest.java +++ b/src/test/java/com/adyen/service/ResourceTest.java @@ -37,6 +37,7 @@ import java.io.IOException; import java.util.Collections; import java.util.HashMap; +import java.util.List; import java.util.Map; import org.junit.Before; import org.junit.Test; @@ -199,4 +200,30 @@ public void testValidationExceptionWithInvalidJsonResponse() throws IOException assertNull(e.getError()); } } + + @Test + public void testRequestException401WithWWWAuthenticateHeader() + throws IOException, HTTPClientException { + try { + Map> responseHeaders = new HashMap<>(); + responseHeaders.put("WWW-Authenticate", Collections.singletonList("abcd-1234-xywx-5678")); + + when(clientInterfaceMock.request( + "", "request", null, false, null, ApiConstants.HttpMethod.POST, null)) + .thenThrow(new HTTPClientException("Unauthorized", 401, responseHeaders, null)); + + Resource resource = new Resource(serviceMock, "", null); + resource.request("request"); + + fail("Expected exception"); + } catch (ApiException e) { + assertEquals(401, e.getStatusCode()); + assertNotNull(e.getResponseHeaders()); + assertTrue(e.getResponseHeaders().containsKey("WWW-Authenticate")); + assertEquals( + Collections.singletonList("abcd-1234-xywx-5678"), + e.getResponseHeaders().get("WWW-Authenticate")); + assertNull(e.getError()); + } + } }