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

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

04 Dec 2023 10:18AM UTC coverage: 12.838%. First build
#2895

push

web-flow
Merge 6c685def1 into ec0c20882

1 of 148 new or added lines in 10 files covered. (0.68%)

12463 of 97082 relevant lines covered (12.84%)

0.13 hits per line

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

37.84
/src/main/java/com/adyen/model/legalentitymanagement/SoleProprietorship.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.Address;
20
import com.adyen.model.legalentitymanagement.TaxInformation;
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 java.util.ArrayList;
29
import java.util.List;
30
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
31
import com.fasterxml.jackson.core.JsonProcessingException;
32

33

34
/**
35
 * SoleProprietorship
36
 */
37
@JsonPropertyOrder({
38
  SoleProprietorship.JSON_PROPERTY_COUNTRY_OF_GOVERNING_LAW,
39
  SoleProprietorship.JSON_PROPERTY_DATE_OF_INCORPORATION,
40
  SoleProprietorship.JSON_PROPERTY_DESCRIPTION,
41
  SoleProprietorship.JSON_PROPERTY_DOING_BUSINESS_AS,
42
  SoleProprietorship.JSON_PROPERTY_NAME,
43
  SoleProprietorship.JSON_PROPERTY_PRINCIPAL_PLACE_OF_BUSINESS,
44
  SoleProprietorship.JSON_PROPERTY_REGISTERED_ADDRESS,
45
  SoleProprietorship.JSON_PROPERTY_REGISTRATION_NUMBER,
46
  SoleProprietorship.JSON_PROPERTY_TAX_INFORMATION,
47
  SoleProprietorship.JSON_PROPERTY_VAT_ABSENCE_REASON,
48
  SoleProprietorship.JSON_PROPERTY_VAT_NUMBER
49
})
50

51
public class SoleProprietorship {
52
  public static final String JSON_PROPERTY_COUNTRY_OF_GOVERNING_LAW = "countryOfGoverningLaw";
53
  private String countryOfGoverningLaw;
54

55
  public static final String JSON_PROPERTY_DATE_OF_INCORPORATION = "dateOfIncorporation";
56
  private String dateOfIncorporation;
57

58
  public static final String JSON_PROPERTY_DESCRIPTION = "description";
59
  private String description;
60

61
  public static final String JSON_PROPERTY_DOING_BUSINESS_AS = "doingBusinessAs";
62
  private String doingBusinessAs;
63

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

67
  public static final String JSON_PROPERTY_PRINCIPAL_PLACE_OF_BUSINESS = "principalPlaceOfBusiness";
68
  private Address principalPlaceOfBusiness;
69

70
  public static final String JSON_PROPERTY_REGISTERED_ADDRESS = "registeredAddress";
71
  private Address registeredAddress;
72

73
  public static final String JSON_PROPERTY_REGISTRATION_NUMBER = "registrationNumber";
74
  private String registrationNumber;
75

76
  public static final String JSON_PROPERTY_TAX_INFORMATION = "taxInformation";
77
  private List<TaxInformation> taxInformation = null;
1✔
78

79
  /**
80
   * The reason for not providing a VAT number.  Possible values: **industryExemption**, **belowTaxThreshold**.
81
   */
82
  public enum VatAbsenceReasonEnum {
1✔
83
    INDUSTRYEXEMPTION("industryExemption"),
1✔
84
    
85
    BELOWTAXTHRESHOLD("belowTaxThreshold");
1✔
86

87
    private String value;
88

89
    VatAbsenceReasonEnum(String value) {
1✔
90
      this.value = value;
1✔
91
    }
1✔
92

93
    @JsonValue
94
    public String getValue() {
95
      return value;
1✔
96
    }
97

98
    @Override
99
    public String toString() {
100
      return String.valueOf(value);
×
101
    }
102

103
    @JsonCreator
104
    public static VatAbsenceReasonEnum fromValue(String value) {
105
      for (VatAbsenceReasonEnum b : VatAbsenceReasonEnum.values()) {
1✔
106
        if (b.value.equals(value)) {
1✔
107
          return b;
1✔
108
        }
109
      }
110
      throw new IllegalArgumentException("Unexpected value '" + value + "'");
×
111
    }
112
  }
113

114
  public static final String JSON_PROPERTY_VAT_ABSENCE_REASON = "vatAbsenceReason";
115
  private VatAbsenceReasonEnum vatAbsenceReason;
116

117
  public static final String JSON_PROPERTY_VAT_NUMBER = "vatNumber";
118
  private String vatNumber;
119

120
  public SoleProprietorship() { 
1✔
121
  }
1✔
122

123
  public SoleProprietorship countryOfGoverningLaw(String countryOfGoverningLaw) {
124
    this.countryOfGoverningLaw = countryOfGoverningLaw;
×
125
    return this;
×
126
  }
127

128
   /**
129
   * The two-character [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code of the governing country.
130
   * @return countryOfGoverningLaw
131
  **/
132
  @ApiModelProperty(required = true, value = "The two-character [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code of the governing country.")
133
  @JsonProperty(JSON_PROPERTY_COUNTRY_OF_GOVERNING_LAW)
134
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
135

136
  public String getCountryOfGoverningLaw() {
137
    return countryOfGoverningLaw;
1✔
138
  }
139

140

141
  @JsonProperty(JSON_PROPERTY_COUNTRY_OF_GOVERNING_LAW)
142
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
143
  public void setCountryOfGoverningLaw(String countryOfGoverningLaw) {
144
    this.countryOfGoverningLaw = countryOfGoverningLaw;
1✔
145
  }
1✔
146

147

148
  public SoleProprietorship dateOfIncorporation(String dateOfIncorporation) {
149
    this.dateOfIncorporation = dateOfIncorporation;
×
150
    return this;
×
151
  }
152

153
   /**
154
   * The date when the legal arrangement was incorporated in YYYY-MM-DD format.
155
   * @return dateOfIncorporation
156
  **/
157
  @ApiModelProperty(value = "The date when the legal arrangement was incorporated in YYYY-MM-DD format.")
158
  @JsonProperty(JSON_PROPERTY_DATE_OF_INCORPORATION)
159
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
160

161
  public String getDateOfIncorporation() {
162
    return dateOfIncorporation;
1✔
163
  }
164

165

166
  @JsonProperty(JSON_PROPERTY_DATE_OF_INCORPORATION)
167
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
168
  public void setDateOfIncorporation(String dateOfIncorporation) {
169
    this.dateOfIncorporation = dateOfIncorporation;
1✔
170
  }
1✔
171

172

173
  public SoleProprietorship description(String description) {
NEW
174
    this.description = description;
×
NEW
175
    return this;
×
176
  }
177

178
   /**
179
   * Short description about the Legal Arrangement.
180
   * @return description
181
  **/
182
  @ApiModelProperty(value = "Short description about the Legal Arrangement.")
183
  @JsonProperty(JSON_PROPERTY_DESCRIPTION)
184
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
185

186
  public String getDescription() {
187
    return description;
1✔
188
  }
189

190

191
  @JsonProperty(JSON_PROPERTY_DESCRIPTION)
192
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
193
  public void setDescription(String description) {
NEW
194
    this.description = description;
×
NEW
195
  }
×
196

197

198
  public SoleProprietorship doingBusinessAs(String doingBusinessAs) {
199
    this.doingBusinessAs = doingBusinessAs;
×
200
    return this;
×
201
  }
202

203
   /**
204
   * The registered name, if different from the &#x60;name&#x60;.
205
   * @return doingBusinessAs
206
  **/
207
  @ApiModelProperty(value = "The registered name, if different from the `name`.")
208
  @JsonProperty(JSON_PROPERTY_DOING_BUSINESS_AS)
209
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
210

211
  public String getDoingBusinessAs() {
212
    return doingBusinessAs;
1✔
213
  }
214

215

216
  @JsonProperty(JSON_PROPERTY_DOING_BUSINESS_AS)
217
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
218
  public void setDoingBusinessAs(String doingBusinessAs) {
219
    this.doingBusinessAs = doingBusinessAs;
1✔
220
  }
1✔
221

222

223
  public SoleProprietorship name(String name) {
224
    this.name = name;
×
225
    return this;
×
226
  }
227

228
   /**
229
   * The legal name.
230
   * @return name
231
  **/
232
  @ApiModelProperty(required = true, value = "The legal name.")
233
  @JsonProperty(JSON_PROPERTY_NAME)
234
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
235

236
  public String getName() {
237
    return name;
1✔
238
  }
239

240

241
  @JsonProperty(JSON_PROPERTY_NAME)
242
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
243
  public void setName(String name) {
244
    this.name = name;
1✔
245
  }
1✔
246

247

248
  public SoleProprietorship principalPlaceOfBusiness(Address principalPlaceOfBusiness) {
249
    this.principalPlaceOfBusiness = principalPlaceOfBusiness;
×
250
    return this;
×
251
  }
252

253
   /**
254
   * Get principalPlaceOfBusiness
255
   * @return principalPlaceOfBusiness
256
  **/
257
  @ApiModelProperty(value = "")
258
  @JsonProperty(JSON_PROPERTY_PRINCIPAL_PLACE_OF_BUSINESS)
259
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
260

261
  public Address getPrincipalPlaceOfBusiness() {
262
    return principalPlaceOfBusiness;
1✔
263
  }
264

265

266
  @JsonProperty(JSON_PROPERTY_PRINCIPAL_PLACE_OF_BUSINESS)
267
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
268
  public void setPrincipalPlaceOfBusiness(Address principalPlaceOfBusiness) {
269
    this.principalPlaceOfBusiness = principalPlaceOfBusiness;
1✔
270
  }
1✔
271

272

273
  public SoleProprietorship registeredAddress(Address registeredAddress) {
274
    this.registeredAddress = registeredAddress;
×
275
    return this;
×
276
  }
277

278
   /**
279
   * Get registeredAddress
280
   * @return registeredAddress
281
  **/
282
  @ApiModelProperty(required = true, value = "")
283
  @JsonProperty(JSON_PROPERTY_REGISTERED_ADDRESS)
284
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
285

286
  public Address getRegisteredAddress() {
287
    return registeredAddress;
1✔
288
  }
289

290

291
  @JsonProperty(JSON_PROPERTY_REGISTERED_ADDRESS)
292
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
293
  public void setRegisteredAddress(Address registeredAddress) {
294
    this.registeredAddress = registeredAddress;
1✔
295
  }
1✔
296

297

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

303
   /**
304
   * The registration number.
305
   * @return registrationNumber
306
  **/
307
  @ApiModelProperty(value = "The registration number.")
308
  @JsonProperty(JSON_PROPERTY_REGISTRATION_NUMBER)
309
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
310

311
  public String getRegistrationNumber() {
312
    return registrationNumber;
1✔
313
  }
314

315

316
  @JsonProperty(JSON_PROPERTY_REGISTRATION_NUMBER)
317
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
318
  public void setRegistrationNumber(String registrationNumber) {
319
    this.registrationNumber = registrationNumber;
1✔
320
  }
1✔
321

322

323
  public SoleProprietorship taxInformation(List<TaxInformation> taxInformation) {
324
    this.taxInformation = taxInformation;
×
325
    return this;
×
326
  }
327

328
  public SoleProprietorship addTaxInformationItem(TaxInformation taxInformationItem) {
329
    if (this.taxInformation == null) {
×
330
      this.taxInformation = new ArrayList<>();
×
331
    }
332
    this.taxInformation.add(taxInformationItem);
×
333
    return this;
×
334
  }
335

336
   /**
337
   * The tax information of the entity.
338
   * @return taxInformation
339
  **/
340
  @ApiModelProperty(value = "The tax information of the entity.")
341
  @JsonProperty(JSON_PROPERTY_TAX_INFORMATION)
342
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
343

344
  public List<TaxInformation> getTaxInformation() {
345
    return taxInformation;
1✔
346
  }
347

348

349
  @JsonProperty(JSON_PROPERTY_TAX_INFORMATION)
350
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
351
  public void setTaxInformation(List<TaxInformation> taxInformation) {
352
    this.taxInformation = taxInformation;
×
353
  }
×
354

355

356
  public SoleProprietorship vatAbsenceReason(VatAbsenceReasonEnum vatAbsenceReason) {
357
    this.vatAbsenceReason = vatAbsenceReason;
×
358
    return this;
×
359
  }
360

361
   /**
362
   * The reason for not providing a VAT number.  Possible values: **industryExemption**, **belowTaxThreshold**.
363
   * @return vatAbsenceReason
364
  **/
365
  @ApiModelProperty(value = "The reason for not providing a VAT number.  Possible values: **industryExemption**, **belowTaxThreshold**.")
366
  @JsonProperty(JSON_PROPERTY_VAT_ABSENCE_REASON)
367
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
368

369
  public VatAbsenceReasonEnum getVatAbsenceReason() {
370
    return vatAbsenceReason;
1✔
371
  }
372

373

374
  @JsonProperty(JSON_PROPERTY_VAT_ABSENCE_REASON)
375
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
376
  public void setVatAbsenceReason(VatAbsenceReasonEnum vatAbsenceReason) {
377
    this.vatAbsenceReason = vatAbsenceReason;
1✔
378
  }
1✔
379

380

381
  public SoleProprietorship vatNumber(String vatNumber) {
382
    this.vatNumber = vatNumber;
×
383
    return this;
×
384
  }
385

386
   /**
387
   * The VAT number.
388
   * @return vatNumber
389
  **/
390
  @ApiModelProperty(value = "The VAT number.")
391
  @JsonProperty(JSON_PROPERTY_VAT_NUMBER)
392
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
393

394
  public String getVatNumber() {
395
    return vatNumber;
1✔
396
  }
397

398

399
  @JsonProperty(JSON_PROPERTY_VAT_NUMBER)
400
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
401
  public void setVatNumber(String vatNumber) {
402
    this.vatNumber = vatNumber;
1✔
403
  }
1✔
404

405

406
  /**
407
   * Return true if this SoleProprietorship object is equal to o.
408
   */
409
  @Override
410
  public boolean equals(Object o) {
411
    if (this == o) {
×
412
      return true;
×
413
    }
414
    if (o == null || getClass() != o.getClass()) {
×
415
      return false;
×
416
    }
417
    SoleProprietorship soleProprietorship = (SoleProprietorship) o;
×
418
    return Objects.equals(this.countryOfGoverningLaw, soleProprietorship.countryOfGoverningLaw) &&
×
419
        Objects.equals(this.dateOfIncorporation, soleProprietorship.dateOfIncorporation) &&
×
NEW
420
        Objects.equals(this.description, soleProprietorship.description) &&
×
421
        Objects.equals(this.doingBusinessAs, soleProprietorship.doingBusinessAs) &&
×
422
        Objects.equals(this.name, soleProprietorship.name) &&
×
423
        Objects.equals(this.principalPlaceOfBusiness, soleProprietorship.principalPlaceOfBusiness) &&
×
424
        Objects.equals(this.registeredAddress, soleProprietorship.registeredAddress) &&
×
425
        Objects.equals(this.registrationNumber, soleProprietorship.registrationNumber) &&
×
426
        Objects.equals(this.taxInformation, soleProprietorship.taxInformation) &&
×
427
        Objects.equals(this.vatAbsenceReason, soleProprietorship.vatAbsenceReason) &&
×
428
        Objects.equals(this.vatNumber, soleProprietorship.vatNumber);
×
429
  }
430

431
  @Override
432
  public int hashCode() {
NEW
433
    return Objects.hash(countryOfGoverningLaw, dateOfIncorporation, description, doingBusinessAs, name, principalPlaceOfBusiness, registeredAddress, registrationNumber, taxInformation, vatAbsenceReason, vatNumber);
×
434
  }
435

436
  @Override
437
  public String toString() {
438
    StringBuilder sb = new StringBuilder();
×
439
    sb.append("class SoleProprietorship {\n");
×
440
    sb.append("    countryOfGoverningLaw: ").append(toIndentedString(countryOfGoverningLaw)).append("\n");
×
441
    sb.append("    dateOfIncorporation: ").append(toIndentedString(dateOfIncorporation)).append("\n");
×
NEW
442
    sb.append("    description: ").append(toIndentedString(description)).append("\n");
×
443
    sb.append("    doingBusinessAs: ").append(toIndentedString(doingBusinessAs)).append("\n");
×
444
    sb.append("    name: ").append(toIndentedString(name)).append("\n");
×
445
    sb.append("    principalPlaceOfBusiness: ").append(toIndentedString(principalPlaceOfBusiness)).append("\n");
×
446
    sb.append("    registeredAddress: ").append(toIndentedString(registeredAddress)).append("\n");
×
447
    sb.append("    registrationNumber: ").append(toIndentedString(registrationNumber)).append("\n");
×
448
    sb.append("    taxInformation: ").append(toIndentedString(taxInformation)).append("\n");
×
449
    sb.append("    vatAbsenceReason: ").append(toIndentedString(vatAbsenceReason)).append("\n");
×
450
    sb.append("    vatNumber: ").append(toIndentedString(vatNumber)).append("\n");
×
451
    sb.append("}");
×
452
    return sb.toString();
×
453
  }
454

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

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

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