• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

Adyen / adyen-java-api-library / #2969

21 Dec 2023 02:05PM UTC coverage: 12.834%. First build
#2969

push

web-flow
Merge 202bcc327 into 1768c6d57

4 of 233 new or added lines in 12 files covered. (1.72%)

12489 of 97309 relevant lines covered (12.83%)

0.13 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

29.46
/src/main/java/com/adyen/model/legalentitymanagement/LegalEntityInfo.java
1
/*
2
 * Legal Entity Management API
3
 *
4
 * The version of the OpenAPI document: 3
5
 * 
6
 *
7
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
8
 * https://openapi-generator.tech
9
 * Do not edit the class manually.
10
 */
11

12

13
package com.adyen.model.legalentitymanagement;
14

15
import java.util.Objects;
16
import java.util.Arrays;
17
import java.util.Map;
18
import java.util.HashMap;
19
import com.adyen.model.legalentitymanagement.Individual;
20
import com.adyen.model.legalentitymanagement.LegalEntityAssociation;
21
import com.adyen.model.legalentitymanagement.LegalEntityCapability;
22
import com.adyen.model.legalentitymanagement.Organization;
23
import com.adyen.model.legalentitymanagement.SoleProprietorship;
24
import com.adyen.model.legalentitymanagement.Trust;
25
import com.adyen.model.legalentitymanagement.UnincorporatedPartnership;
26
import com.fasterxml.jackson.annotation.JsonInclude;
27
import com.fasterxml.jackson.annotation.JsonProperty;
28
import com.fasterxml.jackson.annotation.JsonCreator;
29
import com.fasterxml.jackson.annotation.JsonTypeName;
30
import com.fasterxml.jackson.annotation.JsonValue;
31
import io.swagger.annotations.ApiModel;
32
import io.swagger.annotations.ApiModelProperty;
33
import java.util.ArrayList;
34
import java.util.HashMap;
35
import java.util.List;
36
import java.util.Map;
37
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
38
import com.fasterxml.jackson.core.JsonProcessingException;
39

40

41
/**
42
 * LegalEntityInfo
43
 */
44
@JsonPropertyOrder({
45
  LegalEntityInfo.JSON_PROPERTY_CAPABILITIES,
46
  LegalEntityInfo.JSON_PROPERTY_ENTITY_ASSOCIATIONS,
47
  LegalEntityInfo.JSON_PROPERTY_INDIVIDUAL,
48
  LegalEntityInfo.JSON_PROPERTY_ORGANIZATION,
49
  LegalEntityInfo.JSON_PROPERTY_REFERENCE,
50
  LegalEntityInfo.JSON_PROPERTY_SOLE_PROPRIETORSHIP,
51
  LegalEntityInfo.JSON_PROPERTY_TRUST,
52
  LegalEntityInfo.JSON_PROPERTY_TYPE,
53
  LegalEntityInfo.JSON_PROPERTY_UNINCORPORATED_PARTNERSHIP,
54
  LegalEntityInfo.JSON_PROPERTY_VERIFICATION_PLAN
55
})
56

57
public class LegalEntityInfo {
58
  public static final String JSON_PROPERTY_CAPABILITIES = "capabilities";
59
  private Map<String, LegalEntityCapability> capabilities = null;
1✔
60

61
  public static final String JSON_PROPERTY_ENTITY_ASSOCIATIONS = "entityAssociations";
62
  private List<LegalEntityAssociation> entityAssociations = null;
1✔
63

64
  public static final String JSON_PROPERTY_INDIVIDUAL = "individual";
65
  private Individual individual;
66

67
  public static final String JSON_PROPERTY_ORGANIZATION = "organization";
68
  private Organization organization;
69

70
  public static final String JSON_PROPERTY_REFERENCE = "reference";
71
  private String reference;
72

73
  public static final String JSON_PROPERTY_SOLE_PROPRIETORSHIP = "soleProprietorship";
74
  private SoleProprietorship soleProprietorship;
75

76
  public static final String JSON_PROPERTY_TRUST = "trust";
77
  private Trust trust;
78

79
  /**
80
   * The type of legal entity.  Possible values: **individual**, **organization**, **soleProprietorship**, or **trust**.
81
   */
82
  public enum TypeEnum {
1✔
83
    INDIVIDUAL("individual"),
1✔
84
    
85
    ORGANIZATION("organization"),
1✔
86
    
87
    SOLEPROPRIETORSHIP("soleProprietorship"),
1✔
88
    
89
    TRUST("trust"),
1✔
90
    
91
    UNINCORPORATEDPARTNERSHIP("unincorporatedPartnership");
1✔
92

93
    private String value;
94

95
    TypeEnum(String value) {
1✔
96
      this.value = value;
1✔
97
    }
1✔
98

99
    @JsonValue
100
    public String getValue() {
101
      return value;
1✔
102
    }
103

104
    @Override
105
    public String toString() {
106
      return String.valueOf(value);
×
107
    }
108

109
    @JsonCreator
110
    public static TypeEnum fromValue(String value) {
111
      for (TypeEnum b : TypeEnum.values()) {
1✔
112
        if (b.value.equals(value)) {
1✔
113
          return b;
1✔
114
        }
115
      }
116
      throw new IllegalArgumentException("Unexpected value '" + value + "'");
×
117
    }
118
  }
119

120
  public static final String JSON_PROPERTY_TYPE = "type";
121
  private TypeEnum type;
122

123
  public static final String JSON_PROPERTY_UNINCORPORATED_PARTNERSHIP = "unincorporatedPartnership";
124
  private UnincorporatedPartnership unincorporatedPartnership;
125

126
  public static final String JSON_PROPERTY_VERIFICATION_PLAN = "verificationPlan";
127
  private String verificationPlan;
128

129
  public LegalEntityInfo() { 
1✔
130
  }
1✔
131

132
  public LegalEntityInfo capabilities(Map<String, LegalEntityCapability> capabilities) {
133
    this.capabilities = capabilities;
×
134
    return this;
×
135
  }
136

137
  public LegalEntityInfo putCapabilitiesItem(String key, LegalEntityCapability capabilitiesItem) {
138
    if (this.capabilities == null) {
×
139
      this.capabilities = new HashMap<>();
×
140
    }
141
    this.capabilities.put(key, capabilitiesItem);
×
142
    return this;
×
143
  }
144

145
   /**
146
   * Contains key-value pairs that specify the actions that the legal entity can do in your platform.The key is a capability required for your integration. For example, **issueCard** for Issuing.The value is an object containing the settings for the capability.
147
   * @return capabilities
148
  **/
149
  @ApiModelProperty(value = "Contains key-value pairs that specify the actions that the legal entity can do in your platform.The key is a capability required for your integration. For example, **issueCard** for Issuing.The value is an object containing the settings for the capability.")
150
  @JsonProperty(JSON_PROPERTY_CAPABILITIES)
151
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
152

153
  public Map<String, LegalEntityCapability> getCapabilities() {
154
    return capabilities;
1✔
155
  }
156

157

158
 /**
159
  * Contains key-value pairs that specify the actions that the legal entity can do in your platform.The key is a capability required for your integration. For example, **issueCard** for Issuing.The value is an object containing the settings for the capability.
160
  *
161
  * @param capabilities
162
  */ 
163
  @JsonProperty(JSON_PROPERTY_CAPABILITIES)
164
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
165
  public void setCapabilities(Map<String, LegalEntityCapability> capabilities) {
166
    this.capabilities = capabilities;
×
167
  }
×
168

169

170
  public LegalEntityInfo entityAssociations(List<LegalEntityAssociation> entityAssociations) {
171
    this.entityAssociations = entityAssociations;
×
172
    return this;
×
173
  }
174

175
  public LegalEntityInfo addEntityAssociationsItem(LegalEntityAssociation entityAssociationsItem) {
176
    if (this.entityAssociations == null) {
×
177
      this.entityAssociations = new ArrayList<>();
×
178
    }
179
    this.entityAssociations.add(entityAssociationsItem);
×
180
    return this;
×
181
  }
182

183
   /**
184
   * List of legal entities associated with the current legal entity. For example, ultimate beneficial owners associated with an organization through ownership or control, or as signatories.
185
   * @return entityAssociations
186
  **/
187
  @ApiModelProperty(value = "List of legal entities associated with the current legal entity. For example, ultimate beneficial owners associated with an organization through ownership or control, or as signatories.")
188
  @JsonProperty(JSON_PROPERTY_ENTITY_ASSOCIATIONS)
189
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
190

191
  public List<LegalEntityAssociation> getEntityAssociations() {
192
    return entityAssociations;
1✔
193
  }
194

195

196
 /**
197
  * List of legal entities associated with the current legal entity. For example, ultimate beneficial owners associated with an organization through ownership or control, or as signatories.
198
  *
199
  * @param entityAssociations
200
  */ 
201
  @JsonProperty(JSON_PROPERTY_ENTITY_ASSOCIATIONS)
202
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
203
  public void setEntityAssociations(List<LegalEntityAssociation> entityAssociations) {
204
    this.entityAssociations = entityAssociations;
×
205
  }
×
206

207

208
  public LegalEntityInfo individual(Individual individual) {
209
    this.individual = individual;
×
210
    return this;
×
211
  }
212

213
   /**
214
   * Get individual
215
   * @return individual
216
  **/
217
  @ApiModelProperty(value = "")
218
  @JsonProperty(JSON_PROPERTY_INDIVIDUAL)
219
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
220

221
  public Individual getIndividual() {
222
    return individual;
1✔
223
  }
224

225

226
 /**
227
  * individual
228
  *
229
  * @param individual
230
  */ 
231
  @JsonProperty(JSON_PROPERTY_INDIVIDUAL)
232
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
233
  public void setIndividual(Individual individual) {
234
    this.individual = individual;
1✔
235
  }
1✔
236

237

238
  public LegalEntityInfo organization(Organization organization) {
239
    this.organization = organization;
×
240
    return this;
×
241
  }
242

243
   /**
244
   * Get organization
245
   * @return organization
246
  **/
247
  @ApiModelProperty(value = "")
248
  @JsonProperty(JSON_PROPERTY_ORGANIZATION)
249
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
250

251
  public Organization getOrganization() {
252
    return organization;
1✔
253
  }
254

255

256
 /**
257
  * organization
258
  *
259
  * @param organization
260
  */ 
261
  @JsonProperty(JSON_PROPERTY_ORGANIZATION)
262
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
263
  public void setOrganization(Organization organization) {
264
    this.organization = organization;
×
265
  }
×
266

267

268
  public LegalEntityInfo reference(String reference) {
269
    this.reference = reference;
×
270
    return this;
×
271
  }
272

273
   /**
274
   * Your reference for the legal entity, maximum 150 characters.
275
   * @return reference
276
  **/
277
  @ApiModelProperty(value = "Your reference for the legal entity, maximum 150 characters.")
278
  @JsonProperty(JSON_PROPERTY_REFERENCE)
279
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
280

281
  public String getReference() {
282
    return reference;
1✔
283
  }
284

285

286
 /**
287
  * Your reference for the legal entity, maximum 150 characters.
288
  *
289
  * @param reference
290
  */ 
291
  @JsonProperty(JSON_PROPERTY_REFERENCE)
292
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
293
  public void setReference(String reference) {
294
    this.reference = reference;
×
295
  }
×
296

297

298
  public LegalEntityInfo soleProprietorship(SoleProprietorship soleProprietorship) {
299
    this.soleProprietorship = soleProprietorship;
×
300
    return this;
×
301
  }
302

303
   /**
304
   * Get soleProprietorship
305
   * @return soleProprietorship
306
  **/
307
  @ApiModelProperty(value = "")
308
  @JsonProperty(JSON_PROPERTY_SOLE_PROPRIETORSHIP)
309
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
310

311
  public SoleProprietorship getSoleProprietorship() {
312
    return soleProprietorship;
1✔
313
  }
314

315

316
 /**
317
  * soleProprietorship
318
  *
319
  * @param soleProprietorship
320
  */ 
321
  @JsonProperty(JSON_PROPERTY_SOLE_PROPRIETORSHIP)
322
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
323
  public void setSoleProprietorship(SoleProprietorship soleProprietorship) {
324
    this.soleProprietorship = soleProprietorship;
×
325
  }
×
326

327

328
  public LegalEntityInfo trust(Trust trust) {
329
    this.trust = trust;
×
330
    return this;
×
331
  }
332

333
   /**
334
   * Get trust
335
   * @return trust
336
  **/
337
  @ApiModelProperty(value = "")
338
  @JsonProperty(JSON_PROPERTY_TRUST)
339
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
340

341
  public Trust getTrust() {
342
    return trust;
1✔
343
  }
344

345

346
 /**
347
  * trust
348
  *
349
  * @param trust
350
  */ 
351
  @JsonProperty(JSON_PROPERTY_TRUST)
352
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
353
  public void setTrust(Trust trust) {
354
    this.trust = trust;
×
355
  }
×
356

357

358
  public LegalEntityInfo type(TypeEnum type) {
359
    this.type = type;
×
360
    return this;
×
361
  }
362

363
   /**
364
   * The type of legal entity.  Possible values: **individual**, **organization**, **soleProprietorship**, or **trust**.
365
   * @return type
366
  **/
367
  @ApiModelProperty(value = "The type of legal entity.  Possible values: **individual**, **organization**, **soleProprietorship**, or **trust**.")
368
  @JsonProperty(JSON_PROPERTY_TYPE)
369
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
370

371
  public TypeEnum getType() {
372
    return type;
1✔
373
  }
374

375

376
 /**
377
  * The type of legal entity.  Possible values: **individual**, **organization**, **soleProprietorship**, or **trust**.
378
  *
379
  * @param type
380
  */ 
381
  @JsonProperty(JSON_PROPERTY_TYPE)
382
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
383
  public void setType(TypeEnum type) {
384
    this.type = type;
1✔
385
  }
1✔
386

387

388
  public LegalEntityInfo unincorporatedPartnership(UnincorporatedPartnership unincorporatedPartnership) {
389
    this.unincorporatedPartnership = unincorporatedPartnership;
×
390
    return this;
×
391
  }
392

393
   /**
394
   * Get unincorporatedPartnership
395
   * @return unincorporatedPartnership
396
  **/
397
  @ApiModelProperty(value = "")
398
  @JsonProperty(JSON_PROPERTY_UNINCORPORATED_PARTNERSHIP)
399
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
400

401
  public UnincorporatedPartnership getUnincorporatedPartnership() {
402
    return unincorporatedPartnership;
1✔
403
  }
404

405

406
 /**
407
  * unincorporatedPartnership
408
  *
409
  * @param unincorporatedPartnership
410
  */ 
411
  @JsonProperty(JSON_PROPERTY_UNINCORPORATED_PARTNERSHIP)
412
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
413
  public void setUnincorporatedPartnership(UnincorporatedPartnership unincorporatedPartnership) {
414
    this.unincorporatedPartnership = unincorporatedPartnership;
×
415
  }
×
416

417

418
  public LegalEntityInfo verificationPlan(String verificationPlan) {
NEW
419
    this.verificationPlan = verificationPlan;
×
NEW
420
    return this;
×
421
  }
422

423
   /**
424
   * A key-value pair that specifies the [verification process](https://docs.adyen.com/marketplaces-and-platforms/collect-verification-details/) for a legal entity. Set to **upfront** for [upfront verification](https://docs.adyen.com/marketplaces-and-platforms/collect-verification-details#upfront).
425
   * @return verificationPlan
426
  **/
427
  @ApiModelProperty(value = "A key-value pair that specifies the [verification process](https://docs.adyen.com/marketplaces-and-platforms/collect-verification-details/) for a legal entity. Set to **upfront** for [upfront verification](https://docs.adyen.com/marketplaces-and-platforms/collect-verification-details#upfront).")
428
  @JsonProperty(JSON_PROPERTY_VERIFICATION_PLAN)
429
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
430

431
  public String getVerificationPlan() {
432
    return verificationPlan;
1✔
433
  }
434

435

436
 /**
437
  * A key-value pair that specifies the [verification process](https://docs.adyen.com/marketplaces-and-platforms/collect-verification-details/) for a legal entity. Set to **upfront** for [upfront verification](https://docs.adyen.com/marketplaces-and-platforms/collect-verification-details#upfront).
438
  *
439
  * @param verificationPlan
440
  */ 
441
  @JsonProperty(JSON_PROPERTY_VERIFICATION_PLAN)
442
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
443
  public void setVerificationPlan(String verificationPlan) {
NEW
444
    this.verificationPlan = verificationPlan;
×
NEW
445
  }
×
446

447

448
  /**
449
   * Return true if this LegalEntityInfo object is equal to o.
450
   */
451
  @Override
452
  public boolean equals(Object o) {
453
    if (this == o) {
×
454
      return true;
×
455
    }
456
    if (o == null || getClass() != o.getClass()) {
×
457
      return false;
×
458
    }
459
    LegalEntityInfo legalEntityInfo = (LegalEntityInfo) o;
×
460
    return Objects.equals(this.capabilities, legalEntityInfo.capabilities) &&
×
461
        Objects.equals(this.entityAssociations, legalEntityInfo.entityAssociations) &&
×
462
        Objects.equals(this.individual, legalEntityInfo.individual) &&
×
463
        Objects.equals(this.organization, legalEntityInfo.organization) &&
×
464
        Objects.equals(this.reference, legalEntityInfo.reference) &&
×
465
        Objects.equals(this.soleProprietorship, legalEntityInfo.soleProprietorship) &&
×
466
        Objects.equals(this.trust, legalEntityInfo.trust) &&
×
467
        Objects.equals(this.type, legalEntityInfo.type) &&
×
NEW
468
        Objects.equals(this.unincorporatedPartnership, legalEntityInfo.unincorporatedPartnership) &&
×
NEW
469
        Objects.equals(this.verificationPlan, legalEntityInfo.verificationPlan);
×
470
  }
471

472
  @Override
473
  public int hashCode() {
NEW
474
    return Objects.hash(capabilities, entityAssociations, individual, organization, reference, soleProprietorship, trust, type, unincorporatedPartnership, verificationPlan);
×
475
  }
476

477
  @Override
478
  public String toString() {
479
    StringBuilder sb = new StringBuilder();
×
480
    sb.append("class LegalEntityInfo {\n");
×
481
    sb.append("    capabilities: ").append(toIndentedString(capabilities)).append("\n");
×
482
    sb.append("    entityAssociations: ").append(toIndentedString(entityAssociations)).append("\n");
×
483
    sb.append("    individual: ").append(toIndentedString(individual)).append("\n");
×
484
    sb.append("    organization: ").append(toIndentedString(organization)).append("\n");
×
485
    sb.append("    reference: ").append(toIndentedString(reference)).append("\n");
×
486
    sb.append("    soleProprietorship: ").append(toIndentedString(soleProprietorship)).append("\n");
×
487
    sb.append("    trust: ").append(toIndentedString(trust)).append("\n");
×
488
    sb.append("    type: ").append(toIndentedString(type)).append("\n");
×
489
    sb.append("    unincorporatedPartnership: ").append(toIndentedString(unincorporatedPartnership)).append("\n");
×
NEW
490
    sb.append("    verificationPlan: ").append(toIndentedString(verificationPlan)).append("\n");
×
491
    sb.append("}");
×
492
    return sb.toString();
×
493
  }
494

495
  /**
496
   * Convert the given object to string with each line indented by 4 spaces
497
   * (except the first line).
498
   */
499
  private String toIndentedString(Object o) {
500
    if (o == null) {
×
501
      return "null";
×
502
    }
503
    return o.toString().replace("\n", "\n    ");
×
504
  }
505

506
/**
507
   * Create an instance of LegalEntityInfo given an JSON string
508
   *
509
   * @param jsonString JSON string
510
   * @return An instance of LegalEntityInfo
511
   * @throws JsonProcessingException if the JSON string is invalid with respect to LegalEntityInfo
512
   */
513
  public static LegalEntityInfo fromJson(String jsonString) throws JsonProcessingException {
514
    return JSON.getMapper().readValue(jsonString, LegalEntityInfo.class);
1✔
515
  }
516
/**
517
  * Convert an instance of LegalEntityInfo to an JSON string
518
  *
519
  * @return JSON string
520
  */
521
  public String toJson() throws JsonProcessingException {
522
    return JSON.getMapper().writeValueAsString(this);
1✔
523
  }
524
}
525

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