• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

Adyen / adyen-java-api-library / #3804

18 Nov 2024 03:11PM UTC coverage: 12.345%. First build
#3804

push

web-flow
Merge 2f1727c0d into 1d8235624

62 of 245 new or added lines in 5 files covered. (25.31%)

13123 of 106304 relevant lines covered (12.34%)

0.12 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

17.31
/src/main/java/com/adyen/model/checkout/CheckoutBankAccount.java
1
/*
2
 * Adyen Checkout API
3
 *
4
 * The version of the OpenAPI document: 71
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

13
package com.adyen.model.checkout;
14

15
import java.util.Objects;
16
import java.util.Arrays;
17
import java.util.Map;
18
import java.util.HashMap;
19
import com.fasterxml.jackson.annotation.JsonInclude;
20
import com.fasterxml.jackson.annotation.JsonProperty;
21
import com.fasterxml.jackson.annotation.JsonCreator;
22
import com.fasterxml.jackson.annotation.JsonTypeName;
23
import com.fasterxml.jackson.annotation.JsonValue;
24
import io.swagger.annotations.ApiModel;
25
import io.swagger.annotations.ApiModelProperty;
26
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
27
import com.fasterxml.jackson.core.JsonProcessingException;
28

29

30
/**
31
 * CheckoutBankAccount
32
 */
33
@JsonPropertyOrder({
34
  CheckoutBankAccount.JSON_PROPERTY_ACCOUNT_TYPE,
35
  CheckoutBankAccount.JSON_PROPERTY_BANK_ACCOUNT_NUMBER,
36
  CheckoutBankAccount.JSON_PROPERTY_BANK_CITY,
37
  CheckoutBankAccount.JSON_PROPERTY_BANK_LOCATION_ID,
38
  CheckoutBankAccount.JSON_PROPERTY_BANK_NAME,
39
  CheckoutBankAccount.JSON_PROPERTY_BIC,
40
  CheckoutBankAccount.JSON_PROPERTY_COUNTRY_CODE,
41
  CheckoutBankAccount.JSON_PROPERTY_IBAN,
42
  CheckoutBankAccount.JSON_PROPERTY_OWNER_NAME,
43
  CheckoutBankAccount.JSON_PROPERTY_TAX_ID
44
})
45

46
public class CheckoutBankAccount {
47
  /**
48
   * The type of the bank account.
49
   */
NEW
50
  public enum AccountTypeEnum {
×
NEW
51
    BALANCE("balance"),
×
52
    
NEW
53
    CHECKING("checking"),
×
54
    
NEW
55
    DEPOSIT("deposit"),
×
56
    
NEW
57
    GENERAL("general"),
×
58
    
NEW
59
    OTHER("other"),
×
60
    
NEW
61
    PAYMENT("payment"),
×
62
    
NEW
63
    SAVINGS("savings");
×
64

65
    private String value;
66

NEW
67
    AccountTypeEnum(String value) {
×
NEW
68
      this.value = value;
×
NEW
69
    }
×
70

71
    @JsonValue
72
    public String getValue() {
NEW
73
      return value;
×
74
    }
75

76
    @Override
77
    public String toString() {
NEW
78
      return String.valueOf(value);
×
79
    }
80

81
    @JsonCreator
82
    public static AccountTypeEnum fromValue(String value) {
NEW
83
      for (AccountTypeEnum b : AccountTypeEnum.values()) {
×
NEW
84
        if (b.value.equals(value)) {
×
NEW
85
          return b;
×
86
        }
87
      }
NEW
88
      throw new IllegalArgumentException("Unexpected value '" + value + "'");
×
89
    }
90
  }
91

92
  public static final String JSON_PROPERTY_ACCOUNT_TYPE = "accountType";
93
  private AccountTypeEnum accountType;
94

95
  public static final String JSON_PROPERTY_BANK_ACCOUNT_NUMBER = "bankAccountNumber";
96
  private String bankAccountNumber;
97

98
  public static final String JSON_PROPERTY_BANK_CITY = "bankCity";
99
  private String bankCity;
100

101
  public static final String JSON_PROPERTY_BANK_LOCATION_ID = "bankLocationId";
102
  private String bankLocationId;
103

104
  public static final String JSON_PROPERTY_BANK_NAME = "bankName";
105
  private String bankName;
106

107
  public static final String JSON_PROPERTY_BIC = "bic";
108
  private String bic;
109

110
  public static final String JSON_PROPERTY_COUNTRY_CODE = "countryCode";
111
  private String countryCode;
112

113
  public static final String JSON_PROPERTY_IBAN = "iban";
114
  private String iban;
115

116
  public static final String JSON_PROPERTY_OWNER_NAME = "ownerName";
117
  private String ownerName;
118

119
  public static final String JSON_PROPERTY_TAX_ID = "taxId";
120
  private String taxId;
121

122
  public CheckoutBankAccount() { 
1✔
123
  }
1✔
124

125
  /**
126
   * The type of the bank account.
127
   *
128
   * @param accountType
129
   * @return the current {@code CheckoutBankAccount} instance, allowing for method chaining
130
   */
131
  public CheckoutBankAccount accountType(AccountTypeEnum accountType) {
NEW
132
    this.accountType = accountType;
×
NEW
133
    return this;
×
134
  }
135

136
  /**
137
   * The type of the bank account.
138
   * @return accountType
139
   */
140
  @ApiModelProperty(value = "The type of the bank account.")
141
  @JsonProperty(JSON_PROPERTY_ACCOUNT_TYPE)
142
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
143
  public AccountTypeEnum getAccountType() {
144
    return accountType;
1✔
145
  }
146

147
  /**
148
   * The type of the bank account.
149
   *
150
   * @param accountType
151
   */ 
152
  @JsonProperty(JSON_PROPERTY_ACCOUNT_TYPE)
153
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
154
  public void setAccountType(AccountTypeEnum accountType) {
NEW
155
    this.accountType = accountType;
×
NEW
156
  }
×
157

158
  /**
159
   * The bank account number (without separators).
160
   *
161
   * @param bankAccountNumber
162
   * @return the current {@code CheckoutBankAccount} instance, allowing for method chaining
163
   */
164
  public CheckoutBankAccount bankAccountNumber(String bankAccountNumber) {
NEW
165
    this.bankAccountNumber = bankAccountNumber;
×
NEW
166
    return this;
×
167
  }
168

169
  /**
170
   * The bank account number (without separators).
171
   * @return bankAccountNumber
172
   */
173
  @ApiModelProperty(value = "The bank account number (without separators).")
174
  @JsonProperty(JSON_PROPERTY_BANK_ACCOUNT_NUMBER)
175
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
176
  public String getBankAccountNumber() {
177
    return bankAccountNumber;
1✔
178
  }
179

180
  /**
181
   * The bank account number (without separators).
182
   *
183
   * @param bankAccountNumber
184
   */ 
185
  @JsonProperty(JSON_PROPERTY_BANK_ACCOUNT_NUMBER)
186
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
187
  public void setBankAccountNumber(String bankAccountNumber) {
NEW
188
    this.bankAccountNumber = bankAccountNumber;
×
NEW
189
  }
×
190

191
  /**
192
   * The bank city.
193
   *
194
   * @param bankCity
195
   * @return the current {@code CheckoutBankAccount} instance, allowing for method chaining
196
   */
197
  public CheckoutBankAccount bankCity(String bankCity) {
NEW
198
    this.bankCity = bankCity;
×
NEW
199
    return this;
×
200
  }
201

202
  /**
203
   * The bank city.
204
   * @return bankCity
205
   */
206
  @ApiModelProperty(value = "The bank city.")
207
  @JsonProperty(JSON_PROPERTY_BANK_CITY)
208
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
209
  public String getBankCity() {
210
    return bankCity;
1✔
211
  }
212

213
  /**
214
   * The bank city.
215
   *
216
   * @param bankCity
217
   */ 
218
  @JsonProperty(JSON_PROPERTY_BANK_CITY)
219
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
220
  public void setBankCity(String bankCity) {
NEW
221
    this.bankCity = bankCity;
×
NEW
222
  }
×
223

224
  /**
225
   * The location id of the bank. The field value is `nil` in most cases.
226
   *
227
   * @param bankLocationId
228
   * @return the current {@code CheckoutBankAccount} instance, allowing for method chaining
229
   */
230
  public CheckoutBankAccount bankLocationId(String bankLocationId) {
NEW
231
    this.bankLocationId = bankLocationId;
×
NEW
232
    return this;
×
233
  }
234

235
  /**
236
   * The location id of the bank. The field value is `nil` in most cases.
237
   * @return bankLocationId
238
   */
239
  @ApiModelProperty(value = "The location id of the bank. The field value is `nil` in most cases.")
240
  @JsonProperty(JSON_PROPERTY_BANK_LOCATION_ID)
241
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
242
  public String getBankLocationId() {
243
    return bankLocationId;
1✔
244
  }
245

246
  /**
247
   * The location id of the bank. The field value is `nil` in most cases.
248
   *
249
   * @param bankLocationId
250
   */ 
251
  @JsonProperty(JSON_PROPERTY_BANK_LOCATION_ID)
252
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
253
  public void setBankLocationId(String bankLocationId) {
NEW
254
    this.bankLocationId = bankLocationId;
×
NEW
255
  }
×
256

257
  /**
258
   * The name of the bank.
259
   *
260
   * @param bankName
261
   * @return the current {@code CheckoutBankAccount} instance, allowing for method chaining
262
   */
263
  public CheckoutBankAccount bankName(String bankName) {
NEW
264
    this.bankName = bankName;
×
NEW
265
    return this;
×
266
  }
267

268
  /**
269
   * The name of the bank.
270
   * @return bankName
271
   */
272
  @ApiModelProperty(value = "The name of the bank.")
273
  @JsonProperty(JSON_PROPERTY_BANK_NAME)
274
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
275
  public String getBankName() {
276
    return bankName;
1✔
277
  }
278

279
  /**
280
   * The name of the bank.
281
   *
282
   * @param bankName
283
   */ 
284
  @JsonProperty(JSON_PROPERTY_BANK_NAME)
285
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
286
  public void setBankName(String bankName) {
NEW
287
    this.bankName = bankName;
×
NEW
288
  }
×
289

290
  /**
291
   * The [Business Identifier Code](https://en.wikipedia.org/wiki/ISO_9362) (BIC) is the SWIFT address assigned to a bank. The field value is `nil` in most cases.
292
   *
293
   * @param bic
294
   * @return the current {@code CheckoutBankAccount} instance, allowing for method chaining
295
   */
296
  public CheckoutBankAccount bic(String bic) {
NEW
297
    this.bic = bic;
×
NEW
298
    return this;
×
299
  }
300

301
  /**
302
   * The [Business Identifier Code](https://en.wikipedia.org/wiki/ISO_9362) (BIC) is the SWIFT address assigned to a bank. The field value is `nil` in most cases.
303
   * @return bic
304
   */
305
  @ApiModelProperty(value = "The [Business Identifier Code](https://en.wikipedia.org/wiki/ISO_9362) (BIC) is the SWIFT address assigned to a bank. The field value is `nil` in most cases.")
306
  @JsonProperty(JSON_PROPERTY_BIC)
307
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
308
  public String getBic() {
309
    return bic;
1✔
310
  }
311

312
  /**
313
   * The [Business Identifier Code](https://en.wikipedia.org/wiki/ISO_9362) (BIC) is the SWIFT address assigned to a bank. The field value is `nil` in most cases.
314
   *
315
   * @param bic
316
   */ 
317
  @JsonProperty(JSON_PROPERTY_BIC)
318
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
319
  public void setBic(String bic) {
NEW
320
    this.bic = bic;
×
NEW
321
  }
×
322

323
  /**
324
   * Country code where the bank is located.  A valid value is an ISO two-character country code (e.g. 'NL').
325
   *
326
   * @param countryCode
327
   * @return the current {@code CheckoutBankAccount} instance, allowing for method chaining
328
   */
329
  public CheckoutBankAccount countryCode(String countryCode) {
330
    this.countryCode = countryCode;
1✔
331
    return this;
1✔
332
  }
333

334
  /**
335
   * Country code where the bank is located.  A valid value is an ISO two-character country code (e.g. 'NL').
336
   * @return countryCode
337
   */
338
  @ApiModelProperty(value = "Country code where the bank is located.  A valid value is an ISO two-character country code (e.g. 'NL').")
339
  @JsonProperty(JSON_PROPERTY_COUNTRY_CODE)
340
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
341
  public String getCountryCode() {
342
    return countryCode;
1✔
343
  }
344

345
  /**
346
   * Country code where the bank is located.  A valid value is an ISO two-character country code (e.g. 'NL').
347
   *
348
   * @param countryCode
349
   */ 
350
  @JsonProperty(JSON_PROPERTY_COUNTRY_CODE)
351
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
352
  public void setCountryCode(String countryCode) {
NEW
353
    this.countryCode = countryCode;
×
NEW
354
  }
×
355

356
  /**
357
   * The [International Bank Account Number](https://en.wikipedia.org/wiki/International_Bank_Account_Number) (IBAN).
358
   *
359
   * @param iban
360
   * @return the current {@code CheckoutBankAccount} instance, allowing for method chaining
361
   */
362
  public CheckoutBankAccount iban(String iban) {
363
    this.iban = iban;
1✔
364
    return this;
1✔
365
  }
366

367
  /**
368
   * The [International Bank Account Number](https://en.wikipedia.org/wiki/International_Bank_Account_Number) (IBAN).
369
   * @return iban
370
   */
371
  @ApiModelProperty(value = "The [International Bank Account Number](https://en.wikipedia.org/wiki/International_Bank_Account_Number) (IBAN).")
372
  @JsonProperty(JSON_PROPERTY_IBAN)
373
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
374
  public String getIban() {
375
    return iban;
1✔
376
  }
377

378
  /**
379
   * The [International Bank Account Number](https://en.wikipedia.org/wiki/International_Bank_Account_Number) (IBAN).
380
   *
381
   * @param iban
382
   */ 
383
  @JsonProperty(JSON_PROPERTY_IBAN)
384
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
385
  public void setIban(String iban) {
NEW
386
    this.iban = iban;
×
NEW
387
  }
×
388

389
  /**
390
   * The name of the bank account holder. If you submit a name with non-Latin characters, we automatically replace some of them with corresponding Latin characters to meet the FATF recommendations. For example: * χ12 is converted to ch12. * üA is converted to euA. * Peter Møller is converted to Peter Mller, because banks don't accept 'ø'. After replacement, the ownerName must have at least three alphanumeric characters (A-Z, a-z, 0-9), and at least one of them must be a valid Latin character (A-Z, a-z). For example: * John17 - allowed. * J17 - allowed. * 171 - not allowed. * John-7 - allowed. > If provided details don't match the required format, the response returns the error message: 203 'Invalid bank account holder name'.
391
   *
392
   * @param ownerName
393
   * @return the current {@code CheckoutBankAccount} instance, allowing for method chaining
394
   */
395
  public CheckoutBankAccount ownerName(String ownerName) {
396
    this.ownerName = ownerName;
1✔
397
    return this;
1✔
398
  }
399

400
  /**
401
   * The name of the bank account holder. If you submit a name with non-Latin characters, we automatically replace some of them with corresponding Latin characters to meet the FATF recommendations. For example: * χ12 is converted to ch12. * üA is converted to euA. * Peter Møller is converted to Peter Mller, because banks don't accept 'ø'. After replacement, the ownerName must have at least three alphanumeric characters (A-Z, a-z, 0-9), and at least one of them must be a valid Latin character (A-Z, a-z). For example: * John17 - allowed. * J17 - allowed. * 171 - not allowed. * John-7 - allowed. > If provided details don't match the required format, the response returns the error message: 203 'Invalid bank account holder name'.
402
   * @return ownerName
403
   */
404
  @ApiModelProperty(value = "The name of the bank account holder. If you submit a name with non-Latin characters, we automatically replace some of them with corresponding Latin characters to meet the FATF recommendations. For example: * χ12 is converted to ch12. * üA is converted to euA. * Peter Møller is converted to Peter Mller, because banks don't accept 'ø'. After replacement, the ownerName must have at least three alphanumeric characters (A-Z, a-z, 0-9), and at least one of them must be a valid Latin character (A-Z, a-z). For example: * John17 - allowed. * J17 - allowed. * 171 - not allowed. * John-7 - allowed. > If provided details don't match the required format, the response returns the error message: 203 'Invalid bank account holder name'.")
405
  @JsonProperty(JSON_PROPERTY_OWNER_NAME)
406
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
407
  public String getOwnerName() {
408
    return ownerName;
1✔
409
  }
410

411
  /**
412
   * The name of the bank account holder. If you submit a name with non-Latin characters, we automatically replace some of them with corresponding Latin characters to meet the FATF recommendations. For example: * χ12 is converted to ch12. * üA is converted to euA. * Peter Møller is converted to Peter Mller, because banks don't accept 'ø'. After replacement, the ownerName must have at least three alphanumeric characters (A-Z, a-z, 0-9), and at least one of them must be a valid Latin character (A-Z, a-z). For example: * John17 - allowed. * J17 - allowed. * 171 - not allowed. * John-7 - allowed. > If provided details don't match the required format, the response returns the error message: 203 'Invalid bank account holder name'.
413
   *
414
   * @param ownerName
415
   */ 
416
  @JsonProperty(JSON_PROPERTY_OWNER_NAME)
417
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
418
  public void setOwnerName(String ownerName) {
NEW
419
    this.ownerName = ownerName;
×
NEW
420
  }
×
421

422
  /**
423
   * The bank account holder's tax ID.
424
   *
425
   * @param taxId
426
   * @return the current {@code CheckoutBankAccount} instance, allowing for method chaining
427
   */
428
  public CheckoutBankAccount taxId(String taxId) {
NEW
429
    this.taxId = taxId;
×
NEW
430
    return this;
×
431
  }
432

433
  /**
434
   * The bank account holder's tax ID.
435
   * @return taxId
436
   */
437
  @ApiModelProperty(value = "The bank account holder's tax ID.")
438
  @JsonProperty(JSON_PROPERTY_TAX_ID)
439
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
440
  public String getTaxId() {
441
    return taxId;
1✔
442
  }
443

444
  /**
445
   * The bank account holder's tax ID.
446
   *
447
   * @param taxId
448
   */ 
449
  @JsonProperty(JSON_PROPERTY_TAX_ID)
450
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
451
  public void setTaxId(String taxId) {
NEW
452
    this.taxId = taxId;
×
NEW
453
  }
×
454

455
  /**
456
   * Return true if this CheckoutBankAccount object is equal to o.
457
   */
458
  @Override
459
  public boolean equals(Object o) {
NEW
460
    if (this == o) {
×
NEW
461
      return true;
×
462
    }
NEW
463
    if (o == null || getClass() != o.getClass()) {
×
NEW
464
      return false;
×
465
    }
NEW
466
    CheckoutBankAccount checkoutBankAccount = (CheckoutBankAccount) o;
×
NEW
467
    return Objects.equals(this.accountType, checkoutBankAccount.accountType) &&
×
NEW
468
        Objects.equals(this.bankAccountNumber, checkoutBankAccount.bankAccountNumber) &&
×
NEW
469
        Objects.equals(this.bankCity, checkoutBankAccount.bankCity) &&
×
NEW
470
        Objects.equals(this.bankLocationId, checkoutBankAccount.bankLocationId) &&
×
NEW
471
        Objects.equals(this.bankName, checkoutBankAccount.bankName) &&
×
NEW
472
        Objects.equals(this.bic, checkoutBankAccount.bic) &&
×
NEW
473
        Objects.equals(this.countryCode, checkoutBankAccount.countryCode) &&
×
NEW
474
        Objects.equals(this.iban, checkoutBankAccount.iban) &&
×
NEW
475
        Objects.equals(this.ownerName, checkoutBankAccount.ownerName) &&
×
NEW
476
        Objects.equals(this.taxId, checkoutBankAccount.taxId);
×
477
  }
478

479
  @Override
480
  public int hashCode() {
NEW
481
    return Objects.hash(accountType, bankAccountNumber, bankCity, bankLocationId, bankName, bic, countryCode, iban, ownerName, taxId);
×
482
  }
483

484
  @Override
485
  public String toString() {
NEW
486
    StringBuilder sb = new StringBuilder();
×
NEW
487
    sb.append("class CheckoutBankAccount {\n");
×
NEW
488
    sb.append("    accountType: ").append(toIndentedString(accountType)).append("\n");
×
NEW
489
    sb.append("    bankAccountNumber: ").append(toIndentedString(bankAccountNumber)).append("\n");
×
NEW
490
    sb.append("    bankCity: ").append(toIndentedString(bankCity)).append("\n");
×
NEW
491
    sb.append("    bankLocationId: ").append(toIndentedString(bankLocationId)).append("\n");
×
NEW
492
    sb.append("    bankName: ").append(toIndentedString(bankName)).append("\n");
×
NEW
493
    sb.append("    bic: ").append(toIndentedString(bic)).append("\n");
×
NEW
494
    sb.append("    countryCode: ").append(toIndentedString(countryCode)).append("\n");
×
NEW
495
    sb.append("    iban: ").append(toIndentedString(iban)).append("\n");
×
NEW
496
    sb.append("    ownerName: ").append(toIndentedString(ownerName)).append("\n");
×
NEW
497
    sb.append("    taxId: ").append(toIndentedString(taxId)).append("\n");
×
NEW
498
    sb.append("}");
×
NEW
499
    return sb.toString();
×
500
  }
501

502
  /**
503
   * Convert the given object to string with each line indented by 4 spaces
504
   * (except the first line).
505
   */
506
  private String toIndentedString(Object o) {
NEW
507
    if (o == null) {
×
NEW
508
      return "null";
×
509
    }
NEW
510
    return o.toString().replace("\n", "\n    ");
×
511
  }
512

513
/**
514
   * Create an instance of CheckoutBankAccount given an JSON string
515
   *
516
   * @param jsonString JSON string
517
   * @return An instance of CheckoutBankAccount
518
   * @throws JsonProcessingException if the JSON string is invalid with respect to CheckoutBankAccount
519
   */
520
  public static CheckoutBankAccount fromJson(String jsonString) throws JsonProcessingException {
NEW
521
    return JSON.getMapper().readValue(jsonString, CheckoutBankAccount.class);
×
522
  }
523
/**
524
  * Convert an instance of CheckoutBankAccount to an JSON string
525
  *
526
  * @return JSON string
527
  */
528
  public String toJson() throws JsonProcessingException {
NEW
529
    return JSON.getMapper().writeValueAsString(this);
×
530
  }
531
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc