• 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/ShareholderContact.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.ViasAddress;
21
import com.adyen.model.marketpayaccount.ViasName;
22
import com.adyen.model.marketpayaccount.ViasPersonalData;
23
import com.adyen.model.marketpayaccount.ViasPhoneNumber;
24
import com.fasterxml.jackson.annotation.JsonInclude;
25
import com.fasterxml.jackson.annotation.JsonProperty;
26
import com.fasterxml.jackson.annotation.JsonCreator;
27
import com.fasterxml.jackson.annotation.JsonTypeName;
28
import com.fasterxml.jackson.annotation.JsonValue;
29
import io.swagger.annotations.ApiModel;
30
import io.swagger.annotations.ApiModelProperty;
31
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
32
import com.fasterxml.jackson.core.JsonProcessingException;
33

34

35
/**
36
 * ShareholderContact
37
 */
38
@JsonPropertyOrder({
39
  ShareholderContact.JSON_PROPERTY_ADDRESS,
40
  ShareholderContact.JSON_PROPERTY_EMAIL,
41
  ShareholderContact.JSON_PROPERTY_FULL_PHONE_NUMBER,
42
  ShareholderContact.JSON_PROPERTY_JOB_TITLE,
43
  ShareholderContact.JSON_PROPERTY_NAME,
44
  ShareholderContact.JSON_PROPERTY_PERSONAL_DATA,
45
  ShareholderContact.JSON_PROPERTY_PHONE_NUMBER,
46
  ShareholderContact.JSON_PROPERTY_SHAREHOLDER_CODE,
47
  ShareholderContact.JSON_PROPERTY_SHAREHOLDER_REFERENCE,
48
  ShareholderContact.JSON_PROPERTY_SHAREHOLDER_TYPE,
49
  ShareholderContact.JSON_PROPERTY_WEB_ADDRESS
50
})
51

52
public class ShareholderContact {
53
  public static final String JSON_PROPERTY_ADDRESS = "address";
54
  private ViasAddress address;
55

56
  public static final String JSON_PROPERTY_EMAIL = "email";
57
  private String email;
58

59
  public static final String JSON_PROPERTY_FULL_PHONE_NUMBER = "fullPhoneNumber";
60
  private String fullPhoneNumber;
61

62
  public static final String JSON_PROPERTY_JOB_TITLE = "jobTitle";
63
  private String jobTitle;
64

65
  public static final String JSON_PROPERTY_NAME = "name";
66
  private ViasName name;
67

68
  public static final String JSON_PROPERTY_PERSONAL_DATA = "personalData";
69
  private ViasPersonalData personalData;
70

71
  public static final String JSON_PROPERTY_PHONE_NUMBER = "phoneNumber";
72
  private ViasPhoneNumber phoneNumber;
73

74
  public static final String JSON_PROPERTY_SHAREHOLDER_CODE = "shareholderCode";
75
  private String shareholderCode;
76

77
  public static final String JSON_PROPERTY_SHAREHOLDER_REFERENCE = "shareholderReference";
78
  private String shareholderReference;
79

80
  /**
81
   * Specifies how the person is associated with the account holder.   Possible values:   * **Owner**: Individuals who directly or indirectly own 25% or more of a company.  * **Controller**: Individuals who are members of senior management staff responsible for managing a company or organization.
82
   */
83
  public enum ShareholderTypeEnum {
×
84
    CONTROLLER("Controller"),
×
85
    
86
    OWNER("Owner"),
×
87
    
88
    SIGNATORY("Signatory");
×
89

90
    private String value;
91

92
    ShareholderTypeEnum(String value) {
×
93
      this.value = value;
×
94
    }
×
95

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

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

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

117
  public static final String JSON_PROPERTY_SHAREHOLDER_TYPE = "shareholderType";
118
  private ShareholderTypeEnum shareholderType;
119

120
  public static final String JSON_PROPERTY_WEB_ADDRESS = "webAddress";
121
  private String webAddress;
122

123
  public ShareholderContact() { 
×
124
  }
×
125

126
  public ShareholderContact address(ViasAddress address) {
127
    this.address = address;
×
128
    return this;
×
129
  }
130

131
   /**
132
   * Get address
133
   * @return address
134
  **/
135
  @ApiModelProperty(value = "")
136
  @JsonProperty(JSON_PROPERTY_ADDRESS)
137
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
138

139
  public ViasAddress getAddress() {
140
    return address;
×
141
  }
142

143

144
  @JsonProperty(JSON_PROPERTY_ADDRESS)
145
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
146
  public void setAddress(ViasAddress address) {
147
    this.address = address;
×
148
  }
×
149

150

151
  public ShareholderContact email(String email) {
152
    this.email = email;
×
153
    return this;
×
154
  }
155

156
   /**
157
   * The e-mail address of the person.
158
   * @return email
159
  **/
160
  @ApiModelProperty(value = "The e-mail address of the person.")
161
  @JsonProperty(JSON_PROPERTY_EMAIL)
162
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
163

164
  public String getEmail() {
165
    return email;
×
166
  }
167

168

169
  @JsonProperty(JSON_PROPERTY_EMAIL)
170
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
171
  public void setEmail(String email) {
172
    this.email = email;
×
173
  }
×
174

175

176
  public ShareholderContact fullPhoneNumber(String fullPhoneNumber) {
177
    this.fullPhoneNumber = fullPhoneNumber;
×
178
    return this;
×
179
  }
180

181
   /**
182
   * The phone number of the person provided as a single string.  It will be handled as a landline phone. Examples: \"0031 6 11 22 33 44\", \"+316/1122-3344\", \"(0031) 611223344\"
183
   * @return fullPhoneNumber
184
  **/
185
  @ApiModelProperty(value = "The phone number of the person provided as a single string.  It will be handled as a landline phone. Examples: \"0031 6 11 22 33 44\", \"+316/1122-3344\", \"(0031) 611223344\"")
186
  @JsonProperty(JSON_PROPERTY_FULL_PHONE_NUMBER)
187
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
188

189
  public String getFullPhoneNumber() {
190
    return fullPhoneNumber;
×
191
  }
192

193

194
  @JsonProperty(JSON_PROPERTY_FULL_PHONE_NUMBER)
195
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
196
  public void setFullPhoneNumber(String fullPhoneNumber) {
197
    this.fullPhoneNumber = fullPhoneNumber;
×
198
  }
×
199

200

201
  public ShareholderContact jobTitle(String jobTitle) {
202
    this.jobTitle = jobTitle;
×
203
    return this;
×
204
  }
205

206
   /**
207
   * Job title of the person. Required when the `shareholderType` is **Controller**.  Example values: **Chief Executive Officer**, **Chief Financial Officer**, **Chief Operating Officer**, **President**, **Vice President**, **Executive President**, **Managing Member**, **Partner**, **Treasurer**, **Director**, or **Other**.
208
   * @return jobTitle
209
  **/
210
  @ApiModelProperty(value = "Job title of the person. Required when the `shareholderType` is **Controller**.  Example values: **Chief Executive Officer**, **Chief Financial Officer**, **Chief Operating Officer**, **President**, **Vice President**, **Executive President**, **Managing Member**, **Partner**, **Treasurer**, **Director**, or **Other**.")
211
  @JsonProperty(JSON_PROPERTY_JOB_TITLE)
212
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
213

214
  public String getJobTitle() {
215
    return jobTitle;
×
216
  }
217

218

219
  @JsonProperty(JSON_PROPERTY_JOB_TITLE)
220
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
221
  public void setJobTitle(String jobTitle) {
222
    this.jobTitle = jobTitle;
×
223
  }
×
224

225

226
  public ShareholderContact name(ViasName name) {
227
    this.name = name;
×
228
    return this;
×
229
  }
230

231
   /**
232
   * Get name
233
   * @return name
234
  **/
235
  @ApiModelProperty(value = "")
236
  @JsonProperty(JSON_PROPERTY_NAME)
237
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
238

239
  public ViasName getName() {
240
    return name;
×
241
  }
242

243

244
  @JsonProperty(JSON_PROPERTY_NAME)
245
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
246
  public void setName(ViasName name) {
247
    this.name = name;
×
248
  }
×
249

250

251
  public ShareholderContact personalData(ViasPersonalData personalData) {
252
    this.personalData = personalData;
×
253
    return this;
×
254
  }
255

256
   /**
257
   * Get personalData
258
   * @return personalData
259
  **/
260
  @ApiModelProperty(value = "")
261
  @JsonProperty(JSON_PROPERTY_PERSONAL_DATA)
262
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
263

264
  public ViasPersonalData getPersonalData() {
265
    return personalData;
×
266
  }
267

268

269
  @JsonProperty(JSON_PROPERTY_PERSONAL_DATA)
270
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
271
  public void setPersonalData(ViasPersonalData personalData) {
272
    this.personalData = personalData;
×
273
  }
×
274

275

276
  public ShareholderContact phoneNumber(ViasPhoneNumber phoneNumber) {
277
    this.phoneNumber = phoneNumber;
×
278
    return this;
×
279
  }
280

281
   /**
282
   * Get phoneNumber
283
   * @return phoneNumber
284
  **/
285
  @ApiModelProperty(value = "")
286
  @JsonProperty(JSON_PROPERTY_PHONE_NUMBER)
287
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
288

289
  public ViasPhoneNumber getPhoneNumber() {
290
    return phoneNumber;
×
291
  }
292

293

294
  @JsonProperty(JSON_PROPERTY_PHONE_NUMBER)
295
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
296
  public void setPhoneNumber(ViasPhoneNumber phoneNumber) {
297
    this.phoneNumber = phoneNumber;
×
298
  }
×
299

300

301
  public ShareholderContact shareholderCode(String shareholderCode) {
302
    this.shareholderCode = shareholderCode;
×
303
    return this;
×
304
  }
305

306
   /**
307
   * The unique identifier (UUID) of the shareholder entry. >**If, during an Account Holder create or update request, this field is left blank (but other fields provided), a new Shareholder will be created with a procedurally-generated UUID.**  >**If, during an Account Holder create request, a UUID is provided, the creation of Account Holder will fail with a validation Error..**  >**If, during an Account Holder update request, a UUID that is not correlated with an existing Shareholder is provided, the update of the Shareholder will fail.**  >**If, during an Account Holder update request, a UUID that is correlated with an existing Shareholder is provided, the existing Shareholder will be updated.** 
308
   * @return shareholderCode
309
  **/
310
  @ApiModelProperty(value = "The unique identifier (UUID) of the shareholder entry. >**If, during an Account Holder create or update request, this field is left blank (but other fields provided), a new Shareholder will be created with a procedurally-generated UUID.**  >**If, during an Account Holder create request, a UUID is provided, the creation of Account Holder will fail with a validation Error..**  >**If, during an Account Holder update request, a UUID that is not correlated with an existing Shareholder is provided, the update of the Shareholder will fail.**  >**If, during an Account Holder update request, a UUID that is correlated with an existing Shareholder is provided, the existing Shareholder will be updated.** ")
311
  @JsonProperty(JSON_PROPERTY_SHAREHOLDER_CODE)
312
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
313

314
  public String getShareholderCode() {
315
    return shareholderCode;
×
316
  }
317

318

319
  @JsonProperty(JSON_PROPERTY_SHAREHOLDER_CODE)
320
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
321
  public void setShareholderCode(String shareholderCode) {
322
    this.shareholderCode = shareholderCode;
×
323
  }
×
324

325

326
  public ShareholderContact shareholderReference(String shareholderReference) {
327
    this.shareholderReference = shareholderReference;
×
328
    return this;
×
329
  }
330

331
   /**
332
   * Your reference for the shareholder entry.
333
   * @return shareholderReference
334
  **/
335
  @ApiModelProperty(value = "Your reference for the shareholder entry.")
336
  @JsonProperty(JSON_PROPERTY_SHAREHOLDER_REFERENCE)
337
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
338

339
  public String getShareholderReference() {
340
    return shareholderReference;
×
341
  }
342

343

344
  @JsonProperty(JSON_PROPERTY_SHAREHOLDER_REFERENCE)
345
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
346
  public void setShareholderReference(String shareholderReference) {
347
    this.shareholderReference = shareholderReference;
×
348
  }
×
349

350

351
  public ShareholderContact shareholderType(ShareholderTypeEnum shareholderType) {
352
    this.shareholderType = shareholderType;
×
353
    return this;
×
354
  }
355

356
   /**
357
   * Specifies how the person is associated with the account holder.   Possible values:   * **Owner**: Individuals who directly or indirectly own 25% or more of a company.  * **Controller**: Individuals who are members of senior management staff responsible for managing a company or organization.
358
   * @return shareholderType
359
  **/
360
  @ApiModelProperty(value = "Specifies how the person is associated with the account holder.   Possible values:   * **Owner**: Individuals who directly or indirectly own 25% or more of a company.  * **Controller**: Individuals who are members of senior management staff responsible for managing a company or organization.")
361
  @JsonProperty(JSON_PROPERTY_SHAREHOLDER_TYPE)
362
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
363

364
  public ShareholderTypeEnum getShareholderType() {
365
    return shareholderType;
×
366
  }
367

368

369
  @JsonProperty(JSON_PROPERTY_SHAREHOLDER_TYPE)
370
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
371
  public void setShareholderType(ShareholderTypeEnum shareholderType) {
372
    this.shareholderType = shareholderType;
×
373
  }
×
374

375

376
  public ShareholderContact webAddress(String webAddress) {
377
    this.webAddress = webAddress;
×
378
    return this;
×
379
  }
380

381
   /**
382
   * The URL of the person's website.
383
   * @return webAddress
384
  **/
385
  @ApiModelProperty(value = "The URL of the person's website.")
386
  @JsonProperty(JSON_PROPERTY_WEB_ADDRESS)
387
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
388

389
  public String getWebAddress() {
390
    return webAddress;
×
391
  }
392

393

394
  @JsonProperty(JSON_PROPERTY_WEB_ADDRESS)
395
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
396
  public void setWebAddress(String webAddress) {
397
    this.webAddress = webAddress;
×
398
  }
×
399

400

401
  /**
402
   * Return true if this ShareholderContact object is equal to o.
403
   */
404
  @Override
405
  public boolean equals(Object o) {
406
    if (this == o) {
×
407
      return true;
×
408
    }
409
    if (o == null || getClass() != o.getClass()) {
×
410
      return false;
×
411
    }
412
    ShareholderContact shareholderContact = (ShareholderContact) o;
×
413
    return Objects.equals(this.address, shareholderContact.address) &&
×
414
        Objects.equals(this.email, shareholderContact.email) &&
×
415
        Objects.equals(this.fullPhoneNumber, shareholderContact.fullPhoneNumber) &&
×
416
        Objects.equals(this.jobTitle, shareholderContact.jobTitle) &&
×
417
        Objects.equals(this.name, shareholderContact.name) &&
×
418
        Objects.equals(this.personalData, shareholderContact.personalData) &&
×
419
        Objects.equals(this.phoneNumber, shareholderContact.phoneNumber) &&
×
420
        Objects.equals(this.shareholderCode, shareholderContact.shareholderCode) &&
×
421
        Objects.equals(this.shareholderReference, shareholderContact.shareholderReference) &&
×
422
        Objects.equals(this.shareholderType, shareholderContact.shareholderType) &&
×
423
        Objects.equals(this.webAddress, shareholderContact.webAddress);
×
424
  }
425

426
  @Override
427
  public int hashCode() {
428
    return Objects.hash(address, email, fullPhoneNumber, jobTitle, name, personalData, phoneNumber, shareholderCode, shareholderReference, shareholderType, webAddress);
×
429
  }
430

431
  @Override
432
  public String toString() {
433
    StringBuilder sb = new StringBuilder();
×
434
    sb.append("class ShareholderContact {\n");
×
435
    sb.append("    address: ").append(toIndentedString(address)).append("\n");
×
436
    sb.append("    email: ").append(toIndentedString(email)).append("\n");
×
437
    sb.append("    fullPhoneNumber: ").append(toIndentedString(fullPhoneNumber)).append("\n");
×
438
    sb.append("    jobTitle: ").append(toIndentedString(jobTitle)).append("\n");
×
439
    sb.append("    name: ").append(toIndentedString(name)).append("\n");
×
440
    sb.append("    personalData: ").append(toIndentedString(personalData)).append("\n");
×
441
    sb.append("    phoneNumber: ").append(toIndentedString(phoneNumber)).append("\n");
×
442
    sb.append("    shareholderCode: ").append(toIndentedString(shareholderCode)).append("\n");
×
443
    sb.append("    shareholderReference: ").append(toIndentedString(shareholderReference)).append("\n");
×
444
    sb.append("    shareholderType: ").append(toIndentedString(shareholderType)).append("\n");
×
445
    sb.append("    webAddress: ").append(toIndentedString(webAddress)).append("\n");
×
446
    sb.append("}");
×
447
    return sb.toString();
×
448
  }
449

450
  /**
451
   * Convert the given object to string with each line indented by 4 spaces
452
   * (except the first line).
453
   */
454
  private String toIndentedString(Object o) {
455
    if (o == null) {
×
456
      return "null";
×
457
    }
458
    return o.toString().replace("\n", "\n    ");
×
459
  }
460

461
/**
462
   * Create an instance of ShareholderContact given an JSON string
463
   *
464
   * @param jsonString JSON string
465
   * @return An instance of ShareholderContact
466
   * @throws JsonProcessingException if the JSON string is invalid with respect to ShareholderContact
467
   */
468
  public static ShareholderContact fromJson(String jsonString) throws JsonProcessingException {
469
    return JSON.getMapper().readValue(jsonString, ShareholderContact.class);
×
470
  }
471
/**
472
  * Convert an instance of ShareholderContact to an JSON string
473
  *
474
  * @return JSON string
475
  */
476
  public String toJson() throws JsonProcessingException {
477
    return JSON.getMapper().writeValueAsString(this);
×
478
  }
479
}
480

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