Skip to content

Commit bc74fd9

Browse files
authored
Add PaymentsAppApi, DisputesApi, DataProtectionApi (#1467)
* Generate PaymentsAppApi * Deprecate old PaymensAppApi * Generate DisputesApi * Deprecate old DisputesApi * Updates test to use new DisputesApi * Generate DataProtection API * Deprecate former DataProtectionApi * Update tests to use new DataProtectionApi
1 parent ca16981 commit bc74fd9

35 files changed

+908
-416
lines changed

src/main/java/com/adyen/model/dataprotection/AbstractOpenApiSchema.java

+7-4
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
package com.adyen.model.dataprotection;
1414

1515
import java.util.Objects;
16-
import java.lang.reflect.Type;
1716
import java.util.Map;
1817
import jakarta.ws.rs.core.GenericType;
1918

@@ -22,7 +21,6 @@
2221
/**
2322
* Abstract class for oneOf,anyOf schemas defined in OpenAPI spec
2423
*/
25-
2624
public abstract class AbstractOpenApiSchema {
2725

2826
// store the actual instance of the schema/object
@@ -34,6 +32,11 @@ public abstract class AbstractOpenApiSchema {
3432
// schema type (e.g. oneOf, anyOf)
3533
private final String schemaType;
3634

35+
/**
36+
*
37+
* @param schemaType the schema type
38+
* @param isNullable whether the instance is nullable
39+
*/
3740
public AbstractOpenApiSchema(String schemaType, Boolean isNullable) {
3841
this.schemaType = schemaType;
3942
this.isNullable = isNullable;
@@ -44,7 +47,7 @@ public AbstractOpenApiSchema(String schemaType, Boolean isNullable) {
4447
*
4548
* @return an instance of the actual schema/object
4649
*/
47-
public abstract Map<String, GenericType> getSchemas();
50+
public abstract Map<String, GenericType<?>> getSchemas();
4851

4952
/**
5053
* Get the actual instance
@@ -144,4 +147,4 @@ public Boolean isNullable() {
144147

145148

146149

147-
}
150+
}

src/main/java/com/adyen/model/dataprotection/ServiceError.java

+21-28
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,14 @@
1313
package com.adyen.model.dataprotection;
1414

1515
import java.util.Objects;
16-
import java.util.Arrays;
1716
import java.util.Map;
1817
import java.util.HashMap;
1918
import com.fasterxml.jackson.annotation.JsonInclude;
2019
import com.fasterxml.jackson.annotation.JsonProperty;
2120
import com.fasterxml.jackson.annotation.JsonCreator;
2221
import com.fasterxml.jackson.annotation.JsonTypeName;
2322
import com.fasterxml.jackson.annotation.JsonValue;
24-
import io.swagger.annotations.ApiModel;
25-
import io.swagger.annotations.ApiModelProperty;
23+
import java.util.Arrays;
2624
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
2725
import com.fasterxml.jackson.core.JsonProcessingException;
2826

@@ -60,7 +58,7 @@ public ServiceError() {
6058
/**
6159
* The error code mapped to the error message.
6260
*
63-
* @param errorCode
61+
* @param errorCode The error code mapped to the error message.
6462
* @return the current {@code ServiceError} instance, allowing for method chaining
6563
*/
6664
public ServiceError errorCode(String errorCode) {
@@ -70,9 +68,8 @@ public ServiceError errorCode(String errorCode) {
7068

7169
/**
7270
* The error code mapped to the error message.
73-
* @return errorCode
71+
* @return errorCode The error code mapped to the error message.
7472
*/
75-
@ApiModelProperty(value = "The error code mapped to the error message.")
7673
@JsonProperty(JSON_PROPERTY_ERROR_CODE)
7774
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
7875
public String getErrorCode() {
@@ -82,8 +79,8 @@ public String getErrorCode() {
8279
/**
8380
* The error code mapped to the error message.
8481
*
85-
* @param errorCode
86-
*/
82+
* @param errorCode The error code mapped to the error message.
83+
*/
8784
@JsonProperty(JSON_PROPERTY_ERROR_CODE)
8885
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
8986
public void setErrorCode(String errorCode) {
@@ -93,7 +90,7 @@ public void setErrorCode(String errorCode) {
9390
/**
9491
* The category of the error.
9592
*
96-
* @param errorType
93+
* @param errorType The category of the error.
9794
* @return the current {@code ServiceError} instance, allowing for method chaining
9895
*/
9996
public ServiceError errorType(String errorType) {
@@ -103,9 +100,8 @@ public ServiceError errorType(String errorType) {
103100

104101
/**
105102
* The category of the error.
106-
* @return errorType
103+
* @return errorType The category of the error.
107104
*/
108-
@ApiModelProperty(value = "The category of the error.")
109105
@JsonProperty(JSON_PROPERTY_ERROR_TYPE)
110106
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
111107
public String getErrorType() {
@@ -115,8 +111,8 @@ public String getErrorType() {
115111
/**
116112
* The category of the error.
117113
*
118-
* @param errorType
119-
*/
114+
* @param errorType The category of the error.
115+
*/
120116
@JsonProperty(JSON_PROPERTY_ERROR_TYPE)
121117
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
122118
public void setErrorType(String errorType) {
@@ -126,7 +122,7 @@ public void setErrorType(String errorType) {
126122
/**
127123
* A short explanation of the issue.
128124
*
129-
* @param message
125+
* @param message A short explanation of the issue.
130126
* @return the current {@code ServiceError} instance, allowing for method chaining
131127
*/
132128
public ServiceError message(String message) {
@@ -136,9 +132,8 @@ public ServiceError message(String message) {
136132

137133
/**
138134
* A short explanation of the issue.
139-
* @return message
135+
* @return message A short explanation of the issue.
140136
*/
141-
@ApiModelProperty(value = "A short explanation of the issue.")
142137
@JsonProperty(JSON_PROPERTY_MESSAGE)
143138
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
144139
public String getMessage() {
@@ -148,8 +143,8 @@ public String getMessage() {
148143
/**
149144
* A short explanation of the issue.
150145
*
151-
* @param message
152-
*/
146+
* @param message A short explanation of the issue.
147+
*/
153148
@JsonProperty(JSON_PROPERTY_MESSAGE)
154149
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
155150
public void setMessage(String message) {
@@ -159,7 +154,7 @@ public void setMessage(String message) {
159154
/**
160155
* The PSP reference of the payment.
161156
*
162-
* @param pspReference
157+
* @param pspReference The PSP reference of the payment.
163158
* @return the current {@code ServiceError} instance, allowing for method chaining
164159
*/
165160
public ServiceError pspReference(String pspReference) {
@@ -169,9 +164,8 @@ public ServiceError pspReference(String pspReference) {
169164

170165
/**
171166
* The PSP reference of the payment.
172-
* @return pspReference
167+
* @return pspReference The PSP reference of the payment.
173168
*/
174-
@ApiModelProperty(value = "The PSP reference of the payment.")
175169
@JsonProperty(JSON_PROPERTY_PSP_REFERENCE)
176170
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
177171
public String getPspReference() {
@@ -181,8 +175,8 @@ public String getPspReference() {
181175
/**
182176
* The PSP reference of the payment.
183177
*
184-
* @param pspReference
185-
*/
178+
* @param pspReference The PSP reference of the payment.
179+
*/
186180
@JsonProperty(JSON_PROPERTY_PSP_REFERENCE)
187181
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
188182
public void setPspReference(String pspReference) {
@@ -192,7 +186,7 @@ public void setPspReference(String pspReference) {
192186
/**
193187
* The HTTP response status.
194188
*
195-
* @param status
189+
* @param status The HTTP response status.
196190
* @return the current {@code ServiceError} instance, allowing for method chaining
197191
*/
198192
public ServiceError status(Integer status) {
@@ -202,9 +196,8 @@ public ServiceError status(Integer status) {
202196

203197
/**
204198
* The HTTP response status.
205-
* @return status
199+
* @return status The HTTP response status.
206200
*/
207-
@ApiModelProperty(value = "The HTTP response status.")
208201
@JsonProperty(JSON_PROPERTY_STATUS)
209202
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
210203
public Integer getStatus() {
@@ -214,8 +207,8 @@ public Integer getStatus() {
214207
/**
215208
* The HTTP response status.
216209
*
217-
* @param status
218-
*/
210+
* @param status The HTTP response status.
211+
*/
219212
@JsonProperty(JSON_PROPERTY_STATUS)
220213
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
221214
public void setStatus(Integer status) {

src/main/java/com/adyen/model/dataprotection/SubjectErasureByPspReferenceRequest.java

+13-18
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,14 @@
1313
package com.adyen.model.dataprotection;
1414

1515
import java.util.Objects;
16-
import java.util.Arrays;
1716
import java.util.Map;
1817
import java.util.HashMap;
1918
import com.fasterxml.jackson.annotation.JsonInclude;
2019
import com.fasterxml.jackson.annotation.JsonProperty;
2120
import com.fasterxml.jackson.annotation.JsonCreator;
2221
import com.fasterxml.jackson.annotation.JsonTypeName;
2322
import com.fasterxml.jackson.annotation.JsonValue;
24-
import io.swagger.annotations.ApiModel;
25-
import io.swagger.annotations.ApiModelProperty;
23+
import java.util.Arrays;
2624
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
2725
import com.fasterxml.jackson.core.JsonProcessingException;
2826

@@ -52,7 +50,7 @@ public SubjectErasureByPspReferenceRequest() {
5250
/**
5351
* Set this to **true** if you want to delete shopper-related data, even if the shopper has an existing recurring transaction. This only deletes the shopper-related data for the specific payment, but does not cancel the existing recurring transaction.
5452
*
55-
* @param forceErasure
53+
* @param forceErasure Set this to **true** if you want to delete shopper-related data, even if the shopper has an existing recurring transaction. This only deletes the shopper-related data for the specific payment, but does not cancel the existing recurring transaction.
5654
* @return the current {@code SubjectErasureByPspReferenceRequest} instance, allowing for method chaining
5755
*/
5856
public SubjectErasureByPspReferenceRequest forceErasure(Boolean forceErasure) {
@@ -62,9 +60,8 @@ public SubjectErasureByPspReferenceRequest forceErasure(Boolean forceErasure) {
6260

6361
/**
6462
* Set this to **true** if you want to delete shopper-related data, even if the shopper has an existing recurring transaction. This only deletes the shopper-related data for the specific payment, but does not cancel the existing recurring transaction.
65-
* @return forceErasure
63+
* @return forceErasure Set this to **true** if you want to delete shopper-related data, even if the shopper has an existing recurring transaction. This only deletes the shopper-related data for the specific payment, but does not cancel the existing recurring transaction.
6664
*/
67-
@ApiModelProperty(value = "Set this to **true** if you want to delete shopper-related data, even if the shopper has an existing recurring transaction. This only deletes the shopper-related data for the specific payment, but does not cancel the existing recurring transaction.")
6865
@JsonProperty(JSON_PROPERTY_FORCE_ERASURE)
6966
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
7067
public Boolean getForceErasure() {
@@ -74,8 +71,8 @@ public Boolean getForceErasure() {
7471
/**
7572
* Set this to **true** if you want to delete shopper-related data, even if the shopper has an existing recurring transaction. This only deletes the shopper-related data for the specific payment, but does not cancel the existing recurring transaction.
7673
*
77-
* @param forceErasure
78-
*/
74+
* @param forceErasure Set this to **true** if you want to delete shopper-related data, even if the shopper has an existing recurring transaction. This only deletes the shopper-related data for the specific payment, but does not cancel the existing recurring transaction.
75+
*/
7976
@JsonProperty(JSON_PROPERTY_FORCE_ERASURE)
8077
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
8178
public void setForceErasure(Boolean forceErasure) {
@@ -85,7 +82,7 @@ public void setForceErasure(Boolean forceErasure) {
8582
/**
8683
* Your merchant account
8784
*
88-
* @param merchantAccount
85+
* @param merchantAccount Your merchant account
8986
* @return the current {@code SubjectErasureByPspReferenceRequest} instance, allowing for method chaining
9087
*/
9188
public SubjectErasureByPspReferenceRequest merchantAccount(String merchantAccount) {
@@ -95,9 +92,8 @@ public SubjectErasureByPspReferenceRequest merchantAccount(String merchantAccoun
9592

9693
/**
9794
* Your merchant account
98-
* @return merchantAccount
95+
* @return merchantAccount Your merchant account
9996
*/
100-
@ApiModelProperty(value = "Your merchant account")
10197
@JsonProperty(JSON_PROPERTY_MERCHANT_ACCOUNT)
10298
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
10399
public String getMerchantAccount() {
@@ -107,8 +103,8 @@ public String getMerchantAccount() {
107103
/**
108104
* Your merchant account
109105
*
110-
* @param merchantAccount
111-
*/
106+
* @param merchantAccount Your merchant account
107+
*/
112108
@JsonProperty(JSON_PROPERTY_MERCHANT_ACCOUNT)
113109
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
114110
public void setMerchantAccount(String merchantAccount) {
@@ -118,7 +114,7 @@ public void setMerchantAccount(String merchantAccount) {
118114
/**
119115
* The PSP reference of the payment. We will delete all shopper-related data for this payment.
120116
*
121-
* @param pspReference
117+
* @param pspReference The PSP reference of the payment. We will delete all shopper-related data for this payment.
122118
* @return the current {@code SubjectErasureByPspReferenceRequest} instance, allowing for method chaining
123119
*/
124120
public SubjectErasureByPspReferenceRequest pspReference(String pspReference) {
@@ -128,9 +124,8 @@ public SubjectErasureByPspReferenceRequest pspReference(String pspReference) {
128124

129125
/**
130126
* The PSP reference of the payment. We will delete all shopper-related data for this payment.
131-
* @return pspReference
127+
* @return pspReference The PSP reference of the payment. We will delete all shopper-related data for this payment.
132128
*/
133-
@ApiModelProperty(value = "The PSP reference of the payment. We will delete all shopper-related data for this payment.")
134129
@JsonProperty(JSON_PROPERTY_PSP_REFERENCE)
135130
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
136131
public String getPspReference() {
@@ -140,8 +135,8 @@ public String getPspReference() {
140135
/**
141136
* The PSP reference of the payment. We will delete all shopper-related data for this payment.
142137
*
143-
* @param pspReference
144-
*/
138+
* @param pspReference The PSP reference of the payment. We will delete all shopper-related data for this payment.
139+
*/
145140
@JsonProperty(JSON_PROPERTY_PSP_REFERENCE)
146141
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
147142
public void setPspReference(String pspReference) {

src/main/java/com/adyen/model/dataprotection/SubjectErasureResponse.java

+9-12
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,14 @@
1313
package com.adyen.model.dataprotection;
1414

1515
import java.util.Objects;
16-
import java.util.Arrays;
1716
import java.util.Map;
1817
import java.util.HashMap;
1918
import com.fasterxml.jackson.annotation.JsonInclude;
2019
import com.fasterxml.jackson.annotation.JsonProperty;
2120
import com.fasterxml.jackson.annotation.JsonCreator;
2221
import com.fasterxml.jackson.annotation.JsonTypeName;
2322
import com.fasterxml.jackson.annotation.JsonValue;
24-
import io.swagger.annotations.ApiModel;
25-
import io.swagger.annotations.ApiModelProperty;
23+
import java.util.Arrays;
2624
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
2725
import com.fasterxml.jackson.core.JsonProcessingException;
2826

@@ -39,13 +37,13 @@ public class SubjectErasureResponse {
3937
* The result of this operation.
4038
*/
4139
public enum ResultEnum {
42-
ACTIVE_RECURRING_TOKEN_EXISTS("ACTIVE_RECURRING_TOKEN_EXISTS"),
40+
ACTIVE_RECURRING_TOKEN_EXISTS(String.valueOf("ACTIVE_RECURRING_TOKEN_EXISTS")),
4341

44-
ALREADY_PROCESSED("ALREADY_PROCESSED"),
42+
ALREADY_PROCESSED(String.valueOf("ALREADY_PROCESSED")),
4543

46-
PAYMENT_NOT_FOUND("PAYMENT_NOT_FOUND"),
44+
PAYMENT_NOT_FOUND(String.valueOf("PAYMENT_NOT_FOUND")),
4745

48-
SUCCESS("SUCCESS");
46+
SUCCESS(String.valueOf("SUCCESS"));
4947

5048
private String value;
5149

@@ -83,7 +81,7 @@ public SubjectErasureResponse() {
8381
/**
8482
* The result of this operation.
8583
*
86-
* @param result
84+
* @param result The result of this operation.
8785
* @return the current {@code SubjectErasureResponse} instance, allowing for method chaining
8886
*/
8987
public SubjectErasureResponse result(ResultEnum result) {
@@ -93,9 +91,8 @@ public SubjectErasureResponse result(ResultEnum result) {
9391

9492
/**
9593
* The result of this operation.
96-
* @return result
94+
* @return result The result of this operation.
9795
*/
98-
@ApiModelProperty(value = "The result of this operation.")
9996
@JsonProperty(JSON_PROPERTY_RESULT)
10097
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
10198
public ResultEnum getResult() {
@@ -105,8 +102,8 @@ public ResultEnum getResult() {
105102
/**
106103
* The result of this operation.
107104
*
108-
* @param result
109-
*/
105+
* @param result The result of this operation.
106+
*/
110107
@JsonProperty(JSON_PROPERTY_RESULT)
111108
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
112109
public void setResult(ResultEnum result) {

0 commit comments

Comments
 (0)