• 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/UpdateAccountHolderRequest.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.AccountHolderDetails;
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 com.fasterxml.jackson.annotation.JsonPropertyOrder;
29
import com.fasterxml.jackson.core.JsonProcessingException;
30

31

32
/**
33
 * UpdateAccountHolderRequest
34
 */
35
@JsonPropertyOrder({
36
  UpdateAccountHolderRequest.JSON_PROPERTY_ACCOUNT_HOLDER_CODE,
37
  UpdateAccountHolderRequest.JSON_PROPERTY_ACCOUNT_HOLDER_DETAILS,
38
  UpdateAccountHolderRequest.JSON_PROPERTY_DESCRIPTION,
39
  UpdateAccountHolderRequest.JSON_PROPERTY_LEGAL_ENTITY,
40
  UpdateAccountHolderRequest.JSON_PROPERTY_PRIMARY_CURRENCY,
41
  UpdateAccountHolderRequest.JSON_PROPERTY_PROCESSING_TIER,
42
  UpdateAccountHolderRequest.JSON_PROPERTY_VERIFICATION_PROFILE
43
})
44

45
public class UpdateAccountHolderRequest {
46
  public static final String JSON_PROPERTY_ACCOUNT_HOLDER_CODE = "accountHolderCode";
47
  private String accountHolderCode;
48

49
  public static final String JSON_PROPERTY_ACCOUNT_HOLDER_DETAILS = "accountHolderDetails";
50
  private AccountHolderDetails accountHolderDetails;
51

52
  public static final String JSON_PROPERTY_DESCRIPTION = "description";
53
  private String description;
54

55
  /**
56
   * The legal entity type of the account holder. This determines the information that should be provided in the request.  Possible values: **Business**, **Individual**, or **NonProfit**.  * If set to **Business** or **NonProfit**, then `accountHolderDetails.businessDetails` must be provided, with at least one entry in the `accountHolderDetails.businessDetails.shareholders` list.  * If set to **Individual**, then `accountHolderDetails.individualDetails` must be provided.
57
   */
58
  public enum LegalEntityEnum {
×
59
    BUSINESS("Business"),
×
60
    
61
    INDIVIDUAL("Individual"),
×
62
    
63
    NONPROFIT("NonProfit"),
×
64
    
65
    PARTNERSHIP("Partnership"),
×
66
    
67
    PUBLICCOMPANY("PublicCompany");
×
68

69
    private String value;
70

71
    LegalEntityEnum(String value) {
×
72
      this.value = value;
×
73
    }
×
74

75
    @JsonValue
76
    public String getValue() {
77
      return value;
×
78
    }
79

80
    @Override
81
    public String toString() {
82
      return String.valueOf(value);
×
83
    }
84

85
    @JsonCreator
86
    public static LegalEntityEnum fromValue(String value) {
87
      for (LegalEntityEnum b : LegalEntityEnum.values()) {
×
88
        if (b.value.equals(value)) {
×
89
          return b;
×
90
        }
91
      }
92
      throw new IllegalArgumentException("Unexpected value '" + value + "'");
×
93
    }
94
  }
95

96
  public static final String JSON_PROPERTY_LEGAL_ENTITY = "legalEntity";
97
  private LegalEntityEnum legalEntity;
98

99
  public static final String JSON_PROPERTY_PRIMARY_CURRENCY = "primaryCurrency";
100
  private String primaryCurrency;
101

102
  public static final String JSON_PROPERTY_PROCESSING_TIER = "processingTier";
103
  private Integer processingTier;
104

105
  public static final String JSON_PROPERTY_VERIFICATION_PROFILE = "verificationProfile";
106
  private String verificationProfile;
107

108
  public UpdateAccountHolderRequest() { 
×
109
  }
×
110

111
  public UpdateAccountHolderRequest accountHolderCode(String accountHolderCode) {
112
    this.accountHolderCode = accountHolderCode;
×
113
    return this;
×
114
  }
115

116
   /**
117
   * The code of the Account Holder to be updated.
118
   * @return accountHolderCode
119
  **/
120
  @ApiModelProperty(required = true, value = "The code of the Account Holder to be updated.")
121
  @JsonProperty(JSON_PROPERTY_ACCOUNT_HOLDER_CODE)
122
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
123

124
  public String getAccountHolderCode() {
125
    return accountHolderCode;
×
126
  }
127

128

129
  @JsonProperty(JSON_PROPERTY_ACCOUNT_HOLDER_CODE)
130
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
131
  public void setAccountHolderCode(String accountHolderCode) {
132
    this.accountHolderCode = accountHolderCode;
×
133
  }
×
134

135

136
  public UpdateAccountHolderRequest accountHolderDetails(AccountHolderDetails accountHolderDetails) {
137
    this.accountHolderDetails = accountHolderDetails;
×
138
    return this;
×
139
  }
140

141
   /**
142
   * Get accountHolderDetails
143
   * @return accountHolderDetails
144
  **/
145
  @ApiModelProperty(value = "")
146
  @JsonProperty(JSON_PROPERTY_ACCOUNT_HOLDER_DETAILS)
147
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
148

149
  public AccountHolderDetails getAccountHolderDetails() {
150
    return accountHolderDetails;
×
151
  }
152

153

154
  @JsonProperty(JSON_PROPERTY_ACCOUNT_HOLDER_DETAILS)
155
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
156
  public void setAccountHolderDetails(AccountHolderDetails accountHolderDetails) {
157
    this.accountHolderDetails = accountHolderDetails;
×
158
  }
×
159

160

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

166
   /**
167
   * A description of the account holder, maximum 256 characters. You can use alphanumeric characters (A-Z, a-z, 0-9), white spaces, and underscores `_`.
168
   * @return description
169
  **/
170
  @ApiModelProperty(value = "A description of the account holder, maximum 256 characters. You can use alphanumeric characters (A-Z, a-z, 0-9), white spaces, and underscores `_`.")
171
  @JsonProperty(JSON_PROPERTY_DESCRIPTION)
172
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
173

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

178

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

185

186
  public UpdateAccountHolderRequest legalEntity(LegalEntityEnum legalEntity) {
187
    this.legalEntity = legalEntity;
×
188
    return this;
×
189
  }
190

191
   /**
192
   * The legal entity type of the account holder. This determines the information that should be provided in the request.  Possible values: **Business**, **Individual**, or **NonProfit**.  * If set to **Business** or **NonProfit**, then `accountHolderDetails.businessDetails` must be provided, with at least one entry in the `accountHolderDetails.businessDetails.shareholders` list.  * If set to **Individual**, then `accountHolderDetails.individualDetails` must be provided.
193
   * @return legalEntity
194
  **/
195
  @ApiModelProperty(value = "The legal entity type of the account holder. This determines the information that should be provided in the request.  Possible values: **Business**, **Individual**, or **NonProfit**.  * If set to **Business** or **NonProfit**, then `accountHolderDetails.businessDetails` must be provided, with at least one entry in the `accountHolderDetails.businessDetails.shareholders` list.  * If set to **Individual**, then `accountHolderDetails.individualDetails` must be provided.")
196
  @JsonProperty(JSON_PROPERTY_LEGAL_ENTITY)
197
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
198

199
  public LegalEntityEnum getLegalEntity() {
200
    return legalEntity;
×
201
  }
202

203

204
  @JsonProperty(JSON_PROPERTY_LEGAL_ENTITY)
205
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
206
  public void setLegalEntity(LegalEntityEnum legalEntity) {
207
    this.legalEntity = legalEntity;
×
208
  }
×
209

210

211
  public UpdateAccountHolderRequest primaryCurrency(String primaryCurrency) {
212
    this.primaryCurrency = primaryCurrency;
×
213
    return this;
×
214
  }
215

216
   /**
217
   * The primary three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes), to which the account holder should be updated.
218
   * @return primaryCurrency
219
   * @deprecated
220
  **/
221
  @Deprecated
222
  @ApiModelProperty(value = "The primary three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes), to which the account holder should be updated.")
223
  @JsonProperty(JSON_PROPERTY_PRIMARY_CURRENCY)
224
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
225

226
  public String getPrimaryCurrency() {
227
    return primaryCurrency;
×
228
  }
229

230

231
  @Deprecated
232
  @JsonProperty(JSON_PROPERTY_PRIMARY_CURRENCY)
233
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
234
  public void setPrimaryCurrency(String primaryCurrency) {
235
    this.primaryCurrency = primaryCurrency;
×
236
  }
×
237

238

239
  public UpdateAccountHolderRequest processingTier(Integer processingTier) {
240
    this.processingTier = processingTier;
×
241
    return this;
×
242
  }
243

244
   /**
245
   * The processing tier to which the Account Holder should be updated. >The processing tier can not be lowered through this request.  >Required if accountHolderDetails are not provided.
246
   * @return processingTier
247
  **/
248
  @ApiModelProperty(value = "The processing tier to which the Account Holder should be updated. >The processing tier can not be lowered through this request.  >Required if accountHolderDetails are not provided.")
249
  @JsonProperty(JSON_PROPERTY_PROCESSING_TIER)
250
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
251

252
  public Integer getProcessingTier() {
253
    return processingTier;
×
254
  }
255

256

257
  @JsonProperty(JSON_PROPERTY_PROCESSING_TIER)
258
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
259
  public void setProcessingTier(Integer processingTier) {
260
    this.processingTier = processingTier;
×
261
  }
×
262

263

264
  public UpdateAccountHolderRequest verificationProfile(String verificationProfile) {
265
    this.verificationProfile = verificationProfile;
×
266
    return this;
×
267
  }
268

269
   /**
270
   * The identifier of the profile that applies to this entity.
271
   * @return verificationProfile
272
  **/
273
  @ApiModelProperty(value = "The identifier of the profile that applies to this entity.")
274
  @JsonProperty(JSON_PROPERTY_VERIFICATION_PROFILE)
275
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
276

277
  public String getVerificationProfile() {
278
    return verificationProfile;
×
279
  }
280

281

282
  @JsonProperty(JSON_PROPERTY_VERIFICATION_PROFILE)
283
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
284
  public void setVerificationProfile(String verificationProfile) {
285
    this.verificationProfile = verificationProfile;
×
286
  }
×
287

288

289
  /**
290
   * Return true if this UpdateAccountHolderRequest object is equal to o.
291
   */
292
  @Override
293
  public boolean equals(Object o) {
294
    if (this == o) {
×
295
      return true;
×
296
    }
297
    if (o == null || getClass() != o.getClass()) {
×
298
      return false;
×
299
    }
300
    UpdateAccountHolderRequest updateAccountHolderRequest = (UpdateAccountHolderRequest) o;
×
301
    return Objects.equals(this.accountHolderCode, updateAccountHolderRequest.accountHolderCode) &&
×
302
        Objects.equals(this.accountHolderDetails, updateAccountHolderRequest.accountHolderDetails) &&
×
303
        Objects.equals(this.description, updateAccountHolderRequest.description) &&
×
304
        Objects.equals(this.legalEntity, updateAccountHolderRequest.legalEntity) &&
×
305
        Objects.equals(this.primaryCurrency, updateAccountHolderRequest.primaryCurrency) &&
×
306
        Objects.equals(this.processingTier, updateAccountHolderRequest.processingTier) &&
×
307
        Objects.equals(this.verificationProfile, updateAccountHolderRequest.verificationProfile);
×
308
  }
309

310
  @Override
311
  public int hashCode() {
312
    return Objects.hash(accountHolderCode, accountHolderDetails, description, legalEntity, primaryCurrency, processingTier, verificationProfile);
×
313
  }
314

315
  @Override
316
  public String toString() {
317
    StringBuilder sb = new StringBuilder();
×
318
    sb.append("class UpdateAccountHolderRequest {\n");
×
319
    sb.append("    accountHolderCode: ").append(toIndentedString(accountHolderCode)).append("\n");
×
320
    sb.append("    accountHolderDetails: ").append(toIndentedString(accountHolderDetails)).append("\n");
×
321
    sb.append("    description: ").append(toIndentedString(description)).append("\n");
×
322
    sb.append("    legalEntity: ").append(toIndentedString(legalEntity)).append("\n");
×
323
    sb.append("    primaryCurrency: ").append(toIndentedString(primaryCurrency)).append("\n");
×
324
    sb.append("    processingTier: ").append(toIndentedString(processingTier)).append("\n");
×
325
    sb.append("    verificationProfile: ").append(toIndentedString(verificationProfile)).append("\n");
×
326
    sb.append("}");
×
327
    return sb.toString();
×
328
  }
329

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

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

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