• 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/Account.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.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.HashMap;
29
import java.util.List;
30
import java.util.Map;
31
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
32
import com.fasterxml.jackson.core.JsonProcessingException;
33

34

35
/**
36
 * Account
37
 */
38
@JsonPropertyOrder({
39
  Account.JSON_PROPERTY_ACCOUNT_CODE,
40
  Account.JSON_PROPERTY_BANK_ACCOUNT_U_U_I_D,
41
  Account.JSON_PROPERTY_BENEFICIARY_ACCOUNT,
42
  Account.JSON_PROPERTY_BENEFICIARY_MERCHANT_REFERENCE,
43
  Account.JSON_PROPERTY_DESCRIPTION,
44
  Account.JSON_PROPERTY_METADATA,
45
  Account.JSON_PROPERTY_PAYOUT_METHOD_CODE,
46
  Account.JSON_PROPERTY_PAYOUT_SCHEDULE,
47
  Account.JSON_PROPERTY_PAYOUT_SPEED,
48
  Account.JSON_PROPERTY_STATUS
49
})
50

51
public class Account {
52
  public static final String JSON_PROPERTY_ACCOUNT_CODE = "accountCode";
53
  private String accountCode;
54

55
  public static final String JSON_PROPERTY_BANK_ACCOUNT_U_U_I_D = "bankAccountUUID";
56
  private String bankAccountUUID;
57

58
  public static final String JSON_PROPERTY_BENEFICIARY_ACCOUNT = "beneficiaryAccount";
59
  private String beneficiaryAccount;
60

61
  public static final String JSON_PROPERTY_BENEFICIARY_MERCHANT_REFERENCE = "beneficiaryMerchantReference";
62
  private String beneficiaryMerchantReference;
63

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

67
  public static final String JSON_PROPERTY_METADATA = "metadata";
68
  private Map<String, String> metadata = null;
×
69

70
  public static final String JSON_PROPERTY_PAYOUT_METHOD_CODE = "payoutMethodCode";
71
  private String payoutMethodCode;
72

73
  public static final String JSON_PROPERTY_PAYOUT_SCHEDULE = "payoutSchedule";
74
  private PayoutScheduleResponse payoutSchedule;
75

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

86
    private String value;
87

88
    PayoutSpeedEnum(String value) {
×
89
      this.value = value;
×
90
    }
×
91

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

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

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

113
  public static final String JSON_PROPERTY_PAYOUT_SPEED = "payoutSpeed";
114
  private PayoutSpeedEnum payoutSpeed;
115

116
  public static final String JSON_PROPERTY_STATUS = "status";
117
  private String status;
118

119
  public Account() { 
×
120
  }
×
121

122
  public Account accountCode(String accountCode) {
123
    this.accountCode = accountCode;
×
124
    return this;
×
125
  }
126

127
   /**
128
   * The code of the account.
129
   * @return accountCode
130
  **/
131
  @ApiModelProperty(value = "The code of the account.")
132
  @JsonProperty(JSON_PROPERTY_ACCOUNT_CODE)
133
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
134

135
  public String getAccountCode() {
136
    return accountCode;
×
137
  }
138

139

140
  @JsonProperty(JSON_PROPERTY_ACCOUNT_CODE)
141
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
142
  public void setAccountCode(String accountCode) {
143
    this.accountCode = accountCode;
×
144
  }
×
145

146

147
  public Account bankAccountUUID(String bankAccountUUID) {
148
    this.bankAccountUUID = bankAccountUUID;
×
149
    return this;
×
150
  }
151

152
   /**
153
   * 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.
154
   * @return bankAccountUUID
155
  **/
156
  @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.")
157
  @JsonProperty(JSON_PROPERTY_BANK_ACCOUNT_U_U_I_D)
158
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
159

160
  public String getBankAccountUUID() {
161
    return bankAccountUUID;
×
162
  }
163

164

165
  @JsonProperty(JSON_PROPERTY_BANK_ACCOUNT_U_U_I_D)
166
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
167
  public void setBankAccountUUID(String bankAccountUUID) {
168
    this.bankAccountUUID = bankAccountUUID;
×
169
  }
×
170

171

172
  public Account beneficiaryAccount(String beneficiaryAccount) {
173
    this.beneficiaryAccount = beneficiaryAccount;
×
174
    return this;
×
175
  }
176

177
   /**
178
   * The beneficiary of the account.
179
   * @return beneficiaryAccount
180
  **/
181
  @ApiModelProperty(value = "The beneficiary of the account.")
182
  @JsonProperty(JSON_PROPERTY_BENEFICIARY_ACCOUNT)
183
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
184

185
  public String getBeneficiaryAccount() {
186
    return beneficiaryAccount;
×
187
  }
188

189

190
  @JsonProperty(JSON_PROPERTY_BENEFICIARY_ACCOUNT)
191
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
192
  public void setBeneficiaryAccount(String beneficiaryAccount) {
193
    this.beneficiaryAccount = beneficiaryAccount;
×
194
  }
×
195

196

197
  public Account beneficiaryMerchantReference(String beneficiaryMerchantReference) {
198
    this.beneficiaryMerchantReference = beneficiaryMerchantReference;
×
199
    return this;
×
200
  }
201

202
   /**
203
   * The reason that a beneficiary has been set up for this account. This may have been supplied during the setup of a beneficiary at the discretion of the executing user.
204
   * @return beneficiaryMerchantReference
205
  **/
206
  @ApiModelProperty(value = "The reason that a beneficiary has been set up for this account. This may have been supplied during the setup of a beneficiary at the discretion of the executing user.")
207
  @JsonProperty(JSON_PROPERTY_BENEFICIARY_MERCHANT_REFERENCE)
208
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
209

210
  public String getBeneficiaryMerchantReference() {
211
    return beneficiaryMerchantReference;
×
212
  }
213

214

215
  @JsonProperty(JSON_PROPERTY_BENEFICIARY_MERCHANT_REFERENCE)
216
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
217
  public void setBeneficiaryMerchantReference(String beneficiaryMerchantReference) {
218
    this.beneficiaryMerchantReference = beneficiaryMerchantReference;
×
219
  }
×
220

221

222
  public Account description(String description) {
223
    this.description = description;
×
224
    return this;
×
225
  }
226

227
   /**
228
   * A description of the account.
229
   * @return description
230
  **/
231
  @ApiModelProperty(value = "A description of the account.")
232
  @JsonProperty(JSON_PROPERTY_DESCRIPTION)
233
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
234

235
  public String getDescription() {
236
    return description;
×
237
  }
238

239

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

246

247
  public Account metadata(Map<String, String> metadata) {
248
    this.metadata = metadata;
×
249
    return this;
×
250
  }
251

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

260
   /**
261
   * 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.
262
   * @return metadata
263
  **/
264
  @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.")
265
  @JsonProperty(JSON_PROPERTY_METADATA)
266
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
267

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

272

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

279

280
  public Account payoutMethodCode(String payoutMethodCode) {
281
    this.payoutMethodCode = payoutMethodCode;
×
282
    return this;
×
283
  }
284

285
   /**
286
   * 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.
287
   * @return payoutMethodCode
288
  **/
289
  @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.")
290
  @JsonProperty(JSON_PROPERTY_PAYOUT_METHOD_CODE)
291
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
292

293
  public String getPayoutMethodCode() {
294
    return payoutMethodCode;
×
295
  }
296

297

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

304

305
  public Account payoutSchedule(PayoutScheduleResponse payoutSchedule) {
306
    this.payoutSchedule = payoutSchedule;
×
307
    return this;
×
308
  }
309

310
   /**
311
   * Get payoutSchedule
312
   * @return payoutSchedule
313
  **/
314
  @ApiModelProperty(value = "")
315
  @JsonProperty(JSON_PROPERTY_PAYOUT_SCHEDULE)
316
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
317

318
  public PayoutScheduleResponse getPayoutSchedule() {
319
    return payoutSchedule;
×
320
  }
321

322

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

329

330
  public Account payoutSpeed(PayoutSpeedEnum payoutSpeed) {
331
    this.payoutSpeed = payoutSpeed;
×
332
    return this;
×
333
  }
334

335
   /**
336
   * Speed with which payouts for this account are processed. Permitted values: &#x60;STANDARD&#x60;, &#x60;SAME_DAY&#x60;.
337
   * @return payoutSpeed
338
  **/
339
  @ApiModelProperty(value = "Speed with which payouts for this account are processed. Permitted values: `STANDARD`, `SAME_DAY`.")
340
  @JsonProperty(JSON_PROPERTY_PAYOUT_SPEED)
341
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
342

343
  public PayoutSpeedEnum getPayoutSpeed() {
344
    return payoutSpeed;
×
345
  }
346

347

348
  @JsonProperty(JSON_PROPERTY_PAYOUT_SPEED)
349
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
350
  public void setPayoutSpeed(PayoutSpeedEnum payoutSpeed) {
351
    this.payoutSpeed = payoutSpeed;
×
352
  }
×
353

354

355
  public Account status(String status) {
356
    this.status = status;
×
357
    return this;
×
358
  }
359

360
   /**
361
   * The status of the account. Possible values: &#x60;Active&#x60;, &#x60;Inactive&#x60;, &#x60;Suspended&#x60;, &#x60;Closed&#x60;.
362
   * @return status
363
  **/
364
  @ApiModelProperty(value = "The status of the account. Possible values: `Active`, `Inactive`, `Suspended`, `Closed`.")
365
  @JsonProperty(JSON_PROPERTY_STATUS)
366
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
367

368
  public String getStatus() {
369
    return status;
×
370
  }
371

372

373
  @JsonProperty(JSON_PROPERTY_STATUS)
374
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
375
  public void setStatus(String status) {
376
    this.status = status;
×
377
  }
×
378

379

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

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

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

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

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

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