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

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

18 Sep 2023 12:27PM UTC coverage: 13.146%. First build
#2660

push

web-flow
Merge fdf590561 into ba706cfa8

2480 of 2480 new or added lines in 54 files covered. (100.0%)

10283 of 78224 relevant lines covered (13.15%)

0.13 hits per line

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

0.0
/src/main/java/com/adyen/model/configurationwebhooks/BalanceAccount.java
1
/*
2
 * Configuration webhooks
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

13
package com.adyen.model.configurationwebhooks;
14

15
import java.util.Objects;
16
import java.util.Arrays;
17
import java.util.Map;
18
import java.util.HashMap;
19
import com.adyen.model.configurationwebhooks.Balance;
20
import com.adyen.model.configurationwebhooks.PaymentInstrumentReference;
21
import com.adyen.model.configurationwebhooks.PlatformPaymentConfiguration;
22
import com.fasterxml.jackson.annotation.JsonInclude;
23
import com.fasterxml.jackson.annotation.JsonProperty;
24
import com.fasterxml.jackson.annotation.JsonCreator;
25
import com.fasterxml.jackson.annotation.JsonTypeName;
26
import com.fasterxml.jackson.annotation.JsonValue;
27
import io.swagger.annotations.ApiModel;
28
import io.swagger.annotations.ApiModelProperty;
29
import java.util.ArrayList;
30
import java.util.HashMap;
31
import java.util.List;
32
import java.util.Map;
33
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
34
import com.fasterxml.jackson.core.JsonProcessingException;
35

36

37
/**
38
 * BalanceAccount
39
 */
40
@JsonPropertyOrder({
41
  BalanceAccount.JSON_PROPERTY_ACCOUNT_HOLDER_ID,
42
  BalanceAccount.JSON_PROPERTY_BALANCES,
43
  BalanceAccount.JSON_PROPERTY_DEFAULT_CURRENCY_CODE,
44
  BalanceAccount.JSON_PROPERTY_DESCRIPTION,
45
  BalanceAccount.JSON_PROPERTY_ID,
46
  BalanceAccount.JSON_PROPERTY_METADATA,
47
  BalanceAccount.JSON_PROPERTY_MIGRATED_ACCOUNT_CODE,
48
  BalanceAccount.JSON_PROPERTY_PAYMENT_INSTRUMENTS,
49
  BalanceAccount.JSON_PROPERTY_PLATFORM_PAYMENT_CONFIGURATION,
50
  BalanceAccount.JSON_PROPERTY_REFERENCE,
51
  BalanceAccount.JSON_PROPERTY_STATUS,
52
  BalanceAccount.JSON_PROPERTY_TIME_ZONE
53
})
54

55
public class BalanceAccount {
56
  public static final String JSON_PROPERTY_ACCOUNT_HOLDER_ID = "accountHolderId";
57
  private String accountHolderId;
58

59
  public static final String JSON_PROPERTY_BALANCES = "balances";
60
  private List<Balance> balances = null;
×
61

62
  public static final String JSON_PROPERTY_DEFAULT_CURRENCY_CODE = "defaultCurrencyCode";
63
  private String defaultCurrencyCode;
64

65
  public static final String JSON_PROPERTY_DESCRIPTION = "description";
66
  private String description;
67

68
  public static final String JSON_PROPERTY_ID = "id";
69
  private String id;
70

71
  public static final String JSON_PROPERTY_METADATA = "metadata";
72
  private Map<String, String> metadata = null;
×
73

74
  public static final String JSON_PROPERTY_MIGRATED_ACCOUNT_CODE = "migratedAccountCode";
75
  private String migratedAccountCode;
76

77
  public static final String JSON_PROPERTY_PAYMENT_INSTRUMENTS = "paymentInstruments";
78
  private List<PaymentInstrumentReference> paymentInstruments = null;
×
79

80
  public static final String JSON_PROPERTY_PLATFORM_PAYMENT_CONFIGURATION = "platformPaymentConfiguration";
81
  private PlatformPaymentConfiguration platformPaymentConfiguration;
82

83
  public static final String JSON_PROPERTY_REFERENCE = "reference";
84
  private String reference;
85

86
  /**
87
   * The status of the balance account, set to **Active** by default.  
88
   */
89
  public enum StatusEnum {
×
90
    ACTIVE("Active"),
×
91
    
92
    CLOSED("Closed"),
×
93
    
94
    INACTIVE("Inactive"),
×
95
    
96
    SUSPENDED("Suspended");
×
97

98
    private String value;
99

100
    StatusEnum(String value) {
×
101
      this.value = value;
×
102
    }
×
103

104
    @JsonValue
105
    public String getValue() {
106
      return value;
×
107
    }
108

109
    @Override
110
    public String toString() {
111
      return String.valueOf(value);
×
112
    }
113

114
    @JsonCreator
115
    public static StatusEnum fromValue(String value) {
116
      for (StatusEnum b : StatusEnum.values()) {
×
117
        if (b.value.equals(value)) {
×
118
          return b;
×
119
        }
120
      }
121
      throw new IllegalArgumentException("Unexpected value '" + value + "'");
×
122
    }
123
  }
124

125
  public static final String JSON_PROPERTY_STATUS = "status";
126
  private StatusEnum status;
127

128
  public static final String JSON_PROPERTY_TIME_ZONE = "timeZone";
129
  private String timeZone;
130

131
  public BalanceAccount() { 
×
132
  }
×
133

134
  public BalanceAccount accountHolderId(String accountHolderId) {
135
    this.accountHolderId = accountHolderId;
×
136
    return this;
×
137
  }
138

139
   /**
140
   * The unique identifier of the [account holder](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/post/accountHolders__resParam_id) associated with the balance account.
141
   * @return accountHolderId
142
  **/
143
  @ApiModelProperty(required = true, value = "The unique identifier of the [account holder](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/post/accountHolders__resParam_id) associated with the balance account.")
144
  @JsonProperty(JSON_PROPERTY_ACCOUNT_HOLDER_ID)
145
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
146

147
  public String getAccountHolderId() {
148
    return accountHolderId;
×
149
  }
150

151

152
  @JsonProperty(JSON_PROPERTY_ACCOUNT_HOLDER_ID)
153
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
154
  public void setAccountHolderId(String accountHolderId) {
155
    this.accountHolderId = accountHolderId;
×
156
  }
×
157

158

159
  public BalanceAccount balances(List<Balance> balances) {
160
    this.balances = balances;
×
161
    return this;
×
162
  }
163

164
  public BalanceAccount addBalancesItem(Balance balancesItem) {
165
    if (this.balances == null) {
×
166
      this.balances = new ArrayList<>();
×
167
    }
168
    this.balances.add(balancesItem);
×
169
    return this;
×
170
  }
171

172
   /**
173
   * List of balances with the amount and currency.
174
   * @return balances
175
  **/
176
  @ApiModelProperty(value = "List of balances with the amount and currency.")
177
  @JsonProperty(JSON_PROPERTY_BALANCES)
178
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
179

180
  public List<Balance> getBalances() {
181
    return balances;
×
182
  }
183

184

185
  @JsonProperty(JSON_PROPERTY_BALANCES)
186
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
187
  public void setBalances(List<Balance> balances) {
188
    this.balances = balances;
×
189
  }
×
190

191

192
  public BalanceAccount defaultCurrencyCode(String defaultCurrencyCode) {
193
    this.defaultCurrencyCode = defaultCurrencyCode;
×
194
    return this;
×
195
  }
196

197
   /**
198
   * The default three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes) of the balance account. The default value is **EUR**.
199
   * @return defaultCurrencyCode
200
  **/
201
  @ApiModelProperty(value = "The default three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes) of the balance account. The default value is **EUR**.")
202
  @JsonProperty(JSON_PROPERTY_DEFAULT_CURRENCY_CODE)
203
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
204

205
  public String getDefaultCurrencyCode() {
206
    return defaultCurrencyCode;
×
207
  }
208

209

210
  @JsonProperty(JSON_PROPERTY_DEFAULT_CURRENCY_CODE)
211
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
212
  public void setDefaultCurrencyCode(String defaultCurrencyCode) {
213
    this.defaultCurrencyCode = defaultCurrencyCode;
×
214
  }
×
215

216

217
  public BalanceAccount description(String description) {
218
    this.description = description;
×
219
    return this;
×
220
  }
221

222
   /**
223
   * A human-readable description of the balance account, maximum 300 characters. You can use this parameter to distinguish between multiple balance accounts under an account holder.
224
   * @return description
225
  **/
226
  @ApiModelProperty(value = "A human-readable description of the balance account, maximum 300 characters. You can use this parameter to distinguish between multiple balance accounts under an account holder.")
227
  @JsonProperty(JSON_PROPERTY_DESCRIPTION)
228
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
229

230
  public String getDescription() {
231
    return description;
×
232
  }
233

234

235
  @JsonProperty(JSON_PROPERTY_DESCRIPTION)
236
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
237
  public void setDescription(String description) {
238
    this.description = description;
×
239
  }
×
240

241

242
  public BalanceAccount id(String id) {
243
    this.id = id;
×
244
    return this;
×
245
  }
246

247
   /**
248
   * The unique identifier of the balance account.
249
   * @return id
250
  **/
251
  @ApiModelProperty(required = true, value = "The unique identifier of the balance account.")
252
  @JsonProperty(JSON_PROPERTY_ID)
253
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
254

255
  public String getId() {
256
    return id;
×
257
  }
258

259

260
  @JsonProperty(JSON_PROPERTY_ID)
261
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
262
  public void setId(String id) {
263
    this.id = id;
×
264
  }
×
265

266

267
  public BalanceAccount metadata(Map<String, String> metadata) {
268
    this.metadata = metadata;
×
269
    return this;
×
270
  }
271

272
  public BalanceAccount putMetadataItem(String key, String metadataItem) {
273
    if (this.metadata == null) {
×
274
      this.metadata = new HashMap<>();
×
275
    }
276
    this.metadata.put(key, metadataItem);
×
277
    return this;
×
278
  }
279

280
   /**
281
   * A set of key and value pairs for general use. The keys do not have specific names and may be used for storing miscellaneous data as desired. &gt; Note that during an update of metadata, the omission of existing key-value pairs will result in the deletion of those key-value pairs.
282
   * @return metadata
283
  **/
284
  @ApiModelProperty(value = "A set of key and value pairs for general use. The keys do not have specific names and may be used for storing miscellaneous data as desired. > Note that during an update of metadata, the omission of existing key-value pairs will result in the deletion of those key-value pairs.")
285
  @JsonProperty(JSON_PROPERTY_METADATA)
286
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
287

288
  public Map<String, String> getMetadata() {
289
    return metadata;
×
290
  }
291

292

293
  @JsonProperty(JSON_PROPERTY_METADATA)
294
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
295
  public void setMetadata(Map<String, String> metadata) {
296
    this.metadata = metadata;
×
297
  }
×
298

299

300
  public BalanceAccount migratedAccountCode(String migratedAccountCode) {
301
    this.migratedAccountCode = migratedAccountCode;
×
302
    return this;
×
303
  }
304

305
   /**
306
   * The unique identifier of the account of the migrated account holder in the classic integration.
307
   * @return migratedAccountCode
308
  **/
309
  @ApiModelProperty(value = "The unique identifier of the account of the migrated account holder in the classic integration.")
310
  @JsonProperty(JSON_PROPERTY_MIGRATED_ACCOUNT_CODE)
311
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
312

313
  public String getMigratedAccountCode() {
314
    return migratedAccountCode;
×
315
  }
316

317

318
  @JsonProperty(JSON_PROPERTY_MIGRATED_ACCOUNT_CODE)
319
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
320
  public void setMigratedAccountCode(String migratedAccountCode) {
321
    this.migratedAccountCode = migratedAccountCode;
×
322
  }
×
323

324

325
  public BalanceAccount paymentInstruments(List<PaymentInstrumentReference> paymentInstruments) {
326
    this.paymentInstruments = paymentInstruments;
×
327
    return this;
×
328
  }
329

330
  public BalanceAccount addPaymentInstrumentsItem(PaymentInstrumentReference paymentInstrumentsItem) {
331
    if (this.paymentInstruments == null) {
×
332
      this.paymentInstruments = new ArrayList<>();
×
333
    }
334
    this.paymentInstruments.add(paymentInstrumentsItem);
×
335
    return this;
×
336
  }
337

338
   /**
339
   * List of [payment instruments](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/post/paymentInstruments) associated with the balance account.
340
   * @return paymentInstruments
341
  **/
342
  @ApiModelProperty(value = "List of [payment instruments](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/post/paymentInstruments) associated with the balance account.")
343
  @JsonProperty(JSON_PROPERTY_PAYMENT_INSTRUMENTS)
344
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
345

346
  public List<PaymentInstrumentReference> getPaymentInstruments() {
347
    return paymentInstruments;
×
348
  }
349

350

351
  @JsonProperty(JSON_PROPERTY_PAYMENT_INSTRUMENTS)
352
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
353
  public void setPaymentInstruments(List<PaymentInstrumentReference> paymentInstruments) {
354
    this.paymentInstruments = paymentInstruments;
×
355
  }
×
356

357

358
  public BalanceAccount platformPaymentConfiguration(PlatformPaymentConfiguration platformPaymentConfiguration) {
359
    this.platformPaymentConfiguration = platformPaymentConfiguration;
×
360
    return this;
×
361
  }
362

363
   /**
364
   * Get platformPaymentConfiguration
365
   * @return platformPaymentConfiguration
366
  **/
367
  @ApiModelProperty(value = "")
368
  @JsonProperty(JSON_PROPERTY_PLATFORM_PAYMENT_CONFIGURATION)
369
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
370

371
  public PlatformPaymentConfiguration getPlatformPaymentConfiguration() {
372
    return platformPaymentConfiguration;
×
373
  }
374

375

376
  @JsonProperty(JSON_PROPERTY_PLATFORM_PAYMENT_CONFIGURATION)
377
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
378
  public void setPlatformPaymentConfiguration(PlatformPaymentConfiguration platformPaymentConfiguration) {
379
    this.platformPaymentConfiguration = platformPaymentConfiguration;
×
380
  }
×
381

382

383
  public BalanceAccount reference(String reference) {
384
    this.reference = reference;
×
385
    return this;
×
386
  }
387

388
   /**
389
   * Your reference for the balance account, maximum 150 characters.
390
   * @return reference
391
  **/
392
  @ApiModelProperty(value = "Your reference for the balance account, maximum 150 characters.")
393
  @JsonProperty(JSON_PROPERTY_REFERENCE)
394
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
395

396
  public String getReference() {
397
    return reference;
×
398
  }
399

400

401
  @JsonProperty(JSON_PROPERTY_REFERENCE)
402
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
403
  public void setReference(String reference) {
404
    this.reference = reference;
×
405
  }
×
406

407

408
  public BalanceAccount status(StatusEnum status) {
409
    this.status = status;
×
410
    return this;
×
411
  }
412

413
   /**
414
   * The status of the balance account, set to **Active** by default.  
415
   * @return status
416
  **/
417
  @ApiModelProperty(value = "The status of the balance account, set to **Active** by default.  ")
418
  @JsonProperty(JSON_PROPERTY_STATUS)
419
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
420

421
  public StatusEnum getStatus() {
422
    return status;
×
423
  }
424

425

426
  @JsonProperty(JSON_PROPERTY_STATUS)
427
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
428
  public void setStatus(StatusEnum status) {
429
    this.status = status;
×
430
  }
×
431

432

433
  public BalanceAccount timeZone(String timeZone) {
434
    this.timeZone = timeZone;
×
435
    return this;
×
436
  }
437

438
   /**
439
   * The time zone of the balance account. For example, **Europe/Amsterdam**. Defaults to the time zone of the account holder if no time zone is set. For possible values, see the [list of time zone codes](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones).
440
   * @return timeZone
441
  **/
442
  @ApiModelProperty(value = "The time zone of the balance account. For example, **Europe/Amsterdam**. Defaults to the time zone of the account holder if no time zone is set. For possible values, see the [list of time zone codes](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones).")
443
  @JsonProperty(JSON_PROPERTY_TIME_ZONE)
444
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
445

446
  public String getTimeZone() {
447
    return timeZone;
×
448
  }
449

450

451
  @JsonProperty(JSON_PROPERTY_TIME_ZONE)
452
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
453
  public void setTimeZone(String timeZone) {
454
    this.timeZone = timeZone;
×
455
  }
×
456

457

458
  /**
459
   * Return true if this BalanceAccount object is equal to o.
460
   */
461
  @Override
462
  public boolean equals(Object o) {
463
    if (this == o) {
×
464
      return true;
×
465
    }
466
    if (o == null || getClass() != o.getClass()) {
×
467
      return false;
×
468
    }
469
    BalanceAccount balanceAccount = (BalanceAccount) o;
×
470
    return Objects.equals(this.accountHolderId, balanceAccount.accountHolderId) &&
×
471
        Objects.equals(this.balances, balanceAccount.balances) &&
×
472
        Objects.equals(this.defaultCurrencyCode, balanceAccount.defaultCurrencyCode) &&
×
473
        Objects.equals(this.description, balanceAccount.description) &&
×
474
        Objects.equals(this.id, balanceAccount.id) &&
×
475
        Objects.equals(this.metadata, balanceAccount.metadata) &&
×
476
        Objects.equals(this.migratedAccountCode, balanceAccount.migratedAccountCode) &&
×
477
        Objects.equals(this.paymentInstruments, balanceAccount.paymentInstruments) &&
×
478
        Objects.equals(this.platformPaymentConfiguration, balanceAccount.platformPaymentConfiguration) &&
×
479
        Objects.equals(this.reference, balanceAccount.reference) &&
×
480
        Objects.equals(this.status, balanceAccount.status) &&
×
481
        Objects.equals(this.timeZone, balanceAccount.timeZone);
×
482
  }
483

484
  @Override
485
  public int hashCode() {
486
    return Objects.hash(accountHolderId, balances, defaultCurrencyCode, description, id, metadata, migratedAccountCode, paymentInstruments, platformPaymentConfiguration, reference, status, timeZone);
×
487
  }
488

489
  @Override
490
  public String toString() {
491
    StringBuilder sb = new StringBuilder();
×
492
    sb.append("class BalanceAccount {\n");
×
493
    sb.append("    accountHolderId: ").append(toIndentedString(accountHolderId)).append("\n");
×
494
    sb.append("    balances: ").append(toIndentedString(balances)).append("\n");
×
495
    sb.append("    defaultCurrencyCode: ").append(toIndentedString(defaultCurrencyCode)).append("\n");
×
496
    sb.append("    description: ").append(toIndentedString(description)).append("\n");
×
497
    sb.append("    id: ").append(toIndentedString(id)).append("\n");
×
498
    sb.append("    metadata: ").append(toIndentedString(metadata)).append("\n");
×
499
    sb.append("    migratedAccountCode: ").append(toIndentedString(migratedAccountCode)).append("\n");
×
500
    sb.append("    paymentInstruments: ").append(toIndentedString(paymentInstruments)).append("\n");
×
501
    sb.append("    platformPaymentConfiguration: ").append(toIndentedString(platformPaymentConfiguration)).append("\n");
×
502
    sb.append("    reference: ").append(toIndentedString(reference)).append("\n");
×
503
    sb.append("    status: ").append(toIndentedString(status)).append("\n");
×
504
    sb.append("    timeZone: ").append(toIndentedString(timeZone)).append("\n");
×
505
    sb.append("}");
×
506
    return sb.toString();
×
507
  }
508

509
  /**
510
   * Convert the given object to string with each line indented by 4 spaces
511
   * (except the first line).
512
   */
513
  private String toIndentedString(Object o) {
514
    if (o == null) {
×
515
      return "null";
×
516
    }
517
    return o.toString().replace("\n", "\n    ");
×
518
  }
519

520
/**
521
   * Create an instance of BalanceAccount given an JSON string
522
   *
523
   * @param jsonString JSON string
524
   * @return An instance of BalanceAccount
525
   * @throws JsonProcessingException if the JSON string is invalid with respect to BalanceAccount
526
   */
527
  public static BalanceAccount fromJson(String jsonString) throws JsonProcessingException {
528
    return JSON.getMapper().readValue(jsonString, BalanceAccount.class);
×
529
  }
530
/**
531
  * Convert an instance of BalanceAccount to an JSON string
532
  *
533
  * @return JSON string
534
  */
535
  public String toJson() throws JsonProcessingException {
536
    return JSON.getMapper().writeValueAsString(this);
×
537
  }
538
}
539

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