• 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

19.2
/src/main/java/com/adyen/model/configurationwebhooks/AccountHolder.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.AccountHolderCapability;
20
import com.adyen.model.configurationwebhooks.ContactDetails;
21
import com.fasterxml.jackson.annotation.JsonInclude;
22
import com.fasterxml.jackson.annotation.JsonProperty;
23
import com.fasterxml.jackson.annotation.JsonCreator;
24
import com.fasterxml.jackson.annotation.JsonTypeName;
25
import com.fasterxml.jackson.annotation.JsonValue;
26
import io.swagger.annotations.ApiModel;
27
import io.swagger.annotations.ApiModelProperty;
28
import java.util.HashMap;
29
import java.util.List;
30
import java.util.Map;
31
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
32
import com.fasterxml.jackson.core.JsonProcessingException;
33

34

35
/**
36
 * AccountHolder
37
 */
38
@JsonPropertyOrder({
39
  AccountHolder.JSON_PROPERTY_BALANCE_PLATFORM,
40
  AccountHolder.JSON_PROPERTY_CAPABILITIES,
41
  AccountHolder.JSON_PROPERTY_CONTACT_DETAILS,
42
  AccountHolder.JSON_PROPERTY_DESCRIPTION,
43
  AccountHolder.JSON_PROPERTY_ID,
44
  AccountHolder.JSON_PROPERTY_LEGAL_ENTITY_ID,
45
  AccountHolder.JSON_PROPERTY_METADATA,
46
  AccountHolder.JSON_PROPERTY_MIGRATED_ACCOUNT_HOLDER_CODE,
47
  AccountHolder.JSON_PROPERTY_PRIMARY_BALANCE_ACCOUNT,
48
  AccountHolder.JSON_PROPERTY_REFERENCE,
49
  AccountHolder.JSON_PROPERTY_STATUS,
50
  AccountHolder.JSON_PROPERTY_TIME_ZONE
51
})
52

53
public class AccountHolder {
54
  public static final String JSON_PROPERTY_BALANCE_PLATFORM = "balancePlatform";
55
  private String balancePlatform;
56

57
  public static final String JSON_PROPERTY_CAPABILITIES = "capabilities";
58
  private Map<String, AccountHolderCapability> capabilities = null;
1✔
59

60
  public static final String JSON_PROPERTY_CONTACT_DETAILS = "contactDetails";
61
  private ContactDetails contactDetails;
62

63
  public static final String JSON_PROPERTY_DESCRIPTION = "description";
64
  private String description;
65

66
  public static final String JSON_PROPERTY_ID = "id";
67
  private String id;
68

69
  public static final String JSON_PROPERTY_LEGAL_ENTITY_ID = "legalEntityId";
70
  private String legalEntityId;
71

72
  public static final String JSON_PROPERTY_METADATA = "metadata";
73
  private Map<String, String> metadata = null;
1✔
74

75
  public static final String JSON_PROPERTY_MIGRATED_ACCOUNT_HOLDER_CODE = "migratedAccountHolderCode";
76
  private String migratedAccountHolderCode;
77

78
  public static final String JSON_PROPERTY_PRIMARY_BALANCE_ACCOUNT = "primaryBalanceAccount";
79
  private String primaryBalanceAccount;
80

81
  public static final String JSON_PROPERTY_REFERENCE = "reference";
82
  private String reference;
83

84
  /**
85
   * The status of the account holder.  Possible values:    * **Active**: The account holder is active. This is the default status when creating an account holder.    * **Inactive (Deprecated)**: The account holder is temporarily inactive due to missing KYC details. You can set the account back to active by providing the missing KYC details.    * **Suspended**: The account holder is permanently deactivated by Adyen. This action cannot be undone.   * **Closed**: The account holder is permanently deactivated by you. This action cannot be undone.
86
   */
87
  public enum StatusEnum {
1✔
88
    ACTIVE("Active"),
1✔
89
    
90
    CLOSED("Closed"),
1✔
91
    
92
    INACTIVE("Inactive"),
1✔
93
    
94
    SUSPENDED("Suspended");
1✔
95

96
    private String value;
97

98
    StatusEnum(String value) {
1✔
99
      this.value = value;
1✔
100
    }
1✔
101

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

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

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

123
  public static final String JSON_PROPERTY_STATUS = "status";
124
  private StatusEnum status;
125

126
  public static final String JSON_PROPERTY_TIME_ZONE = "timeZone";
127
  private String timeZone;
128

129
  public AccountHolder() { 
1✔
130
  }
1✔
131

132
  public AccountHolder balancePlatform(String balancePlatform) {
133
    this.balancePlatform = balancePlatform;
×
134
    return this;
×
135
  }
136

137
   /**
138
   * The unique identifier of the [balance platform](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/get/balancePlatforms/{id}__queryParam_id) to which the account holder belongs. Required in the request if your API credentials can be used for multiple balance platforms.
139
   * @return balancePlatform
140
  **/
141
  @ApiModelProperty(value = "The unique identifier of the [balance platform](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/get/balancePlatforms/{id}__queryParam_id) to which the account holder belongs. Required in the request if your API credentials can be used for multiple balance platforms.")
142
  @JsonProperty(JSON_PROPERTY_BALANCE_PLATFORM)
143
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
144

145
  public String getBalancePlatform() {
146
    return balancePlatform;
×
147
  }
148

149

150
  @JsonProperty(JSON_PROPERTY_BALANCE_PLATFORM)
151
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
152
  public void setBalancePlatform(String balancePlatform) {
153
    this.balancePlatform = balancePlatform;
×
154
  }
×
155

156

157
  public AccountHolder capabilities(Map<String, AccountHolderCapability> capabilities) {
158
    this.capabilities = capabilities;
×
159
    return this;
×
160
  }
161

162
  public AccountHolder putCapabilitiesItem(String key, AccountHolderCapability capabilitiesItem) {
163
    if (this.capabilities == null) {
×
164
      this.capabilities = new HashMap<>();
×
165
    }
166
    this.capabilities.put(key, capabilitiesItem);
×
167
    return this;
×
168
  }
169

170
   /**
171
   * Contains key-value pairs that specify the actions that an account holder can do in your platform. The key is a capability required for your integration. For example, **issueCard** for Issuing. The value is an object containing the settings for the capability.
172
   * @return capabilities
173
  **/
174
  @ApiModelProperty(value = "Contains key-value pairs that specify the actions that an account holder can do in your platform. The key is a capability required for your integration. For example, **issueCard** for Issuing. The value is an object containing the settings for the capability.")
175
  @JsonProperty(JSON_PROPERTY_CAPABILITIES)
176
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
177

178
  public Map<String, AccountHolderCapability> getCapabilities() {
179
    return capabilities;
×
180
  }
181

182

183
  @JsonProperty(JSON_PROPERTY_CAPABILITIES)
184
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
185
  public void setCapabilities(Map<String, AccountHolderCapability> capabilities) {
186
    this.capabilities = capabilities;
×
187
  }
×
188

189

190
  public AccountHolder contactDetails(ContactDetails contactDetails) {
191
    this.contactDetails = contactDetails;
×
192
    return this;
×
193
  }
194

195
   /**
196
   * Get contactDetails
197
   * @return contactDetails
198
  **/
199
  @ApiModelProperty(value = "")
200
  @JsonProperty(JSON_PROPERTY_CONTACT_DETAILS)
201
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
202

203
  public ContactDetails getContactDetails() {
204
    return contactDetails;
×
205
  }
206

207

208
  @JsonProperty(JSON_PROPERTY_CONTACT_DETAILS)
209
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
210
  public void setContactDetails(ContactDetails contactDetails) {
211
    this.contactDetails = contactDetails;
1✔
212
  }
1✔
213

214

215
  public AccountHolder description(String description) {
216
    this.description = description;
×
217
    return this;
×
218
  }
219

220
   /**
221
   * Your description for the account holder, maximum 300 characters.
222
   * @return description
223
  **/
224
  @ApiModelProperty(value = "Your description for the account holder, maximum 300 characters.")
225
  @JsonProperty(JSON_PROPERTY_DESCRIPTION)
226
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
227

228
  public String getDescription() {
229
    return description;
×
230
  }
231

232

233
  @JsonProperty(JSON_PROPERTY_DESCRIPTION)
234
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
235
  public void setDescription(String description) {
236
    this.description = description;
1✔
237
  }
1✔
238

239

240
  public AccountHolder id(String id) {
241
    this.id = id;
×
242
    return this;
×
243
  }
244

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

253
  public String getId() {
254
    return id;
1✔
255
  }
256

257

258
  @JsonProperty(JSON_PROPERTY_ID)
259
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
260
  public void setId(String id) {
261
    this.id = id;
1✔
262
  }
1✔
263

264

265
  public AccountHolder legalEntityId(String legalEntityId) {
266
    this.legalEntityId = legalEntityId;
×
267
    return this;
×
268
  }
269

270
   /**
271
   * The unique identifier of the [legal entity](https://docs.adyen.com/api-explorer/legalentity/latest/post/legalEntities#responses-200-id) associated with the account holder. Adyen performs a verification process against the legal entity of the account holder.
272
   * @return legalEntityId
273
  **/
274
  @ApiModelProperty(required = true, value = "The unique identifier of the [legal entity](https://docs.adyen.com/api-explorer/legalentity/latest/post/legalEntities#responses-200-id) associated with the account holder. Adyen performs a verification process against the legal entity of the account holder.")
275
  @JsonProperty(JSON_PROPERTY_LEGAL_ENTITY_ID)
276
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
277

278
  public String getLegalEntityId() {
279
    return legalEntityId;
×
280
  }
281

282

283
  @JsonProperty(JSON_PROPERTY_LEGAL_ENTITY_ID)
284
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
285
  public void setLegalEntityId(String legalEntityId) {
286
    this.legalEntityId = legalEntityId;
×
287
  }
×
288

289

290
  public AccountHolder metadata(Map<String, String> metadata) {
291
    this.metadata = metadata;
×
292
    return this;
×
293
  }
294

295
  public AccountHolder putMetadataItem(String key, String metadataItem) {
296
    if (this.metadata == null) {
×
297
      this.metadata = new HashMap<>();
×
298
    }
299
    this.metadata.put(key, metadataItem);
×
300
    return this;
×
301
  }
302

303
   /**
304
   * 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.
305
   * @return metadata
306
  **/
307
  @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.")
308
  @JsonProperty(JSON_PROPERTY_METADATA)
309
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
310

311
  public Map<String, String> getMetadata() {
312
    return metadata;
×
313
  }
314

315

316
  @JsonProperty(JSON_PROPERTY_METADATA)
317
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
318
  public void setMetadata(Map<String, String> metadata) {
319
    this.metadata = metadata;
×
320
  }
×
321

322

323
  public AccountHolder migratedAccountHolderCode(String migratedAccountHolderCode) {
324
    this.migratedAccountHolderCode = migratedAccountHolderCode;
×
325
    return this;
×
326
  }
327

328
   /**
329
   * The unique identifier of the migrated account holder in the classic integration.
330
   * @return migratedAccountHolderCode
331
  **/
332
  @ApiModelProperty(value = "The unique identifier of the migrated account holder in the classic integration.")
333
  @JsonProperty(JSON_PROPERTY_MIGRATED_ACCOUNT_HOLDER_CODE)
334
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
335

336
  public String getMigratedAccountHolderCode() {
337
    return migratedAccountHolderCode;
×
338
  }
339

340

341
  @JsonProperty(JSON_PROPERTY_MIGRATED_ACCOUNT_HOLDER_CODE)
342
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
343
  public void setMigratedAccountHolderCode(String migratedAccountHolderCode) {
344
    this.migratedAccountHolderCode = migratedAccountHolderCode;
×
345
  }
×
346

347

348
  public AccountHolder primaryBalanceAccount(String primaryBalanceAccount) {
349
    this.primaryBalanceAccount = primaryBalanceAccount;
×
350
    return this;
×
351
  }
352

353
   /**
354
   * The ID of the account holder&#39;s primary balance account. By default, this is set to the first balance account that you create for the account holder. To assign a different balance account, send a PATCH request.
355
   * @return primaryBalanceAccount
356
  **/
357
  @ApiModelProperty(value = "The ID of the account holder's primary balance account. By default, this is set to the first balance account that you create for the account holder. To assign a different balance account, send a PATCH request.")
358
  @JsonProperty(JSON_PROPERTY_PRIMARY_BALANCE_ACCOUNT)
359
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
360

361
  public String getPrimaryBalanceAccount() {
362
    return primaryBalanceAccount;
×
363
  }
364

365

366
  @JsonProperty(JSON_PROPERTY_PRIMARY_BALANCE_ACCOUNT)
367
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
368
  public void setPrimaryBalanceAccount(String primaryBalanceAccount) {
369
    this.primaryBalanceAccount = primaryBalanceAccount;
×
370
  }
×
371

372

373
  public AccountHolder reference(String reference) {
374
    this.reference = reference;
×
375
    return this;
×
376
  }
377

378
   /**
379
   * Your reference for the account holder, maximum 150 characters.
380
   * @return reference
381
  **/
382
  @ApiModelProperty(value = "Your reference for the account holder, maximum 150 characters.")
383
  @JsonProperty(JSON_PROPERTY_REFERENCE)
384
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
385

386
  public String getReference() {
387
    return reference;
×
388
  }
389

390

391
  @JsonProperty(JSON_PROPERTY_REFERENCE)
392
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
393
  public void setReference(String reference) {
394
    this.reference = reference;
×
395
  }
×
396

397

398
  public AccountHolder status(StatusEnum status) {
399
    this.status = status;
×
400
    return this;
×
401
  }
402

403
   /**
404
   * The status of the account holder.  Possible values:    * **Active**: The account holder is active. This is the default status when creating an account holder.    * **Inactive (Deprecated)**: The account holder is temporarily inactive due to missing KYC details. You can set the account back to active by providing the missing KYC details.    * **Suspended**: The account holder is permanently deactivated by Adyen. This action cannot be undone.   * **Closed**: The account holder is permanently deactivated by you. This action cannot be undone.
405
   * @return status
406
  **/
407
  @ApiModelProperty(value = "The status of the account holder.  Possible values:    * **Active**: The account holder is active. This is the default status when creating an account holder.    * **Inactive (Deprecated)**: The account holder is temporarily inactive due to missing KYC details. You can set the account back to active by providing the missing KYC details.    * **Suspended**: The account holder is permanently deactivated by Adyen. This action cannot be undone.   * **Closed**: The account holder is permanently deactivated by you. This action cannot be undone.")
408
  @JsonProperty(JSON_PROPERTY_STATUS)
409
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
410

411
  public StatusEnum getStatus() {
412
    return status;
×
413
  }
414

415

416
  @JsonProperty(JSON_PROPERTY_STATUS)
417
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
418
  public void setStatus(StatusEnum status) {
419
    this.status = status;
1✔
420
  }
1✔
421

422

423
  public AccountHolder timeZone(String timeZone) {
424
    this.timeZone = timeZone;
×
425
    return this;
×
426
  }
427

428
   /**
429
   * The time zone of the account holder. For example, **Europe/Amsterdam**. Defaults to the time zone of the balance platform 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).
430
   * @return timeZone
431
  **/
432
  @ApiModelProperty(value = "The time zone of the account holder. For example, **Europe/Amsterdam**. Defaults to the time zone of the balance platform 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).")
433
  @JsonProperty(JSON_PROPERTY_TIME_ZONE)
434
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
435

436
  public String getTimeZone() {
437
    return timeZone;
×
438
  }
439

440

441
  @JsonProperty(JSON_PROPERTY_TIME_ZONE)
442
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
443
  public void setTimeZone(String timeZone) {
444
    this.timeZone = timeZone;
×
445
  }
×
446

447

448
  /**
449
   * Return true if this AccountHolder object is equal to o.
450
   */
451
  @Override
452
  public boolean equals(Object o) {
453
    if (this == o) {
×
454
      return true;
×
455
    }
456
    if (o == null || getClass() != o.getClass()) {
×
457
      return false;
×
458
    }
459
    AccountHolder accountHolder = (AccountHolder) o;
×
460
    return Objects.equals(this.balancePlatform, accountHolder.balancePlatform) &&
×
461
        Objects.equals(this.capabilities, accountHolder.capabilities) &&
×
462
        Objects.equals(this.contactDetails, accountHolder.contactDetails) &&
×
463
        Objects.equals(this.description, accountHolder.description) &&
×
464
        Objects.equals(this.id, accountHolder.id) &&
×
465
        Objects.equals(this.legalEntityId, accountHolder.legalEntityId) &&
×
466
        Objects.equals(this.metadata, accountHolder.metadata) &&
×
467
        Objects.equals(this.migratedAccountHolderCode, accountHolder.migratedAccountHolderCode) &&
×
468
        Objects.equals(this.primaryBalanceAccount, accountHolder.primaryBalanceAccount) &&
×
469
        Objects.equals(this.reference, accountHolder.reference) &&
×
470
        Objects.equals(this.status, accountHolder.status) &&
×
471
        Objects.equals(this.timeZone, accountHolder.timeZone);
×
472
  }
473

474
  @Override
475
  public int hashCode() {
476
    return Objects.hash(balancePlatform, capabilities, contactDetails, description, id, legalEntityId, metadata, migratedAccountHolderCode, primaryBalanceAccount, reference, status, timeZone);
×
477
  }
478

479
  @Override
480
  public String toString() {
481
    StringBuilder sb = new StringBuilder();
×
482
    sb.append("class AccountHolder {\n");
×
483
    sb.append("    balancePlatform: ").append(toIndentedString(balancePlatform)).append("\n");
×
484
    sb.append("    capabilities: ").append(toIndentedString(capabilities)).append("\n");
×
485
    sb.append("    contactDetails: ").append(toIndentedString(contactDetails)).append("\n");
×
486
    sb.append("    description: ").append(toIndentedString(description)).append("\n");
×
487
    sb.append("    id: ").append(toIndentedString(id)).append("\n");
×
488
    sb.append("    legalEntityId: ").append(toIndentedString(legalEntityId)).append("\n");
×
489
    sb.append("    metadata: ").append(toIndentedString(metadata)).append("\n");
×
490
    sb.append("    migratedAccountHolderCode: ").append(toIndentedString(migratedAccountHolderCode)).append("\n");
×
491
    sb.append("    primaryBalanceAccount: ").append(toIndentedString(primaryBalanceAccount)).append("\n");
×
492
    sb.append("    reference: ").append(toIndentedString(reference)).append("\n");
×
493
    sb.append("    status: ").append(toIndentedString(status)).append("\n");
×
494
    sb.append("    timeZone: ").append(toIndentedString(timeZone)).append("\n");
×
495
    sb.append("}");
×
496
    return sb.toString();
×
497
  }
498

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

510
/**
511
   * Create an instance of AccountHolder given an JSON string
512
   *
513
   * @param jsonString JSON string
514
   * @return An instance of AccountHolder
515
   * @throws JsonProcessingException if the JSON string is invalid with respect to AccountHolder
516
   */
517
  public static AccountHolder fromJson(String jsonString) throws JsonProcessingException {
518
    return JSON.getMapper().readValue(jsonString, AccountHolder.class);
×
519
  }
520
/**
521
  * Convert an instance of AccountHolder to an JSON string
522
  *
523
  * @return JSON string
524
  */
525
  public String toJson() throws JsonProcessingException {
526
    return JSON.getMapper().writeValueAsString(this);
×
527
  }
528
}
529

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