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

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

27 Nov 2023 10:42AM UTC coverage: 12.874%. First build
#2876

push

web-flow
Merge 842734962 into e27e7377f

5 of 335 new or added lines in 22 files covered. (1.49%)

12464 of 96819 relevant lines covered (12.87%)

0.13 hits per line

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

38.1
/src/main/java/com/adyen/model/legalentitymanagement/LegalEntityInfoRequiredType.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
 * LegalEntityInfoRequiredType
43
 */
44
@JsonPropertyOrder({
45
  LegalEntityInfoRequiredType.JSON_PROPERTY_CAPABILITIES,
46
  LegalEntityInfoRequiredType.JSON_PROPERTY_ENTITY_ASSOCIATIONS,
47
  LegalEntityInfoRequiredType.JSON_PROPERTY_INDIVIDUAL,
48
  LegalEntityInfoRequiredType.JSON_PROPERTY_ORGANIZATION,
49
  LegalEntityInfoRequiredType.JSON_PROPERTY_REFERENCE,
50
  LegalEntityInfoRequiredType.JSON_PROPERTY_SOLE_PROPRIETORSHIP,
51
  LegalEntityInfoRequiredType.JSON_PROPERTY_TRUST,
52
  LegalEntityInfoRequiredType.JSON_PROPERTY_TYPE,
53
  LegalEntityInfoRequiredType.JSON_PROPERTY_UNINCORPORATED_PARTNERSHIP
54
})
55

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

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

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

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

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

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

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

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

92
    private String value;
93

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

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

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

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

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

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

125
  public LegalEntityInfoRequiredType() { 
1✔
126
  }
1✔
127

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

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

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

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

153

154
  @JsonProperty(JSON_PROPERTY_CAPABILITIES)
155
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
156
  public void setCapabilities(Map<String, LegalEntityCapability> capabilities) {
157
    this.capabilities = capabilities;
×
158
  }
×
159

160

161
  public LegalEntityInfoRequiredType entityAssociations(List<LegalEntityAssociation> entityAssociations) {
162
    this.entityAssociations = entityAssociations;
×
163
    return this;
×
164
  }
165

166
  public LegalEntityInfoRequiredType addEntityAssociationsItem(LegalEntityAssociation entityAssociationsItem) {
167
    if (this.entityAssociations == null) {
×
168
      this.entityAssociations = new ArrayList<>();
×
169
    }
170
    this.entityAssociations.add(entityAssociationsItem);
×
171
    return this;
×
172
  }
173

174
   /**
175
   * 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.
176
   * @return entityAssociations
177
  **/
178
  @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.")
179
  @JsonProperty(JSON_PROPERTY_ENTITY_ASSOCIATIONS)
180
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
181

182
  public List<LegalEntityAssociation> getEntityAssociations() {
183
    return entityAssociations;
1✔
184
  }
185

186

187
  @JsonProperty(JSON_PROPERTY_ENTITY_ASSOCIATIONS)
188
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
189
  public void setEntityAssociations(List<LegalEntityAssociation> entityAssociations) {
190
    this.entityAssociations = entityAssociations;
1✔
191
  }
1✔
192

193

194
  public LegalEntityInfoRequiredType individual(Individual individual) {
195
    this.individual = individual;
×
196
    return this;
×
197
  }
198

199
   /**
200
   * Get individual
201
   * @return individual
202
  **/
203
  @ApiModelProperty(value = "")
204
  @JsonProperty(JSON_PROPERTY_INDIVIDUAL)
205
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
206

207
  public Individual getIndividual() {
208
    return individual;
1✔
209
  }
210

211

212
  @JsonProperty(JSON_PROPERTY_INDIVIDUAL)
213
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
214
  public void setIndividual(Individual individual) {
215
    this.individual = individual;
1✔
216
  }
1✔
217

218

219
  public LegalEntityInfoRequiredType organization(Organization organization) {
220
    this.organization = organization;
×
221
    return this;
×
222
  }
223

224
   /**
225
   * Get organization
226
   * @return organization
227
  **/
228
  @ApiModelProperty(value = "")
229
  @JsonProperty(JSON_PROPERTY_ORGANIZATION)
230
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
231

232
  public Organization getOrganization() {
233
    return organization;
1✔
234
  }
235

236

237
  @JsonProperty(JSON_PROPERTY_ORGANIZATION)
238
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
239
  public void setOrganization(Organization organization) {
240
    this.organization = organization;
1✔
241
  }
1✔
242

243

244
  public LegalEntityInfoRequiredType reference(String reference) {
245
    this.reference = reference;
×
246
    return this;
×
247
  }
248

249
   /**
250
   * Your reference for the legal entity, maximum 150 characters.
251
   * @return reference
252
  **/
253
  @ApiModelProperty(value = "Your reference for the legal entity, maximum 150 characters.")
254
  @JsonProperty(JSON_PROPERTY_REFERENCE)
255
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
256

257
  public String getReference() {
258
    return reference;
1✔
259
  }
260

261

262
  @JsonProperty(JSON_PROPERTY_REFERENCE)
263
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
264
  public void setReference(String reference) {
265
    this.reference = reference;
1✔
266
  }
1✔
267

268

269
  public LegalEntityInfoRequiredType soleProprietorship(SoleProprietorship soleProprietorship) {
270
    this.soleProprietorship = soleProprietorship;
×
271
    return this;
×
272
  }
273

274
   /**
275
   * Get soleProprietorship
276
   * @return soleProprietorship
277
  **/
278
  @ApiModelProperty(value = "")
279
  @JsonProperty(JSON_PROPERTY_SOLE_PROPRIETORSHIP)
280
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
281

282
  public SoleProprietorship getSoleProprietorship() {
283
    return soleProprietorship;
1✔
284
  }
285

286

287
  @JsonProperty(JSON_PROPERTY_SOLE_PROPRIETORSHIP)
288
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
289
  public void setSoleProprietorship(SoleProprietorship soleProprietorship) {
290
    this.soleProprietorship = soleProprietorship;
1✔
291
  }
1✔
292

293

294
  public LegalEntityInfoRequiredType trust(Trust trust) {
295
    this.trust = trust;
×
296
    return this;
×
297
  }
298

299
   /**
300
   * Get trust
301
   * @return trust
302
  **/
303
  @ApiModelProperty(value = "")
304
  @JsonProperty(JSON_PROPERTY_TRUST)
305
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
306

307
  public Trust getTrust() {
308
    return trust;
1✔
309
  }
310

311

312
  @JsonProperty(JSON_PROPERTY_TRUST)
313
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
314
  public void setTrust(Trust trust) {
315
    this.trust = trust;
×
316
  }
×
317

318

319
  public LegalEntityInfoRequiredType type(TypeEnum type) {
320
    this.type = type;
×
321
    return this;
×
322
  }
323

324
   /**
325
   * The type of legal entity.   Possible values: **individual**, **organization**, **soleProprietorship**, or **trust**.
326
   * @return type
327
  **/
328
  @ApiModelProperty(required = true, value = "The type of legal entity.   Possible values: **individual**, **organization**, **soleProprietorship**, or **trust**.")
329
  @JsonProperty(JSON_PROPERTY_TYPE)
330
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
331

332
  public TypeEnum getType() {
333
    return type;
1✔
334
  }
335

336

337
  @JsonProperty(JSON_PROPERTY_TYPE)
338
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
339
  public void setType(TypeEnum type) {
340
    this.type = type;
1✔
341
  }
1✔
342

343

344
  public LegalEntityInfoRequiredType unincorporatedPartnership(UnincorporatedPartnership unincorporatedPartnership) {
NEW
345
    this.unincorporatedPartnership = unincorporatedPartnership;
×
NEW
346
    return this;
×
347
  }
348

349
   /**
350
   * Get unincorporatedPartnership
351
   * @return unincorporatedPartnership
352
  **/
353
  @ApiModelProperty(value = "")
354
  @JsonProperty(JSON_PROPERTY_UNINCORPORATED_PARTNERSHIP)
355
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
356

357
  public UnincorporatedPartnership getUnincorporatedPartnership() {
358
    return unincorporatedPartnership;
1✔
359
  }
360

361

362
  @JsonProperty(JSON_PROPERTY_UNINCORPORATED_PARTNERSHIP)
363
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
364
  public void setUnincorporatedPartnership(UnincorporatedPartnership unincorporatedPartnership) {
NEW
365
    this.unincorporatedPartnership = unincorporatedPartnership;
×
NEW
366
  }
×
367

368

369
  /**
370
   * Return true if this LegalEntityInfoRequiredType object is equal to o.
371
   */
372
  @Override
373
  public boolean equals(Object o) {
374
    if (this == o) {
×
375
      return true;
×
376
    }
377
    if (o == null || getClass() != o.getClass()) {
×
378
      return false;
×
379
    }
380
    LegalEntityInfoRequiredType legalEntityInfoRequiredType = (LegalEntityInfoRequiredType) o;
×
381
    return Objects.equals(this.capabilities, legalEntityInfoRequiredType.capabilities) &&
×
382
        Objects.equals(this.entityAssociations, legalEntityInfoRequiredType.entityAssociations) &&
×
383
        Objects.equals(this.individual, legalEntityInfoRequiredType.individual) &&
×
384
        Objects.equals(this.organization, legalEntityInfoRequiredType.organization) &&
×
385
        Objects.equals(this.reference, legalEntityInfoRequiredType.reference) &&
×
386
        Objects.equals(this.soleProprietorship, legalEntityInfoRequiredType.soleProprietorship) &&
×
387
        Objects.equals(this.trust, legalEntityInfoRequiredType.trust) &&
×
NEW
388
        Objects.equals(this.type, legalEntityInfoRequiredType.type) &&
×
NEW
389
        Objects.equals(this.unincorporatedPartnership, legalEntityInfoRequiredType.unincorporatedPartnership);
×
390
  }
391

392
  @Override
393
  public int hashCode() {
NEW
394
    return Objects.hash(capabilities, entityAssociations, individual, organization, reference, soleProprietorship, trust, type, unincorporatedPartnership);
×
395
  }
396

397
  @Override
398
  public String toString() {
399
    StringBuilder sb = new StringBuilder();
×
400
    sb.append("class LegalEntityInfoRequiredType {\n");
×
401
    sb.append("    capabilities: ").append(toIndentedString(capabilities)).append("\n");
×
402
    sb.append("    entityAssociations: ").append(toIndentedString(entityAssociations)).append("\n");
×
403
    sb.append("    individual: ").append(toIndentedString(individual)).append("\n");
×
404
    sb.append("    organization: ").append(toIndentedString(organization)).append("\n");
×
405
    sb.append("    reference: ").append(toIndentedString(reference)).append("\n");
×
406
    sb.append("    soleProprietorship: ").append(toIndentedString(soleProprietorship)).append("\n");
×
407
    sb.append("    trust: ").append(toIndentedString(trust)).append("\n");
×
408
    sb.append("    type: ").append(toIndentedString(type)).append("\n");
×
NEW
409
    sb.append("    unincorporatedPartnership: ").append(toIndentedString(unincorporatedPartnership)).append("\n");
×
410
    sb.append("}");
×
411
    return sb.toString();
×
412
  }
413

414
  /**
415
   * Convert the given object to string with each line indented by 4 spaces
416
   * (except the first line).
417
   */
418
  private String toIndentedString(Object o) {
419
    if (o == null) {
×
420
      return "null";
×
421
    }
422
    return o.toString().replace("\n", "\n    ");
×
423
  }
424

425
/**
426
   * Create an instance of LegalEntityInfoRequiredType given an JSON string
427
   *
428
   * @param jsonString JSON string
429
   * @return An instance of LegalEntityInfoRequiredType
430
   * @throws JsonProcessingException if the JSON string is invalid with respect to LegalEntityInfoRequiredType
431
   */
432
  public static LegalEntityInfoRequiredType fromJson(String jsonString) throws JsonProcessingException {
433
    return JSON.getMapper().readValue(jsonString, LegalEntityInfoRequiredType.class);
1✔
434
  }
435
/**
436
  * Convert an instance of LegalEntityInfoRequiredType to an JSON string
437
  *
438
  * @return JSON string
439
  */
440
  public String toJson() throws JsonProcessingException {
441
    return JSON.getMapper().writeValueAsString(this);
1✔
442
  }
443
}
444

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