• 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

0.0
/src/main/java/com/adyen/model/marketpaywebhooks/CreateAccountResponse.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.ErrorFieldType;
20
import com.adyen.model.marketpaywebhooks.PayoutScheduleResponse;
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 java.util.ArrayList;
29
import java.util.HashMap;
30
import java.util.List;
31
import java.util.Map;
32
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
33
import com.fasterxml.jackson.core.JsonProcessingException;
34

35

36
/**
37
 * CreateAccountResponse
38
 */
39
@JsonPropertyOrder({
40
  CreateAccountResponse.JSON_PROPERTY_ACCOUNT_CODE,
41
  CreateAccountResponse.JSON_PROPERTY_ACCOUNT_HOLDER_CODE,
42
  CreateAccountResponse.JSON_PROPERTY_BANK_ACCOUNT_U_U_I_D,
43
  CreateAccountResponse.JSON_PROPERTY_DESCRIPTION,
44
  CreateAccountResponse.JSON_PROPERTY_INVALID_FIELDS,
45
  CreateAccountResponse.JSON_PROPERTY_METADATA,
46
  CreateAccountResponse.JSON_PROPERTY_PAYOUT_METHOD_CODE,
47
  CreateAccountResponse.JSON_PROPERTY_PAYOUT_SCHEDULE,
48
  CreateAccountResponse.JSON_PROPERTY_PAYOUT_SPEED,
49
  CreateAccountResponse.JSON_PROPERTY_PSP_REFERENCE,
50
  CreateAccountResponse.JSON_PROPERTY_RESULT_CODE,
51
  CreateAccountResponse.JSON_PROPERTY_STATUS
52
})
53

54
public class CreateAccountResponse {
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_BANK_ACCOUNT_U_U_I_D = "bankAccountUUID";
62
  private String bankAccountUUID;
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
  public static final String JSON_PROPERTY_METADATA = "metadata";
71
  private Map<String, String> metadata = null;
×
72

73
  public static final String JSON_PROPERTY_PAYOUT_METHOD_CODE = "payoutMethodCode";
74
  private String payoutMethodCode;
75

76
  public static final String JSON_PROPERTY_PAYOUT_SCHEDULE = "payoutSchedule";
77
  private PayoutScheduleResponse payoutSchedule;
78

79
  /**
80
   * Speed with which payouts for this account are processed. Permitted values: &#x60;STANDARD&#x60;, &#x60;SAME_DAY&#x60;.
81
   */
82
  public enum PayoutSpeedEnum {
×
83
    INSTANT("INSTANT"),
×
84
    
85
    SAME_DAY("SAME_DAY"),
×
86
    
87
    STANDARD("STANDARD");
×
88

89
    private String value;
90

91
    PayoutSpeedEnum(String value) {
×
92
      this.value = value;
×
93
    }
×
94

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

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

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

116
  public static final String JSON_PROPERTY_PAYOUT_SPEED = "payoutSpeed";
117
  private PayoutSpeedEnum payoutSpeed;
118

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

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

125
  /**
126
   * The status of the account. &gt;Permitted values: &#x60;Active&#x60;.
127
   */
128
  public enum StatusEnum {
×
129
    ACTIVE("Active"),
×
130
    
131
    CLOSED("Closed"),
×
132
    
133
    INACTIVE("Inactive"),
×
134
    
135
    SUSPENDED("Suspended");
×
136

137
    private String value;
138

139
    StatusEnum(String value) {
×
140
      this.value = value;
×
141
    }
×
142

143
    @JsonValue
144
    public String getValue() {
145
      return value;
×
146
    }
147

148
    @Override
149
    public String toString() {
150
      return String.valueOf(value);
×
151
    }
152

153
    @JsonCreator
154
    public static StatusEnum fromValue(String value) {
155
      for (StatusEnum b : StatusEnum.values()) {
×
156
        if (b.value.equals(value)) {
×
157
          return b;
×
158
        }
159
      }
160
      throw new IllegalArgumentException("Unexpected value '" + value + "'");
×
161
    }
162
  }
163

164
  public static final String JSON_PROPERTY_STATUS = "status";
165
  private StatusEnum status;
166

167
  public CreateAccountResponse() { 
×
168
  }
×
169

170
  public CreateAccountResponse accountCode(String accountCode) {
171
    this.accountCode = accountCode;
×
172
    return this;
×
173
  }
174

175
   /**
176
   * The code of the new account.
177
   * @return accountCode
178
  **/
179
  @ApiModelProperty(value = "The code of the new account.")
180
  @JsonProperty(JSON_PROPERTY_ACCOUNT_CODE)
181
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
182

183
  public String getAccountCode() {
184
    return accountCode;
×
185
  }
186

187

188
  @JsonProperty(JSON_PROPERTY_ACCOUNT_CODE)
189
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
190
  public void setAccountCode(String accountCode) {
191
    this.accountCode = accountCode;
×
192
  }
×
193

194

195
  public CreateAccountResponse accountHolderCode(String accountHolderCode) {
196
    this.accountHolderCode = accountHolderCode;
×
197
    return this;
×
198
  }
199

200
   /**
201
   * The code of the account holder.
202
   * @return accountHolderCode
203
  **/
204
  @ApiModelProperty(value = "The code of the account holder.")
205
  @JsonProperty(JSON_PROPERTY_ACCOUNT_HOLDER_CODE)
206
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
207

208
  public String getAccountHolderCode() {
209
    return accountHolderCode;
×
210
  }
211

212

213
  @JsonProperty(JSON_PROPERTY_ACCOUNT_HOLDER_CODE)
214
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
215
  public void setAccountHolderCode(String accountHolderCode) {
216
    this.accountHolderCode = accountHolderCode;
×
217
  }
×
218

219

220
  public CreateAccountResponse bankAccountUUID(String bankAccountUUID) {
221
    this.bankAccountUUID = bankAccountUUID;
×
222
    return this;
×
223
  }
224

225
   /**
226
   * 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.
227
   * @return bankAccountUUID
228
  **/
229
  @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.")
230
  @JsonProperty(JSON_PROPERTY_BANK_ACCOUNT_U_U_I_D)
231
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
232

233
  public String getBankAccountUUID() {
234
    return bankAccountUUID;
×
235
  }
236

237

238
  @JsonProperty(JSON_PROPERTY_BANK_ACCOUNT_U_U_I_D)
239
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
240
  public void setBankAccountUUID(String bankAccountUUID) {
241
    this.bankAccountUUID = bankAccountUUID;
×
242
  }
×
243

244

245
  public CreateAccountResponse description(String description) {
246
    this.description = description;
×
247
    return this;
×
248
  }
249

250
   /**
251
   * The description of the account.
252
   * @return description
253
  **/
254
  @ApiModelProperty(value = "The description of the account.")
255
  @JsonProperty(JSON_PROPERTY_DESCRIPTION)
256
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
257

258
  public String getDescription() {
259
    return description;
×
260
  }
261

262

263
  @JsonProperty(JSON_PROPERTY_DESCRIPTION)
264
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
265
  public void setDescription(String description) {
266
    this.description = description;
×
267
  }
×
268

269

270
  public CreateAccountResponse invalidFields(List<ErrorFieldType> invalidFields) {
271
    this.invalidFields = invalidFields;
×
272
    return this;
×
273
  }
274

275
  public CreateAccountResponse addInvalidFieldsItem(ErrorFieldType invalidFieldsItem) {
276
    if (this.invalidFields == null) {
×
277
      this.invalidFields = new ArrayList<>();
×
278
    }
279
    this.invalidFields.add(invalidFieldsItem);
×
280
    return this;
×
281
  }
282

283
   /**
284
   * A list of fields that caused the &#x60;/createAccount&#x60; request to fail.
285
   * @return invalidFields
286
  **/
287
  @ApiModelProperty(value = "A list of fields that caused the `/createAccount` request to fail.")
288
  @JsonProperty(JSON_PROPERTY_INVALID_FIELDS)
289
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
290

291
  public List<ErrorFieldType> getInvalidFields() {
292
    return invalidFields;
×
293
  }
294

295

296
  @JsonProperty(JSON_PROPERTY_INVALID_FIELDS)
297
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
298
  public void setInvalidFields(List<ErrorFieldType> invalidFields) {
299
    this.invalidFields = invalidFields;
×
300
  }
×
301

302

303
  public CreateAccountResponse metadata(Map<String, String> metadata) {
304
    this.metadata = metadata;
×
305
    return this;
×
306
  }
307

308
  public CreateAccountResponse putMetadataItem(String key, String metadataItem) {
309
    if (this.metadata == null) {
×
310
      this.metadata = new HashMap<>();
×
311
    }
312
    this.metadata.put(key, metadataItem);
×
313
    return this;
×
314
  }
315

316
   /**
317
   * A set of key and value pairs containing metadata.
318
   * @return metadata
319
  **/
320
  @ApiModelProperty(value = "A set of key and value pairs containing metadata.")
321
  @JsonProperty(JSON_PROPERTY_METADATA)
322
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
323

324
  public Map<String, String> getMetadata() {
325
    return metadata;
×
326
  }
327

328

329
  @JsonProperty(JSON_PROPERTY_METADATA)
330
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
331
  public void setMetadata(Map<String, String> metadata) {
332
    this.metadata = metadata;
×
333
  }
×
334

335

336
  public CreateAccountResponse payoutMethodCode(String payoutMethodCode) {
337
    this.payoutMethodCode = payoutMethodCode;
×
338
    return this;
×
339
  }
340

341
   /**
342
   * 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.
343
   * @return payoutMethodCode
344
  **/
345
  @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.")
346
  @JsonProperty(JSON_PROPERTY_PAYOUT_METHOD_CODE)
347
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
348

349
  public String getPayoutMethodCode() {
350
    return payoutMethodCode;
×
351
  }
352

353

354
  @JsonProperty(JSON_PROPERTY_PAYOUT_METHOD_CODE)
355
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
356
  public void setPayoutMethodCode(String payoutMethodCode) {
357
    this.payoutMethodCode = payoutMethodCode;
×
358
  }
×
359

360

361
  public CreateAccountResponse payoutSchedule(PayoutScheduleResponse payoutSchedule) {
362
    this.payoutSchedule = payoutSchedule;
×
363
    return this;
×
364
  }
365

366
   /**
367
   * Get payoutSchedule
368
   * @return payoutSchedule
369
  **/
370
  @ApiModelProperty(value = "")
371
  @JsonProperty(JSON_PROPERTY_PAYOUT_SCHEDULE)
372
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
373

374
  public PayoutScheduleResponse getPayoutSchedule() {
375
    return payoutSchedule;
×
376
  }
377

378

379
  @JsonProperty(JSON_PROPERTY_PAYOUT_SCHEDULE)
380
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
381
  public void setPayoutSchedule(PayoutScheduleResponse payoutSchedule) {
382
    this.payoutSchedule = payoutSchedule;
×
383
  }
×
384

385

386
  public CreateAccountResponse payoutSpeed(PayoutSpeedEnum payoutSpeed) {
387
    this.payoutSpeed = payoutSpeed;
×
388
    return this;
×
389
  }
390

391
   /**
392
   * Speed with which payouts for this account are processed. Permitted values: &#x60;STANDARD&#x60;, &#x60;SAME_DAY&#x60;.
393
   * @return payoutSpeed
394
  **/
395
  @ApiModelProperty(value = "Speed with which payouts for this account are processed. Permitted values: `STANDARD`, `SAME_DAY`.")
396
  @JsonProperty(JSON_PROPERTY_PAYOUT_SPEED)
397
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
398

399
  public PayoutSpeedEnum getPayoutSpeed() {
400
    return payoutSpeed;
×
401
  }
402

403

404
  @JsonProperty(JSON_PROPERTY_PAYOUT_SPEED)
405
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
406
  public void setPayoutSpeed(PayoutSpeedEnum payoutSpeed) {
407
    this.payoutSpeed = payoutSpeed;
×
408
  }
×
409

410

411
  public CreateAccountResponse pspReference(String pspReference) {
412
    this.pspReference = pspReference;
×
413
    return this;
×
414
  }
415

416
   /**
417
   * The reference of a request. Can be used to uniquely identify the request.
418
   * @return pspReference
419
  **/
420
  @ApiModelProperty(value = "The reference of a request. Can be used to uniquely identify the request.")
421
  @JsonProperty(JSON_PROPERTY_PSP_REFERENCE)
422
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
423

424
  public String getPspReference() {
425
    return pspReference;
×
426
  }
427

428

429
  @JsonProperty(JSON_PROPERTY_PSP_REFERENCE)
430
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
431
  public void setPspReference(String pspReference) {
432
    this.pspReference = pspReference;
×
433
  }
×
434

435

436
  public CreateAccountResponse resultCode(String resultCode) {
437
    this.resultCode = resultCode;
×
438
    return this;
×
439
  }
440

441
   /**
442
   * The result code.
443
   * @return resultCode
444
  **/
445
  @ApiModelProperty(value = "The result code.")
446
  @JsonProperty(JSON_PROPERTY_RESULT_CODE)
447
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
448

449
  public String getResultCode() {
450
    return resultCode;
×
451
  }
452

453

454
  @JsonProperty(JSON_PROPERTY_RESULT_CODE)
455
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
456
  public void setResultCode(String resultCode) {
457
    this.resultCode = resultCode;
×
458
  }
×
459

460

461
  public CreateAccountResponse status(StatusEnum status) {
462
    this.status = status;
×
463
    return this;
×
464
  }
465

466
   /**
467
   * The status of the account. &gt;Permitted values: &#x60;Active&#x60;.
468
   * @return status
469
  **/
470
  @ApiModelProperty(value = "The status of the account. >Permitted values: `Active`.")
471
  @JsonProperty(JSON_PROPERTY_STATUS)
472
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
473

474
  public StatusEnum getStatus() {
475
    return status;
×
476
  }
477

478

479
  @JsonProperty(JSON_PROPERTY_STATUS)
480
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
481
  public void setStatus(StatusEnum status) {
482
    this.status = status;
×
483
  }
×
484

485

486
  /**
487
   * Return true if this CreateAccountResponse object is equal to o.
488
   */
489
  @Override
490
  public boolean equals(Object o) {
491
    if (this == o) {
×
492
      return true;
×
493
    }
494
    if (o == null || getClass() != o.getClass()) {
×
495
      return false;
×
496
    }
497
    CreateAccountResponse createAccountResponse = (CreateAccountResponse) o;
×
498
    return Objects.equals(this.accountCode, createAccountResponse.accountCode) &&
×
499
        Objects.equals(this.accountHolderCode, createAccountResponse.accountHolderCode) &&
×
500
        Objects.equals(this.bankAccountUUID, createAccountResponse.bankAccountUUID) &&
×
501
        Objects.equals(this.description, createAccountResponse.description) &&
×
502
        Objects.equals(this.invalidFields, createAccountResponse.invalidFields) &&
×
503
        Objects.equals(this.metadata, createAccountResponse.metadata) &&
×
504
        Objects.equals(this.payoutMethodCode, createAccountResponse.payoutMethodCode) &&
×
505
        Objects.equals(this.payoutSchedule, createAccountResponse.payoutSchedule) &&
×
506
        Objects.equals(this.payoutSpeed, createAccountResponse.payoutSpeed) &&
×
507
        Objects.equals(this.pspReference, createAccountResponse.pspReference) &&
×
508
        Objects.equals(this.resultCode, createAccountResponse.resultCode) &&
×
509
        Objects.equals(this.status, createAccountResponse.status);
×
510
  }
511

512
  @Override
513
  public int hashCode() {
514
    return Objects.hash(accountCode, accountHolderCode, bankAccountUUID, description, invalidFields, metadata, payoutMethodCode, payoutSchedule, payoutSpeed, pspReference, resultCode, status);
×
515
  }
516

517
  @Override
518
  public String toString() {
519
    StringBuilder sb = new StringBuilder();
×
520
    sb.append("class CreateAccountResponse {\n");
×
521
    sb.append("    accountCode: ").append(toIndentedString(accountCode)).append("\n");
×
522
    sb.append("    accountHolderCode: ").append(toIndentedString(accountHolderCode)).append("\n");
×
523
    sb.append("    bankAccountUUID: ").append(toIndentedString(bankAccountUUID)).append("\n");
×
524
    sb.append("    description: ").append(toIndentedString(description)).append("\n");
×
525
    sb.append("    invalidFields: ").append(toIndentedString(invalidFields)).append("\n");
×
526
    sb.append("    metadata: ").append(toIndentedString(metadata)).append("\n");
×
527
    sb.append("    payoutMethodCode: ").append(toIndentedString(payoutMethodCode)).append("\n");
×
528
    sb.append("    payoutSchedule: ").append(toIndentedString(payoutSchedule)).append("\n");
×
529
    sb.append("    payoutSpeed: ").append(toIndentedString(payoutSpeed)).append("\n");
×
530
    sb.append("    pspReference: ").append(toIndentedString(pspReference)).append("\n");
×
531
    sb.append("    resultCode: ").append(toIndentedString(resultCode)).append("\n");
×
532
    sb.append("    status: ").append(toIndentedString(status)).append("\n");
×
533
    sb.append("}");
×
534
    return sb.toString();
×
535
  }
536

537
  /**
538
   * Convert the given object to string with each line indented by 4 spaces
539
   * (except the first line).
540
   */
541
  private String toIndentedString(Object o) {
542
    if (o == null) {
×
543
      return "null";
×
544
    }
545
    return o.toString().replace("\n", "\n    ");
×
546
  }
547

548
/**
549
   * Create an instance of CreateAccountResponse given an JSON string
550
   *
551
   * @param jsonString JSON string
552
   * @return An instance of CreateAccountResponse
553
   * @throws JsonProcessingException if the JSON string is invalid with respect to CreateAccountResponse
554
   */
555
  public static CreateAccountResponse fromJson(String jsonString) throws JsonProcessingException {
556
    return JSON.getMapper().readValue(jsonString, CreateAccountResponse.class);
×
557
  }
558
/**
559
  * Convert an instance of CreateAccountResponse to an JSON string
560
  *
561
  * @return JSON string
562
  */
563
  public String toJson() throws JsonProcessingException {
564
    return JSON.getMapper().writeValueAsString(this);
×
565
  }
566
}
567

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