1212package com .adyen .model .capital ;
1313
1414import com .fasterxml .jackson .annotation .JsonAnyGetter ;
15+ import com .fasterxml .jackson .annotation .JsonCreator ;
1516import com .fasterxml .jackson .annotation .JsonIgnore ;
1617import com .fasterxml .jackson .annotation .JsonInclude ;
1718import com .fasterxml .jackson .annotation .JsonProperty ;
1819import com .fasterxml .jackson .annotation .JsonPropertyOrder ;
20+ import com .fasterxml .jackson .annotation .JsonValue ;
1921import com .fasterxml .jackson .core .JsonProcessingException ;
2022import 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 }
0 commit comments