diff --git a/src/main/java/com/adyen/model/acswebhooks/ChallengeInfo.java b/src/main/java/com/adyen/model/acswebhooks/ChallengeInfo.java index 2a36134b8..f50230bed 100644 --- a/src/main/java/com/adyen/model/acswebhooks/ChallengeInfo.java +++ b/src/main/java/com/adyen/model/acswebhooks/ChallengeInfo.java @@ -42,9 +42,11 @@ public class ChallengeInfo { /** - * Indicator informing the Access Control Server (ACS) and the Directory Server (DS) that the authentication has been cancelled. For possible values, refer to [3D Secure API reference](https://docs.adyen.com/online-payments/3d-secure/api-reference#mpidata). + * Indicator informing the Access Control Server (ACS) and the Directory Server (DS) that the authentication has been cancelled. Possible values: * **00**: Data element is absent or value has been sent back with the key `challengeCancel`. * **01**: Cardholder selected **Cancel**. * **02**: 3DS Requestor cancelled Authentication. * **03**: Transaction abandoned. * **04**: Transaction timed out at ACS — other timeouts. * **05**: Transaction timed out at ACS — first CReq not received by ACS. * **06**: Transaction error. * **07**: Unknown. * **08**: Transaction time out at SDK. */ public enum ChallengeCancelEnum { + _00("00"), + _01("01"), _02("02"), @@ -57,7 +59,9 @@ public enum ChallengeCancelEnum { _06("06"), - _07("07"); + _07("07"), + + _08("08"); private String value; @@ -143,7 +147,7 @@ public ChallengeInfo() { } /** - * Indicator informing the Access Control Server (ACS) and the Directory Server (DS) that the authentication has been cancelled. For possible values, refer to [3D Secure API reference](https://docs.adyen.com/online-payments/3d-secure/api-reference#mpidata). + * Indicator informing the Access Control Server (ACS) and the Directory Server (DS) that the authentication has been cancelled. Possible values: * **00**: Data element is absent or value has been sent back with the key `challengeCancel`. * **01**: Cardholder selected **Cancel**. * **02**: 3DS Requestor cancelled Authentication. * **03**: Transaction abandoned. * **04**: Transaction timed out at ACS — other timeouts. * **05**: Transaction timed out at ACS — first CReq not received by ACS. * **06**: Transaction error. * **07**: Unknown. * **08**: Transaction time out at SDK. * * @param challengeCancel * @return the current {@code ChallengeInfo} instance, allowing for method chaining @@ -154,10 +158,10 @@ public ChallengeInfo challengeCancel(ChallengeCancelEnum challengeCancel) { } /** - * Indicator informing the Access Control Server (ACS) and the Directory Server (DS) that the authentication has been cancelled. For possible values, refer to [3D Secure API reference](https://docs.adyen.com/online-payments/3d-secure/api-reference#mpidata). + * Indicator informing the Access Control Server (ACS) and the Directory Server (DS) that the authentication has been cancelled. Possible values: * **00**: Data element is absent or value has been sent back with the key `challengeCancel`. * **01**: Cardholder selected **Cancel**. * **02**: 3DS Requestor cancelled Authentication. * **03**: Transaction abandoned. * **04**: Transaction timed out at ACS — other timeouts. * **05**: Transaction timed out at ACS — first CReq not received by ACS. * **06**: Transaction error. * **07**: Unknown. * **08**: Transaction time out at SDK. * @return challengeCancel */ - @ApiModelProperty(value = "Indicator informing the Access Control Server (ACS) and the Directory Server (DS) that the authentication has been cancelled. For possible values, refer to [3D Secure API reference](https://docs.adyen.com/online-payments/3d-secure/api-reference#mpidata).") + @ApiModelProperty(value = "Indicator informing the Access Control Server (ACS) and the Directory Server (DS) that the authentication has been cancelled. Possible values: * **00**: Data element is absent or value has been sent back with the key `challengeCancel`. * **01**: Cardholder selected **Cancel**. * **02**: 3DS Requestor cancelled Authentication. * **03**: Transaction abandoned. * **04**: Transaction timed out at ACS — other timeouts. * **05**: Transaction timed out at ACS — first CReq not received by ACS. * **06**: Transaction error. * **07**: Unknown. * **08**: Transaction time out at SDK.") @JsonProperty(JSON_PROPERTY_CHALLENGE_CANCEL) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public ChallengeCancelEnum getChallengeCancel() { @@ -165,7 +169,7 @@ public ChallengeCancelEnum getChallengeCancel() { } /** - * Indicator informing the Access Control Server (ACS) and the Directory Server (DS) that the authentication has been cancelled. For possible values, refer to [3D Secure API reference](https://docs.adyen.com/online-payments/3d-secure/api-reference#mpidata). + * Indicator informing the Access Control Server (ACS) and the Directory Server (DS) that the authentication has been cancelled. Possible values: * **00**: Data element is absent or value has been sent back with the key `challengeCancel`. * **01**: Cardholder selected **Cancel**. * **02**: 3DS Requestor cancelled Authentication. * **03**: Transaction abandoned. * **04**: Transaction timed out at ACS — other timeouts. * **05**: Transaction timed out at ACS — first CReq not received by ACS. * **06**: Transaction error. * **07**: Unknown. * **08**: Transaction time out at SDK. * * @param challengeCancel */ diff --git a/src/main/java/com/adyen/model/balanceplatform/AccountHolder.java b/src/main/java/com/adyen/model/balanceplatform/AccountHolder.java index 2b254c363..172b4743c 100644 --- a/src/main/java/com/adyen/model/balanceplatform/AccountHolder.java +++ b/src/main/java/com/adyen/model/balanceplatform/AccountHolder.java @@ -86,7 +86,7 @@ public class AccountHolder { private String reference; /** - * The status of the account holder. Possible values: * **active**: The account holder is active. This is the default status when creating an account holder. * **suspended**: The account holder is permanently deactivated by Adyen. This action cannot be undone. * **closed**: The account holder is permanently deactivated by you. This action cannot be undone. + * The status of the account holder. Possible values: * **active**: The account holder is active and allowed to use its capabilities. This is the initial status for account holders and balance accounts. You can change this status to **suspended** or **closed**. * **suspended**: The account holder is temporarily disabled and payouts are blocked. You can change this status to **active** or **closed**. * **closed**: The account holder and all of its capabilities are permanently disabled. This is a final status and cannot be changed. */ public enum StatusEnum { ACTIVE("active"), @@ -490,7 +490,7 @@ public void setReference(String reference) { } /** - * The status of the account holder. Possible values: * **active**: The account holder is active. This is the default status when creating an account holder. * **suspended**: The account holder is permanently deactivated by Adyen. This action cannot be undone. * **closed**: The account holder is permanently deactivated by you. This action cannot be undone. + * The status of the account holder. Possible values: * **active**: The account holder is active and allowed to use its capabilities. This is the initial status for account holders and balance accounts. You can change this status to **suspended** or **closed**. * **suspended**: The account holder is temporarily disabled and payouts are blocked. You can change this status to **active** or **closed**. * **closed**: The account holder and all of its capabilities are permanently disabled. This is a final status and cannot be changed. * * @param status * @return the current {@code AccountHolder} instance, allowing for method chaining @@ -501,10 +501,10 @@ public AccountHolder status(StatusEnum status) { } /** - * The status of the account holder. Possible values: * **active**: The account holder is active. This is the default status when creating an account holder. * **suspended**: The account holder is permanently deactivated by Adyen. This action cannot be undone. * **closed**: The account holder is permanently deactivated by you. This action cannot be undone. + * The status of the account holder. Possible values: * **active**: The account holder is active and allowed to use its capabilities. This is the initial status for account holders and balance accounts. You can change this status to **suspended** or **closed**. * **suspended**: The account holder is temporarily disabled and payouts are blocked. You can change this status to **active** or **closed**. * **closed**: The account holder and all of its capabilities are permanently disabled. This is a final status and cannot be changed. * @return status */ - @ApiModelProperty(value = "The status of the account holder. Possible values: * **active**: The account holder is active. This is the default status when creating an account holder. * **suspended**: The account holder is permanently deactivated by Adyen. This action cannot be undone. * **closed**: The account holder is permanently deactivated by you. This action cannot be undone.") + @ApiModelProperty(value = "The status of the account holder. Possible values: * **active**: The account holder is active and allowed to use its capabilities. This is the initial status for account holders and balance accounts. You can change this status to **suspended** or **closed**. * **suspended**: The account holder is temporarily disabled and payouts are blocked. You can change this status to **active** or **closed**. * **closed**: The account holder and all of its capabilities are permanently disabled. This is a final status and cannot be changed.") @JsonProperty(JSON_PROPERTY_STATUS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public StatusEnum getStatus() { @@ -512,7 +512,7 @@ public StatusEnum getStatus() { } /** - * The status of the account holder. Possible values: * **active**: The account holder is active. This is the default status when creating an account holder. * **suspended**: The account holder is permanently deactivated by Adyen. This action cannot be undone. * **closed**: The account holder is permanently deactivated by you. This action cannot be undone. + * The status of the account holder. Possible values: * **active**: The account holder is active and allowed to use its capabilities. This is the initial status for account holders and balance accounts. You can change this status to **suspended** or **closed**. * **suspended**: The account holder is temporarily disabled and payouts are blocked. You can change this status to **active** or **closed**. * **closed**: The account holder and all of its capabilities are permanently disabled. This is a final status and cannot be changed. * * @param status */ diff --git a/src/main/java/com/adyen/model/balanceplatform/AccountHolderUpdateRequest.java b/src/main/java/com/adyen/model/balanceplatform/AccountHolderUpdateRequest.java index 702d93940..dd7e95396 100644 --- a/src/main/java/com/adyen/model/balanceplatform/AccountHolderUpdateRequest.java +++ b/src/main/java/com/adyen/model/balanceplatform/AccountHolderUpdateRequest.java @@ -78,7 +78,7 @@ public class AccountHolderUpdateRequest { private String reference; /** - * The status of the account holder. Possible values: * **active**: The account holder is active. This is the default status when creating an account holder. * **suspended**: The account holder is permanently deactivated by Adyen. This action cannot be undone. * **closed**: The account holder is permanently deactivated by you. This action cannot be undone. + * The status of the account holder. Possible values: * **active**: The account holder is active and allowed to use its capabilities. This is the initial status for account holders and balance accounts. You can change this status to **suspended** or **closed**. * **suspended**: The account holder is temporarily disabled and payouts are blocked. You can change this status to **active** or **closed**. * **closed**: The account holder and all of its capabilities are permanently disabled. This is a final status and cannot be changed. */ public enum StatusEnum { ACTIVE("active"), @@ -416,7 +416,7 @@ public void setReference(String reference) { } /** - * The status of the account holder. Possible values: * **active**: The account holder is active. This is the default status when creating an account holder. * **suspended**: The account holder is permanently deactivated by Adyen. This action cannot be undone. * **closed**: The account holder is permanently deactivated by you. This action cannot be undone. + * The status of the account holder. Possible values: * **active**: The account holder is active and allowed to use its capabilities. This is the initial status for account holders and balance accounts. You can change this status to **suspended** or **closed**. * **suspended**: The account holder is temporarily disabled and payouts are blocked. You can change this status to **active** or **closed**. * **closed**: The account holder and all of its capabilities are permanently disabled. This is a final status and cannot be changed. * * @param status * @return the current {@code AccountHolderUpdateRequest} instance, allowing for method chaining @@ -427,10 +427,10 @@ public AccountHolderUpdateRequest status(StatusEnum status) { } /** - * The status of the account holder. Possible values: * **active**: The account holder is active. This is the default status when creating an account holder. * **suspended**: The account holder is permanently deactivated by Adyen. This action cannot be undone. * **closed**: The account holder is permanently deactivated by you. This action cannot be undone. + * The status of the account holder. Possible values: * **active**: The account holder is active and allowed to use its capabilities. This is the initial status for account holders and balance accounts. You can change this status to **suspended** or **closed**. * **suspended**: The account holder is temporarily disabled and payouts are blocked. You can change this status to **active** or **closed**. * **closed**: The account holder and all of its capabilities are permanently disabled. This is a final status and cannot be changed. * @return status */ - @ApiModelProperty(value = "The status of the account holder. Possible values: * **active**: The account holder is active. This is the default status when creating an account holder. * **suspended**: The account holder is permanently deactivated by Adyen. This action cannot be undone. * **closed**: The account holder is permanently deactivated by you. This action cannot be undone.") + @ApiModelProperty(value = "The status of the account holder. Possible values: * **active**: The account holder is active and allowed to use its capabilities. This is the initial status for account holders and balance accounts. You can change this status to **suspended** or **closed**. * **suspended**: The account holder is temporarily disabled and payouts are blocked. You can change this status to **active** or **closed**. * **closed**: The account holder and all of its capabilities are permanently disabled. This is a final status and cannot be changed.") @JsonProperty(JSON_PROPERTY_STATUS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public StatusEnum getStatus() { @@ -438,7 +438,7 @@ public StatusEnum getStatus() { } /** - * The status of the account holder. Possible values: * **active**: The account holder is active. This is the default status when creating an account holder. * **suspended**: The account holder is permanently deactivated by Adyen. This action cannot be undone. * **closed**: The account holder is permanently deactivated by you. This action cannot be undone. + * The status of the account holder. Possible values: * **active**: The account holder is active and allowed to use its capabilities. This is the initial status for account holders and balance accounts. You can change this status to **suspended** or **closed**. * **suspended**: The account holder is temporarily disabled and payouts are blocked. You can change this status to **active** or **closed**. * **closed**: The account holder and all of its capabilities are permanently disabled. This is a final status and cannot be changed. * * @param status */ diff --git a/src/main/java/com/adyen/model/balanceplatform/AssociationDelegatedAuthenticationData.java b/src/main/java/com/adyen/model/balanceplatform/AssociationDelegatedAuthenticationData.java new file mode 100644 index 000000000..288475905 --- /dev/null +++ b/src/main/java/com/adyen/model/balanceplatform/AssociationDelegatedAuthenticationData.java @@ -0,0 +1,135 @@ +/* + * 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 java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.core.JsonProcessingException; + + +/** + * AssociationDelegatedAuthenticationData + */ +@JsonPropertyOrder({ + AssociationDelegatedAuthenticationData.JSON_PROPERTY_SDK_OUTPUT +}) + +public class AssociationDelegatedAuthenticationData { + public static final String JSON_PROPERTY_SDK_OUTPUT = "sdkOutput"; + private String sdkOutput; + + public AssociationDelegatedAuthenticationData() { + } + + /** + * A base64-encoded block with the data required to authenticate the request. You obtain this information by using our authentication SDK. + * + * @param sdkOutput + * @return the current {@code AssociationDelegatedAuthenticationData} instance, allowing for method chaining + */ + public AssociationDelegatedAuthenticationData sdkOutput(String sdkOutput) { + this.sdkOutput = sdkOutput; + return this; + } + + /** + * A base64-encoded block with the data required to authenticate the request. You obtain this information by using our authentication SDK. + * @return sdkOutput + */ + @ApiModelProperty(required = true, value = "A base64-encoded block with the data required to authenticate the request. You obtain this information by using our 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 authenticate the request. You obtain this information by using our authentication SDK. + * + * @param sdkOutput + */ + @JsonProperty(JSON_PROPERTY_SDK_OUTPUT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSdkOutput(String sdkOutput) { + this.sdkOutput = sdkOutput; + } + + /** + * Return true if this AssociationDelegatedAuthenticationData object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AssociationDelegatedAuthenticationData associationDelegatedAuthenticationData = (AssociationDelegatedAuthenticationData) o; + return Objects.equals(this.sdkOutput, associationDelegatedAuthenticationData.sdkOutput); + } + + @Override + public int hashCode() { + return Objects.hash(sdkOutput); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AssociationDelegatedAuthenticationData {\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 AssociationDelegatedAuthenticationData given an JSON string + * + * @param jsonString JSON string + * @return An instance of AssociationDelegatedAuthenticationData + * @throws JsonProcessingException if the JSON string is invalid with respect to AssociationDelegatedAuthenticationData + */ + public static AssociationDelegatedAuthenticationData fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, AssociationDelegatedAuthenticationData.class); + } +/** + * Convert an instance of AssociationDelegatedAuthenticationData 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/AssociationFinaliseRequest.java b/src/main/java/com/adyen/model/balanceplatform/AssociationFinaliseRequest.java new file mode 100644 index 000000000..b7b078b14 --- /dev/null +++ b/src/main/java/com/adyen/model/balanceplatform/AssociationFinaliseRequest.java @@ -0,0 +1,254 @@ +/* + * 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 java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.adyen.model.balanceplatform.AssociationDelegatedAuthenticationData; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.ArrayList; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.core.JsonProcessingException; + + +/** + * AssociationFinaliseRequest + */ +@JsonPropertyOrder({ + AssociationFinaliseRequest.JSON_PROPERTY_IDS, + AssociationFinaliseRequest.JSON_PROPERTY_STRONG_CUSTOMER_AUTHENTICATION, + AssociationFinaliseRequest.JSON_PROPERTY_TYPE +}) + +public class AssociationFinaliseRequest { + public static final String JSON_PROPERTY_IDS = "ids"; + private List ids = new ArrayList<>(); + + public static final String JSON_PROPERTY_STRONG_CUSTOMER_AUTHENTICATION = "strongCustomerAuthentication"; + private AssociationDelegatedAuthenticationData strongCustomerAuthentication; + + /** + * The type of resource that you are associating with the SCA device. Possible value: **PaymentInstrument** + */ + public enum TypeEnum { + PAYMENTINSTRUMENT("PaymentInstrument"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_TYPE = "type"; + private TypeEnum type; + + public AssociationFinaliseRequest() { + } + + /** + * The list of unique identifiers of the resources that you are associating with the SCA device. Maximum: 5 strings. + * + * @param ids + * @return the current {@code AssociationFinaliseRequest} instance, allowing for method chaining + */ + public AssociationFinaliseRequest ids(List ids) { + this.ids = ids; + return this; + } + + public AssociationFinaliseRequest addIdsItem(String idsItem) { + this.ids.add(idsItem); + return this; + } + + /** + * The list of unique identifiers of the resources that you are associating with the SCA device. Maximum: 5 strings. + * @return ids + */ + @ApiModelProperty(required = true, value = "The list of unique identifiers of the resources that you are associating with the SCA device. Maximum: 5 strings.") + @JsonProperty(JSON_PROPERTY_IDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getIds() { + return ids; + } + + /** + * The list of unique identifiers of the resources that you are associating with the SCA device. Maximum: 5 strings. + * + * @param ids + */ + @JsonProperty(JSON_PROPERTY_IDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setIds(List ids) { + this.ids = ids; + } + + /** + * strongCustomerAuthentication + * + * @param strongCustomerAuthentication + * @return the current {@code AssociationFinaliseRequest} instance, allowing for method chaining + */ + public AssociationFinaliseRequest strongCustomerAuthentication(AssociationDelegatedAuthenticationData strongCustomerAuthentication) { + this.strongCustomerAuthentication = strongCustomerAuthentication; + return this; + } + + /** + * strongCustomerAuthentication + * @return strongCustomerAuthentication + */ + @ApiModelProperty(required = true, value = "") + @JsonProperty(JSON_PROPERTY_STRONG_CUSTOMER_AUTHENTICATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public AssociationDelegatedAuthenticationData getStrongCustomerAuthentication() { + return strongCustomerAuthentication; + } + + /** + * strongCustomerAuthentication + * + * @param strongCustomerAuthentication + */ + @JsonProperty(JSON_PROPERTY_STRONG_CUSTOMER_AUTHENTICATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setStrongCustomerAuthentication(AssociationDelegatedAuthenticationData strongCustomerAuthentication) { + this.strongCustomerAuthentication = strongCustomerAuthentication; + } + + /** + * The type of resource that you are associating with the SCA device. Possible value: **PaymentInstrument** + * + * @param type + * @return the current {@code AssociationFinaliseRequest} instance, allowing for method chaining + */ + public AssociationFinaliseRequest type(TypeEnum type) { + this.type = type; + return this; + } + + /** + * The type of resource that you are associating with the SCA device. Possible value: **PaymentInstrument** + * @return type + */ + @ApiModelProperty(required = true, value = "The type of resource that you are associating with the SCA device. Possible value: **PaymentInstrument**") + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public TypeEnum getType() { + return type; + } + + /** + * The type of resource that you are associating with the SCA device. Possible value: **PaymentInstrument** + * + * @param type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setType(TypeEnum type) { + this.type = type; + } + + /** + * Return true if this AssociationFinaliseRequest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AssociationFinaliseRequest associationFinaliseRequest = (AssociationFinaliseRequest) o; + return Objects.equals(this.ids, associationFinaliseRequest.ids) && + Objects.equals(this.strongCustomerAuthentication, associationFinaliseRequest.strongCustomerAuthentication) && + Objects.equals(this.type, associationFinaliseRequest.type); + } + + @Override + public int hashCode() { + return Objects.hash(ids, strongCustomerAuthentication, type); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AssociationFinaliseRequest {\n"); + sb.append(" ids: ").append(toIndentedString(ids)).append("\n"); + sb.append(" strongCustomerAuthentication: ").append(toIndentedString(strongCustomerAuthentication)).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 AssociationFinaliseRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of AssociationFinaliseRequest + * @throws JsonProcessingException if the JSON string is invalid with respect to AssociationFinaliseRequest + */ + public static AssociationFinaliseRequest fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, AssociationFinaliseRequest.class); + } +/** + * Convert an instance of AssociationFinaliseRequest 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/AssociationFinaliseResponse.java b/src/main/java/com/adyen/model/balanceplatform/AssociationFinaliseResponse.java new file mode 100644 index 000000000..8c96b7993 --- /dev/null +++ b/src/main/java/com/adyen/model/balanceplatform/AssociationFinaliseResponse.java @@ -0,0 +1,256 @@ +/* + * 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 java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.ArrayList; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.core.JsonProcessingException; + + +/** + * AssociationFinaliseResponse + */ +@JsonPropertyOrder({ + AssociationFinaliseResponse.JSON_PROPERTY_DEVICE_ID, + AssociationFinaliseResponse.JSON_PROPERTY_IDS, + AssociationFinaliseResponse.JSON_PROPERTY_TYPE +}) + +public class AssociationFinaliseResponse { + public static final String JSON_PROPERTY_DEVICE_ID = "deviceId"; + private String deviceId; + + public static final String JSON_PROPERTY_IDS = "ids"; + private List ids = null; + + /** + * The type of resource that you associated with the SCA device. + */ + public enum TypeEnum { + PAYMENT_INSTRUMENT("PAYMENT_INSTRUMENT"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_TYPE = "type"; + private TypeEnum type; + + public AssociationFinaliseResponse() { + } + + /** + * The unique identifier of the SCA device you associated with a resource. + * + * @param deviceId + * @return the current {@code AssociationFinaliseResponse} instance, allowing for method chaining + */ + public AssociationFinaliseResponse deviceId(String deviceId) { + this.deviceId = deviceId; + return this; + } + + /** + * The unique identifier of the SCA device you associated with a resource. + * @return deviceId + */ + @ApiModelProperty(value = "The unique identifier of the SCA device you associated with a resource.") + @JsonProperty(JSON_PROPERTY_DEVICE_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getDeviceId() { + return deviceId; + } + + /** + * The unique identifier of the SCA device you associated with a resource. + * + * @param deviceId + */ + @JsonProperty(JSON_PROPERTY_DEVICE_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDeviceId(String deviceId) { + this.deviceId = deviceId; + } + + /** + * The list of unique identifiers of the resources that you associated with the SCA device. + * + * @param ids + * @return the current {@code AssociationFinaliseResponse} instance, allowing for method chaining + */ + public AssociationFinaliseResponse ids(List ids) { + this.ids = ids; + return this; + } + + public AssociationFinaliseResponse addIdsItem(String idsItem) { + if (this.ids == null) { + this.ids = new ArrayList<>(); + } + this.ids.add(idsItem); + return this; + } + + /** + * The list of unique identifiers of the resources that you associated with the SCA device. + * @return ids + */ + @ApiModelProperty(value = "The list of unique identifiers of the resources that you associated with the SCA device.") + @JsonProperty(JSON_PROPERTY_IDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getIds() { + return ids; + } + + /** + * The list of unique identifiers of the resources that you associated with the SCA device. + * + * @param ids + */ + @JsonProperty(JSON_PROPERTY_IDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setIds(List ids) { + this.ids = ids; + } + + /** + * The type of resource that you associated with the SCA device. + * + * @param type + * @return the current {@code AssociationFinaliseResponse} instance, allowing for method chaining + */ + public AssociationFinaliseResponse type(TypeEnum type) { + this.type = type; + return this; + } + + /** + * The type of resource that you associated with the SCA device. + * @return type + */ + @ApiModelProperty(required = true, value = "The type of resource that you associated with the SCA device.") + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public TypeEnum getType() { + return type; + } + + /** + * The type of resource that you associated with the SCA device. + * + * @param type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setType(TypeEnum type) { + this.type = type; + } + + /** + * Return true if this AssociationFinaliseResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AssociationFinaliseResponse associationFinaliseResponse = (AssociationFinaliseResponse) o; + return Objects.equals(this.deviceId, associationFinaliseResponse.deviceId) && + Objects.equals(this.ids, associationFinaliseResponse.ids) && + Objects.equals(this.type, associationFinaliseResponse.type); + } + + @Override + public int hashCode() { + return Objects.hash(deviceId, ids, type); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AssociationFinaliseResponse {\n"); + sb.append(" deviceId: ").append(toIndentedString(deviceId)).append("\n"); + sb.append(" ids: ").append(toIndentedString(ids)).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 AssociationFinaliseResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of AssociationFinaliseResponse + * @throws JsonProcessingException if the JSON string is invalid with respect to AssociationFinaliseResponse + */ + public static AssociationFinaliseResponse fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, AssociationFinaliseResponse.class); + } +/** + * Convert an instance of AssociationFinaliseResponse 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/AssociationInitiateRequest.java b/src/main/java/com/adyen/model/balanceplatform/AssociationInitiateRequest.java new file mode 100644 index 000000000..53de83907 --- /dev/null +++ b/src/main/java/com/adyen/model/balanceplatform/AssociationInitiateRequest.java @@ -0,0 +1,214 @@ +/* + * 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 java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.ArrayList; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.core.JsonProcessingException; + + +/** + * AssociationInitiateRequest + */ +@JsonPropertyOrder({ + AssociationInitiateRequest.JSON_PROPERTY_IDS, + AssociationInitiateRequest.JSON_PROPERTY_TYPE +}) + +public class AssociationInitiateRequest { + public static final String JSON_PROPERTY_IDS = "ids"; + private List ids = new ArrayList<>(); + + /** + * The type of resource that you are associating with the SCA device. Possible value: **PaymentInstrument** + */ + public enum TypeEnum { + PAYMENTINSTRUMENT("PaymentInstrument"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_TYPE = "type"; + private TypeEnum type; + + public AssociationInitiateRequest() { + } + + /** + * The list of unique identifiers of the resources that you are associating with the SCA device. Maximum: 5 strings. + * + * @param ids + * @return the current {@code AssociationInitiateRequest} instance, allowing for method chaining + */ + public AssociationInitiateRequest ids(List ids) { + this.ids = ids; + return this; + } + + public AssociationInitiateRequest addIdsItem(String idsItem) { + this.ids.add(idsItem); + return this; + } + + /** + * The list of unique identifiers of the resources that you are associating with the SCA device. Maximum: 5 strings. + * @return ids + */ + @ApiModelProperty(required = true, value = "The list of unique identifiers of the resources that you are associating with the SCA device. Maximum: 5 strings.") + @JsonProperty(JSON_PROPERTY_IDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getIds() { + return ids; + } + + /** + * The list of unique identifiers of the resources that you are associating with the SCA device. Maximum: 5 strings. + * + * @param ids + */ + @JsonProperty(JSON_PROPERTY_IDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setIds(List ids) { + this.ids = ids; + } + + /** + * The type of resource that you are associating with the SCA device. Possible value: **PaymentInstrument** + * + * @param type + * @return the current {@code AssociationInitiateRequest} instance, allowing for method chaining + */ + public AssociationInitiateRequest type(TypeEnum type) { + this.type = type; + return this; + } + + /** + * The type of resource that you are associating with the SCA device. Possible value: **PaymentInstrument** + * @return type + */ + @ApiModelProperty(required = true, value = "The type of resource that you are associating with the SCA device. Possible value: **PaymentInstrument**") + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public TypeEnum getType() { + return type; + } + + /** + * The type of resource that you are associating with the SCA device. Possible value: **PaymentInstrument** + * + * @param type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setType(TypeEnum type) { + this.type = type; + } + + /** + * Return true if this AssociationInitiateRequest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AssociationInitiateRequest associationInitiateRequest = (AssociationInitiateRequest) o; + return Objects.equals(this.ids, associationInitiateRequest.ids) && + Objects.equals(this.type, associationInitiateRequest.type); + } + + @Override + public int hashCode() { + return Objects.hash(ids, type); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AssociationInitiateRequest {\n"); + sb.append(" ids: ").append(toIndentedString(ids)).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 AssociationInitiateRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of AssociationInitiateRequest + * @throws JsonProcessingException if the JSON string is invalid with respect to AssociationInitiateRequest + */ + public static AssociationInitiateRequest fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, AssociationInitiateRequest.class); + } +/** + * Convert an instance of AssociationInitiateRequest 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/AssociationInitiateResponse.java b/src/main/java/com/adyen/model/balanceplatform/AssociationInitiateResponse.java new file mode 100644 index 000000000..8eebbe54a --- /dev/null +++ b/src/main/java/com/adyen/model/balanceplatform/AssociationInitiateResponse.java @@ -0,0 +1,135 @@ +/* + * 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 java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.core.JsonProcessingException; + + +/** + * AssociationInitiateResponse + */ +@JsonPropertyOrder({ + AssociationInitiateResponse.JSON_PROPERTY_SDK_INPUT +}) + +public class AssociationInitiateResponse { + public static final String JSON_PROPERTY_SDK_INPUT = "sdkInput"; + private String sdkInput; + + public AssociationInitiateResponse() { + } + + /** + * A string that you must pass to the authentication SDK to continue with the association process. + * + * @param sdkInput + * @return the current {@code AssociationInitiateResponse} instance, allowing for method chaining + */ + public AssociationInitiateResponse sdkInput(String sdkInput) { + this.sdkInput = sdkInput; + return this; + } + + /** + * A string that you must pass to the authentication SDK to continue with the association process. + * @return sdkInput + */ + @ApiModelProperty(value = "A string that you must pass to the authentication SDK to continue with the association 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 association process. + * + * @param sdkInput + */ + @JsonProperty(JSON_PROPERTY_SDK_INPUT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSdkInput(String sdkInput) { + this.sdkInput = sdkInput; + } + + /** + * Return true if this AssociationInitiateResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AssociationInitiateResponse associationInitiateResponse = (AssociationInitiateResponse) o; + return Objects.equals(this.sdkInput, associationInitiateResponse.sdkInput); + } + + @Override + public int hashCode() { + return Objects.hash(sdkInput); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AssociationInitiateResponse {\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 AssociationInitiateResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of AssociationInitiateResponse + * @throws JsonProcessingException if the JSON string is invalid with respect to AssociationInitiateResponse + */ + public static AssociationInitiateResponse fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, AssociationInitiateResponse.class); + } +/** + * Convert an instance of AssociationInitiateResponse 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/NetworkToken.java b/src/main/java/com/adyen/model/balanceplatform/NetworkToken.java index d04bee8f5..006f88a0f 100644 --- a/src/main/java/com/adyen/model/balanceplatform/NetworkToken.java +++ b/src/main/java/com/adyen/model/balanceplatform/NetworkToken.java @@ -342,7 +342,7 @@ public void setTokenLastFour(String tokenLastFour) { } /** - * The type of wallet the network token is associated with. For example, **applePay**. + * The type of network token. For example, **wallet**, **cof**. * * @param type * @return the current {@code NetworkToken} instance, allowing for method chaining @@ -353,10 +353,10 @@ public NetworkToken type(String type) { } /** - * The type of wallet the network token is associated with. For example, **applePay**. + * The type of network token. For example, **wallet**, **cof**. * @return type */ - @ApiModelProperty(value = "The type of wallet the network token is associated with. For example, **applePay**.") + @ApiModelProperty(value = "The type of network token. For example, **wallet**, **cof**.") @JsonProperty(JSON_PROPERTY_TYPE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public String getType() { @@ -364,7 +364,7 @@ public String getType() { } /** - * The type of wallet the network token is associated with. For example, **applePay**. + * The type of network token. For example, **wallet**, **cof**. * * @param type */ diff --git a/src/main/java/com/adyen/model/balanceplatform/PriorityRestriction.java b/src/main/java/com/adyen/model/balanceplatform/TokenRequestorsRestriction.java similarity index 62% rename from src/main/java/com/adyen/model/balanceplatform/PriorityRestriction.java rename to src/main/java/com/adyen/model/balanceplatform/TokenRequestorsRestriction.java index 1f90c3a3f..cc622c5b4 100644 --- a/src/main/java/com/adyen/model/balanceplatform/PriorityRestriction.java +++ b/src/main/java/com/adyen/model/balanceplatform/TokenRequestorsRestriction.java @@ -30,71 +30,30 @@ /** - * PriorityRestriction + * TokenRequestorsRestriction */ @JsonPropertyOrder({ - PriorityRestriction.JSON_PROPERTY_OPERATION, - PriorityRestriction.JSON_PROPERTY_VALUE + TokenRequestorsRestriction.JSON_PROPERTY_OPERATION, + TokenRequestorsRestriction.JSON_PROPERTY_VALUE }) -public class PriorityRestriction { +public class TokenRequestorsRestriction { public static final String JSON_PROPERTY_OPERATION = "operation"; private String operation; - /** - * Gets or Sets value - */ - public enum ValueEnum { - CROSSBORDER("crossBorder"), - - FAST("fast"), - - INSTANT("instant"), - - INTRABANK("intraBank"), - - REGULAR("regular"); - - private String value; - - ValueEnum(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static ValueEnum fromValue(String value) { - for (ValueEnum b : ValueEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - } - public static final String JSON_PROPERTY_VALUE = "value"; - private List value = null; + private List value = null; - public PriorityRestriction() { + public TokenRequestorsRestriction() { } /** * Defines how the condition must be evaluated. * * @param operation - * @return the current {@code PriorityRestriction} instance, allowing for method chaining + * @return the current {@code TokenRequestorsRestriction} instance, allowing for method chaining */ - public PriorityRestriction operation(String operation) { + public TokenRequestorsRestriction operation(String operation) { this.operation = operation; return this; } @@ -125,14 +84,14 @@ public void setOperation(String operation) { * value * * @param value - * @return the current {@code PriorityRestriction} instance, allowing for method chaining + * @return the current {@code TokenRequestorsRestriction} instance, allowing for method chaining */ - public PriorityRestriction value(List value) { + public TokenRequestorsRestriction value(List value) { this.value = value; return this; } - public PriorityRestriction addValueItem(ValueEnum valueItem) { + public TokenRequestorsRestriction addValueItem(String valueItem) { if (this.value == null) { this.value = new ArrayList<>(); } @@ -147,7 +106,7 @@ public PriorityRestriction addValueItem(ValueEnum valueItem) { @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_VALUE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getValue() { + public List getValue() { return value; } @@ -158,12 +117,12 @@ public List getValue() { */ @JsonProperty(JSON_PROPERTY_VALUE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setValue(List value) { + public void setValue(List value) { this.value = value; } /** - * Return true if this PriorityRestriction object is equal to o. + * Return true if this TokenRequestorsRestriction object is equal to o. */ @Override public boolean equals(Object o) { @@ -173,9 +132,9 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - PriorityRestriction priorityRestriction = (PriorityRestriction) o; - return Objects.equals(this.operation, priorityRestriction.operation) && - Objects.equals(this.value, priorityRestriction.value); + TokenRequestorsRestriction tokenRequestorsRestriction = (TokenRequestorsRestriction) o; + return Objects.equals(this.operation, tokenRequestorsRestriction.operation) && + Objects.equals(this.value, tokenRequestorsRestriction.value); } @Override @@ -186,7 +145,7 @@ public int hashCode() { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class PriorityRestriction {\n"); + sb.append("class TokenRequestorsRestriction {\n"); sb.append(" operation: ").append(toIndentedString(operation)).append("\n"); sb.append(" value: ").append(toIndentedString(value)).append("\n"); sb.append("}"); @@ -205,17 +164,17 @@ private String toIndentedString(Object o) { } /** - * Create an instance of PriorityRestriction given an JSON string + * Create an instance of TokenRequestorsRestriction given an JSON string * * @param jsonString JSON string - * @return An instance of PriorityRestriction - * @throws JsonProcessingException if the JSON string is invalid with respect to PriorityRestriction + * @return An instance of TokenRequestorsRestriction + * @throws JsonProcessingException if the JSON string is invalid with respect to TokenRequestorsRestriction */ - public static PriorityRestriction fromJson(String jsonString) throws JsonProcessingException { - return JSON.getMapper().readValue(jsonString, PriorityRestriction.class); + public static TokenRequestorsRestriction fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, TokenRequestorsRestriction.class); } /** - * Convert an instance of PriorityRestriction to an JSON string + * Convert an instance of TokenRequestorsRestriction to an JSON string * * @return JSON string */ diff --git a/src/main/java/com/adyen/model/balanceplatform/TransactionRuleRestrictions.java b/src/main/java/com/adyen/model/balanceplatform/TransactionRuleRestrictions.java index 743d8cfaa..f330f5758 100644 --- a/src/main/java/com/adyen/model/balanceplatform/TransactionRuleRestrictions.java +++ b/src/main/java/com/adyen/model/balanceplatform/TransactionRuleRestrictions.java @@ -30,13 +30,13 @@ import com.adyen.model.balanceplatform.MccsRestriction; import com.adyen.model.balanceplatform.MerchantNamesRestriction; import com.adyen.model.balanceplatform.MerchantsRestriction; -import com.adyen.model.balanceplatform.PriorityRestriction; import com.adyen.model.balanceplatform.ProcessingTypesRestriction; import com.adyen.model.balanceplatform.RiskScoresRestriction; import com.adyen.model.balanceplatform.SameAmountRestriction; import com.adyen.model.balanceplatform.SameCounterpartyRestriction; import com.adyen.model.balanceplatform.SourceAccountTypesRestriction; import com.adyen.model.balanceplatform.TimeOfDayRestriction; +import com.adyen.model.balanceplatform.TokenRequestorsRestriction; import com.adyen.model.balanceplatform.TotalAmountRestriction; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; @@ -67,13 +67,13 @@ TransactionRuleRestrictions.JSON_PROPERTY_MCCS, TransactionRuleRestrictions.JSON_PROPERTY_MERCHANT_NAMES, TransactionRuleRestrictions.JSON_PROPERTY_MERCHANTS, - TransactionRuleRestrictions.JSON_PROPERTY_PRIORITY, TransactionRuleRestrictions.JSON_PROPERTY_PROCESSING_TYPES, TransactionRuleRestrictions.JSON_PROPERTY_RISK_SCORES, TransactionRuleRestrictions.JSON_PROPERTY_SAME_AMOUNT_RESTRICTION, TransactionRuleRestrictions.JSON_PROPERTY_SAME_COUNTERPARTY_RESTRICTION, TransactionRuleRestrictions.JSON_PROPERTY_SOURCE_ACCOUNT_TYPES, TransactionRuleRestrictions.JSON_PROPERTY_TIME_OF_DAY, + TransactionRuleRestrictions.JSON_PROPERTY_TOKEN_REQUESTORS, TransactionRuleRestrictions.JSON_PROPERTY_TOTAL_AMOUNT }) @@ -120,9 +120,6 @@ public class TransactionRuleRestrictions { public static final String JSON_PROPERTY_MERCHANTS = "merchants"; private MerchantsRestriction merchants; - public static final String JSON_PROPERTY_PRIORITY = "priority"; - private PriorityRestriction priority; - public static final String JSON_PROPERTY_PROCESSING_TYPES = "processingTypes"; private ProcessingTypesRestriction processingTypes; @@ -141,6 +138,9 @@ public class TransactionRuleRestrictions { public static final String JSON_PROPERTY_TIME_OF_DAY = "timeOfDay"; private TimeOfDayRestriction timeOfDay; + public static final String JSON_PROPERTY_TOKEN_REQUESTORS = "tokenRequestors"; + private TokenRequestorsRestriction tokenRequestors; + public static final String JSON_PROPERTY_TOTAL_AMOUNT = "totalAmount"; private TotalAmountRestriction totalAmount; @@ -609,39 +609,6 @@ public void setMerchants(MerchantsRestriction merchants) { this.merchants = merchants; } - /** - * priority - * - * @param priority - * @return the current {@code TransactionRuleRestrictions} instance, allowing for method chaining - */ - public TransactionRuleRestrictions priority(PriorityRestriction priority) { - this.priority = priority; - return this; - } - - /** - * priority - * @return priority - */ - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_PRIORITY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public PriorityRestriction getPriority() { - return priority; - } - - /** - * priority - * - * @param priority - */ - @JsonProperty(JSON_PROPERTY_PRIORITY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPriority(PriorityRestriction priority) { - this.priority = priority; - } - /** * processingTypes * @@ -840,6 +807,39 @@ public void setTimeOfDay(TimeOfDayRestriction timeOfDay) { this.timeOfDay = timeOfDay; } + /** + * tokenRequestors + * + * @param tokenRequestors + * @return the current {@code TransactionRuleRestrictions} instance, allowing for method chaining + */ + public TransactionRuleRestrictions tokenRequestors(TokenRequestorsRestriction tokenRequestors) { + this.tokenRequestors = tokenRequestors; + return this; + } + + /** + * tokenRequestors + * @return tokenRequestors + */ + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_TOKEN_REQUESTORS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public TokenRequestorsRestriction getTokenRequestors() { + return tokenRequestors; + } + + /** + * tokenRequestors + * + * @param tokenRequestors + */ + @JsonProperty(JSON_PROPERTY_TOKEN_REQUESTORS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTokenRequestors(TokenRequestorsRestriction tokenRequestors) { + this.tokenRequestors = tokenRequestors; + } + /** * totalAmount * @@ -899,19 +899,19 @@ public boolean equals(Object o) { Objects.equals(this.mccs, transactionRuleRestrictions.mccs) && Objects.equals(this.merchantNames, transactionRuleRestrictions.merchantNames) && Objects.equals(this.merchants, transactionRuleRestrictions.merchants) && - Objects.equals(this.priority, transactionRuleRestrictions.priority) && Objects.equals(this.processingTypes, transactionRuleRestrictions.processingTypes) && Objects.equals(this.riskScores, transactionRuleRestrictions.riskScores) && Objects.equals(this.sameAmountRestriction, transactionRuleRestrictions.sameAmountRestriction) && Objects.equals(this.sameCounterpartyRestriction, transactionRuleRestrictions.sameCounterpartyRestriction) && Objects.equals(this.sourceAccountTypes, transactionRuleRestrictions.sourceAccountTypes) && Objects.equals(this.timeOfDay, transactionRuleRestrictions.timeOfDay) && + Objects.equals(this.tokenRequestors, transactionRuleRestrictions.tokenRequestors) && Objects.equals(this.totalAmount, transactionRuleRestrictions.totalAmount); } @Override public int hashCode() { - return Objects.hash(activeNetworkTokens, brandVariants, counterpartyBank, counterpartyTypes, countries, dayOfWeek, differentCurrencies, entryModes, internationalTransaction, matchingTransactions, matchingValues, mccs, merchantNames, merchants, priority, processingTypes, riskScores, sameAmountRestriction, sameCounterpartyRestriction, sourceAccountTypes, timeOfDay, totalAmount); + return Objects.hash(activeNetworkTokens, brandVariants, counterpartyBank, counterpartyTypes, countries, dayOfWeek, differentCurrencies, entryModes, internationalTransaction, matchingTransactions, matchingValues, mccs, merchantNames, merchants, processingTypes, riskScores, sameAmountRestriction, sameCounterpartyRestriction, sourceAccountTypes, timeOfDay, tokenRequestors, totalAmount); } @Override @@ -932,13 +932,13 @@ public String toString() { sb.append(" mccs: ").append(toIndentedString(mccs)).append("\n"); sb.append(" merchantNames: ").append(toIndentedString(merchantNames)).append("\n"); sb.append(" merchants: ").append(toIndentedString(merchants)).append("\n"); - sb.append(" priority: ").append(toIndentedString(priority)).append("\n"); sb.append(" processingTypes: ").append(toIndentedString(processingTypes)).append("\n"); sb.append(" riskScores: ").append(toIndentedString(riskScores)).append("\n"); sb.append(" sameAmountRestriction: ").append(toIndentedString(sameAmountRestriction)).append("\n"); sb.append(" sameCounterpartyRestriction: ").append(toIndentedString(sameCounterpartyRestriction)).append("\n"); sb.append(" sourceAccountTypes: ").append(toIndentedString(sourceAccountTypes)).append("\n"); sb.append(" timeOfDay: ").append(toIndentedString(timeOfDay)).append("\n"); + sb.append(" tokenRequestors: ").append(toIndentedString(tokenRequestors)).append("\n"); sb.append(" totalAmount: ").append(toIndentedString(totalAmount)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/src/main/java/com/adyen/model/binlookup/CostEstimateResponse.java b/src/main/java/com/adyen/model/binlookup/CostEstimateResponse.java index e8ccd5123..dfba6aa66 100644 --- a/src/main/java/com/adyen/model/binlookup/CostEstimateResponse.java +++ b/src/main/java/com/adyen/model/binlookup/CostEstimateResponse.java @@ -36,8 +36,7 @@ CostEstimateResponse.JSON_PROPERTY_CARD_BIN, CostEstimateResponse.JSON_PROPERTY_COST_ESTIMATE_AMOUNT, CostEstimateResponse.JSON_PROPERTY_COST_ESTIMATE_REFERENCE, - CostEstimateResponse.JSON_PROPERTY_RESULT_CODE, - CostEstimateResponse.JSON_PROPERTY_SURCHARGE_TYPE + CostEstimateResponse.JSON_PROPERTY_RESULT_CODE }) public class CostEstimateResponse { @@ -53,9 +52,6 @@ public class CostEstimateResponse { public static final String JSON_PROPERTY_RESULT_CODE = "resultCode"; private String resultCode; - public static final String JSON_PROPERTY_SURCHARGE_TYPE = "surchargeType"; - private String surchargeType; - public CostEstimateResponse() { } @@ -191,39 +187,6 @@ public void setResultCode(String resultCode) { this.resultCode = resultCode; } - /** - * Indicates the way the charges can be passed on to the cardholder. The following values are possible: * `ZERO` - the charges are not allowed to pass on * `PASSTHROUGH` - the charges can be passed on * `UNLIMITED` - there is no limit on how much surcharge is passed on - * - * @param surchargeType - * @return the current {@code CostEstimateResponse} instance, allowing for method chaining - */ - public CostEstimateResponse surchargeType(String surchargeType) { - this.surchargeType = surchargeType; - return this; - } - - /** - * Indicates the way the charges can be passed on to the cardholder. The following values are possible: * `ZERO` - the charges are not allowed to pass on * `PASSTHROUGH` - the charges can be passed on * `UNLIMITED` - there is no limit on how much surcharge is passed on - * @return surchargeType - */ - @ApiModelProperty(value = "Indicates the way the charges can be passed on to the cardholder. The following values are possible: * `ZERO` - the charges are not allowed to pass on * `PASSTHROUGH` - the charges can be passed on * `UNLIMITED` - there is no limit on how much surcharge is passed on") - @JsonProperty(JSON_PROPERTY_SURCHARGE_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getSurchargeType() { - return surchargeType; - } - - /** - * Indicates the way the charges can be passed on to the cardholder. The following values are possible: * `ZERO` - the charges are not allowed to pass on * `PASSTHROUGH` - the charges can be passed on * `UNLIMITED` - there is no limit on how much surcharge is passed on - * - * @param surchargeType - */ - @JsonProperty(JSON_PROPERTY_SURCHARGE_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSurchargeType(String surchargeType) { - this.surchargeType = surchargeType; - } - /** * Return true if this CostEstimateResponse object is equal to o. */ @@ -239,13 +202,12 @@ public boolean equals(Object o) { return Objects.equals(this.cardBin, costEstimateResponse.cardBin) && Objects.equals(this.costEstimateAmount, costEstimateResponse.costEstimateAmount) && Objects.equals(this.costEstimateReference, costEstimateResponse.costEstimateReference) && - Objects.equals(this.resultCode, costEstimateResponse.resultCode) && - Objects.equals(this.surchargeType, costEstimateResponse.surchargeType); + Objects.equals(this.resultCode, costEstimateResponse.resultCode); } @Override public int hashCode() { - return Objects.hash(cardBin, costEstimateAmount, costEstimateReference, resultCode, surchargeType); + return Objects.hash(cardBin, costEstimateAmount, costEstimateReference, resultCode); } @Override @@ -256,7 +218,6 @@ public String toString() { sb.append(" costEstimateAmount: ").append(toIndentedString(costEstimateAmount)).append("\n"); sb.append(" costEstimateReference: ").append(toIndentedString(costEstimateReference)).append("\n"); sb.append(" resultCode: ").append(toIndentedString(resultCode)).append("\n"); - sb.append(" surchargeType: ").append(toIndentedString(surchargeType)).append("\n"); sb.append("}"); return sb.toString(); } diff --git a/src/main/java/com/adyen/model/checkout/CardDetails.java b/src/main/java/com/adyen/model/checkout/CardDetails.java index 249108170..93b798d5b 100644 --- a/src/main/java/com/adyen/model/checkout/CardDetails.java +++ b/src/main/java/com/adyen/model/checkout/CardDetails.java @@ -42,6 +42,7 @@ CardDetails.JSON_PROPERTY_ENCRYPTED_SECURITY_CODE, CardDetails.JSON_PROPERTY_EXPIRY_MONTH, CardDetails.JSON_PROPERTY_EXPIRY_YEAR, + CardDetails.JSON_PROPERTY_FASTLANE_DATA, CardDetails.JSON_PROPERTY_FUNDING_SOURCE, CardDetails.JSON_PROPERTY_HOLDER_NAME, CardDetails.JSON_PROPERTY_NETWORK_PAYMENT_REFERENCE, @@ -92,6 +93,9 @@ public class CardDetails { public static final String JSON_PROPERTY_EXPIRY_YEAR = "expiryYear"; private String expiryYear; + public static final String JSON_PROPERTY_FASTLANE_DATA = "fastlaneData"; + private String fastlaneData; + /** * The funding source that should be used when multiple sources are available. For Brazilian combo cards, by default the funding source is credit. To use debit, set this value to **debit**. */ @@ -585,6 +589,39 @@ public void setExpiryYear(String expiryYear) { this.expiryYear = expiryYear; } + /** + * The encoded fastlane data blob + * + * @param fastlaneData + * @return the current {@code CardDetails} instance, allowing for method chaining + */ + public CardDetails fastlaneData(String fastlaneData) { + this.fastlaneData = fastlaneData; + return this; + } + + /** + * The encoded fastlane data blob + * @return fastlaneData + */ + @ApiModelProperty(value = "The encoded fastlane data blob") + @JsonProperty(JSON_PROPERTY_FASTLANE_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getFastlaneData() { + return fastlaneData; + } + + /** + * The encoded fastlane data blob + * + * @param fastlaneData + */ + @JsonProperty(JSON_PROPERTY_FASTLANE_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setFastlaneData(String fastlaneData) { + this.fastlaneData = fastlaneData; + } + /** * The funding source that should be used when multiple sources are available. For Brazilian combo cards, by default the funding source is credit. To use debit, set this value to **debit**. * @@ -1049,6 +1086,7 @@ public boolean equals(Object o) { Objects.equals(this.encryptedSecurityCode, cardDetails.encryptedSecurityCode) && Objects.equals(this.expiryMonth, cardDetails.expiryMonth) && Objects.equals(this.expiryYear, cardDetails.expiryYear) && + Objects.equals(this.fastlaneData, cardDetails.fastlaneData) && Objects.equals(this.fundingSource, cardDetails.fundingSource) && Objects.equals(this.holderName, cardDetails.holderName) && Objects.equals(this.networkPaymentReference, cardDetails.networkPaymentReference) && @@ -1066,7 +1104,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(brand, checkoutAttemptId, cupsecureplusSmscode, cvc, encryptedCard, encryptedCardNumber, encryptedExpiryMonth, encryptedExpiryYear, encryptedSecurityCode, expiryMonth, expiryYear, fundingSource, holderName, networkPaymentReference, number, recurringDetailReference, shopperNotificationReference, srcCorrelationId, srcDigitalCardId, srcScheme, srcTokenReference, storedPaymentMethodId, threeDS2SdkVersion, type); + return Objects.hash(brand, checkoutAttemptId, cupsecureplusSmscode, cvc, encryptedCard, encryptedCardNumber, encryptedExpiryMonth, encryptedExpiryYear, encryptedSecurityCode, expiryMonth, expiryYear, fastlaneData, fundingSource, holderName, networkPaymentReference, number, recurringDetailReference, shopperNotificationReference, srcCorrelationId, srcDigitalCardId, srcScheme, srcTokenReference, storedPaymentMethodId, threeDS2SdkVersion, type); } @Override @@ -1084,6 +1122,7 @@ public String toString() { sb.append(" encryptedSecurityCode: ").append(toIndentedString(encryptedSecurityCode)).append("\n"); sb.append(" expiryMonth: ").append(toIndentedString(expiryMonth)).append("\n"); sb.append(" expiryYear: ").append(toIndentedString(expiryYear)).append("\n"); + sb.append(" fastlaneData: ").append(toIndentedString(fastlaneData)).append("\n"); sb.append(" fundingSource: ").append(toIndentedString(fundingSource)).append("\n"); sb.append(" holderName: ").append(toIndentedString(holderName)).append("\n"); sb.append(" networkPaymentReference: ").append(toIndentedString(networkPaymentReference)).append("\n"); diff --git a/src/main/java/com/adyen/model/checkout/CardDonations.java b/src/main/java/com/adyen/model/checkout/CardDonations.java index 27671616b..2c7f62b6c 100644 --- a/src/main/java/com/adyen/model/checkout/CardDonations.java +++ b/src/main/java/com/adyen/model/checkout/CardDonations.java @@ -42,6 +42,7 @@ CardDonations.JSON_PROPERTY_ENCRYPTED_SECURITY_CODE, CardDonations.JSON_PROPERTY_EXPIRY_MONTH, CardDonations.JSON_PROPERTY_EXPIRY_YEAR, + CardDonations.JSON_PROPERTY_FASTLANE_DATA, CardDonations.JSON_PROPERTY_FUNDING_SOURCE, CardDonations.JSON_PROPERTY_HOLDER_NAME, CardDonations.JSON_PROPERTY_NETWORK_PAYMENT_REFERENCE, @@ -92,6 +93,9 @@ public class CardDonations { public static final String JSON_PROPERTY_EXPIRY_YEAR = "expiryYear"; private String expiryYear; + public static final String JSON_PROPERTY_FASTLANE_DATA = "fastlaneData"; + private String fastlaneData; + /** * The funding source that should be used when multiple sources are available. For Brazilian combo cards, by default the funding source is credit. To use debit, set this value to **debit**. */ @@ -585,6 +589,39 @@ public void setExpiryYear(String expiryYear) { this.expiryYear = expiryYear; } + /** + * The encoded fastlane data blob + * + * @param fastlaneData + * @return the current {@code CardDonations} instance, allowing for method chaining + */ + public CardDonations fastlaneData(String fastlaneData) { + this.fastlaneData = fastlaneData; + return this; + } + + /** + * The encoded fastlane data blob + * @return fastlaneData + */ + @ApiModelProperty(value = "The encoded fastlane data blob") + @JsonProperty(JSON_PROPERTY_FASTLANE_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getFastlaneData() { + return fastlaneData; + } + + /** + * The encoded fastlane data blob + * + * @param fastlaneData + */ + @JsonProperty(JSON_PROPERTY_FASTLANE_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setFastlaneData(String fastlaneData) { + this.fastlaneData = fastlaneData; + } + /** * The funding source that should be used when multiple sources are available. For Brazilian combo cards, by default the funding source is credit. To use debit, set this value to **debit**. * @@ -1049,6 +1086,7 @@ public boolean equals(Object o) { Objects.equals(this.encryptedSecurityCode, cardDonations.encryptedSecurityCode) && Objects.equals(this.expiryMonth, cardDonations.expiryMonth) && Objects.equals(this.expiryYear, cardDonations.expiryYear) && + Objects.equals(this.fastlaneData, cardDonations.fastlaneData) && Objects.equals(this.fundingSource, cardDonations.fundingSource) && Objects.equals(this.holderName, cardDonations.holderName) && Objects.equals(this.networkPaymentReference, cardDonations.networkPaymentReference) && @@ -1066,7 +1104,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(brand, checkoutAttemptId, cupsecureplusSmscode, cvc, encryptedCard, encryptedCardNumber, encryptedExpiryMonth, encryptedExpiryYear, encryptedSecurityCode, expiryMonth, expiryYear, fundingSource, holderName, networkPaymentReference, number, recurringDetailReference, shopperNotificationReference, srcCorrelationId, srcDigitalCardId, srcScheme, srcTokenReference, storedPaymentMethodId, threeDS2SdkVersion, type); + return Objects.hash(brand, checkoutAttemptId, cupsecureplusSmscode, cvc, encryptedCard, encryptedCardNumber, encryptedExpiryMonth, encryptedExpiryYear, encryptedSecurityCode, expiryMonth, expiryYear, fastlaneData, fundingSource, holderName, networkPaymentReference, number, recurringDetailReference, shopperNotificationReference, srcCorrelationId, srcDigitalCardId, srcScheme, srcTokenReference, storedPaymentMethodId, threeDS2SdkVersion, type); } @Override @@ -1084,6 +1122,7 @@ public String toString() { sb.append(" encryptedSecurityCode: ").append(toIndentedString(encryptedSecurityCode)).append("\n"); sb.append(" expiryMonth: ").append(toIndentedString(expiryMonth)).append("\n"); sb.append(" expiryYear: ").append(toIndentedString(expiryYear)).append("\n"); + sb.append(" fastlaneData: ").append(toIndentedString(fastlaneData)).append("\n"); sb.append(" fundingSource: ").append(toIndentedString(fundingSource)).append("\n"); sb.append(" holderName: ").append(toIndentedString(holderName)).append("\n"); sb.append(" networkPaymentReference: ").append(toIndentedString(networkPaymentReference)).append("\n"); diff --git a/src/main/java/com/adyen/model/checkout/CheckoutPaymentMethod.java b/src/main/java/com/adyen/model/checkout/CheckoutPaymentMethod.java index 90b745f58..09508e5f4 100644 --- a/src/main/java/com/adyen/model/checkout/CheckoutPaymentMethod.java +++ b/src/main/java/com/adyen/model/checkout/CheckoutPaymentMethod.java @@ -35,6 +35,7 @@ import com.adyen.model.checkout.EBankingFinlandDetails; import com.adyen.model.checkout.EcontextVoucherDetails; import com.adyen.model.checkout.EftDetails; +import com.adyen.model.checkout.FastlaneDetails; import com.adyen.model.checkout.GenericIssuerPaymentMethodDetails; import com.adyen.model.checkout.GiropayDetails; import com.adyen.model.checkout.GooglePayDetails; @@ -675,6 +676,34 @@ public CheckoutPaymentMethod deserialize(JsonParser jp, DeserializationContext c } + // deserialize FastlaneDetails + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (FastlaneDetails.class.equals(Integer.class) || FastlaneDetails.class.equals(Long.class) || FastlaneDetails.class.equals(Float.class) || FastlaneDetails.class.equals(Double.class) || FastlaneDetails.class.equals(Boolean.class) || FastlaneDetails.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((FastlaneDetails.class.equals(Integer.class) || FastlaneDetails.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((FastlaneDetails.class.equals(Float.class) || FastlaneDetails.class.equals(Double.class)) && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= (FastlaneDetails.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (FastlaneDetails.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + // Checks if the unique type of the oneOf json matches any of the object TypeEnum values + boolean typeMatch = Arrays.stream(FastlaneDetails.TypeEnum.values()).anyMatch((t) -> t.getValue().contains(tree.findValue("type").asText())); + if (attemptParsing || typeMatch) { + // Strict deserialization for oneOf models + deserialized = JSON.getMapper().readValue(tree.toString(), FastlaneDetails.class); + // typeMatch should enforce proper deserialization + match++; + log.log(Level.FINER, "Input data matches schema 'FastlaneDetails'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'FastlaneDetails'", e); + } + + // deserialize GenericIssuerPaymentMethodDetails try { boolean attemptParsing = true; @@ -1695,6 +1724,11 @@ public CheckoutPaymentMethod(EftDetails o) { setActualInstance(o); } + public CheckoutPaymentMethod(FastlaneDetails o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + public CheckoutPaymentMethod(GenericIssuerPaymentMethodDetails o) { super("oneOf", Boolean.FALSE); setActualInstance(o); @@ -1894,6 +1928,8 @@ public CheckoutPaymentMethod(ZipDetails o) { }); schemas.put("EftDetails", new GenericType() { }); + schemas.put("FastlaneDetails", new GenericType() { + }); schemas.put("GenericIssuerPaymentMethodDetails", new GenericType() { }); schemas.put("GiropayDetails", new GenericType() { @@ -1969,7 +2005,7 @@ public Map getSchemas() { /** * Set the instance that matches the oneOf child schema, check * the instance parameter is valid against the oneOf child schemas: - * AchDetails, AffirmDetails, AfterpayDetails, AmazonPayDetails, AncvDetails, AndroidPayDetails, ApplePayDetails, BacsDirectDebitDetails, BillDeskDetails, BlikDetails, CardDetails, CashAppDetails, CellulantDetails, DokuDetails, DotpayDetails, DragonpayDetails, EBankingFinlandDetails, EcontextVoucherDetails, EftDetails, GenericIssuerPaymentMethodDetails, GiropayDetails, GooglePayDetails, IdealDetails, KlarnaDetails, MasterpassDetails, MbwayDetails, MobilePayDetails, MolPayDetails, OpenInvoiceDetails, PayByBankAISDirectDebitDetails, PayByBankDetails, PayPalDetails, PayPayDetails, PayToDetails, PayUUpiDetails, PayWithGoogleDetails, PaymentDetails, PseDetails, RatepayDetails, RivertyDetails, SamsungPayDetails, SepaDirectDebitDetails, StoredPaymentMethodDetails, TwintDetails, UpiCollectDetails, UpiIntentDetails, VippsDetails, VisaCheckoutDetails, WeChatPayDetails, WeChatPayMiniProgramDetails, ZipDetails + * AchDetails, AffirmDetails, AfterpayDetails, AmazonPayDetails, AncvDetails, AndroidPayDetails, ApplePayDetails, BacsDirectDebitDetails, BillDeskDetails, BlikDetails, CardDetails, CashAppDetails, CellulantDetails, DokuDetails, DotpayDetails, DragonpayDetails, EBankingFinlandDetails, EcontextVoucherDetails, EftDetails, FastlaneDetails, GenericIssuerPaymentMethodDetails, GiropayDetails, GooglePayDetails, IdealDetails, KlarnaDetails, MasterpassDetails, MbwayDetails, MobilePayDetails, MolPayDetails, OpenInvoiceDetails, PayByBankAISDirectDebitDetails, PayByBankDetails, PayPalDetails, PayPayDetails, PayToDetails, PayUUpiDetails, PayWithGoogleDetails, PaymentDetails, PseDetails, RatepayDetails, RivertyDetails, SamsungPayDetails, SepaDirectDebitDetails, StoredPaymentMethodDetails, TwintDetails, UpiCollectDetails, UpiIntentDetails, VippsDetails, VisaCheckoutDetails, WeChatPayDetails, WeChatPayMiniProgramDetails, ZipDetails * * It could be an instance of the 'oneOf' schemas. * The oneOf child schemas may themselves be a composed schema (allOf, anyOf, oneOf). @@ -2071,6 +2107,11 @@ public void setActualInstance(Object instance) { return; } + if (JSON.isInstanceOf(FastlaneDetails.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + if (JSON.isInstanceOf(GenericIssuerPaymentMethodDetails.class, instance, new HashSet>())) { super.setActualInstance(instance); return; @@ -2231,14 +2272,14 @@ public void setActualInstance(Object instance) { return; } - throw new RuntimeException("Invalid instance type. Must be AchDetails, AffirmDetails, AfterpayDetails, AmazonPayDetails, AncvDetails, AndroidPayDetails, ApplePayDetails, BacsDirectDebitDetails, BillDeskDetails, BlikDetails, CardDetails, CashAppDetails, CellulantDetails, DokuDetails, DotpayDetails, DragonpayDetails, EBankingFinlandDetails, EcontextVoucherDetails, EftDetails, GenericIssuerPaymentMethodDetails, GiropayDetails, GooglePayDetails, IdealDetails, KlarnaDetails, MasterpassDetails, MbwayDetails, MobilePayDetails, MolPayDetails, OpenInvoiceDetails, PayByBankAISDirectDebitDetails, PayByBankDetails, PayPalDetails, PayPayDetails, PayToDetails, PayUUpiDetails, PayWithGoogleDetails, PaymentDetails, PseDetails, RatepayDetails, RivertyDetails, SamsungPayDetails, SepaDirectDebitDetails, StoredPaymentMethodDetails, TwintDetails, UpiCollectDetails, UpiIntentDetails, VippsDetails, VisaCheckoutDetails, WeChatPayDetails, WeChatPayMiniProgramDetails, ZipDetails"); + throw new RuntimeException("Invalid instance type. Must be AchDetails, AffirmDetails, AfterpayDetails, AmazonPayDetails, AncvDetails, AndroidPayDetails, ApplePayDetails, BacsDirectDebitDetails, BillDeskDetails, BlikDetails, CardDetails, CashAppDetails, CellulantDetails, DokuDetails, DotpayDetails, DragonpayDetails, EBankingFinlandDetails, EcontextVoucherDetails, EftDetails, FastlaneDetails, GenericIssuerPaymentMethodDetails, GiropayDetails, GooglePayDetails, IdealDetails, KlarnaDetails, MasterpassDetails, MbwayDetails, MobilePayDetails, MolPayDetails, OpenInvoiceDetails, PayByBankAISDirectDebitDetails, PayByBankDetails, PayPalDetails, PayPayDetails, PayToDetails, PayUUpiDetails, PayWithGoogleDetails, PaymentDetails, PseDetails, RatepayDetails, RivertyDetails, SamsungPayDetails, SepaDirectDebitDetails, StoredPaymentMethodDetails, TwintDetails, UpiCollectDetails, UpiIntentDetails, VippsDetails, VisaCheckoutDetails, WeChatPayDetails, WeChatPayMiniProgramDetails, ZipDetails"); } /** * Get the actual instance, which can be the following: - * AchDetails, AffirmDetails, AfterpayDetails, AmazonPayDetails, AncvDetails, AndroidPayDetails, ApplePayDetails, BacsDirectDebitDetails, BillDeskDetails, BlikDetails, CardDetails, CashAppDetails, CellulantDetails, DokuDetails, DotpayDetails, DragonpayDetails, EBankingFinlandDetails, EcontextVoucherDetails, EftDetails, GenericIssuerPaymentMethodDetails, GiropayDetails, GooglePayDetails, IdealDetails, KlarnaDetails, MasterpassDetails, MbwayDetails, MobilePayDetails, MolPayDetails, OpenInvoiceDetails, PayByBankAISDirectDebitDetails, PayByBankDetails, PayPalDetails, PayPayDetails, PayToDetails, PayUUpiDetails, PayWithGoogleDetails, PaymentDetails, PseDetails, RatepayDetails, RivertyDetails, SamsungPayDetails, SepaDirectDebitDetails, StoredPaymentMethodDetails, TwintDetails, UpiCollectDetails, UpiIntentDetails, VippsDetails, VisaCheckoutDetails, WeChatPayDetails, WeChatPayMiniProgramDetails, ZipDetails + * AchDetails, AffirmDetails, AfterpayDetails, AmazonPayDetails, AncvDetails, AndroidPayDetails, ApplePayDetails, BacsDirectDebitDetails, BillDeskDetails, BlikDetails, CardDetails, CashAppDetails, CellulantDetails, DokuDetails, DotpayDetails, DragonpayDetails, EBankingFinlandDetails, EcontextVoucherDetails, EftDetails, FastlaneDetails, GenericIssuerPaymentMethodDetails, GiropayDetails, GooglePayDetails, IdealDetails, KlarnaDetails, MasterpassDetails, MbwayDetails, MobilePayDetails, MolPayDetails, OpenInvoiceDetails, PayByBankAISDirectDebitDetails, PayByBankDetails, PayPalDetails, PayPayDetails, PayToDetails, PayUUpiDetails, PayWithGoogleDetails, PaymentDetails, PseDetails, RatepayDetails, RivertyDetails, SamsungPayDetails, SepaDirectDebitDetails, StoredPaymentMethodDetails, TwintDetails, UpiCollectDetails, UpiIntentDetails, VippsDetails, VisaCheckoutDetails, WeChatPayDetails, WeChatPayMiniProgramDetails, ZipDetails * - * @return The actual instance (AchDetails, AffirmDetails, AfterpayDetails, AmazonPayDetails, AncvDetails, AndroidPayDetails, ApplePayDetails, BacsDirectDebitDetails, BillDeskDetails, BlikDetails, CardDetails, CashAppDetails, CellulantDetails, DokuDetails, DotpayDetails, DragonpayDetails, EBankingFinlandDetails, EcontextVoucherDetails, EftDetails, GenericIssuerPaymentMethodDetails, GiropayDetails, GooglePayDetails, IdealDetails, KlarnaDetails, MasterpassDetails, MbwayDetails, MobilePayDetails, MolPayDetails, OpenInvoiceDetails, PayByBankAISDirectDebitDetails, PayByBankDetails, PayPalDetails, PayPayDetails, PayToDetails, PayUUpiDetails, PayWithGoogleDetails, PaymentDetails, PseDetails, RatepayDetails, RivertyDetails, SamsungPayDetails, SepaDirectDebitDetails, StoredPaymentMethodDetails, TwintDetails, UpiCollectDetails, UpiIntentDetails, VippsDetails, VisaCheckoutDetails, WeChatPayDetails, WeChatPayMiniProgramDetails, ZipDetails) + * @return The actual instance (AchDetails, AffirmDetails, AfterpayDetails, AmazonPayDetails, AncvDetails, AndroidPayDetails, ApplePayDetails, BacsDirectDebitDetails, BillDeskDetails, BlikDetails, CardDetails, CashAppDetails, CellulantDetails, DokuDetails, DotpayDetails, DragonpayDetails, EBankingFinlandDetails, EcontextVoucherDetails, EftDetails, FastlaneDetails, GenericIssuerPaymentMethodDetails, GiropayDetails, GooglePayDetails, IdealDetails, KlarnaDetails, MasterpassDetails, MbwayDetails, MobilePayDetails, MolPayDetails, OpenInvoiceDetails, PayByBankAISDirectDebitDetails, PayByBankDetails, PayPalDetails, PayPayDetails, PayToDetails, PayUUpiDetails, PayWithGoogleDetails, PaymentDetails, PseDetails, RatepayDetails, RivertyDetails, SamsungPayDetails, SepaDirectDebitDetails, StoredPaymentMethodDetails, TwintDetails, UpiCollectDetails, UpiIntentDetails, VippsDetails, VisaCheckoutDetails, WeChatPayDetails, WeChatPayMiniProgramDetails, ZipDetails) */ @Override public Object getActualInstance() { @@ -2454,6 +2495,17 @@ public EftDetails getEftDetails() throws ClassCastException { return (EftDetails)super.getActualInstance(); } + /** + * Get the actual instance of `FastlaneDetails`. If the actual instance is not `FastlaneDetails`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `FastlaneDetails` + * @throws ClassCastException if the instance is not `FastlaneDetails` + */ + public FastlaneDetails getFastlaneDetails() throws ClassCastException { + return (FastlaneDetails)super.getActualInstance(); + } + /** * Get the actual instance of `GenericIssuerPaymentMethodDetails`. If the actual instance is not `GenericIssuerPaymentMethodDetails`, * the ClassCastException will be thrown. diff --git a/src/main/java/com/adyen/model/checkout/FastlaneDetails.java b/src/main/java/com/adyen/model/checkout/FastlaneDetails.java new file mode 100644 index 000000000..d39e7cae8 --- /dev/null +++ b/src/main/java/com/adyen/model/checkout/FastlaneDetails.java @@ -0,0 +1,337 @@ +/* + * Adyen Checkout API + * + * The version of the OpenAPI document: 71 + * + * + * 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.checkout; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.core.JsonProcessingException; + + +/** + * FastlaneDetails + */ +@JsonPropertyOrder({ + FastlaneDetails.JSON_PROPERTY_CHECKOUT_ATTEMPT_ID, + FastlaneDetails.JSON_PROPERTY_FASTLANE_DATA, + FastlaneDetails.JSON_PROPERTY_RECURRING_DETAIL_REFERENCE, + FastlaneDetails.JSON_PROPERTY_STORED_PAYMENT_METHOD_ID, + FastlaneDetails.JSON_PROPERTY_TYPE +}) + +public class FastlaneDetails { + public static final String JSON_PROPERTY_CHECKOUT_ATTEMPT_ID = "checkoutAttemptId"; + private String checkoutAttemptId; + + public static final String JSON_PROPERTY_FASTLANE_DATA = "fastlaneData"; + private String fastlaneData; + + public static final String JSON_PROPERTY_RECURRING_DETAIL_REFERENCE = "recurringDetailReference"; + @Deprecated // deprecated since Adyen Checkout API v49: Use `storedPaymentMethodId` instead. + private String recurringDetailReference; + + public static final String JSON_PROPERTY_STORED_PAYMENT_METHOD_ID = "storedPaymentMethodId"; + private String storedPaymentMethodId; + + /** + * **fastlane** + */ + public enum TypeEnum { + FASTLANE("fastlane"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_TYPE = "type"; + private TypeEnum type; + + public FastlaneDetails() { + } + + /** + * The checkout attempt identifier. + * + * @param checkoutAttemptId + * @return the current {@code FastlaneDetails} instance, allowing for method chaining + */ + public FastlaneDetails checkoutAttemptId(String checkoutAttemptId) { + this.checkoutAttemptId = checkoutAttemptId; + return this; + } + + /** + * The checkout attempt identifier. + * @return checkoutAttemptId + */ + @ApiModelProperty(value = "The checkout attempt identifier.") + @JsonProperty(JSON_PROPERTY_CHECKOUT_ATTEMPT_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getCheckoutAttemptId() { + return checkoutAttemptId; + } + + /** + * The checkout attempt identifier. + * + * @param checkoutAttemptId + */ + @JsonProperty(JSON_PROPERTY_CHECKOUT_ATTEMPT_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCheckoutAttemptId(String checkoutAttemptId) { + this.checkoutAttemptId = checkoutAttemptId; + } + + /** + * The encoded fastlane data blob + * + * @param fastlaneData + * @return the current {@code FastlaneDetails} instance, allowing for method chaining + */ + public FastlaneDetails fastlaneData(String fastlaneData) { + this.fastlaneData = fastlaneData; + return this; + } + + /** + * The encoded fastlane data blob + * @return fastlaneData + */ + @ApiModelProperty(required = true, value = "The encoded fastlane data blob") + @JsonProperty(JSON_PROPERTY_FASTLANE_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getFastlaneData() { + return fastlaneData; + } + + /** + * The encoded fastlane data blob + * + * @param fastlaneData + */ + @JsonProperty(JSON_PROPERTY_FASTLANE_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setFastlaneData(String fastlaneData) { + this.fastlaneData = fastlaneData; + } + + /** + * This is the `recurringDetailReference` returned in the response when you created the token. + * + * @param recurringDetailReference + * @return the current {@code FastlaneDetails} instance, allowing for method chaining + * + * @deprecated since Adyen Checkout API v49 + * Use `storedPaymentMethodId` instead. + */ + @Deprecated + public FastlaneDetails recurringDetailReference(String recurringDetailReference) { + this.recurringDetailReference = recurringDetailReference; + return this; + } + + /** + * This is the `recurringDetailReference` returned in the response when you created the token. + * @return recurringDetailReference + * + * @deprecated since Adyen Checkout API v49 + * Use `storedPaymentMethodId` instead. + */ + @Deprecated + @ApiModelProperty(value = "This is the `recurringDetailReference` returned in the response when you created the token.") + @JsonProperty(JSON_PROPERTY_RECURRING_DETAIL_REFERENCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getRecurringDetailReference() { + return recurringDetailReference; + } + + /** + * This is the `recurringDetailReference` returned in the response when you created the token. + * + * @param recurringDetailReference + * + * @deprecated since Adyen Checkout API v49 + * Use `storedPaymentMethodId` instead. + */ + @Deprecated + @JsonProperty(JSON_PROPERTY_RECURRING_DETAIL_REFERENCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setRecurringDetailReference(String recurringDetailReference) { + this.recurringDetailReference = recurringDetailReference; + } + + /** + * This is the `recurringDetailReference` returned in the response when you created the token. + * + * @param storedPaymentMethodId + * @return the current {@code FastlaneDetails} instance, allowing for method chaining + */ + public FastlaneDetails storedPaymentMethodId(String storedPaymentMethodId) { + this.storedPaymentMethodId = storedPaymentMethodId; + return this; + } + + /** + * This is the `recurringDetailReference` returned in the response when you created the token. + * @return storedPaymentMethodId + */ + @ApiModelProperty(value = "This is the `recurringDetailReference` returned in the response when you created the token.") + @JsonProperty(JSON_PROPERTY_STORED_PAYMENT_METHOD_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getStoredPaymentMethodId() { + return storedPaymentMethodId; + } + + /** + * This is the `recurringDetailReference` returned in the response when you created the token. + * + * @param storedPaymentMethodId + */ + @JsonProperty(JSON_PROPERTY_STORED_PAYMENT_METHOD_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setStoredPaymentMethodId(String storedPaymentMethodId) { + this.storedPaymentMethodId = storedPaymentMethodId; + } + + /** + * **fastlane** + * + * @param type + * @return the current {@code FastlaneDetails} instance, allowing for method chaining + */ + public FastlaneDetails type(TypeEnum type) { + this.type = type; + return this; + } + + /** + * **fastlane** + * @return type + */ + @ApiModelProperty(required = true, value = "**fastlane**") + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public TypeEnum getType() { + return type; + } + + /** + * **fastlane** + * + * @param type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setType(TypeEnum type) { + this.type = type; + } + + /** + * Return true if this FastlaneDetails object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FastlaneDetails fastlaneDetails = (FastlaneDetails) o; + return Objects.equals(this.checkoutAttemptId, fastlaneDetails.checkoutAttemptId) && + Objects.equals(this.fastlaneData, fastlaneDetails.fastlaneData) && + Objects.equals(this.recurringDetailReference, fastlaneDetails.recurringDetailReference) && + Objects.equals(this.storedPaymentMethodId, fastlaneDetails.storedPaymentMethodId) && + Objects.equals(this.type, fastlaneDetails.type); + } + + @Override + public int hashCode() { + return Objects.hash(checkoutAttemptId, fastlaneData, recurringDetailReference, storedPaymentMethodId, type); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FastlaneDetails {\n"); + sb.append(" checkoutAttemptId: ").append(toIndentedString(checkoutAttemptId)).append("\n"); + sb.append(" fastlaneData: ").append(toIndentedString(fastlaneData)).append("\n"); + sb.append(" recurringDetailReference: ").append(toIndentedString(recurringDetailReference)).append("\n"); + sb.append(" storedPaymentMethodId: ").append(toIndentedString(storedPaymentMethodId)).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 FastlaneDetails given an JSON string + * + * @param jsonString JSON string + * @return An instance of FastlaneDetails + * @throws JsonProcessingException if the JSON string is invalid with respect to FastlaneDetails + */ + public static FastlaneDetails fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, FastlaneDetails.class); + } +/** + * Convert an instance of FastlaneDetails 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/configurationwebhooks/AccountHolder.java b/src/main/java/com/adyen/model/configurationwebhooks/AccountHolder.java index 8e3eb0564..e5318c032 100644 --- a/src/main/java/com/adyen/model/configurationwebhooks/AccountHolder.java +++ b/src/main/java/com/adyen/model/configurationwebhooks/AccountHolder.java @@ -86,7 +86,7 @@ public class AccountHolder { private String reference; /** - * The status of the account holder. Possible values: * **active**: The account holder is active. This is the default status when creating an account holder. * **suspended**: The account holder is permanently deactivated by Adyen. This action cannot be undone. * **closed**: The account holder is permanently deactivated by you. This action cannot be undone. + * The status of the account holder. Possible values: * **active**: The account holder is active and allowed to use its capabilities. This is the initial status for account holders and balance accounts. You can change this status to **suspended** or **closed**. * **suspended**: The account holder is temporarily disabled and payouts are blocked. You can change this status to **active** or **closed**. * **closed**: The account holder and all of its capabilities are permanently disabled. This is a final status and cannot be changed. */ public enum StatusEnum { ACTIVE("active"), @@ -490,7 +490,7 @@ public void setReference(String reference) { } /** - * The status of the account holder. Possible values: * **active**: The account holder is active. This is the default status when creating an account holder. * **suspended**: The account holder is permanently deactivated by Adyen. This action cannot be undone. * **closed**: The account holder is permanently deactivated by you. This action cannot be undone. + * The status of the account holder. Possible values: * **active**: The account holder is active and allowed to use its capabilities. This is the initial status for account holders and balance accounts. You can change this status to **suspended** or **closed**. * **suspended**: The account holder is temporarily disabled and payouts are blocked. You can change this status to **active** or **closed**. * **closed**: The account holder and all of its capabilities are permanently disabled. This is a final status and cannot be changed. * * @param status * @return the current {@code AccountHolder} instance, allowing for method chaining @@ -501,10 +501,10 @@ public AccountHolder status(StatusEnum status) { } /** - * The status of the account holder. Possible values: * **active**: The account holder is active. This is the default status when creating an account holder. * **suspended**: The account holder is permanently deactivated by Adyen. This action cannot be undone. * **closed**: The account holder is permanently deactivated by you. This action cannot be undone. + * The status of the account holder. Possible values: * **active**: The account holder is active and allowed to use its capabilities. This is the initial status for account holders and balance accounts. You can change this status to **suspended** or **closed**. * **suspended**: The account holder is temporarily disabled and payouts are blocked. You can change this status to **active** or **closed**. * **closed**: The account holder and all of its capabilities are permanently disabled. This is a final status and cannot be changed. * @return status */ - @ApiModelProperty(value = "The status of the account holder. Possible values: * **active**: The account holder is active. This is the default status when creating an account holder. * **suspended**: The account holder is permanently deactivated by Adyen. This action cannot be undone. * **closed**: The account holder is permanently deactivated by you. This action cannot be undone.") + @ApiModelProperty(value = "The status of the account holder. Possible values: * **active**: The account holder is active and allowed to use its capabilities. This is the initial status for account holders and balance accounts. You can change this status to **suspended** or **closed**. * **suspended**: The account holder is temporarily disabled and payouts are blocked. You can change this status to **active** or **closed**. * **closed**: The account holder and all of its capabilities are permanently disabled. This is a final status and cannot be changed.") @JsonProperty(JSON_PROPERTY_STATUS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public StatusEnum getStatus() { @@ -512,7 +512,7 @@ public StatusEnum getStatus() { } /** - * The status of the account holder. Possible values: * **active**: The account holder is active. This is the default status when creating an account holder. * **suspended**: The account holder is permanently deactivated by Adyen. This action cannot be undone. * **closed**: The account holder is permanently deactivated by you. This action cannot be undone. + * The status of the account holder. Possible values: * **active**: The account holder is active and allowed to use its capabilities. This is the initial status for account holders and balance accounts. You can change this status to **suspended** or **closed**. * **suspended**: The account holder is temporarily disabled and payouts are blocked. You can change this status to **active** or **closed**. * **closed**: The account holder and all of its capabilities are permanently disabled. This is a final status and cannot be changed. * * @param status */ diff --git a/src/main/java/com/adyen/model/legalentitymanagement/FinancialReport.java b/src/main/java/com/adyen/model/legalentitymanagement/FinancialReport.java new file mode 100644 index 000000000..09effe781 --- /dev/null +++ b/src/main/java/com/adyen/model/legalentitymanagement/FinancialReport.java @@ -0,0 +1,330 @@ +/* + * Legal Entity Management API + * + * The version of the OpenAPI document: 3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.adyen.model.legalentitymanagement; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.core.JsonProcessingException; + + +/** + * FinancialReport + */ +@JsonPropertyOrder({ + FinancialReport.JSON_PROPERTY_ANNUAL_TURNOVER, + FinancialReport.JSON_PROPERTY_BALANCE_SHEET_TOTAL, + FinancialReport.JSON_PROPERTY_CURRENCY_OF_FINANCIAL_DATA, + FinancialReport.JSON_PROPERTY_DATE_OF_FINANCIAL_DATA, + FinancialReport.JSON_PROPERTY_EMPLOYEE_COUNT, + FinancialReport.JSON_PROPERTY_NET_ASSETS +}) + +public class FinancialReport { + public static final String JSON_PROPERTY_ANNUAL_TURNOVER = "annualTurnover"; + private String annualTurnover; + + public static final String JSON_PROPERTY_BALANCE_SHEET_TOTAL = "balanceSheetTotal"; + private String balanceSheetTotal; + + public static final String JSON_PROPERTY_CURRENCY_OF_FINANCIAL_DATA = "currencyOfFinancialData"; + private String currencyOfFinancialData; + + public static final String JSON_PROPERTY_DATE_OF_FINANCIAL_DATA = "dateOfFinancialData"; + private String dateOfFinancialData; + + public static final String JSON_PROPERTY_EMPLOYEE_COUNT = "employeeCount"; + private String employeeCount; + + public static final String JSON_PROPERTY_NET_ASSETS = "netAssets"; + private String netAssets; + + public FinancialReport() { + } + + /** + * The annual turnover of the business. + * + * @param annualTurnover + * @return the current {@code FinancialReport} instance, allowing for method chaining + */ + public FinancialReport annualTurnover(String annualTurnover) { + this.annualTurnover = annualTurnover; + return this; + } + + /** + * The annual turnover of the business. + * @return annualTurnover + */ + @ApiModelProperty(value = "The annual turnover of the business.") + @JsonProperty(JSON_PROPERTY_ANNUAL_TURNOVER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getAnnualTurnover() { + return annualTurnover; + } + + /** + * The annual turnover of the business. + * + * @param annualTurnover + */ + @JsonProperty(JSON_PROPERTY_ANNUAL_TURNOVER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAnnualTurnover(String annualTurnover) { + this.annualTurnover = annualTurnover; + } + + /** + * The balance sheet total of the business. + * + * @param balanceSheetTotal + * @return the current {@code FinancialReport} instance, allowing for method chaining + */ + public FinancialReport balanceSheetTotal(String balanceSheetTotal) { + this.balanceSheetTotal = balanceSheetTotal; + return this; + } + + /** + * The balance sheet total of the business. + * @return balanceSheetTotal + */ + @ApiModelProperty(value = "The balance sheet total of the business.") + @JsonProperty(JSON_PROPERTY_BALANCE_SHEET_TOTAL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getBalanceSheetTotal() { + return balanceSheetTotal; + } + + /** + * The balance sheet total of the business. + * + * @param balanceSheetTotal + */ + @JsonProperty(JSON_PROPERTY_BALANCE_SHEET_TOTAL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setBalanceSheetTotal(String balanceSheetTotal) { + this.balanceSheetTotal = balanceSheetTotal; + } + + /** + * The currency used for the net assets and balance sheet total. + * + * @param currencyOfFinancialData + * @return the current {@code FinancialReport} instance, allowing for method chaining + */ + public FinancialReport currencyOfFinancialData(String currencyOfFinancialData) { + this.currencyOfFinancialData = currencyOfFinancialData; + return this; + } + + /** + * The currency used for the net assets and balance sheet total. + * @return currencyOfFinancialData + */ + @ApiModelProperty(value = "The currency used for the net assets and balance sheet total.") + @JsonProperty(JSON_PROPERTY_CURRENCY_OF_FINANCIAL_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getCurrencyOfFinancialData() { + return currencyOfFinancialData; + } + + /** + * The currency used for the net assets and balance sheet total. + * + * @param currencyOfFinancialData + */ + @JsonProperty(JSON_PROPERTY_CURRENCY_OF_FINANCIAL_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCurrencyOfFinancialData(String currencyOfFinancialData) { + this.currencyOfFinancialData = currencyOfFinancialData; + } + + /** + * The date the financial data were provided, in YYYY-MM-DD format. + * + * @param dateOfFinancialData + * @return the current {@code FinancialReport} instance, allowing for method chaining + */ + public FinancialReport dateOfFinancialData(String dateOfFinancialData) { + this.dateOfFinancialData = dateOfFinancialData; + return this; + } + + /** + * The date the financial data were provided, in YYYY-MM-DD format. + * @return dateOfFinancialData + */ + @ApiModelProperty(value = "The date the financial data were provided, in YYYY-MM-DD format.") + @JsonProperty(JSON_PROPERTY_DATE_OF_FINANCIAL_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getDateOfFinancialData() { + return dateOfFinancialData; + } + + /** + * The date the financial data were provided, in YYYY-MM-DD format. + * + * @param dateOfFinancialData + */ + @JsonProperty(JSON_PROPERTY_DATE_OF_FINANCIAL_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDateOfFinancialData(String dateOfFinancialData) { + this.dateOfFinancialData = dateOfFinancialData; + } + + /** + * The number of employees of the business. + * + * @param employeeCount + * @return the current {@code FinancialReport} instance, allowing for method chaining + */ + public FinancialReport employeeCount(String employeeCount) { + this.employeeCount = employeeCount; + return this; + } + + /** + * The number of employees of the business. + * @return employeeCount + */ + @ApiModelProperty(value = "The number of employees of the business.") + @JsonProperty(JSON_PROPERTY_EMPLOYEE_COUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getEmployeeCount() { + return employeeCount; + } + + /** + * The number of employees of the business. + * + * @param employeeCount + */ + @JsonProperty(JSON_PROPERTY_EMPLOYEE_COUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEmployeeCount(String employeeCount) { + this.employeeCount = employeeCount; + } + + /** + * The net assets of the business. + * + * @param netAssets + * @return the current {@code FinancialReport} instance, allowing for method chaining + */ + public FinancialReport netAssets(String netAssets) { + this.netAssets = netAssets; + return this; + } + + /** + * The net assets of the business. + * @return netAssets + */ + @ApiModelProperty(value = "The net assets of the business.") + @JsonProperty(JSON_PROPERTY_NET_ASSETS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getNetAssets() { + return netAssets; + } + + /** + * The net assets of the business. + * + * @param netAssets + */ + @JsonProperty(JSON_PROPERTY_NET_ASSETS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setNetAssets(String netAssets) { + this.netAssets = netAssets; + } + + /** + * Return true if this FinancialReport object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FinancialReport financialReport = (FinancialReport) o; + return Objects.equals(this.annualTurnover, financialReport.annualTurnover) && + Objects.equals(this.balanceSheetTotal, financialReport.balanceSheetTotal) && + Objects.equals(this.currencyOfFinancialData, financialReport.currencyOfFinancialData) && + Objects.equals(this.dateOfFinancialData, financialReport.dateOfFinancialData) && + Objects.equals(this.employeeCount, financialReport.employeeCount) && + Objects.equals(this.netAssets, financialReport.netAssets); + } + + @Override + public int hashCode() { + return Objects.hash(annualTurnover, balanceSheetTotal, currencyOfFinancialData, dateOfFinancialData, employeeCount, netAssets); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FinancialReport {\n"); + sb.append(" annualTurnover: ").append(toIndentedString(annualTurnover)).append("\n"); + sb.append(" balanceSheetTotal: ").append(toIndentedString(balanceSheetTotal)).append("\n"); + sb.append(" currencyOfFinancialData: ").append(toIndentedString(currencyOfFinancialData)).append("\n"); + sb.append(" dateOfFinancialData: ").append(toIndentedString(dateOfFinancialData)).append("\n"); + sb.append(" employeeCount: ").append(toIndentedString(employeeCount)).append("\n"); + sb.append(" netAssets: ").append(toIndentedString(netAssets)).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 FinancialReport given an JSON string + * + * @param jsonString JSON string + * @return An instance of FinancialReport + * @throws JsonProcessingException if the JSON string is invalid with respect to FinancialReport + */ + public static FinancialReport fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, FinancialReport.class); + } +/** + * Convert an instance of FinancialReport 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/legalentitymanagement/LegalEntityAssociation.java b/src/main/java/com/adyen/model/legalentitymanagement/LegalEntityAssociation.java index a7426d9e8..2378d7297 100644 --- a/src/main/java/com/adyen/model/legalentitymanagement/LegalEntityAssociation.java +++ b/src/main/java/com/adyen/model/legalentitymanagement/LegalEntityAssociation.java @@ -38,6 +38,7 @@ LegalEntityAssociation.JSON_PROPERTY_JOB_TITLE, LegalEntityAssociation.JSON_PROPERTY_LEGAL_ENTITY_ID, LegalEntityAssociation.JSON_PROPERTY_NAME, + LegalEntityAssociation.JSON_PROPERTY_NOMINEE, LegalEntityAssociation.JSON_PROPERTY_RELATIONSHIP, LegalEntityAssociation.JSON_PROPERTY_SETTLOR_EXEMPTION_REASON, LegalEntityAssociation.JSON_PROPERTY_TYPE @@ -59,6 +60,9 @@ public class LegalEntityAssociation { public static final String JSON_PROPERTY_NAME = "name"; private String name; + public static final String JSON_PROPERTY_NOMINEE = "nominee"; + private Boolean nominee; + public static final String JSON_PROPERTY_RELATIONSHIP = "relationship"; private String relationship; @@ -303,6 +307,39 @@ public void setName(String name) { this.name = name; } + /** + * Default value: **false** Set to **true** if the entity association `type` **director**, **secondaryPartner** or **shareholder** is also a nominee. Only applicable to New Zealand. + * + * @param nominee + * @return the current {@code LegalEntityAssociation} instance, allowing for method chaining + */ + public LegalEntityAssociation nominee(Boolean nominee) { + this.nominee = nominee; + return this; + } + + /** + * Default value: **false** Set to **true** if the entity association `type` **director**, **secondaryPartner** or **shareholder** is also a nominee. Only applicable to New Zealand. + * @return nominee + */ + @ApiModelProperty(value = "Default value: **false** Set to **true** if the entity association `type` **director**, **secondaryPartner** or **shareholder** is also a nominee. Only applicable to New Zealand.") + @JsonProperty(JSON_PROPERTY_NOMINEE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getNominee() { + return nominee; + } + + /** + * Default value: **false** Set to **true** if the entity association `type` **director**, **secondaryPartner** or **shareholder** is also a nominee. Only applicable to New Zealand. + * + * @param nominee + */ + @JsonProperty(JSON_PROPERTY_NOMINEE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setNominee(Boolean nominee) { + this.nominee = nominee; + } + /** * The individual's relationship to a legal representative if the `type` is **legalRepresentative**. Possible values: **parent**, **guardian**. * @@ -427,6 +464,7 @@ public boolean equals(Object o) { Objects.equals(this.jobTitle, legalEntityAssociation.jobTitle) && Objects.equals(this.legalEntityId, legalEntityAssociation.legalEntityId) && Objects.equals(this.name, legalEntityAssociation.name) && + Objects.equals(this.nominee, legalEntityAssociation.nominee) && Objects.equals(this.relationship, legalEntityAssociation.relationship) && Objects.equals(this.settlorExemptionReason, legalEntityAssociation.settlorExemptionReason) && Objects.equals(this.type, legalEntityAssociation.type); @@ -434,7 +472,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(associatorId, entityType, jobTitle, legalEntityId, name, relationship, settlorExemptionReason, type); + return Objects.hash(associatorId, entityType, jobTitle, legalEntityId, name, nominee, relationship, settlorExemptionReason, type); } @Override @@ -446,6 +484,7 @@ public String toString() { sb.append(" jobTitle: ").append(toIndentedString(jobTitle)).append("\n"); sb.append(" legalEntityId: ").append(toIndentedString(legalEntityId)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" nominee: ").append(toIndentedString(nominee)).append("\n"); sb.append(" relationship: ").append(toIndentedString(relationship)).append("\n"); sb.append(" settlorExemptionReason: ").append(toIndentedString(settlorExemptionReason)).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); diff --git a/src/main/java/com/adyen/model/legalentitymanagement/Organization.java b/src/main/java/com/adyen/model/legalentitymanagement/Organization.java index b38ba32f9..291e882c9 100644 --- a/src/main/java/com/adyen/model/legalentitymanagement/Organization.java +++ b/src/main/java/com/adyen/model/legalentitymanagement/Organization.java @@ -17,6 +17,7 @@ import java.util.Map; import java.util.HashMap; import com.adyen.model.legalentitymanagement.Address; +import com.adyen.model.legalentitymanagement.FinancialReport; import com.adyen.model.legalentitymanagement.PhoneNumber; import com.adyen.model.legalentitymanagement.StockData; import com.adyen.model.legalentitymanagement.TaxInformation; @@ -44,6 +45,7 @@ Organization.JSON_PROPERTY_DESCRIPTION, Organization.JSON_PROPERTY_DOING_BUSINESS_AS, Organization.JSON_PROPERTY_EMAIL, + Organization.JSON_PROPERTY_FINANCIAL_REPORTS, Organization.JSON_PROPERTY_LEGAL_NAME, Organization.JSON_PROPERTY_PHONE, Organization.JSON_PROPERTY_PRINCIPAL_PLACE_OF_BUSINESS, @@ -74,6 +76,9 @@ public class Organization { public static final String JSON_PROPERTY_EMAIL = "email"; private String email; + public static final String JSON_PROPERTY_FINANCIAL_REPORTS = "financialReports"; + private List financialReports = null; + public static final String JSON_PROPERTY_LEGAL_NAME = "legalName"; private String legalName; @@ -356,6 +361,47 @@ public void setEmail(String email) { this.email = email; } + /** + * The financial report information of the organization. + * + * @param financialReports + * @return the current {@code Organization} instance, allowing for method chaining + */ + public Organization financialReports(List financialReports) { + this.financialReports = financialReports; + return this; + } + + public Organization addFinancialReportsItem(FinancialReport financialReportsItem) { + if (this.financialReports == null) { + this.financialReports = new ArrayList<>(); + } + this.financialReports.add(financialReportsItem); + return this; + } + + /** + * The financial report information of the organization. + * @return financialReports + */ + @ApiModelProperty(value = "The financial report information of the organization.") + @JsonProperty(JSON_PROPERTY_FINANCIAL_REPORTS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getFinancialReports() { + return financialReports; + } + + /** + * The financial report information of the organization. + * + * @param financialReports + */ + @JsonProperty(JSON_PROPERTY_FINANCIAL_REPORTS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setFinancialReports(List financialReports) { + this.financialReports = financialReports; + } + /** * The organization's legal name. * @@ -777,6 +823,7 @@ public boolean equals(Object o) { Objects.equals(this.description, organization.description) && Objects.equals(this.doingBusinessAs, organization.doingBusinessAs) && Objects.equals(this.email, organization.email) && + Objects.equals(this.financialReports, organization.financialReports) && Objects.equals(this.legalName, organization.legalName) && Objects.equals(this.phone, organization.phone) && Objects.equals(this.principalPlaceOfBusiness, organization.principalPlaceOfBusiness) && @@ -793,7 +840,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(countryOfGoverningLaw, dateOfIncorporation, description, doingBusinessAs, email, legalName, phone, principalPlaceOfBusiness, registeredAddress, registrationNumber, stockData, taxInformation, taxReportingClassification, type, vatAbsenceReason, vatNumber, webData); + return Objects.hash(countryOfGoverningLaw, dateOfIncorporation, description, doingBusinessAs, email, financialReports, legalName, phone, principalPlaceOfBusiness, registeredAddress, registrationNumber, stockData, taxInformation, taxReportingClassification, type, vatAbsenceReason, vatNumber, webData); } @Override @@ -805,6 +852,7 @@ public String toString() { sb.append(" description: ").append(toIndentedString(description)).append("\n"); sb.append(" doingBusinessAs: ").append(toIndentedString(doingBusinessAs)).append("\n"); sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append(" financialReports: ").append(toIndentedString(financialReports)).append("\n"); sb.append(" legalName: ").append(toIndentedString(legalName)).append("\n"); sb.append(" phone: ").append(toIndentedString(phone)).append("\n"); sb.append(" principalPlaceOfBusiness: ").append(toIndentedString(principalPlaceOfBusiness)).append("\n"); diff --git a/src/main/java/com/adyen/model/legalentitymanagement/SoleProprietorship.java b/src/main/java/com/adyen/model/legalentitymanagement/SoleProprietorship.java index f472a0906..d1ab868bb 100644 --- a/src/main/java/com/adyen/model/legalentitymanagement/SoleProprietorship.java +++ b/src/main/java/com/adyen/model/legalentitymanagement/SoleProprietorship.java @@ -17,6 +17,7 @@ import java.util.Map; import java.util.HashMap; import com.adyen.model.legalentitymanagement.Address; +import com.adyen.model.legalentitymanagement.FinancialReport; import com.adyen.model.legalentitymanagement.TaxInformation; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; @@ -38,6 +39,7 @@ SoleProprietorship.JSON_PROPERTY_COUNTRY_OF_GOVERNING_LAW, SoleProprietorship.JSON_PROPERTY_DATE_OF_INCORPORATION, SoleProprietorship.JSON_PROPERTY_DOING_BUSINESS_AS, + SoleProprietorship.JSON_PROPERTY_FINANCIAL_REPORTS, SoleProprietorship.JSON_PROPERTY_NAME, SoleProprietorship.JSON_PROPERTY_PRINCIPAL_PLACE_OF_BUSINESS, SoleProprietorship.JSON_PROPERTY_REGISTERED_ADDRESS, @@ -58,6 +60,9 @@ public class SoleProprietorship { public static final String JSON_PROPERTY_DOING_BUSINESS_AS = "doingBusinessAs"; private String doingBusinessAs; + public static final String JSON_PROPERTY_FINANCIAL_REPORTS = "financialReports"; + private List financialReports = null; + public static final String JSON_PROPERTY_NAME = "name"; private String name; @@ -219,6 +224,47 @@ public void setDoingBusinessAs(String doingBusinessAs) { this.doingBusinessAs = doingBusinessAs; } + /** + * The information from the financial report of the sole proprietorship. + * + * @param financialReports + * @return the current {@code SoleProprietorship} instance, allowing for method chaining + */ + public SoleProprietorship financialReports(List financialReports) { + this.financialReports = financialReports; + return this; + } + + public SoleProprietorship addFinancialReportsItem(FinancialReport financialReportsItem) { + if (this.financialReports == null) { + this.financialReports = new ArrayList<>(); + } + this.financialReports.add(financialReportsItem); + return this; + } + + /** + * The information from the financial report of the sole proprietorship. + * @return financialReports + */ + @ApiModelProperty(value = "The information from the financial report of the sole proprietorship.") + @JsonProperty(JSON_PROPERTY_FINANCIAL_REPORTS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getFinancialReports() { + return financialReports; + } + + /** + * The information from the financial report of the sole proprietorship. + * + * @param financialReports + */ + @JsonProperty(JSON_PROPERTY_FINANCIAL_REPORTS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setFinancialReports(List financialReports) { + this.financialReports = financialReports; + } + /** * The legal name. * @@ -506,6 +552,7 @@ public boolean equals(Object o) { return Objects.equals(this.countryOfGoverningLaw, soleProprietorship.countryOfGoverningLaw) && Objects.equals(this.dateOfIncorporation, soleProprietorship.dateOfIncorporation) && Objects.equals(this.doingBusinessAs, soleProprietorship.doingBusinessAs) && + Objects.equals(this.financialReports, soleProprietorship.financialReports) && Objects.equals(this.name, soleProprietorship.name) && Objects.equals(this.principalPlaceOfBusiness, soleProprietorship.principalPlaceOfBusiness) && Objects.equals(this.registeredAddress, soleProprietorship.registeredAddress) && @@ -518,7 +565,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(countryOfGoverningLaw, dateOfIncorporation, doingBusinessAs, name, principalPlaceOfBusiness, registeredAddress, registrationNumber, taxAbsent, taxInformation, vatAbsenceReason, vatNumber); + return Objects.hash(countryOfGoverningLaw, dateOfIncorporation, doingBusinessAs, financialReports, name, principalPlaceOfBusiness, registeredAddress, registrationNumber, taxAbsent, taxInformation, vatAbsenceReason, vatNumber); } @Override @@ -528,6 +575,7 @@ public String toString() { sb.append(" countryOfGoverningLaw: ").append(toIndentedString(countryOfGoverningLaw)).append("\n"); sb.append(" dateOfIncorporation: ").append(toIndentedString(dateOfIncorporation)).append("\n"); sb.append(" doingBusinessAs: ").append(toIndentedString(doingBusinessAs)).append("\n"); + sb.append(" financialReports: ").append(toIndentedString(financialReports)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" principalPlaceOfBusiness: ").append(toIndentedString(principalPlaceOfBusiness)).append("\n"); sb.append(" registeredAddress: ").append(toIndentedString(registeredAddress)).append("\n"); diff --git a/src/main/java/com/adyen/model/legalentitymanagement/SourceOfFunds.java b/src/main/java/com/adyen/model/legalentitymanagement/SourceOfFunds.java index a54de3b68..8eb298438 100644 --- a/src/main/java/com/adyen/model/legalentitymanagement/SourceOfFunds.java +++ b/src/main/java/com/adyen/model/legalentitymanagement/SourceOfFunds.java @@ -88,7 +88,7 @@ public SourceOfFunds() { } /** - * The unique identifier of the business line that will be the source of funds.This must be a business line for a **receivePayments** or **receiveFromPlatformPayments** capability. + * The unique identifier of the business line that is the source of funds.This must be a business line for a **receivePayments** or **receiveFromPlatformPayments** capability. * * @param acquiringBusinessLineId * @return the current {@code SourceOfFunds} instance, allowing for method chaining @@ -103,14 +103,14 @@ public SourceOfFunds acquiringBusinessLineId(String acquiringBusinessLineId) { } /** - * The unique identifier of the business line that will be the source of funds.This must be a business line for a **receivePayments** or **receiveFromPlatformPayments** capability. + * The unique identifier of the business line that is the source of funds.This must be a business line for a **receivePayments** or **receiveFromPlatformPayments** capability. * @return acquiringBusinessLineId * * @deprecated since Legal Entity Management API v3 * This field will be removed in v4. */ @Deprecated - @ApiModelProperty(value = "The unique identifier of the business line that will be the source of funds.This must be a business line for a **receivePayments** or **receiveFromPlatformPayments** capability.") + @ApiModelProperty(value = "The unique identifier of the business line that is the source of funds.This must be a business line for a **receivePayments** or **receiveFromPlatformPayments** capability.") @JsonProperty(JSON_PROPERTY_ACQUIRING_BUSINESS_LINE_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public String getAcquiringBusinessLineId() { @@ -118,7 +118,7 @@ public String getAcquiringBusinessLineId() { } /** - * The unique identifier of the business line that will be the source of funds.This must be a business line for a **receivePayments** or **receiveFromPlatformPayments** capability. + * The unique identifier of the business line that is the source of funds.This must be a business line for a **receivePayments** or **receiveFromPlatformPayments** capability. * * @param acquiringBusinessLineId * diff --git a/src/main/java/com/adyen/model/transfers/TransferReview.java b/src/main/java/com/adyen/model/transfers/TransferReview.java index f5298c1fd..2e758f5f5 100644 --- a/src/main/java/com/adyen/model/transfers/TransferReview.java +++ b/src/main/java/com/adyen/model/transfers/TransferReview.java @@ -31,94 +31,16 @@ * TransferReview */ @JsonPropertyOrder({ - TransferReview.JSON_PROPERTY_NUMBER_OF_APPROVALS_COMPLETED, - TransferReview.JSON_PROPERTY_NUMBER_OF_APPROVALS_REQUIRED, - TransferReview.JSON_PROPERTY_SCA_ON_APPROVAL + TransferReview.JSON_PROPERTY_NUMBER_OF_APPROVALS_REQUIRED }) public class TransferReview { - public static final String JSON_PROPERTY_NUMBER_OF_APPROVALS_COMPLETED = "numberOfApprovalsCompleted"; - private Integer numberOfApprovalsCompleted; - public static final String JSON_PROPERTY_NUMBER_OF_APPROVALS_REQUIRED = "numberOfApprovalsRequired"; private Integer numberOfApprovalsRequired; - /** - * Shows the status of the Strong Customer Authentication (SCA) process. Possible values: **required**, **completed**, **notApplicable**. - */ - public enum ScaOnApprovalEnum { - COMPLETED("completed"), - - NOTAPPLICABLE("notApplicable"), - - REQUIRED("required"); - - private String value; - - ScaOnApprovalEnum(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static ScaOnApprovalEnum fromValue(String value) { - for (ScaOnApprovalEnum b : ScaOnApprovalEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - } - - public static final String JSON_PROPERTY_SCA_ON_APPROVAL = "scaOnApproval"; - private ScaOnApprovalEnum scaOnApproval; - public TransferReview() { } - /** - * Shows the number of approvals completed for the transfer. - * - * @param numberOfApprovalsCompleted - * @return the current {@code TransferReview} instance, allowing for method chaining - */ - public TransferReview numberOfApprovalsCompleted(Integer numberOfApprovalsCompleted) { - this.numberOfApprovalsCompleted = numberOfApprovalsCompleted; - return this; - } - - /** - * Shows the number of approvals completed for the transfer. - * @return numberOfApprovalsCompleted - */ - @ApiModelProperty(value = "Shows the number of approvals completed for the transfer.") - @JsonProperty(JSON_PROPERTY_NUMBER_OF_APPROVALS_COMPLETED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Integer getNumberOfApprovalsCompleted() { - return numberOfApprovalsCompleted; - } - - /** - * Shows the number of approvals completed for the transfer. - * - * @param numberOfApprovalsCompleted - */ - @JsonProperty(JSON_PROPERTY_NUMBER_OF_APPROVALS_COMPLETED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setNumberOfApprovalsCompleted(Integer numberOfApprovalsCompleted) { - this.numberOfApprovalsCompleted = numberOfApprovalsCompleted; - } - /** * Shows the number of [approvals](https://docs.adyen.com/api-explorer/transfers/latest/post/transfers/approve) required to process the transfer. * @@ -152,39 +74,6 @@ public void setNumberOfApprovalsRequired(Integer numberOfApprovalsRequired) { this.numberOfApprovalsRequired = numberOfApprovalsRequired; } - /** - * Shows the status of the Strong Customer Authentication (SCA) process. Possible values: **required**, **completed**, **notApplicable**. - * - * @param scaOnApproval - * @return the current {@code TransferReview} instance, allowing for method chaining - */ - public TransferReview scaOnApproval(ScaOnApprovalEnum scaOnApproval) { - this.scaOnApproval = scaOnApproval; - return this; - } - - /** - * Shows the status of the Strong Customer Authentication (SCA) process. Possible values: **required**, **completed**, **notApplicable**. - * @return scaOnApproval - */ - @ApiModelProperty(value = "Shows the status of the Strong Customer Authentication (SCA) process. Possible values: **required**, **completed**, **notApplicable**.") - @JsonProperty(JSON_PROPERTY_SCA_ON_APPROVAL) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public ScaOnApprovalEnum getScaOnApproval() { - return scaOnApproval; - } - - /** - * Shows the status of the Strong Customer Authentication (SCA) process. Possible values: **required**, **completed**, **notApplicable**. - * - * @param scaOnApproval - */ - @JsonProperty(JSON_PROPERTY_SCA_ON_APPROVAL) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setScaOnApproval(ScaOnApprovalEnum scaOnApproval) { - this.scaOnApproval = scaOnApproval; - } - /** * Return true if this TransferReview object is equal to o. */ @@ -197,23 +86,19 @@ public boolean equals(Object o) { return false; } TransferReview transferReview = (TransferReview) o; - return Objects.equals(this.numberOfApprovalsCompleted, transferReview.numberOfApprovalsCompleted) && - Objects.equals(this.numberOfApprovalsRequired, transferReview.numberOfApprovalsRequired) && - Objects.equals(this.scaOnApproval, transferReview.scaOnApproval); + return Objects.equals(this.numberOfApprovalsRequired, transferReview.numberOfApprovalsRequired); } @Override public int hashCode() { - return Objects.hash(numberOfApprovalsCompleted, numberOfApprovalsRequired, scaOnApproval); + return Objects.hash(numberOfApprovalsRequired); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class TransferReview {\n"); - sb.append(" numberOfApprovalsCompleted: ").append(toIndentedString(numberOfApprovalsCompleted)).append("\n"); sb.append(" numberOfApprovalsRequired: ").append(toIndentedString(numberOfApprovalsRequired)).append("\n"); - sb.append(" scaOnApproval: ").append(toIndentedString(scaOnApproval)).append("\n"); sb.append("}"); return sb.toString(); } diff --git a/src/main/java/com/adyen/model/transferwebhooks/TransferReview.java b/src/main/java/com/adyen/model/transferwebhooks/TransferReview.java index 2e7e85e07..3039f7d56 100644 --- a/src/main/java/com/adyen/model/transferwebhooks/TransferReview.java +++ b/src/main/java/com/adyen/model/transferwebhooks/TransferReview.java @@ -31,94 +31,16 @@ * TransferReview */ @JsonPropertyOrder({ - TransferReview.JSON_PROPERTY_NUMBER_OF_APPROVALS_COMPLETED, - TransferReview.JSON_PROPERTY_NUMBER_OF_APPROVALS_REQUIRED, - TransferReview.JSON_PROPERTY_SCA_ON_APPROVAL + TransferReview.JSON_PROPERTY_NUMBER_OF_APPROVALS_REQUIRED }) public class TransferReview { - public static final String JSON_PROPERTY_NUMBER_OF_APPROVALS_COMPLETED = "numberOfApprovalsCompleted"; - private Integer numberOfApprovalsCompleted; - public static final String JSON_PROPERTY_NUMBER_OF_APPROVALS_REQUIRED = "numberOfApprovalsRequired"; private Integer numberOfApprovalsRequired; - /** - * Shows the status of the Strong Customer Authentication (SCA) process. Possible values: **required**, **completed**, **notApplicable**. - */ - public enum ScaOnApprovalEnum { - COMPLETED("completed"), - - NOTAPPLICABLE("notApplicable"), - - REQUIRED("required"); - - private String value; - - ScaOnApprovalEnum(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static ScaOnApprovalEnum fromValue(String value) { - for (ScaOnApprovalEnum b : ScaOnApprovalEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - } - - public static final String JSON_PROPERTY_SCA_ON_APPROVAL = "scaOnApproval"; - private ScaOnApprovalEnum scaOnApproval; - public TransferReview() { } - /** - * Shows the number of approvals completed for the transfer. - * - * @param numberOfApprovalsCompleted - * @return the current {@code TransferReview} instance, allowing for method chaining - */ - public TransferReview numberOfApprovalsCompleted(Integer numberOfApprovalsCompleted) { - this.numberOfApprovalsCompleted = numberOfApprovalsCompleted; - return this; - } - - /** - * Shows the number of approvals completed for the transfer. - * @return numberOfApprovalsCompleted - */ - @ApiModelProperty(value = "Shows the number of approvals completed for the transfer.") - @JsonProperty(JSON_PROPERTY_NUMBER_OF_APPROVALS_COMPLETED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Integer getNumberOfApprovalsCompleted() { - return numberOfApprovalsCompleted; - } - - /** - * Shows the number of approvals completed for the transfer. - * - * @param numberOfApprovalsCompleted - */ - @JsonProperty(JSON_PROPERTY_NUMBER_OF_APPROVALS_COMPLETED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setNumberOfApprovalsCompleted(Integer numberOfApprovalsCompleted) { - this.numberOfApprovalsCompleted = numberOfApprovalsCompleted; - } - /** * Shows the number of [approvals](https://docs.adyen.com/api-explorer/transfers/latest/post/transfers/approve) required to process the transfer. * @@ -152,39 +74,6 @@ public void setNumberOfApprovalsRequired(Integer numberOfApprovalsRequired) { this.numberOfApprovalsRequired = numberOfApprovalsRequired; } - /** - * Shows the status of the Strong Customer Authentication (SCA) process. Possible values: **required**, **completed**, **notApplicable**. - * - * @param scaOnApproval - * @return the current {@code TransferReview} instance, allowing for method chaining - */ - public TransferReview scaOnApproval(ScaOnApprovalEnum scaOnApproval) { - this.scaOnApproval = scaOnApproval; - return this; - } - - /** - * Shows the status of the Strong Customer Authentication (SCA) process. Possible values: **required**, **completed**, **notApplicable**. - * @return scaOnApproval - */ - @ApiModelProperty(value = "Shows the status of the Strong Customer Authentication (SCA) process. Possible values: **required**, **completed**, **notApplicable**.") - @JsonProperty(JSON_PROPERTY_SCA_ON_APPROVAL) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public ScaOnApprovalEnum getScaOnApproval() { - return scaOnApproval; - } - - /** - * Shows the status of the Strong Customer Authentication (SCA) process. Possible values: **required**, **completed**, **notApplicable**. - * - * @param scaOnApproval - */ - @JsonProperty(JSON_PROPERTY_SCA_ON_APPROVAL) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setScaOnApproval(ScaOnApprovalEnum scaOnApproval) { - this.scaOnApproval = scaOnApproval; - } - /** * Return true if this TransferReview object is equal to o. */ @@ -197,23 +86,19 @@ public boolean equals(Object o) { return false; } TransferReview transferReview = (TransferReview) o; - return Objects.equals(this.numberOfApprovalsCompleted, transferReview.numberOfApprovalsCompleted) && - Objects.equals(this.numberOfApprovalsRequired, transferReview.numberOfApprovalsRequired) && - Objects.equals(this.scaOnApproval, transferReview.scaOnApproval); + return Objects.equals(this.numberOfApprovalsRequired, transferReview.numberOfApprovalsRequired); } @Override public int hashCode() { - return Objects.hash(numberOfApprovalsCompleted, numberOfApprovalsRequired, scaOnApproval); + return Objects.hash(numberOfApprovalsRequired); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class TransferReview {\n"); - sb.append(" numberOfApprovalsCompleted: ").append(toIndentedString(numberOfApprovalsCompleted)).append("\n"); sb.append(" numberOfApprovalsRequired: ").append(toIndentedString(numberOfApprovalsRequired)).append("\n"); - sb.append(" scaOnApproval: ").append(toIndentedString(scaOnApproval)).append("\n"); sb.append("}"); return sb.toString(); } diff --git a/src/main/java/com/adyen/service/balanceplatform/GrantAccountsApi.java b/src/main/java/com/adyen/service/balanceplatform/GrantAccountsApi.java index 17a8407e1..79c449375 100644 --- a/src/main/java/com/adyen/service/balanceplatform/GrantAccountsApi.java +++ b/src/main/java/com/adyen/service/balanceplatform/GrantAccountsApi.java @@ -56,7 +56,10 @@ public GrantAccountsApi(Client client, String baseURL) { * @param id {@link String } The unique identifier of the grant account. (required) * @return {@link CapitalGrantAccount } * @throws ApiException if fails to make API call + * @deprecated since Configuration API v2 + * Use the `/grantAccounts/{id}` endpoint from the [Capital API](https://docs.adyen.com/api-explorer/capital/latest/get/grantAccounts/(id)) instead. */ + @Deprecated public CapitalGrantAccount getGrantAccount(String id) throws ApiException, IOException { return getGrantAccount(id, null); } @@ -68,7 +71,10 @@ public CapitalGrantAccount getGrantAccount(String id) throws ApiException, IOExc * @param requestOptions {@link RequestOptions } Object to store additional data such as idempotency-keys (optional) * @return {@link CapitalGrantAccount } * @throws ApiException if fails to make API call + * @deprecated since Configuration API v2 + * Use the `/grantAccounts/{id}` endpoint from the [Capital API](https://docs.adyen.com/api-explorer/capital/latest/get/grantAccounts/(id)) instead. */ + @Deprecated public CapitalGrantAccount getGrantAccount(String id, RequestOptions requestOptions) throws ApiException, IOException { //Add path params Map pathParams = new HashMap<>(); diff --git a/src/main/java/com/adyen/service/balanceplatform/GrantOffersApi.java b/src/main/java/com/adyen/service/balanceplatform/GrantOffersApi.java index 11a0af843..ef6deb842 100644 --- a/src/main/java/com/adyen/service/balanceplatform/GrantOffersApi.java +++ b/src/main/java/com/adyen/service/balanceplatform/GrantOffersApi.java @@ -57,7 +57,10 @@ public GrantOffersApi(Client client, String baseURL) { * @param accountHolderId {@link String } 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 API](https://docs.adyen.com/api-explorer/capital/latest/get/grantOffers) instead. */ + @Deprecated public GrantOffers getAllAvailableGrantOffers(String accountHolderId) throws ApiException, IOException { return getAllAvailableGrantOffers(accountHolderId, null); } @@ -69,7 +72,10 @@ public GrantOffers getAllAvailableGrantOffers(String accountHolderId) throws Api * @param requestOptions {@link RequestOptions } Object to store additional data such as idempotency-keys (optional) * @return {@link GrantOffers } * @throws ApiException if fails to make API call + * @deprecated since Configuration API v2 + * Use the `/grantOffers` endpoint from the [Capital API](https://docs.adyen.com/api-explorer/capital/latest/get/grantOffers) instead. */ + @Deprecated public GrantOffers getAllAvailableGrantOffers(String accountHolderId, RequestOptions requestOptions) throws ApiException, IOException { //Add query params Map queryParams = new HashMap<>(); @@ -89,7 +95,10 @@ public GrantOffers getAllAvailableGrantOffers(String accountHolderId, RequestOpt * @param grantOfferId {@link String } The unique identifier of the grant offer. (required) * @return {@link GrantOffer } * @throws ApiException if fails to make API call + * @deprecated since Configuration API v2 + * Use the `/grantOffers/{id}` endpoint from the [Capital API](https://docs.adyen.com/api-explorer/capital/latest/get/grantOffers/(id)) instead. */ + @Deprecated public GrantOffer getGrantOffer(String grantOfferId) throws ApiException, IOException { return getGrantOffer(grantOfferId, null); } @@ -101,7 +110,10 @@ public GrantOffer getGrantOffer(String grantOfferId) throws ApiException, IOExce * @param requestOptions {@link RequestOptions } Object to store additional data such as idempotency-keys (optional) * @return {@link GrantOffer } * @throws ApiException if fails to make API call + * @deprecated since Configuration API v2 + * Use the `/grantOffers/{id}` endpoint from the [Capital API](https://docs.adyen.com/api-explorer/capital/latest/get/grantOffers/(id)) instead. */ + @Deprecated public GrantOffer getGrantOffer(String grantOfferId, RequestOptions requestOptions) throws ApiException, IOException { //Add path params Map pathParams = new HashMap<>(); diff --git a/src/main/java/com/adyen/service/balanceplatform/ManageScaDevicesApi.java b/src/main/java/com/adyen/service/balanceplatform/ManageScaDevicesApi.java index 6d46acefd..ce0b3888e 100644 --- a/src/main/java/com/adyen/service/balanceplatform/ManageScaDevicesApi.java +++ b/src/main/java/com/adyen/service/balanceplatform/ManageScaDevicesApi.java @@ -14,6 +14,10 @@ import com.adyen.Client; import com.adyen.Service; import com.adyen.constants.ApiConstants; +import com.adyen.model.balanceplatform.AssociationFinaliseRequest; +import com.adyen.model.balanceplatform.AssociationFinaliseResponse; +import com.adyen.model.balanceplatform.AssociationInitiateRequest; +import com.adyen.model.balanceplatform.AssociationInitiateResponse; import com.adyen.model.balanceplatform.RegisterSCAFinalResponse; import com.adyen.model.balanceplatform.RegisterSCARequest; import com.adyen.model.balanceplatform.RegisterSCAResponse; @@ -53,6 +57,41 @@ public ManageScaDevicesApi(Client client, String baseURL) { this.baseURL = baseURL; } + /** + * Complete an association between an SCA device and a resource + * + * @param deviceId {@link String } The unique identifier of the SCA device that you are associating with a resource. (required) + * @param associationFinaliseRequest {@link AssociationFinaliseRequest } (required) + * @return {@link AssociationFinaliseResponse } + * @throws ApiException if fails to make API call + */ + public AssociationFinaliseResponse completeAssociationBetweenScaDeviceAndResource(String deviceId, AssociationFinaliseRequest associationFinaliseRequest) throws ApiException, IOException { + return completeAssociationBetweenScaDeviceAndResource(deviceId, associationFinaliseRequest, null); + } + + /** + * Complete an association between an SCA device and a resource + * + * @param deviceId {@link String } The unique identifier of the SCA device that you are associating with a resource. (required) + * @param associationFinaliseRequest {@link AssociationFinaliseRequest } (required) + * @param requestOptions {@link RequestOptions } Object to store additional data such as idempotency-keys (optional) + * @return {@link AssociationFinaliseResponse } + * @throws ApiException if fails to make API call + */ + public AssociationFinaliseResponse completeAssociationBetweenScaDeviceAndResource(String deviceId, AssociationFinaliseRequest associationFinaliseRequest, 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 = associationFinaliseRequest.toJson(); + Resource resource = new Resource(this, this.baseURL + "/registeredDevices/{deviceId}/associations", null); + String jsonResult = resource.request(requestBody, requestOptions, ApiConstants.HttpMethod.PATCH, pathParams); + return AssociationFinaliseResponse.fromJson(jsonResult); + } + /** * Complete the registration of an SCA device * @@ -125,6 +164,41 @@ public void deleteRegistrationOfScaDevice(String id, String paymentInstrumentId, resource.request(requestBody, requestOptions, ApiConstants.HttpMethod.DELETE, pathParams, queryParams); } + /** + * Initiate an association between an SCA device and a resource + * + * @param deviceId {@link String } The unique identifier of the SCA device that you are associating with a resource. (required) + * @param associationInitiateRequest {@link AssociationInitiateRequest } (required) + * @return {@link AssociationInitiateResponse } + * @throws ApiException if fails to make API call + */ + public AssociationInitiateResponse initiateAssociationBetweenScaDeviceAndResource(String deviceId, AssociationInitiateRequest associationInitiateRequest) throws ApiException, IOException { + return initiateAssociationBetweenScaDeviceAndResource(deviceId, associationInitiateRequest, null); + } + + /** + * Initiate an association between an SCA device and a resource + * + * @param deviceId {@link String } The unique identifier of the SCA device that you are associating with a resource. (required) + * @param associationInitiateRequest {@link AssociationInitiateRequest } (required) + * @param requestOptions {@link RequestOptions } Object to store additional data such as idempotency-keys (optional) + * @return {@link AssociationInitiateResponse } + * @throws ApiException if fails to make API call + */ + public AssociationInitiateResponse initiateAssociationBetweenScaDeviceAndResource(String deviceId, AssociationInitiateRequest associationInitiateRequest, 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 = associationInitiateRequest.toJson(); + Resource resource = new Resource(this, this.baseURL + "/registeredDevices/{deviceId}/associations", null); + String jsonResult = resource.request(requestBody, requestOptions, ApiConstants.HttpMethod.POST, pathParams); + return AssociationInitiateResponse.fromJson(jsonResult); + } + /** * Initiate the registration of an SCA device * diff --git a/src/main/java/com/adyen/service/transfers/CapitalApi.java b/src/main/java/com/adyen/service/transfers/CapitalApi.java index 542c92c6c..d502f4636 100644 --- a/src/main/java/com/adyen/service/transfers/CapitalApi.java +++ b/src/main/java/com/adyen/service/transfers/CapitalApi.java @@ -57,7 +57,10 @@ public CapitalApi(Client client, String baseURL) { * * @return {@link CapitalGrants } * @throws ApiException if fails to make API call + * @deprecated since Transfers API v4 + * Use the `/grants` endpoint from the [Capital API](https://docs.adyen.com/api-explorer/capital/latest/get/grants) instead. */ + @Deprecated public CapitalGrants getCapitalAccount() throws ApiException, IOException { return getCapitalAccount(null, null); } @@ -69,7 +72,10 @@ public CapitalGrants getCapitalAccount() throws ApiException, IOException { * @param requestOptions {@link RequestOptions } Object to store additional data such as idempotency-keys (optional) * @return {@link CapitalGrants } * @throws ApiException if fails to make API call + * @deprecated since Transfers API v4 + * Use the `/grants` endpoint from the [Capital API](https://docs.adyen.com/api-explorer/capital/latest/get/grants) instead. */ + @Deprecated public CapitalGrants getCapitalAccount(String counterpartyAccountHolderId, RequestOptions requestOptions) throws ApiException, IOException { //Add query params Map queryParams = new HashMap<>(); @@ -89,7 +95,10 @@ public CapitalGrants getCapitalAccount(String counterpartyAccountHolderId, Reque * @param id {@link String } The unique identifier of the grant. (required) * @return {@link CapitalGrant } * @throws ApiException if fails to make API call + * @deprecated since Transfers API v4 + * Use the `/grants/{grantId}` endpoint from the [Capital API](https://docs.adyen.com/api-explorer/capital/latest/get/grants/(grantId)) instead. */ + @Deprecated public CapitalGrant getGrantReferenceDetails(String id) throws ApiException, IOException { return getGrantReferenceDetails(id, null); } @@ -101,7 +110,10 @@ public CapitalGrant getGrantReferenceDetails(String id) throws ApiException, IOE * @param requestOptions {@link RequestOptions } Object to store additional data such as idempotency-keys (optional) * @return {@link CapitalGrant } * @throws ApiException if fails to make API call + * @deprecated since Transfers API v4 + * Use the `/grants/{grantId}` endpoint from the [Capital API](https://docs.adyen.com/api-explorer/capital/latest/get/grants/(grantId)) instead. */ + @Deprecated public CapitalGrant getGrantReferenceDetails(String id, RequestOptions requestOptions) throws ApiException, IOException { //Add path params Map pathParams = new HashMap<>(); @@ -122,7 +134,10 @@ public CapitalGrant getGrantReferenceDetails(String id, RequestOptions requestOp * @param capitalGrantInfo {@link CapitalGrantInfo } (required) * @return {@link CapitalGrant } * @throws ApiException if fails to make API call + * @deprecated since Transfers API v4 + * Use the `/grants` endpoint from the [Capital API](https://docs.adyen.com/api-explorer/capital/latest/post/grants) instead. */ + @Deprecated public CapitalGrant requestGrantPayout(CapitalGrantInfo capitalGrantInfo) throws ApiException, IOException { return requestGrantPayout(capitalGrantInfo, null); } @@ -134,7 +149,10 @@ public CapitalGrant requestGrantPayout(CapitalGrantInfo capitalGrantInfo) throws * @param requestOptions {@link RequestOptions } Object to store additional data such as idempotency-keys (optional) * @return {@link CapitalGrant } * @throws ApiException if fails to make API call + * @deprecated since Transfers API v4 + * Use the `/grants` endpoint from the [Capital API](https://docs.adyen.com/api-explorer/capital/latest/post/grants) instead. */ + @Deprecated public CapitalGrant requestGrantPayout(CapitalGrantInfo capitalGrantInfo, RequestOptions requestOptions) throws ApiException, IOException { String requestBody = capitalGrantInfo.toJson();