• 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/CreateAccountHolderRequest.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.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 com.fasterxml.jackson.annotation.JsonPropertyOrder;
29
import com.fasterxml.jackson.core.JsonProcessingException;
30

31

32
/**
33
 * CreateAccountHolderRequest
34
 */
35
@JsonPropertyOrder({
36
  CreateAccountHolderRequest.JSON_PROPERTY_ACCOUNT_HOLDER_CODE,
37
  CreateAccountHolderRequest.JSON_PROPERTY_ACCOUNT_HOLDER_DETAILS,
38
  CreateAccountHolderRequest.JSON_PROPERTY_CREATE_DEFAULT_ACCOUNT,
39
  CreateAccountHolderRequest.JSON_PROPERTY_DESCRIPTION,
40
  CreateAccountHolderRequest.JSON_PROPERTY_LEGAL_ENTITY,
41
  CreateAccountHolderRequest.JSON_PROPERTY_PRIMARY_CURRENCY,
42
  CreateAccountHolderRequest.JSON_PROPERTY_PROCESSING_TIER,
43
  CreateAccountHolderRequest.JSON_PROPERTY_VERIFICATION_PROFILE
44
})
45

46
public class CreateAccountHolderRequest {
47
  public static final String JSON_PROPERTY_ACCOUNT_HOLDER_CODE = "accountHolderCode";
48
  private String accountHolderCode;
49

50
  public static final String JSON_PROPERTY_ACCOUNT_HOLDER_DETAILS = "accountHolderDetails";
51
  private AccountHolderDetails accountHolderDetails;
52

53
  public static final String JSON_PROPERTY_CREATE_DEFAULT_ACCOUNT = "createDefaultAccount";
54
  private Boolean createDefaultAccount;
55

56
  public static final String JSON_PROPERTY_DESCRIPTION = "description";
57
  private String description;
58

59
  /**
60
   * The legal entity type of the account holder. This determines the information that should be provided in the request.  Possible values: **Business**, **Individual**, or **NonProfit**.  * If set to **Business** or **NonProfit**, then `accountHolderDetails.businessDetails` must be provided, with at least one entry in the `accountHolderDetails.businessDetails.shareholders` list.  * If set to **Individual**, then `accountHolderDetails.individualDetails` must be provided.
61
   */
62
  public enum LegalEntityEnum {
×
63
    BUSINESS("Business"),
×
64
    
65
    INDIVIDUAL("Individual"),
×
66
    
67
    NONPROFIT("NonProfit"),
×
68
    
69
    PARTNERSHIP("Partnership"),
×
70
    
71
    PUBLICCOMPANY("PublicCompany");
×
72

73
    private String value;
74

75
    LegalEntityEnum(String value) {
×
76
      this.value = value;
×
77
    }
×
78

79
    @JsonValue
80
    public String getValue() {
81
      return value;
×
82
    }
83

84
    @Override
85
    public String toString() {
86
      return String.valueOf(value);
×
87
    }
88

89
    @JsonCreator
90
    public static LegalEntityEnum fromValue(String value) {
91
      for (LegalEntityEnum b : LegalEntityEnum.values()) {
×
92
        if (b.value.equals(value)) {
×
93
          return b;
×
94
        }
95
      }
96
      throw new IllegalArgumentException("Unexpected value '" + value + "'");
×
97
    }
98
  }
99

100
  public static final String JSON_PROPERTY_LEGAL_ENTITY = "legalEntity";
101
  private LegalEntityEnum legalEntity;
102

103
  public static final String JSON_PROPERTY_PRIMARY_CURRENCY = "primaryCurrency";
104
  private String primaryCurrency;
105

106
  public static final String JSON_PROPERTY_PROCESSING_TIER = "processingTier";
107
  private Integer processingTier;
108

109
  public static final String JSON_PROPERTY_VERIFICATION_PROFILE = "verificationProfile";
110
  private String verificationProfile;
111

112
  public CreateAccountHolderRequest() { 
×
113
  }
×
114

115
  public CreateAccountHolderRequest accountHolderCode(String accountHolderCode) {
116
    this.accountHolderCode = accountHolderCode;
×
117
    return this;
×
118
  }
119

120
   /**
121
   * Your unique identifier for the prospective account holder. The length must be between three (3) and fifty (50) characters long. Only letters, digits, and hyphens (-) are allowed.
122
   * @return accountHolderCode
123
  **/
124
  @ApiModelProperty(required = true, value = "Your unique identifier for the prospective account holder. The length must be between three (3) and fifty (50) characters long. Only letters, digits, and hyphens (-) are allowed.")
125
  @JsonProperty(JSON_PROPERTY_ACCOUNT_HOLDER_CODE)
126
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
127

128
  public String getAccountHolderCode() {
129
    return accountHolderCode;
×
130
  }
131

132

133
  @JsonProperty(JSON_PROPERTY_ACCOUNT_HOLDER_CODE)
134
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
135
  public void setAccountHolderCode(String accountHolderCode) {
136
    this.accountHolderCode = accountHolderCode;
×
137
  }
×
138

139

140
  public CreateAccountHolderRequest accountHolderDetails(AccountHolderDetails accountHolderDetails) {
141
    this.accountHolderDetails = accountHolderDetails;
×
142
    return this;
×
143
  }
144

145
   /**
146
   * Get accountHolderDetails
147
   * @return accountHolderDetails
148
  **/
149
  @ApiModelProperty(required = true, value = "")
150
  @JsonProperty(JSON_PROPERTY_ACCOUNT_HOLDER_DETAILS)
151
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
152

153
  public AccountHolderDetails getAccountHolderDetails() {
154
    return accountHolderDetails;
×
155
  }
156

157

158
  @JsonProperty(JSON_PROPERTY_ACCOUNT_HOLDER_DETAILS)
159
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
160
  public void setAccountHolderDetails(AccountHolderDetails accountHolderDetails) {
161
    this.accountHolderDetails = accountHolderDetails;
×
162
  }
×
163

164

165
  public CreateAccountHolderRequest createDefaultAccount(Boolean createDefaultAccount) {
166
    this.createDefaultAccount = createDefaultAccount;
×
167
    return this;
×
168
  }
169

170
   /**
171
   * If set to **true**, an account with the default options is automatically created for the account holder. By default, this field is set to **true**.
172
   * @return createDefaultAccount
173
  **/
174
  @ApiModelProperty(value = "If set to **true**, an account with the default options is automatically created for the account holder. By default, this field is set to **true**.")
175
  @JsonProperty(JSON_PROPERTY_CREATE_DEFAULT_ACCOUNT)
176
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
177

178
  public Boolean getCreateDefaultAccount() {
179
    return createDefaultAccount;
×
180
  }
181

182

183
  @JsonProperty(JSON_PROPERTY_CREATE_DEFAULT_ACCOUNT)
184
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
185
  public void setCreateDefaultAccount(Boolean createDefaultAccount) {
186
    this.createDefaultAccount = createDefaultAccount;
×
187
  }
×
188

189

190
  public CreateAccountHolderRequest description(String description) {
191
    this.description = description;
×
192
    return this;
×
193
  }
194

195
   /**
196
   * A description of the prospective account holder, maximum 256 characters. You can use alphanumeric characters (A-Z, a-z, 0-9), white spaces, and underscores `_`.
197
   * @return description
198
  **/
199
  @ApiModelProperty(value = "A description of the prospective account holder, maximum 256 characters. You can use alphanumeric characters (A-Z, a-z, 0-9), white spaces, and underscores `_`.")
200
  @JsonProperty(JSON_PROPERTY_DESCRIPTION)
201
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
202

203
  public String getDescription() {
204
    return description;
×
205
  }
206

207

208
  @JsonProperty(JSON_PROPERTY_DESCRIPTION)
209
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
210
  public void setDescription(String description) {
211
    this.description = description;
×
212
  }
×
213

214

215
  public CreateAccountHolderRequest legalEntity(LegalEntityEnum legalEntity) {
216
    this.legalEntity = legalEntity;
×
217
    return this;
×
218
  }
219

220
   /**
221
   * The legal entity type of the account holder. This determines the information that should be provided in the request.  Possible values: **Business**, **Individual**, or **NonProfit**.  * If set to **Business** or **NonProfit**, then `accountHolderDetails.businessDetails` must be provided, with at least one entry in the `accountHolderDetails.businessDetails.shareholders` list.  * If set to **Individual**, then `accountHolderDetails.individualDetails` must be provided.
222
   * @return legalEntity
223
  **/
224
  @ApiModelProperty(required = true, value = "The legal entity type of the account holder. This determines the information that should be provided in the request.  Possible values: **Business**, **Individual**, or **NonProfit**.  * If set to **Business** or **NonProfit**, then `accountHolderDetails.businessDetails` must be provided, with at least one entry in the `accountHolderDetails.businessDetails.shareholders` list.  * If set to **Individual**, then `accountHolderDetails.individualDetails` must be provided.")
225
  @JsonProperty(JSON_PROPERTY_LEGAL_ENTITY)
226
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
227

228
  public LegalEntityEnum getLegalEntity() {
229
    return legalEntity;
×
230
  }
231

232

233
  @JsonProperty(JSON_PROPERTY_LEGAL_ENTITY)
234
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
235
  public void setLegalEntity(LegalEntityEnum legalEntity) {
236
    this.legalEntity = legalEntity;
×
237
  }
×
238

239

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

245
   /**
246
   * The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes), with which the prospective account holder primarily deals.
247
   * @return primaryCurrency
248
   * @deprecated
249
  **/
250
  @Deprecated
251
  @ApiModelProperty(value = "The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes), with which the prospective account holder primarily deals.")
252
  @JsonProperty(JSON_PROPERTY_PRIMARY_CURRENCY)
253
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
254

255
  public String getPrimaryCurrency() {
256
    return primaryCurrency;
×
257
  }
258

259

260
  @Deprecated
261
  @JsonProperty(JSON_PROPERTY_PRIMARY_CURRENCY)
262
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
263
  public void setPrimaryCurrency(String primaryCurrency) {
264
    this.primaryCurrency = primaryCurrency;
×
265
  }
×
266

267

268
  public CreateAccountHolderRequest processingTier(Integer processingTier) {
269
    this.processingTier = processingTier;
×
270
    return this;
×
271
  }
272

273
   /**
274
   * The starting [processing tier](https://docs.adyen.com/marketplaces-and-platforms/classic/onboarding-and-verification/precheck-kyc-information) for the prospective account holder.
275
   * @return processingTier
276
  **/
277
  @ApiModelProperty(value = "The starting [processing tier](https://docs.adyen.com/marketplaces-and-platforms/classic/onboarding-and-verification/precheck-kyc-information) for the prospective account holder.")
278
  @JsonProperty(JSON_PROPERTY_PROCESSING_TIER)
279
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
280

281
  public Integer getProcessingTier() {
282
    return processingTier;
×
283
  }
284

285

286
  @JsonProperty(JSON_PROPERTY_PROCESSING_TIER)
287
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
288
  public void setProcessingTier(Integer processingTier) {
289
    this.processingTier = processingTier;
×
290
  }
×
291

292

293
  public CreateAccountHolderRequest verificationProfile(String verificationProfile) {
294
    this.verificationProfile = verificationProfile;
×
295
    return this;
×
296
  }
297

298
   /**
299
   * The identifier of the profile that applies to this entity.
300
   * @return verificationProfile
301
  **/
302
  @ApiModelProperty(value = "The identifier of the profile that applies to this entity.")
303
  @JsonProperty(JSON_PROPERTY_VERIFICATION_PROFILE)
304
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
305

306
  public String getVerificationProfile() {
307
    return verificationProfile;
×
308
  }
309

310

311
  @JsonProperty(JSON_PROPERTY_VERIFICATION_PROFILE)
312
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
313
  public void setVerificationProfile(String verificationProfile) {
314
    this.verificationProfile = verificationProfile;
×
315
  }
×
316

317

318
  /**
319
   * Return true if this CreateAccountHolderRequest object is equal to o.
320
   */
321
  @Override
322
  public boolean equals(Object o) {
323
    if (this == o) {
×
324
      return true;
×
325
    }
326
    if (o == null || getClass() != o.getClass()) {
×
327
      return false;
×
328
    }
329
    CreateAccountHolderRequest createAccountHolderRequest = (CreateAccountHolderRequest) o;
×
330
    return Objects.equals(this.accountHolderCode, createAccountHolderRequest.accountHolderCode) &&
×
331
        Objects.equals(this.accountHolderDetails, createAccountHolderRequest.accountHolderDetails) &&
×
332
        Objects.equals(this.createDefaultAccount, createAccountHolderRequest.createDefaultAccount) &&
×
333
        Objects.equals(this.description, createAccountHolderRequest.description) &&
×
334
        Objects.equals(this.legalEntity, createAccountHolderRequest.legalEntity) &&
×
335
        Objects.equals(this.primaryCurrency, createAccountHolderRequest.primaryCurrency) &&
×
336
        Objects.equals(this.processingTier, createAccountHolderRequest.processingTier) &&
×
337
        Objects.equals(this.verificationProfile, createAccountHolderRequest.verificationProfile);
×
338
  }
339

340
  @Override
341
  public int hashCode() {
342
    return Objects.hash(accountHolderCode, accountHolderDetails, createDefaultAccount, description, legalEntity, primaryCurrency, processingTier, verificationProfile);
×
343
  }
344

345
  @Override
346
  public String toString() {
347
    StringBuilder sb = new StringBuilder();
×
348
    sb.append("class CreateAccountHolderRequest {\n");
×
349
    sb.append("    accountHolderCode: ").append(toIndentedString(accountHolderCode)).append("\n");
×
350
    sb.append("    accountHolderDetails: ").append(toIndentedString(accountHolderDetails)).append("\n");
×
351
    sb.append("    createDefaultAccount: ").append(toIndentedString(createDefaultAccount)).append("\n");
×
352
    sb.append("    description: ").append(toIndentedString(description)).append("\n");
×
353
    sb.append("    legalEntity: ").append(toIndentedString(legalEntity)).append("\n");
×
354
    sb.append("    primaryCurrency: ").append(toIndentedString(primaryCurrency)).append("\n");
×
355
    sb.append("    processingTier: ").append(toIndentedString(processingTier)).append("\n");
×
356
    sb.append("    verificationProfile: ").append(toIndentedString(verificationProfile)).append("\n");
×
357
    sb.append("}");
×
358
    return sb.toString();
×
359
  }
360

361
  /**
362
   * Convert the given object to string with each line indented by 4 spaces
363
   * (except the first line).
364
   */
365
  private String toIndentedString(Object o) {
366
    if (o == null) {
×
367
      return "null";
×
368
    }
369
    return o.toString().replace("\n", "\n    ");
×
370
  }
371

372
/**
373
   * Create an instance of CreateAccountHolderRequest given an JSON string
374
   *
375
   * @param jsonString JSON string
376
   * @return An instance of CreateAccountHolderRequest
377
   * @throws JsonProcessingException if the JSON string is invalid with respect to CreateAccountHolderRequest
378
   */
379
  public static CreateAccountHolderRequest fromJson(String jsonString) throws JsonProcessingException {
380
    return JSON.getMapper().readValue(jsonString, CreateAccountHolderRequest.class);
×
381
  }
382
/**
383
  * Convert an instance of CreateAccountHolderRequest to an JSON string
384
  *
385
  * @return JSON string
386
  */
387
  public String toJson() throws JsonProcessingException {
388
    return JSON.getMapper().writeValueAsString(this);
×
389
  }
390
}
391

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