• 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/UpdateAccountHolderResponse.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
 * UpdateAccountHolderResponse
39
 */
40
@JsonPropertyOrder({
41
  UpdateAccountHolderResponse.JSON_PROPERTY_ACCOUNT_HOLDER_CODE,
42
  UpdateAccountHolderResponse.JSON_PROPERTY_ACCOUNT_HOLDER_DETAILS,
43
  UpdateAccountHolderResponse.JSON_PROPERTY_ACCOUNT_HOLDER_STATUS,
44
  UpdateAccountHolderResponse.JSON_PROPERTY_DESCRIPTION,
45
  UpdateAccountHolderResponse.JSON_PROPERTY_INVALID_FIELDS,
46
  UpdateAccountHolderResponse.JSON_PROPERTY_LEGAL_ENTITY,
47
  UpdateAccountHolderResponse.JSON_PROPERTY_PRIMARY_CURRENCY,
48
  UpdateAccountHolderResponse.JSON_PROPERTY_PSP_REFERENCE,
49
  UpdateAccountHolderResponse.JSON_PROPERTY_RESULT_CODE,
50
  UpdateAccountHolderResponse.JSON_PROPERTY_VERIFICATION,
51
  UpdateAccountHolderResponse.JSON_PROPERTY_VERIFICATION_PROFILE
52
})
53

54
public class UpdateAccountHolderResponse {
55
  public static final String JSON_PROPERTY_ACCOUNT_HOLDER_CODE = "accountHolderCode";
56
  private String accountHolderCode;
57

58
  public static final String JSON_PROPERTY_ACCOUNT_HOLDER_DETAILS = "accountHolderDetails";
59
  private AccountHolderDetails accountHolderDetails;
60

61
  public static final String JSON_PROPERTY_ACCOUNT_HOLDER_STATUS = "accountHolderStatus";
62
  private AccountHolderStatus accountHolderStatus;
63

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

67
  public static final String JSON_PROPERTY_INVALID_FIELDS = "invalidFields";
68
  private List<ErrorFieldType> invalidFields = null;
×
69

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

84
    private String value;
85

86
    LegalEntityEnum(String value) {
×
87
      this.value = value;
×
88
    }
×
89

90
    @JsonValue
91
    public String getValue() {
92
      return value;
×
93
    }
94

95
    @Override
96
    public String toString() {
97
      return String.valueOf(value);
×
98
    }
99

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

111
  public static final String JSON_PROPERTY_LEGAL_ENTITY = "legalEntity";
112
  private LegalEntityEnum legalEntity;
113

114
  public static final String JSON_PROPERTY_PRIMARY_CURRENCY = "primaryCurrency";
115
  private String primaryCurrency;
116

117
  public static final String JSON_PROPERTY_PSP_REFERENCE = "pspReference";
118
  private String pspReference;
119

120
  public static final String JSON_PROPERTY_RESULT_CODE = "resultCode";
121
  private String resultCode;
122

123
  public static final String JSON_PROPERTY_VERIFICATION = "verification";
124
  private KYCVerificationResult verification;
125

126
  public static final String JSON_PROPERTY_VERIFICATION_PROFILE = "verificationProfile";
127
  private String verificationProfile;
128

129
  public UpdateAccountHolderResponse() { 
×
130
  }
×
131

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

137
   /**
138
   * The code of the account holder.
139
   * @return accountHolderCode
140
  **/
141
  @ApiModelProperty(value = "The code of the account holder.")
142
  @JsonProperty(JSON_PROPERTY_ACCOUNT_HOLDER_CODE)
143
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
144

145
  public String getAccountHolderCode() {
146
    return accountHolderCode;
×
147
  }
148

149

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

156

157
  public UpdateAccountHolderResponse accountHolderDetails(AccountHolderDetails accountHolderDetails) {
158
    this.accountHolderDetails = accountHolderDetails;
×
159
    return this;
×
160
  }
161

162
   /**
163
   * Get accountHolderDetails
164
   * @return accountHolderDetails
165
  **/
166
  @ApiModelProperty(value = "")
167
  @JsonProperty(JSON_PROPERTY_ACCOUNT_HOLDER_DETAILS)
168
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
169

170
  public AccountHolderDetails getAccountHolderDetails() {
171
    return accountHolderDetails;
×
172
  }
173

174

175
  @JsonProperty(JSON_PROPERTY_ACCOUNT_HOLDER_DETAILS)
176
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
177
  public void setAccountHolderDetails(AccountHolderDetails accountHolderDetails) {
178
    this.accountHolderDetails = accountHolderDetails;
×
179
  }
×
180

181

182
  public UpdateAccountHolderResponse accountHolderStatus(AccountHolderStatus accountHolderStatus) {
183
    this.accountHolderStatus = accountHolderStatus;
×
184
    return this;
×
185
  }
186

187
   /**
188
   * Get accountHolderStatus
189
   * @return accountHolderStatus
190
  **/
191
  @ApiModelProperty(value = "")
192
  @JsonProperty(JSON_PROPERTY_ACCOUNT_HOLDER_STATUS)
193
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
194

195
  public AccountHolderStatus getAccountHolderStatus() {
196
    return accountHolderStatus;
×
197
  }
198

199

200
  @JsonProperty(JSON_PROPERTY_ACCOUNT_HOLDER_STATUS)
201
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
202
  public void setAccountHolderStatus(AccountHolderStatus accountHolderStatus) {
203
    this.accountHolderStatus = accountHolderStatus;
×
204
  }
×
205

206

207
  public UpdateAccountHolderResponse description(String description) {
208
    this.description = description;
×
209
    return this;
×
210
  }
211

212
   /**
213
   * The description of the account holder.
214
   * @return description
215
  **/
216
  @ApiModelProperty(value = "The description of the account holder.")
217
  @JsonProperty(JSON_PROPERTY_DESCRIPTION)
218
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
219

220
  public String getDescription() {
221
    return description;
×
222
  }
223

224

225
  @JsonProperty(JSON_PROPERTY_DESCRIPTION)
226
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
227
  public void setDescription(String description) {
228
    this.description = description;
×
229
  }
×
230

231

232
  public UpdateAccountHolderResponse invalidFields(List<ErrorFieldType> invalidFields) {
233
    this.invalidFields = invalidFields;
×
234
    return this;
×
235
  }
236

237
  public UpdateAccountHolderResponse addInvalidFieldsItem(ErrorFieldType invalidFieldsItem) {
238
    if (this.invalidFields == null) {
×
239
      this.invalidFields = new ArrayList<>();
×
240
    }
241
    this.invalidFields.add(invalidFieldsItem);
×
242
    return this;
×
243
  }
244

245
   /**
246
   * in case the account holder has not been updated, contains account holder fields, that did not pass the validation.
247
   * @return invalidFields
248
  **/
249
  @ApiModelProperty(value = "in case the account holder has not been updated, contains account holder fields, that did not pass the validation.")
250
  @JsonProperty(JSON_PROPERTY_INVALID_FIELDS)
251
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
252

253
  public List<ErrorFieldType> getInvalidFields() {
254
    return invalidFields;
×
255
  }
256

257

258
  @JsonProperty(JSON_PROPERTY_INVALID_FIELDS)
259
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
260
  public void setInvalidFields(List<ErrorFieldType> invalidFields) {
261
    this.invalidFields = invalidFields;
×
262
  }
×
263

264

265
  public UpdateAccountHolderResponse legalEntity(LegalEntityEnum legalEntity) {
266
    this.legalEntity = legalEntity;
×
267
    return this;
×
268
  }
269

270
   /**
271
   * The legal entity of the account holder.
272
   * @return legalEntity
273
  **/
274
  @ApiModelProperty(value = "The legal entity of the account holder.")
275
  @JsonProperty(JSON_PROPERTY_LEGAL_ENTITY)
276
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
277

278
  public LegalEntityEnum getLegalEntity() {
279
    return legalEntity;
×
280
  }
281

282

283
  @JsonProperty(JSON_PROPERTY_LEGAL_ENTITY)
284
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
285
  public void setLegalEntity(LegalEntityEnum legalEntity) {
286
    this.legalEntity = legalEntity;
×
287
  }
×
288

289

290
  public UpdateAccountHolderResponse primaryCurrency(String primaryCurrency) {
291
    this.primaryCurrency = primaryCurrency;
×
292
    return this;
×
293
  }
294

295
   /**
296
   * The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes), with which the prospective account holder primarily deals.
297
   * @return primaryCurrency
298
   * @deprecated
299
  **/
300
  @Deprecated
301
  @ApiModelProperty(value = "The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes), with which the prospective account holder primarily deals.")
302
  @JsonProperty(JSON_PROPERTY_PRIMARY_CURRENCY)
303
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
304

305
  public String getPrimaryCurrency() {
306
    return primaryCurrency;
×
307
  }
308

309

310
  @Deprecated
311
  @JsonProperty(JSON_PROPERTY_PRIMARY_CURRENCY)
312
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
313
  public void setPrimaryCurrency(String primaryCurrency) {
314
    this.primaryCurrency = primaryCurrency;
×
315
  }
×
316

317

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

323
   /**
324
   * The reference of a request. Can be used to uniquely identify the request.
325
   * @return pspReference
326
  **/
327
  @ApiModelProperty(value = "The reference of a request. Can be used to uniquely identify the request.")
328
  @JsonProperty(JSON_PROPERTY_PSP_REFERENCE)
329
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
330

331
  public String getPspReference() {
332
    return pspReference;
×
333
  }
334

335

336
  @JsonProperty(JSON_PROPERTY_PSP_REFERENCE)
337
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
338
  public void setPspReference(String pspReference) {
339
    this.pspReference = pspReference;
×
340
  }
×
341

342

343
  public UpdateAccountHolderResponse resultCode(String resultCode) {
344
    this.resultCode = resultCode;
×
345
    return this;
×
346
  }
347

348
   /**
349
   * The result code.
350
   * @return resultCode
351
  **/
352
  @ApiModelProperty(value = "The result code.")
353
  @JsonProperty(JSON_PROPERTY_RESULT_CODE)
354
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
355

356
  public String getResultCode() {
357
    return resultCode;
×
358
  }
359

360

361
  @JsonProperty(JSON_PROPERTY_RESULT_CODE)
362
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
363
  public void setResultCode(String resultCode) {
364
    this.resultCode = resultCode;
×
365
  }
×
366

367

368
  public UpdateAccountHolderResponse verification(KYCVerificationResult verification) {
369
    this.verification = verification;
×
370
    return this;
×
371
  }
372

373
   /**
374
   * Get verification
375
   * @return verification
376
  **/
377
  @ApiModelProperty(value = "")
378
  @JsonProperty(JSON_PROPERTY_VERIFICATION)
379
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
380

381
  public KYCVerificationResult getVerification() {
382
    return verification;
×
383
  }
384

385

386
  @JsonProperty(JSON_PROPERTY_VERIFICATION)
387
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
388
  public void setVerification(KYCVerificationResult verification) {
389
    this.verification = verification;
×
390
  }
×
391

392

393
  public UpdateAccountHolderResponse verificationProfile(String verificationProfile) {
394
    this.verificationProfile = verificationProfile;
×
395
    return this;
×
396
  }
397

398
   /**
399
   * The identifier of the profile that applies to this entity.
400
   * @return verificationProfile
401
  **/
402
  @ApiModelProperty(value = "The identifier of the profile that applies to this entity.")
403
  @JsonProperty(JSON_PROPERTY_VERIFICATION_PROFILE)
404
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
405

406
  public String getVerificationProfile() {
407
    return verificationProfile;
×
408
  }
409

410

411
  @JsonProperty(JSON_PROPERTY_VERIFICATION_PROFILE)
412
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
413
  public void setVerificationProfile(String verificationProfile) {
414
    this.verificationProfile = verificationProfile;
×
415
  }
×
416

417

418
  /**
419
   * Return true if this UpdateAccountHolderResponse object is equal to o.
420
   */
421
  @Override
422
  public boolean equals(Object o) {
423
    if (this == o) {
×
424
      return true;
×
425
    }
426
    if (o == null || getClass() != o.getClass()) {
×
427
      return false;
×
428
    }
429
    UpdateAccountHolderResponse updateAccountHolderResponse = (UpdateAccountHolderResponse) o;
×
430
    return Objects.equals(this.accountHolderCode, updateAccountHolderResponse.accountHolderCode) &&
×
431
        Objects.equals(this.accountHolderDetails, updateAccountHolderResponse.accountHolderDetails) &&
×
432
        Objects.equals(this.accountHolderStatus, updateAccountHolderResponse.accountHolderStatus) &&
×
433
        Objects.equals(this.description, updateAccountHolderResponse.description) &&
×
434
        Objects.equals(this.invalidFields, updateAccountHolderResponse.invalidFields) &&
×
435
        Objects.equals(this.legalEntity, updateAccountHolderResponse.legalEntity) &&
×
436
        Objects.equals(this.primaryCurrency, updateAccountHolderResponse.primaryCurrency) &&
×
437
        Objects.equals(this.pspReference, updateAccountHolderResponse.pspReference) &&
×
438
        Objects.equals(this.resultCode, updateAccountHolderResponse.resultCode) &&
×
439
        Objects.equals(this.verification, updateAccountHolderResponse.verification) &&
×
440
        Objects.equals(this.verificationProfile, updateAccountHolderResponse.verificationProfile);
×
441
  }
442

443
  @Override
444
  public int hashCode() {
445
    return Objects.hash(accountHolderCode, accountHolderDetails, accountHolderStatus, description, invalidFields, legalEntity, primaryCurrency, pspReference, resultCode, verification, verificationProfile);
×
446
  }
447

448
  @Override
449
  public String toString() {
450
    StringBuilder sb = new StringBuilder();
×
451
    sb.append("class UpdateAccountHolderResponse {\n");
×
452
    sb.append("    accountHolderCode: ").append(toIndentedString(accountHolderCode)).append("\n");
×
453
    sb.append("    accountHolderDetails: ").append(toIndentedString(accountHolderDetails)).append("\n");
×
454
    sb.append("    accountHolderStatus: ").append(toIndentedString(accountHolderStatus)).append("\n");
×
455
    sb.append("    description: ").append(toIndentedString(description)).append("\n");
×
456
    sb.append("    invalidFields: ").append(toIndentedString(invalidFields)).append("\n");
×
457
    sb.append("    legalEntity: ").append(toIndentedString(legalEntity)).append("\n");
×
458
    sb.append("    primaryCurrency: ").append(toIndentedString(primaryCurrency)).append("\n");
×
459
    sb.append("    pspReference: ").append(toIndentedString(pspReference)).append("\n");
×
460
    sb.append("    resultCode: ").append(toIndentedString(resultCode)).append("\n");
×
461
    sb.append("    verification: ").append(toIndentedString(verification)).append("\n");
×
462
    sb.append("    verificationProfile: ").append(toIndentedString(verificationProfile)).append("\n");
×
463
    sb.append("}");
×
464
    return sb.toString();
×
465
  }
466

467
  /**
468
   * Convert the given object to string with each line indented by 4 spaces
469
   * (except the first line).
470
   */
471
  private String toIndentedString(Object o) {
472
    if (o == null) {
×
473
      return "null";
×
474
    }
475
    return o.toString().replace("\n", "\n    ");
×
476
  }
477

478
/**
479
   * Create an instance of UpdateAccountHolderResponse given an JSON string
480
   *
481
   * @param jsonString JSON string
482
   * @return An instance of UpdateAccountHolderResponse
483
   * @throws JsonProcessingException if the JSON string is invalid with respect to UpdateAccountHolderResponse
484
   */
485
  public static UpdateAccountHolderResponse fromJson(String jsonString) throws JsonProcessingException {
486
    return JSON.getMapper().readValue(jsonString, UpdateAccountHolderResponse.class);
×
487
  }
488
/**
489
  * Convert an instance of UpdateAccountHolderResponse to an JSON string
490
  *
491
  * @return JSON string
492
  */
493
  public String toJson() throws JsonProcessingException {
494
    return JSON.getMapper().writeValueAsString(this);
×
495
  }
496
}
497

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