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

stripe / stripe-java / #16644

14 Nov 2024 11:58PM UTC coverage: 12.414% (-0.005%) from 12.419%
#16644

push

github

web-flow
Update generated code for beta (#1922)

* Update generated code for v1334

* Update generated code for v1335

* Update generated code for v1337

* Update generated code for v1339

* Update generated code for v1340

* Update generated code for v1343

* Update generated code for v1345

* Update generated code for v1346

* Update generated code for v1347

* Update generated code for v1348

* Update generated code for v1349

* Update generated code for v1350

* Update generated code for v1352

* Update generated code for v1353

* Update generated code for v1356

---------

Co-authored-by: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com>

2 of 79 new or added lines in 17 files covered. (2.53%)

1 existing line in 1 file now uncovered.

18857 of 151907 relevant lines covered (12.41%)

0.12 hits per line

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

7.35
/src/main/java/com/stripe/param/PersonCollectionCreateParams.java
1
// File generated from our OpenAPI spec
2
package com.stripe.param;
3

4
import com.google.gson.annotations.SerializedName;
5
import com.stripe.net.ApiRequestParams;
6
import com.stripe.param.common.EmptyParam;
7
import java.math.BigDecimal;
8
import java.util.ArrayList;
9
import java.util.HashMap;
10
import java.util.List;
11
import java.util.Map;
12
import lombok.Getter;
13

14
@Getter
15
public class PersonCollectionCreateParams extends ApiRequestParams {
16
  /**
17
   * Details on the legal guardian's or authorizer's acceptance of the required Stripe agreements.
18
   */
19
  @SerializedName("additional_tos_acceptances")
20
  AdditionalTosAcceptances additionalTosAcceptances;
21

22
  /** The person's address. */
23
  @SerializedName("address")
24
  Address address;
25

26
  /** The Kana variation of the person's address (Japan only). */
27
  @SerializedName("address_kana")
28
  AddressKana addressKana;
29

30
  /** The Kanji variation of the person's address (Japan only). */
31
  @SerializedName("address_kanji")
32
  AddressKanji addressKanji;
33

34
  /** The person's date of birth. */
35
  @SerializedName("dob")
36
  Object dob;
37

38
  /** Documents that may be submitted to satisfy various informational requests. */
39
  @SerializedName("documents")
40
  Documents documents;
41

42
  /** The person's email address. */
43
  @SerializedName("email")
44
  String email;
45

46
  /** Specifies which fields in the response should be expanded. */
47
  @SerializedName("expand")
48
  List<String> expand;
49

50
  /**
51
   * Map of extra parameters for custom features not available in this client library. The content
52
   * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each
53
   * key/value pair is serialized as if the key is a root-level field (serialized) name in this
54
   * param object. Effectively, this map is flattened to its parent instance.
55
   */
56
  @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
57
  Map<String, Object> extraParams;
58

59
  /** The person's first name. */
60
  @SerializedName("first_name")
61
  String firstName;
62

63
  /** The Kana variation of the person's first name (Japan only). */
64
  @SerializedName("first_name_kana")
65
  String firstNameKana;
66

67
  /** The Kanji variation of the person's first name (Japan only). */
68
  @SerializedName("first_name_kanji")
69
  String firstNameKanji;
70

71
  /** A list of alternate names or aliases that the person is known by. */
72
  @SerializedName("full_name_aliases")
73
  Object fullNameAliases;
74

75
  /**
76
   * The person's gender (International regulations require either &quot;male&quot; or
77
   * &quot;female&quot;).
78
   */
79
  @SerializedName("gender")
80
  String gender;
81

82
  /**
83
   * The person's ID number, as appropriate for their country. For example, a social security number
84
   * in the U.S., social insurance number in Canada, etc. Instead of the number itself, you can also
85
   * provide a <a href="https://docs.stripe.com/js/tokens/create_token?type=pii">PII token provided
86
   * by Stripe.js</a>.
87
   */
88
  @SerializedName("id_number")
89
  String idNumber;
90

91
  /**
92
   * The person's secondary ID number, as appropriate for their country, will be used for enhanced
93
   * verification checks. In Thailand, this would be the laser code found on the back of an ID card.
94
   * Instead of the number itself, you can also provide a <a
95
   * href="https://docs.stripe.com/js/tokens/create_token?type=pii">PII token provided by
96
   * Stripe.js</a>.
97
   */
98
  @SerializedName("id_number_secondary")
99
  String idNumberSecondary;
100

101
  /** The person's last name. */
102
  @SerializedName("last_name")
103
  String lastName;
104

105
  /** The Kana variation of the person's last name (Japan only). */
106
  @SerializedName("last_name_kana")
107
  String lastNameKana;
108

109
  /** The Kanji variation of the person's last name (Japan only). */
110
  @SerializedName("last_name_kanji")
111
  String lastNameKanji;
112

113
  /** The person's maiden name. */
114
  @SerializedName("maiden_name")
115
  String maidenName;
116

117
  /**
118
   * Set of <a href="https://stripe.com/docs/api/metadata">key-value pairs</a> that you can attach
119
   * to an object. This can be useful for storing additional information about the object in a
120
   * structured format. Individual keys can be unset by posting an empty value to them. All keys can
121
   * be unset by posting an empty value to {@code metadata}.
122
   */
123
  @SerializedName("metadata")
124
  Object metadata;
125

126
  /**
127
   * The country where the person is a national. Two-letter country code (<a
128
   * href="https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2">ISO 3166-1 alpha-2</a>), or
129
   * &quot;XX&quot; if unavailable.
130
   */
131
  @SerializedName("nationality")
132
  String nationality;
133

134
  /**
135
   * A <a href="https://docs.stripe.com/connect/account-tokens">person token</a>, used to securely
136
   * provide details to the person.
137
   */
138
  @SerializedName("person_token")
139
  String personToken;
140

141
  /** The person's phone number. */
142
  @SerializedName("phone")
143
  String phone;
144

145
  /**
146
   * Indicates if the person or any of their representatives, family members, or other closely
147
   * related persons, declares that they hold or have held an important public job or function, in
148
   * any jurisdiction.
149
   */
150
  @SerializedName("political_exposure")
151
  String politicalExposure;
152

153
  /** The person's registered address. */
154
  @SerializedName("registered_address")
155
  RegisteredAddress registeredAddress;
156

157
  /** The relationship that this person has with the account's legal entity. */
158
  @SerializedName("relationship")
159
  Relationship relationship;
160

161
  /** The last four digits of the person's Social Security number (U.S. only). */
162
  @SerializedName("ssn_last_4")
163
  String ssnLast4;
164

165
  /** The person's verification status. */
166
  @SerializedName("verification")
167
  Verification verification;
168

169
  private PersonCollectionCreateParams(
170
      AdditionalTosAcceptances additionalTosAcceptances,
171
      Address address,
172
      AddressKana addressKana,
173
      AddressKanji addressKanji,
174
      Object dob,
175
      Documents documents,
176
      String email,
177
      List<String> expand,
178
      Map<String, Object> extraParams,
179
      String firstName,
180
      String firstNameKana,
181
      String firstNameKanji,
182
      Object fullNameAliases,
183
      String gender,
184
      String idNumber,
185
      String idNumberSecondary,
186
      String lastName,
187
      String lastNameKana,
188
      String lastNameKanji,
189
      String maidenName,
190
      Object metadata,
191
      String nationality,
192
      String personToken,
193
      String phone,
194
      String politicalExposure,
195
      RegisteredAddress registeredAddress,
196
      Relationship relationship,
197
      String ssnLast4,
198
      Verification verification) {
1✔
199
    this.additionalTosAcceptances = additionalTosAcceptances;
1✔
200
    this.address = address;
1✔
201
    this.addressKana = addressKana;
1✔
202
    this.addressKanji = addressKanji;
1✔
203
    this.dob = dob;
1✔
204
    this.documents = documents;
1✔
205
    this.email = email;
1✔
206
    this.expand = expand;
1✔
207
    this.extraParams = extraParams;
1✔
208
    this.firstName = firstName;
1✔
209
    this.firstNameKana = firstNameKana;
1✔
210
    this.firstNameKanji = firstNameKanji;
1✔
211
    this.fullNameAliases = fullNameAliases;
1✔
212
    this.gender = gender;
1✔
213
    this.idNumber = idNumber;
1✔
214
    this.idNumberSecondary = idNumberSecondary;
1✔
215
    this.lastName = lastName;
1✔
216
    this.lastNameKana = lastNameKana;
1✔
217
    this.lastNameKanji = lastNameKanji;
1✔
218
    this.maidenName = maidenName;
1✔
219
    this.metadata = metadata;
1✔
220
    this.nationality = nationality;
1✔
221
    this.personToken = personToken;
1✔
222
    this.phone = phone;
1✔
223
    this.politicalExposure = politicalExposure;
1✔
224
    this.registeredAddress = registeredAddress;
1✔
225
    this.relationship = relationship;
1✔
226
    this.ssnLast4 = ssnLast4;
1✔
227
    this.verification = verification;
1✔
228
  }
1✔
229

230
  public static Builder builder() {
231
    return new Builder();
1✔
232
  }
233

234
  public static class Builder {
1✔
235
    private AdditionalTosAcceptances additionalTosAcceptances;
236

237
    private Address address;
238

239
    private AddressKana addressKana;
240

241
    private AddressKanji addressKanji;
242

243
    private Object dob;
244

245
    private Documents documents;
246

247
    private String email;
248

249
    private List<String> expand;
250

251
    private Map<String, Object> extraParams;
252

253
    private String firstName;
254

255
    private String firstNameKana;
256

257
    private String firstNameKanji;
258

259
    private Object fullNameAliases;
260

261
    private String gender;
262

263
    private String idNumber;
264

265
    private String idNumberSecondary;
266

267
    private String lastName;
268

269
    private String lastNameKana;
270

271
    private String lastNameKanji;
272

273
    private String maidenName;
274

275
    private Object metadata;
276

277
    private String nationality;
278

279
    private String personToken;
280

281
    private String phone;
282

283
    private String politicalExposure;
284

285
    private RegisteredAddress registeredAddress;
286

287
    private Relationship relationship;
288

289
    private String ssnLast4;
290

291
    private Verification verification;
292

293
    /** Finalize and obtain parameter instance from this builder. */
294
    public PersonCollectionCreateParams build() {
295
      return new PersonCollectionCreateParams(
1✔
296
          this.additionalTosAcceptances,
297
          this.address,
298
          this.addressKana,
299
          this.addressKanji,
300
          this.dob,
301
          this.documents,
302
          this.email,
303
          this.expand,
304
          this.extraParams,
305
          this.firstName,
306
          this.firstNameKana,
307
          this.firstNameKanji,
308
          this.fullNameAliases,
309
          this.gender,
310
          this.idNumber,
311
          this.idNumberSecondary,
312
          this.lastName,
313
          this.lastNameKana,
314
          this.lastNameKanji,
315
          this.maidenName,
316
          this.metadata,
317
          this.nationality,
318
          this.personToken,
319
          this.phone,
320
          this.politicalExposure,
321
          this.registeredAddress,
322
          this.relationship,
323
          this.ssnLast4,
324
          this.verification);
325
    }
326

327
    /**
328
     * Details on the legal guardian's or authorizer's acceptance of the required Stripe agreements.
329
     */
330
    public Builder setAdditionalTosAcceptances(
331
        PersonCollectionCreateParams.AdditionalTosAcceptances additionalTosAcceptances) {
332
      this.additionalTosAcceptances = additionalTosAcceptances;
×
333
      return this;
×
334
    }
335

336
    /** The person's address. */
337
    public Builder setAddress(PersonCollectionCreateParams.Address address) {
338
      this.address = address;
×
339
      return this;
×
340
    }
341

342
    /** The Kana variation of the person's address (Japan only). */
343
    public Builder setAddressKana(PersonCollectionCreateParams.AddressKana addressKana) {
344
      this.addressKana = addressKana;
×
345
      return this;
×
346
    }
347

348
    /** The Kanji variation of the person's address (Japan only). */
349
    public Builder setAddressKanji(PersonCollectionCreateParams.AddressKanji addressKanji) {
350
      this.addressKanji = addressKanji;
×
351
      return this;
×
352
    }
353

354
    /** The person's date of birth. */
355
    public Builder setDob(PersonCollectionCreateParams.Dob dob) {
356
      this.dob = dob;
×
357
      return this;
×
358
    }
359

360
    /** The person's date of birth. */
361
    public Builder setDob(EmptyParam dob) {
362
      this.dob = dob;
×
363
      return this;
×
364
    }
365

366
    /** Documents that may be submitted to satisfy various informational requests. */
367
    public Builder setDocuments(PersonCollectionCreateParams.Documents documents) {
368
      this.documents = documents;
×
369
      return this;
×
370
    }
371

372
    /** The person's email address. */
373
    public Builder setEmail(String email) {
374
      this.email = email;
×
375
      return this;
×
376
    }
377

378
    /**
379
     * Add an element to `expand` list. A list is initialized for the first `add/addAll` call, and
380
     * subsequent calls adds additional elements to the original list. See {@link
381
     * PersonCollectionCreateParams#expand} for the field documentation.
382
     */
383
    public Builder addExpand(String element) {
384
      if (this.expand == null) {
×
385
        this.expand = new ArrayList<>();
×
386
      }
387
      this.expand.add(element);
×
388
      return this;
×
389
    }
390

391
    /**
392
     * Add all elements to `expand` list. A list is initialized for the first `add/addAll` call, and
393
     * subsequent calls adds additional elements to the original list. See {@link
394
     * PersonCollectionCreateParams#expand} for the field documentation.
395
     */
396
    public Builder addAllExpand(List<String> elements) {
397
      if (this.expand == null) {
×
398
        this.expand = new ArrayList<>();
×
399
      }
400
      this.expand.addAll(elements);
×
401
      return this;
×
402
    }
403

404
    /**
405
     * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll`
406
     * call, and subsequent calls add additional key/value pairs to the original map. See {@link
407
     * PersonCollectionCreateParams#extraParams} for the field documentation.
408
     */
409
    public Builder putExtraParam(String key, Object value) {
410
      if (this.extraParams == null) {
×
411
        this.extraParams = new HashMap<>();
×
412
      }
413
      this.extraParams.put(key, value);
×
414
      return this;
×
415
    }
416

417
    /**
418
     * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
419
     * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map.
420
     * See {@link PersonCollectionCreateParams#extraParams} for the field documentation.
421
     */
422
    public Builder putAllExtraParam(Map<String, Object> map) {
423
      if (this.extraParams == null) {
×
424
        this.extraParams = new HashMap<>();
×
425
      }
426
      this.extraParams.putAll(map);
×
427
      return this;
×
428
    }
429

430
    /** The person's first name. */
431
    public Builder setFirstName(String firstName) {
432
      this.firstName = firstName;
1✔
433
      return this;
1✔
434
    }
435

436
    /** The Kana variation of the person's first name (Japan only). */
437
    public Builder setFirstNameKana(String firstNameKana) {
438
      this.firstNameKana = firstNameKana;
×
439
      return this;
×
440
    }
441

442
    /** The Kanji variation of the person's first name (Japan only). */
443
    public Builder setFirstNameKanji(String firstNameKanji) {
444
      this.firstNameKanji = firstNameKanji;
×
445
      return this;
×
446
    }
447

448
    /**
449
     * Add an element to `fullNameAliases` list. A list is initialized for the first `add/addAll`
450
     * call, and subsequent calls adds additional elements to the original list. See {@link
451
     * PersonCollectionCreateParams#fullNameAliases} for the field documentation.
452
     */
453
    @SuppressWarnings("unchecked")
454
    public Builder addFullNameAlias(String element) {
455
      if (this.fullNameAliases == null || this.fullNameAliases instanceof EmptyParam) {
×
456
        this.fullNameAliases = new ArrayList<String>();
×
457
      }
458
      ((List<String>) this.fullNameAliases).add(element);
×
459
      return this;
×
460
    }
461

462
    /**
463
     * Add all elements to `fullNameAliases` list. A list is initialized for the first `add/addAll`
464
     * call, and subsequent calls adds additional elements to the original list. See {@link
465
     * PersonCollectionCreateParams#fullNameAliases} for the field documentation.
466
     */
467
    @SuppressWarnings("unchecked")
468
    public Builder addAllFullNameAlias(List<String> elements) {
469
      if (this.fullNameAliases == null || this.fullNameAliases instanceof EmptyParam) {
×
470
        this.fullNameAliases = new ArrayList<String>();
×
471
      }
472
      ((List<String>) this.fullNameAliases).addAll(elements);
×
473
      return this;
×
474
    }
475

476
    /** A list of alternate names or aliases that the person is known by. */
477
    public Builder setFullNameAliases(EmptyParam fullNameAliases) {
478
      this.fullNameAliases = fullNameAliases;
×
479
      return this;
×
480
    }
481

482
    /** A list of alternate names or aliases that the person is known by. */
483
    public Builder setFullNameAliases(List<String> fullNameAliases) {
484
      this.fullNameAliases = fullNameAliases;
×
485
      return this;
×
486
    }
487

488
    /**
489
     * The person's gender (International regulations require either &quot;male&quot; or
490
     * &quot;female&quot;).
491
     */
492
    public Builder setGender(String gender) {
493
      this.gender = gender;
×
494
      return this;
×
495
    }
496

497
    /**
498
     * The person's ID number, as appropriate for their country. For example, a social security
499
     * number in the U.S., social insurance number in Canada, etc. Instead of the number itself, you
500
     * can also provide a <a href="https://docs.stripe.com/js/tokens/create_token?type=pii">PII
501
     * token provided by Stripe.js</a>.
502
     */
503
    public Builder setIdNumber(String idNumber) {
504
      this.idNumber = idNumber;
×
505
      return this;
×
506
    }
507

508
    /**
509
     * The person's secondary ID number, as appropriate for their country, will be used for enhanced
510
     * verification checks. In Thailand, this would be the laser code found on the back of an ID
511
     * card. Instead of the number itself, you can also provide a <a
512
     * href="https://docs.stripe.com/js/tokens/create_token?type=pii">PII token provided by
513
     * Stripe.js</a>.
514
     */
515
    public Builder setIdNumberSecondary(String idNumberSecondary) {
516
      this.idNumberSecondary = idNumberSecondary;
×
517
      return this;
×
518
    }
519

520
    /** The person's last name. */
521
    public Builder setLastName(String lastName) {
522
      this.lastName = lastName;
1✔
523
      return this;
1✔
524
    }
525

526
    /** The Kana variation of the person's last name (Japan only). */
527
    public Builder setLastNameKana(String lastNameKana) {
528
      this.lastNameKana = lastNameKana;
×
529
      return this;
×
530
    }
531

532
    /** The Kanji variation of the person's last name (Japan only). */
533
    public Builder setLastNameKanji(String lastNameKanji) {
534
      this.lastNameKanji = lastNameKanji;
×
535
      return this;
×
536
    }
537

538
    /** The person's maiden name. */
539
    public Builder setMaidenName(String maidenName) {
540
      this.maidenName = maidenName;
×
541
      return this;
×
542
    }
543

544
    /**
545
     * Add a key/value pair to `metadata` map. A map is initialized for the first `put/putAll` call,
546
     * and subsequent calls add additional key/value pairs to the original map. See {@link
547
     * PersonCollectionCreateParams#metadata} for the field documentation.
548
     */
549
    @SuppressWarnings("unchecked")
550
    public Builder putMetadata(String key, String value) {
551
      if (this.metadata == null || this.metadata instanceof EmptyParam) {
×
552
        this.metadata = new HashMap<String, String>();
×
553
      }
554
      ((Map<String, String>) this.metadata).put(key, value);
×
555
      return this;
×
556
    }
557

558
    /**
559
     * Add all map key/value pairs to `metadata` map. A map is initialized for the first
560
     * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map.
561
     * See {@link PersonCollectionCreateParams#metadata} for the field documentation.
562
     */
563
    @SuppressWarnings("unchecked")
564
    public Builder putAllMetadata(Map<String, String> map) {
565
      if (this.metadata == null || this.metadata instanceof EmptyParam) {
×
566
        this.metadata = new HashMap<String, String>();
×
567
      }
568
      ((Map<String, String>) this.metadata).putAll(map);
×
569
      return this;
×
570
    }
571

572
    /**
573
     * Set of <a href="https://stripe.com/docs/api/metadata">key-value pairs</a> that you can attach
574
     * to an object. This can be useful for storing additional information about the object in a
575
     * structured format. Individual keys can be unset by posting an empty value to them. All keys
576
     * can be unset by posting an empty value to {@code metadata}.
577
     */
578
    public Builder setMetadata(EmptyParam metadata) {
579
      this.metadata = metadata;
×
580
      return this;
×
581
    }
582

583
    /**
584
     * Set of <a href="https://stripe.com/docs/api/metadata">key-value pairs</a> that you can attach
585
     * to an object. This can be useful for storing additional information about the object in a
586
     * structured format. Individual keys can be unset by posting an empty value to them. All keys
587
     * can be unset by posting an empty value to {@code metadata}.
588
     */
589
    public Builder setMetadata(Map<String, String> metadata) {
590
      this.metadata = metadata;
×
591
      return this;
×
592
    }
593

594
    /**
595
     * The country where the person is a national. Two-letter country code (<a
596
     * href="https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2">ISO 3166-1 alpha-2</a>), or
597
     * &quot;XX&quot; if unavailable.
598
     */
599
    public Builder setNationality(String nationality) {
600
      this.nationality = nationality;
×
601
      return this;
×
602
    }
603

604
    /**
605
     * A <a href="https://docs.stripe.com/connect/account-tokens">person token</a>, used to securely
606
     * provide details to the person.
607
     */
608
    public Builder setPersonToken(String personToken) {
609
      this.personToken = personToken;
×
610
      return this;
×
611
    }
612

613
    /** The person's phone number. */
614
    public Builder setPhone(String phone) {
615
      this.phone = phone;
×
616
      return this;
×
617
    }
618

619
    /**
620
     * Indicates if the person or any of their representatives, family members, or other closely
621
     * related persons, declares that they hold or have held an important public job or function, in
622
     * any jurisdiction.
623
     */
624
    public Builder setPoliticalExposure(String politicalExposure) {
625
      this.politicalExposure = politicalExposure;
×
626
      return this;
×
627
    }
628

629
    /** The person's registered address. */
630
    public Builder setRegisteredAddress(
631
        PersonCollectionCreateParams.RegisteredAddress registeredAddress) {
632
      this.registeredAddress = registeredAddress;
×
633
      return this;
×
634
    }
635

636
    /** The relationship that this person has with the account's legal entity. */
637
    public Builder setRelationship(PersonCollectionCreateParams.Relationship relationship) {
638
      this.relationship = relationship;
×
639
      return this;
×
640
    }
641

642
    /** The last four digits of the person's Social Security number (U.S. only). */
643
    public Builder setSsnLast4(String ssnLast4) {
644
      this.ssnLast4 = ssnLast4;
×
645
      return this;
×
646
    }
647

648
    /** The person's verification status. */
649
    public Builder setVerification(PersonCollectionCreateParams.Verification verification) {
650
      this.verification = verification;
×
651
      return this;
×
652
    }
653
  }
654

655
  @Getter
656
  public static class AdditionalTosAcceptances {
657
    /** Details on the legal guardian's acceptance of the main Stripe service agreement. */
658
    @SerializedName("account")
659
    Account account;
660

661
    /**
662
     * Map of extra parameters for custom features not available in this client library. The content
663
     * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each
664
     * key/value pair is serialized as if the key is a root-level field (serialized) name in this
665
     * param object. Effectively, this map is flattened to its parent instance.
666
     */
667
    @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
668
    Map<String, Object> extraParams;
669

670
    private AdditionalTosAcceptances(Account account, Map<String, Object> extraParams) {
×
671
      this.account = account;
×
672
      this.extraParams = extraParams;
×
673
    }
×
674

675
    public static Builder builder() {
676
      return new Builder();
×
677
    }
678

679
    public static class Builder {
×
680
      private Account account;
681

682
      private Map<String, Object> extraParams;
683

684
      /** Finalize and obtain parameter instance from this builder. */
685
      public PersonCollectionCreateParams.AdditionalTosAcceptances build() {
686
        return new PersonCollectionCreateParams.AdditionalTosAcceptances(
×
687
            this.account, this.extraParams);
688
      }
689

690
      /** Details on the legal guardian's acceptance of the main Stripe service agreement. */
691
      public Builder setAccount(
692
          PersonCollectionCreateParams.AdditionalTosAcceptances.Account account) {
693
        this.account = account;
×
694
        return this;
×
695
      }
696

697
      /**
698
       * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll`
699
       * call, and subsequent calls add additional key/value pairs to the original map. See {@link
700
       * PersonCollectionCreateParams.AdditionalTosAcceptances#extraParams} for the field
701
       * documentation.
702
       */
703
      public Builder putExtraParam(String key, Object value) {
704
        if (this.extraParams == null) {
×
705
          this.extraParams = new HashMap<>();
×
706
        }
707
        this.extraParams.put(key, value);
×
708
        return this;
×
709
      }
710

711
      /**
712
       * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
713
       * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map.
714
       * See {@link PersonCollectionCreateParams.AdditionalTosAcceptances#extraParams} for the field
715
       * documentation.
716
       */
717
      public Builder putAllExtraParam(Map<String, Object> map) {
718
        if (this.extraParams == null) {
×
719
          this.extraParams = new HashMap<>();
×
720
        }
721
        this.extraParams.putAll(map);
×
722
        return this;
×
723
      }
724
    }
725

726
    @Getter
727
    public static class Account {
728
      /**
729
       * The Unix timestamp marking when the account representative accepted the service agreement.
730
       */
731
      @SerializedName("date")
732
      Long date;
733

734
      /**
735
       * Map of extra parameters for custom features not available in this client library. The
736
       * content in this map is not serialized under this field's {@code @SerializedName} value.
737
       * Instead, each key/value pair is serialized as if the key is a root-level field (serialized)
738
       * name in this param object. Effectively, this map is flattened to its parent instance.
739
       */
740
      @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
741
      Map<String, Object> extraParams;
742

743
      /** The IP address from which the account representative accepted the service agreement. */
744
      @SerializedName("ip")
745
      String ip;
746

747
      /**
748
       * The user agent of the browser from which the account representative accepted the service
749
       * agreement.
750
       */
751
      @SerializedName("user_agent")
752
      Object userAgent;
753

754
      private Account(Long date, Map<String, Object> extraParams, String ip, Object userAgent) {
×
755
        this.date = date;
×
756
        this.extraParams = extraParams;
×
757
        this.ip = ip;
×
758
        this.userAgent = userAgent;
×
759
      }
×
760

761
      public static Builder builder() {
762
        return new Builder();
×
763
      }
764

765
      public static class Builder {
×
766
        private Long date;
767

768
        private Map<String, Object> extraParams;
769

770
        private String ip;
771

772
        private Object userAgent;
773

774
        /** Finalize and obtain parameter instance from this builder. */
775
        public PersonCollectionCreateParams.AdditionalTosAcceptances.Account build() {
776
          return new PersonCollectionCreateParams.AdditionalTosAcceptances.Account(
×
777
              this.date, this.extraParams, this.ip, this.userAgent);
778
        }
779

780
        /**
781
         * The Unix timestamp marking when the account representative accepted the service
782
         * agreement.
783
         */
784
        public Builder setDate(Long date) {
785
          this.date = date;
×
786
          return this;
×
787
        }
788

789
        /**
790
         * Add a key/value pair to `extraParams` map. A map is initialized for the first
791
         * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
792
         * map. See {@link
793
         * PersonCollectionCreateParams.AdditionalTosAcceptances.Account#extraParams} for the field
794
         * documentation.
795
         */
796
        public Builder putExtraParam(String key, Object value) {
797
          if (this.extraParams == null) {
×
798
            this.extraParams = new HashMap<>();
×
799
          }
800
          this.extraParams.put(key, value);
×
801
          return this;
×
802
        }
803

804
        /**
805
         * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
806
         * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
807
         * map. See {@link
808
         * PersonCollectionCreateParams.AdditionalTosAcceptances.Account#extraParams} for the field
809
         * documentation.
810
         */
811
        public Builder putAllExtraParam(Map<String, Object> map) {
812
          if (this.extraParams == null) {
×
813
            this.extraParams = new HashMap<>();
×
814
          }
815
          this.extraParams.putAll(map);
×
816
          return this;
×
817
        }
818

819
        /** The IP address from which the account representative accepted the service agreement. */
820
        public Builder setIp(String ip) {
821
          this.ip = ip;
×
822
          return this;
×
823
        }
824

825
        /**
826
         * The user agent of the browser from which the account representative accepted the service
827
         * agreement.
828
         */
829
        public Builder setUserAgent(String userAgent) {
830
          this.userAgent = userAgent;
×
831
          return this;
×
832
        }
833

834
        /**
835
         * The user agent of the browser from which the account representative accepted the service
836
         * agreement.
837
         */
838
        public Builder setUserAgent(EmptyParam userAgent) {
839
          this.userAgent = userAgent;
×
840
          return this;
×
841
        }
842
      }
843
    }
844
  }
845

846
  @Getter
847
  public static class Address {
848
    /** City, district, suburb, town, or village. */
849
    @SerializedName("city")
850
    String city;
851

852
    /**
853
     * Two-letter country code (<a href="https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2">ISO
854
     * 3166-1 alpha-2</a>).
855
     */
856
    @SerializedName("country")
857
    String country;
858

859
    /**
860
     * Map of extra parameters for custom features not available in this client library. The content
861
     * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each
862
     * key/value pair is serialized as if the key is a root-level field (serialized) name in this
863
     * param object. Effectively, this map is flattened to its parent instance.
864
     */
865
    @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
866
    Map<String, Object> extraParams;
867

868
    /** Address line 1 (e.g., street, PO Box, or company name). */
869
    @SerializedName("line1")
870
    String line1;
871

872
    /** Address line 2 (e.g., apartment, suite, unit, or building). */
873
    @SerializedName("line2")
874
    String line2;
875

876
    /** ZIP or postal code. */
877
    @SerializedName("postal_code")
878
    String postalCode;
879

880
    /** State, county, province, or region. */
881
    @SerializedName("state")
882
    String state;
883

884
    private Address(
885
        String city,
886
        String country,
887
        Map<String, Object> extraParams,
888
        String line1,
889
        String line2,
890
        String postalCode,
891
        String state) {
×
892
      this.city = city;
×
893
      this.country = country;
×
894
      this.extraParams = extraParams;
×
895
      this.line1 = line1;
×
896
      this.line2 = line2;
×
897
      this.postalCode = postalCode;
×
898
      this.state = state;
×
899
    }
×
900

901
    public static Builder builder() {
902
      return new Builder();
×
903
    }
904

905
    public static class Builder {
×
906
      private String city;
907

908
      private String country;
909

910
      private Map<String, Object> extraParams;
911

912
      private String line1;
913

914
      private String line2;
915

916
      private String postalCode;
917

918
      private String state;
919

920
      /** Finalize and obtain parameter instance from this builder. */
921
      public PersonCollectionCreateParams.Address build() {
922
        return new PersonCollectionCreateParams.Address(
×
923
            this.city,
924
            this.country,
925
            this.extraParams,
926
            this.line1,
927
            this.line2,
928
            this.postalCode,
929
            this.state);
930
      }
931

932
      /** City, district, suburb, town, or village. */
933
      public Builder setCity(String city) {
934
        this.city = city;
×
935
        return this;
×
936
      }
937

938
      /**
939
       * Two-letter country code (<a href="https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2">ISO
940
       * 3166-1 alpha-2</a>).
941
       */
942
      public Builder setCountry(String country) {
943
        this.country = country;
×
944
        return this;
×
945
      }
946

947
      /**
948
       * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll`
949
       * call, and subsequent calls add additional key/value pairs to the original map. See {@link
950
       * PersonCollectionCreateParams.Address#extraParams} for the field documentation.
951
       */
952
      public Builder putExtraParam(String key, Object value) {
953
        if (this.extraParams == null) {
×
954
          this.extraParams = new HashMap<>();
×
955
        }
956
        this.extraParams.put(key, value);
×
957
        return this;
×
958
      }
959

960
      /**
961
       * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
962
       * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map.
963
       * See {@link PersonCollectionCreateParams.Address#extraParams} for the field documentation.
964
       */
965
      public Builder putAllExtraParam(Map<String, Object> map) {
966
        if (this.extraParams == null) {
×
967
          this.extraParams = new HashMap<>();
×
968
        }
969
        this.extraParams.putAll(map);
×
970
        return this;
×
971
      }
972

973
      /** Address line 1 (e.g., street, PO Box, or company name). */
974
      public Builder setLine1(String line1) {
975
        this.line1 = line1;
×
976
        return this;
×
977
      }
978

979
      /** Address line 2 (e.g., apartment, suite, unit, or building). */
980
      public Builder setLine2(String line2) {
981
        this.line2 = line2;
×
982
        return this;
×
983
      }
984

985
      /** ZIP or postal code. */
986
      public Builder setPostalCode(String postalCode) {
987
        this.postalCode = postalCode;
×
988
        return this;
×
989
      }
990

991
      /** State, county, province, or region. */
992
      public Builder setState(String state) {
993
        this.state = state;
×
994
        return this;
×
995
      }
996
    }
997
  }
998

999
  @Getter
1000
  public static class AddressKana {
1001
    /** City or ward. */
1002
    @SerializedName("city")
1003
    String city;
1004

1005
    /**
1006
     * Two-letter country code (<a href="https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2">ISO
1007
     * 3166-1 alpha-2</a>).
1008
     */
1009
    @SerializedName("country")
1010
    String country;
1011

1012
    /**
1013
     * Map of extra parameters for custom features not available in this client library. The content
1014
     * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each
1015
     * key/value pair is serialized as if the key is a root-level field (serialized) name in this
1016
     * param object. Effectively, this map is flattened to its parent instance.
1017
     */
1018
    @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
1019
    Map<String, Object> extraParams;
1020

1021
    /** Block or building number. */
1022
    @SerializedName("line1")
1023
    String line1;
1024

1025
    /** Building details. */
1026
    @SerializedName("line2")
1027
    String line2;
1028

1029
    /** Postal code. */
1030
    @SerializedName("postal_code")
1031
    String postalCode;
1032

1033
    /** Prefecture. */
1034
    @SerializedName("state")
1035
    String state;
1036

1037
    /** Town or cho-me. */
1038
    @SerializedName("town")
1039
    String town;
1040

1041
    private AddressKana(
1042
        String city,
1043
        String country,
1044
        Map<String, Object> extraParams,
1045
        String line1,
1046
        String line2,
1047
        String postalCode,
1048
        String state,
1049
        String town) {
×
1050
      this.city = city;
×
1051
      this.country = country;
×
1052
      this.extraParams = extraParams;
×
1053
      this.line1 = line1;
×
1054
      this.line2 = line2;
×
1055
      this.postalCode = postalCode;
×
1056
      this.state = state;
×
1057
      this.town = town;
×
1058
    }
×
1059

1060
    public static Builder builder() {
1061
      return new Builder();
×
1062
    }
1063

1064
    public static class Builder {
×
1065
      private String city;
1066

1067
      private String country;
1068

1069
      private Map<String, Object> extraParams;
1070

1071
      private String line1;
1072

1073
      private String line2;
1074

1075
      private String postalCode;
1076

1077
      private String state;
1078

1079
      private String town;
1080

1081
      /** Finalize and obtain parameter instance from this builder. */
1082
      public PersonCollectionCreateParams.AddressKana build() {
1083
        return new PersonCollectionCreateParams.AddressKana(
×
1084
            this.city,
1085
            this.country,
1086
            this.extraParams,
1087
            this.line1,
1088
            this.line2,
1089
            this.postalCode,
1090
            this.state,
1091
            this.town);
1092
      }
1093

1094
      /** City or ward. */
1095
      public Builder setCity(String city) {
1096
        this.city = city;
×
1097
        return this;
×
1098
      }
1099

1100
      /**
1101
       * Two-letter country code (<a href="https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2">ISO
1102
       * 3166-1 alpha-2</a>).
1103
       */
1104
      public Builder setCountry(String country) {
1105
        this.country = country;
×
1106
        return this;
×
1107
      }
1108

1109
      /**
1110
       * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll`
1111
       * call, and subsequent calls add additional key/value pairs to the original map. See {@link
1112
       * PersonCollectionCreateParams.AddressKana#extraParams} for the field documentation.
1113
       */
1114
      public Builder putExtraParam(String key, Object value) {
1115
        if (this.extraParams == null) {
×
1116
          this.extraParams = new HashMap<>();
×
1117
        }
1118
        this.extraParams.put(key, value);
×
1119
        return this;
×
1120
      }
1121

1122
      /**
1123
       * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
1124
       * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map.
1125
       * See {@link PersonCollectionCreateParams.AddressKana#extraParams} for the field
1126
       * documentation.
1127
       */
1128
      public Builder putAllExtraParam(Map<String, Object> map) {
1129
        if (this.extraParams == null) {
×
1130
          this.extraParams = new HashMap<>();
×
1131
        }
1132
        this.extraParams.putAll(map);
×
1133
        return this;
×
1134
      }
1135

1136
      /** Block or building number. */
1137
      public Builder setLine1(String line1) {
1138
        this.line1 = line1;
×
1139
        return this;
×
1140
      }
1141

1142
      /** Building details. */
1143
      public Builder setLine2(String line2) {
1144
        this.line2 = line2;
×
1145
        return this;
×
1146
      }
1147

1148
      /** Postal code. */
1149
      public Builder setPostalCode(String postalCode) {
1150
        this.postalCode = postalCode;
×
1151
        return this;
×
1152
      }
1153

1154
      /** Prefecture. */
1155
      public Builder setState(String state) {
1156
        this.state = state;
×
1157
        return this;
×
1158
      }
1159

1160
      /** Town or cho-me. */
1161
      public Builder setTown(String town) {
1162
        this.town = town;
×
1163
        return this;
×
1164
      }
1165
    }
1166
  }
1167

1168
  @Getter
1169
  public static class AddressKanji {
1170
    /** City or ward. */
1171
    @SerializedName("city")
1172
    String city;
1173

1174
    /**
1175
     * Two-letter country code (<a href="https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2">ISO
1176
     * 3166-1 alpha-2</a>).
1177
     */
1178
    @SerializedName("country")
1179
    String country;
1180

1181
    /**
1182
     * Map of extra parameters for custom features not available in this client library. The content
1183
     * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each
1184
     * key/value pair is serialized as if the key is a root-level field (serialized) name in this
1185
     * param object. Effectively, this map is flattened to its parent instance.
1186
     */
1187
    @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
1188
    Map<String, Object> extraParams;
1189

1190
    /** Block or building number. */
1191
    @SerializedName("line1")
1192
    String line1;
1193

1194
    /** Building details. */
1195
    @SerializedName("line2")
1196
    String line2;
1197

1198
    /** Postal code. */
1199
    @SerializedName("postal_code")
1200
    String postalCode;
1201

1202
    /** Prefecture. */
1203
    @SerializedName("state")
1204
    String state;
1205

1206
    /** Town or cho-me. */
1207
    @SerializedName("town")
1208
    String town;
1209

1210
    private AddressKanji(
1211
        String city,
1212
        String country,
1213
        Map<String, Object> extraParams,
1214
        String line1,
1215
        String line2,
1216
        String postalCode,
1217
        String state,
1218
        String town) {
×
1219
      this.city = city;
×
1220
      this.country = country;
×
1221
      this.extraParams = extraParams;
×
1222
      this.line1 = line1;
×
1223
      this.line2 = line2;
×
1224
      this.postalCode = postalCode;
×
1225
      this.state = state;
×
1226
      this.town = town;
×
1227
    }
×
1228

1229
    public static Builder builder() {
1230
      return new Builder();
×
1231
    }
1232

1233
    public static class Builder {
×
1234
      private String city;
1235

1236
      private String country;
1237

1238
      private Map<String, Object> extraParams;
1239

1240
      private String line1;
1241

1242
      private String line2;
1243

1244
      private String postalCode;
1245

1246
      private String state;
1247

1248
      private String town;
1249

1250
      /** Finalize and obtain parameter instance from this builder. */
1251
      public PersonCollectionCreateParams.AddressKanji build() {
1252
        return new PersonCollectionCreateParams.AddressKanji(
×
1253
            this.city,
1254
            this.country,
1255
            this.extraParams,
1256
            this.line1,
1257
            this.line2,
1258
            this.postalCode,
1259
            this.state,
1260
            this.town);
1261
      }
1262

1263
      /** City or ward. */
1264
      public Builder setCity(String city) {
1265
        this.city = city;
×
1266
        return this;
×
1267
      }
1268

1269
      /**
1270
       * Two-letter country code (<a href="https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2">ISO
1271
       * 3166-1 alpha-2</a>).
1272
       */
1273
      public Builder setCountry(String country) {
1274
        this.country = country;
×
1275
        return this;
×
1276
      }
1277

1278
      /**
1279
       * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll`
1280
       * call, and subsequent calls add additional key/value pairs to the original map. See {@link
1281
       * PersonCollectionCreateParams.AddressKanji#extraParams} for the field documentation.
1282
       */
1283
      public Builder putExtraParam(String key, Object value) {
1284
        if (this.extraParams == null) {
×
1285
          this.extraParams = new HashMap<>();
×
1286
        }
1287
        this.extraParams.put(key, value);
×
1288
        return this;
×
1289
      }
1290

1291
      /**
1292
       * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
1293
       * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map.
1294
       * See {@link PersonCollectionCreateParams.AddressKanji#extraParams} for the field
1295
       * documentation.
1296
       */
1297
      public Builder putAllExtraParam(Map<String, Object> map) {
1298
        if (this.extraParams == null) {
×
1299
          this.extraParams = new HashMap<>();
×
1300
        }
1301
        this.extraParams.putAll(map);
×
1302
        return this;
×
1303
      }
1304

1305
      /** Block or building number. */
1306
      public Builder setLine1(String line1) {
1307
        this.line1 = line1;
×
1308
        return this;
×
1309
      }
1310

1311
      /** Building details. */
1312
      public Builder setLine2(String line2) {
1313
        this.line2 = line2;
×
1314
        return this;
×
1315
      }
1316

1317
      /** Postal code. */
1318
      public Builder setPostalCode(String postalCode) {
1319
        this.postalCode = postalCode;
×
1320
        return this;
×
1321
      }
1322

1323
      /** Prefecture. */
1324
      public Builder setState(String state) {
1325
        this.state = state;
×
1326
        return this;
×
1327
      }
1328

1329
      /** Town or cho-me. */
1330
      public Builder setTown(String town) {
1331
        this.town = town;
×
1332
        return this;
×
1333
      }
1334
    }
1335
  }
1336

1337
  @Getter
1338
  public static class Dob {
1339
    /** <strong>Required.</strong> The day of birth, between 1 and 31. */
1340
    @SerializedName("day")
1341
    Long day;
1342

1343
    /**
1344
     * Map of extra parameters for custom features not available in this client library. The content
1345
     * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each
1346
     * key/value pair is serialized as if the key is a root-level field (serialized) name in this
1347
     * param object. Effectively, this map is flattened to its parent instance.
1348
     */
1349
    @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
1350
    Map<String, Object> extraParams;
1351

1352
    /** <strong>Required.</strong> The month of birth, between 1 and 12. */
1353
    @SerializedName("month")
1354
    Long month;
1355

1356
    /** <strong>Required.</strong> The four-digit year of birth. */
1357
    @SerializedName("year")
1358
    Long year;
1359

1360
    private Dob(Long day, Map<String, Object> extraParams, Long month, Long year) {
×
1361
      this.day = day;
×
1362
      this.extraParams = extraParams;
×
1363
      this.month = month;
×
1364
      this.year = year;
×
1365
    }
×
1366

1367
    public static Builder builder() {
1368
      return new Builder();
×
1369
    }
1370

1371
    public static class Builder {
×
1372
      private Long day;
1373

1374
      private Map<String, Object> extraParams;
1375

1376
      private Long month;
1377

1378
      private Long year;
1379

1380
      /** Finalize and obtain parameter instance from this builder. */
1381
      public PersonCollectionCreateParams.Dob build() {
1382
        return new PersonCollectionCreateParams.Dob(
×
1383
            this.day, this.extraParams, this.month, this.year);
1384
      }
1385

1386
      /** <strong>Required.</strong> The day of birth, between 1 and 31. */
1387
      public Builder setDay(Long day) {
1388
        this.day = day;
×
1389
        return this;
×
1390
      }
1391

1392
      /**
1393
       * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll`
1394
       * call, and subsequent calls add additional key/value pairs to the original map. See {@link
1395
       * PersonCollectionCreateParams.Dob#extraParams} for the field documentation.
1396
       */
1397
      public Builder putExtraParam(String key, Object value) {
1398
        if (this.extraParams == null) {
×
1399
          this.extraParams = new HashMap<>();
×
1400
        }
1401
        this.extraParams.put(key, value);
×
1402
        return this;
×
1403
      }
1404

1405
      /**
1406
       * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
1407
       * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map.
1408
       * See {@link PersonCollectionCreateParams.Dob#extraParams} for the field documentation.
1409
       */
1410
      public Builder putAllExtraParam(Map<String, Object> map) {
1411
        if (this.extraParams == null) {
×
1412
          this.extraParams = new HashMap<>();
×
1413
        }
1414
        this.extraParams.putAll(map);
×
1415
        return this;
×
1416
      }
1417

1418
      /** <strong>Required.</strong> The month of birth, between 1 and 12. */
1419
      public Builder setMonth(Long month) {
1420
        this.month = month;
×
1421
        return this;
×
1422
      }
1423

1424
      /** <strong>Required.</strong> The four-digit year of birth. */
1425
      public Builder setYear(Long year) {
1426
        this.year = year;
×
1427
        return this;
×
1428
      }
1429
    }
1430
  }
1431

1432
  @Getter
1433
  public static class Documents {
1434
    /**
1435
     * One or more documents that demonstrate proof that this person is authorized to represent the
1436
     * company.
1437
     */
1438
    @SerializedName("company_authorization")
1439
    CompanyAuthorization companyAuthorization;
1440

1441
    /**
1442
     * Map of extra parameters for custom features not available in this client library. The content
1443
     * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each
1444
     * key/value pair is serialized as if the key is a root-level field (serialized) name in this
1445
     * param object. Effectively, this map is flattened to its parent instance.
1446
     */
1447
    @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
1448
    Map<String, Object> extraParams;
1449

1450
    /** One or more documents showing the person's passport page with photo and personal data. */
1451
    @SerializedName("passport")
1452
    Passport passport;
1453

1454
    /**
1455
     * One or more documents showing the person's visa required for living in the country where they
1456
     * are residing.
1457
     */
1458
    @SerializedName("visa")
1459
    Visa visa;
1460

1461
    private Documents(
1462
        CompanyAuthorization companyAuthorization,
1463
        Map<String, Object> extraParams,
1464
        Passport passport,
1465
        Visa visa) {
×
1466
      this.companyAuthorization = companyAuthorization;
×
1467
      this.extraParams = extraParams;
×
1468
      this.passport = passport;
×
1469
      this.visa = visa;
×
1470
    }
×
1471

1472
    public static Builder builder() {
1473
      return new Builder();
×
1474
    }
1475

1476
    public static class Builder {
×
1477
      private CompanyAuthorization companyAuthorization;
1478

1479
      private Map<String, Object> extraParams;
1480

1481
      private Passport passport;
1482

1483
      private Visa visa;
1484

1485
      /** Finalize and obtain parameter instance from this builder. */
1486
      public PersonCollectionCreateParams.Documents build() {
1487
        return new PersonCollectionCreateParams.Documents(
×
1488
            this.companyAuthorization, this.extraParams, this.passport, this.visa);
1489
      }
1490

1491
      /**
1492
       * One or more documents that demonstrate proof that this person is authorized to represent
1493
       * the company.
1494
       */
1495
      public Builder setCompanyAuthorization(
1496
          PersonCollectionCreateParams.Documents.CompanyAuthorization companyAuthorization) {
1497
        this.companyAuthorization = companyAuthorization;
×
1498
        return this;
×
1499
      }
1500

1501
      /**
1502
       * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll`
1503
       * call, and subsequent calls add additional key/value pairs to the original map. See {@link
1504
       * PersonCollectionCreateParams.Documents#extraParams} for the field documentation.
1505
       */
1506
      public Builder putExtraParam(String key, Object value) {
1507
        if (this.extraParams == null) {
×
1508
          this.extraParams = new HashMap<>();
×
1509
        }
1510
        this.extraParams.put(key, value);
×
1511
        return this;
×
1512
      }
1513

1514
      /**
1515
       * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
1516
       * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map.
1517
       * See {@link PersonCollectionCreateParams.Documents#extraParams} for the field documentation.
1518
       */
1519
      public Builder putAllExtraParam(Map<String, Object> map) {
1520
        if (this.extraParams == null) {
×
1521
          this.extraParams = new HashMap<>();
×
1522
        }
1523
        this.extraParams.putAll(map);
×
1524
        return this;
×
1525
      }
1526

1527
      /** One or more documents showing the person's passport page with photo and personal data. */
1528
      public Builder setPassport(PersonCollectionCreateParams.Documents.Passport passport) {
1529
        this.passport = passport;
×
1530
        return this;
×
1531
      }
1532

1533
      /**
1534
       * One or more documents showing the person's visa required for living in the country where
1535
       * they are residing.
1536
       */
1537
      public Builder setVisa(PersonCollectionCreateParams.Documents.Visa visa) {
1538
        this.visa = visa;
×
1539
        return this;
×
1540
      }
1541
    }
1542

1543
    @Getter
1544
    public static class CompanyAuthorization {
1545
      /**
1546
       * Map of extra parameters for custom features not available in this client library. The
1547
       * content in this map is not serialized under this field's {@code @SerializedName} value.
1548
       * Instead, each key/value pair is serialized as if the key is a root-level field (serialized)
1549
       * name in this param object. Effectively, this map is flattened to its parent instance.
1550
       */
1551
      @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
1552
      Map<String, Object> extraParams;
1553

1554
      /**
1555
       * One or more document ids returned by a <a
1556
       * href="https://stripe.com/docs/api#create_file">file upload</a> with a {@code purpose} value
1557
       * of {@code account_requirement}.
1558
       */
1559
      @SerializedName("files")
1560
      List<String> files;
1561

1562
      private CompanyAuthorization(Map<String, Object> extraParams, List<String> files) {
×
1563
        this.extraParams = extraParams;
×
1564
        this.files = files;
×
1565
      }
×
1566

1567
      public static Builder builder() {
1568
        return new Builder();
×
1569
      }
1570

1571
      public static class Builder {
×
1572
        private Map<String, Object> extraParams;
1573

1574
        private List<String> files;
1575

1576
        /** Finalize and obtain parameter instance from this builder. */
1577
        public PersonCollectionCreateParams.Documents.CompanyAuthorization build() {
1578
          return new PersonCollectionCreateParams.Documents.CompanyAuthorization(
×
1579
              this.extraParams, this.files);
1580
        }
1581

1582
        /**
1583
         * Add a key/value pair to `extraParams` map. A map is initialized for the first
1584
         * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
1585
         * map. See {@link PersonCollectionCreateParams.Documents.CompanyAuthorization#extraParams}
1586
         * for the field documentation.
1587
         */
1588
        public Builder putExtraParam(String key, Object value) {
1589
          if (this.extraParams == null) {
×
1590
            this.extraParams = new HashMap<>();
×
1591
          }
1592
          this.extraParams.put(key, value);
×
1593
          return this;
×
1594
        }
1595

1596
        /**
1597
         * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
1598
         * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
1599
         * map. See {@link PersonCollectionCreateParams.Documents.CompanyAuthorization#extraParams}
1600
         * for the field documentation.
1601
         */
1602
        public Builder putAllExtraParam(Map<String, Object> map) {
1603
          if (this.extraParams == null) {
×
1604
            this.extraParams = new HashMap<>();
×
1605
          }
1606
          this.extraParams.putAll(map);
×
1607
          return this;
×
1608
        }
1609

1610
        /**
1611
         * Add an element to `files` list. A list is initialized for the first `add/addAll` call,
1612
         * and subsequent calls adds additional elements to the original list. See {@link
1613
         * PersonCollectionCreateParams.Documents.CompanyAuthorization#files} for the field
1614
         * documentation.
1615
         */
1616
        public Builder addFile(String element) {
1617
          if (this.files == null) {
×
1618
            this.files = new ArrayList<>();
×
1619
          }
1620
          this.files.add(element);
×
1621
          return this;
×
1622
        }
1623

1624
        /**
1625
         * Add all elements to `files` list. A list is initialized for the first `add/addAll` call,
1626
         * and subsequent calls adds additional elements to the original list. See {@link
1627
         * PersonCollectionCreateParams.Documents.CompanyAuthorization#files} for the field
1628
         * documentation.
1629
         */
1630
        public Builder addAllFile(List<String> elements) {
1631
          if (this.files == null) {
×
1632
            this.files = new ArrayList<>();
×
1633
          }
1634
          this.files.addAll(elements);
×
1635
          return this;
×
1636
        }
1637
      }
1638
    }
1639

1640
    @Getter
1641
    public static class Passport {
1642
      /**
1643
       * Map of extra parameters for custom features not available in this client library. The
1644
       * content in this map is not serialized under this field's {@code @SerializedName} value.
1645
       * Instead, each key/value pair is serialized as if the key is a root-level field (serialized)
1646
       * name in this param object. Effectively, this map is flattened to its parent instance.
1647
       */
1648
      @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
1649
      Map<String, Object> extraParams;
1650

1651
      /**
1652
       * One or more document ids returned by a <a
1653
       * href="https://stripe.com/docs/api#create_file">file upload</a> with a {@code purpose} value
1654
       * of {@code account_requirement}.
1655
       */
1656
      @SerializedName("files")
1657
      List<String> files;
1658

1659
      private Passport(Map<String, Object> extraParams, List<String> files) {
×
1660
        this.extraParams = extraParams;
×
1661
        this.files = files;
×
1662
      }
×
1663

1664
      public static Builder builder() {
1665
        return new Builder();
×
1666
      }
1667

1668
      public static class Builder {
×
1669
        private Map<String, Object> extraParams;
1670

1671
        private List<String> files;
1672

1673
        /** Finalize and obtain parameter instance from this builder. */
1674
        public PersonCollectionCreateParams.Documents.Passport build() {
1675
          return new PersonCollectionCreateParams.Documents.Passport(this.extraParams, this.files);
×
1676
        }
1677

1678
        /**
1679
         * Add a key/value pair to `extraParams` map. A map is initialized for the first
1680
         * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
1681
         * map. See {@link PersonCollectionCreateParams.Documents.Passport#extraParams} for the
1682
         * field documentation.
1683
         */
1684
        public Builder putExtraParam(String key, Object value) {
1685
          if (this.extraParams == null) {
×
1686
            this.extraParams = new HashMap<>();
×
1687
          }
1688
          this.extraParams.put(key, value);
×
1689
          return this;
×
1690
        }
1691

1692
        /**
1693
         * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
1694
         * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
1695
         * map. See {@link PersonCollectionCreateParams.Documents.Passport#extraParams} for the
1696
         * field documentation.
1697
         */
1698
        public Builder putAllExtraParam(Map<String, Object> map) {
1699
          if (this.extraParams == null) {
×
1700
            this.extraParams = new HashMap<>();
×
1701
          }
1702
          this.extraParams.putAll(map);
×
1703
          return this;
×
1704
        }
1705

1706
        /**
1707
         * Add an element to `files` list. A list is initialized for the first `add/addAll` call,
1708
         * and subsequent calls adds additional elements to the original list. See {@link
1709
         * PersonCollectionCreateParams.Documents.Passport#files} for the field documentation.
1710
         */
1711
        public Builder addFile(String element) {
1712
          if (this.files == null) {
×
1713
            this.files = new ArrayList<>();
×
1714
          }
1715
          this.files.add(element);
×
1716
          return this;
×
1717
        }
1718

1719
        /**
1720
         * Add all elements to `files` list. A list is initialized for the first `add/addAll` call,
1721
         * and subsequent calls adds additional elements to the original list. See {@link
1722
         * PersonCollectionCreateParams.Documents.Passport#files} for the field documentation.
1723
         */
1724
        public Builder addAllFile(List<String> elements) {
1725
          if (this.files == null) {
×
1726
            this.files = new ArrayList<>();
×
1727
          }
1728
          this.files.addAll(elements);
×
1729
          return this;
×
1730
        }
1731
      }
1732
    }
1733

1734
    @Getter
1735
    public static class Visa {
1736
      /**
1737
       * Map of extra parameters for custom features not available in this client library. The
1738
       * content in this map is not serialized under this field's {@code @SerializedName} value.
1739
       * Instead, each key/value pair is serialized as if the key is a root-level field (serialized)
1740
       * name in this param object. Effectively, this map is flattened to its parent instance.
1741
       */
1742
      @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
1743
      Map<String, Object> extraParams;
1744

1745
      /**
1746
       * One or more document ids returned by a <a
1747
       * href="https://stripe.com/docs/api#create_file">file upload</a> with a {@code purpose} value
1748
       * of {@code account_requirement}.
1749
       */
1750
      @SerializedName("files")
1751
      List<String> files;
1752

1753
      private Visa(Map<String, Object> extraParams, List<String> files) {
×
1754
        this.extraParams = extraParams;
×
1755
        this.files = files;
×
1756
      }
×
1757

1758
      public static Builder builder() {
1759
        return new Builder();
×
1760
      }
1761

1762
      public static class Builder {
×
1763
        private Map<String, Object> extraParams;
1764

1765
        private List<String> files;
1766

1767
        /** Finalize and obtain parameter instance from this builder. */
1768
        public PersonCollectionCreateParams.Documents.Visa build() {
1769
          return new PersonCollectionCreateParams.Documents.Visa(this.extraParams, this.files);
×
1770
        }
1771

1772
        /**
1773
         * Add a key/value pair to `extraParams` map. A map is initialized for the first
1774
         * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
1775
         * map. See {@link PersonCollectionCreateParams.Documents.Visa#extraParams} for the field
1776
         * documentation.
1777
         */
1778
        public Builder putExtraParam(String key, Object value) {
1779
          if (this.extraParams == null) {
×
1780
            this.extraParams = new HashMap<>();
×
1781
          }
1782
          this.extraParams.put(key, value);
×
1783
          return this;
×
1784
        }
1785

1786
        /**
1787
         * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
1788
         * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
1789
         * map. See {@link PersonCollectionCreateParams.Documents.Visa#extraParams} for the field
1790
         * documentation.
1791
         */
1792
        public Builder putAllExtraParam(Map<String, Object> map) {
1793
          if (this.extraParams == null) {
×
1794
            this.extraParams = new HashMap<>();
×
1795
          }
1796
          this.extraParams.putAll(map);
×
1797
          return this;
×
1798
        }
1799

1800
        /**
1801
         * Add an element to `files` list. A list is initialized for the first `add/addAll` call,
1802
         * and subsequent calls adds additional elements to the original list. See {@link
1803
         * PersonCollectionCreateParams.Documents.Visa#files} for the field documentation.
1804
         */
1805
        public Builder addFile(String element) {
1806
          if (this.files == null) {
×
1807
            this.files = new ArrayList<>();
×
1808
          }
1809
          this.files.add(element);
×
1810
          return this;
×
1811
        }
1812

1813
        /**
1814
         * Add all elements to `files` list. A list is initialized for the first `add/addAll` call,
1815
         * and subsequent calls adds additional elements to the original list. See {@link
1816
         * PersonCollectionCreateParams.Documents.Visa#files} for the field documentation.
1817
         */
1818
        public Builder addAllFile(List<String> elements) {
1819
          if (this.files == null) {
×
1820
            this.files = new ArrayList<>();
×
1821
          }
1822
          this.files.addAll(elements);
×
1823
          return this;
×
1824
        }
1825
      }
1826
    }
1827
  }
1828

1829
  @Getter
1830
  public static class RegisteredAddress {
1831
    /** City, district, suburb, town, or village. */
1832
    @SerializedName("city")
1833
    String city;
1834

1835
    /**
1836
     * Two-letter country code (<a href="https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2">ISO
1837
     * 3166-1 alpha-2</a>).
1838
     */
1839
    @SerializedName("country")
1840
    String country;
1841

1842
    /**
1843
     * Map of extra parameters for custom features not available in this client library. The content
1844
     * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each
1845
     * key/value pair is serialized as if the key is a root-level field (serialized) name in this
1846
     * param object. Effectively, this map is flattened to its parent instance.
1847
     */
1848
    @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
1849
    Map<String, Object> extraParams;
1850

1851
    /** Address line 1 (e.g., street, PO Box, or company name). */
1852
    @SerializedName("line1")
1853
    String line1;
1854

1855
    /** Address line 2 (e.g., apartment, suite, unit, or building). */
1856
    @SerializedName("line2")
1857
    String line2;
1858

1859
    /** ZIP or postal code. */
1860
    @SerializedName("postal_code")
1861
    String postalCode;
1862

1863
    /** State, county, province, or region. */
1864
    @SerializedName("state")
1865
    String state;
1866

1867
    private RegisteredAddress(
1868
        String city,
1869
        String country,
1870
        Map<String, Object> extraParams,
1871
        String line1,
1872
        String line2,
1873
        String postalCode,
1874
        String state) {
×
1875
      this.city = city;
×
1876
      this.country = country;
×
1877
      this.extraParams = extraParams;
×
1878
      this.line1 = line1;
×
1879
      this.line2 = line2;
×
1880
      this.postalCode = postalCode;
×
1881
      this.state = state;
×
1882
    }
×
1883

1884
    public static Builder builder() {
1885
      return new Builder();
×
1886
    }
1887

1888
    public static class Builder {
×
1889
      private String city;
1890

1891
      private String country;
1892

1893
      private Map<String, Object> extraParams;
1894

1895
      private String line1;
1896

1897
      private String line2;
1898

1899
      private String postalCode;
1900

1901
      private String state;
1902

1903
      /** Finalize and obtain parameter instance from this builder. */
1904
      public PersonCollectionCreateParams.RegisteredAddress build() {
1905
        return new PersonCollectionCreateParams.RegisteredAddress(
×
1906
            this.city,
1907
            this.country,
1908
            this.extraParams,
1909
            this.line1,
1910
            this.line2,
1911
            this.postalCode,
1912
            this.state);
1913
      }
1914

1915
      /** City, district, suburb, town, or village. */
1916
      public Builder setCity(String city) {
1917
        this.city = city;
×
1918
        return this;
×
1919
      }
1920

1921
      /**
1922
       * Two-letter country code (<a href="https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2">ISO
1923
       * 3166-1 alpha-2</a>).
1924
       */
1925
      public Builder setCountry(String country) {
1926
        this.country = country;
×
1927
        return this;
×
1928
      }
1929

1930
      /**
1931
       * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll`
1932
       * call, and subsequent calls add additional key/value pairs to the original map. See {@link
1933
       * PersonCollectionCreateParams.RegisteredAddress#extraParams} for the field documentation.
1934
       */
1935
      public Builder putExtraParam(String key, Object value) {
1936
        if (this.extraParams == null) {
×
1937
          this.extraParams = new HashMap<>();
×
1938
        }
1939
        this.extraParams.put(key, value);
×
1940
        return this;
×
1941
      }
1942

1943
      /**
1944
       * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
1945
       * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map.
1946
       * See {@link PersonCollectionCreateParams.RegisteredAddress#extraParams} for the field
1947
       * documentation.
1948
       */
1949
      public Builder putAllExtraParam(Map<String, Object> map) {
1950
        if (this.extraParams == null) {
×
1951
          this.extraParams = new HashMap<>();
×
1952
        }
1953
        this.extraParams.putAll(map);
×
1954
        return this;
×
1955
      }
1956

1957
      /** Address line 1 (e.g., street, PO Box, or company name). */
1958
      public Builder setLine1(String line1) {
1959
        this.line1 = line1;
×
1960
        return this;
×
1961
      }
1962

1963
      /** Address line 2 (e.g., apartment, suite, unit, or building). */
1964
      public Builder setLine2(String line2) {
1965
        this.line2 = line2;
×
1966
        return this;
×
1967
      }
1968

1969
      /** ZIP or postal code. */
1970
      public Builder setPostalCode(String postalCode) {
1971
        this.postalCode = postalCode;
×
1972
        return this;
×
1973
      }
1974

1975
      /** State, county, province, or region. */
1976
      public Builder setState(String state) {
1977
        this.state = state;
×
1978
        return this;
×
1979
      }
1980
    }
1981
  }
1982

1983
  @Getter
1984
  public static class Relationship {
1985
    /** Whether the person is the authorizer of the account's representative. */
1986
    @SerializedName("authorizer")
1987
    Boolean authorizer;
1988

1989
    /**
1990
     * Whether the person is a director of the account's legal entity. Directors are typically
1991
     * members of the governing board of the company, or responsible for ensuring the company meets
1992
     * its regulatory obligations.
1993
     */
1994
    @SerializedName("director")
1995
    Boolean director;
1996

1997
    /**
1998
     * Whether the person has significant responsibility to control, manage, or direct the
1999
     * organization.
2000
     */
2001
    @SerializedName("executive")
2002
    Boolean executive;
2003

2004
    /**
2005
     * Map of extra parameters for custom features not available in this client library. The content
2006
     * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each
2007
     * key/value pair is serialized as if the key is a root-level field (serialized) name in this
2008
     * param object. Effectively, this map is flattened to its parent instance.
2009
     */
2010
    @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
2011
    Map<String, Object> extraParams;
2012

2013
    /** Whether the person is the legal guardian of the account's representative. */
2014
    @SerializedName("legal_guardian")
2015
    Boolean legalGuardian;
2016

2017
    /** Whether the person is an owner of the account’s legal entity. */
2018
    @SerializedName("owner")
2019
    Boolean owner;
2020

2021
    /** The percent owned by the person of the account's legal entity. */
2022
    @SerializedName("percent_ownership")
2023
    Object percentOwnership;
2024

2025
    /**
2026
     * Whether the person is authorized as the primary representative of the account. This is the
2027
     * person nominated by the business to provide information about themselves, and general
2028
     * information about the account. There can only be one representative at any given time. At the
2029
     * time the account is created, this person should be set to the person responsible for opening
2030
     * the account.
2031
     */
2032
    @SerializedName("representative")
2033
    Boolean representative;
2034

2035
    /** The person's title (e.g., CEO, Support Engineer). */
2036
    @SerializedName("title")
2037
    String title;
2038

2039
    private Relationship(
2040
        Boolean authorizer,
2041
        Boolean director,
2042
        Boolean executive,
2043
        Map<String, Object> extraParams,
2044
        Boolean legalGuardian,
2045
        Boolean owner,
2046
        Object percentOwnership,
2047
        Boolean representative,
2048
        String title) {
×
NEW
2049
      this.authorizer = authorizer;
×
2050
      this.director = director;
×
2051
      this.executive = executive;
×
2052
      this.extraParams = extraParams;
×
2053
      this.legalGuardian = legalGuardian;
×
2054
      this.owner = owner;
×
2055
      this.percentOwnership = percentOwnership;
×
2056
      this.representative = representative;
×
2057
      this.title = title;
×
2058
    }
×
2059

2060
    public static Builder builder() {
2061
      return new Builder();
×
2062
    }
2063

2064
    public static class Builder {
×
2065
      private Boolean authorizer;
2066

2067
      private Boolean director;
2068

2069
      private Boolean executive;
2070

2071
      private Map<String, Object> extraParams;
2072

2073
      private Boolean legalGuardian;
2074

2075
      private Boolean owner;
2076

2077
      private Object percentOwnership;
2078

2079
      private Boolean representative;
2080

2081
      private String title;
2082

2083
      /** Finalize and obtain parameter instance from this builder. */
2084
      public PersonCollectionCreateParams.Relationship build() {
2085
        return new PersonCollectionCreateParams.Relationship(
×
2086
            this.authorizer,
2087
            this.director,
2088
            this.executive,
2089
            this.extraParams,
2090
            this.legalGuardian,
2091
            this.owner,
2092
            this.percentOwnership,
2093
            this.representative,
2094
            this.title);
2095
      }
2096

2097
      /** Whether the person is the authorizer of the account's representative. */
2098
      public Builder setAuthorizer(Boolean authorizer) {
NEW
2099
        this.authorizer = authorizer;
×
NEW
2100
        return this;
×
2101
      }
2102

2103
      /**
2104
       * Whether the person is a director of the account's legal entity. Directors are typically
2105
       * members of the governing board of the company, or responsible for ensuring the company
2106
       * meets its regulatory obligations.
2107
       */
2108
      public Builder setDirector(Boolean director) {
2109
        this.director = director;
×
2110
        return this;
×
2111
      }
2112

2113
      /**
2114
       * Whether the person has significant responsibility to control, manage, or direct the
2115
       * organization.
2116
       */
2117
      public Builder setExecutive(Boolean executive) {
2118
        this.executive = executive;
×
2119
        return this;
×
2120
      }
2121

2122
      /**
2123
       * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll`
2124
       * call, and subsequent calls add additional key/value pairs to the original map. See {@link
2125
       * PersonCollectionCreateParams.Relationship#extraParams} for the field documentation.
2126
       */
2127
      public Builder putExtraParam(String key, Object value) {
2128
        if (this.extraParams == null) {
×
2129
          this.extraParams = new HashMap<>();
×
2130
        }
2131
        this.extraParams.put(key, value);
×
2132
        return this;
×
2133
      }
2134

2135
      /**
2136
       * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
2137
       * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map.
2138
       * See {@link PersonCollectionCreateParams.Relationship#extraParams} for the field
2139
       * documentation.
2140
       */
2141
      public Builder putAllExtraParam(Map<String, Object> map) {
2142
        if (this.extraParams == null) {
×
2143
          this.extraParams = new HashMap<>();
×
2144
        }
2145
        this.extraParams.putAll(map);
×
2146
        return this;
×
2147
      }
2148

2149
      /** Whether the person is the legal guardian of the account's representative. */
2150
      public Builder setLegalGuardian(Boolean legalGuardian) {
2151
        this.legalGuardian = legalGuardian;
×
2152
        return this;
×
2153
      }
2154

2155
      /** Whether the person is an owner of the account’s legal entity. */
2156
      public Builder setOwner(Boolean owner) {
2157
        this.owner = owner;
×
2158
        return this;
×
2159
      }
2160

2161
      /** The percent owned by the person of the account's legal entity. */
2162
      public Builder setPercentOwnership(BigDecimal percentOwnership) {
2163
        this.percentOwnership = percentOwnership;
×
2164
        return this;
×
2165
      }
2166

2167
      /** The percent owned by the person of the account's legal entity. */
2168
      public Builder setPercentOwnership(EmptyParam percentOwnership) {
2169
        this.percentOwnership = percentOwnership;
×
2170
        return this;
×
2171
      }
2172

2173
      /**
2174
       * Whether the person is authorized as the primary representative of the account. This is the
2175
       * person nominated by the business to provide information about themselves, and general
2176
       * information about the account. There can only be one representative at any given time. At
2177
       * the time the account is created, this person should be set to the person responsible for
2178
       * opening the account.
2179
       */
2180
      public Builder setRepresentative(Boolean representative) {
2181
        this.representative = representative;
×
2182
        return this;
×
2183
      }
2184

2185
      /** The person's title (e.g., CEO, Support Engineer). */
2186
      public Builder setTitle(String title) {
2187
        this.title = title;
×
2188
        return this;
×
2189
      }
2190
    }
2191
  }
2192

2193
  @Getter
2194
  public static class Verification {
2195
    /**
2196
     * A document showing address, either a passport, local ID card, or utility bill from a
2197
     * well-known utility company.
2198
     */
2199
    @SerializedName("additional_document")
2200
    AdditionalDocument additionalDocument;
2201

2202
    /** An identifying document, either a passport or local ID card. */
2203
    @SerializedName("document")
2204
    Document document;
2205

2206
    /**
2207
     * Map of extra parameters for custom features not available in this client library. The content
2208
     * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each
2209
     * key/value pair is serialized as if the key is a root-level field (serialized) name in this
2210
     * param object. Effectively, this map is flattened to its parent instance.
2211
     */
2212
    @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
2213
    Map<String, Object> extraParams;
2214

2215
    private Verification(
2216
        AdditionalDocument additionalDocument, Document document, Map<String, Object> extraParams) {
×
2217
      this.additionalDocument = additionalDocument;
×
2218
      this.document = document;
×
2219
      this.extraParams = extraParams;
×
2220
    }
×
2221

2222
    public static Builder builder() {
2223
      return new Builder();
×
2224
    }
2225

2226
    public static class Builder {
×
2227
      private AdditionalDocument additionalDocument;
2228

2229
      private Document document;
2230

2231
      private Map<String, Object> extraParams;
2232

2233
      /** Finalize and obtain parameter instance from this builder. */
2234
      public PersonCollectionCreateParams.Verification build() {
2235
        return new PersonCollectionCreateParams.Verification(
×
2236
            this.additionalDocument, this.document, this.extraParams);
2237
      }
2238

2239
      /**
2240
       * A document showing address, either a passport, local ID card, or utility bill from a
2241
       * well-known utility company.
2242
       */
2243
      public Builder setAdditionalDocument(
2244
          PersonCollectionCreateParams.Verification.AdditionalDocument additionalDocument) {
2245
        this.additionalDocument = additionalDocument;
×
2246
        return this;
×
2247
      }
2248

2249
      /** An identifying document, either a passport or local ID card. */
2250
      public Builder setDocument(PersonCollectionCreateParams.Verification.Document document) {
2251
        this.document = document;
×
2252
        return this;
×
2253
      }
2254

2255
      /**
2256
       * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll`
2257
       * call, and subsequent calls add additional key/value pairs to the original map. See {@link
2258
       * PersonCollectionCreateParams.Verification#extraParams} for the field documentation.
2259
       */
2260
      public Builder putExtraParam(String key, Object value) {
2261
        if (this.extraParams == null) {
×
2262
          this.extraParams = new HashMap<>();
×
2263
        }
2264
        this.extraParams.put(key, value);
×
2265
        return this;
×
2266
      }
2267

2268
      /**
2269
       * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
2270
       * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map.
2271
       * See {@link PersonCollectionCreateParams.Verification#extraParams} for the field
2272
       * documentation.
2273
       */
2274
      public Builder putAllExtraParam(Map<String, Object> map) {
2275
        if (this.extraParams == null) {
×
2276
          this.extraParams = new HashMap<>();
×
2277
        }
2278
        this.extraParams.putAll(map);
×
2279
        return this;
×
2280
      }
2281
    }
2282

2283
    @Getter
2284
    public static class AdditionalDocument {
2285
      /**
2286
       * The back of an ID returned by a <a href="https://stripe.com/docs/api#create_file">file
2287
       * upload</a> with a {@code purpose} value of {@code identity_document}. The uploaded file
2288
       * needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format,
2289
       * and less than 10 MB in size.
2290
       */
2291
      @SerializedName("back")
2292
      String back;
2293

2294
      /**
2295
       * Map of extra parameters for custom features not available in this client library. The
2296
       * content in this map is not serialized under this field's {@code @SerializedName} value.
2297
       * Instead, each key/value pair is serialized as if the key is a root-level field (serialized)
2298
       * name in this param object. Effectively, this map is flattened to its parent instance.
2299
       */
2300
      @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
2301
      Map<String, Object> extraParams;
2302

2303
      /**
2304
       * The front of an ID returned by a <a href="https://stripe.com/docs/api#create_file">file
2305
       * upload</a> with a {@code purpose} value of {@code identity_document}. The uploaded file
2306
       * needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format,
2307
       * and less than 10 MB in size.
2308
       */
2309
      @SerializedName("front")
2310
      String front;
2311

2312
      private AdditionalDocument(String back, Map<String, Object> extraParams, String front) {
×
2313
        this.back = back;
×
2314
        this.extraParams = extraParams;
×
2315
        this.front = front;
×
2316
      }
×
2317

2318
      public static Builder builder() {
2319
        return new Builder();
×
2320
      }
2321

2322
      public static class Builder {
×
2323
        private String back;
2324

2325
        private Map<String, Object> extraParams;
2326

2327
        private String front;
2328

2329
        /** Finalize and obtain parameter instance from this builder. */
2330
        public PersonCollectionCreateParams.Verification.AdditionalDocument build() {
2331
          return new PersonCollectionCreateParams.Verification.AdditionalDocument(
×
2332
              this.back, this.extraParams, this.front);
2333
        }
2334

2335
        /**
2336
         * The back of an ID returned by a <a href="https://stripe.com/docs/api#create_file">file
2337
         * upload</a> with a {@code purpose} value of {@code identity_document}. The uploaded file
2338
         * needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format,
2339
         * and less than 10 MB in size.
2340
         */
2341
        public Builder setBack(String back) {
2342
          this.back = back;
×
2343
          return this;
×
2344
        }
2345

2346
        /**
2347
         * Add a key/value pair to `extraParams` map. A map is initialized for the first
2348
         * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
2349
         * map. See {@link PersonCollectionCreateParams.Verification.AdditionalDocument#extraParams}
2350
         * for the field documentation.
2351
         */
2352
        public Builder putExtraParam(String key, Object value) {
2353
          if (this.extraParams == null) {
×
2354
            this.extraParams = new HashMap<>();
×
2355
          }
2356
          this.extraParams.put(key, value);
×
2357
          return this;
×
2358
        }
2359

2360
        /**
2361
         * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
2362
         * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
2363
         * map. See {@link PersonCollectionCreateParams.Verification.AdditionalDocument#extraParams}
2364
         * for the field documentation.
2365
         */
2366
        public Builder putAllExtraParam(Map<String, Object> map) {
2367
          if (this.extraParams == null) {
×
2368
            this.extraParams = new HashMap<>();
×
2369
          }
2370
          this.extraParams.putAll(map);
×
2371
          return this;
×
2372
        }
2373

2374
        /**
2375
         * The front of an ID returned by a <a href="https://stripe.com/docs/api#create_file">file
2376
         * upload</a> with a {@code purpose} value of {@code identity_document}. The uploaded file
2377
         * needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format,
2378
         * and less than 10 MB in size.
2379
         */
2380
        public Builder setFront(String front) {
2381
          this.front = front;
×
2382
          return this;
×
2383
        }
2384
      }
2385
    }
2386

2387
    @Getter
2388
    public static class Document {
2389
      /**
2390
       * The back of an ID returned by a <a href="https://stripe.com/docs/api#create_file">file
2391
       * upload</a> with a {@code purpose} value of {@code identity_document}. The uploaded file
2392
       * needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format,
2393
       * and less than 10 MB in size.
2394
       */
2395
      @SerializedName("back")
2396
      String back;
2397

2398
      /**
2399
       * Map of extra parameters for custom features not available in this client library. The
2400
       * content in this map is not serialized under this field's {@code @SerializedName} value.
2401
       * Instead, each key/value pair is serialized as if the key is a root-level field (serialized)
2402
       * name in this param object. Effectively, this map is flattened to its parent instance.
2403
       */
2404
      @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
2405
      Map<String, Object> extraParams;
2406

2407
      /**
2408
       * The front of an ID returned by a <a href="https://stripe.com/docs/api#create_file">file
2409
       * upload</a> with a {@code purpose} value of {@code identity_document}. The uploaded file
2410
       * needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format,
2411
       * and less than 10 MB in size.
2412
       */
2413
      @SerializedName("front")
2414
      String front;
2415

2416
      private Document(String back, Map<String, Object> extraParams, String front) {
×
2417
        this.back = back;
×
2418
        this.extraParams = extraParams;
×
2419
        this.front = front;
×
2420
      }
×
2421

2422
      public static Builder builder() {
2423
        return new Builder();
×
2424
      }
2425

2426
      public static class Builder {
×
2427
        private String back;
2428

2429
        private Map<String, Object> extraParams;
2430

2431
        private String front;
2432

2433
        /** Finalize and obtain parameter instance from this builder. */
2434
        public PersonCollectionCreateParams.Verification.Document build() {
2435
          return new PersonCollectionCreateParams.Verification.Document(
×
2436
              this.back, this.extraParams, this.front);
2437
        }
2438

2439
        /**
2440
         * The back of an ID returned by a <a href="https://stripe.com/docs/api#create_file">file
2441
         * upload</a> with a {@code purpose} value of {@code identity_document}. The uploaded file
2442
         * needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format,
2443
         * and less than 10 MB in size.
2444
         */
2445
        public Builder setBack(String back) {
2446
          this.back = back;
×
2447
          return this;
×
2448
        }
2449

2450
        /**
2451
         * Add a key/value pair to `extraParams` map. A map is initialized for the first
2452
         * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
2453
         * map. See {@link PersonCollectionCreateParams.Verification.Document#extraParams} for the
2454
         * field documentation.
2455
         */
2456
        public Builder putExtraParam(String key, Object value) {
2457
          if (this.extraParams == null) {
×
2458
            this.extraParams = new HashMap<>();
×
2459
          }
2460
          this.extraParams.put(key, value);
×
2461
          return this;
×
2462
        }
2463

2464
        /**
2465
         * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
2466
         * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
2467
         * map. See {@link PersonCollectionCreateParams.Verification.Document#extraParams} for the
2468
         * field documentation.
2469
         */
2470
        public Builder putAllExtraParam(Map<String, Object> map) {
2471
          if (this.extraParams == null) {
×
2472
            this.extraParams = new HashMap<>();
×
2473
          }
2474
          this.extraParams.putAll(map);
×
2475
          return this;
×
2476
        }
2477

2478
        /**
2479
         * The front of an ID returned by a <a href="https://stripe.com/docs/api#create_file">file
2480
         * upload</a> with a {@code purpose} value of {@code identity_document}. The uploaded file
2481
         * needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format,
2482
         * and less than 10 MB in size.
2483
         */
2484
        public Builder setFront(String front) {
2485
          this.front = front;
×
2486
          return this;
×
2487
        }
2488
      }
2489
    }
2490
  }
2491
}
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