• 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/UpdateAccountRequest.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.UpdatePayoutScheduleRequest;
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
 * UpdateAccountRequest
37
 */
38
@JsonPropertyOrder({
39
  UpdateAccountRequest.JSON_PROPERTY_ACCOUNT_CODE,
40
  UpdateAccountRequest.JSON_PROPERTY_BANK_ACCOUNT_U_U_I_D,
41
  UpdateAccountRequest.JSON_PROPERTY_DESCRIPTION,
42
  UpdateAccountRequest.JSON_PROPERTY_METADATA,
43
  UpdateAccountRequest.JSON_PROPERTY_PAYOUT_METHOD_CODE,
44
  UpdateAccountRequest.JSON_PROPERTY_PAYOUT_SCHEDULE,
45
  UpdateAccountRequest.JSON_PROPERTY_PAYOUT_SPEED
46
})
47

48
public class UpdateAccountRequest {
49
  public static final String JSON_PROPERTY_ACCOUNT_CODE = "accountCode";
50
  private String accountCode;
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
  public static final String JSON_PROPERTY_PAYOUT_SCHEDULE = "payoutSchedule";
65
  private UpdatePayoutScheduleRequest payoutSchedule;
66

67
  /**
68
   * Speed with which payouts for this account are processed. Permitted values: &#x60;STANDARD&#x60;, &#x60;SAME_DAY&#x60;.
69
   */
70
  public enum PayoutSpeedEnum {
×
71
    INSTANT("INSTANT"),
×
72
    
73
    SAME_DAY("SAME_DAY"),
×
74
    
75
    STANDARD("STANDARD");
×
76

77
    private String value;
78

79
    PayoutSpeedEnum(String value) {
×
80
      this.value = value;
×
81
    }
×
82

83
    @JsonValue
84
    public String getValue() {
85
      return value;
×
86
    }
87

88
    @Override
89
    public String toString() {
90
      return String.valueOf(value);
×
91
    }
92

93
    @JsonCreator
94
    public static PayoutSpeedEnum fromValue(String value) {
95
      for (PayoutSpeedEnum b : PayoutSpeedEnum.values()) {
×
96
        if (b.value.equals(value)) {
×
97
          return b;
×
98
        }
99
      }
100
      throw new IllegalArgumentException("Unexpected value '" + value + "'");
×
101
    }
102
  }
103

104
  public static final String JSON_PROPERTY_PAYOUT_SPEED = "payoutSpeed";
105
  private PayoutSpeedEnum payoutSpeed;
106

107
  public UpdateAccountRequest() { 
×
108
  }
×
109

110
  public UpdateAccountRequest accountCode(String accountCode) {
111
    this.accountCode = accountCode;
×
112
    return this;
×
113
  }
114

115
   /**
116
   * The code of the account to update.
117
   * @return accountCode
118
  **/
119
  @ApiModelProperty(required = true, value = "The code of the account to update.")
120
  @JsonProperty(JSON_PROPERTY_ACCOUNT_CODE)
121
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
122

123
  public String getAccountCode() {
124
    return accountCode;
×
125
  }
126

127

128
  @JsonProperty(JSON_PROPERTY_ACCOUNT_CODE)
129
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
130
  public void setAccountCode(String accountCode) {
131
    this.accountCode = accountCode;
×
132
  }
×
133

134

135
  public UpdateAccountRequest bankAccountUUID(String bankAccountUUID) {
136
    this.bankAccountUUID = bankAccountUUID;
×
137
    return this;
×
138
  }
139

140
   /**
141
   * 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.
142
   * @return bankAccountUUID
143
  **/
144
  @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.")
145
  @JsonProperty(JSON_PROPERTY_BANK_ACCOUNT_U_U_I_D)
146
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
147

148
  public String getBankAccountUUID() {
149
    return bankAccountUUID;
×
150
  }
151

152

153
  @JsonProperty(JSON_PROPERTY_BANK_ACCOUNT_U_U_I_D)
154
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
155
  public void setBankAccountUUID(String bankAccountUUID) {
156
    this.bankAccountUUID = bankAccountUUID;
×
157
  }
×
158

159

160
  public UpdateAccountRequest description(String description) {
161
    this.description = description;
×
162
    return this;
×
163
  }
164

165
   /**
166
   * 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;.
167
   * @return description
168
  **/
169
  @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 `_`.")
170
  @JsonProperty(JSON_PROPERTY_DESCRIPTION)
171
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
172

173
  public String getDescription() {
174
    return description;
×
175
  }
176

177

178
  @JsonProperty(JSON_PROPERTY_DESCRIPTION)
179
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
180
  public void setDescription(String description) {
181
    this.description = description;
×
182
  }
×
183

184

185
  public UpdateAccountRequest metadata(Map<String, String> metadata) {
186
    this.metadata = metadata;
×
187
    return this;
×
188
  }
189

190
  public UpdateAccountRequest putMetadataItem(String key, String metadataItem) {
191
    if (this.metadata == null) {
×
192
      this.metadata = new HashMap<>();
×
193
    }
194
    this.metadata.put(key, metadataItem);
×
195
    return this;
×
196
  }
197

198
   /**
199
   * 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.
200
   * @return metadata
201
  **/
202
  @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.")
203
  @JsonProperty(JSON_PROPERTY_METADATA)
204
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
205

206
  public Map<String, String> getMetadata() {
207
    return metadata;
×
208
  }
209

210

211
  @JsonProperty(JSON_PROPERTY_METADATA)
212
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
213
  public void setMetadata(Map<String, String> metadata) {
214
    this.metadata = metadata;
×
215
  }
×
216

217

218
  public UpdateAccountRequest payoutMethodCode(String payoutMethodCode) {
219
    this.payoutMethodCode = payoutMethodCode;
×
220
    return this;
×
221
  }
222

223
   /**
224
   * 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.
225
   * @return payoutMethodCode
226
  **/
227
  @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.")
228
  @JsonProperty(JSON_PROPERTY_PAYOUT_METHOD_CODE)
229
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
230

231
  public String getPayoutMethodCode() {
232
    return payoutMethodCode;
×
233
  }
234

235

236
  @JsonProperty(JSON_PROPERTY_PAYOUT_METHOD_CODE)
237
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
238
  public void setPayoutMethodCode(String payoutMethodCode) {
239
    this.payoutMethodCode = payoutMethodCode;
×
240
  }
×
241

242

243
  public UpdateAccountRequest payoutSchedule(UpdatePayoutScheduleRequest payoutSchedule) {
244
    this.payoutSchedule = payoutSchedule;
×
245
    return this;
×
246
  }
247

248
   /**
249
   * Get payoutSchedule
250
   * @return payoutSchedule
251
  **/
252
  @ApiModelProperty(value = "")
253
  @JsonProperty(JSON_PROPERTY_PAYOUT_SCHEDULE)
254
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
255

256
  public UpdatePayoutScheduleRequest getPayoutSchedule() {
257
    return payoutSchedule;
×
258
  }
259

260

261
  @JsonProperty(JSON_PROPERTY_PAYOUT_SCHEDULE)
262
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
263
  public void setPayoutSchedule(UpdatePayoutScheduleRequest payoutSchedule) {
264
    this.payoutSchedule = payoutSchedule;
×
265
  }
×
266

267

268
  public UpdateAccountRequest payoutSpeed(PayoutSpeedEnum payoutSpeed) {
269
    this.payoutSpeed = payoutSpeed;
×
270
    return this;
×
271
  }
272

273
   /**
274
   * Speed with which payouts for this account are processed. Permitted values: &#x60;STANDARD&#x60;, &#x60;SAME_DAY&#x60;.
275
   * @return payoutSpeed
276
  **/
277
  @ApiModelProperty(value = "Speed with which payouts for this account are processed. Permitted values: `STANDARD`, `SAME_DAY`.")
278
  @JsonProperty(JSON_PROPERTY_PAYOUT_SPEED)
279
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
280

281
  public PayoutSpeedEnum getPayoutSpeed() {
282
    return payoutSpeed;
×
283
  }
284

285

286
  @JsonProperty(JSON_PROPERTY_PAYOUT_SPEED)
287
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
288
  public void setPayoutSpeed(PayoutSpeedEnum payoutSpeed) {
289
    this.payoutSpeed = payoutSpeed;
×
290
  }
×
291

292

293
  /**
294
   * Return true if this UpdateAccountRequest object is equal to o.
295
   */
296
  @Override
297
  public boolean equals(Object o) {
298
    if (this == o) {
×
299
      return true;
×
300
    }
301
    if (o == null || getClass() != o.getClass()) {
×
302
      return false;
×
303
    }
304
    UpdateAccountRequest updateAccountRequest = (UpdateAccountRequest) o;
×
305
    return Objects.equals(this.accountCode, updateAccountRequest.accountCode) &&
×
306
        Objects.equals(this.bankAccountUUID, updateAccountRequest.bankAccountUUID) &&
×
307
        Objects.equals(this.description, updateAccountRequest.description) &&
×
308
        Objects.equals(this.metadata, updateAccountRequest.metadata) &&
×
309
        Objects.equals(this.payoutMethodCode, updateAccountRequest.payoutMethodCode) &&
×
310
        Objects.equals(this.payoutSchedule, updateAccountRequest.payoutSchedule) &&
×
311
        Objects.equals(this.payoutSpeed, updateAccountRequest.payoutSpeed);
×
312
  }
313

314
  @Override
315
  public int hashCode() {
316
    return Objects.hash(accountCode, bankAccountUUID, description, metadata, payoutMethodCode, payoutSchedule, payoutSpeed);
×
317
  }
318

319
  @Override
320
  public String toString() {
321
    StringBuilder sb = new StringBuilder();
×
322
    sb.append("class UpdateAccountRequest {\n");
×
323
    sb.append("    accountCode: ").append(toIndentedString(accountCode)).append("\n");
×
324
    sb.append("    bankAccountUUID: ").append(toIndentedString(bankAccountUUID)).append("\n");
×
325
    sb.append("    description: ").append(toIndentedString(description)).append("\n");
×
326
    sb.append("    metadata: ").append(toIndentedString(metadata)).append("\n");
×
327
    sb.append("    payoutMethodCode: ").append(toIndentedString(payoutMethodCode)).append("\n");
×
328
    sb.append("    payoutSchedule: ").append(toIndentedString(payoutSchedule)).append("\n");
×
329
    sb.append("    payoutSpeed: ").append(toIndentedString(payoutSpeed)).append("\n");
×
330
    sb.append("}");
×
331
    return sb.toString();
×
332
  }
333

334
  /**
335
   * Convert the given object to string with each line indented by 4 spaces
336
   * (except the first line).
337
   */
338
  private String toIndentedString(Object o) {
339
    if (o == null) {
×
340
      return "null";
×
341
    }
342
    return o.toString().replace("\n", "\n    ");
×
343
  }
344

345
/**
346
   * Create an instance of UpdateAccountRequest given an JSON string
347
   *
348
   * @param jsonString JSON string
349
   * @return An instance of UpdateAccountRequest
350
   * @throws JsonProcessingException if the JSON string is invalid with respect to UpdateAccountRequest
351
   */
352
  public static UpdateAccountRequest fromJson(String jsonString) throws JsonProcessingException {
353
    return JSON.getMapper().readValue(jsonString, UpdateAccountRequest.class);
×
354
  }
355
/**
356
  * Convert an instance of UpdateAccountRequest to an JSON string
357
  *
358
  * @return JSON string
359
  */
360
  public String toJson() throws JsonProcessingException {
361
    return JSON.getMapper().writeValueAsString(this);
×
362
  }
363
}
364

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