• 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/AccountPersonCreateParams.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 AccountPersonCreateParams 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 AccountPersonCreateParams(
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 AccountPersonCreateParams build() {
295
      return new AccountPersonCreateParams(
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
        AccountPersonCreateParams.AdditionalTosAcceptances additionalTosAcceptances) {
332
      this.additionalTosAcceptances = additionalTosAcceptances;
×
333
      return this;
×
334
    }
335

336
    /** The person's address. */
337
    public Builder setAddress(AccountPersonCreateParams.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(AccountPersonCreateParams.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(AccountPersonCreateParams.AddressKanji addressKanji) {
350
      this.addressKanji = addressKanji;
×
351
      return this;
×
352
    }
353

354
    /** The person's date of birth. */
355
    public Builder setDob(AccountPersonCreateParams.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(AccountPersonCreateParams.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
     * AccountPersonCreateParams#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
     * AccountPersonCreateParams#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
     * AccountPersonCreateParams#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 AccountPersonCreateParams#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
     * AccountPersonCreateParams#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
     * AccountPersonCreateParams#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
     * AccountPersonCreateParams#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 AccountPersonCreateParams#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
        AccountPersonCreateParams.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(AccountPersonCreateParams.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(AccountPersonCreateParams.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 AccountPersonCreateParams.AdditionalTosAcceptances build() {
686
        return new AccountPersonCreateParams.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
          AccountPersonCreateParams.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
       * AccountPersonCreateParams.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 AccountPersonCreateParams.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 AccountPersonCreateParams.AdditionalTosAcceptances.Account build() {
776
          return new AccountPersonCreateParams.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 AccountPersonCreateParams.AdditionalTosAcceptances.Account#extraParams}
793
         * for the field documentation.
794
         */
795
        public Builder putExtraParam(String key, Object value) {
796
          if (this.extraParams == null) {
×
797
            this.extraParams = new HashMap<>();
×
798
          }
799
          this.extraParams.put(key, value);
×
800
          return this;
×
801
        }
802

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

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

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

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

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

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

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

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

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

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

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

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

899
    public static Builder builder() {
900
      return new Builder();
×
901
    }
902

903
    public static class Builder {
×
904
      private String city;
905

906
      private String country;
907

908
      private Map<String, Object> extraParams;
909

910
      private String line1;
911

912
      private String line2;
913

914
      private String postalCode;
915

916
      private String state;
917

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

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

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

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

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

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

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

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

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

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

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

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

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

1023
    /** Building details. */
1024
    @SerializedName("line2")
1025
    String line2;
1026

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

1031
    /** Prefecture. */
1032
    @SerializedName("state")
1033
    String state;
1034

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

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

1058
    public static Builder builder() {
1059
      return new Builder();
×
1060
    }
1061

1062
    public static class Builder {
×
1063
      private String city;
1064

1065
      private String country;
1066

1067
      private Map<String, Object> extraParams;
1068

1069
      private String line1;
1070

1071
      private String line2;
1072

1073
      private String postalCode;
1074

1075
      private String state;
1076

1077
      private String town;
1078

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

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

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

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

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

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

1139
      /** Building details. */
1140
      public Builder setLine2(String line2) {
1141
        this.line2 = line2;
×
1142
        return this;
×
1143
      }
1144

1145
      /** Postal code. */
1146
      public Builder setPostalCode(String postalCode) {
1147
        this.postalCode = postalCode;
×
1148
        return this;
×
1149
      }
1150

1151
      /** Prefecture. */
1152
      public Builder setState(String state) {
1153
        this.state = state;
×
1154
        return this;
×
1155
      }
1156

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

1165
  @Getter
1166
  public static class AddressKanji {
1167
    /** City or ward. */
1168
    @SerializedName("city")
1169
    String city;
1170

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

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

1187
    /** Block or building number. */
1188
    @SerializedName("line1")
1189
    String line1;
1190

1191
    /** Building details. */
1192
    @SerializedName("line2")
1193
    String line2;
1194

1195
    /** Postal code. */
1196
    @SerializedName("postal_code")
1197
    String postalCode;
1198

1199
    /** Prefecture. */
1200
    @SerializedName("state")
1201
    String state;
1202

1203
    /** Town or cho-me. */
1204
    @SerializedName("town")
1205
    String town;
1206

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

1226
    public static Builder builder() {
1227
      return new Builder();
×
1228
    }
1229

1230
    public static class Builder {
×
1231
      private String city;
1232

1233
      private String country;
1234

1235
      private Map<String, Object> extraParams;
1236

1237
      private String line1;
1238

1239
      private String line2;
1240

1241
      private String postalCode;
1242

1243
      private String state;
1244

1245
      private String town;
1246

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

1260
      /** City or ward. */
1261
      public Builder setCity(String city) {
1262
        this.city = city;
×
1263
        return this;
×
1264
      }
1265

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

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

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

1301
      /** Block or building number. */
1302
      public Builder setLine1(String line1) {
1303
        this.line1 = line1;
×
1304
        return this;
×
1305
      }
1306

1307
      /** Building details. */
1308
      public Builder setLine2(String line2) {
1309
        this.line2 = line2;
×
1310
        return this;
×
1311
      }
1312

1313
      /** Postal code. */
1314
      public Builder setPostalCode(String postalCode) {
1315
        this.postalCode = postalCode;
×
1316
        return this;
×
1317
      }
1318

1319
      /** Prefecture. */
1320
      public Builder setState(String state) {
1321
        this.state = state;
×
1322
        return this;
×
1323
      }
1324

1325
      /** Town or cho-me. */
1326
      public Builder setTown(String town) {
1327
        this.town = town;
×
1328
        return this;
×
1329
      }
1330
    }
1331
  }
1332

1333
  @Getter
1334
  public static class Dob {
1335
    /** <strong>Required.</strong> The day of birth, between 1 and 31. */
1336
    @SerializedName("day")
1337
    Long day;
1338

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

1348
    /** <strong>Required.</strong> The month of birth, between 1 and 12. */
1349
    @SerializedName("month")
1350
    Long month;
1351

1352
    /** <strong>Required.</strong> The four-digit year of birth. */
1353
    @SerializedName("year")
1354
    Long year;
1355

1356
    private Dob(Long day, Map<String, Object> extraParams, Long month, Long year) {
×
1357
      this.day = day;
×
1358
      this.extraParams = extraParams;
×
1359
      this.month = month;
×
1360
      this.year = year;
×
1361
    }
×
1362

1363
    public static Builder builder() {
1364
      return new Builder();
×
1365
    }
1366

1367
    public static class Builder {
×
1368
      private Long day;
1369

1370
      private Map<String, Object> extraParams;
1371

1372
      private Long month;
1373

1374
      private Long year;
1375

1376
      /** Finalize and obtain parameter instance from this builder. */
1377
      public AccountPersonCreateParams.Dob build() {
1378
        return new AccountPersonCreateParams.Dob(this.day, this.extraParams, this.month, this.year);
×
1379
      }
1380

1381
      /** <strong>Required.</strong> The day of birth, between 1 and 31. */
1382
      public Builder setDay(Long day) {
1383
        this.day = day;
×
1384
        return this;
×
1385
      }
1386

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

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

1413
      /** <strong>Required.</strong> The month of birth, between 1 and 12. */
1414
      public Builder setMonth(Long month) {
1415
        this.month = month;
×
1416
        return this;
×
1417
      }
1418

1419
      /** <strong>Required.</strong> The four-digit year of birth. */
1420
      public Builder setYear(Long year) {
1421
        this.year = year;
×
1422
        return this;
×
1423
      }
1424
    }
1425
  }
1426

1427
  @Getter
1428
  public static class Documents {
1429
    /**
1430
     * One or more documents that demonstrate proof that this person is authorized to represent the
1431
     * company.
1432
     */
1433
    @SerializedName("company_authorization")
1434
    CompanyAuthorization companyAuthorization;
1435

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

1445
    /** One or more documents showing the person's passport page with photo and personal data. */
1446
    @SerializedName("passport")
1447
    Passport passport;
1448

1449
    /**
1450
     * One or more documents showing the person's visa required for living in the country where they
1451
     * are residing.
1452
     */
1453
    @SerializedName("visa")
1454
    Visa visa;
1455

1456
    private Documents(
1457
        CompanyAuthorization companyAuthorization,
1458
        Map<String, Object> extraParams,
1459
        Passport passport,
1460
        Visa visa) {
×
1461
      this.companyAuthorization = companyAuthorization;
×
1462
      this.extraParams = extraParams;
×
1463
      this.passport = passport;
×
1464
      this.visa = visa;
×
1465
    }
×
1466

1467
    public static Builder builder() {
1468
      return new Builder();
×
1469
    }
1470

1471
    public static class Builder {
×
1472
      private CompanyAuthorization companyAuthorization;
1473

1474
      private Map<String, Object> extraParams;
1475

1476
      private Passport passport;
1477

1478
      private Visa visa;
1479

1480
      /** Finalize and obtain parameter instance from this builder. */
1481
      public AccountPersonCreateParams.Documents build() {
1482
        return new AccountPersonCreateParams.Documents(
×
1483
            this.companyAuthorization, this.extraParams, this.passport, this.visa);
1484
      }
1485

1486
      /**
1487
       * One or more documents that demonstrate proof that this person is authorized to represent
1488
       * the company.
1489
       */
1490
      public Builder setCompanyAuthorization(
1491
          AccountPersonCreateParams.Documents.CompanyAuthorization companyAuthorization) {
1492
        this.companyAuthorization = companyAuthorization;
×
1493
        return this;
×
1494
      }
1495

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

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

1522
      /** One or more documents showing the person's passport page with photo and personal data. */
1523
      public Builder setPassport(AccountPersonCreateParams.Documents.Passport passport) {
1524
        this.passport = passport;
×
1525
        return this;
×
1526
      }
1527

1528
      /**
1529
       * One or more documents showing the person's visa required for living in the country where
1530
       * they are residing.
1531
       */
1532
      public Builder setVisa(AccountPersonCreateParams.Documents.Visa visa) {
1533
        this.visa = visa;
×
1534
        return this;
×
1535
      }
1536
    }
1537

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

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

1557
      private CompanyAuthorization(Map<String, Object> extraParams, List<String> files) {
×
1558
        this.extraParams = extraParams;
×
1559
        this.files = files;
×
1560
      }
×
1561

1562
      public static Builder builder() {
1563
        return new Builder();
×
1564
      }
1565

1566
      public static class Builder {
×
1567
        private Map<String, Object> extraParams;
1568

1569
        private List<String> files;
1570

1571
        /** Finalize and obtain parameter instance from this builder. */
1572
        public AccountPersonCreateParams.Documents.CompanyAuthorization build() {
1573
          return new AccountPersonCreateParams.Documents.CompanyAuthorization(
×
1574
              this.extraParams, this.files);
1575
        }
1576

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

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

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

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

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

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

1654
      private Passport(Map<String, Object> extraParams, List<String> files) {
×
1655
        this.extraParams = extraParams;
×
1656
        this.files = files;
×
1657
      }
×
1658

1659
      public static Builder builder() {
1660
        return new Builder();
×
1661
      }
1662

1663
      public static class Builder {
×
1664
        private Map<String, Object> extraParams;
1665

1666
        private List<String> files;
1667

1668
        /** Finalize and obtain parameter instance from this builder. */
1669
        public AccountPersonCreateParams.Documents.Passport build() {
1670
          return new AccountPersonCreateParams.Documents.Passport(this.extraParams, this.files);
×
1671
        }
1672

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

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

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

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

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

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

1748
      private Visa(Map<String, Object> extraParams, List<String> files) {
×
1749
        this.extraParams = extraParams;
×
1750
        this.files = files;
×
1751
      }
×
1752

1753
      public static Builder builder() {
1754
        return new Builder();
×
1755
      }
1756

1757
      public static class Builder {
×
1758
        private Map<String, Object> extraParams;
1759

1760
        private List<String> files;
1761

1762
        /** Finalize and obtain parameter instance from this builder. */
1763
        public AccountPersonCreateParams.Documents.Visa build() {
1764
          return new AccountPersonCreateParams.Documents.Visa(this.extraParams, this.files);
×
1765
        }
1766

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

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

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

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

1824
  @Getter
1825
  public static class RegisteredAddress {
1826
    /** City, district, suburb, town, or village. */
1827
    @SerializedName("city")
1828
    String city;
1829

1830
    /**
1831
     * Two-letter country code (<a href="https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2">ISO
1832
     * 3166-1 alpha-2</a>).
1833
     */
1834
    @SerializedName("country")
1835
    String country;
1836

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

1846
    /** Address line 1 (e.g., street, PO Box, or company name). */
1847
    @SerializedName("line1")
1848
    String line1;
1849

1850
    /** Address line 2 (e.g., apartment, suite, unit, or building). */
1851
    @SerializedName("line2")
1852
    String line2;
1853

1854
    /** ZIP or postal code. */
1855
    @SerializedName("postal_code")
1856
    String postalCode;
1857

1858
    /** State, county, province, or region. */
1859
    @SerializedName("state")
1860
    String state;
1861

1862
    private RegisteredAddress(
1863
        String city,
1864
        String country,
1865
        Map<String, Object> extraParams,
1866
        String line1,
1867
        String line2,
1868
        String postalCode,
1869
        String state) {
×
1870
      this.city = city;
×
1871
      this.country = country;
×
1872
      this.extraParams = extraParams;
×
1873
      this.line1 = line1;
×
1874
      this.line2 = line2;
×
1875
      this.postalCode = postalCode;
×
1876
      this.state = state;
×
1877
    }
×
1878

1879
    public static Builder builder() {
1880
      return new Builder();
×
1881
    }
1882

1883
    public static class Builder {
×
1884
      private String city;
1885

1886
      private String country;
1887

1888
      private Map<String, Object> extraParams;
1889

1890
      private String line1;
1891

1892
      private String line2;
1893

1894
      private String postalCode;
1895

1896
      private String state;
1897

1898
      /** Finalize and obtain parameter instance from this builder. */
1899
      public AccountPersonCreateParams.RegisteredAddress build() {
1900
        return new AccountPersonCreateParams.RegisteredAddress(
×
1901
            this.city,
1902
            this.country,
1903
            this.extraParams,
1904
            this.line1,
1905
            this.line2,
1906
            this.postalCode,
1907
            this.state);
1908
      }
1909

1910
      /** City, district, suburb, town, or village. */
1911
      public Builder setCity(String city) {
1912
        this.city = city;
×
1913
        return this;
×
1914
      }
1915

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

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

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

1952
      /** Address line 1 (e.g., street, PO Box, or company name). */
1953
      public Builder setLine1(String line1) {
1954
        this.line1 = line1;
×
1955
        return this;
×
1956
      }
1957

1958
      /** Address line 2 (e.g., apartment, suite, unit, or building). */
1959
      public Builder setLine2(String line2) {
1960
        this.line2 = line2;
×
1961
        return this;
×
1962
      }
1963

1964
      /** ZIP or postal code. */
1965
      public Builder setPostalCode(String postalCode) {
1966
        this.postalCode = postalCode;
×
1967
        return this;
×
1968
      }
1969

1970
      /** State, county, province, or region. */
1971
      public Builder setState(String state) {
1972
        this.state = state;
×
1973
        return this;
×
1974
      }
1975
    }
1976
  }
1977

1978
  @Getter
1979
  public static class Relationship {
1980
    /** Whether the person is the authorizer of the account's representative. */
1981
    @SerializedName("authorizer")
1982
    Boolean authorizer;
1983

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

1992
    /**
1993
     * Whether the person has significant responsibility to control, manage, or direct the
1994
     * organization.
1995
     */
1996
    @SerializedName("executive")
1997
    Boolean executive;
1998

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

2008
    /** Whether the person is the legal guardian of the account's representative. */
2009
    @SerializedName("legal_guardian")
2010
    Boolean legalGuardian;
2011

2012
    /** Whether the person is an owner of the account’s legal entity. */
2013
    @SerializedName("owner")
2014
    Boolean owner;
2015

2016
    /** The percent owned by the person of the account's legal entity. */
2017
    @SerializedName("percent_ownership")
2018
    Object percentOwnership;
2019

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

2030
    /** The person's title (e.g., CEO, Support Engineer). */
2031
    @SerializedName("title")
2032
    String title;
2033

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

2055
    public static Builder builder() {
2056
      return new Builder();
×
2057
    }
2058

2059
    public static class Builder {
×
2060
      private Boolean authorizer;
2061

2062
      private Boolean director;
2063

2064
      private Boolean executive;
2065

2066
      private Map<String, Object> extraParams;
2067

2068
      private Boolean legalGuardian;
2069

2070
      private Boolean owner;
2071

2072
      private Object percentOwnership;
2073

2074
      private Boolean representative;
2075

2076
      private String title;
2077

2078
      /** Finalize and obtain parameter instance from this builder. */
2079
      public AccountPersonCreateParams.Relationship build() {
2080
        return new AccountPersonCreateParams.Relationship(
×
2081
            this.authorizer,
2082
            this.director,
2083
            this.executive,
2084
            this.extraParams,
2085
            this.legalGuardian,
2086
            this.owner,
2087
            this.percentOwnership,
2088
            this.representative,
2089
            this.title);
2090
      }
2091

2092
      /** Whether the person is the authorizer of the account's representative. */
2093
      public Builder setAuthorizer(Boolean authorizer) {
NEW
2094
        this.authorizer = authorizer;
×
NEW
2095
        return this;
×
2096
      }
2097

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

2108
      /**
2109
       * Whether the person has significant responsibility to control, manage, or direct the
2110
       * organization.
2111
       */
2112
      public Builder setExecutive(Boolean executive) {
2113
        this.executive = executive;
×
2114
        return this;
×
2115
      }
2116

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

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

2143
      /** Whether the person is the legal guardian of the account's representative. */
2144
      public Builder setLegalGuardian(Boolean legalGuardian) {
2145
        this.legalGuardian = legalGuardian;
×
2146
        return this;
×
2147
      }
2148

2149
      /** Whether the person is an owner of the account’s legal entity. */
2150
      public Builder setOwner(Boolean owner) {
2151
        this.owner = owner;
×
2152
        return this;
×
2153
      }
2154

2155
      /** The percent owned by the person of the account's legal entity. */
2156
      public Builder setPercentOwnership(BigDecimal percentOwnership) {
2157
        this.percentOwnership = percentOwnership;
×
2158
        return this;
×
2159
      }
2160

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

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

2179
      /** The person's title (e.g., CEO, Support Engineer). */
2180
      public Builder setTitle(String title) {
2181
        this.title = title;
×
2182
        return this;
×
2183
      }
2184
    }
2185
  }
2186

2187
  @Getter
2188
  public static class Verification {
2189
    /**
2190
     * A document showing address, either a passport, local ID card, or utility bill from a
2191
     * well-known utility company.
2192
     */
2193
    @SerializedName("additional_document")
2194
    AdditionalDocument additionalDocument;
2195

2196
    /** An identifying document, either a passport or local ID card. */
2197
    @SerializedName("document")
2198
    Document document;
2199

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

2209
    private Verification(
2210
        AdditionalDocument additionalDocument, Document document, Map<String, Object> extraParams) {
×
2211
      this.additionalDocument = additionalDocument;
×
2212
      this.document = document;
×
2213
      this.extraParams = extraParams;
×
2214
    }
×
2215

2216
    public static Builder builder() {
2217
      return new Builder();
×
2218
    }
2219

2220
    public static class Builder {
×
2221
      private AdditionalDocument additionalDocument;
2222

2223
      private Document document;
2224

2225
      private Map<String, Object> extraParams;
2226

2227
      /** Finalize and obtain parameter instance from this builder. */
2228
      public AccountPersonCreateParams.Verification build() {
2229
        return new AccountPersonCreateParams.Verification(
×
2230
            this.additionalDocument, this.document, this.extraParams);
2231
      }
2232

2233
      /**
2234
       * A document showing address, either a passport, local ID card, or utility bill from a
2235
       * well-known utility company.
2236
       */
2237
      public Builder setAdditionalDocument(
2238
          AccountPersonCreateParams.Verification.AdditionalDocument additionalDocument) {
2239
        this.additionalDocument = additionalDocument;
×
2240
        return this;
×
2241
      }
2242

2243
      /** An identifying document, either a passport or local ID card. */
2244
      public Builder setDocument(AccountPersonCreateParams.Verification.Document document) {
2245
        this.document = document;
×
2246
        return this;
×
2247
      }
2248

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

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

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

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

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

2305
      private AdditionalDocument(String back, Map<String, Object> extraParams, String front) {
×
2306
        this.back = back;
×
2307
        this.extraParams = extraParams;
×
2308
        this.front = front;
×
2309
      }
×
2310

2311
      public static Builder builder() {
2312
        return new Builder();
×
2313
      }
2314

2315
      public static class Builder {
×
2316
        private String back;
2317

2318
        private Map<String, Object> extraParams;
2319

2320
        private String front;
2321

2322
        /** Finalize and obtain parameter instance from this builder. */
2323
        public AccountPersonCreateParams.Verification.AdditionalDocument build() {
2324
          return new AccountPersonCreateParams.Verification.AdditionalDocument(
×
2325
              this.back, this.extraParams, this.front);
2326
        }
2327

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

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

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

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

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

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

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

2409
      private Document(String back, Map<String, Object> extraParams, String front) {
×
2410
        this.back = back;
×
2411
        this.extraParams = extraParams;
×
2412
        this.front = front;
×
2413
      }
×
2414

2415
      public static Builder builder() {
2416
        return new Builder();
×
2417
      }
2418

2419
      public static class Builder {
×
2420
        private String back;
2421

2422
        private Map<String, Object> extraParams;
2423

2424
        private String front;
2425

2426
        /** Finalize and obtain parameter instance from this builder. */
2427
        public AccountPersonCreateParams.Verification.Document build() {
2428
          return new AccountPersonCreateParams.Verification.Document(
×
2429
              this.back, this.extraParams, this.front);
2430
        }
2431

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

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

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

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