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

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

16 Oct 2023 09:08AM CUT coverage: 12.568%. First build
#2703

push

web-flow
Merge 5bb3765b7 into fe719ccb3

6014 of 6014 new or added lines in 86 files covered. (100.0%)

11852 of 94302 relevant lines covered (12.57%)

0.13 hits per line

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

30.58
/src/main/java/com/adyen/model/marketpaywebhooks/CreateAccountHolderResponse.java
1
/*
2
 * Classic Platforms - Notifications
3
 *
4
 * The version of the OpenAPI document: 6
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.marketpaywebhooks;
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.marketpaywebhooks.AccountHolderDetails;
20
import com.adyen.model.marketpaywebhooks.AccountHolderStatus;
21
import com.adyen.model.marketpaywebhooks.ErrorFieldType;
22
import com.adyen.model.marketpaywebhooks.KYCVerificationResult;
23
import com.fasterxml.jackson.annotation.JsonInclude;
24
import com.fasterxml.jackson.annotation.JsonProperty;
25
import com.fasterxml.jackson.annotation.JsonCreator;
26
import com.fasterxml.jackson.annotation.JsonTypeName;
27
import com.fasterxml.jackson.annotation.JsonValue;
28
import io.swagger.annotations.ApiModel;
29
import io.swagger.annotations.ApiModelProperty;
30
import java.util.ArrayList;
31
import java.util.List;
32
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
33
import com.fasterxml.jackson.core.JsonProcessingException;
34

35

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

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

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

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

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

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

70
  public static final String JSON_PROPERTY_INVALID_FIELDS = "invalidFields";
71
  private List<ErrorFieldType> invalidFields = null;
1✔
72

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

87
    private String value;
88

89
    LegalEntityEnum(String value) {
1✔
90
      this.value = value;
1✔
91
    }
1✔
92

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

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

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

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

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

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

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

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

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

132
  public CreateAccountHolderResponse() { 
1✔
133
  }
1✔
134

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

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

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

152

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

159

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

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

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

177

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

184

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

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

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

202

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

209

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

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

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

227

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

234

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

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

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

252

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

259

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

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

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

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

285

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

292

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

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

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

310

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

317

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

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

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

337

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

345

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

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

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

363

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

370

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

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

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

388

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

395

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

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

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

413

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

420

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

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

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

438

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

445

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

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

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

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

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

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

© 2025 Coveralls, Inc