Skip to content

Commit 64ac0ab

Browse files
[capital] Automated update from Adyen/adyen-openapi@49274d0
1 parent 52e2c57 commit 64ac0ab

17 files changed

Lines changed: 2335 additions & 144 deletions

src/main/java/com/adyen/model/capital/AdditionalBankIdentification.java

Lines changed: 124 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,16 @@
1212
package com.adyen.model.capital;
1313

1414
import com.fasterxml.jackson.annotation.JsonAnyGetter;
15+
import com.fasterxml.jackson.annotation.JsonCreator;
1516
import com.fasterxml.jackson.annotation.JsonIgnore;
1617
import com.fasterxml.jackson.annotation.JsonInclude;
1718
import com.fasterxml.jackson.annotation.JsonProperty;
1819
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
20+
import com.fasterxml.jackson.annotation.JsonValue;
1921
import com.fasterxml.jackson.core.JsonProcessingException;
2022
import java.util.*;
23+
import java.util.Arrays;
24+
import java.util.logging.Logger;
2125

2226
/** AdditionalBankIdentification */
2327
@JsonPropertyOrder({
@@ -31,8 +35,64 @@ public class AdditionalBankIdentification {
3135
/** Mark when the attribute has been explicitly set. */
3236
private boolean isSetCode = false;
3337

38+
/**
39+
* The type of additional bank identification, depending on the country. Possible values: *
40+
* **auBsbCode**: The 6-digit [Australian Bank State Branch (BSB)
41+
* code](https://en.wikipedia.org/wiki/Bank_state_branch), without separators or spaces. *
42+
* **caRoutingNumber**: The 9-digit [Canadian routing
43+
* number](https://en.wikipedia.org/wiki/Routing_number_(Canada)), in EFT format, without
44+
* separators or spaces. * **gbSortCode**: The 6-digit [UK sort
45+
* code](https://en.wikipedia.org/wiki/Sort_code), without separators or spaces *
46+
* **usRoutingNumber**: The 9-digit [routing
47+
* number](https://en.wikipedia.org/wiki/ABA_routing_transit_number), without separators or
48+
* spaces.
49+
*/
50+
public enum TypeEnum {
51+
AUBSBCODE(String.valueOf("auBsbCode")),
52+
53+
CAROUTINGNUMBER(String.valueOf("caRoutingNumber")),
54+
55+
GBSORTCODE(String.valueOf("gbSortCode")),
56+
57+
USROUTINGNUMBER(String.valueOf("usRoutingNumber"));
58+
59+
private static final Logger LOG = Logger.getLogger(TypeEnum.class.getName());
60+
61+
private String value;
62+
63+
TypeEnum(String value) {
64+
this.value = value;
65+
}
66+
67+
@JsonValue
68+
public String getValue() {
69+
return value;
70+
}
71+
72+
@Override
73+
public String toString() {
74+
return String.valueOf(value);
75+
}
76+
77+
@JsonCreator
78+
public static TypeEnum fromValue(String value) {
79+
for (TypeEnum b : TypeEnum.values()) {
80+
if (b.value.equals(value)) {
81+
return b;
82+
}
83+
}
84+
// handling unexpected value
85+
LOG.warning(
86+
"TypeEnum: unexpected enum value '"
87+
+ value
88+
+ "' - Supported values are "
89+
+ Arrays.toString(TypeEnum.values()));
90+
return null;
91+
}
92+
}
93+
3494
public static final String JSON_PROPERTY_TYPE = "type";
35-
private AdditionalBankIdentificationTypes type;
95+
private TypeEnum type;
3696

3797
/** Mark when the attribute has been explicitly set. */
3898
private boolean isSetType = false;
@@ -81,36 +141,90 @@ public void setCode(String code) {
81141
}
82142

83143
/**
84-
* type
144+
* The type of additional bank identification, depending on the country. Possible values: *
145+
* **auBsbCode**: The 6-digit [Australian Bank State Branch (BSB)
146+
* code](https://en.wikipedia.org/wiki/Bank_state_branch), without separators or spaces. *
147+
* **caRoutingNumber**: The 9-digit [Canadian routing
148+
* number](https://en.wikipedia.org/wiki/Routing_number_(Canada)), in EFT format, without
149+
* separators or spaces. * **gbSortCode**: The 6-digit [UK sort
150+
* code](https://en.wikipedia.org/wiki/Sort_code), without separators or spaces *
151+
* **usRoutingNumber**: The 9-digit [routing
152+
* number](https://en.wikipedia.org/wiki/ABA_routing_transit_number), without separators or
153+
* spaces.
85154
*
86-
* @param type
155+
* @param type The type of additional bank identification, depending on the country. Possible
156+
* values: * **auBsbCode**: The 6-digit [Australian Bank State Branch (BSB)
157+
* code](https://en.wikipedia.org/wiki/Bank_state_branch), without separators or spaces. *
158+
* **caRoutingNumber**: The 9-digit [Canadian routing
159+
* number](https://en.wikipedia.org/wiki/Routing_number_(Canada)), in EFT format, without
160+
* separators or spaces. * **gbSortCode**: The 6-digit [UK sort
161+
* code](https://en.wikipedia.org/wiki/Sort_code), without separators or spaces *
162+
* **usRoutingNumber**: The 9-digit [routing
163+
* number](https://en.wikipedia.org/wiki/ABA_routing_transit_number), without separators or
164+
* spaces.
87165
* @return the current {@code AdditionalBankIdentification} instance, allowing for method chaining
88166
*/
89-
public AdditionalBankIdentification type(AdditionalBankIdentificationTypes type) {
167+
public AdditionalBankIdentification type(TypeEnum type) {
90168
this.type = type;
91169
isSetType = true; // mark as set
92170
return this;
93171
}
94172

95173
/**
96-
* Get type
174+
* The type of additional bank identification, depending on the country. Possible values: *
175+
* **auBsbCode**: The 6-digit [Australian Bank State Branch (BSB)
176+
* code](https://en.wikipedia.org/wiki/Bank_state_branch), without separators or spaces. *
177+
* **caRoutingNumber**: The 9-digit [Canadian routing
178+
* number](https://en.wikipedia.org/wiki/Routing_number_(Canada)), in EFT format, without
179+
* separators or spaces. * **gbSortCode**: The 6-digit [UK sort
180+
* code](https://en.wikipedia.org/wiki/Sort_code), without separators or spaces *
181+
* **usRoutingNumber**: The 9-digit [routing
182+
* number](https://en.wikipedia.org/wiki/ABA_routing_transit_number), without separators or
183+
* spaces.
97184
*
98-
* @return type
185+
* @return type The type of additional bank identification, depending on the country. Possible
186+
* values: * **auBsbCode**: The 6-digit [Australian Bank State Branch (BSB)
187+
* code](https://en.wikipedia.org/wiki/Bank_state_branch), without separators or spaces. *
188+
* **caRoutingNumber**: The 9-digit [Canadian routing
189+
* number](https://en.wikipedia.org/wiki/Routing_number_(Canada)), in EFT format, without
190+
* separators or spaces. * **gbSortCode**: The 6-digit [UK sort
191+
* code](https://en.wikipedia.org/wiki/Sort_code), without separators or spaces *
192+
* **usRoutingNumber**: The 9-digit [routing
193+
* number](https://en.wikipedia.org/wiki/ABA_routing_transit_number), without separators or
194+
* spaces.
99195
*/
100196
@JsonProperty(JSON_PROPERTY_TYPE)
101197
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
102-
public AdditionalBankIdentificationTypes getType() {
198+
public TypeEnum getType() {
103199
return type;
104200
}
105201

106202
/**
107-
* type
203+
* The type of additional bank identification, depending on the country. Possible values: *
204+
* **auBsbCode**: The 6-digit [Australian Bank State Branch (BSB)
205+
* code](https://en.wikipedia.org/wiki/Bank_state_branch), without separators or spaces. *
206+
* **caRoutingNumber**: The 9-digit [Canadian routing
207+
* number](https://en.wikipedia.org/wiki/Routing_number_(Canada)), in EFT format, without
208+
* separators or spaces. * **gbSortCode**: The 6-digit [UK sort
209+
* code](https://en.wikipedia.org/wiki/Sort_code), without separators or spaces *
210+
* **usRoutingNumber**: The 9-digit [routing
211+
* number](https://en.wikipedia.org/wiki/ABA_routing_transit_number), without separators or
212+
* spaces.
108213
*
109-
* @param type
214+
* @param type The type of additional bank identification, depending on the country. Possible
215+
* values: * **auBsbCode**: The 6-digit [Australian Bank State Branch (BSB)
216+
* code](https://en.wikipedia.org/wiki/Bank_state_branch), without separators or spaces. *
217+
* **caRoutingNumber**: The 9-digit [Canadian routing
218+
* number](https://en.wikipedia.org/wiki/Routing_number_(Canada)), in EFT format, without
219+
* separators or spaces. * **gbSortCode**: The 6-digit [UK sort
220+
* code](https://en.wikipedia.org/wiki/Sort_code), without separators or spaces *
221+
* **usRoutingNumber**: The 9-digit [routing
222+
* number](https://en.wikipedia.org/wiki/ABA_routing_transit_number), without separators or
223+
* spaces.
110224
*/
111225
@JsonProperty(JSON_PROPERTY_TYPE)
112226
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
113-
public void setType(AdditionalBankIdentificationTypes type) {
227+
public void setType(TypeEnum type) {
114228
this.type = type;
115229
isSetType = true; // mark as set
116230
}
Lines changed: 177 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,177 @@
1+
/*
2+
* Capital API
3+
*
4+
* The version of the OpenAPI document: 1
5+
*
6+
*
7+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
8+
* https://openapi-generator.tech
9+
* Do not edit the class manually.
10+
*/
11+
12+
package com.adyen.model.capital;
13+
14+
import com.fasterxml.jackson.annotation.JsonAnyGetter;
15+
import com.fasterxml.jackson.annotation.JsonIgnore;
16+
import com.fasterxml.jackson.annotation.JsonInclude;
17+
import com.fasterxml.jackson.annotation.JsonProperty;
18+
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
19+
import com.fasterxml.jackson.core.JsonProcessingException;
20+
import java.util.*;
21+
22+
/** CalculateGrantOfferRequest */
23+
@JsonPropertyOrder({CalculateGrantOfferRequest.JSON_PROPERTY_AMOUNT})
24+
public class CalculateGrantOfferRequest {
25+
public static final String JSON_PROPERTY_AMOUNT = "amount";
26+
private Amount amount;
27+
28+
/** Mark when the attribute has been explicitly set. */
29+
private boolean isSetAmount = false;
30+
31+
/**
32+
* Sets whether attributes with null values should be explicitly included in the JSON payload.
33+
* Default is false.
34+
*/
35+
@JsonIgnore private boolean includeNullValues = false;
36+
37+
public CalculateGrantOfferRequest() {}
38+
39+
/**
40+
* amount
41+
*
42+
* @param amount
43+
* @return the current {@code CalculateGrantOfferRequest} instance, allowing for method chaining
44+
*/
45+
public CalculateGrantOfferRequest amount(Amount amount) {
46+
this.amount = amount;
47+
isSetAmount = true; // mark as set
48+
return this;
49+
}
50+
51+
/**
52+
* Get amount
53+
*
54+
* @return amount
55+
*/
56+
@JsonProperty(JSON_PROPERTY_AMOUNT)
57+
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
58+
public Amount getAmount() {
59+
return amount;
60+
}
61+
62+
/**
63+
* amount
64+
*
65+
* @param amount
66+
*/
67+
@JsonProperty(JSON_PROPERTY_AMOUNT)
68+
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
69+
public void setAmount(Amount amount) {
70+
this.amount = amount;
71+
isSetAmount = true; // mark as set
72+
}
73+
74+
/**
75+
* Configures whether null values are explicitly serialized in the JSON payload. Default is false.
76+
*/
77+
public CalculateGrantOfferRequest includeNullValues(boolean includeNullValues) {
78+
this.includeNullValues = includeNullValues;
79+
return this;
80+
}
81+
82+
/** Returns whether null values are explicitly serialized in the JSON payload. */
83+
public boolean isIncludeNullValues() {
84+
return includeNullValues;
85+
}
86+
87+
/**
88+
* Sets whether null values should be explicitly serialized in the JSON payload. Default is false.
89+
*/
90+
public void setIncludeNullValues(boolean includeNullValues) {
91+
this.includeNullValues = includeNullValues;
92+
}
93+
94+
/** Return true if this CalculateGrantOfferRequest object is equal to o. */
95+
@Override
96+
public boolean equals(Object o) {
97+
if (this == o) {
98+
return true;
99+
}
100+
if (o == null || getClass() != o.getClass()) {
101+
return false;
102+
}
103+
CalculateGrantOfferRequest calculateGrantOfferRequest = (CalculateGrantOfferRequest) o;
104+
return Objects.equals(this.amount, calculateGrantOfferRequest.amount)
105+
&& Objects.equals(this.isSetAmount, calculateGrantOfferRequest.isSetAmount);
106+
}
107+
108+
@Override
109+
public int hashCode() {
110+
return Objects.hash(amount, isSetAmount);
111+
}
112+
113+
@Override
114+
public String toString() {
115+
StringBuilder sb = new StringBuilder();
116+
sb.append("class CalculateGrantOfferRequest {\n");
117+
sb.append(" amount: ").append(toIndentedString(amount)).append("\n");
118+
sb.append("}");
119+
return sb.toString();
120+
}
121+
122+
/**
123+
* Convert the given object to string with each line indented by 4 spaces (except the first line).
124+
*/
125+
private String toIndentedString(Object o) {
126+
if (o == null) {
127+
return "null";
128+
}
129+
return o.toString().replace("\n", "\n ");
130+
}
131+
132+
/** Returns a map of properties to be merged into the JSON payload as explicit null values. */
133+
@JsonInclude(JsonInclude.Include.ALWAYS)
134+
@JsonAnyGetter
135+
public Map<String, Object> getExplicitNulls() {
136+
if (!this.includeNullValues) {
137+
return Collections.emptyMap();
138+
}
139+
140+
Map<String, Object> nulls = new HashMap<>();
141+
142+
if (isSetAmount) {
143+
addIfNull(nulls, JSON_PROPERTY_AMOUNT, this.amount);
144+
}
145+
146+
return nulls;
147+
}
148+
149+
// add to map when value is null
150+
private void addIfNull(Map<String, Object> map, String key, Object value) {
151+
if (value == null) {
152+
map.put(key, null);
153+
}
154+
}
155+
156+
/**
157+
* Create an instance of CalculateGrantOfferRequest given an JSON string
158+
*
159+
* @param jsonString JSON string
160+
* @return An instance of CalculateGrantOfferRequest
161+
* @throws JsonProcessingException if the JSON string is invalid with respect to
162+
* CalculateGrantOfferRequest
163+
*/
164+
public static CalculateGrantOfferRequest fromJson(String jsonString)
165+
throws JsonProcessingException {
166+
return JSON.getMapper().readValue(jsonString, CalculateGrantOfferRequest.class);
167+
}
168+
169+
/**
170+
* Convert an instance of CalculateGrantOfferRequest to an JSON string
171+
*
172+
* @return JSON string
173+
*/
174+
public String toJson() throws JsonProcessingException {
175+
return JSON.getMapper().writeValueAsString(this);
176+
}
177+
}

0 commit comments

Comments
 (0)