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

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

22 Sep 2023 11:24AM UTC coverage: 12.611%. First build
#2661

push

web-flow
Merge 251f6ff51 into 9e36e9c01

9262 of 9262 new or added lines in 142 files covered. (100.0%)

11033 of 87486 relevant lines covered (12.61%)

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/marketpayaccount/CreateAccountHolderResponse.java
1
/*
2
 * Account API
3
 * This API is used for the classic integration. If you are just starting your implementation, refer to our [new integration guide](https://docs.adyen.com/marketplaces-and-platforms) instead.  The Account API provides endpoints for managing account-related entities on your platform. These related entities include account holders, accounts, bank accounts, shareholders, and verification-related documents. The management operations include actions such as creation, retrieval, updating, and deletion of them.  For more information, refer to our [documentation](https://docs.adyen.com/marketplaces-and-platforms/classic). ## Authentication Your Adyen contact will provide your API credential and an API key. To connect to the API, add an `X-API-Key` header with the API key as the value, for example:   ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: YOUR_API_KEY\" \\ ... ```  Alternatively, you can use the username and password to connect to the API using basic authentication. For example:  ``` curl -U \"ws@MarketPlace.YOUR_PLATFORM_ACCOUNT\":\"YOUR_WS_PASSWORD\" \\ -H \"Content-Type: application/json\" \\ ... ``` When going live, you need to generate new web service user credentials to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints).  ## Versioning The Account API supports [versioning](https://docs.adyen.com/development-resources/versioning) using a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number.  For example: ``` https://cal-test.adyen.com/cal/services/Account/v6/createAccountHolder ```
4
 *
5
 * The version of the OpenAPI document: 6
6
 * 
7
 *
8
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
 * https://openapi-generator.tech
10
 * Do not edit the class manually.
11
 */
12

13

14
package com.adyen.model.marketpayaccount;
15

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

36

37
/**
38
 * CreateAccountHolderResponse
39
 */
40
@JsonPropertyOrder({
41
  CreateAccountHolderResponse.JSON_PROPERTY_ACCOUNT_CODE,
42
  CreateAccountHolderResponse.JSON_PROPERTY_ACCOUNT_HOLDER_CODE,
43
  CreateAccountHolderResponse.JSON_PROPERTY_ACCOUNT_HOLDER_DETAILS,
44
  CreateAccountHolderResponse.JSON_PROPERTY_ACCOUNT_HOLDER_STATUS,
45
  CreateAccountHolderResponse.JSON_PROPERTY_DESCRIPTION,
46
  CreateAccountHolderResponse.JSON_PROPERTY_INVALID_FIELDS,
47
  CreateAccountHolderResponse.JSON_PROPERTY_LEGAL_ENTITY,
48
  CreateAccountHolderResponse.JSON_PROPERTY_PRIMARY_CURRENCY,
49
  CreateAccountHolderResponse.JSON_PROPERTY_PSP_REFERENCE,
50
  CreateAccountHolderResponse.JSON_PROPERTY_RESULT_CODE,
51
  CreateAccountHolderResponse.JSON_PROPERTY_VERIFICATION,
52
  CreateAccountHolderResponse.JSON_PROPERTY_VERIFICATION_PROFILE
53
})
54

55
public class CreateAccountHolderResponse {
56
  public static final String JSON_PROPERTY_ACCOUNT_CODE = "accountCode";
57
  private String accountCode;
58

59
  public static final String JSON_PROPERTY_ACCOUNT_HOLDER_CODE = "accountHolderCode";
60
  private String accountHolderCode;
61

62
  public static final String JSON_PROPERTY_ACCOUNT_HOLDER_DETAILS = "accountHolderDetails";
63
  private AccountHolderDetails accountHolderDetails;
64

65
  public static final String JSON_PROPERTY_ACCOUNT_HOLDER_STATUS = "accountHolderStatus";
66
  private AccountHolderStatus accountHolderStatus;
67

68
  public static final String JSON_PROPERTY_DESCRIPTION = "description";
69
  private String description;
70

71
  public static final String JSON_PROPERTY_INVALID_FIELDS = "invalidFields";
72
  private List<ErrorFieldType> invalidFields = null;
×
73

74
  /**
75
   * The type of legal entity of the new account holder.
76
   */
77
  public enum LegalEntityEnum {
×
78
    BUSINESS("Business"),
×
79
    
80
    INDIVIDUAL("Individual"),
×
81
    
82
    NONPROFIT("NonProfit"),
×
83
    
84
    PARTNERSHIP("Partnership"),
×
85
    
86
    PUBLICCOMPANY("PublicCompany");
×
87

88
    private String value;
89

90
    LegalEntityEnum(String value) {
×
91
      this.value = value;
×
92
    }
×
93

94
    @JsonValue
95
    public String getValue() {
96
      return value;
×
97
    }
98

99
    @Override
100
    public String toString() {
101
      return String.valueOf(value);
×
102
    }
103

104
    @JsonCreator
105
    public static LegalEntityEnum fromValue(String value) {
106
      for (LegalEntityEnum b : LegalEntityEnum.values()) {
×
107
        if (b.value.equals(value)) {
×
108
          return b;
×
109
        }
110
      }
111
      throw new IllegalArgumentException("Unexpected value '" + value + "'");
×
112
    }
113
  }
114

115
  public static final String JSON_PROPERTY_LEGAL_ENTITY = "legalEntity";
116
  private LegalEntityEnum legalEntity;
117

118
  public static final String JSON_PROPERTY_PRIMARY_CURRENCY = "primaryCurrency";
119
  private String primaryCurrency;
120

121
  public static final String JSON_PROPERTY_PSP_REFERENCE = "pspReference";
122
  private String pspReference;
123

124
  public static final String JSON_PROPERTY_RESULT_CODE = "resultCode";
125
  private String resultCode;
126

127
  public static final String JSON_PROPERTY_VERIFICATION = "verification";
128
  private KYCVerificationResult verification;
129

130
  public static final String JSON_PROPERTY_VERIFICATION_PROFILE = "verificationProfile";
131
  private String verificationProfile;
132

133
  public CreateAccountHolderResponse() { 
×
134
  }
×
135

136
  public CreateAccountHolderResponse accountCode(String accountCode) {
137
    this.accountCode = accountCode;
×
138
    return this;
×
139
  }
140

141
   /**
142
   * The code of a new account created for the account holder.
143
   * @return accountCode
144
  **/
145
  @ApiModelProperty(value = "The code of a new account created for the account holder.")
146
  @JsonProperty(JSON_PROPERTY_ACCOUNT_CODE)
147
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
148

149
  public String getAccountCode() {
150
    return accountCode;
×
151
  }
152

153

154
  @JsonProperty(JSON_PROPERTY_ACCOUNT_CODE)
155
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
156
  public void setAccountCode(String accountCode) {
157
    this.accountCode = accountCode;
×
158
  }
×
159

160

161
  public CreateAccountHolderResponse accountHolderCode(String accountHolderCode) {
162
    this.accountHolderCode = accountHolderCode;
×
163
    return this;
×
164
  }
165

166
   /**
167
   * The code of the new account holder.
168
   * @return accountHolderCode
169
  **/
170
  @ApiModelProperty(value = "The code of the new account holder.")
171
  @JsonProperty(JSON_PROPERTY_ACCOUNT_HOLDER_CODE)
172
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
173

174
  public String getAccountHolderCode() {
175
    return accountHolderCode;
×
176
  }
177

178

179
  @JsonProperty(JSON_PROPERTY_ACCOUNT_HOLDER_CODE)
180
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
181
  public void setAccountHolderCode(String accountHolderCode) {
182
    this.accountHolderCode = accountHolderCode;
×
183
  }
×
184

185

186
  public CreateAccountHolderResponse accountHolderDetails(AccountHolderDetails accountHolderDetails) {
187
    this.accountHolderDetails = accountHolderDetails;
×
188
    return this;
×
189
  }
190

191
   /**
192
   * Get accountHolderDetails
193
   * @return accountHolderDetails
194
  **/
195
  @ApiModelProperty(value = "")
196
  @JsonProperty(JSON_PROPERTY_ACCOUNT_HOLDER_DETAILS)
197
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
198

199
  public AccountHolderDetails getAccountHolderDetails() {
200
    return accountHolderDetails;
×
201
  }
202

203

204
  @JsonProperty(JSON_PROPERTY_ACCOUNT_HOLDER_DETAILS)
205
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
206
  public void setAccountHolderDetails(AccountHolderDetails accountHolderDetails) {
207
    this.accountHolderDetails = accountHolderDetails;
×
208
  }
×
209

210

211
  public CreateAccountHolderResponse accountHolderStatus(AccountHolderStatus accountHolderStatus) {
212
    this.accountHolderStatus = accountHolderStatus;
×
213
    return this;
×
214
  }
215

216
   /**
217
   * Get accountHolderStatus
218
   * @return accountHolderStatus
219
  **/
220
  @ApiModelProperty(value = "")
221
  @JsonProperty(JSON_PROPERTY_ACCOUNT_HOLDER_STATUS)
222
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
223

224
  public AccountHolderStatus getAccountHolderStatus() {
225
    return accountHolderStatus;
×
226
  }
227

228

229
  @JsonProperty(JSON_PROPERTY_ACCOUNT_HOLDER_STATUS)
230
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
231
  public void setAccountHolderStatus(AccountHolderStatus accountHolderStatus) {
232
    this.accountHolderStatus = accountHolderStatus;
×
233
  }
×
234

235

236
  public CreateAccountHolderResponse description(String description) {
237
    this.description = description;
×
238
    return this;
×
239
  }
240

241
   /**
242
   * The description of the new account holder.
243
   * @return description
244
  **/
245
  @ApiModelProperty(value = "The description of the new account holder.")
246
  @JsonProperty(JSON_PROPERTY_DESCRIPTION)
247
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
248

249
  public String getDescription() {
250
    return description;
×
251
  }
252

253

254
  @JsonProperty(JSON_PROPERTY_DESCRIPTION)
255
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
256
  public void setDescription(String description) {
257
    this.description = description;
×
258
  }
×
259

260

261
  public CreateAccountHolderResponse invalidFields(List<ErrorFieldType> invalidFields) {
262
    this.invalidFields = invalidFields;
×
263
    return this;
×
264
  }
265

266
  public CreateAccountHolderResponse addInvalidFieldsItem(ErrorFieldType invalidFieldsItem) {
267
    if (this.invalidFields == null) {
×
268
      this.invalidFields = new ArrayList<>();
×
269
    }
270
    this.invalidFields.add(invalidFieldsItem);
×
271
    return this;
×
272
  }
273

274
   /**
275
   * A list of fields that caused the &#x60;/createAccountHolder&#x60; request to fail.
276
   * @return invalidFields
277
  **/
278
  @ApiModelProperty(value = "A list of fields that caused the `/createAccountHolder` request to fail.")
279
  @JsonProperty(JSON_PROPERTY_INVALID_FIELDS)
280
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
281

282
  public List<ErrorFieldType> getInvalidFields() {
283
    return invalidFields;
×
284
  }
285

286

287
  @JsonProperty(JSON_PROPERTY_INVALID_FIELDS)
288
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
289
  public void setInvalidFields(List<ErrorFieldType> invalidFields) {
290
    this.invalidFields = invalidFields;
×
291
  }
×
292

293

294
  public CreateAccountHolderResponse legalEntity(LegalEntityEnum legalEntity) {
295
    this.legalEntity = legalEntity;
×
296
    return this;
×
297
  }
298

299
   /**
300
   * The type of legal entity of the new account holder.
301
   * @return legalEntity
302
  **/
303
  @ApiModelProperty(value = "The type of legal entity of the new account holder.")
304
  @JsonProperty(JSON_PROPERTY_LEGAL_ENTITY)
305
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
306

307
  public LegalEntityEnum getLegalEntity() {
308
    return legalEntity;
×
309
  }
310

311

312
  @JsonProperty(JSON_PROPERTY_LEGAL_ENTITY)
313
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
314
  public void setLegalEntity(LegalEntityEnum legalEntity) {
315
    this.legalEntity = legalEntity;
×
316
  }
×
317

318

319
  public CreateAccountHolderResponse primaryCurrency(String primaryCurrency) {
320
    this.primaryCurrency = primaryCurrency;
×
321
    return this;
×
322
  }
323

324
   /**
325
   * The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes), with which the prospective account holder primarily deals.
326
   * @return primaryCurrency
327
   * @deprecated
328
  **/
329
  @Deprecated
330
  @ApiModelProperty(value = "The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes), with which the prospective account holder primarily deals.")
331
  @JsonProperty(JSON_PROPERTY_PRIMARY_CURRENCY)
332
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
333

334
  public String getPrimaryCurrency() {
335
    return primaryCurrency;
×
336
  }
337

338

339
  @Deprecated
340
  @JsonProperty(JSON_PROPERTY_PRIMARY_CURRENCY)
341
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
342
  public void setPrimaryCurrency(String primaryCurrency) {
343
    this.primaryCurrency = primaryCurrency;
×
344
  }
×
345

346

347
  public CreateAccountHolderResponse pspReference(String pspReference) {
348
    this.pspReference = pspReference;
×
349
    return this;
×
350
  }
351

352
   /**
353
   * The reference of a request. Can be used to uniquely identify the request.
354
   * @return pspReference
355
  **/
356
  @ApiModelProperty(value = "The reference of a request. Can be used to uniquely identify the request.")
357
  @JsonProperty(JSON_PROPERTY_PSP_REFERENCE)
358
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
359

360
  public String getPspReference() {
361
    return pspReference;
×
362
  }
363

364

365
  @JsonProperty(JSON_PROPERTY_PSP_REFERENCE)
366
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
367
  public void setPspReference(String pspReference) {
368
    this.pspReference = pspReference;
×
369
  }
×
370

371

372
  public CreateAccountHolderResponse resultCode(String resultCode) {
373
    this.resultCode = resultCode;
×
374
    return this;
×
375
  }
376

377
   /**
378
   * The result code.
379
   * @return resultCode
380
  **/
381
  @ApiModelProperty(value = "The result code.")
382
  @JsonProperty(JSON_PROPERTY_RESULT_CODE)
383
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
384

385
  public String getResultCode() {
386
    return resultCode;
×
387
  }
388

389

390
  @JsonProperty(JSON_PROPERTY_RESULT_CODE)
391
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
392
  public void setResultCode(String resultCode) {
393
    this.resultCode = resultCode;
×
394
  }
×
395

396

397
  public CreateAccountHolderResponse verification(KYCVerificationResult verification) {
398
    this.verification = verification;
×
399
    return this;
×
400
  }
401

402
   /**
403
   * Get verification
404
   * @return verification
405
  **/
406
  @ApiModelProperty(value = "")
407
  @JsonProperty(JSON_PROPERTY_VERIFICATION)
408
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
409

410
  public KYCVerificationResult getVerification() {
411
    return verification;
×
412
  }
413

414

415
  @JsonProperty(JSON_PROPERTY_VERIFICATION)
416
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
417
  public void setVerification(KYCVerificationResult verification) {
418
    this.verification = verification;
×
419
  }
×
420

421

422
  public CreateAccountHolderResponse verificationProfile(String verificationProfile) {
423
    this.verificationProfile = verificationProfile;
×
424
    return this;
×
425
  }
426

427
   /**
428
   * The identifier of the profile that applies to this entity.
429
   * @return verificationProfile
430
  **/
431
  @ApiModelProperty(value = "The identifier of the profile that applies to this entity.")
432
  @JsonProperty(JSON_PROPERTY_VERIFICATION_PROFILE)
433
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
434

435
  public String getVerificationProfile() {
436
    return verificationProfile;
×
437
  }
438

439

440
  @JsonProperty(JSON_PROPERTY_VERIFICATION_PROFILE)
441
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
442
  public void setVerificationProfile(String verificationProfile) {
443
    this.verificationProfile = verificationProfile;
×
444
  }
×
445

446

447
  /**
448
   * Return true if this CreateAccountHolderResponse object is equal to o.
449
   */
450
  @Override
451
  public boolean equals(Object o) {
452
    if (this == o) {
×
453
      return true;
×
454
    }
455
    if (o == null || getClass() != o.getClass()) {
×
456
      return false;
×
457
    }
458
    CreateAccountHolderResponse createAccountHolderResponse = (CreateAccountHolderResponse) o;
×
459
    return Objects.equals(this.accountCode, createAccountHolderResponse.accountCode) &&
×
460
        Objects.equals(this.accountHolderCode, createAccountHolderResponse.accountHolderCode) &&
×
461
        Objects.equals(this.accountHolderDetails, createAccountHolderResponse.accountHolderDetails) &&
×
462
        Objects.equals(this.accountHolderStatus, createAccountHolderResponse.accountHolderStatus) &&
×
463
        Objects.equals(this.description, createAccountHolderResponse.description) &&
×
464
        Objects.equals(this.invalidFields, createAccountHolderResponse.invalidFields) &&
×
465
        Objects.equals(this.legalEntity, createAccountHolderResponse.legalEntity) &&
×
466
        Objects.equals(this.primaryCurrency, createAccountHolderResponse.primaryCurrency) &&
×
467
        Objects.equals(this.pspReference, createAccountHolderResponse.pspReference) &&
×
468
        Objects.equals(this.resultCode, createAccountHolderResponse.resultCode) &&
×
469
        Objects.equals(this.verification, createAccountHolderResponse.verification) &&
×
470
        Objects.equals(this.verificationProfile, createAccountHolderResponse.verificationProfile);
×
471
  }
472

473
  @Override
474
  public int hashCode() {
475
    return Objects.hash(accountCode, accountHolderCode, accountHolderDetails, accountHolderStatus, description, invalidFields, legalEntity, primaryCurrency, pspReference, resultCode, verification, verificationProfile);
×
476
  }
477

478
  @Override
479
  public String toString() {
480
    StringBuilder sb = new StringBuilder();
×
481
    sb.append("class CreateAccountHolderResponse {\n");
×
482
    sb.append("    accountCode: ").append(toIndentedString(accountCode)).append("\n");
×
483
    sb.append("    accountHolderCode: ").append(toIndentedString(accountHolderCode)).append("\n");
×
484
    sb.append("    accountHolderDetails: ").append(toIndentedString(accountHolderDetails)).append("\n");
×
485
    sb.append("    accountHolderStatus: ").append(toIndentedString(accountHolderStatus)).append("\n");
×
486
    sb.append("    description: ").append(toIndentedString(description)).append("\n");
×
487
    sb.append("    invalidFields: ").append(toIndentedString(invalidFields)).append("\n");
×
488
    sb.append("    legalEntity: ").append(toIndentedString(legalEntity)).append("\n");
×
489
    sb.append("    primaryCurrency: ").append(toIndentedString(primaryCurrency)).append("\n");
×
490
    sb.append("    pspReference: ").append(toIndentedString(pspReference)).append("\n");
×
491
    sb.append("    resultCode: ").append(toIndentedString(resultCode)).append("\n");
×
492
    sb.append("    verification: ").append(toIndentedString(verification)).append("\n");
×
493
    sb.append("    verificationProfile: ").append(toIndentedString(verificationProfile)).append("\n");
×
494
    sb.append("}");
×
495
    return sb.toString();
×
496
  }
497

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

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

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