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

36

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

53
public class UpdateAccountResponse {
54
  public static final String JSON_PROPERTY_ACCOUNT_CODE = "accountCode";
55
  private String accountCode;
56

57
  public static final String JSON_PROPERTY_BANK_ACCOUNT_U_U_I_D = "bankAccountUUID";
58
  private String bankAccountUUID;
59

60
  public static final String JSON_PROPERTY_DESCRIPTION = "description";
61
  private String description;
62

63
  public static final String JSON_PROPERTY_INVALID_FIELDS = "invalidFields";
64
  private List<ErrorFieldType> invalidFields = null;
×
65

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

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

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

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

85
    private String value;
86

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

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

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

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

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

115
  public static final String JSON_PROPERTY_PSP_REFERENCE = "pspReference";
116
  private String pspReference;
117

118
  public static final String JSON_PROPERTY_RESULT_CODE = "resultCode";
119
  private String resultCode;
120

121
  public UpdateAccountResponse() { 
×
122
  }
×
123

124
  public UpdateAccountResponse accountCode(String accountCode) {
125
    this.accountCode = accountCode;
×
126
    return this;
×
127
  }
128

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

137
  public String getAccountCode() {
138
    return accountCode;
×
139
  }
140

141

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

148

149
  public UpdateAccountResponse bankAccountUUID(String bankAccountUUID) {
150
    this.bankAccountUUID = bankAccountUUID;
×
151
    return this;
×
152
  }
153

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

162
  public String getBankAccountUUID() {
163
    return bankAccountUUID;
×
164
  }
165

166

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

173

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

179
   /**
180
   * The description of the account.
181
   * @return description
182
  **/
183
  @ApiModelProperty(value = "The description of the account.")
184
  @JsonProperty(JSON_PROPERTY_DESCRIPTION)
185
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
186

187
  public String getDescription() {
188
    return description;
×
189
  }
190

191

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

198

199
  public UpdateAccountResponse invalidFields(List<ErrorFieldType> invalidFields) {
200
    this.invalidFields = invalidFields;
×
201
    return this;
×
202
  }
203

204
  public UpdateAccountResponse addInvalidFieldsItem(ErrorFieldType invalidFieldsItem) {
205
    if (this.invalidFields == null) {
×
206
      this.invalidFields = new ArrayList<>();
×
207
    }
208
    this.invalidFields.add(invalidFieldsItem);
×
209
    return this;
×
210
  }
211

212
   /**
213
   * A list of fields that caused the &#x60;/updateAccount&#x60; request to fail.
214
   * @return invalidFields
215
  **/
216
  @ApiModelProperty(value = "A list of fields that caused the `/updateAccount` request to fail.")
217
  @JsonProperty(JSON_PROPERTY_INVALID_FIELDS)
218
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
219

220
  public List<ErrorFieldType> getInvalidFields() {
221
    return invalidFields;
×
222
  }
223

224

225
  @JsonProperty(JSON_PROPERTY_INVALID_FIELDS)
226
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
227
  public void setInvalidFields(List<ErrorFieldType> invalidFields) {
228
    this.invalidFields = invalidFields;
×
229
  }
×
230

231

232
  public UpdateAccountResponse metadata(Map<String, String> metadata) {
233
    this.metadata = metadata;
×
234
    return this;
×
235
  }
236

237
  public UpdateAccountResponse putMetadataItem(String key, String metadataItem) {
238
    if (this.metadata == null) {
×
239
      this.metadata = new HashMap<>();
×
240
    }
241
    this.metadata.put(key, metadataItem);
×
242
    return this;
×
243
  }
244

245
   /**
246
   * A set of key and value pairs containing metadata.
247
   * @return metadata
248
  **/
249
  @ApiModelProperty(value = "A set of key and value pairs containing metadata.")
250
  @JsonProperty(JSON_PROPERTY_METADATA)
251
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
252

253
  public Map<String, String> getMetadata() {
254
    return metadata;
×
255
  }
256

257

258
  @JsonProperty(JSON_PROPERTY_METADATA)
259
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
260
  public void setMetadata(Map<String, String> metadata) {
261
    this.metadata = metadata;
×
262
  }
×
263

264

265
  public UpdateAccountResponse payoutMethodCode(String payoutMethodCode) {
266
    this.payoutMethodCode = payoutMethodCode;
×
267
    return this;
×
268
  }
269

270
   /**
271
   * 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.
272
   * @return payoutMethodCode
273
  **/
274
  @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.")
275
  @JsonProperty(JSON_PROPERTY_PAYOUT_METHOD_CODE)
276
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
277

278
  public String getPayoutMethodCode() {
279
    return payoutMethodCode;
×
280
  }
281

282

283
  @JsonProperty(JSON_PROPERTY_PAYOUT_METHOD_CODE)
284
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
285
  public void setPayoutMethodCode(String payoutMethodCode) {
286
    this.payoutMethodCode = payoutMethodCode;
×
287
  }
×
288

289

290
  public UpdateAccountResponse payoutSchedule(PayoutScheduleResponse payoutSchedule) {
291
    this.payoutSchedule = payoutSchedule;
×
292
    return this;
×
293
  }
294

295
   /**
296
   * Get payoutSchedule
297
   * @return payoutSchedule
298
  **/
299
  @ApiModelProperty(value = "")
300
  @JsonProperty(JSON_PROPERTY_PAYOUT_SCHEDULE)
301
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
302

303
  public PayoutScheduleResponse getPayoutSchedule() {
304
    return payoutSchedule;
×
305
  }
306

307

308
  @JsonProperty(JSON_PROPERTY_PAYOUT_SCHEDULE)
309
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
310
  public void setPayoutSchedule(PayoutScheduleResponse payoutSchedule) {
311
    this.payoutSchedule = payoutSchedule;
×
312
  }
×
313

314

315
  public UpdateAccountResponse payoutSpeed(PayoutSpeedEnum payoutSpeed) {
316
    this.payoutSpeed = payoutSpeed;
×
317
    return this;
×
318
  }
319

320
   /**
321
   * Speed with which payouts for this account are processed. Permitted values: &#x60;STANDARD&#x60;, &#x60;SAME_DAY&#x60;.
322
   * @return payoutSpeed
323
  **/
324
  @ApiModelProperty(value = "Speed with which payouts for this account are processed. Permitted values: `STANDARD`, `SAME_DAY`.")
325
  @JsonProperty(JSON_PROPERTY_PAYOUT_SPEED)
326
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
327

328
  public PayoutSpeedEnum getPayoutSpeed() {
329
    return payoutSpeed;
×
330
  }
331

332

333
  @JsonProperty(JSON_PROPERTY_PAYOUT_SPEED)
334
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
335
  public void setPayoutSpeed(PayoutSpeedEnum payoutSpeed) {
336
    this.payoutSpeed = payoutSpeed;
×
337
  }
×
338

339

340
  public UpdateAccountResponse pspReference(String pspReference) {
341
    this.pspReference = pspReference;
×
342
    return this;
×
343
  }
344

345
   /**
346
   * The reference of a request. Can be used to uniquely identify the request.
347
   * @return pspReference
348
  **/
349
  @ApiModelProperty(value = "The reference of a request. Can be used to uniquely identify the request.")
350
  @JsonProperty(JSON_PROPERTY_PSP_REFERENCE)
351
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
352

353
  public String getPspReference() {
354
    return pspReference;
×
355
  }
356

357

358
  @JsonProperty(JSON_PROPERTY_PSP_REFERENCE)
359
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
360
  public void setPspReference(String pspReference) {
361
    this.pspReference = pspReference;
×
362
  }
×
363

364

365
  public UpdateAccountResponse resultCode(String resultCode) {
366
    this.resultCode = resultCode;
×
367
    return this;
×
368
  }
369

370
   /**
371
   * The result code.
372
   * @return resultCode
373
  **/
374
  @ApiModelProperty(value = "The result code.")
375
  @JsonProperty(JSON_PROPERTY_RESULT_CODE)
376
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
377

378
  public String getResultCode() {
379
    return resultCode;
×
380
  }
381

382

383
  @JsonProperty(JSON_PROPERTY_RESULT_CODE)
384
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
385
  public void setResultCode(String resultCode) {
386
    this.resultCode = resultCode;
×
387
  }
×
388

389

390
  /**
391
   * Return true if this UpdateAccountResponse object is equal to o.
392
   */
393
  @Override
394
  public boolean equals(Object o) {
395
    if (this == o) {
×
396
      return true;
×
397
    }
398
    if (o == null || getClass() != o.getClass()) {
×
399
      return false;
×
400
    }
401
    UpdateAccountResponse updateAccountResponse = (UpdateAccountResponse) o;
×
402
    return Objects.equals(this.accountCode, updateAccountResponse.accountCode) &&
×
403
        Objects.equals(this.bankAccountUUID, updateAccountResponse.bankAccountUUID) &&
×
404
        Objects.equals(this.description, updateAccountResponse.description) &&
×
405
        Objects.equals(this.invalidFields, updateAccountResponse.invalidFields) &&
×
406
        Objects.equals(this.metadata, updateAccountResponse.metadata) &&
×
407
        Objects.equals(this.payoutMethodCode, updateAccountResponse.payoutMethodCode) &&
×
408
        Objects.equals(this.payoutSchedule, updateAccountResponse.payoutSchedule) &&
×
409
        Objects.equals(this.payoutSpeed, updateAccountResponse.payoutSpeed) &&
×
410
        Objects.equals(this.pspReference, updateAccountResponse.pspReference) &&
×
411
        Objects.equals(this.resultCode, updateAccountResponse.resultCode);
×
412
  }
413

414
  @Override
415
  public int hashCode() {
416
    return Objects.hash(accountCode, bankAccountUUID, description, invalidFields, metadata, payoutMethodCode, payoutSchedule, payoutSpeed, pspReference, resultCode);
×
417
  }
418

419
  @Override
420
  public String toString() {
421
    StringBuilder sb = new StringBuilder();
×
422
    sb.append("class UpdateAccountResponse {\n");
×
423
    sb.append("    accountCode: ").append(toIndentedString(accountCode)).append("\n");
×
424
    sb.append("    bankAccountUUID: ").append(toIndentedString(bankAccountUUID)).append("\n");
×
425
    sb.append("    description: ").append(toIndentedString(description)).append("\n");
×
426
    sb.append("    invalidFields: ").append(toIndentedString(invalidFields)).append("\n");
×
427
    sb.append("    metadata: ").append(toIndentedString(metadata)).append("\n");
×
428
    sb.append("    payoutMethodCode: ").append(toIndentedString(payoutMethodCode)).append("\n");
×
429
    sb.append("    payoutSchedule: ").append(toIndentedString(payoutSchedule)).append("\n");
×
430
    sb.append("    payoutSpeed: ").append(toIndentedString(payoutSpeed)).append("\n");
×
431
    sb.append("    pspReference: ").append(toIndentedString(pspReference)).append("\n");
×
432
    sb.append("    resultCode: ").append(toIndentedString(resultCode)).append("\n");
×
433
    sb.append("}");
×
434
    return sb.toString();
×
435
  }
436

437
  /**
438
   * Convert the given object to string with each line indented by 4 spaces
439
   * (except the first line).
440
   */
441
  private String toIndentedString(Object o) {
442
    if (o == null) {
×
443
      return "null";
×
444
    }
445
    return o.toString().replace("\n", "\n    ");
×
446
  }
447

448
/**
449
   * Create an instance of UpdateAccountResponse given an JSON string
450
   *
451
   * @param jsonString JSON string
452
   * @return An instance of UpdateAccountResponse
453
   * @throws JsonProcessingException if the JSON string is invalid with respect to UpdateAccountResponse
454
   */
455
  public static UpdateAccountResponse fromJson(String jsonString) throws JsonProcessingException {
456
    return JSON.getMapper().readValue(jsonString, UpdateAccountResponse.class);
×
457
  }
458
/**
459
  * Convert an instance of UpdateAccountResponse to an JSON string
460
  *
461
  * @return JSON string
462
  */
463
  public String toJson() throws JsonProcessingException {
464
    return JSON.getMapper().writeValueAsString(this);
×
465
  }
466
}
467

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