Skip to content

Commit ced34c6

Browse files
authored
OpenAPI Generator v7.11.0: Add BalanceControl API (#1468)
* Generate BalanceControl API * Deprecate former BalanceControlAPI * Update tests
1 parent bc74fd9 commit ced34c6

File tree

7 files changed

+196
-123
lines changed

7 files changed

+196
-123
lines changed

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

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
package com.adyen.model.balancecontrol;
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/balancecontrol/Amount.java

Lines changed: 15 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,14 @@
1313
package com.adyen.model.balancecontrol;
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

@@ -46,9 +44,9 @@ public Amount() {
4644
}
4745

4846
/**
49-
* The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes).
47+
* The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes#currency-codes).
5048
*
51-
* @param currency
49+
* @param currency The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes#currency-codes).
5250
* @return the current {@code Amount} instance, allowing for method chaining
5351
*/
5452
public Amount currency(String currency) {
@@ -57,31 +55,30 @@ public Amount currency(String currency) {
5755
}
5856

5957
/**
60-
* The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes).
61-
* @return currency
58+
* The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes#currency-codes).
59+
* @return currency The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes#currency-codes).
6260
*/
63-
@ApiModelProperty(required = true, value = "The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes).")
6461
@JsonProperty(JSON_PROPERTY_CURRENCY)
6562
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
6663
public String getCurrency() {
6764
return currency;
6865
}
6966

7067
/**
71-
* The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes).
68+
* The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes#currency-codes).
7269
*
73-
* @param currency
74-
*/
70+
* @param currency The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes#currency-codes).
71+
*/
7572
@JsonProperty(JSON_PROPERTY_CURRENCY)
7673
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
7774
public void setCurrency(String currency) {
7875
this.currency = currency;
7976
}
8077

8178
/**
82-
* The amount of the transaction, in [minor units](https://docs.adyen.com/development-resources/currency-codes).
79+
* The amount of the transaction, in [minor units](https://docs.adyen.com/development-resources/currency-codes#minor-units).
8380
*
84-
* @param value
81+
* @param value The amount of the transaction, in [minor units](https://docs.adyen.com/development-resources/currency-codes#minor-units).
8582
* @return the current {@code Amount} instance, allowing for method chaining
8683
*/
8784
public Amount value(Long value) {
@@ -90,21 +87,20 @@ public Amount value(Long value) {
9087
}
9188

9289
/**
93-
* The amount of the transaction, in [minor units](https://docs.adyen.com/development-resources/currency-codes).
94-
* @return value
90+
* The amount of the transaction, in [minor units](https://docs.adyen.com/development-resources/currency-codes#minor-units).
91+
* @return value The amount of the transaction, in [minor units](https://docs.adyen.com/development-resources/currency-codes#minor-units).
9592
*/
96-
@ApiModelProperty(required = true, value = "The amount of the transaction, in [minor units](https://docs.adyen.com/development-resources/currency-codes).")
9793
@JsonProperty(JSON_PROPERTY_VALUE)
9894
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
9995
public Long getValue() {
10096
return value;
10197
}
10298

10399
/**
104-
* The amount of the transaction, in [minor units](https://docs.adyen.com/development-resources/currency-codes).
100+
* The amount of the transaction, in [minor units](https://docs.adyen.com/development-resources/currency-codes#minor-units).
105101
*
106-
* @param value
107-
*/
102+
* @param value The amount of the transaction, in [minor units](https://docs.adyen.com/development-resources/currency-codes#minor-units).
103+
*/
108104
@JsonProperty(JSON_PROPERTY_VALUE)
109105
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
110106
public void setValue(Long value) {

src/main/java/com/adyen/model/balancecontrol/BalanceTransferRequest.java

Lines changed: 32 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
package com.adyen.model.balancecontrol;
1414

1515
import java.util.Objects;
16-
import java.util.Arrays;
1716
import java.util.Map;
1817
import java.util.HashMap;
1918
import com.adyen.model.balancecontrol.Amount;
@@ -22,8 +21,7 @@
2221
import com.fasterxml.jackson.annotation.JsonCreator;
2322
import com.fasterxml.jackson.annotation.JsonTypeName;
2423
import com.fasterxml.jackson.annotation.JsonValue;
25-
import io.swagger.annotations.ApiModel;
26-
import io.swagger.annotations.ApiModelProperty;
24+
import java.util.Arrays;
2725
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
2826
import com.fasterxml.jackson.core.JsonProcessingException;
2927

@@ -60,17 +58,17 @@ public class BalanceTransferRequest {
6058
* The type of balance transfer. Possible values: **tax**, **fee**, **terminalSale**, **credit**, **debit**, and **adjustment**.
6159
*/
6260
public enum TypeEnum {
63-
TAX("tax"),
61+
TAX(String.valueOf("tax")),
6462

65-
FEE("fee"),
63+
FEE(String.valueOf("fee")),
6664

67-
TERMINALSALE("terminalSale"),
65+
TERMINALSALE(String.valueOf("terminalSale")),
6866

69-
CREDIT("credit"),
67+
CREDIT(String.valueOf("credit")),
7068

71-
DEBIT("debit"),
69+
DEBIT(String.valueOf("debit")),
7270

73-
ADJUSTMENT("adjustment");
71+
ADJUSTMENT(String.valueOf("adjustment"));
7472

7573
private String value;
7674

@@ -108,7 +106,7 @@ public BalanceTransferRequest() {
108106
/**
109107
* amount
110108
*
111-
* @param amount
109+
* @param amount
112110
* @return the current {@code BalanceTransferRequest} instance, allowing for method chaining
113111
*/
114112
public BalanceTransferRequest amount(Amount amount) {
@@ -117,10 +115,9 @@ public BalanceTransferRequest amount(Amount amount) {
117115
}
118116

119117
/**
120-
* amount
121-
* @return amount
118+
* Get amount
119+
* @return amount
122120
*/
123-
@ApiModelProperty(required = true, value = "")
124121
@JsonProperty(JSON_PROPERTY_AMOUNT)
125122
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
126123
public Amount getAmount() {
@@ -130,8 +127,8 @@ public Amount getAmount() {
130127
/**
131128
* amount
132129
*
133-
* @param amount
134-
*/
130+
* @param amount
131+
*/
135132
@JsonProperty(JSON_PROPERTY_AMOUNT)
136133
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
137134
public void setAmount(Amount amount) {
@@ -141,7 +138,7 @@ public void setAmount(Amount amount) {
141138
/**
142139
* A human-readable description for the transfer. You can use alphanumeric characters and hyphens. We recommend sending a maximum of 140 characters, otherwise the description may be truncated.
143140
*
144-
* @param description
141+
* @param description A human-readable description for the transfer. You can use alphanumeric characters and hyphens. We recommend sending a maximum of 140 characters, otherwise the description may be truncated.
145142
* @return the current {@code BalanceTransferRequest} instance, allowing for method chaining
146143
*/
147144
public BalanceTransferRequest description(String description) {
@@ -151,9 +148,8 @@ public BalanceTransferRequest description(String description) {
151148

152149
/**
153150
* A human-readable description for the transfer. You can use alphanumeric characters and hyphens. We recommend sending a maximum of 140 characters, otherwise the description may be truncated.
154-
* @return description
151+
* @return description A human-readable description for the transfer. You can use alphanumeric characters and hyphens. We recommend sending a maximum of 140 characters, otherwise the description may be truncated.
155152
*/
156-
@ApiModelProperty(value = "A human-readable description for the transfer. You can use alphanumeric characters and hyphens. We recommend sending a maximum of 140 characters, otherwise the description may be truncated.")
157153
@JsonProperty(JSON_PROPERTY_DESCRIPTION)
158154
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
159155
public String getDescription() {
@@ -163,8 +159,8 @@ public String getDescription() {
163159
/**
164160
* A human-readable description for the transfer. You can use alphanumeric characters and hyphens. We recommend sending a maximum of 140 characters, otherwise the description may be truncated.
165161
*
166-
* @param description
167-
*/
162+
* @param description A human-readable description for the transfer. You can use alphanumeric characters and hyphens. We recommend sending a maximum of 140 characters, otherwise the description may be truncated.
163+
*/
168164
@JsonProperty(JSON_PROPERTY_DESCRIPTION)
169165
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
170166
public void setDescription(String description) {
@@ -174,7 +170,7 @@ public void setDescription(String description) {
174170
/**
175171
* The unique identifier of the source merchant account from which funds are deducted.
176172
*
177-
* @param fromMerchant
173+
* @param fromMerchant The unique identifier of the source merchant account from which funds are deducted.
178174
* @return the current {@code BalanceTransferRequest} instance, allowing for method chaining
179175
*/
180176
public BalanceTransferRequest fromMerchant(String fromMerchant) {
@@ -184,9 +180,8 @@ public BalanceTransferRequest fromMerchant(String fromMerchant) {
184180

185181
/**
186182
* The unique identifier of the source merchant account from which funds are deducted.
187-
* @return fromMerchant
183+
* @return fromMerchant The unique identifier of the source merchant account from which funds are deducted.
188184
*/
189-
@ApiModelProperty(required = true, value = "The unique identifier of the source merchant account from which funds are deducted.")
190185
@JsonProperty(JSON_PROPERTY_FROM_MERCHANT)
191186
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
192187
public String getFromMerchant() {
@@ -196,8 +191,8 @@ public String getFromMerchant() {
196191
/**
197192
* The unique identifier of the source merchant account from which funds are deducted.
198193
*
199-
* @param fromMerchant
200-
*/
194+
* @param fromMerchant The unique identifier of the source merchant account from which funds are deducted.
195+
*/
201196
@JsonProperty(JSON_PROPERTY_FROM_MERCHANT)
202197
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
203198
public void setFromMerchant(String fromMerchant) {
@@ -207,7 +202,7 @@ public void setFromMerchant(String fromMerchant) {
207202
/**
208203
* A reference for the balance transfer. If you don&#39;t provide this in the request, Adyen generates a unique reference. Maximum length: 80 characters.
209204
*
210-
* @param reference
205+
* @param reference A reference for the balance transfer. If you don&#39;t provide this in the request, Adyen generates a unique reference. Maximum length: 80 characters.
211206
* @return the current {@code BalanceTransferRequest} instance, allowing for method chaining
212207
*/
213208
public BalanceTransferRequest reference(String reference) {
@@ -217,9 +212,8 @@ public BalanceTransferRequest reference(String reference) {
217212

218213
/**
219214
* A reference for the balance transfer. If you don&#39;t provide this in the request, Adyen generates a unique reference. Maximum length: 80 characters.
220-
* @return reference
215+
* @return reference A reference for the balance transfer. If you don&#39;t provide this in the request, Adyen generates a unique reference. Maximum length: 80 characters.
221216
*/
222-
@ApiModelProperty(value = "A reference for the balance transfer. If you don't provide this in the request, Adyen generates a unique reference. Maximum length: 80 characters.")
223217
@JsonProperty(JSON_PROPERTY_REFERENCE)
224218
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
225219
public String getReference() {
@@ -229,8 +223,8 @@ public String getReference() {
229223
/**
230224
* A reference for the balance transfer. If you don&#39;t provide this in the request, Adyen generates a unique reference. Maximum length: 80 characters.
231225
*
232-
* @param reference
233-
*/
226+
* @param reference A reference for the balance transfer. If you don&#39;t provide this in the request, Adyen generates a unique reference. Maximum length: 80 characters.
227+
*/
234228
@JsonProperty(JSON_PROPERTY_REFERENCE)
235229
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
236230
public void setReference(String reference) {
@@ -240,7 +234,7 @@ public void setReference(String reference) {
240234
/**
241235
* The unique identifier of the destination merchant account from which funds are transferred.
242236
*
243-
* @param toMerchant
237+
* @param toMerchant The unique identifier of the destination merchant account from which funds are transferred.
244238
* @return the current {@code BalanceTransferRequest} instance, allowing for method chaining
245239
*/
246240
public BalanceTransferRequest toMerchant(String toMerchant) {
@@ -250,9 +244,8 @@ public BalanceTransferRequest toMerchant(String toMerchant) {
250244

251245
/**
252246
* The unique identifier of the destination merchant account from which funds are transferred.
253-
* @return toMerchant
247+
* @return toMerchant The unique identifier of the destination merchant account from which funds are transferred.
254248
*/
255-
@ApiModelProperty(required = true, value = "The unique identifier of the destination merchant account from which funds are transferred.")
256249
@JsonProperty(JSON_PROPERTY_TO_MERCHANT)
257250
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
258251
public String getToMerchant() {
@@ -262,8 +255,8 @@ public String getToMerchant() {
262255
/**
263256
* The unique identifier of the destination merchant account from which funds are transferred.
264257
*
265-
* @param toMerchant
266-
*/
258+
* @param toMerchant The unique identifier of the destination merchant account from which funds are transferred.
259+
*/
267260
@JsonProperty(JSON_PROPERTY_TO_MERCHANT)
268261
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
269262
public void setToMerchant(String toMerchant) {
@@ -273,7 +266,7 @@ public void setToMerchant(String toMerchant) {
273266
/**
274267
* The type of balance transfer. Possible values: **tax**, **fee**, **terminalSale**, **credit**, **debit**, and **adjustment**.
275268
*
276-
* @param type
269+
* @param type The type of balance transfer. Possible values: **tax**, **fee**, **terminalSale**, **credit**, **debit**, and **adjustment**.
277270
* @return the current {@code BalanceTransferRequest} instance, allowing for method chaining
278271
*/
279272
public BalanceTransferRequest type(TypeEnum type) {
@@ -283,9 +276,8 @@ public BalanceTransferRequest type(TypeEnum type) {
283276

284277
/**
285278
* The type of balance transfer. Possible values: **tax**, **fee**, **terminalSale**, **credit**, **debit**, and **adjustment**.
286-
* @return type
279+
* @return type The type of balance transfer. Possible values: **tax**, **fee**, **terminalSale**, **credit**, **debit**, and **adjustment**.
287280
*/
288-
@ApiModelProperty(required = true, value = "The type of balance transfer. Possible values: **tax**, **fee**, **terminalSale**, **credit**, **debit**, and **adjustment**.")
289281
@JsonProperty(JSON_PROPERTY_TYPE)
290282
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
291283
public TypeEnum getType() {
@@ -295,8 +287,8 @@ public TypeEnum getType() {
295287
/**
296288
* The type of balance transfer. Possible values: **tax**, **fee**, **terminalSale**, **credit**, **debit**, and **adjustment**.
297289
*
298-
* @param type
299-
*/
290+
* @param type The type of balance transfer. Possible values: **tax**, **fee**, **terminalSale**, **credit**, **debit**, and **adjustment**.
291+
*/
300292
@JsonProperty(JSON_PROPERTY_TYPE)
301293
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
302294
public void setType(TypeEnum type) {

0 commit comments

Comments
 (0)