Skip to content

Commit ca16981

Browse files
authored
RecurringApi generation with OpenAPI Generator v7.11.0 (#1466)
* Generate Recurring API * Deprecate old RecurringApi * Update test to use new RecurringApi * Update tests to use new BinLookUpApi
1 parent 7a36ac3 commit ca16981

30 files changed

+811
-709
lines changed

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

+8-5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Adyen Recurring API (deprecated)
2+
* Adyen Recurring API
33
*
44
* The version of the OpenAPI document: 68
55
*
@@ -13,7 +13,6 @@
1313
package com.adyen.model.recurring;
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/recurring/Address.java

+26-34
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Adyen Recurring API (deprecated)
2+
* Adyen Recurring API
33
*
44
* The version of the OpenAPI document: 68
55
*
@@ -13,16 +13,14 @@
1313
package com.adyen.model.recurring;
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

@@ -64,7 +62,7 @@ public Address() {
6462
/**
6563
* The name of the city. Maximum length: 3000 characters.
6664
*
67-
* @param city
65+
* @param city The name of the city. Maximum length: 3000 characters.
6866
* @return the current {@code Address} instance, allowing for method chaining
6967
*/
7068
public Address city(String city) {
@@ -74,9 +72,8 @@ public Address city(String city) {
7472

7573
/**
7674
* The name of the city. Maximum length: 3000 characters.
77-
* @return city
75+
* @return city The name of the city. Maximum length: 3000 characters.
7876
*/
79-
@ApiModelProperty(required = true, value = "The name of the city. Maximum length: 3000 characters.")
8077
@JsonProperty(JSON_PROPERTY_CITY)
8178
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
8279
public String getCity() {
@@ -86,8 +83,8 @@ public String getCity() {
8683
/**
8784
* The name of the city. Maximum length: 3000 characters.
8885
*
89-
* @param city
90-
*/
86+
* @param city The name of the city. Maximum length: 3000 characters.
87+
*/
9188
@JsonProperty(JSON_PROPERTY_CITY)
9289
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
9390
public void setCity(String city) {
@@ -97,7 +94,7 @@ public void setCity(String city) {
9794
/**
9895
* The two-character ISO-3166-1 alpha-2 country code. For example, **US**. &gt; If you don&#39;t know the country or are not collecting the country from the shopper, provide &#x60;country&#x60; as &#x60;ZZ&#x60;.
9996
*
100-
* @param country
97+
* @param country The two-character ISO-3166-1 alpha-2 country code. For example, **US**. &gt; If you don&#39;t know the country or are not collecting the country from the shopper, provide &#x60;country&#x60; as &#x60;ZZ&#x60;.
10198
* @return the current {@code Address} instance, allowing for method chaining
10299
*/
103100
public Address country(String country) {
@@ -107,9 +104,8 @@ public Address country(String country) {
107104

108105
/**
109106
* The two-character ISO-3166-1 alpha-2 country code. For example, **US**. &gt; If you don&#39;t know the country or are not collecting the country from the shopper, provide &#x60;country&#x60; as &#x60;ZZ&#x60;.
110-
* @return country
107+
* @return country The two-character ISO-3166-1 alpha-2 country code. For example, **US**. &gt; If you don&#39;t know the country or are not collecting the country from the shopper, provide &#x60;country&#x60; as &#x60;ZZ&#x60;.
111108
*/
112-
@ApiModelProperty(required = true, value = "The two-character ISO-3166-1 alpha-2 country code. For example, **US**. > If you don't know the country or are not collecting the country from the shopper, provide `country` as `ZZ`.")
113109
@JsonProperty(JSON_PROPERTY_COUNTRY)
114110
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
115111
public String getCountry() {
@@ -119,8 +115,8 @@ public String getCountry() {
119115
/**
120116
* The two-character ISO-3166-1 alpha-2 country code. For example, **US**. &gt; If you don&#39;t know the country or are not collecting the country from the shopper, provide &#x60;country&#x60; as &#x60;ZZ&#x60;.
121117
*
122-
* @param country
123-
*/
118+
* @param country The two-character ISO-3166-1 alpha-2 country code. For example, **US**. &gt; If you don&#39;t know the country or are not collecting the country from the shopper, provide &#x60;country&#x60; as &#x60;ZZ&#x60;.
119+
*/
124120
@JsonProperty(JSON_PROPERTY_COUNTRY)
125121
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
126122
public void setCountry(String country) {
@@ -130,7 +126,7 @@ public void setCountry(String country) {
130126
/**
131127
* The number or name of the house. Maximum length: 3000 characters.
132128
*
133-
* @param houseNumberOrName
129+
* @param houseNumberOrName The number or name of the house. Maximum length: 3000 characters.
134130
* @return the current {@code Address} instance, allowing for method chaining
135131
*/
136132
public Address houseNumberOrName(String houseNumberOrName) {
@@ -140,9 +136,8 @@ public Address houseNumberOrName(String houseNumberOrName) {
140136

141137
/**
142138
* The number or name of the house. Maximum length: 3000 characters.
143-
* @return houseNumberOrName
139+
* @return houseNumberOrName The number or name of the house. Maximum length: 3000 characters.
144140
*/
145-
@ApiModelProperty(required = true, value = "The number or name of the house. Maximum length: 3000 characters.")
146141
@JsonProperty(JSON_PROPERTY_HOUSE_NUMBER_OR_NAME)
147142
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
148143
public String getHouseNumberOrName() {
@@ -152,8 +147,8 @@ public String getHouseNumberOrName() {
152147
/**
153148
* The number or name of the house. Maximum length: 3000 characters.
154149
*
155-
* @param houseNumberOrName
156-
*/
150+
* @param houseNumberOrName The number or name of the house. Maximum length: 3000 characters.
151+
*/
157152
@JsonProperty(JSON_PROPERTY_HOUSE_NUMBER_OR_NAME)
158153
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
159154
public void setHouseNumberOrName(String houseNumberOrName) {
@@ -163,7 +158,7 @@ public void setHouseNumberOrName(String houseNumberOrName) {
163158
/**
164159
* A maximum of five digits for an address in the US, or a maximum of ten characters for an address in all other countries.
165160
*
166-
* @param postalCode
161+
* @param postalCode A maximum of five digits for an address in the US, or a maximum of ten characters for an address in all other countries.
167162
* @return the current {@code Address} instance, allowing for method chaining
168163
*/
169164
public Address postalCode(String postalCode) {
@@ -173,9 +168,8 @@ public Address postalCode(String postalCode) {
173168

174169
/**
175170
* A maximum of five digits for an address in the US, or a maximum of ten characters for an address in all other countries.
176-
* @return postalCode
171+
* @return postalCode A maximum of five digits for an address in the US, or a maximum of ten characters for an address in all other countries.
177172
*/
178-
@ApiModelProperty(required = true, value = "A maximum of five digits for an address in the US, or a maximum of ten characters for an address in all other countries.")
179173
@JsonProperty(JSON_PROPERTY_POSTAL_CODE)
180174
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
181175
public String getPostalCode() {
@@ -185,8 +179,8 @@ public String getPostalCode() {
185179
/**
186180
* A maximum of five digits for an address in the US, or a maximum of ten characters for an address in all other countries.
187181
*
188-
* @param postalCode
189-
*/
182+
* @param postalCode A maximum of five digits for an address in the US, or a maximum of ten characters for an address in all other countries.
183+
*/
190184
@JsonProperty(JSON_PROPERTY_POSTAL_CODE)
191185
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
192186
public void setPostalCode(String postalCode) {
@@ -196,7 +190,7 @@ public void setPostalCode(String postalCode) {
196190
/**
197191
* The two-character ISO 3166-2 state or province code. For example, **CA** in the US or **ON** in Canada. &gt; Required for the US and Canada.
198192
*
199-
* @param stateOrProvince
193+
* @param stateOrProvince The two-character ISO 3166-2 state or province code. For example, **CA** in the US or **ON** in Canada. &gt; Required for the US and Canada.
200194
* @return the current {@code Address} instance, allowing for method chaining
201195
*/
202196
public Address stateOrProvince(String stateOrProvince) {
@@ -206,9 +200,8 @@ public Address stateOrProvince(String stateOrProvince) {
206200

207201
/**
208202
* The two-character ISO 3166-2 state or province code. For example, **CA** in the US or **ON** in Canada. &gt; Required for the US and Canada.
209-
* @return stateOrProvince
203+
* @return stateOrProvince The two-character ISO 3166-2 state or province code. For example, **CA** in the US or **ON** in Canada. &gt; Required for the US and Canada.
210204
*/
211-
@ApiModelProperty(value = "The two-character ISO 3166-2 state or province code. For example, **CA** in the US or **ON** in Canada. > Required for the US and Canada.")
212205
@JsonProperty(JSON_PROPERTY_STATE_OR_PROVINCE)
213206
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
214207
public String getStateOrProvince() {
@@ -218,8 +211,8 @@ public String getStateOrProvince() {
218211
/**
219212
* The two-character ISO 3166-2 state or province code. For example, **CA** in the US or **ON** in Canada. &gt; Required for the US and Canada.
220213
*
221-
* @param stateOrProvince
222-
*/
214+
* @param stateOrProvince The two-character ISO 3166-2 state or province code. For example, **CA** in the US or **ON** in Canada. &gt; Required for the US and Canada.
215+
*/
223216
@JsonProperty(JSON_PROPERTY_STATE_OR_PROVINCE)
224217
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
225218
public void setStateOrProvince(String stateOrProvince) {
@@ -229,7 +222,7 @@ public void setStateOrProvince(String stateOrProvince) {
229222
/**
230223
* The name of the street. Maximum length: 3000 characters. &gt; The house number should not be included in this field; it should be separately provided via &#x60;houseNumberOrName&#x60;.
231224
*
232-
* @param street
225+
* @param street The name of the street. Maximum length: 3000 characters. &gt; The house number should not be included in this field; it should be separately provided via &#x60;houseNumberOrName&#x60;.
233226
* @return the current {@code Address} instance, allowing for method chaining
234227
*/
235228
public Address street(String street) {
@@ -239,9 +232,8 @@ public Address street(String street) {
239232

240233
/**
241234
* The name of the street. Maximum length: 3000 characters. &gt; The house number should not be included in this field; it should be separately provided via &#x60;houseNumberOrName&#x60;.
242-
* @return street
235+
* @return street The name of the street. Maximum length: 3000 characters. &gt; The house number should not be included in this field; it should be separately provided via &#x60;houseNumberOrName&#x60;.
243236
*/
244-
@ApiModelProperty(required = true, value = "The name of the street. Maximum length: 3000 characters. > The house number should not be included in this field; it should be separately provided via `houseNumberOrName`.")
245237
@JsonProperty(JSON_PROPERTY_STREET)
246238
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
247239
public String getStreet() {
@@ -251,8 +243,8 @@ public String getStreet() {
251243
/**
252244
* The name of the street. Maximum length: 3000 characters. &gt; The house number should not be included in this field; it should be separately provided via &#x60;houseNumberOrName&#x60;.
253245
*
254-
* @param street
255-
*/
246+
* @param street The name of the street. Maximum length: 3000 characters. &gt; The house number should not be included in this field; it should be separately provided via &#x60;houseNumberOrName&#x60;.
247+
*/
256248
@JsonProperty(JSON_PROPERTY_STREET)
257249
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
258250
public void setStreet(String street) {

src/main/java/com/adyen/model/recurring/Amount.java

+10-14
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Adyen Recurring API (deprecated)
2+
* Adyen Recurring API
33
*
44
* The version of the OpenAPI document: 68
55
*
@@ -13,16 +13,14 @@
1313
package com.adyen.model.recurring;
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

@@ -48,7 +46,7 @@ public Amount() {
4846
/**
4947
* 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) {
@@ -58,9 +56,8 @@ public Amount currency(String currency) {
5856

5957
/**
6058
* The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes#currency-codes).
61-
* @return currency
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#currency-codes).")
6461
@JsonProperty(JSON_PROPERTY_CURRENCY)
6562
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
6663
public String getCurrency() {
@@ -70,8 +67,8 @@ public String getCurrency() {
7067
/**
7168
* 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) {
@@ -81,7 +78,7 @@ public void setCurrency(String currency) {
8178
/**
8279
* 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) {
@@ -91,9 +88,8 @@ public Amount value(Long value) {
9188

9289
/**
9390
* The amount of the transaction, in [minor units](https://docs.adyen.com/development-resources/currency-codes#minor-units).
94-
* @return value
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#minor-units).")
9793
@JsonProperty(JSON_PROPERTY_VALUE)
9894
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
9995
public Long getValue() {
@@ -103,8 +99,8 @@ public Long getValue() {
10399
/**
104100
* 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) {

0 commit comments

Comments
 (0)