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

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

21 Mar 2024 11:55AM UTC coverage: 12.294%. First build
#3181

push

web-flow
Merge 6fe9f22c8 into 52cf3a369

0 of 208 new or added lines in 10 files covered. (0.0%)

12446 of 101233 relevant lines covered (12.29%)

0.12 hits per line

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

30.48
/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.fasterxml.jackson.annotation.JsonInclude;
26
import com.fasterxml.jackson.annotation.JsonProperty;
27
import com.fasterxml.jackson.annotation.JsonCreator;
28
import com.fasterxml.jackson.annotation.JsonTypeName;
29
import com.fasterxml.jackson.annotation.JsonValue;
30
import io.swagger.annotations.ApiModel;
31
import io.swagger.annotations.ApiModelProperty;
32
import java.util.ArrayList;
33
import java.util.HashMap;
34
import java.util.List;
35
import java.util.Map;
36
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
37
import com.fasterxml.jackson.core.JsonProcessingException;
38

39

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

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

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

62
  public static final String JSON_PROPERTY_INDIVIDUAL = "individual";
63
  private Individual individual;
64

65
  public static final String JSON_PROPERTY_ORGANIZATION = "organization";
66
  private Organization organization;
67

68
  public static final String JSON_PROPERTY_REFERENCE = "reference";
69
  private String reference;
70

71
  public static final String JSON_PROPERTY_SOLE_PROPRIETORSHIP = "soleProprietorship";
72
  private SoleProprietorship soleProprietorship;
73

74
  public static final String JSON_PROPERTY_TRUST = "trust";
75
  private Trust trust;
76

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

91
    private String value;
92

93
    TypeEnum(String value) {
1✔
94
      this.value = value;
1✔
95
    }
1✔
96

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

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

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

118
  public static final String JSON_PROPERTY_TYPE = "type";
119
  private TypeEnum type;
120

121
  public static final String JSON_PROPERTY_VERIFICATION_PLAN = "verificationPlan";
122
  private String verificationPlan;
123

124
  public LegalEntityInfo() { 
1✔
125
  }
1✔
126

127
  public LegalEntityInfo capabilities(Map<String, LegalEntityCapability> capabilities) {
128
    this.capabilities = capabilities;
×
129
    return this;
×
130
  }
131

132
  public LegalEntityInfo putCapabilitiesItem(String key, LegalEntityCapability capabilitiesItem) {
133
    if (this.capabilities == null) {
×
134
      this.capabilities = new HashMap<>();
×
135
    }
136
    this.capabilities.put(key, capabilitiesItem);
×
137
    return this;
×
138
  }
139

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

148
  public Map<String, LegalEntityCapability> getCapabilities() {
149
    return capabilities;
1✔
150
  }
151

152

153
 /**
154
  * 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.
155
  *
156
  * @param capabilities
157
  */ 
158
  @JsonProperty(JSON_PROPERTY_CAPABILITIES)
159
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
160
  public void setCapabilities(Map<String, LegalEntityCapability> capabilities) {
161
    this.capabilities = capabilities;
×
162
  }
×
163

164

165
  public LegalEntityInfo entityAssociations(List<LegalEntityAssociation> entityAssociations) {
166
    this.entityAssociations = entityAssociations;
×
167
    return this;
×
168
  }
169

170
  public LegalEntityInfo addEntityAssociationsItem(LegalEntityAssociation entityAssociationsItem) {
171
    if (this.entityAssociations == null) {
×
172
      this.entityAssociations = new ArrayList<>();
×
173
    }
174
    this.entityAssociations.add(entityAssociationsItem);
×
175
    return this;
×
176
  }
177

178
   /**
179
   * 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.
180
   * @return entityAssociations
181
  **/
182
  @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.")
183
  @JsonProperty(JSON_PROPERTY_ENTITY_ASSOCIATIONS)
184
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
185

186
  public List<LegalEntityAssociation> getEntityAssociations() {
187
    return entityAssociations;
1✔
188
  }
189

190

191
 /**
192
  * 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.
193
  *
194
  * @param entityAssociations
195
  */ 
196
  @JsonProperty(JSON_PROPERTY_ENTITY_ASSOCIATIONS)
197
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
198
  public void setEntityAssociations(List<LegalEntityAssociation> entityAssociations) {
199
    this.entityAssociations = entityAssociations;
×
200
  }
×
201

202

203
  public LegalEntityInfo individual(Individual individual) {
204
    this.individual = individual;
×
205
    return this;
×
206
  }
207

208
   /**
209
   * Get individual
210
   * @return individual
211
  **/
212
  @ApiModelProperty(value = "")
213
  @JsonProperty(JSON_PROPERTY_INDIVIDUAL)
214
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
215

216
  public Individual getIndividual() {
217
    return individual;
1✔
218
  }
219

220

221
 /**
222
  * individual
223
  *
224
  * @param individual
225
  */ 
226
  @JsonProperty(JSON_PROPERTY_INDIVIDUAL)
227
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
228
  public void setIndividual(Individual individual) {
229
    this.individual = individual;
1✔
230
  }
1✔
231

232

233
  public LegalEntityInfo organization(Organization organization) {
234
    this.organization = organization;
×
235
    return this;
×
236
  }
237

238
   /**
239
   * Get organization
240
   * @return organization
241
  **/
242
  @ApiModelProperty(value = "")
243
  @JsonProperty(JSON_PROPERTY_ORGANIZATION)
244
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
245

246
  public Organization getOrganization() {
247
    return organization;
1✔
248
  }
249

250

251
 /**
252
  * organization
253
  *
254
  * @param organization
255
  */ 
256
  @JsonProperty(JSON_PROPERTY_ORGANIZATION)
257
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
258
  public void setOrganization(Organization organization) {
259
    this.organization = organization;
×
260
  }
×
261

262

263
  public LegalEntityInfo reference(String reference) {
264
    this.reference = reference;
×
265
    return this;
×
266
  }
267

268
   /**
269
   * Your reference for the legal entity, maximum 150 characters.
270
   * @return reference
271
  **/
272
  @ApiModelProperty(value = "Your reference for the legal entity, maximum 150 characters.")
273
  @JsonProperty(JSON_PROPERTY_REFERENCE)
274
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
275

276
  public String getReference() {
277
    return reference;
1✔
278
  }
279

280

281
 /**
282
  * Your reference for the legal entity, maximum 150 characters.
283
  *
284
  * @param reference
285
  */ 
286
  @JsonProperty(JSON_PROPERTY_REFERENCE)
287
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
288
  public void setReference(String reference) {
289
    this.reference = reference;
×
290
  }
×
291

292

293
  public LegalEntityInfo soleProprietorship(SoleProprietorship soleProprietorship) {
294
    this.soleProprietorship = soleProprietorship;
×
295
    return this;
×
296
  }
297

298
   /**
299
   * Get soleProprietorship
300
   * @return soleProprietorship
301
  **/
302
  @ApiModelProperty(value = "")
303
  @JsonProperty(JSON_PROPERTY_SOLE_PROPRIETORSHIP)
304
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
305

306
  public SoleProprietorship getSoleProprietorship() {
307
    return soleProprietorship;
1✔
308
  }
309

310

311
 /**
312
  * soleProprietorship
313
  *
314
  * @param soleProprietorship
315
  */ 
316
  @JsonProperty(JSON_PROPERTY_SOLE_PROPRIETORSHIP)
317
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
318
  public void setSoleProprietorship(SoleProprietorship soleProprietorship) {
319
    this.soleProprietorship = soleProprietorship;
×
320
  }
×
321

322

323
  public LegalEntityInfo trust(Trust trust) {
324
    this.trust = trust;
×
325
    return this;
×
326
  }
327

328
   /**
329
   * Get trust
330
   * @return trust
331
  **/
332
  @ApiModelProperty(value = "")
333
  @JsonProperty(JSON_PROPERTY_TRUST)
334
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
335

336
  public Trust getTrust() {
337
    return trust;
1✔
338
  }
339

340

341
 /**
342
  * trust
343
  *
344
  * @param trust
345
  */ 
346
  @JsonProperty(JSON_PROPERTY_TRUST)
347
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
348
  public void setTrust(Trust trust) {
349
    this.trust = trust;
×
350
  }
×
351

352

353
  public LegalEntityInfo type(TypeEnum type) {
354
    this.type = type;
×
355
    return this;
×
356
  }
357

358
   /**
359
   * The type of legal entity.  Possible values: **individual**, **organization**, **soleProprietorship**, or **trust**.
360
   * @return type
361
  **/
362
  @ApiModelProperty(value = "The type of legal entity.  Possible values: **individual**, **organization**, **soleProprietorship**, or **trust**.")
363
  @JsonProperty(JSON_PROPERTY_TYPE)
364
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
365

366
  public TypeEnum getType() {
367
    return type;
1✔
368
  }
369

370

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

382

383
  public LegalEntityInfo verificationPlan(String verificationPlan) {
384
    this.verificationPlan = verificationPlan;
×
385
    return this;
×
386
  }
387

388
   /**
389
   * A key-value pair that specifies the verification process for a legal entity. Set to **upfront** for upfront verification for [marketplaces](https://docs.adyen.com/marketplaces/onboard-users#upfront).
390
   * @return verificationPlan
391
  **/
392
  @ApiModelProperty(value = "A key-value pair that specifies the verification process for a legal entity. Set to **upfront** for upfront verification for [marketplaces](https://docs.adyen.com/marketplaces/onboard-users#upfront).")
393
  @JsonProperty(JSON_PROPERTY_VERIFICATION_PLAN)
394
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
395

396
  public String getVerificationPlan() {
397
    return verificationPlan;
1✔
398
  }
399

400

401
 /**
402
  * A key-value pair that specifies the verification process for a legal entity. Set to **upfront** for upfront verification for [marketplaces](https://docs.adyen.com/marketplaces/onboard-users#upfront).
403
  *
404
  * @param verificationPlan
405
  */ 
406
  @JsonProperty(JSON_PROPERTY_VERIFICATION_PLAN)
407
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
408
  public void setVerificationPlan(String verificationPlan) {
409
    this.verificationPlan = verificationPlan;
×
410
  }
×
411

412

413
  /**
414
   * Return true if this LegalEntityInfo object is equal to o.
415
   */
416
  @Override
417
  public boolean equals(Object o) {
418
    if (this == o) {
×
419
      return true;
×
420
    }
421
    if (o == null || getClass() != o.getClass()) {
×
422
      return false;
×
423
    }
424
    LegalEntityInfo legalEntityInfo = (LegalEntityInfo) o;
×
425
    return Objects.equals(this.capabilities, legalEntityInfo.capabilities) &&
×
426
        Objects.equals(this.entityAssociations, legalEntityInfo.entityAssociations) &&
×
427
        Objects.equals(this.individual, legalEntityInfo.individual) &&
×
428
        Objects.equals(this.organization, legalEntityInfo.organization) &&
×
429
        Objects.equals(this.reference, legalEntityInfo.reference) &&
×
430
        Objects.equals(this.soleProprietorship, legalEntityInfo.soleProprietorship) &&
×
431
        Objects.equals(this.trust, legalEntityInfo.trust) &&
×
432
        Objects.equals(this.type, legalEntityInfo.type) &&
×
433
        Objects.equals(this.verificationPlan, legalEntityInfo.verificationPlan);
×
434
  }
435

436
  @Override
437
  public int hashCode() {
NEW
438
    return Objects.hash(capabilities, entityAssociations, individual, organization, reference, soleProprietorship, trust, type, verificationPlan);
×
439
  }
440

441
  @Override
442
  public String toString() {
443
    StringBuilder sb = new StringBuilder();
×
444
    sb.append("class LegalEntityInfo {\n");
×
445
    sb.append("    capabilities: ").append(toIndentedString(capabilities)).append("\n");
×
446
    sb.append("    entityAssociations: ").append(toIndentedString(entityAssociations)).append("\n");
×
447
    sb.append("    individual: ").append(toIndentedString(individual)).append("\n");
×
448
    sb.append("    organization: ").append(toIndentedString(organization)).append("\n");
×
449
    sb.append("    reference: ").append(toIndentedString(reference)).append("\n");
×
450
    sb.append("    soleProprietorship: ").append(toIndentedString(soleProprietorship)).append("\n");
×
451
    sb.append("    trust: ").append(toIndentedString(trust)).append("\n");
×
452
    sb.append("    type: ").append(toIndentedString(type)).append("\n");
×
453
    sb.append("    verificationPlan: ").append(toIndentedString(verificationPlan)).append("\n");
×
454
    sb.append("}");
×
455
    return sb.toString();
×
456
  }
457

458
  /**
459
   * Convert the given object to string with each line indented by 4 spaces
460
   * (except the first line).
461
   */
462
  private String toIndentedString(Object o) {
463
    if (o == null) {
×
464
      return "null";
×
465
    }
466
    return o.toString().replace("\n", "\n    ");
×
467
  }
468

469
/**
470
   * Create an instance of LegalEntityInfo given an JSON string
471
   *
472
   * @param jsonString JSON string
473
   * @return An instance of LegalEntityInfo
474
   * @throws JsonProcessingException if the JSON string is invalid with respect to LegalEntityInfo
475
   */
476
  public static LegalEntityInfo fromJson(String jsonString) throws JsonProcessingException {
477
    return JSON.getMapper().readValue(jsonString, LegalEntityInfo.class);
1✔
478
  }
479
/**
480
  * Convert an instance of LegalEntityInfo to an JSON string
481
  *
482
  * @return JSON string
483
  */
484
  public String toJson() throws JsonProcessingException {
485
    return JSON.getMapper().writeValueAsString(this);
1✔
486
  }
487
}
488

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