• 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/CreateAccountRequest.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.fasterxml.jackson.annotation.JsonInclude;
21
import com.fasterxml.jackson.annotation.JsonProperty;
22
import com.fasterxml.jackson.annotation.JsonCreator;
23
import com.fasterxml.jackson.annotation.JsonTypeName;
24
import com.fasterxml.jackson.annotation.JsonValue;
25
import io.swagger.annotations.ApiModel;
26
import io.swagger.annotations.ApiModelProperty;
27
import java.util.HashMap;
28
import java.util.List;
29
import java.util.Map;
30
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
31
import com.fasterxml.jackson.core.JsonProcessingException;
32

33

34
/**
35
 * CreateAccountRequest
36
 */
37
@JsonPropertyOrder({
38
  CreateAccountRequest.JSON_PROPERTY_ACCOUNT_HOLDER_CODE,
39
  CreateAccountRequest.JSON_PROPERTY_BANK_ACCOUNT_U_U_I_D,
40
  CreateAccountRequest.JSON_PROPERTY_DESCRIPTION,
41
  CreateAccountRequest.JSON_PROPERTY_METADATA,
42
  CreateAccountRequest.JSON_PROPERTY_PAYOUT_METHOD_CODE,
43
  CreateAccountRequest.JSON_PROPERTY_PAYOUT_SCHEDULE,
44
  CreateAccountRequest.JSON_PROPERTY_PAYOUT_SCHEDULE_REASON,
45
  CreateAccountRequest.JSON_PROPERTY_PAYOUT_SPEED
46
})
47

48
public class CreateAccountRequest {
49
  public static final String JSON_PROPERTY_ACCOUNT_HOLDER_CODE = "accountHolderCode";
50
  private String accountHolderCode;
51

52
  public static final String JSON_PROPERTY_BANK_ACCOUNT_U_U_I_D = "bankAccountUUID";
53
  private String bankAccountUUID;
54

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

58
  public static final String JSON_PROPERTY_METADATA = "metadata";
59
  private Map<String, String> metadata = null;
×
60

61
  public static final String JSON_PROPERTY_PAYOUT_METHOD_CODE = "payoutMethodCode";
62
  private String payoutMethodCode;
63

64
  /**
65
   * The payout schedule of the prospective account. &gt;Permitted values: &#x60;DEFAULT&#x60;, &#x60;HOLD&#x60;, &#x60;DAILY&#x60;, &#x60;WEEKLY&#x60;, &#x60;MONTHLY&#x60;.
66
   */
67
  public enum PayoutScheduleEnum {
×
68
    BIWEEKLY_ON_1ST_AND_15TH_AT_MIDNIGHT("BIWEEKLY_ON_1ST_AND_15TH_AT_MIDNIGHT"),
×
69
    
70
    DAILY("DAILY"),
×
71
    
72
    DAILY_AU("DAILY_AU"),
×
73
    
74
    DAILY_EU("DAILY_EU"),
×
75
    
76
    DAILY_SG("DAILY_SG"),
×
77
    
78
    DAILY_US("DAILY_US"),
×
79
    
80
    HOLD("HOLD"),
×
81
    
82
    MONTHLY("MONTHLY"),
×
83
    
84
    WEEKLY("WEEKLY"),
×
85
    
86
    WEEKLY_MON_TO_FRI_AU("WEEKLY_MON_TO_FRI_AU"),
×
87
    
88
    WEEKLY_MON_TO_FRI_EU("WEEKLY_MON_TO_FRI_EU"),
×
89
    
90
    WEEKLY_MON_TO_FRI_US("WEEKLY_MON_TO_FRI_US"),
×
91
    
92
    WEEKLY_ON_TUE_FRI_MIDNIGHT("WEEKLY_ON_TUE_FRI_MIDNIGHT"),
×
93
    
94
    WEEKLY_SUN_TO_THU_AU("WEEKLY_SUN_TO_THU_AU"),
×
95
    
96
    WEEKLY_SUN_TO_THU_US("WEEKLY_SUN_TO_THU_US");
×
97

98
    private String value;
99

100
    PayoutScheduleEnum(String value) {
×
101
      this.value = value;
×
102
    }
×
103

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

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

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

125
  public static final String JSON_PROPERTY_PAYOUT_SCHEDULE = "payoutSchedule";
126
  private PayoutScheduleEnum payoutSchedule;
127

128
  public static final String JSON_PROPERTY_PAYOUT_SCHEDULE_REASON = "payoutScheduleReason";
129
  private String payoutScheduleReason;
130

131
  /**
132
   * Speed with which payouts for this account are processed. Permitted values: &#x60;STANDARD&#x60;, &#x60;SAME_DAY&#x60;.
133
   */
134
  public enum PayoutSpeedEnum {
×
135
    INSTANT("INSTANT"),
×
136
    
137
    SAME_DAY("SAME_DAY"),
×
138
    
139
    STANDARD("STANDARD");
×
140

141
    private String value;
142

143
    PayoutSpeedEnum(String value) {
×
144
      this.value = value;
×
145
    }
×
146

147
    @JsonValue
148
    public String getValue() {
149
      return value;
×
150
    }
151

152
    @Override
153
    public String toString() {
154
      return String.valueOf(value);
×
155
    }
156

157
    @JsonCreator
158
    public static PayoutSpeedEnum fromValue(String value) {
159
      for (PayoutSpeedEnum b : PayoutSpeedEnum.values()) {
×
160
        if (b.value.equals(value)) {
×
161
          return b;
×
162
        }
163
      }
164
      throw new IllegalArgumentException("Unexpected value '" + value + "'");
×
165
    }
166
  }
167

168
  public static final String JSON_PROPERTY_PAYOUT_SPEED = "payoutSpeed";
169
  private PayoutSpeedEnum payoutSpeed = PayoutSpeedEnum.STANDARD;
×
170

171
  public CreateAccountRequest() { 
×
172
  }
×
173

174
  public CreateAccountRequest accountHolderCode(String accountHolderCode) {
175
    this.accountHolderCode = accountHolderCode;
×
176
    return this;
×
177
  }
178

179
   /**
180
   * The code of Account Holder under which to create the account.
181
   * @return accountHolderCode
182
  **/
183
  @ApiModelProperty(required = true, value = "The code of Account Holder under which to create the account.")
184
  @JsonProperty(JSON_PROPERTY_ACCOUNT_HOLDER_CODE)
185
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
186

187
  public String getAccountHolderCode() {
188
    return accountHolderCode;
×
189
  }
190

191

192
  @JsonProperty(JSON_PROPERTY_ACCOUNT_HOLDER_CODE)
193
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
194
  public void setAccountHolderCode(String accountHolderCode) {
195
    this.accountHolderCode = accountHolderCode;
×
196
  }
×
197

198

199
  public CreateAccountRequest bankAccountUUID(String bankAccountUUID) {
200
    this.bankAccountUUID = bankAccountUUID;
×
201
    return this;
×
202
  }
203

204
   /**
205
   * The bankAccountUUID of the bank account held by the account holder to couple the account with. Scheduled payouts in currencies matching the currency of this bank account will be sent to this bank account. Payouts in different currencies will be sent to a matching bank account of the account holder.
206
   * @return bankAccountUUID
207
  **/
208
  @ApiModelProperty(value = "The bankAccountUUID of the bank account held by the account holder to couple the account with. Scheduled payouts in currencies matching the currency of this bank account will be sent to this bank account. Payouts in different currencies will be sent to a matching bank account of the account holder.")
209
  @JsonProperty(JSON_PROPERTY_BANK_ACCOUNT_U_U_I_D)
210
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
211

212
  public String getBankAccountUUID() {
213
    return bankAccountUUID;
×
214
  }
215

216

217
  @JsonProperty(JSON_PROPERTY_BANK_ACCOUNT_U_U_I_D)
218
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
219
  public void setBankAccountUUID(String bankAccountUUID) {
220
    this.bankAccountUUID = bankAccountUUID;
×
221
  }
×
222

223

224
  public CreateAccountRequest description(String description) {
225
    this.description = description;
×
226
    return this;
×
227
  }
228

229
   /**
230
   * A description of the account, maximum 256 characters. You can use alphanumeric characters (A-Z, a-z, 0-9), white spaces, and underscores &#x60;_&#x60;.
231
   * @return description
232
  **/
233
  @ApiModelProperty(value = "A description of the account, maximum 256 characters. You can use alphanumeric characters (A-Z, a-z, 0-9), white spaces, and underscores `_`.")
234
  @JsonProperty(JSON_PROPERTY_DESCRIPTION)
235
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
236

237
  public String getDescription() {
238
    return description;
×
239
  }
240

241

242
  @JsonProperty(JSON_PROPERTY_DESCRIPTION)
243
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
244
  public void setDescription(String description) {
245
    this.description = description;
×
246
  }
×
247

248

249
  public CreateAccountRequest metadata(Map<String, String> metadata) {
250
    this.metadata = metadata;
×
251
    return this;
×
252
  }
253

254
  public CreateAccountRequest putMetadataItem(String key, String metadataItem) {
255
    if (this.metadata == null) {
×
256
      this.metadata = new HashMap<>();
×
257
    }
258
    this.metadata.put(key, metadataItem);
×
259
    return this;
×
260
  }
261

262
   /**
263
   * A set of key and value pairs for general use by the merchant. 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.
264
   * @return metadata
265
  **/
266
  @ApiModelProperty(value = "A set of key and value pairs for general use by the merchant. 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.")
267
  @JsonProperty(JSON_PROPERTY_METADATA)
268
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
269

270
  public Map<String, String> getMetadata() {
271
    return metadata;
×
272
  }
273

274

275
  @JsonProperty(JSON_PROPERTY_METADATA)
276
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
277
  public void setMetadata(Map<String, String> metadata) {
278
    this.metadata = metadata;
×
279
  }
×
280

281

282
  public CreateAccountRequest payoutMethodCode(String payoutMethodCode) {
283
    this.payoutMethodCode = payoutMethodCode;
×
284
    return this;
×
285
  }
286

287
   /**
288
   * The payout method code held by the account holder to couple the account with. Scheduled card payouts will be sent using this payout method code.
289
   * @return payoutMethodCode
290
  **/
291
  @ApiModelProperty(value = "The payout method code held by the account holder to couple the account with. Scheduled card payouts will be sent using this payout method code.")
292
  @JsonProperty(JSON_PROPERTY_PAYOUT_METHOD_CODE)
293
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
294

295
  public String getPayoutMethodCode() {
296
    return payoutMethodCode;
×
297
  }
298

299

300
  @JsonProperty(JSON_PROPERTY_PAYOUT_METHOD_CODE)
301
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
302
  public void setPayoutMethodCode(String payoutMethodCode) {
303
    this.payoutMethodCode = payoutMethodCode;
×
304
  }
×
305

306

307
  public CreateAccountRequest payoutSchedule(PayoutScheduleEnum payoutSchedule) {
308
    this.payoutSchedule = payoutSchedule;
×
309
    return this;
×
310
  }
311

312
   /**
313
   * The payout schedule of the prospective account. &gt;Permitted values: &#x60;DEFAULT&#x60;, &#x60;HOLD&#x60;, &#x60;DAILY&#x60;, &#x60;WEEKLY&#x60;, &#x60;MONTHLY&#x60;.
314
   * @return payoutSchedule
315
  **/
316
  @ApiModelProperty(value = "The payout schedule of the prospective account. >Permitted values: `DEFAULT`, `HOLD`, `DAILY`, `WEEKLY`, `MONTHLY`.")
317
  @JsonProperty(JSON_PROPERTY_PAYOUT_SCHEDULE)
318
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
319

320
  public PayoutScheduleEnum getPayoutSchedule() {
321
    return payoutSchedule;
×
322
  }
323

324

325
  @JsonProperty(JSON_PROPERTY_PAYOUT_SCHEDULE)
326
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
327
  public void setPayoutSchedule(PayoutScheduleEnum payoutSchedule) {
328
    this.payoutSchedule = payoutSchedule;
×
329
  }
×
330

331

332
  public CreateAccountRequest payoutScheduleReason(String payoutScheduleReason) {
333
    this.payoutScheduleReason = payoutScheduleReason;
×
334
    return this;
×
335
  }
336

337
   /**
338
   * The reason for the payout schedule choice. &gt;Required if the payoutSchedule is &#x60;HOLD&#x60;.
339
   * @return payoutScheduleReason
340
  **/
341
  @ApiModelProperty(value = "The reason for the payout schedule choice. >Required if the payoutSchedule is `HOLD`.")
342
  @JsonProperty(JSON_PROPERTY_PAYOUT_SCHEDULE_REASON)
343
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
344

345
  public String getPayoutScheduleReason() {
346
    return payoutScheduleReason;
×
347
  }
348

349

350
  @JsonProperty(JSON_PROPERTY_PAYOUT_SCHEDULE_REASON)
351
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
352
  public void setPayoutScheduleReason(String payoutScheduleReason) {
353
    this.payoutScheduleReason = payoutScheduleReason;
×
354
  }
×
355

356

357
  public CreateAccountRequest payoutSpeed(PayoutSpeedEnum payoutSpeed) {
358
    this.payoutSpeed = payoutSpeed;
×
359
    return this;
×
360
  }
361

362
   /**
363
   * Speed with which payouts for this account are processed. Permitted values: &#x60;STANDARD&#x60;, &#x60;SAME_DAY&#x60;.
364
   * @return payoutSpeed
365
  **/
366
  @ApiModelProperty(value = "Speed with which payouts for this account are processed. Permitted values: `STANDARD`, `SAME_DAY`.")
367
  @JsonProperty(JSON_PROPERTY_PAYOUT_SPEED)
368
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
369

370
  public PayoutSpeedEnum getPayoutSpeed() {
371
    return payoutSpeed;
×
372
  }
373

374

375
  @JsonProperty(JSON_PROPERTY_PAYOUT_SPEED)
376
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
377
  public void setPayoutSpeed(PayoutSpeedEnum payoutSpeed) {
378
    this.payoutSpeed = payoutSpeed;
×
379
  }
×
380

381

382
  /**
383
   * Return true if this CreateAccountRequest object is equal to o.
384
   */
385
  @Override
386
  public boolean equals(Object o) {
387
    if (this == o) {
×
388
      return true;
×
389
    }
390
    if (o == null || getClass() != o.getClass()) {
×
391
      return false;
×
392
    }
393
    CreateAccountRequest createAccountRequest = (CreateAccountRequest) o;
×
394
    return Objects.equals(this.accountHolderCode, createAccountRequest.accountHolderCode) &&
×
395
        Objects.equals(this.bankAccountUUID, createAccountRequest.bankAccountUUID) &&
×
396
        Objects.equals(this.description, createAccountRequest.description) &&
×
397
        Objects.equals(this.metadata, createAccountRequest.metadata) &&
×
398
        Objects.equals(this.payoutMethodCode, createAccountRequest.payoutMethodCode) &&
×
399
        Objects.equals(this.payoutSchedule, createAccountRequest.payoutSchedule) &&
×
400
        Objects.equals(this.payoutScheduleReason, createAccountRequest.payoutScheduleReason) &&
×
401
        Objects.equals(this.payoutSpeed, createAccountRequest.payoutSpeed);
×
402
  }
403

404
  @Override
405
  public int hashCode() {
406
    return Objects.hash(accountHolderCode, bankAccountUUID, description, metadata, payoutMethodCode, payoutSchedule, payoutScheduleReason, payoutSpeed);
×
407
  }
408

409
  @Override
410
  public String toString() {
411
    StringBuilder sb = new StringBuilder();
×
412
    sb.append("class CreateAccountRequest {\n");
×
413
    sb.append("    accountHolderCode: ").append(toIndentedString(accountHolderCode)).append("\n");
×
414
    sb.append("    bankAccountUUID: ").append(toIndentedString(bankAccountUUID)).append("\n");
×
415
    sb.append("    description: ").append(toIndentedString(description)).append("\n");
×
416
    sb.append("    metadata: ").append(toIndentedString(metadata)).append("\n");
×
417
    sb.append("    payoutMethodCode: ").append(toIndentedString(payoutMethodCode)).append("\n");
×
418
    sb.append("    payoutSchedule: ").append(toIndentedString(payoutSchedule)).append("\n");
×
419
    sb.append("    payoutScheduleReason: ").append(toIndentedString(payoutScheduleReason)).append("\n");
×
420
    sb.append("    payoutSpeed: ").append(toIndentedString(payoutSpeed)).append("\n");
×
421
    sb.append("}");
×
422
    return sb.toString();
×
423
  }
424

425
  /**
426
   * Convert the given object to string with each line indented by 4 spaces
427
   * (except the first line).
428
   */
429
  private String toIndentedString(Object o) {
430
    if (o == null) {
×
431
      return "null";
×
432
    }
433
    return o.toString().replace("\n", "\n    ");
×
434
  }
435

436
/**
437
   * Create an instance of CreateAccountRequest given an JSON string
438
   *
439
   * @param jsonString JSON string
440
   * @return An instance of CreateAccountRequest
441
   * @throws JsonProcessingException if the JSON string is invalid with respect to CreateAccountRequest
442
   */
443
  public static CreateAccountRequest fromJson(String jsonString) throws JsonProcessingException {
444
    return JSON.getMapper().readValue(jsonString, CreateAccountRequest.class);
×
445
  }
446
/**
447
  * Convert an instance of CreateAccountRequest to an JSON string
448
  *
449
  * @return JSON string
450
  */
451
  public String toJson() throws JsonProcessingException {
452
    return JSON.getMapper().writeValueAsString(this);
×
453
  }
454
}
455

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