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

stripe / stripe-java / #16562

18 Oct 2024 07:00PM UTC coverage: 12.614% (-0.1%) from 12.74%
#16562

push

github

web-flow
Merge pull request #1897 from stripe/latest-codegen-beta

Update generated code for beta

49 of 1978 new or added lines in 47 files covered. (2.48%)

68 existing lines in 20 files now uncovered.

18798 of 149026 relevant lines covered (12.61%)

0.13 hits per line

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

4.71
/src/main/java/com/stripe/param/InvoiceUpdateParams.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.util.ArrayList;
8
import java.util.HashMap;
9
import java.util.List;
10
import java.util.Map;
11
import lombok.Getter;
12

13
@Getter
14
public class InvoiceUpdateParams extends ApiRequestParams {
15
  /** The account tax IDs associated with the invoice. Only editable when the invoice is a draft. */
16
  @SerializedName("account_tax_ids")
17
  Object accountTaxIds;
18

19
  /**
20
   * List of expected payments and corresponding due dates. Valid only for invoices where {@code
21
   * collection_method=send_invoice}.
22
   */
23
  @SerializedName("amounts_due")
24
  Object amountsDue;
25

26
  /**
27
   * A fee in cents (or local equivalent) that will be applied to the invoice and transferred to the
28
   * application owner's Stripe account. The request must be made with an OAuth key or the
29
   * Stripe-Account header in order to take an application fee. For more information, see the
30
   * application fees <a
31
   * href="https://stripe.com/docs/billing/invoices/connect#collecting-fees">documentation</a>.
32
   */
33
  @SerializedName("application_fee_amount")
34
  Long applicationFeeAmount;
35

36
  /**
37
   * Controls whether Stripe performs <a
38
   * href="https://stripe.com/docs/invoicing/integration/automatic-advancement-collection">automatic
39
   * collection</a> of the invoice.
40
   */
41
  @SerializedName("auto_advance")
42
  Boolean autoAdvance;
43

44
  /** Settings for automatic tax lookup for this invoice. */
45
  @SerializedName("automatic_tax")
46
  AutomaticTax automaticTax;
47

48
  /**
49
   * Either {@code charge_automatically} or {@code send_invoice}. This field can be updated only on
50
   * {@code draft} invoices.
51
   */
52
  @SerializedName("collection_method")
53
  CollectionMethod collectionMethod;
54

55
  /**
56
   * A list of up to 4 custom fields to be displayed on the invoice. If a value for {@code
57
   * custom_fields} is specified, the list specified will replace the existing custom field list on
58
   * this invoice. Pass an empty string to remove previously-defined fields.
59
   */
60
  @SerializedName("custom_fields")
61
  Object customFields;
62

63
  /**
64
   * The number of days from which the invoice is created until it is due. Only valid for invoices
65
   * where {@code collection_method=send_invoice}. This field can only be updated on {@code draft}
66
   * invoices.
67
   */
68
  @SerializedName("days_until_due")
69
  Long daysUntilDue;
70

71
  /**
72
   * The ids of the margins to apply to the invoice. Can be overridden by line item {@code margins}.
73
   */
74
  @SerializedName("default_margins")
75
  Object defaultMargins;
76

77
  /**
78
   * ID of the default payment method for the invoice. It must belong to the customer associated
79
   * with the invoice. If not set, defaults to the subscription's default payment method, if any, or
80
   * to the default payment method in the customer's invoice settings.
81
   */
82
  @SerializedName("default_payment_method")
83
  Object defaultPaymentMethod;
84

85
  /**
86
   * ID of the default payment source for the invoice. It must belong to the customer associated
87
   * with the invoice and be in a chargeable state. If not set, defaults to the subscription's
88
   * default source, if any, or to the customer's default source.
89
   */
90
  @SerializedName("default_source")
91
  Object defaultSource;
92

93
  /**
94
   * The tax rates that will apply to any line item that does not have {@code tax_rates} set. Pass
95
   * an empty string to remove previously-defined tax rates.
96
   */
97
  @SerializedName("default_tax_rates")
98
  Object defaultTaxRates;
99

100
  /**
101
   * An arbitrary string attached to the object. Often useful for displaying to users. Referenced as
102
   * 'memo' in the Dashboard.
103
   */
104
  @SerializedName("description")
105
  Object description;
106

107
  /**
108
   * The discounts that will apply to the invoice. Pass an empty string to remove previously-defined
109
   * discounts.
110
   */
111
  @SerializedName("discounts")
112
  Object discounts;
113

114
  /**
115
   * The date on which payment for this invoice is due. Only valid for invoices where {@code
116
   * collection_method=send_invoice}. This field can only be updated on {@code draft} invoices.
117
   */
118
  @SerializedName("due_date")
119
  Long dueDate;
120

121
  /**
122
   * The date when this invoice is in effect. Same as {@code finalized_at} unless overwritten. When
123
   * defined, this value replaces the system-generated 'Date of issue' printed on the invoice PDF
124
   * and receipt.
125
   */
126
  @SerializedName("effective_at")
127
  Object effectiveAt;
128

129
  /** Specifies which fields in the response should be expanded. */
130
  @SerializedName("expand")
131
  List<String> expand;
132

133
  /**
134
   * Map of extra parameters for custom features not available in this client library. The content
135
   * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each
136
   * key/value pair is serialized as if the key is a root-level field (serialized) name in this
137
   * param object. Effectively, this map is flattened to its parent instance.
138
   */
139
  @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
140
  Map<String, Object> extraParams;
141

142
  /** Footer to be displayed on the invoice. */
143
  @SerializedName("footer")
144
  Object footer;
145

146
  /**
147
   * The connected account that issues the invoice. The invoice is presented with the branding and
148
   * support information of the specified account.
149
   */
150
  @SerializedName("issuer")
151
  Issuer issuer;
152

153
  /**
154
   * Set of <a href="https://stripe.com/docs/api/metadata">key-value pairs</a> that you can attach
155
   * to an object. This can be useful for storing additional information about the object in a
156
   * structured format. Individual keys can be unset by posting an empty value to them. All keys can
157
   * be unset by posting an empty value to {@code metadata}.
158
   */
159
  @SerializedName("metadata")
160
  Object metadata;
161

162
  /**
163
   * Set the number for this invoice. If no number is present then a number will be assigned
164
   * automatically when the invoice is finalized. In many markets, regulations require invoices to
165
   * be unique, sequential and / or gapless. You are responsible for ensuring this is true across
166
   * all your different invoicing systems in the event that you edit the invoice number using our
167
   * API. If you use only Stripe for your invoices and do not change invoice numbers, Stripe handles
168
   * this aspect of compliance for you automatically.
169
   */
170
  @SerializedName("number")
171
  Object number;
172

173
  /**
174
   * The account (if any) for which the funds of the invoice payment are intended. If set, the
175
   * invoice will be presented with the branding and support information of the specified account.
176
   * See the <a href="https://stripe.com/docs/billing/invoices/connect">Invoices with Connect</a>
177
   * documentation for details.
178
   */
179
  @SerializedName("on_behalf_of")
180
  Object onBehalfOf;
181

182
  /**
183
   * Configuration settings for the PaymentIntent that is generated when the invoice is finalized.
184
   */
185
  @SerializedName("payment_settings")
186
  PaymentSettings paymentSettings;
187

188
  /**
189
   * The rendering-related settings that control how the invoice is displayed on customer-facing
190
   * surfaces such as PDF and Hosted Invoice Page.
191
   */
192
  @SerializedName("rendering")
193
  Rendering rendering;
194

195
  /** Settings for the cost of shipping for this invoice. */
196
  @SerializedName("shipping_cost")
197
  Object shippingCost;
198

199
  /**
200
   * Shipping details for the invoice. The Invoice PDF will use the {@code shipping_details} value
201
   * if it is set, otherwise the PDF will render the shipping address from the customer.
202
   */
203
  @SerializedName("shipping_details")
204
  Object shippingDetails;
205

206
  /**
207
   * Extra information about a charge for the customer's credit card statement. It must contain at
208
   * least one letter. If not specified and this invoice is part of a subscription, the default
209
   * {@code statement_descriptor} will be set to the first subscription item's product's {@code
210
   * statement_descriptor}.
211
   */
212
  @SerializedName("statement_descriptor")
213
  Object statementDescriptor;
214

215
  /**
216
   * If specified, the funds from the invoice will be transferred to the destination and the ID of
217
   * the resulting transfer will be found on the invoice's charge. This will be unset if you POST an
218
   * empty value.
219
   */
220
  @SerializedName("transfer_data")
221
  Object transferData;
222

223
  private InvoiceUpdateParams(
224
      Object accountTaxIds,
225
      Object amountsDue,
226
      Long applicationFeeAmount,
227
      Boolean autoAdvance,
228
      AutomaticTax automaticTax,
229
      CollectionMethod collectionMethod,
230
      Object customFields,
231
      Long daysUntilDue,
232
      Object defaultMargins,
233
      Object defaultPaymentMethod,
234
      Object defaultSource,
235
      Object defaultTaxRates,
236
      Object description,
237
      Object discounts,
238
      Long dueDate,
239
      Object effectiveAt,
240
      List<String> expand,
241
      Map<String, Object> extraParams,
242
      Object footer,
243
      Issuer issuer,
244
      Object metadata,
245
      Object number,
246
      Object onBehalfOf,
247
      PaymentSettings paymentSettings,
248
      Rendering rendering,
249
      Object shippingCost,
250
      Object shippingDetails,
251
      Object statementDescriptor,
252
      Object transferData) {
1✔
253
    this.accountTaxIds = accountTaxIds;
1✔
254
    this.amountsDue = amountsDue;
1✔
255
    this.applicationFeeAmount = applicationFeeAmount;
1✔
256
    this.autoAdvance = autoAdvance;
1✔
257
    this.automaticTax = automaticTax;
1✔
258
    this.collectionMethod = collectionMethod;
1✔
259
    this.customFields = customFields;
1✔
260
    this.daysUntilDue = daysUntilDue;
1✔
261
    this.defaultMargins = defaultMargins;
1✔
262
    this.defaultPaymentMethod = defaultPaymentMethod;
1✔
263
    this.defaultSource = defaultSource;
1✔
264
    this.defaultTaxRates = defaultTaxRates;
1✔
265
    this.description = description;
1✔
266
    this.discounts = discounts;
1✔
267
    this.dueDate = dueDate;
1✔
268
    this.effectiveAt = effectiveAt;
1✔
269
    this.expand = expand;
1✔
270
    this.extraParams = extraParams;
1✔
271
    this.footer = footer;
1✔
272
    this.issuer = issuer;
1✔
273
    this.metadata = metadata;
1✔
274
    this.number = number;
1✔
275
    this.onBehalfOf = onBehalfOf;
1✔
276
    this.paymentSettings = paymentSettings;
1✔
277
    this.rendering = rendering;
1✔
278
    this.shippingCost = shippingCost;
1✔
279
    this.shippingDetails = shippingDetails;
1✔
280
    this.statementDescriptor = statementDescriptor;
1✔
281
    this.transferData = transferData;
1✔
282
  }
1✔
283

284
  public static Builder builder() {
285
    return new Builder();
1✔
286
  }
287

288
  public static class Builder {
1✔
289
    private Object accountTaxIds;
290

291
    private Object amountsDue;
292

293
    private Long applicationFeeAmount;
294

295
    private Boolean autoAdvance;
296

297
    private AutomaticTax automaticTax;
298

299
    private CollectionMethod collectionMethod;
300

301
    private Object customFields;
302

303
    private Long daysUntilDue;
304

305
    private Object defaultMargins;
306

307
    private Object defaultPaymentMethod;
308

309
    private Object defaultSource;
310

311
    private Object defaultTaxRates;
312

313
    private Object description;
314

315
    private Object discounts;
316

317
    private Long dueDate;
318

319
    private Object effectiveAt;
320

321
    private List<String> expand;
322

323
    private Map<String, Object> extraParams;
324

325
    private Object footer;
326

327
    private Issuer issuer;
328

329
    private Object metadata;
330

331
    private Object number;
332

333
    private Object onBehalfOf;
334

335
    private PaymentSettings paymentSettings;
336

337
    private Rendering rendering;
338

339
    private Object shippingCost;
340

341
    private Object shippingDetails;
342

343
    private Object statementDescriptor;
344

345
    private Object transferData;
346

347
    /** Finalize and obtain parameter instance from this builder. */
348
    public InvoiceUpdateParams build() {
349
      return new InvoiceUpdateParams(
1✔
350
          this.accountTaxIds,
351
          this.amountsDue,
352
          this.applicationFeeAmount,
353
          this.autoAdvance,
354
          this.automaticTax,
355
          this.collectionMethod,
356
          this.customFields,
357
          this.daysUntilDue,
358
          this.defaultMargins,
359
          this.defaultPaymentMethod,
360
          this.defaultSource,
361
          this.defaultTaxRates,
362
          this.description,
363
          this.discounts,
364
          this.dueDate,
365
          this.effectiveAt,
366
          this.expand,
367
          this.extraParams,
368
          this.footer,
369
          this.issuer,
370
          this.metadata,
371
          this.number,
372
          this.onBehalfOf,
373
          this.paymentSettings,
374
          this.rendering,
375
          this.shippingCost,
376
          this.shippingDetails,
377
          this.statementDescriptor,
378
          this.transferData);
379
    }
380

381
    /**
382
     * Add an element to `accountTaxIds` list. A list is initialized for the first `add/addAll`
383
     * call, and subsequent calls adds additional elements to the original list. See {@link
384
     * InvoiceUpdateParams#accountTaxIds} for the field documentation.
385
     */
386
    @SuppressWarnings("unchecked")
387
    public Builder addAccountTaxId(String element) {
388
      if (this.accountTaxIds == null || this.accountTaxIds instanceof EmptyParam) {
×
389
        this.accountTaxIds = new ArrayList<String>();
×
390
      }
391
      ((List<String>) this.accountTaxIds).add(element);
×
392
      return this;
×
393
    }
394

395
    /**
396
     * Add all elements to `accountTaxIds` list. A list is initialized for the first `add/addAll`
397
     * call, and subsequent calls adds additional elements to the original list. See {@link
398
     * InvoiceUpdateParams#accountTaxIds} for the field documentation.
399
     */
400
    @SuppressWarnings("unchecked")
401
    public Builder addAllAccountTaxId(List<String> elements) {
402
      if (this.accountTaxIds == null || this.accountTaxIds instanceof EmptyParam) {
×
403
        this.accountTaxIds = new ArrayList<String>();
×
404
      }
405
      ((List<String>) this.accountTaxIds).addAll(elements);
×
406
      return this;
×
407
    }
408

409
    /**
410
     * The account tax IDs associated with the invoice. Only editable when the invoice is a draft.
411
     */
412
    public Builder setAccountTaxIds(EmptyParam accountTaxIds) {
413
      this.accountTaxIds = accountTaxIds;
×
414
      return this;
×
415
    }
416

417
    /**
418
     * The account tax IDs associated with the invoice. Only editable when the invoice is a draft.
419
     */
420
    public Builder setAccountTaxIds(List<String> accountTaxIds) {
421
      this.accountTaxIds = accountTaxIds;
×
422
      return this;
×
423
    }
424

425
    /**
426
     * Add an element to `amountsDue` list. A list is initialized for the first `add/addAll` call,
427
     * and subsequent calls adds additional elements to the original list. See {@link
428
     * InvoiceUpdateParams#amountsDue} for the field documentation.
429
     */
430
    @SuppressWarnings("unchecked")
431
    public Builder addAmountsDue(InvoiceUpdateParams.AmountsDue element) {
432
      if (this.amountsDue == null || this.amountsDue instanceof EmptyParam) {
×
433
        this.amountsDue = new ArrayList<InvoiceUpdateParams.AmountsDue>();
×
434
      }
435
      ((List<InvoiceUpdateParams.AmountsDue>) this.amountsDue).add(element);
×
436
      return this;
×
437
    }
438

439
    /**
440
     * Add all elements to `amountsDue` list. A list is initialized for the first `add/addAll` call,
441
     * and subsequent calls adds additional elements to the original list. See {@link
442
     * InvoiceUpdateParams#amountsDue} for the field documentation.
443
     */
444
    @SuppressWarnings("unchecked")
445
    public Builder addAllAmountsDue(List<InvoiceUpdateParams.AmountsDue> elements) {
446
      if (this.amountsDue == null || this.amountsDue instanceof EmptyParam) {
×
447
        this.amountsDue = new ArrayList<InvoiceUpdateParams.AmountsDue>();
×
448
      }
449
      ((List<InvoiceUpdateParams.AmountsDue>) this.amountsDue).addAll(elements);
×
450
      return this;
×
451
    }
452

453
    /**
454
     * List of expected payments and corresponding due dates. Valid only for invoices where {@code
455
     * collection_method=send_invoice}.
456
     */
457
    public Builder setAmountsDue(EmptyParam amountsDue) {
458
      this.amountsDue = amountsDue;
×
459
      return this;
×
460
    }
461

462
    /**
463
     * List of expected payments and corresponding due dates. Valid only for invoices where {@code
464
     * collection_method=send_invoice}.
465
     */
466
    public Builder setAmountsDue(List<InvoiceUpdateParams.AmountsDue> amountsDue) {
467
      this.amountsDue = amountsDue;
×
468
      return this;
×
469
    }
470

471
    /**
472
     * A fee in cents (or local equivalent) that will be applied to the invoice and transferred to
473
     * the application owner's Stripe account. The request must be made with an OAuth key or the
474
     * Stripe-Account header in order to take an application fee. For more information, see the
475
     * application fees <a
476
     * href="https://stripe.com/docs/billing/invoices/connect#collecting-fees">documentation</a>.
477
     */
478
    public Builder setApplicationFeeAmount(Long applicationFeeAmount) {
479
      this.applicationFeeAmount = applicationFeeAmount;
×
480
      return this;
×
481
    }
482

483
    /**
484
     * Controls whether Stripe performs <a
485
     * href="https://stripe.com/docs/invoicing/integration/automatic-advancement-collection">automatic
486
     * collection</a> of the invoice.
487
     */
488
    public Builder setAutoAdvance(Boolean autoAdvance) {
489
      this.autoAdvance = autoAdvance;
×
490
      return this;
×
491
    }
492

493
    /** Settings for automatic tax lookup for this invoice. */
494
    public Builder setAutomaticTax(InvoiceUpdateParams.AutomaticTax automaticTax) {
495
      this.automaticTax = automaticTax;
×
496
      return this;
×
497
    }
498

499
    /**
500
     * Either {@code charge_automatically} or {@code send_invoice}. This field can be updated only
501
     * on {@code draft} invoices.
502
     */
503
    public Builder setCollectionMethod(InvoiceUpdateParams.CollectionMethod collectionMethod) {
504
      this.collectionMethod = collectionMethod;
×
505
      return this;
×
506
    }
507

508
    /**
509
     * Add an element to `customFields` list. A list is initialized for the first `add/addAll` call,
510
     * and subsequent calls adds additional elements to the original list. See {@link
511
     * InvoiceUpdateParams#customFields} for the field documentation.
512
     */
513
    @SuppressWarnings("unchecked")
514
    public Builder addCustomField(InvoiceUpdateParams.CustomField element) {
515
      if (this.customFields == null || this.customFields instanceof EmptyParam) {
×
516
        this.customFields = new ArrayList<InvoiceUpdateParams.CustomField>();
×
517
      }
518
      ((List<InvoiceUpdateParams.CustomField>) this.customFields).add(element);
×
519
      return this;
×
520
    }
521

522
    /**
523
     * Add all elements to `customFields` list. A list is initialized for the first `add/addAll`
524
     * call, and subsequent calls adds additional elements to the original list. See {@link
525
     * InvoiceUpdateParams#customFields} for the field documentation.
526
     */
527
    @SuppressWarnings("unchecked")
528
    public Builder addAllCustomField(List<InvoiceUpdateParams.CustomField> elements) {
529
      if (this.customFields == null || this.customFields instanceof EmptyParam) {
×
530
        this.customFields = new ArrayList<InvoiceUpdateParams.CustomField>();
×
531
      }
532
      ((List<InvoiceUpdateParams.CustomField>) this.customFields).addAll(elements);
×
533
      return this;
×
534
    }
535

536
    /**
537
     * A list of up to 4 custom fields to be displayed on the invoice. If a value for {@code
538
     * custom_fields} is specified, the list specified will replace the existing custom field list
539
     * on this invoice. Pass an empty string to remove previously-defined fields.
540
     */
541
    public Builder setCustomFields(EmptyParam customFields) {
542
      this.customFields = customFields;
1✔
543
      return this;
1✔
544
    }
545

546
    /**
547
     * A list of up to 4 custom fields to be displayed on the invoice. If a value for {@code
548
     * custom_fields} is specified, the list specified will replace the existing custom field list
549
     * on this invoice. Pass an empty string to remove previously-defined fields.
550
     */
551
    public Builder setCustomFields(List<InvoiceUpdateParams.CustomField> customFields) {
552
      this.customFields = customFields;
1✔
553
      return this;
1✔
554
    }
555

556
    /**
557
     * The number of days from which the invoice is created until it is due. Only valid for invoices
558
     * where {@code collection_method=send_invoice}. This field can only be updated on {@code draft}
559
     * invoices.
560
     */
561
    public Builder setDaysUntilDue(Long daysUntilDue) {
562
      this.daysUntilDue = daysUntilDue;
×
563
      return this;
×
564
    }
565

566
    /**
567
     * Add an element to `defaultMargins` list. A list is initialized for the first `add/addAll`
568
     * call, and subsequent calls adds additional elements to the original list. See {@link
569
     * InvoiceUpdateParams#defaultMargins} for the field documentation.
570
     */
571
    @SuppressWarnings("unchecked")
572
    public Builder addDefaultMargin(String element) {
573
      if (this.defaultMargins == null || this.defaultMargins instanceof EmptyParam) {
×
574
        this.defaultMargins = new ArrayList<String>();
×
575
      }
576
      ((List<String>) this.defaultMargins).add(element);
×
577
      return this;
×
578
    }
579

580
    /**
581
     * Add all elements to `defaultMargins` list. A list is initialized for the first `add/addAll`
582
     * call, and subsequent calls adds additional elements to the original list. See {@link
583
     * InvoiceUpdateParams#defaultMargins} for the field documentation.
584
     */
585
    @SuppressWarnings("unchecked")
586
    public Builder addAllDefaultMargin(List<String> elements) {
587
      if (this.defaultMargins == null || this.defaultMargins instanceof EmptyParam) {
×
588
        this.defaultMargins = new ArrayList<String>();
×
589
      }
590
      ((List<String>) this.defaultMargins).addAll(elements);
×
591
      return this;
×
592
    }
593

594
    /**
595
     * The ids of the margins to apply to the invoice. Can be overridden by line item {@code
596
     * margins}.
597
     */
598
    public Builder setDefaultMargins(EmptyParam defaultMargins) {
599
      this.defaultMargins = defaultMargins;
×
600
      return this;
×
601
    }
602

603
    /**
604
     * The ids of the margins to apply to the invoice. Can be overridden by line item {@code
605
     * margins}.
606
     */
607
    public Builder setDefaultMargins(List<String> defaultMargins) {
608
      this.defaultMargins = defaultMargins;
×
609
      return this;
×
610
    }
611

612
    /**
613
     * ID of the default payment method for the invoice. It must belong to the customer associated
614
     * with the invoice. If not set, defaults to the subscription's default payment method, if any,
615
     * or to the default payment method in the customer's invoice settings.
616
     */
617
    public Builder setDefaultPaymentMethod(String defaultPaymentMethod) {
618
      this.defaultPaymentMethod = defaultPaymentMethod;
×
619
      return this;
×
620
    }
621

622
    /**
623
     * ID of the default payment method for the invoice. It must belong to the customer associated
624
     * with the invoice. If not set, defaults to the subscription's default payment method, if any,
625
     * or to the default payment method in the customer's invoice settings.
626
     */
627
    public Builder setDefaultPaymentMethod(EmptyParam defaultPaymentMethod) {
628
      this.defaultPaymentMethod = defaultPaymentMethod;
1✔
629
      return this;
1✔
630
    }
631

632
    /**
633
     * ID of the default payment source for the invoice. It must belong to the customer associated
634
     * with the invoice and be in a chargeable state. If not set, defaults to the subscription's
635
     * default source, if any, or to the customer's default source.
636
     */
637
    public Builder setDefaultSource(String defaultSource) {
638
      this.defaultSource = defaultSource;
×
639
      return this;
×
640
    }
641

642
    /**
643
     * ID of the default payment source for the invoice. It must belong to the customer associated
644
     * with the invoice and be in a chargeable state. If not set, defaults to the subscription's
645
     * default source, if any, or to the customer's default source.
646
     */
647
    public Builder setDefaultSource(EmptyParam defaultSource) {
648
      this.defaultSource = defaultSource;
×
649
      return this;
×
650
    }
651

652
    /**
653
     * Add an element to `defaultTaxRates` list. A list is initialized for the first `add/addAll`
654
     * call, and subsequent calls adds additional elements to the original list. See {@link
655
     * InvoiceUpdateParams#defaultTaxRates} for the field documentation.
656
     */
657
    @SuppressWarnings("unchecked")
658
    public Builder addDefaultTaxRate(String element) {
659
      if (this.defaultTaxRates == null || this.defaultTaxRates instanceof EmptyParam) {
×
660
        this.defaultTaxRates = new ArrayList<String>();
×
661
      }
662
      ((List<String>) this.defaultTaxRates).add(element);
×
663
      return this;
×
664
    }
665

666
    /**
667
     * Add all elements to `defaultTaxRates` list. A list is initialized for the first `add/addAll`
668
     * call, and subsequent calls adds additional elements to the original list. See {@link
669
     * InvoiceUpdateParams#defaultTaxRates} for the field documentation.
670
     */
671
    @SuppressWarnings("unchecked")
672
    public Builder addAllDefaultTaxRate(List<String> elements) {
673
      if (this.defaultTaxRates == null || this.defaultTaxRates instanceof EmptyParam) {
×
674
        this.defaultTaxRates = new ArrayList<String>();
×
675
      }
676
      ((List<String>) this.defaultTaxRates).addAll(elements);
×
677
      return this;
×
678
    }
679

680
    /**
681
     * The tax rates that will apply to any line item that does not have {@code tax_rates} set. Pass
682
     * an empty string to remove previously-defined tax rates.
683
     */
684
    public Builder setDefaultTaxRates(EmptyParam defaultTaxRates) {
685
      this.defaultTaxRates = defaultTaxRates;
×
686
      return this;
×
687
    }
688

689
    /**
690
     * The tax rates that will apply to any line item that does not have {@code tax_rates} set. Pass
691
     * an empty string to remove previously-defined tax rates.
692
     */
693
    public Builder setDefaultTaxRates(List<String> defaultTaxRates) {
694
      this.defaultTaxRates = defaultTaxRates;
×
695
      return this;
×
696
    }
697

698
    /**
699
     * An arbitrary string attached to the object. Often useful for displaying to users. Referenced
700
     * as 'memo' in the Dashboard.
701
     */
702
    public Builder setDescription(String description) {
703
      this.description = description;
×
704
      return this;
×
705
    }
706

707
    /**
708
     * An arbitrary string attached to the object. Often useful for displaying to users. Referenced
709
     * as 'memo' in the Dashboard.
710
     */
711
    public Builder setDescription(EmptyParam description) {
712
      this.description = description;
×
713
      return this;
×
714
    }
715

716
    /**
717
     * Add an element to `discounts` list. A list is initialized for the first `add/addAll` call,
718
     * and subsequent calls adds additional elements to the original list. See {@link
719
     * InvoiceUpdateParams#discounts} for the field documentation.
720
     */
721
    @SuppressWarnings("unchecked")
722
    public Builder addDiscount(InvoiceUpdateParams.Discount element) {
723
      if (this.discounts == null || this.discounts instanceof EmptyParam) {
×
724
        this.discounts = new ArrayList<InvoiceUpdateParams.Discount>();
×
725
      }
726
      ((List<InvoiceUpdateParams.Discount>) this.discounts).add(element);
×
727
      return this;
×
728
    }
729

730
    /**
731
     * Add all elements to `discounts` list. A list is initialized for the first `add/addAll` call,
732
     * and subsequent calls adds additional elements to the original list. See {@link
733
     * InvoiceUpdateParams#discounts} for the field documentation.
734
     */
735
    @SuppressWarnings("unchecked")
736
    public Builder addAllDiscount(List<InvoiceUpdateParams.Discount> elements) {
737
      if (this.discounts == null || this.discounts instanceof EmptyParam) {
×
738
        this.discounts = new ArrayList<InvoiceUpdateParams.Discount>();
×
739
      }
740
      ((List<InvoiceUpdateParams.Discount>) this.discounts).addAll(elements);
×
741
      return this;
×
742
    }
743

744
    /**
745
     * The discounts that will apply to the invoice. Pass an empty string to remove
746
     * previously-defined discounts.
747
     */
748
    public Builder setDiscounts(EmptyParam discounts) {
749
      this.discounts = discounts;
×
750
      return this;
×
751
    }
752

753
    /**
754
     * The discounts that will apply to the invoice. Pass an empty string to remove
755
     * previously-defined discounts.
756
     */
757
    public Builder setDiscounts(List<InvoiceUpdateParams.Discount> discounts) {
758
      this.discounts = discounts;
×
759
      return this;
×
760
    }
761

762
    /**
763
     * The date on which payment for this invoice is due. Only valid for invoices where {@code
764
     * collection_method=send_invoice}. This field can only be updated on {@code draft} invoices.
765
     */
766
    public Builder setDueDate(Long dueDate) {
767
      this.dueDate = dueDate;
×
768
      return this;
×
769
    }
770

771
    /**
772
     * The date when this invoice is in effect. Same as {@code finalized_at} unless overwritten.
773
     * When defined, this value replaces the system-generated 'Date of issue' printed on the invoice
774
     * PDF and receipt.
775
     */
776
    public Builder setEffectiveAt(Long effectiveAt) {
777
      this.effectiveAt = effectiveAt;
×
778
      return this;
×
779
    }
780

781
    /**
782
     * The date when this invoice is in effect. Same as {@code finalized_at} unless overwritten.
783
     * When defined, this value replaces the system-generated 'Date of issue' printed on the invoice
784
     * PDF and receipt.
785
     */
786
    public Builder setEffectiveAt(EmptyParam effectiveAt) {
787
      this.effectiveAt = effectiveAt;
×
788
      return this;
×
789
    }
790

791
    /**
792
     * Add an element to `expand` list. A list is initialized for the first `add/addAll` call, and
793
     * subsequent calls adds additional elements to the original list. See {@link
794
     * InvoiceUpdateParams#expand} for the field documentation.
795
     */
796
    public Builder addExpand(String element) {
797
      if (this.expand == null) {
×
798
        this.expand = new ArrayList<>();
×
799
      }
800
      this.expand.add(element);
×
801
      return this;
×
802
    }
803

804
    /**
805
     * Add all elements to `expand` list. A list is initialized for the first `add/addAll` call, and
806
     * subsequent calls adds additional elements to the original list. See {@link
807
     * InvoiceUpdateParams#expand} for the field documentation.
808
     */
809
    public Builder addAllExpand(List<String> elements) {
810
      if (this.expand == null) {
×
811
        this.expand = new ArrayList<>();
×
812
      }
813
      this.expand.addAll(elements);
×
814
      return this;
×
815
    }
816

817
    /**
818
     * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll`
819
     * call, and subsequent calls add additional key/value pairs to the original map. See {@link
820
     * InvoiceUpdateParams#extraParams} for the field documentation.
821
     */
822
    public Builder putExtraParam(String key, Object value) {
823
      if (this.extraParams == null) {
1✔
824
        this.extraParams = new HashMap<>();
1✔
825
      }
826
      this.extraParams.put(key, value);
1✔
827
      return this;
1✔
828
    }
829

830
    /**
831
     * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
832
     * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map.
833
     * See {@link InvoiceUpdateParams#extraParams} for the field documentation.
834
     */
835
    public Builder putAllExtraParam(Map<String, Object> map) {
836
      if (this.extraParams == null) {
×
837
        this.extraParams = new HashMap<>();
×
838
      }
839
      this.extraParams.putAll(map);
×
840
      return this;
×
841
    }
842

843
    /** Footer to be displayed on the invoice. */
844
    public Builder setFooter(String footer) {
845
      this.footer = footer;
×
846
      return this;
×
847
    }
848

849
    /** Footer to be displayed on the invoice. */
850
    public Builder setFooter(EmptyParam footer) {
851
      this.footer = footer;
×
852
      return this;
×
853
    }
854

855
    /**
856
     * The connected account that issues the invoice. The invoice is presented with the branding and
857
     * support information of the specified account.
858
     */
859
    public Builder setIssuer(InvoiceUpdateParams.Issuer issuer) {
860
      this.issuer = issuer;
×
861
      return this;
×
862
    }
863

864
    /**
865
     * Add a key/value pair to `metadata` map. A map is initialized for the first `put/putAll` call,
866
     * and subsequent calls add additional key/value pairs to the original map. See {@link
867
     * InvoiceUpdateParams#metadata} for the field documentation.
868
     */
869
    @SuppressWarnings("unchecked")
870
    public Builder putMetadata(String key, String value) {
871
      if (this.metadata == null || this.metadata instanceof EmptyParam) {
1✔
872
        this.metadata = new HashMap<String, String>();
1✔
873
      }
874
      ((Map<String, String>) this.metadata).put(key, value);
1✔
875
      return this;
1✔
876
    }
877

878
    /**
879
     * Add all map key/value pairs to `metadata` map. A map is initialized for the first
880
     * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map.
881
     * See {@link InvoiceUpdateParams#metadata} for the field documentation.
882
     */
883
    @SuppressWarnings("unchecked")
884
    public Builder putAllMetadata(Map<String, String> map) {
885
      if (this.metadata == null || this.metadata instanceof EmptyParam) {
×
886
        this.metadata = new HashMap<String, String>();
×
887
      }
888
      ((Map<String, String>) this.metadata).putAll(map);
×
889
      return this;
×
890
    }
891

892
    /**
893
     * Set of <a href="https://stripe.com/docs/api/metadata">key-value pairs</a> that you can attach
894
     * to an object. This can be useful for storing additional information about the object in a
895
     * structured format. Individual keys can be unset by posting an empty value to them. All keys
896
     * can be unset by posting an empty value to {@code metadata}.
897
     */
898
    public Builder setMetadata(EmptyParam metadata) {
899
      this.metadata = metadata;
×
900
      return this;
×
901
    }
902

903
    /**
904
     * Set of <a href="https://stripe.com/docs/api/metadata">key-value pairs</a> that you can attach
905
     * to an object. This can be useful for storing additional information about the object in a
906
     * structured format. Individual keys can be unset by posting an empty value to them. All keys
907
     * can be unset by posting an empty value to {@code metadata}.
908
     */
909
    public Builder setMetadata(Map<String, String> metadata) {
910
      this.metadata = metadata;
×
911
      return this;
×
912
    }
913

914
    /**
915
     * Set the number for this invoice. If no number is present then a number will be assigned
916
     * automatically when the invoice is finalized. In many markets, regulations require invoices to
917
     * be unique, sequential and / or gapless. You are responsible for ensuring this is true across
918
     * all your different invoicing systems in the event that you edit the invoice number using our
919
     * API. If you use only Stripe for your invoices and do not change invoice numbers, Stripe
920
     * handles this aspect of compliance for you automatically.
921
     */
922
    public Builder setNumber(String number) {
923
      this.number = number;
×
924
      return this;
×
925
    }
926

927
    /**
928
     * Set the number for this invoice. If no number is present then a number will be assigned
929
     * automatically when the invoice is finalized. In many markets, regulations require invoices to
930
     * be unique, sequential and / or gapless. You are responsible for ensuring this is true across
931
     * all your different invoicing systems in the event that you edit the invoice number using our
932
     * API. If you use only Stripe for your invoices and do not change invoice numbers, Stripe
933
     * handles this aspect of compliance for you automatically.
934
     */
935
    public Builder setNumber(EmptyParam number) {
936
      this.number = number;
×
937
      return this;
×
938
    }
939

940
    /**
941
     * The account (if any) for which the funds of the invoice payment are intended. If set, the
942
     * invoice will be presented with the branding and support information of the specified account.
943
     * See the <a href="https://stripe.com/docs/billing/invoices/connect">Invoices with Connect</a>
944
     * documentation for details.
945
     */
946
    public Builder setOnBehalfOf(String onBehalfOf) {
947
      this.onBehalfOf = onBehalfOf;
×
948
      return this;
×
949
    }
950

951
    /**
952
     * The account (if any) for which the funds of the invoice payment are intended. If set, the
953
     * invoice will be presented with the branding and support information of the specified account.
954
     * See the <a href="https://stripe.com/docs/billing/invoices/connect">Invoices with Connect</a>
955
     * documentation for details.
956
     */
957
    public Builder setOnBehalfOf(EmptyParam onBehalfOf) {
958
      this.onBehalfOf = onBehalfOf;
×
959
      return this;
×
960
    }
961

962
    /**
963
     * Configuration settings for the PaymentIntent that is generated when the invoice is finalized.
964
     */
965
    public Builder setPaymentSettings(InvoiceUpdateParams.PaymentSettings paymentSettings) {
966
      this.paymentSettings = paymentSettings;
×
967
      return this;
×
968
    }
969

970
    /**
971
     * The rendering-related settings that control how the invoice is displayed on customer-facing
972
     * surfaces such as PDF and Hosted Invoice Page.
973
     */
974
    public Builder setRendering(InvoiceUpdateParams.Rendering rendering) {
975
      this.rendering = rendering;
×
976
      return this;
×
977
    }
978

979
    /** Settings for the cost of shipping for this invoice. */
980
    public Builder setShippingCost(InvoiceUpdateParams.ShippingCost shippingCost) {
981
      this.shippingCost = shippingCost;
×
982
      return this;
×
983
    }
984

985
    /** Settings for the cost of shipping for this invoice. */
986
    public Builder setShippingCost(EmptyParam shippingCost) {
987
      this.shippingCost = shippingCost;
×
988
      return this;
×
989
    }
990

991
    /**
992
     * Shipping details for the invoice. The Invoice PDF will use the {@code shipping_details} value
993
     * if it is set, otherwise the PDF will render the shipping address from the customer.
994
     */
995
    public Builder setShippingDetails(InvoiceUpdateParams.ShippingDetails shippingDetails) {
996
      this.shippingDetails = shippingDetails;
×
997
      return this;
×
998
    }
999

1000
    /**
1001
     * Shipping details for the invoice. The Invoice PDF will use the {@code shipping_details} value
1002
     * if it is set, otherwise the PDF will render the shipping address from the customer.
1003
     */
1004
    public Builder setShippingDetails(EmptyParam shippingDetails) {
1005
      this.shippingDetails = shippingDetails;
×
1006
      return this;
×
1007
    }
1008

1009
    /**
1010
     * Extra information about a charge for the customer's credit card statement. It must contain at
1011
     * least one letter. If not specified and this invoice is part of a subscription, the default
1012
     * {@code statement_descriptor} will be set to the first subscription item's product's {@code
1013
     * statement_descriptor}.
1014
     */
1015
    public Builder setStatementDescriptor(String statementDescriptor) {
1016
      this.statementDescriptor = statementDescriptor;
×
1017
      return this;
×
1018
    }
1019

1020
    /**
1021
     * Extra information about a charge for the customer's credit card statement. It must contain at
1022
     * least one letter. If not specified and this invoice is part of a subscription, the default
1023
     * {@code statement_descriptor} will be set to the first subscription item's product's {@code
1024
     * statement_descriptor}.
1025
     */
1026
    public Builder setStatementDescriptor(EmptyParam statementDescriptor) {
1027
      this.statementDescriptor = statementDescriptor;
×
1028
      return this;
×
1029
    }
1030

1031
    /**
1032
     * If specified, the funds from the invoice will be transferred to the destination and the ID of
1033
     * the resulting transfer will be found on the invoice's charge. This will be unset if you POST
1034
     * an empty value.
1035
     */
1036
    public Builder setTransferData(InvoiceUpdateParams.TransferData transferData) {
1037
      this.transferData = transferData;
×
1038
      return this;
×
1039
    }
1040

1041
    /**
1042
     * If specified, the funds from the invoice will be transferred to the destination and the ID of
1043
     * the resulting transfer will be found on the invoice's charge. This will be unset if you POST
1044
     * an empty value.
1045
     */
1046
    public Builder setTransferData(EmptyParam transferData) {
1047
      this.transferData = transferData;
×
1048
      return this;
×
1049
    }
1050
  }
1051

1052
  @Getter
1053
  public static class AmountsDue {
1054
    /** <strong>Required.</strong> The amount in cents (or local equivalent). */
1055
    @SerializedName("amount")
1056
    Long amount;
1057

1058
    /** Number of days from when invoice is finalized until the payment is due. */
1059
    @SerializedName("days_until_due")
1060
    Long daysUntilDue;
1061

1062
    /**
1063
     * <strong>Required.</strong> An arbitrary string attached to the object. Often useful for
1064
     * displaying to users.
1065
     */
1066
    @SerializedName("description")
1067
    Object description;
1068

1069
    /** Date on which a payment plan’s payment is due. */
1070
    @SerializedName("due_date")
1071
    Long dueDate;
1072

1073
    /**
1074
     * Map of extra parameters for custom features not available in this client library. The content
1075
     * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each
1076
     * key/value pair is serialized as if the key is a root-level field (serialized) name in this
1077
     * param object. Effectively, this map is flattened to its parent instance.
1078
     */
1079
    @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
1080
    Map<String, Object> extraParams;
1081

1082
    private AmountsDue(
1083
        Long amount,
1084
        Long daysUntilDue,
1085
        Object description,
1086
        Long dueDate,
1087
        Map<String, Object> extraParams) {
×
1088
      this.amount = amount;
×
1089
      this.daysUntilDue = daysUntilDue;
×
1090
      this.description = description;
×
1091
      this.dueDate = dueDate;
×
1092
      this.extraParams = extraParams;
×
1093
    }
×
1094

1095
    public static Builder builder() {
1096
      return new Builder();
×
1097
    }
1098

1099
    public static class Builder {
×
1100
      private Long amount;
1101

1102
      private Long daysUntilDue;
1103

1104
      private Object description;
1105

1106
      private Long dueDate;
1107

1108
      private Map<String, Object> extraParams;
1109

1110
      /** Finalize and obtain parameter instance from this builder. */
1111
      public InvoiceUpdateParams.AmountsDue build() {
1112
        return new InvoiceUpdateParams.AmountsDue(
×
1113
            this.amount, this.daysUntilDue, this.description, this.dueDate, this.extraParams);
1114
      }
1115

1116
      /** <strong>Required.</strong> The amount in cents (or local equivalent). */
1117
      public Builder setAmount(Long amount) {
1118
        this.amount = amount;
×
1119
        return this;
×
1120
      }
1121

1122
      /** Number of days from when invoice is finalized until the payment is due. */
1123
      public Builder setDaysUntilDue(Long daysUntilDue) {
1124
        this.daysUntilDue = daysUntilDue;
×
1125
        return this;
×
1126
      }
1127

1128
      /**
1129
       * <strong>Required.</strong> An arbitrary string attached to the object. Often useful for
1130
       * displaying to users.
1131
       */
1132
      public Builder setDescription(String description) {
1133
        this.description = description;
×
1134
        return this;
×
1135
      }
1136

1137
      /**
1138
       * <strong>Required.</strong> An arbitrary string attached to the object. Often useful for
1139
       * displaying to users.
1140
       */
1141
      public Builder setDescription(EmptyParam description) {
1142
        this.description = description;
×
1143
        return this;
×
1144
      }
1145

1146
      /** Date on which a payment plan’s payment is due. */
1147
      public Builder setDueDate(Long dueDate) {
1148
        this.dueDate = dueDate;
×
1149
        return this;
×
1150
      }
1151

1152
      /**
1153
       * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll`
1154
       * call, and subsequent calls add additional key/value pairs to the original map. See {@link
1155
       * InvoiceUpdateParams.AmountsDue#extraParams} for the field documentation.
1156
       */
1157
      public Builder putExtraParam(String key, Object value) {
1158
        if (this.extraParams == null) {
×
1159
          this.extraParams = new HashMap<>();
×
1160
        }
1161
        this.extraParams.put(key, value);
×
1162
        return this;
×
1163
      }
1164

1165
      /**
1166
       * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
1167
       * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map.
1168
       * See {@link InvoiceUpdateParams.AmountsDue#extraParams} for the field documentation.
1169
       */
1170
      public Builder putAllExtraParam(Map<String, Object> map) {
1171
        if (this.extraParams == null) {
×
1172
          this.extraParams = new HashMap<>();
×
1173
        }
1174
        this.extraParams.putAll(map);
×
1175
        return this;
×
1176
      }
1177
    }
1178
  }
1179

1180
  @Getter
1181
  public static class AutomaticTax {
1182
    /**
1183
     * <strong>Required.</strong> Whether Stripe automatically computes tax on this invoice. Note
1184
     * that incompatible invoice items (invoice items with manually specified <a
1185
     * href="https://stripe.com/docs/api/tax_rates">tax rates</a>, negative amounts, or {@code
1186
     * tax_behavior=unspecified}) cannot be added to automatic tax invoices.
1187
     */
1188
    @SerializedName("enabled")
1189
    Boolean enabled;
1190

1191
    /**
1192
     * Map of extra parameters for custom features not available in this client library. The content
1193
     * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each
1194
     * key/value pair is serialized as if the key is a root-level field (serialized) name in this
1195
     * param object. Effectively, this map is flattened to its parent instance.
1196
     */
1197
    @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
1198
    Map<String, Object> extraParams;
1199

1200
    /**
1201
     * The account that's liable for tax. If set, the business address and tax registrations
1202
     * required to perform the tax calculation are loaded from this account. The tax transaction is
1203
     * returned in the report of the connected account.
1204
     */
1205
    @SerializedName("liability")
1206
    Liability liability;
1207

1208
    private AutomaticTax(Boolean enabled, Map<String, Object> extraParams, Liability liability) {
×
1209
      this.enabled = enabled;
×
1210
      this.extraParams = extraParams;
×
1211
      this.liability = liability;
×
1212
    }
×
1213

1214
    public static Builder builder() {
1215
      return new Builder();
×
1216
    }
1217

1218
    public static class Builder {
×
1219
      private Boolean enabled;
1220

1221
      private Map<String, Object> extraParams;
1222

1223
      private Liability liability;
1224

1225
      /** Finalize and obtain parameter instance from this builder. */
1226
      public InvoiceUpdateParams.AutomaticTax build() {
1227
        return new InvoiceUpdateParams.AutomaticTax(this.enabled, this.extraParams, this.liability);
×
1228
      }
1229

1230
      /**
1231
       * <strong>Required.</strong> Whether Stripe automatically computes tax on this invoice. Note
1232
       * that incompatible invoice items (invoice items with manually specified <a
1233
       * href="https://stripe.com/docs/api/tax_rates">tax rates</a>, negative amounts, or {@code
1234
       * tax_behavior=unspecified}) cannot be added to automatic tax invoices.
1235
       */
1236
      public Builder setEnabled(Boolean enabled) {
1237
        this.enabled = enabled;
×
1238
        return this;
×
1239
      }
1240

1241
      /**
1242
       * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll`
1243
       * call, and subsequent calls add additional key/value pairs to the original map. See {@link
1244
       * InvoiceUpdateParams.AutomaticTax#extraParams} for the field documentation.
1245
       */
1246
      public Builder putExtraParam(String key, Object value) {
1247
        if (this.extraParams == null) {
×
1248
          this.extraParams = new HashMap<>();
×
1249
        }
1250
        this.extraParams.put(key, value);
×
1251
        return this;
×
1252
      }
1253

1254
      /**
1255
       * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
1256
       * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map.
1257
       * See {@link InvoiceUpdateParams.AutomaticTax#extraParams} for the field documentation.
1258
       */
1259
      public Builder putAllExtraParam(Map<String, Object> map) {
1260
        if (this.extraParams == null) {
×
1261
          this.extraParams = new HashMap<>();
×
1262
        }
1263
        this.extraParams.putAll(map);
×
1264
        return this;
×
1265
      }
1266

1267
      /**
1268
       * The account that's liable for tax. If set, the business address and tax registrations
1269
       * required to perform the tax calculation are loaded from this account. The tax transaction
1270
       * is returned in the report of the connected account.
1271
       */
1272
      public Builder setLiability(InvoiceUpdateParams.AutomaticTax.Liability liability) {
1273
        this.liability = liability;
×
1274
        return this;
×
1275
      }
1276
    }
1277

1278
    @Getter
1279
    public static class Liability {
1280
      /** The connected account being referenced when {@code type} is {@code account}. */
1281
      @SerializedName("account")
1282
      Object account;
1283

1284
      /**
1285
       * Map of extra parameters for custom features not available in this client library. The
1286
       * content in this map is not serialized under this field's {@code @SerializedName} value.
1287
       * Instead, each key/value pair is serialized as if the key is a root-level field (serialized)
1288
       * name in this param object. Effectively, this map is flattened to its parent instance.
1289
       */
1290
      @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
1291
      Map<String, Object> extraParams;
1292

1293
      /** <strong>Required.</strong> Type of the account referenced in the request. */
1294
      @SerializedName("type")
1295
      Type type;
1296

1297
      private Liability(Object account, Map<String, Object> extraParams, Type type) {
×
1298
        this.account = account;
×
1299
        this.extraParams = extraParams;
×
1300
        this.type = type;
×
1301
      }
×
1302

1303
      public static Builder builder() {
1304
        return new Builder();
×
1305
      }
1306

1307
      public static class Builder {
×
1308
        private Object account;
1309

1310
        private Map<String, Object> extraParams;
1311

1312
        private Type type;
1313

1314
        /** Finalize and obtain parameter instance from this builder. */
1315
        public InvoiceUpdateParams.AutomaticTax.Liability build() {
1316
          return new InvoiceUpdateParams.AutomaticTax.Liability(
×
1317
              this.account, this.extraParams, this.type);
1318
        }
1319

1320
        /** The connected account being referenced when {@code type} is {@code account}. */
1321
        public Builder setAccount(String account) {
1322
          this.account = account;
×
1323
          return this;
×
1324
        }
1325

1326
        /** The connected account being referenced when {@code type} is {@code account}. */
1327
        public Builder setAccount(EmptyParam account) {
1328
          this.account = account;
×
1329
          return this;
×
1330
        }
1331

1332
        /**
1333
         * Add a key/value pair to `extraParams` map. A map is initialized for the first
1334
         * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
1335
         * map. See {@link InvoiceUpdateParams.AutomaticTax.Liability#extraParams} for the field
1336
         * documentation.
1337
         */
1338
        public Builder putExtraParam(String key, Object value) {
1339
          if (this.extraParams == null) {
×
1340
            this.extraParams = new HashMap<>();
×
1341
          }
1342
          this.extraParams.put(key, value);
×
1343
          return this;
×
1344
        }
1345

1346
        /**
1347
         * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
1348
         * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
1349
         * map. See {@link InvoiceUpdateParams.AutomaticTax.Liability#extraParams} for the field
1350
         * documentation.
1351
         */
1352
        public Builder putAllExtraParam(Map<String, Object> map) {
1353
          if (this.extraParams == null) {
×
1354
            this.extraParams = new HashMap<>();
×
1355
          }
1356
          this.extraParams.putAll(map);
×
1357
          return this;
×
1358
        }
1359

1360
        /** <strong>Required.</strong> Type of the account referenced in the request. */
1361
        public Builder setType(InvoiceUpdateParams.AutomaticTax.Liability.Type type) {
1362
          this.type = type;
×
1363
          return this;
×
1364
        }
1365
      }
1366

1367
      public enum Type implements ApiRequestParams.EnumParam {
×
1368
        @SerializedName("account")
×
1369
        ACCOUNT("account"),
1370

1371
        @SerializedName("self")
×
1372
        SELF("self");
1373

1374
        @Getter(onMethod_ = {@Override})
1375
        private final String value;
1376

1377
        Type(String value) {
×
1378
          this.value = value;
×
1379
        }
×
1380
      }
1381
    }
1382
  }
1383

1384
  @Getter
1385
  public static class CustomField {
1386
    /**
1387
     * Map of extra parameters for custom features not available in this client library. The content
1388
     * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each
1389
     * key/value pair is serialized as if the key is a root-level field (serialized) name in this
1390
     * param object. Effectively, this map is flattened to its parent instance.
1391
     */
1392
    @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
1393
    Map<String, Object> extraParams;
1394

1395
    /** <strong>Required.</strong> The name of the custom field. This may be up to 40 characters. */
1396
    @SerializedName("name")
1397
    Object name;
1398

1399
    /**
1400
     * <strong>Required.</strong> The value of the custom field. This may be up to 140 characters.
1401
     */
1402
    @SerializedName("value")
1403
    Object value;
1404

1405
    private CustomField(Map<String, Object> extraParams, Object name, Object value) {
1✔
1406
      this.extraParams = extraParams;
1✔
1407
      this.name = name;
1✔
1408
      this.value = value;
1✔
1409
    }
1✔
1410

1411
    public static Builder builder() {
1412
      return new Builder();
1✔
1413
    }
1414

1415
    public static class Builder {
1✔
1416
      private Map<String, Object> extraParams;
1417

1418
      private Object name;
1419

1420
      private Object value;
1421

1422
      /** Finalize and obtain parameter instance from this builder. */
1423
      public InvoiceUpdateParams.CustomField build() {
1424
        return new InvoiceUpdateParams.CustomField(this.extraParams, this.name, this.value);
1✔
1425
      }
1426

1427
      /**
1428
       * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll`
1429
       * call, and subsequent calls add additional key/value pairs to the original map. See {@link
1430
       * InvoiceUpdateParams.CustomField#extraParams} for the field documentation.
1431
       */
1432
      public Builder putExtraParam(String key, Object value) {
1433
        if (this.extraParams == null) {
×
1434
          this.extraParams = new HashMap<>();
×
1435
        }
1436
        this.extraParams.put(key, value);
×
1437
        return this;
×
1438
      }
1439

1440
      /**
1441
       * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
1442
       * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map.
1443
       * See {@link InvoiceUpdateParams.CustomField#extraParams} for the field documentation.
1444
       */
1445
      public Builder putAllExtraParam(Map<String, Object> map) {
1446
        if (this.extraParams == null) {
×
1447
          this.extraParams = new HashMap<>();
×
1448
        }
1449
        this.extraParams.putAll(map);
×
1450
        return this;
×
1451
      }
1452

1453
      /**
1454
       * <strong>Required.</strong> The name of the custom field. This may be up to 40 characters.
1455
       */
1456
      public Builder setName(String name) {
1457
        this.name = name;
1✔
1458
        return this;
1✔
1459
      }
1460

1461
      /**
1462
       * <strong>Required.</strong> The name of the custom field. This may be up to 40 characters.
1463
       */
1464
      public Builder setName(EmptyParam name) {
1465
        this.name = name;
×
1466
        return this;
×
1467
      }
1468

1469
      /**
1470
       * <strong>Required.</strong> The value of the custom field. This may be up to 140 characters.
1471
       */
1472
      public Builder setValue(String value) {
1473
        this.value = value;
1✔
1474
        return this;
1✔
1475
      }
1476

1477
      /**
1478
       * <strong>Required.</strong> The value of the custom field. This may be up to 140 characters.
1479
       */
1480
      public Builder setValue(EmptyParam value) {
1481
        this.value = value;
×
1482
        return this;
×
1483
      }
1484
    }
1485
  }
1486

1487
  @Getter
1488
  public static class Discount {
1489
    /** ID of the coupon to create a new discount for. */
1490
    @SerializedName("coupon")
1491
    Object coupon;
1492

1493
    /** ID of an existing discount on the object (or one of its ancestors) to reuse. */
1494
    @SerializedName("discount")
1495
    Object discount;
1496

1497
    /** Details to determine how long the discount should be applied for. */
1498
    @SerializedName("discount_end")
1499
    DiscountEnd discountEnd;
1500

1501
    /**
1502
     * Map of extra parameters for custom features not available in this client library. The content
1503
     * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each
1504
     * key/value pair is serialized as if the key is a root-level field (serialized) name in this
1505
     * param object. Effectively, this map is flattened to its parent instance.
1506
     */
1507
    @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
1508
    Map<String, Object> extraParams;
1509

1510
    /** ID of the promotion code to create a new discount for. */
1511
    @SerializedName("promotion_code")
1512
    Object promotionCode;
1513

1514
    private Discount(
1515
        Object coupon,
1516
        Object discount,
1517
        DiscountEnd discountEnd,
1518
        Map<String, Object> extraParams,
1519
        Object promotionCode) {
×
1520
      this.coupon = coupon;
×
1521
      this.discount = discount;
×
1522
      this.discountEnd = discountEnd;
×
1523
      this.extraParams = extraParams;
×
1524
      this.promotionCode = promotionCode;
×
1525
    }
×
1526

1527
    public static Builder builder() {
1528
      return new Builder();
×
1529
    }
1530

1531
    public static class Builder {
×
1532
      private Object coupon;
1533

1534
      private Object discount;
1535

1536
      private DiscountEnd discountEnd;
1537

1538
      private Map<String, Object> extraParams;
1539

1540
      private Object promotionCode;
1541

1542
      /** Finalize and obtain parameter instance from this builder. */
1543
      public InvoiceUpdateParams.Discount build() {
1544
        return new InvoiceUpdateParams.Discount(
×
1545
            this.coupon, this.discount, this.discountEnd, this.extraParams, this.promotionCode);
1546
      }
1547

1548
      /** ID of the coupon to create a new discount for. */
1549
      public Builder setCoupon(String coupon) {
1550
        this.coupon = coupon;
×
1551
        return this;
×
1552
      }
1553

1554
      /** ID of the coupon to create a new discount for. */
1555
      public Builder setCoupon(EmptyParam coupon) {
1556
        this.coupon = coupon;
×
1557
        return this;
×
1558
      }
1559

1560
      /** ID of an existing discount on the object (or one of its ancestors) to reuse. */
1561
      public Builder setDiscount(String discount) {
1562
        this.discount = discount;
×
1563
        return this;
×
1564
      }
1565

1566
      /** ID of an existing discount on the object (or one of its ancestors) to reuse. */
1567
      public Builder setDiscount(EmptyParam discount) {
1568
        this.discount = discount;
×
1569
        return this;
×
1570
      }
1571

1572
      /** Details to determine how long the discount should be applied for. */
1573
      public Builder setDiscountEnd(InvoiceUpdateParams.Discount.DiscountEnd discountEnd) {
1574
        this.discountEnd = discountEnd;
×
1575
        return this;
×
1576
      }
1577

1578
      /**
1579
       * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll`
1580
       * call, and subsequent calls add additional key/value pairs to the original map. See {@link
1581
       * InvoiceUpdateParams.Discount#extraParams} for 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 map.
1594
       * See {@link InvoiceUpdateParams.Discount#extraParams} for the field documentation.
1595
       */
1596
      public Builder putAllExtraParam(Map<String, Object> map) {
1597
        if (this.extraParams == null) {
×
1598
          this.extraParams = new HashMap<>();
×
1599
        }
1600
        this.extraParams.putAll(map);
×
1601
        return this;
×
1602
      }
1603

1604
      /** ID of the promotion code to create a new discount for. */
1605
      public Builder setPromotionCode(String promotionCode) {
1606
        this.promotionCode = promotionCode;
×
1607
        return this;
×
1608
      }
1609

1610
      /** ID of the promotion code to create a new discount for. */
1611
      public Builder setPromotionCode(EmptyParam promotionCode) {
1612
        this.promotionCode = promotionCode;
×
1613
        return this;
×
1614
      }
1615
    }
1616

1617
    @Getter
1618
    public static class DiscountEnd {
1619
      /** Time span for the redeemed discount. */
1620
      @SerializedName("duration")
1621
      Duration duration;
1622

1623
      /**
1624
       * Map of extra parameters for custom features not available in this client library. The
1625
       * content in this map is not serialized under this field's {@code @SerializedName} value.
1626
       * Instead, each key/value pair is serialized as if the key is a root-level field (serialized)
1627
       * name in this param object. Effectively, this map is flattened to its parent instance.
1628
       */
1629
      @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
1630
      Map<String, Object> extraParams;
1631

1632
      /** A precise Unix timestamp for the discount to end. Must be in the future. */
1633
      @SerializedName("timestamp")
1634
      Long timestamp;
1635

1636
      /**
1637
       * <strong>Required.</strong> The type of calculation made to determine when the discount
1638
       * ends.
1639
       */
1640
      @SerializedName("type")
1641
      Type type;
1642

1643
      private DiscountEnd(
1644
          Duration duration, Map<String, Object> extraParams, Long timestamp, Type type) {
×
1645
        this.duration = duration;
×
1646
        this.extraParams = extraParams;
×
1647
        this.timestamp = timestamp;
×
1648
        this.type = type;
×
1649
      }
×
1650

1651
      public static Builder builder() {
1652
        return new Builder();
×
1653
      }
1654

1655
      public static class Builder {
×
1656
        private Duration duration;
1657

1658
        private Map<String, Object> extraParams;
1659

1660
        private Long timestamp;
1661

1662
        private Type type;
1663

1664
        /** Finalize and obtain parameter instance from this builder. */
1665
        public InvoiceUpdateParams.Discount.DiscountEnd build() {
1666
          return new InvoiceUpdateParams.Discount.DiscountEnd(
×
1667
              this.duration, this.extraParams, this.timestamp, this.type);
1668
        }
1669

1670
        /** Time span for the redeemed discount. */
1671
        public Builder setDuration(InvoiceUpdateParams.Discount.DiscountEnd.Duration duration) {
1672
          this.duration = duration;
×
1673
          return this;
×
1674
        }
1675

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

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

1704
        /** A precise Unix timestamp for the discount to end. Must be in the future. */
1705
        public Builder setTimestamp(Long timestamp) {
1706
          this.timestamp = timestamp;
×
1707
          return this;
×
1708
        }
1709

1710
        /**
1711
         * <strong>Required.</strong> The type of calculation made to determine when the discount
1712
         * ends.
1713
         */
1714
        public Builder setType(InvoiceUpdateParams.Discount.DiscountEnd.Type type) {
1715
          this.type = type;
×
1716
          return this;
×
1717
        }
1718
      }
1719

1720
      @Getter
1721
      public static class Duration {
1722
        /**
1723
         * Map of extra parameters for custom features not available in this client library. The
1724
         * content in this map is not serialized under this field's {@code @SerializedName} value.
1725
         * Instead, each key/value pair is serialized as if the key is a root-level field
1726
         * (serialized) name in this param object. Effectively, this map is flattened to its parent
1727
         * instance.
1728
         */
1729
        @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
1730
        Map<String, Object> extraParams;
1731

1732
        /**
1733
         * <strong>Required.</strong> Specifies a type of interval unit. Either {@code day}, {@code
1734
         * week}, {@code month} or {@code year}.
1735
         */
1736
        @SerializedName("interval")
1737
        Interval interval;
1738

1739
        /**
1740
         * <strong>Required.</strong> The number of intervals, as an whole number greater than 0.
1741
         * Stripe multiplies this by the interval type to get the overall duration.
1742
         */
1743
        @SerializedName("interval_count")
1744
        Long intervalCount;
1745

1746
        private Duration(Map<String, Object> extraParams, Interval interval, Long intervalCount) {
×
1747
          this.extraParams = extraParams;
×
1748
          this.interval = interval;
×
1749
          this.intervalCount = intervalCount;
×
1750
        }
×
1751

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

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

1759
          private Interval interval;
1760

1761
          private Long intervalCount;
1762

1763
          /** Finalize and obtain parameter instance from this builder. */
1764
          public InvoiceUpdateParams.Discount.DiscountEnd.Duration build() {
1765
            return new InvoiceUpdateParams.Discount.DiscountEnd.Duration(
×
1766
                this.extraParams, this.interval, this.intervalCount);
1767
          }
1768

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

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

1797
          /**
1798
           * <strong>Required.</strong> Specifies a type of interval unit. Either {@code day},
1799
           * {@code week}, {@code month} or {@code year}.
1800
           */
1801
          public Builder setInterval(
1802
              InvoiceUpdateParams.Discount.DiscountEnd.Duration.Interval interval) {
1803
            this.interval = interval;
×
1804
            return this;
×
1805
          }
1806

1807
          /**
1808
           * <strong>Required.</strong> The number of intervals, as an whole number greater than 0.
1809
           * Stripe multiplies this by the interval type to get the overall duration.
1810
           */
1811
          public Builder setIntervalCount(Long intervalCount) {
1812
            this.intervalCount = intervalCount;
×
1813
            return this;
×
1814
          }
1815
        }
1816

1817
        public enum Interval implements ApiRequestParams.EnumParam {
×
1818
          @SerializedName("day")
×
1819
          DAY("day"),
1820

1821
          @SerializedName("month")
×
1822
          MONTH("month"),
1823

1824
          @SerializedName("week")
×
1825
          WEEK("week"),
1826

1827
          @SerializedName("year")
×
1828
          YEAR("year");
1829

1830
          @Getter(onMethod_ = {@Override})
1831
          private final String value;
1832

1833
          Interval(String value) {
×
1834
            this.value = value;
×
1835
          }
×
1836
        }
1837
      }
1838

1839
      public enum Type implements ApiRequestParams.EnumParam {
×
1840
        @SerializedName("duration")
×
1841
        DURATION("duration"),
1842

1843
        @SerializedName("timestamp")
×
1844
        TIMESTAMP("timestamp");
1845

1846
        @Getter(onMethod_ = {@Override})
1847
        private final String value;
1848

1849
        Type(String value) {
×
1850
          this.value = value;
×
1851
        }
×
1852
      }
1853
    }
1854
  }
1855

1856
  @Getter
1857
  public static class Issuer {
1858
    /** The connected account being referenced when {@code type} is {@code account}. */
1859
    @SerializedName("account")
1860
    Object account;
1861

1862
    /**
1863
     * Map of extra parameters for custom features not available in this client library. The content
1864
     * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each
1865
     * key/value pair is serialized as if the key is a root-level field (serialized) name in this
1866
     * param object. Effectively, this map is flattened to its parent instance.
1867
     */
1868
    @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
1869
    Map<String, Object> extraParams;
1870

1871
    /** <strong>Required.</strong> Type of the account referenced in the request. */
1872
    @SerializedName("type")
1873
    Type type;
1874

1875
    private Issuer(Object account, Map<String, Object> extraParams, Type type) {
×
1876
      this.account = account;
×
1877
      this.extraParams = extraParams;
×
1878
      this.type = type;
×
1879
    }
×
1880

1881
    public static Builder builder() {
1882
      return new Builder();
×
1883
    }
1884

1885
    public static class Builder {
×
1886
      private Object account;
1887

1888
      private Map<String, Object> extraParams;
1889

1890
      private Type type;
1891

1892
      /** Finalize and obtain parameter instance from this builder. */
1893
      public InvoiceUpdateParams.Issuer build() {
1894
        return new InvoiceUpdateParams.Issuer(this.account, this.extraParams, this.type);
×
1895
      }
1896

1897
      /** The connected account being referenced when {@code type} is {@code account}. */
1898
      public Builder setAccount(String account) {
1899
        this.account = account;
×
1900
        return this;
×
1901
      }
1902

1903
      /** The connected account being referenced when {@code type} is {@code account}. */
1904
      public Builder setAccount(EmptyParam account) {
1905
        this.account = account;
×
1906
        return this;
×
1907
      }
1908

1909
      /**
1910
       * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll`
1911
       * call, and subsequent calls add additional key/value pairs to the original map. See {@link
1912
       * InvoiceUpdateParams.Issuer#extraParams} for the field documentation.
1913
       */
1914
      public Builder putExtraParam(String key, Object value) {
1915
        if (this.extraParams == null) {
×
1916
          this.extraParams = new HashMap<>();
×
1917
        }
1918
        this.extraParams.put(key, value);
×
1919
        return this;
×
1920
      }
1921

1922
      /**
1923
       * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
1924
       * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map.
1925
       * See {@link InvoiceUpdateParams.Issuer#extraParams} for the field documentation.
1926
       */
1927
      public Builder putAllExtraParam(Map<String, Object> map) {
1928
        if (this.extraParams == null) {
×
1929
          this.extraParams = new HashMap<>();
×
1930
        }
1931
        this.extraParams.putAll(map);
×
1932
        return this;
×
1933
      }
1934

1935
      /** <strong>Required.</strong> Type of the account referenced in the request. */
1936
      public Builder setType(InvoiceUpdateParams.Issuer.Type type) {
1937
        this.type = type;
×
1938
        return this;
×
1939
      }
1940
    }
1941

1942
    public enum Type implements ApiRequestParams.EnumParam {
×
1943
      @SerializedName("account")
×
1944
      ACCOUNT("account"),
1945

1946
      @SerializedName("self")
×
1947
      SELF("self");
1948

1949
      @Getter(onMethod_ = {@Override})
1950
      private final String value;
1951

1952
      Type(String value) {
×
1953
        this.value = value;
×
1954
      }
×
1955
    }
1956
  }
1957

1958
  @Getter
1959
  public static class PaymentSettings {
1960
    /**
1961
     * ID of the mandate to be used for this invoice. It must correspond to the payment method used
1962
     * to pay the invoice, including the invoice's default_payment_method or default_source, if set.
1963
     */
1964
    @SerializedName("default_mandate")
1965
    Object defaultMandate;
1966

1967
    /**
1968
     * Map of extra parameters for custom features not available in this client library. The content
1969
     * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each
1970
     * key/value pair is serialized as if the key is a root-level field (serialized) name in this
1971
     * param object. Effectively, this map is flattened to its parent instance.
1972
     */
1973
    @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
1974
    Map<String, Object> extraParams;
1975

1976
    /** Payment-method-specific configuration to provide to the invoice’s PaymentIntent. */
1977
    @SerializedName("payment_method_options")
1978
    PaymentMethodOptions paymentMethodOptions;
1979

1980
    /**
1981
     * The list of payment method types (e.g. card) to provide to the invoice’s PaymentIntent. If
1982
     * not set, Stripe attempts to automatically determine the types to use by looking at the
1983
     * invoice’s default payment method, the subscription’s default payment method, the customer’s
1984
     * default payment method, and your <a
1985
     * href="https://dashboard.stripe.com/settings/billing/invoice">invoice template settings</a>.
1986
     */
1987
    @SerializedName("payment_method_types")
1988
    Object paymentMethodTypes;
1989

1990
    private PaymentSettings(
1991
        Object defaultMandate,
1992
        Map<String, Object> extraParams,
1993
        PaymentMethodOptions paymentMethodOptions,
1994
        Object paymentMethodTypes) {
×
1995
      this.defaultMandate = defaultMandate;
×
1996
      this.extraParams = extraParams;
×
1997
      this.paymentMethodOptions = paymentMethodOptions;
×
1998
      this.paymentMethodTypes = paymentMethodTypes;
×
1999
    }
×
2000

2001
    public static Builder builder() {
2002
      return new Builder();
×
2003
    }
2004

2005
    public static class Builder {
×
2006
      private Object defaultMandate;
2007

2008
      private Map<String, Object> extraParams;
2009

2010
      private PaymentMethodOptions paymentMethodOptions;
2011

2012
      private Object paymentMethodTypes;
2013

2014
      /** Finalize and obtain parameter instance from this builder. */
2015
      public InvoiceUpdateParams.PaymentSettings build() {
2016
        return new InvoiceUpdateParams.PaymentSettings(
×
2017
            this.defaultMandate,
2018
            this.extraParams,
2019
            this.paymentMethodOptions,
2020
            this.paymentMethodTypes);
2021
      }
2022

2023
      /**
2024
       * ID of the mandate to be used for this invoice. It must correspond to the payment method
2025
       * used to pay the invoice, including the invoice's default_payment_method or default_source,
2026
       * if set.
2027
       */
2028
      public Builder setDefaultMandate(String defaultMandate) {
2029
        this.defaultMandate = defaultMandate;
×
2030
        return this;
×
2031
      }
2032

2033
      /**
2034
       * ID of the mandate to be used for this invoice. It must correspond to the payment method
2035
       * used to pay the invoice, including the invoice's default_payment_method or default_source,
2036
       * if set.
2037
       */
2038
      public Builder setDefaultMandate(EmptyParam defaultMandate) {
2039
        this.defaultMandate = defaultMandate;
×
2040
        return this;
×
2041
      }
2042

2043
      /**
2044
       * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll`
2045
       * call, and subsequent calls add additional key/value pairs to the original map. See {@link
2046
       * InvoiceUpdateParams.PaymentSettings#extraParams} for the field documentation.
2047
       */
2048
      public Builder putExtraParam(String key, Object value) {
2049
        if (this.extraParams == null) {
×
2050
          this.extraParams = new HashMap<>();
×
2051
        }
2052
        this.extraParams.put(key, value);
×
2053
        return this;
×
2054
      }
2055

2056
      /**
2057
       * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
2058
       * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map.
2059
       * See {@link InvoiceUpdateParams.PaymentSettings#extraParams} for the field documentation.
2060
       */
2061
      public Builder putAllExtraParam(Map<String, Object> map) {
2062
        if (this.extraParams == null) {
×
2063
          this.extraParams = new HashMap<>();
×
2064
        }
2065
        this.extraParams.putAll(map);
×
2066
        return this;
×
2067
      }
2068

2069
      /** Payment-method-specific configuration to provide to the invoice’s PaymentIntent. */
2070
      public Builder setPaymentMethodOptions(
2071
          InvoiceUpdateParams.PaymentSettings.PaymentMethodOptions paymentMethodOptions) {
2072
        this.paymentMethodOptions = paymentMethodOptions;
×
2073
        return this;
×
2074
      }
2075

2076
      /**
2077
       * Add an element to `paymentMethodTypes` list. A list is initialized for the first
2078
       * `add/addAll` call, and subsequent calls adds additional elements to the original list. See
2079
       * {@link InvoiceUpdateParams.PaymentSettings#paymentMethodTypes} for the field documentation.
2080
       */
2081
      @SuppressWarnings("unchecked")
2082
      public Builder addPaymentMethodType(
2083
          InvoiceUpdateParams.PaymentSettings.PaymentMethodType element) {
2084
        if (this.paymentMethodTypes == null || this.paymentMethodTypes instanceof EmptyParam) {
×
2085
          this.paymentMethodTypes =
×
2086
              new ArrayList<InvoiceUpdateParams.PaymentSettings.PaymentMethodType>();
2087
        }
2088
        ((List<InvoiceUpdateParams.PaymentSettings.PaymentMethodType>) this.paymentMethodTypes)
×
2089
            .add(element);
×
2090
        return this;
×
2091
      }
2092

2093
      /**
2094
       * Add all elements to `paymentMethodTypes` list. A list is initialized for the first
2095
       * `add/addAll` call, and subsequent calls adds additional elements to the original list. See
2096
       * {@link InvoiceUpdateParams.PaymentSettings#paymentMethodTypes} for the field documentation.
2097
       */
2098
      @SuppressWarnings("unchecked")
2099
      public Builder addAllPaymentMethodType(
2100
          List<InvoiceUpdateParams.PaymentSettings.PaymentMethodType> elements) {
2101
        if (this.paymentMethodTypes == null || this.paymentMethodTypes instanceof EmptyParam) {
×
2102
          this.paymentMethodTypes =
×
2103
              new ArrayList<InvoiceUpdateParams.PaymentSettings.PaymentMethodType>();
2104
        }
2105
        ((List<InvoiceUpdateParams.PaymentSettings.PaymentMethodType>) this.paymentMethodTypes)
×
2106
            .addAll(elements);
×
2107
        return this;
×
2108
      }
2109

2110
      /**
2111
       * The list of payment method types (e.g. card) to provide to the invoice’s PaymentIntent. If
2112
       * not set, Stripe attempts to automatically determine the types to use by looking at the
2113
       * invoice’s default payment method, the subscription’s default payment method, the customer’s
2114
       * default payment method, and your <a
2115
       * href="https://dashboard.stripe.com/settings/billing/invoice">invoice template settings</a>.
2116
       */
2117
      public Builder setPaymentMethodTypes(EmptyParam paymentMethodTypes) {
2118
        this.paymentMethodTypes = paymentMethodTypes;
×
2119
        return this;
×
2120
      }
2121

2122
      /**
2123
       * The list of payment method types (e.g. card) to provide to the invoice’s PaymentIntent. If
2124
       * not set, Stripe attempts to automatically determine the types to use by looking at the
2125
       * invoice’s default payment method, the subscription’s default payment method, the customer’s
2126
       * default payment method, and your <a
2127
       * href="https://dashboard.stripe.com/settings/billing/invoice">invoice template settings</a>.
2128
       */
2129
      public Builder setPaymentMethodTypes(
2130
          List<InvoiceUpdateParams.PaymentSettings.PaymentMethodType> paymentMethodTypes) {
2131
        this.paymentMethodTypes = paymentMethodTypes;
×
2132
        return this;
×
2133
      }
2134
    }
2135

2136
    @Getter
2137
    public static class PaymentMethodOptions {
2138
      /**
2139
       * If paying by {@code acss_debit}, this sub-hash contains details about the Canadian
2140
       * pre-authorized debit payment method options to pass to the invoice’s PaymentIntent.
2141
       */
2142
      @SerializedName("acss_debit")
2143
      Object acssDebit;
2144

2145
      /**
2146
       * If paying by {@code bancontact}, this sub-hash contains details about the Bancontact
2147
       * payment method options to pass to the invoice’s PaymentIntent.
2148
       */
2149
      @SerializedName("bancontact")
2150
      Object bancontact;
2151

2152
      /**
2153
       * If paying by {@code card}, this sub-hash contains details about the Card payment method
2154
       * options to pass to the invoice’s PaymentIntent.
2155
       */
2156
      @SerializedName("card")
2157
      Object card;
2158

2159
      /**
2160
       * If paying by {@code customer_balance}, this sub-hash contains details about the Bank
2161
       * transfer payment method options to pass to the invoice’s PaymentIntent.
2162
       */
2163
      @SerializedName("customer_balance")
2164
      Object customerBalance;
2165

2166
      /**
2167
       * Map of extra parameters for custom features not available in this client library. The
2168
       * content in this map is not serialized under this field's {@code @SerializedName} value.
2169
       * Instead, each key/value pair is serialized as if the key is a root-level field (serialized)
2170
       * name in this param object. Effectively, this map is flattened to its parent instance.
2171
       */
2172
      @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
2173
      Map<String, Object> extraParams;
2174

2175
      /**
2176
       * If paying by {@code konbini}, this sub-hash contains details about the Konbini payment
2177
       * method options to pass to the invoice’s PaymentIntent.
2178
       */
2179
      @SerializedName("konbini")
2180
      Object konbini;
2181

2182
      /**
2183
       * If paying by {@code sepa_debit}, this sub-hash contains details about the SEPA Direct Debit
2184
       * payment method options to pass to the invoice’s PaymentIntent.
2185
       */
2186
      @SerializedName("sepa_debit")
2187
      Object sepaDebit;
2188

2189
      /**
2190
       * If paying by {@code us_bank_account}, this sub-hash contains details about the ACH direct
2191
       * debit payment method options to pass to the invoice’s PaymentIntent.
2192
       */
2193
      @SerializedName("us_bank_account")
2194
      Object usBankAccount;
2195

2196
      private PaymentMethodOptions(
2197
          Object acssDebit,
2198
          Object bancontact,
2199
          Object card,
2200
          Object customerBalance,
2201
          Map<String, Object> extraParams,
2202
          Object konbini,
2203
          Object sepaDebit,
2204
          Object usBankAccount) {
×
2205
        this.acssDebit = acssDebit;
×
2206
        this.bancontact = bancontact;
×
2207
        this.card = card;
×
2208
        this.customerBalance = customerBalance;
×
2209
        this.extraParams = extraParams;
×
2210
        this.konbini = konbini;
×
2211
        this.sepaDebit = sepaDebit;
×
2212
        this.usBankAccount = usBankAccount;
×
2213
      }
×
2214

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

2219
      public static class Builder {
×
2220
        private Object acssDebit;
2221

2222
        private Object bancontact;
2223

2224
        private Object card;
2225

2226
        private Object customerBalance;
2227

2228
        private Map<String, Object> extraParams;
2229

2230
        private Object konbini;
2231

2232
        private Object sepaDebit;
2233

2234
        private Object usBankAccount;
2235

2236
        /** Finalize and obtain parameter instance from this builder. */
2237
        public InvoiceUpdateParams.PaymentSettings.PaymentMethodOptions build() {
2238
          return new InvoiceUpdateParams.PaymentSettings.PaymentMethodOptions(
×
2239
              this.acssDebit,
2240
              this.bancontact,
2241
              this.card,
2242
              this.customerBalance,
2243
              this.extraParams,
2244
              this.konbini,
2245
              this.sepaDebit,
2246
              this.usBankAccount);
2247
        }
2248

2249
        /**
2250
         * If paying by {@code acss_debit}, this sub-hash contains details about the Canadian
2251
         * pre-authorized debit payment method options to pass to the invoice’s PaymentIntent.
2252
         */
2253
        public Builder setAcssDebit(
2254
            InvoiceUpdateParams.PaymentSettings.PaymentMethodOptions.AcssDebit acssDebit) {
2255
          this.acssDebit = acssDebit;
×
2256
          return this;
×
2257
        }
2258

2259
        /**
2260
         * If paying by {@code acss_debit}, this sub-hash contains details about the Canadian
2261
         * pre-authorized debit payment method options to pass to the invoice’s PaymentIntent.
2262
         */
2263
        public Builder setAcssDebit(EmptyParam acssDebit) {
2264
          this.acssDebit = acssDebit;
×
2265
          return this;
×
2266
        }
2267

2268
        /**
2269
         * If paying by {@code bancontact}, this sub-hash contains details about the Bancontact
2270
         * payment method options to pass to the invoice’s PaymentIntent.
2271
         */
2272
        public Builder setBancontact(
2273
            InvoiceUpdateParams.PaymentSettings.PaymentMethodOptions.Bancontact bancontact) {
2274
          this.bancontact = bancontact;
×
2275
          return this;
×
2276
        }
2277

2278
        /**
2279
         * If paying by {@code bancontact}, this sub-hash contains details about the Bancontact
2280
         * payment method options to pass to the invoice’s PaymentIntent.
2281
         */
2282
        public Builder setBancontact(EmptyParam bancontact) {
2283
          this.bancontact = bancontact;
×
2284
          return this;
×
2285
        }
2286

2287
        /**
2288
         * If paying by {@code card}, this sub-hash contains details about the Card payment method
2289
         * options to pass to the invoice’s PaymentIntent.
2290
         */
2291
        public Builder setCard(InvoiceUpdateParams.PaymentSettings.PaymentMethodOptions.Card card) {
2292
          this.card = card;
×
2293
          return this;
×
2294
        }
2295

2296
        /**
2297
         * If paying by {@code card}, this sub-hash contains details about the Card payment method
2298
         * options to pass to the invoice’s PaymentIntent.
2299
         */
2300
        public Builder setCard(EmptyParam card) {
2301
          this.card = card;
×
2302
          return this;
×
2303
        }
2304

2305
        /**
2306
         * If paying by {@code customer_balance}, this sub-hash contains details about the Bank
2307
         * transfer payment method options to pass to the invoice’s PaymentIntent.
2308
         */
2309
        public Builder setCustomerBalance(
2310
            InvoiceUpdateParams.PaymentSettings.PaymentMethodOptions.CustomerBalance
2311
                customerBalance) {
2312
          this.customerBalance = customerBalance;
×
2313
          return this;
×
2314
        }
2315

2316
        /**
2317
         * If paying by {@code customer_balance}, this sub-hash contains details about the Bank
2318
         * transfer payment method options to pass to the invoice’s PaymentIntent.
2319
         */
2320
        public Builder setCustomerBalance(EmptyParam customerBalance) {
2321
          this.customerBalance = customerBalance;
×
2322
          return this;
×
2323
        }
2324

2325
        /**
2326
         * Add a key/value pair to `extraParams` map. A map is initialized for the first
2327
         * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
2328
         * map. See {@link InvoiceUpdateParams.PaymentSettings.PaymentMethodOptions#extraParams} for
2329
         * the field documentation.
2330
         */
2331
        public Builder putExtraParam(String key, Object value) {
2332
          if (this.extraParams == null) {
×
2333
            this.extraParams = new HashMap<>();
×
2334
          }
2335
          this.extraParams.put(key, value);
×
2336
          return this;
×
2337
        }
2338

2339
        /**
2340
         * Add all map key/value pairs 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 InvoiceUpdateParams.PaymentSettings.PaymentMethodOptions#extraParams} for
2343
         * the field documentation.
2344
         */
2345
        public Builder putAllExtraParam(Map<String, Object> map) {
2346
          if (this.extraParams == null) {
×
2347
            this.extraParams = new HashMap<>();
×
2348
          }
2349
          this.extraParams.putAll(map);
×
2350
          return this;
×
2351
        }
2352

2353
        /**
2354
         * If paying by {@code konbini}, this sub-hash contains details about the Konbini payment
2355
         * method options to pass to the invoice’s PaymentIntent.
2356
         */
2357
        public Builder setKonbini(
2358
            InvoiceUpdateParams.PaymentSettings.PaymentMethodOptions.Konbini konbini) {
2359
          this.konbini = konbini;
×
2360
          return this;
×
2361
        }
2362

2363
        /**
2364
         * If paying by {@code konbini}, this sub-hash contains details about the Konbini payment
2365
         * method options to pass to the invoice’s PaymentIntent.
2366
         */
2367
        public Builder setKonbini(EmptyParam konbini) {
2368
          this.konbini = konbini;
×
2369
          return this;
×
2370
        }
2371

2372
        /**
2373
         * If paying by {@code sepa_debit}, this sub-hash contains details about the SEPA Direct
2374
         * Debit payment method options to pass to the invoice’s PaymentIntent.
2375
         */
2376
        public Builder setSepaDebit(
2377
            InvoiceUpdateParams.PaymentSettings.PaymentMethodOptions.SepaDebit sepaDebit) {
2378
          this.sepaDebit = sepaDebit;
×
2379
          return this;
×
2380
        }
2381

2382
        /**
2383
         * If paying by {@code sepa_debit}, this sub-hash contains details about the SEPA Direct
2384
         * Debit payment method options to pass to the invoice’s PaymentIntent.
2385
         */
2386
        public Builder setSepaDebit(EmptyParam sepaDebit) {
2387
          this.sepaDebit = sepaDebit;
×
2388
          return this;
×
2389
        }
2390

2391
        /**
2392
         * If paying by {@code us_bank_account}, this sub-hash contains details about the ACH direct
2393
         * debit payment method options to pass to the invoice’s PaymentIntent.
2394
         */
2395
        public Builder setUsBankAccount(
2396
            InvoiceUpdateParams.PaymentSettings.PaymentMethodOptions.UsBankAccount usBankAccount) {
2397
          this.usBankAccount = usBankAccount;
×
2398
          return this;
×
2399
        }
2400

2401
        /**
2402
         * If paying by {@code us_bank_account}, this sub-hash contains details about the ACH direct
2403
         * debit payment method options to pass to the invoice’s PaymentIntent.
2404
         */
2405
        public Builder setUsBankAccount(EmptyParam usBankAccount) {
2406
          this.usBankAccount = usBankAccount;
×
2407
          return this;
×
2408
        }
2409
      }
2410

2411
      @Getter
2412
      public static class AcssDebit {
2413
        /**
2414
         * Map of extra parameters for custom features not available in this client library. The
2415
         * content in this map is not serialized under this field's {@code @SerializedName} value.
2416
         * Instead, each key/value pair is serialized as if the key is a root-level field
2417
         * (serialized) name in this param object. Effectively, this map is flattened to its parent
2418
         * instance.
2419
         */
2420
        @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
2421
        Map<String, Object> extraParams;
2422

2423
        /** Additional fields for Mandate creation. */
2424
        @SerializedName("mandate_options")
2425
        MandateOptions mandateOptions;
2426

2427
        /** Verification method for the intent. */
2428
        @SerializedName("verification_method")
2429
        VerificationMethod verificationMethod;
2430

2431
        private AcssDebit(
2432
            Map<String, Object> extraParams,
2433
            MandateOptions mandateOptions,
2434
            VerificationMethod verificationMethod) {
×
2435
          this.extraParams = extraParams;
×
2436
          this.mandateOptions = mandateOptions;
×
2437
          this.verificationMethod = verificationMethod;
×
2438
        }
×
2439

2440
        public static Builder builder() {
2441
          return new Builder();
×
2442
        }
2443

2444
        public static class Builder {
×
2445
          private Map<String, Object> extraParams;
2446

2447
          private MandateOptions mandateOptions;
2448

2449
          private VerificationMethod verificationMethod;
2450

2451
          /** Finalize and obtain parameter instance from this builder. */
2452
          public InvoiceUpdateParams.PaymentSettings.PaymentMethodOptions.AcssDebit build() {
2453
            return new InvoiceUpdateParams.PaymentSettings.PaymentMethodOptions.AcssDebit(
×
2454
                this.extraParams, this.mandateOptions, this.verificationMethod);
2455
          }
2456

2457
          /**
2458
           * Add a key/value pair 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
2461
           * InvoiceUpdateParams.PaymentSettings.PaymentMethodOptions.AcssDebit#extraParams} for the
2462
           * field documentation.
2463
           */
2464
          public Builder putExtraParam(String key, Object value) {
2465
            if (this.extraParams == null) {
×
2466
              this.extraParams = new HashMap<>();
×
2467
            }
2468
            this.extraParams.put(key, value);
×
2469
            return this;
×
2470
          }
2471

2472
          /**
2473
           * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
2474
           * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
2475
           * map. See {@link
2476
           * InvoiceUpdateParams.PaymentSettings.PaymentMethodOptions.AcssDebit#extraParams} for the
2477
           * field documentation.
2478
           */
2479
          public Builder putAllExtraParam(Map<String, Object> map) {
2480
            if (this.extraParams == null) {
×
2481
              this.extraParams = new HashMap<>();
×
2482
            }
2483
            this.extraParams.putAll(map);
×
2484
            return this;
×
2485
          }
2486

2487
          /** Additional fields for Mandate creation. */
2488
          public Builder setMandateOptions(
2489
              InvoiceUpdateParams.PaymentSettings.PaymentMethodOptions.AcssDebit.MandateOptions
2490
                  mandateOptions) {
2491
            this.mandateOptions = mandateOptions;
×
2492
            return this;
×
2493
          }
2494

2495
          /** Verification method for the intent. */
2496
          public Builder setVerificationMethod(
2497
              InvoiceUpdateParams.PaymentSettings.PaymentMethodOptions.AcssDebit.VerificationMethod
2498
                  verificationMethod) {
2499
            this.verificationMethod = verificationMethod;
×
2500
            return this;
×
2501
          }
2502
        }
2503

2504
        @Getter
2505
        public static class MandateOptions {
2506
          /**
2507
           * Map of extra parameters for custom features not available in this client library. The
2508
           * content in this map is not serialized under this field's {@code @SerializedName} value.
2509
           * Instead, each key/value pair is serialized as if the key is a root-level field
2510
           * (serialized) name in this param object. Effectively, this map is flattened to its
2511
           * parent instance.
2512
           */
2513
          @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
2514
          Map<String, Object> extraParams;
2515

2516
          /** Transaction type of the mandate. */
2517
          @SerializedName("transaction_type")
2518
          TransactionType transactionType;
2519

2520
          private MandateOptions(Map<String, Object> extraParams, TransactionType transactionType) {
×
2521
            this.extraParams = extraParams;
×
2522
            this.transactionType = transactionType;
×
2523
          }
×
2524

2525
          public static Builder builder() {
2526
            return new Builder();
×
2527
          }
2528

2529
          public static class Builder {
×
2530
            private Map<String, Object> extraParams;
2531

2532
            private TransactionType transactionType;
2533

2534
            /** Finalize and obtain parameter instance from this builder. */
2535
            public InvoiceUpdateParams.PaymentSettings.PaymentMethodOptions.AcssDebit.MandateOptions
2536
                build() {
2537
              return new InvoiceUpdateParams.PaymentSettings.PaymentMethodOptions.AcssDebit
×
2538
                  .MandateOptions(this.extraParams, this.transactionType);
2539
            }
2540

2541
            /**
2542
             * Add a key/value pair to `extraParams` map. A map is initialized for the first
2543
             * `put/putAll` call, and subsequent calls add additional key/value pairs to the
2544
             * original map. See {@link
2545
             * InvoiceUpdateParams.PaymentSettings.PaymentMethodOptions.AcssDebit.MandateOptions#extraParams}
2546
             * for the field documentation.
2547
             */
2548
            public Builder putExtraParam(String key, Object value) {
2549
              if (this.extraParams == null) {
×
2550
                this.extraParams = new HashMap<>();
×
2551
              }
2552
              this.extraParams.put(key, value);
×
2553
              return this;
×
2554
            }
2555

2556
            /**
2557
             * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
2558
             * `put/putAll` call, and subsequent calls add additional key/value pairs to the
2559
             * original map. See {@link
2560
             * InvoiceUpdateParams.PaymentSettings.PaymentMethodOptions.AcssDebit.MandateOptions#extraParams}
2561
             * for the field documentation.
2562
             */
2563
            public Builder putAllExtraParam(Map<String, Object> map) {
2564
              if (this.extraParams == null) {
×
2565
                this.extraParams = new HashMap<>();
×
2566
              }
2567
              this.extraParams.putAll(map);
×
2568
              return this;
×
2569
            }
2570

2571
            /** Transaction type of the mandate. */
2572
            public Builder setTransactionType(
2573
                InvoiceUpdateParams.PaymentSettings.PaymentMethodOptions.AcssDebit.MandateOptions
2574
                        .TransactionType
2575
                    transactionType) {
2576
              this.transactionType = transactionType;
×
2577
              return this;
×
2578
            }
2579
          }
2580

2581
          public enum TransactionType implements ApiRequestParams.EnumParam {
×
2582
            @SerializedName("business")
×
2583
            BUSINESS("business"),
2584

2585
            @SerializedName("personal")
×
2586
            PERSONAL("personal");
2587

2588
            @Getter(onMethod_ = {@Override})
2589
            private final String value;
2590

2591
            TransactionType(String value) {
×
2592
              this.value = value;
×
2593
            }
×
2594
          }
2595
        }
2596

2597
        public enum VerificationMethod implements ApiRequestParams.EnumParam {
×
2598
          @SerializedName("automatic")
×
2599
          AUTOMATIC("automatic"),
2600

2601
          @SerializedName("instant")
×
2602
          INSTANT("instant"),
2603

2604
          @SerializedName("microdeposits")
×
2605
          MICRODEPOSITS("microdeposits");
2606

2607
          @Getter(onMethod_ = {@Override})
2608
          private final String value;
2609

2610
          VerificationMethod(String value) {
×
2611
            this.value = value;
×
2612
          }
×
2613
        }
2614
      }
2615

2616
      @Getter
2617
      public static class Bancontact {
2618
        /**
2619
         * Map of extra parameters for custom features not available in this client library. The
2620
         * content in this map is not serialized under this field's {@code @SerializedName} value.
2621
         * Instead, each key/value pair is serialized as if the key is a root-level field
2622
         * (serialized) name in this param object. Effectively, this map is flattened to its parent
2623
         * instance.
2624
         */
2625
        @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
2626
        Map<String, Object> extraParams;
2627

2628
        /**
2629
         * Preferred language of the Bancontact authorization page that the customer is redirected
2630
         * to.
2631
         */
2632
        @SerializedName("preferred_language")
2633
        PreferredLanguage preferredLanguage;
2634

2635
        private Bancontact(Map<String, Object> extraParams, PreferredLanguage preferredLanguage) {
×
2636
          this.extraParams = extraParams;
×
2637
          this.preferredLanguage = preferredLanguage;
×
2638
        }
×
2639

2640
        public static Builder builder() {
2641
          return new Builder();
×
2642
        }
2643

2644
        public static class Builder {
×
2645
          private Map<String, Object> extraParams;
2646

2647
          private PreferredLanguage preferredLanguage;
2648

2649
          /** Finalize and obtain parameter instance from this builder. */
2650
          public InvoiceUpdateParams.PaymentSettings.PaymentMethodOptions.Bancontact build() {
2651
            return new InvoiceUpdateParams.PaymentSettings.PaymentMethodOptions.Bancontact(
×
2652
                this.extraParams, this.preferredLanguage);
2653
          }
2654

2655
          /**
2656
           * Add a key/value pair to `extraParams` map. A map is initialized for the first
2657
           * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
2658
           * map. See {@link
2659
           * InvoiceUpdateParams.PaymentSettings.PaymentMethodOptions.Bancontact#extraParams} for
2660
           * the field documentation.
2661
           */
2662
          public Builder putExtraParam(String key, Object value) {
2663
            if (this.extraParams == null) {
×
2664
              this.extraParams = new HashMap<>();
×
2665
            }
2666
            this.extraParams.put(key, value);
×
2667
            return this;
×
2668
          }
2669

2670
          /**
2671
           * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
2672
           * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
2673
           * map. See {@link
2674
           * InvoiceUpdateParams.PaymentSettings.PaymentMethodOptions.Bancontact#extraParams} for
2675
           * the field documentation.
2676
           */
2677
          public Builder putAllExtraParam(Map<String, Object> map) {
2678
            if (this.extraParams == null) {
×
2679
              this.extraParams = new HashMap<>();
×
2680
            }
2681
            this.extraParams.putAll(map);
×
2682
            return this;
×
2683
          }
2684

2685
          /**
2686
           * Preferred language of the Bancontact authorization page that the customer is redirected
2687
           * to.
2688
           */
2689
          public Builder setPreferredLanguage(
2690
              InvoiceUpdateParams.PaymentSettings.PaymentMethodOptions.Bancontact.PreferredLanguage
2691
                  preferredLanguage) {
2692
            this.preferredLanguage = preferredLanguage;
×
2693
            return this;
×
2694
          }
2695
        }
2696

2697
        public enum PreferredLanguage implements ApiRequestParams.EnumParam {
×
2698
          @SerializedName("de")
×
2699
          DE("de"),
2700

2701
          @SerializedName("en")
×
2702
          EN("en"),
2703

2704
          @SerializedName("fr")
×
2705
          FR("fr"),
2706

2707
          @SerializedName("nl")
×
2708
          NL("nl");
2709

2710
          @Getter(onMethod_ = {@Override})
2711
          private final String value;
2712

2713
          PreferredLanguage(String value) {
×
2714
            this.value = value;
×
2715
          }
×
2716
        }
2717
      }
2718

2719
      @Getter
2720
      public static class Card {
2721
        /**
2722
         * Map of extra parameters for custom features not available in this client library. The
2723
         * content in this map is not serialized under this field's {@code @SerializedName} value.
2724
         * Instead, each key/value pair is serialized as if the key is a root-level field
2725
         * (serialized) name in this param object. Effectively, this map is flattened to its parent
2726
         * instance.
2727
         */
2728
        @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
2729
        Map<String, Object> extraParams;
2730

2731
        /**
2732
         * Installment configuration for payments attempted on this invoice (Mexico Only).
2733
         *
2734
         * <p>For more information, see the <a
2735
         * href="https://stripe.com/docs/payments/installments">installments integration guide</a>.
2736
         */
2737
        @SerializedName("installments")
2738
        Installments installments;
2739

2740
        /**
2741
         * We strongly recommend that you rely on our SCA Engine to automatically prompt your
2742
         * customers for authentication based on risk level and <a
2743
         * href="https://stripe.com/docs/strong-customer-authentication">other requirements</a>.
2744
         * However, if you wish to request 3D Secure based on logic from your own fraud engine,
2745
         * provide this option. Read our guide on <a
2746
         * href="https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds">manually
2747
         * requesting 3D Secure</a> for more information on how this configuration interacts with
2748
         * Radar and our SCA Engine.
2749
         */
2750
        @SerializedName("request_three_d_secure")
2751
        RequestThreeDSecure requestThreeDSecure;
2752

2753
        private Card(
2754
            Map<String, Object> extraParams,
2755
            Installments installments,
2756
            RequestThreeDSecure requestThreeDSecure) {
×
2757
          this.extraParams = extraParams;
×
2758
          this.installments = installments;
×
2759
          this.requestThreeDSecure = requestThreeDSecure;
×
2760
        }
×
2761

2762
        public static Builder builder() {
2763
          return new Builder();
×
2764
        }
2765

2766
        public static class Builder {
×
2767
          private Map<String, Object> extraParams;
2768

2769
          private Installments installments;
2770

2771
          private RequestThreeDSecure requestThreeDSecure;
2772

2773
          /** Finalize and obtain parameter instance from this builder. */
2774
          public InvoiceUpdateParams.PaymentSettings.PaymentMethodOptions.Card build() {
2775
            return new InvoiceUpdateParams.PaymentSettings.PaymentMethodOptions.Card(
×
2776
                this.extraParams, this.installments, this.requestThreeDSecure);
2777
          }
2778

2779
          /**
2780
           * Add a key/value pair to `extraParams` map. A map is initialized for the first
2781
           * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
2782
           * map. See {@link
2783
           * InvoiceUpdateParams.PaymentSettings.PaymentMethodOptions.Card#extraParams} for the
2784
           * field documentation.
2785
           */
2786
          public Builder putExtraParam(String key, Object value) {
2787
            if (this.extraParams == null) {
×
2788
              this.extraParams = new HashMap<>();
×
2789
            }
2790
            this.extraParams.put(key, value);
×
2791
            return this;
×
2792
          }
2793

2794
          /**
2795
           * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
2796
           * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
2797
           * map. See {@link
2798
           * InvoiceUpdateParams.PaymentSettings.PaymentMethodOptions.Card#extraParams} for the
2799
           * field documentation.
2800
           */
2801
          public Builder putAllExtraParam(Map<String, Object> map) {
2802
            if (this.extraParams == null) {
×
2803
              this.extraParams = new HashMap<>();
×
2804
            }
2805
            this.extraParams.putAll(map);
×
2806
            return this;
×
2807
          }
2808

2809
          /**
2810
           * Installment configuration for payments attempted on this invoice (Mexico Only).
2811
           *
2812
           * <p>For more information, see the <a
2813
           * href="https://stripe.com/docs/payments/installments">installments integration
2814
           * guide</a>.
2815
           */
2816
          public Builder setInstallments(
2817
              InvoiceUpdateParams.PaymentSettings.PaymentMethodOptions.Card.Installments
2818
                  installments) {
2819
            this.installments = installments;
×
2820
            return this;
×
2821
          }
2822

2823
          /**
2824
           * We strongly recommend that you rely on our SCA Engine to automatically prompt your
2825
           * customers for authentication based on risk level and <a
2826
           * href="https://stripe.com/docs/strong-customer-authentication">other requirements</a>.
2827
           * However, if you wish to request 3D Secure based on logic from your own fraud engine,
2828
           * provide this option. Read our guide on <a
2829
           * href="https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds">manually
2830
           * requesting 3D Secure</a> for more information on how this configuration interacts with
2831
           * Radar and our SCA Engine.
2832
           */
2833
          public Builder setRequestThreeDSecure(
2834
              InvoiceUpdateParams.PaymentSettings.PaymentMethodOptions.Card.RequestThreeDSecure
2835
                  requestThreeDSecure) {
2836
            this.requestThreeDSecure = requestThreeDSecure;
×
2837
            return this;
×
2838
          }
2839
        }
2840

2841
        @Getter
2842
        public static class Installments {
2843
          /**
2844
           * Setting to true enables installments for this invoice. Setting to false will prevent
2845
           * any selected plan from applying to a payment.
2846
           */
2847
          @SerializedName("enabled")
2848
          Boolean enabled;
2849

2850
          /**
2851
           * Map of extra parameters for custom features not available in this client library. The
2852
           * content in this map is not serialized under this field's {@code @SerializedName} value.
2853
           * Instead, each key/value pair is serialized as if the key is a root-level field
2854
           * (serialized) name in this param object. Effectively, this map is flattened to its
2855
           * parent instance.
2856
           */
2857
          @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
2858
          Map<String, Object> extraParams;
2859

2860
          /** The selected installment plan to use for this invoice. */
2861
          @SerializedName("plan")
2862
          Object plan;
2863

2864
          private Installments(Boolean enabled, Map<String, Object> extraParams, Object plan) {
×
2865
            this.enabled = enabled;
×
2866
            this.extraParams = extraParams;
×
2867
            this.plan = plan;
×
2868
          }
×
2869

2870
          public static Builder builder() {
2871
            return new Builder();
×
2872
          }
2873

2874
          public static class Builder {
×
2875
            private Boolean enabled;
2876

2877
            private Map<String, Object> extraParams;
2878

2879
            private Object plan;
2880

2881
            /** Finalize and obtain parameter instance from this builder. */
2882
            public InvoiceUpdateParams.PaymentSettings.PaymentMethodOptions.Card.Installments
2883
                build() {
2884
              return new InvoiceUpdateParams.PaymentSettings.PaymentMethodOptions.Card.Installments(
×
2885
                  this.enabled, this.extraParams, this.plan);
2886
            }
2887

2888
            /**
2889
             * Setting to true enables installments for this invoice. Setting to false will prevent
2890
             * any selected plan from applying to a payment.
2891
             */
2892
            public Builder setEnabled(Boolean enabled) {
2893
              this.enabled = enabled;
×
2894
              return this;
×
2895
            }
2896

2897
            /**
2898
             * Add a key/value pair to `extraParams` map. A map is initialized for the first
2899
             * `put/putAll` call, and subsequent calls add additional key/value pairs to the
2900
             * original map. See {@link
2901
             * InvoiceUpdateParams.PaymentSettings.PaymentMethodOptions.Card.Installments#extraParams}
2902
             * for the field documentation.
2903
             */
2904
            public Builder putExtraParam(String key, Object value) {
2905
              if (this.extraParams == null) {
×
2906
                this.extraParams = new HashMap<>();
×
2907
              }
2908
              this.extraParams.put(key, value);
×
2909
              return this;
×
2910
            }
2911

2912
            /**
2913
             * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
2914
             * `put/putAll` call, and subsequent calls add additional key/value pairs to the
2915
             * original map. See {@link
2916
             * InvoiceUpdateParams.PaymentSettings.PaymentMethodOptions.Card.Installments#extraParams}
2917
             * for the field documentation.
2918
             */
2919
            public Builder putAllExtraParam(Map<String, Object> map) {
2920
              if (this.extraParams == null) {
×
2921
                this.extraParams = new HashMap<>();
×
2922
              }
2923
              this.extraParams.putAll(map);
×
2924
              return this;
×
2925
            }
2926

2927
            /** The selected installment plan to use for this invoice. */
2928
            public Builder setPlan(
2929
                InvoiceUpdateParams.PaymentSettings.PaymentMethodOptions.Card.Installments.Plan
2930
                    plan) {
2931
              this.plan = plan;
×
2932
              return this;
×
2933
            }
2934

2935
            /** The selected installment plan to use for this invoice. */
2936
            public Builder setPlan(EmptyParam plan) {
2937
              this.plan = plan;
×
2938
              return this;
×
2939
            }
2940
          }
2941

2942
          @Getter
2943
          public static class Plan {
2944
            /**
2945
             * For {@code fixed_count} installment plans, this is required. It represents the number
2946
             * of installment payments your customer will make to their credit card.
2947
             */
2948
            @SerializedName("count")
2949
            Long count;
2950

2951
            /**
2952
             * Map of extra parameters for custom features not available in this client library. The
2953
             * content in this map is not serialized under this field's {@code @SerializedName}
2954
             * value. Instead, each key/value pair is serialized as if the key is a root-level field
2955
             * (serialized) name in this param object. Effectively, this map is flattened to its
2956
             * parent instance.
2957
             */
2958
            @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
2959
            Map<String, Object> extraParams;
2960

2961
            /**
2962
             * For {@code fixed_count} installment plans, this is required. It represents the
2963
             * interval between installment payments your customer will make to their credit card.
2964
             * One of {@code month}.
2965
             */
2966
            @SerializedName("interval")
2967
            Interval interval;
2968

2969
            /** <strong>Required.</strong> Type of installment plan, one of {@code fixed_count}. */
2970
            @SerializedName("type")
2971
            Type type;
2972

2973
            private Plan(
2974
                Long count, Map<String, Object> extraParams, Interval interval, Type type) {
×
2975
              this.count = count;
×
2976
              this.extraParams = extraParams;
×
2977
              this.interval = interval;
×
2978
              this.type = type;
×
2979
            }
×
2980

2981
            public static Builder builder() {
2982
              return new Builder();
×
2983
            }
2984

2985
            public static class Builder {
×
2986
              private Long count;
2987

2988
              private Map<String, Object> extraParams;
2989

2990
              private Interval interval;
2991

2992
              private Type type;
2993

2994
              /** Finalize and obtain parameter instance from this builder. */
2995
              public InvoiceUpdateParams.PaymentSettings.PaymentMethodOptions.Card.Installments.Plan
2996
                  build() {
2997
                return new InvoiceUpdateParams.PaymentSettings.PaymentMethodOptions.Card
×
2998
                    .Installments.Plan(this.count, this.extraParams, this.interval, this.type);
2999
              }
3000

3001
              /**
3002
               * For {@code fixed_count} installment plans, this is required. It represents the
3003
               * number of installment payments your customer will make to their credit card.
3004
               */
3005
              public Builder setCount(Long count) {
3006
                this.count = count;
×
3007
                return this;
×
3008
              }
3009

3010
              /**
3011
               * Add a key/value pair to `extraParams` map. A map is initialized for the first
3012
               * `put/putAll` call, and subsequent calls add additional key/value pairs to the
3013
               * original map. See {@link
3014
               * InvoiceUpdateParams.PaymentSettings.PaymentMethodOptions.Card.Installments.Plan#extraParams}
3015
               * for the field documentation.
3016
               */
3017
              public Builder putExtraParam(String key, Object value) {
3018
                if (this.extraParams == null) {
×
3019
                  this.extraParams = new HashMap<>();
×
3020
                }
3021
                this.extraParams.put(key, value);
×
3022
                return this;
×
3023
              }
3024

3025
              /**
3026
               * Add all map key/value pairs to `extraParams` map. A map is initialized for the
3027
               * first `put/putAll` call, and subsequent calls add additional key/value pairs to the
3028
               * original map. See {@link
3029
               * InvoiceUpdateParams.PaymentSettings.PaymentMethodOptions.Card.Installments.Plan#extraParams}
3030
               * for the field documentation.
3031
               */
3032
              public Builder putAllExtraParam(Map<String, Object> map) {
3033
                if (this.extraParams == null) {
×
3034
                  this.extraParams = new HashMap<>();
×
3035
                }
3036
                this.extraParams.putAll(map);
×
3037
                return this;
×
3038
              }
3039

3040
              /**
3041
               * For {@code fixed_count} installment plans, this is required. It represents the
3042
               * interval between installment payments your customer will make to their credit card.
3043
               * One of {@code month}.
3044
               */
3045
              public Builder setInterval(
3046
                  InvoiceUpdateParams.PaymentSettings.PaymentMethodOptions.Card.Installments.Plan
3047
                          .Interval
3048
                      interval) {
3049
                this.interval = interval;
×
3050
                return this;
×
3051
              }
3052

3053
              /**
3054
               * <strong>Required.</strong> Type of installment plan, one of {@code fixed_count}.
3055
               */
3056
              public Builder setType(
3057
                  InvoiceUpdateParams.PaymentSettings.PaymentMethodOptions.Card.Installments.Plan
3058
                          .Type
3059
                      type) {
3060
                this.type = type;
×
3061
                return this;
×
3062
              }
3063
            }
3064

3065
            public enum Interval implements ApiRequestParams.EnumParam {
×
3066
              @SerializedName("month")
×
3067
              MONTH("month");
3068

3069
              @Getter(onMethod_ = {@Override})
3070
              private final String value;
3071

3072
              Interval(String value) {
×
3073
                this.value = value;
×
3074
              }
×
3075
            }
3076

3077
            public enum Type implements ApiRequestParams.EnumParam {
×
3078
              @SerializedName("fixed_count")
×
3079
              FIXED_COUNT("fixed_count");
3080

3081
              @Getter(onMethod_ = {@Override})
3082
              private final String value;
3083

3084
              Type(String value) {
×
3085
                this.value = value;
×
3086
              }
×
3087
            }
3088
          }
3089
        }
3090

3091
        public enum RequestThreeDSecure implements ApiRequestParams.EnumParam {
×
3092
          @SerializedName("any")
×
3093
          ANY("any"),
3094

3095
          @SerializedName("automatic")
×
3096
          AUTOMATIC("automatic"),
3097

3098
          @SerializedName("challenge")
×
3099
          CHALLENGE("challenge");
3100

3101
          @Getter(onMethod_ = {@Override})
3102
          private final String value;
3103

3104
          RequestThreeDSecure(String value) {
×
3105
            this.value = value;
×
3106
          }
×
3107
        }
3108
      }
3109

3110
      @Getter
3111
      public static class CustomerBalance {
3112
        /**
3113
         * Configuration for the bank transfer funding type, if the {@code funding_type} is set to
3114
         * {@code bank_transfer}.
3115
         */
3116
        @SerializedName("bank_transfer")
3117
        BankTransfer bankTransfer;
3118

3119
        /**
3120
         * Map of extra parameters for custom features not available in this client library. The
3121
         * content in this map is not serialized under this field's {@code @SerializedName} value.
3122
         * Instead, each key/value pair is serialized as if the key is a root-level field
3123
         * (serialized) name in this param object. Effectively, this map is flattened to its parent
3124
         * instance.
3125
         */
3126
        @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
3127
        Map<String, Object> extraParams;
3128

3129
        /**
3130
         * The funding method type to be used when there are not enough funds in the customer
3131
         * balance. Permitted values include: {@code bank_transfer}.
3132
         */
3133
        @SerializedName("funding_type")
3134
        Object fundingType;
3135

3136
        private CustomerBalance(
3137
            BankTransfer bankTransfer, Map<String, Object> extraParams, Object fundingType) {
×
3138
          this.bankTransfer = bankTransfer;
×
3139
          this.extraParams = extraParams;
×
3140
          this.fundingType = fundingType;
×
3141
        }
×
3142

3143
        public static Builder builder() {
3144
          return new Builder();
×
3145
        }
3146

3147
        public static class Builder {
×
3148
          private BankTransfer bankTransfer;
3149

3150
          private Map<String, Object> extraParams;
3151

3152
          private Object fundingType;
3153

3154
          /** Finalize and obtain parameter instance from this builder. */
3155
          public InvoiceUpdateParams.PaymentSettings.PaymentMethodOptions.CustomerBalance build() {
3156
            return new InvoiceUpdateParams.PaymentSettings.PaymentMethodOptions.CustomerBalance(
×
3157
                this.bankTransfer, this.extraParams, this.fundingType);
3158
          }
3159

3160
          /**
3161
           * Configuration for the bank transfer funding type, if the {@code funding_type} is set to
3162
           * {@code bank_transfer}.
3163
           */
3164
          public Builder setBankTransfer(
3165
              InvoiceUpdateParams.PaymentSettings.PaymentMethodOptions.CustomerBalance.BankTransfer
3166
                  bankTransfer) {
3167
            this.bankTransfer = bankTransfer;
×
3168
            return this;
×
3169
          }
3170

3171
          /**
3172
           * Add a key/value pair to `extraParams` map. A map is initialized for the first
3173
           * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
3174
           * map. See {@link
3175
           * InvoiceUpdateParams.PaymentSettings.PaymentMethodOptions.CustomerBalance#extraParams}
3176
           * for the field documentation.
3177
           */
3178
          public Builder putExtraParam(String key, Object value) {
3179
            if (this.extraParams == null) {
×
3180
              this.extraParams = new HashMap<>();
×
3181
            }
3182
            this.extraParams.put(key, value);
×
3183
            return this;
×
3184
          }
3185

3186
          /**
3187
           * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
3188
           * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
3189
           * map. See {@link
3190
           * InvoiceUpdateParams.PaymentSettings.PaymentMethodOptions.CustomerBalance#extraParams}
3191
           * for the field documentation.
3192
           */
3193
          public Builder putAllExtraParam(Map<String, Object> map) {
3194
            if (this.extraParams == null) {
×
3195
              this.extraParams = new HashMap<>();
×
3196
            }
3197
            this.extraParams.putAll(map);
×
3198
            return this;
×
3199
          }
3200

3201
          /**
3202
           * The funding method type to be used when there are not enough funds in the customer
3203
           * balance. Permitted values include: {@code bank_transfer}.
3204
           */
3205
          public Builder setFundingType(String fundingType) {
3206
            this.fundingType = fundingType;
×
3207
            return this;
×
3208
          }
3209

3210
          /**
3211
           * The funding method type to be used when there are not enough funds in the customer
3212
           * balance. Permitted values include: {@code bank_transfer}.
3213
           */
3214
          public Builder setFundingType(EmptyParam fundingType) {
3215
            this.fundingType = fundingType;
×
3216
            return this;
×
3217
          }
3218
        }
3219

3220
        @Getter
3221
        public static class BankTransfer {
3222
          /** Configuration for eu_bank_transfer funding type. */
3223
          @SerializedName("eu_bank_transfer")
3224
          EuBankTransfer euBankTransfer;
3225

3226
          /**
3227
           * Map of extra parameters for custom features not available in this client library. The
3228
           * content in this map is not serialized under this field's {@code @SerializedName} value.
3229
           * Instead, each key/value pair is serialized as if the key is a root-level field
3230
           * (serialized) name in this param object. Effectively, this map is flattened to its
3231
           * parent instance.
3232
           */
3233
          @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
3234
          Map<String, Object> extraParams;
3235

3236
          /**
3237
           * The bank transfer type that can be used for funding. Permitted values include: {@code
3238
           * eu_bank_transfer}, {@code gb_bank_transfer}, {@code jp_bank_transfer}, {@code
3239
           * mx_bank_transfer}, or {@code us_bank_transfer}.
3240
           */
3241
          @SerializedName("type")
3242
          Object type;
3243

3244
          private BankTransfer(
3245
              EuBankTransfer euBankTransfer, Map<String, Object> extraParams, Object type) {
×
3246
            this.euBankTransfer = euBankTransfer;
×
3247
            this.extraParams = extraParams;
×
3248
            this.type = type;
×
3249
          }
×
3250

3251
          public static Builder builder() {
3252
            return new Builder();
×
3253
          }
3254

3255
          public static class Builder {
×
3256
            private EuBankTransfer euBankTransfer;
3257

3258
            private Map<String, Object> extraParams;
3259

3260
            private Object type;
3261

3262
            /** Finalize and obtain parameter instance from this builder. */
3263
            public InvoiceUpdateParams.PaymentSettings.PaymentMethodOptions.CustomerBalance
3264
                    .BankTransfer
3265
                build() {
3266
              return new InvoiceUpdateParams.PaymentSettings.PaymentMethodOptions.CustomerBalance
×
3267
                  .BankTransfer(this.euBankTransfer, this.extraParams, this.type);
3268
            }
3269

3270
            /** Configuration for eu_bank_transfer funding type. */
3271
            public Builder setEuBankTransfer(
3272
                InvoiceUpdateParams.PaymentSettings.PaymentMethodOptions.CustomerBalance
3273
                        .BankTransfer.EuBankTransfer
3274
                    euBankTransfer) {
3275
              this.euBankTransfer = euBankTransfer;
×
3276
              return this;
×
3277
            }
3278

3279
            /**
3280
             * Add a key/value pair to `extraParams` map. A map is initialized for the first
3281
             * `put/putAll` call, and subsequent calls add additional key/value pairs to the
3282
             * original map. See {@link
3283
             * InvoiceUpdateParams.PaymentSettings.PaymentMethodOptions.CustomerBalance.BankTransfer#extraParams}
3284
             * for the field documentation.
3285
             */
3286
            public Builder putExtraParam(String key, Object value) {
3287
              if (this.extraParams == null) {
×
3288
                this.extraParams = new HashMap<>();
×
3289
              }
3290
              this.extraParams.put(key, value);
×
3291
              return this;
×
3292
            }
3293

3294
            /**
3295
             * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
3296
             * `put/putAll` call, and subsequent calls add additional key/value pairs to the
3297
             * original map. See {@link
3298
             * InvoiceUpdateParams.PaymentSettings.PaymentMethodOptions.CustomerBalance.BankTransfer#extraParams}
3299
             * for the field documentation.
3300
             */
3301
            public Builder putAllExtraParam(Map<String, Object> map) {
3302
              if (this.extraParams == null) {
×
3303
                this.extraParams = new HashMap<>();
×
3304
              }
3305
              this.extraParams.putAll(map);
×
3306
              return this;
×
3307
            }
3308

3309
            /**
3310
             * The bank transfer type that can be used for funding. Permitted values include: {@code
3311
             * eu_bank_transfer}, {@code gb_bank_transfer}, {@code jp_bank_transfer}, {@code
3312
             * mx_bank_transfer}, or {@code us_bank_transfer}.
3313
             */
3314
            public Builder setType(String type) {
3315
              this.type = type;
×
3316
              return this;
×
3317
            }
3318

3319
            /**
3320
             * The bank transfer type that can be used for funding. Permitted values include: {@code
3321
             * eu_bank_transfer}, {@code gb_bank_transfer}, {@code jp_bank_transfer}, {@code
3322
             * mx_bank_transfer}, or {@code us_bank_transfer}.
3323
             */
3324
            public Builder setType(EmptyParam type) {
3325
              this.type = type;
×
3326
              return this;
×
3327
            }
3328
          }
3329

3330
          @Getter
3331
          public static class EuBankTransfer {
3332
            /**
3333
             * <strong>Required.</strong> The desired country code of the bank account information.
3334
             * Permitted values include: {@code BE}, {@code DE}, {@code ES}, {@code FR}, {@code IE},
3335
             * or {@code NL}.
3336
             */
3337
            @SerializedName("country")
3338
            Object country;
3339

3340
            /**
3341
             * Map of extra parameters for custom features not available in this client library. The
3342
             * content in this map is not serialized under this field's {@code @SerializedName}
3343
             * value. Instead, each key/value pair is serialized as if the key is a root-level field
3344
             * (serialized) name in this param object. Effectively, this map is flattened to its
3345
             * parent instance.
3346
             */
3347
            @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
3348
            Map<String, Object> extraParams;
3349

3350
            private EuBankTransfer(Object country, Map<String, Object> extraParams) {
×
3351
              this.country = country;
×
3352
              this.extraParams = extraParams;
×
3353
            }
×
3354

3355
            public static Builder builder() {
3356
              return new Builder();
×
3357
            }
3358

3359
            public static class Builder {
×
3360
              private Object country;
3361

3362
              private Map<String, Object> extraParams;
3363

3364
              /** Finalize and obtain parameter instance from this builder. */
3365
              public InvoiceUpdateParams.PaymentSettings.PaymentMethodOptions.CustomerBalance
3366
                      .BankTransfer.EuBankTransfer
3367
                  build() {
3368
                return new InvoiceUpdateParams.PaymentSettings.PaymentMethodOptions.CustomerBalance
×
3369
                    .BankTransfer.EuBankTransfer(this.country, this.extraParams);
3370
              }
3371

3372
              /**
3373
               * <strong>Required.</strong> The desired country code of the bank account
3374
               * information. Permitted values include: {@code BE}, {@code DE}, {@code ES}, {@code
3375
               * FR}, {@code IE}, or {@code NL}.
3376
               */
3377
              public Builder setCountry(String country) {
3378
                this.country = country;
×
3379
                return this;
×
3380
              }
3381

3382
              /**
3383
               * <strong>Required.</strong> The desired country code of the bank account
3384
               * information. Permitted values include: {@code BE}, {@code DE}, {@code ES}, {@code
3385
               * FR}, {@code IE}, or {@code NL}.
3386
               */
3387
              public Builder setCountry(EmptyParam country) {
3388
                this.country = country;
×
3389
                return this;
×
3390
              }
3391

3392
              /**
3393
               * Add a key/value pair to `extraParams` map. A map is initialized for the first
3394
               * `put/putAll` call, and subsequent calls add additional key/value pairs to the
3395
               * original map. See {@link
3396
               * InvoiceUpdateParams.PaymentSettings.PaymentMethodOptions.CustomerBalance.BankTransfer.EuBankTransfer#extraParams}
3397
               * for the field documentation.
3398
               */
3399
              public Builder putExtraParam(String key, Object value) {
3400
                if (this.extraParams == null) {
×
3401
                  this.extraParams = new HashMap<>();
×
3402
                }
3403
                this.extraParams.put(key, value);
×
3404
                return this;
×
3405
              }
3406

3407
              /**
3408
               * Add all map key/value pairs to `extraParams` map. A map is initialized for the
3409
               * first `put/putAll` call, and subsequent calls add additional key/value pairs to the
3410
               * original map. See {@link
3411
               * InvoiceUpdateParams.PaymentSettings.PaymentMethodOptions.CustomerBalance.BankTransfer.EuBankTransfer#extraParams}
3412
               * for the field documentation.
3413
               */
3414
              public Builder putAllExtraParam(Map<String, Object> map) {
3415
                if (this.extraParams == null) {
×
3416
                  this.extraParams = new HashMap<>();
×
3417
                }
3418
                this.extraParams.putAll(map);
×
3419
                return this;
×
3420
              }
3421
            }
3422
          }
3423
        }
3424
      }
3425

3426
      @Getter
3427
      public static class Konbini {
3428
        /**
3429
         * Map of extra parameters for custom features not available in this client library. The
3430
         * content in this map is not serialized under this field's {@code @SerializedName} value.
3431
         * Instead, each key/value pair is serialized as if the key is a root-level field
3432
         * (serialized) name in this param object. Effectively, this map is flattened to its parent
3433
         * instance.
3434
         */
3435
        @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
3436
        Map<String, Object> extraParams;
3437

3438
        private Konbini(Map<String, Object> extraParams) {
×
3439
          this.extraParams = extraParams;
×
3440
        }
×
3441

3442
        public static Builder builder() {
3443
          return new Builder();
×
3444
        }
3445

3446
        public static class Builder {
×
3447
          private Map<String, Object> extraParams;
3448

3449
          /** Finalize and obtain parameter instance from this builder. */
3450
          public InvoiceUpdateParams.PaymentSettings.PaymentMethodOptions.Konbini build() {
3451
            return new InvoiceUpdateParams.PaymentSettings.PaymentMethodOptions.Konbini(
×
3452
                this.extraParams);
3453
          }
3454

3455
          /**
3456
           * Add a key/value pair to `extraParams` map. A map is initialized for the first
3457
           * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
3458
           * map. See {@link
3459
           * InvoiceUpdateParams.PaymentSettings.PaymentMethodOptions.Konbini#extraParams} for the
3460
           * field documentation.
3461
           */
3462
          public Builder putExtraParam(String key, Object value) {
3463
            if (this.extraParams == null) {
×
3464
              this.extraParams = new HashMap<>();
×
3465
            }
3466
            this.extraParams.put(key, value);
×
3467
            return this;
×
3468
          }
3469

3470
          /**
3471
           * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
3472
           * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
3473
           * map. See {@link
3474
           * InvoiceUpdateParams.PaymentSettings.PaymentMethodOptions.Konbini#extraParams} for the
3475
           * field documentation.
3476
           */
3477
          public Builder putAllExtraParam(Map<String, Object> map) {
3478
            if (this.extraParams == null) {
×
3479
              this.extraParams = new HashMap<>();
×
3480
            }
3481
            this.extraParams.putAll(map);
×
3482
            return this;
×
3483
          }
3484
        }
3485
      }
3486

3487
      @Getter
3488
      public static class SepaDebit {
3489
        /**
3490
         * Map of extra parameters for custom features not available in this client library. The
3491
         * content in this map is not serialized under this field's {@code @SerializedName} value.
3492
         * Instead, each key/value pair is serialized as if the key is a root-level field
3493
         * (serialized) name in this param object. Effectively, this map is flattened to its parent
3494
         * instance.
3495
         */
3496
        @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
3497
        Map<String, Object> extraParams;
3498

3499
        private SepaDebit(Map<String, Object> extraParams) {
×
3500
          this.extraParams = extraParams;
×
3501
        }
×
3502

3503
        public static Builder builder() {
3504
          return new Builder();
×
3505
        }
3506

3507
        public static class Builder {
×
3508
          private Map<String, Object> extraParams;
3509

3510
          /** Finalize and obtain parameter instance from this builder. */
3511
          public InvoiceUpdateParams.PaymentSettings.PaymentMethodOptions.SepaDebit build() {
3512
            return new InvoiceUpdateParams.PaymentSettings.PaymentMethodOptions.SepaDebit(
×
3513
                this.extraParams);
3514
          }
3515

3516
          /**
3517
           * Add a key/value pair to `extraParams` map. A map is initialized for the first
3518
           * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
3519
           * map. See {@link
3520
           * InvoiceUpdateParams.PaymentSettings.PaymentMethodOptions.SepaDebit#extraParams} for the
3521
           * field documentation.
3522
           */
3523
          public Builder putExtraParam(String key, Object value) {
3524
            if (this.extraParams == null) {
×
3525
              this.extraParams = new HashMap<>();
×
3526
            }
3527
            this.extraParams.put(key, value);
×
3528
            return this;
×
3529
          }
3530

3531
          /**
3532
           * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
3533
           * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
3534
           * map. See {@link
3535
           * InvoiceUpdateParams.PaymentSettings.PaymentMethodOptions.SepaDebit#extraParams} for the
3536
           * field documentation.
3537
           */
3538
          public Builder putAllExtraParam(Map<String, Object> map) {
3539
            if (this.extraParams == null) {
×
3540
              this.extraParams = new HashMap<>();
×
3541
            }
3542
            this.extraParams.putAll(map);
×
3543
            return this;
×
3544
          }
3545
        }
3546
      }
3547

3548
      @Getter
3549
      public static class UsBankAccount {
3550
        /**
3551
         * Map of extra parameters for custom features not available in this client library. The
3552
         * content in this map is not serialized under this field's {@code @SerializedName} value.
3553
         * Instead, each key/value pair is serialized as if the key is a root-level field
3554
         * (serialized) name in this param object. Effectively, this map is flattened to its parent
3555
         * instance.
3556
         */
3557
        @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
3558
        Map<String, Object> extraParams;
3559

3560
        /** Additional fields for Financial Connections Session creation. */
3561
        @SerializedName("financial_connections")
3562
        FinancialConnections financialConnections;
3563

3564
        /** Verification method for the intent. */
3565
        @SerializedName("verification_method")
3566
        VerificationMethod verificationMethod;
3567

3568
        private UsBankAccount(
3569
            Map<String, Object> extraParams,
3570
            FinancialConnections financialConnections,
3571
            VerificationMethod verificationMethod) {
×
3572
          this.extraParams = extraParams;
×
3573
          this.financialConnections = financialConnections;
×
3574
          this.verificationMethod = verificationMethod;
×
3575
        }
×
3576

3577
        public static Builder builder() {
3578
          return new Builder();
×
3579
        }
3580

3581
        public static class Builder {
×
3582
          private Map<String, Object> extraParams;
3583

3584
          private FinancialConnections financialConnections;
3585

3586
          private VerificationMethod verificationMethod;
3587

3588
          /** Finalize and obtain parameter instance from this builder. */
3589
          public InvoiceUpdateParams.PaymentSettings.PaymentMethodOptions.UsBankAccount build() {
3590
            return new InvoiceUpdateParams.PaymentSettings.PaymentMethodOptions.UsBankAccount(
×
3591
                this.extraParams, this.financialConnections, this.verificationMethod);
3592
          }
3593

3594
          /**
3595
           * Add a key/value pair to `extraParams` map. A map is initialized for the first
3596
           * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
3597
           * map. See {@link
3598
           * InvoiceUpdateParams.PaymentSettings.PaymentMethodOptions.UsBankAccount#extraParams} for
3599
           * the field documentation.
3600
           */
3601
          public Builder putExtraParam(String key, Object value) {
3602
            if (this.extraParams == null) {
×
3603
              this.extraParams = new HashMap<>();
×
3604
            }
3605
            this.extraParams.put(key, value);
×
3606
            return this;
×
3607
          }
3608

3609
          /**
3610
           * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
3611
           * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
3612
           * map. See {@link
3613
           * InvoiceUpdateParams.PaymentSettings.PaymentMethodOptions.UsBankAccount#extraParams} for
3614
           * the field documentation.
3615
           */
3616
          public Builder putAllExtraParam(Map<String, Object> map) {
3617
            if (this.extraParams == null) {
×
3618
              this.extraParams = new HashMap<>();
×
3619
            }
3620
            this.extraParams.putAll(map);
×
3621
            return this;
×
3622
          }
3623

3624
          /** Additional fields for Financial Connections Session creation. */
3625
          public Builder setFinancialConnections(
3626
              InvoiceUpdateParams.PaymentSettings.PaymentMethodOptions.UsBankAccount
3627
                      .FinancialConnections
3628
                  financialConnections) {
3629
            this.financialConnections = financialConnections;
×
3630
            return this;
×
3631
          }
3632

3633
          /** Verification method for the intent. */
3634
          public Builder setVerificationMethod(
3635
              InvoiceUpdateParams.PaymentSettings.PaymentMethodOptions.UsBankAccount
3636
                      .VerificationMethod
3637
                  verificationMethod) {
3638
            this.verificationMethod = verificationMethod;
×
3639
            return this;
×
3640
          }
3641
        }
3642

3643
        @Getter
3644
        public static class FinancialConnections {
3645
          /**
3646
           * Map of extra parameters for custom features not available in this client library. The
3647
           * content in this map is not serialized under this field's {@code @SerializedName} value.
3648
           * Instead, each key/value pair is serialized as if the key is a root-level field
3649
           * (serialized) name in this param object. Effectively, this map is flattened to its
3650
           * parent instance.
3651
           */
3652
          @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
3653
          Map<String, Object> extraParams;
3654

3655
          /**
3656
           * Provide filters for the linked accounts that the customer can select for the payment
3657
           * method.
3658
           */
3659
          @SerializedName("filters")
3660
          Filters filters;
3661

3662
          /**
3663
           * The list of permissions to request. If this parameter is passed, the {@code
3664
           * payment_method} permission must be included. Valid permissions include: {@code
3665
           * balances}, {@code ownership}, {@code payment_method}, and {@code transactions}.
3666
           */
3667
          @SerializedName("permissions")
3668
          List<
3669
                  InvoiceUpdateParams.PaymentSettings.PaymentMethodOptions.UsBankAccount
3670
                      .FinancialConnections.Permission>
3671
              permissions;
3672

3673
          /** List of data features that you would like to retrieve upon account creation. */
3674
          @SerializedName("prefetch")
3675
          List<
3676
                  InvoiceUpdateParams.PaymentSettings.PaymentMethodOptions.UsBankAccount
3677
                      .FinancialConnections.Prefetch>
3678
              prefetch;
3679

3680
          private FinancialConnections(
3681
              Map<String, Object> extraParams,
3682
              Filters filters,
3683
              List<
3684
                      InvoiceUpdateParams.PaymentSettings.PaymentMethodOptions.UsBankAccount
3685
                          .FinancialConnections.Permission>
3686
                  permissions,
3687
              List<
3688
                      InvoiceUpdateParams.PaymentSettings.PaymentMethodOptions.UsBankAccount
3689
                          .FinancialConnections.Prefetch>
3690
                  prefetch) {
×
3691
            this.extraParams = extraParams;
×
3692
            this.filters = filters;
×
3693
            this.permissions = permissions;
×
3694
            this.prefetch = prefetch;
×
3695
          }
×
3696

3697
          public static Builder builder() {
3698
            return new Builder();
×
3699
          }
3700

3701
          public static class Builder {
×
3702
            private Map<String, Object> extraParams;
3703

3704
            private Filters filters;
3705

3706
            private List<
3707
                    InvoiceUpdateParams.PaymentSettings.PaymentMethodOptions.UsBankAccount
3708
                        .FinancialConnections.Permission>
3709
                permissions;
3710

3711
            private List<
3712
                    InvoiceUpdateParams.PaymentSettings.PaymentMethodOptions.UsBankAccount
3713
                        .FinancialConnections.Prefetch>
3714
                prefetch;
3715

3716
            /** Finalize and obtain parameter instance from this builder. */
3717
            public InvoiceUpdateParams.PaymentSettings.PaymentMethodOptions.UsBankAccount
3718
                    .FinancialConnections
3719
                build() {
3720
              return new InvoiceUpdateParams.PaymentSettings.PaymentMethodOptions.UsBankAccount
×
3721
                  .FinancialConnections(
3722
                  this.extraParams, this.filters, this.permissions, this.prefetch);
3723
            }
3724

3725
            /**
3726
             * Add a key/value pair to `extraParams` map. A map is initialized for the first
3727
             * `put/putAll` call, and subsequent calls add additional key/value pairs to the
3728
             * original map. See {@link
3729
             * InvoiceUpdateParams.PaymentSettings.PaymentMethodOptions.UsBankAccount.FinancialConnections#extraParams}
3730
             * for the field documentation.
3731
             */
3732
            public Builder putExtraParam(String key, Object value) {
3733
              if (this.extraParams == null) {
×
3734
                this.extraParams = new HashMap<>();
×
3735
              }
3736
              this.extraParams.put(key, value);
×
3737
              return this;
×
3738
            }
3739

3740
            /**
3741
             * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
3742
             * `put/putAll` call, and subsequent calls add additional key/value pairs to the
3743
             * original map. See {@link
3744
             * InvoiceUpdateParams.PaymentSettings.PaymentMethodOptions.UsBankAccount.FinancialConnections#extraParams}
3745
             * for the field documentation.
3746
             */
3747
            public Builder putAllExtraParam(Map<String, Object> map) {
3748
              if (this.extraParams == null) {
×
3749
                this.extraParams = new HashMap<>();
×
3750
              }
3751
              this.extraParams.putAll(map);
×
3752
              return this;
×
3753
            }
3754

3755
            /**
3756
             * Provide filters for the linked accounts that the customer can select for the payment
3757
             * method.
3758
             */
3759
            public Builder setFilters(
3760
                InvoiceUpdateParams.PaymentSettings.PaymentMethodOptions.UsBankAccount
3761
                        .FinancialConnections.Filters
3762
                    filters) {
3763
              this.filters = filters;
×
3764
              return this;
×
3765
            }
3766

3767
            /**
3768
             * Add an element to `permissions` list. A list is initialized for the first
3769
             * `add/addAll` call, and subsequent calls adds additional elements to the original
3770
             * list. See {@link
3771
             * InvoiceUpdateParams.PaymentSettings.PaymentMethodOptions.UsBankAccount.FinancialConnections#permissions}
3772
             * for the field documentation.
3773
             */
3774
            public Builder addPermission(
3775
                InvoiceUpdateParams.PaymentSettings.PaymentMethodOptions.UsBankAccount
3776
                        .FinancialConnections.Permission
3777
                    element) {
3778
              if (this.permissions == null) {
×
3779
                this.permissions = new ArrayList<>();
×
3780
              }
3781
              this.permissions.add(element);
×
3782
              return this;
×
3783
            }
3784

3785
            /**
3786
             * Add all elements to `permissions` list. A list is initialized for the first
3787
             * `add/addAll` call, and subsequent calls adds additional elements to the original
3788
             * list. See {@link
3789
             * InvoiceUpdateParams.PaymentSettings.PaymentMethodOptions.UsBankAccount.FinancialConnections#permissions}
3790
             * for the field documentation.
3791
             */
3792
            public Builder addAllPermission(
3793
                List<
3794
                        InvoiceUpdateParams.PaymentSettings.PaymentMethodOptions.UsBankAccount
3795
                            .FinancialConnections.Permission>
3796
                    elements) {
3797
              if (this.permissions == null) {
×
3798
                this.permissions = new ArrayList<>();
×
3799
              }
3800
              this.permissions.addAll(elements);
×
3801
              return this;
×
3802
            }
3803

3804
            /**
3805
             * Add an element to `prefetch` list. A list is initialized for the first `add/addAll`
3806
             * call, and subsequent calls adds additional elements to the original list. See {@link
3807
             * InvoiceUpdateParams.PaymentSettings.PaymentMethodOptions.UsBankAccount.FinancialConnections#prefetch}
3808
             * for the field documentation.
3809
             */
3810
            public Builder addPrefetch(
3811
                InvoiceUpdateParams.PaymentSettings.PaymentMethodOptions.UsBankAccount
3812
                        .FinancialConnections.Prefetch
3813
                    element) {
3814
              if (this.prefetch == null) {
×
3815
                this.prefetch = new ArrayList<>();
×
3816
              }
3817
              this.prefetch.add(element);
×
3818
              return this;
×
3819
            }
3820

3821
            /**
3822
             * Add all elements to `prefetch` list. A list is initialized for the first `add/addAll`
3823
             * call, and subsequent calls adds additional elements to the original list. See {@link
3824
             * InvoiceUpdateParams.PaymentSettings.PaymentMethodOptions.UsBankAccount.FinancialConnections#prefetch}
3825
             * for the field documentation.
3826
             */
3827
            public Builder addAllPrefetch(
3828
                List<
3829
                        InvoiceUpdateParams.PaymentSettings.PaymentMethodOptions.UsBankAccount
3830
                            .FinancialConnections.Prefetch>
3831
                    elements) {
3832
              if (this.prefetch == null) {
×
3833
                this.prefetch = new ArrayList<>();
×
3834
              }
3835
              this.prefetch.addAll(elements);
×
3836
              return this;
×
3837
            }
3838
          }
3839

3840
          @Getter
3841
          public static class Filters {
3842
            /**
3843
             * The account subcategories to use to filter for selectable accounts. Valid
3844
             * subcategories are {@code checking} and {@code savings}.
3845
             */
3846
            @SerializedName("account_subcategories")
3847
            List<
3848
                    InvoiceUpdateParams.PaymentSettings.PaymentMethodOptions.UsBankAccount
3849
                        .FinancialConnections.Filters.AccountSubcategory>
3850
                accountSubcategories;
3851

3852
            /**
3853
             * Map of extra parameters for custom features not available in this client library. The
3854
             * content in this map is not serialized under this field's {@code @SerializedName}
3855
             * value. Instead, each key/value pair is serialized as if the key is a root-level field
3856
             * (serialized) name in this param object. Effectively, this map is flattened to its
3857
             * parent instance.
3858
             */
3859
            @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
3860
            Map<String, Object> extraParams;
3861

3862
            /** ID of the institution to use to filter for selectable accounts. */
3863
            @SerializedName("institution")
3864
            Object institution;
3865

3866
            private Filters(
3867
                List<
3868
                        InvoiceUpdateParams.PaymentSettings.PaymentMethodOptions.UsBankAccount
3869
                            .FinancialConnections.Filters.AccountSubcategory>
3870
                    accountSubcategories,
3871
                Map<String, Object> extraParams,
3872
                Object institution) {
×
3873
              this.accountSubcategories = accountSubcategories;
×
3874
              this.extraParams = extraParams;
×
3875
              this.institution = institution;
×
3876
            }
×
3877

3878
            public static Builder builder() {
3879
              return new Builder();
×
3880
            }
3881

3882
            public static class Builder {
×
3883
              private List<
3884
                      InvoiceUpdateParams.PaymentSettings.PaymentMethodOptions.UsBankAccount
3885
                          .FinancialConnections.Filters.AccountSubcategory>
3886
                  accountSubcategories;
3887

3888
              private Map<String, Object> extraParams;
3889

3890
              private Object institution;
3891

3892
              /** Finalize and obtain parameter instance from this builder. */
3893
              public InvoiceUpdateParams.PaymentSettings.PaymentMethodOptions.UsBankAccount
3894
                      .FinancialConnections.Filters
3895
                  build() {
3896
                return new InvoiceUpdateParams.PaymentSettings.PaymentMethodOptions.UsBankAccount
×
3897
                    .FinancialConnections.Filters(
3898
                    this.accountSubcategories, this.extraParams, this.institution);
3899
              }
3900

3901
              /**
3902
               * Add an element to `accountSubcategories` list. A list is initialized for the first
3903
               * `add/addAll` call, and subsequent calls adds additional elements to the original
3904
               * list. See {@link
3905
               * InvoiceUpdateParams.PaymentSettings.PaymentMethodOptions.UsBankAccount.FinancialConnections.Filters#accountSubcategories}
3906
               * for the field documentation.
3907
               */
3908
              public Builder addAccountSubcategory(
3909
                  InvoiceUpdateParams.PaymentSettings.PaymentMethodOptions.UsBankAccount
3910
                          .FinancialConnections.Filters.AccountSubcategory
3911
                      element) {
3912
                if (this.accountSubcategories == null) {
×
3913
                  this.accountSubcategories = new ArrayList<>();
×
3914
                }
3915
                this.accountSubcategories.add(element);
×
3916
                return this;
×
3917
              }
3918

3919
              /**
3920
               * Add all elements to `accountSubcategories` list. A list is initialized for the
3921
               * first `add/addAll` call, and subsequent calls adds additional elements to the
3922
               * original list. See {@link
3923
               * InvoiceUpdateParams.PaymentSettings.PaymentMethodOptions.UsBankAccount.FinancialConnections.Filters#accountSubcategories}
3924
               * for the field documentation.
3925
               */
3926
              public Builder addAllAccountSubcategory(
3927
                  List<
3928
                          InvoiceUpdateParams.PaymentSettings.PaymentMethodOptions.UsBankAccount
3929
                              .FinancialConnections.Filters.AccountSubcategory>
3930
                      elements) {
3931
                if (this.accountSubcategories == null) {
×
3932
                  this.accountSubcategories = new ArrayList<>();
×
3933
                }
3934
                this.accountSubcategories.addAll(elements);
×
3935
                return this;
×
3936
              }
3937

3938
              /**
3939
               * Add a key/value pair to `extraParams` map. A map is initialized for the first
3940
               * `put/putAll` call, and subsequent calls add additional key/value pairs to the
3941
               * original map. See {@link
3942
               * InvoiceUpdateParams.PaymentSettings.PaymentMethodOptions.UsBankAccount.FinancialConnections.Filters#extraParams}
3943
               * for the field documentation.
3944
               */
3945
              public Builder putExtraParam(String key, Object value) {
3946
                if (this.extraParams == null) {
×
3947
                  this.extraParams = new HashMap<>();
×
3948
                }
3949
                this.extraParams.put(key, value);
×
3950
                return this;
×
3951
              }
3952

3953
              /**
3954
               * Add all map key/value pairs to `extraParams` map. A map is initialized for the
3955
               * first `put/putAll` call, and subsequent calls add additional key/value pairs to the
3956
               * original map. See {@link
3957
               * InvoiceUpdateParams.PaymentSettings.PaymentMethodOptions.UsBankAccount.FinancialConnections.Filters#extraParams}
3958
               * for the field documentation.
3959
               */
3960
              public Builder putAllExtraParam(Map<String, Object> map) {
3961
                if (this.extraParams == null) {
×
3962
                  this.extraParams = new HashMap<>();
×
3963
                }
3964
                this.extraParams.putAll(map);
×
3965
                return this;
×
3966
              }
3967

3968
              /** ID of the institution to use to filter for selectable accounts. */
3969
              public Builder setInstitution(String institution) {
3970
                this.institution = institution;
×
3971
                return this;
×
3972
              }
3973

3974
              /** ID of the institution to use to filter for selectable accounts. */
3975
              public Builder setInstitution(EmptyParam institution) {
3976
                this.institution = institution;
×
3977
                return this;
×
3978
              }
3979
            }
3980

3981
            public enum AccountSubcategory implements ApiRequestParams.EnumParam {
×
3982
              @SerializedName("checking")
×
3983
              CHECKING("checking"),
3984

3985
              @SerializedName("savings")
×
3986
              SAVINGS("savings");
3987

3988
              @Getter(onMethod_ = {@Override})
3989
              private final String value;
3990

3991
              AccountSubcategory(String value) {
×
3992
                this.value = value;
×
3993
              }
×
3994
            }
3995
          }
3996

3997
          public enum Permission implements ApiRequestParams.EnumParam {
×
3998
            @SerializedName("balances")
×
3999
            BALANCES("balances"),
4000

4001
            @SerializedName("ownership")
×
4002
            OWNERSHIP("ownership"),
4003

4004
            @SerializedName("payment_method")
×
4005
            PAYMENT_METHOD("payment_method"),
4006

4007
            @SerializedName("transactions")
×
4008
            TRANSACTIONS("transactions");
4009

4010
            @Getter(onMethod_ = {@Override})
4011
            private final String value;
4012

4013
            Permission(String value) {
×
4014
              this.value = value;
×
4015
            }
×
4016
          }
4017

4018
          public enum Prefetch implements ApiRequestParams.EnumParam {
×
4019
            @SerializedName("balances")
×
4020
            BALANCES("balances"),
4021

4022
            @SerializedName("inferred_balances")
×
4023
            INFERRED_BALANCES("inferred_balances"),
4024

4025
            @SerializedName("ownership")
×
4026
            OWNERSHIP("ownership"),
4027

4028
            @SerializedName("transactions")
×
4029
            TRANSACTIONS("transactions");
4030

4031
            @Getter(onMethod_ = {@Override})
4032
            private final String value;
4033

4034
            Prefetch(String value) {
×
4035
              this.value = value;
×
4036
            }
×
4037
          }
4038
        }
4039

4040
        public enum VerificationMethod implements ApiRequestParams.EnumParam {
×
4041
          @SerializedName("automatic")
×
4042
          AUTOMATIC("automatic"),
4043

4044
          @SerializedName("instant")
×
4045
          INSTANT("instant"),
4046

4047
          @SerializedName("microdeposits")
×
4048
          MICRODEPOSITS("microdeposits");
4049

4050
          @Getter(onMethod_ = {@Override})
4051
          private final String value;
4052

4053
          VerificationMethod(String value) {
×
4054
            this.value = value;
×
4055
          }
×
4056
        }
4057
      }
4058
    }
4059

4060
    public enum PaymentMethodType implements ApiRequestParams.EnumParam {
×
4061
      @SerializedName("ach_credit_transfer")
×
4062
      ACH_CREDIT_TRANSFER("ach_credit_transfer"),
4063

4064
      @SerializedName("ach_debit")
×
4065
      ACH_DEBIT("ach_debit"),
4066

4067
      @SerializedName("acss_debit")
×
4068
      ACSS_DEBIT("acss_debit"),
4069

4070
      @SerializedName("amazon_pay")
×
4071
      AMAZON_PAY("amazon_pay"),
4072

4073
      @SerializedName("au_becs_debit")
×
4074
      AU_BECS_DEBIT("au_becs_debit"),
4075

4076
      @SerializedName("bacs_debit")
×
4077
      BACS_DEBIT("bacs_debit"),
4078

4079
      @SerializedName("bancontact")
×
4080
      BANCONTACT("bancontact"),
4081

4082
      @SerializedName("boleto")
×
4083
      BOLETO("boleto"),
4084

4085
      @SerializedName("card")
×
4086
      CARD("card"),
4087

4088
      @SerializedName("cashapp")
×
4089
      CASHAPP("cashapp"),
4090

4091
      @SerializedName("customer_balance")
×
4092
      CUSTOMER_BALANCE("customer_balance"),
4093

4094
      @SerializedName("eps")
×
4095
      EPS("eps"),
4096

4097
      @SerializedName("fpx")
×
4098
      FPX("fpx"),
4099

4100
      @SerializedName("giropay")
×
4101
      GIROPAY("giropay"),
4102

4103
      @SerializedName("grabpay")
×
4104
      GRABPAY("grabpay"),
4105

4106
      @SerializedName("ideal")
×
4107
      IDEAL("ideal"),
4108

NEW
4109
      @SerializedName("jp_credit_transfer")
×
4110
      JP_CREDIT_TRANSFER("jp_credit_transfer"),
4111

NEW
4112
      @SerializedName("kakao_pay")
×
4113
      KAKAO_PAY("kakao_pay"),
4114

UNCOV
4115
      @SerializedName("konbini")
×
4116
      KONBINI("konbini"),
4117

NEW
4118
      @SerializedName("kr_card")
×
4119
      KR_CARD("kr_card"),
4120

UNCOV
4121
      @SerializedName("link")
×
4122
      LINK("link"),
4123

4124
      @SerializedName("multibanco")
×
4125
      MULTIBANCO("multibanco"),
4126

NEW
4127
      @SerializedName("naver_pay")
×
4128
      NAVER_PAY("naver_pay"),
4129

UNCOV
4130
      @SerializedName("p24")
×
4131
      P24("p24"),
4132

NEW
4133
      @SerializedName("payco")
×
4134
      PAYCO("payco"),
4135

UNCOV
4136
      @SerializedName("paynow")
×
4137
      PAYNOW("paynow"),
4138

4139
      @SerializedName("paypal")
×
4140
      PAYPAL("paypal"),
4141

4142
      @SerializedName("promptpay")
×
4143
      PROMPTPAY("promptpay"),
4144

4145
      @SerializedName("revolut_pay")
×
4146
      REVOLUT_PAY("revolut_pay"),
4147

4148
      @SerializedName("sepa_credit_transfer")
×
4149
      SEPA_CREDIT_TRANSFER("sepa_credit_transfer"),
4150

4151
      @SerializedName("sepa_debit")
×
4152
      SEPA_DEBIT("sepa_debit"),
4153

4154
      @SerializedName("sofort")
×
4155
      SOFORT("sofort"),
4156

4157
      @SerializedName("swish")
×
4158
      SWISH("swish"),
4159

4160
      @SerializedName("us_bank_account")
×
4161
      US_BANK_ACCOUNT("us_bank_account"),
4162

4163
      @SerializedName("wechat_pay")
×
4164
      WECHAT_PAY("wechat_pay");
4165

4166
      @Getter(onMethod_ = {@Override})
4167
      private final String value;
4168

4169
      PaymentMethodType(String value) {
×
4170
        this.value = value;
×
4171
      }
×
4172
    }
4173
  }
4174

4175
  @Getter
4176
  public static class Rendering {
4177
    /**
4178
     * How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. One
4179
     * of {@code exclude_tax} or {@code include_inclusive_tax}. {@code include_inclusive_tax} will
4180
     * include inclusive tax (and exclude exclusive tax) in invoice PDF amounts. {@code exclude_tax}
4181
     * will exclude all tax (inclusive and exclusive alike) from invoice PDF amounts.
4182
     */
4183
    @SerializedName("amount_tax_display")
4184
    ApiRequestParams.EnumParam amountTaxDisplay;
4185

4186
    /**
4187
     * Map of extra parameters for custom features not available in this client library. The content
4188
     * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each
4189
     * key/value pair is serialized as if the key is a root-level field (serialized) name in this
4190
     * param object. Effectively, this map is flattened to its parent instance.
4191
     */
4192
    @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
4193
    Map<String, Object> extraParams;
4194

4195
    /** Invoice pdf rendering options. */
4196
    @SerializedName("pdf")
4197
    Pdf pdf;
4198

4199
    /** ID of the invoice rendering template to use for this invoice. */
4200
    @SerializedName("template")
4201
    Object template;
4202

4203
    /** The specific version of invoice rendering template to use for this invoice. */
4204
    @SerializedName("template_version")
4205
    Object templateVersion;
4206

4207
    private Rendering(
4208
        ApiRequestParams.EnumParam amountTaxDisplay,
4209
        Map<String, Object> extraParams,
4210
        Pdf pdf,
4211
        Object template,
4212
        Object templateVersion) {
×
4213
      this.amountTaxDisplay = amountTaxDisplay;
×
4214
      this.extraParams = extraParams;
×
4215
      this.pdf = pdf;
×
4216
      this.template = template;
×
4217
      this.templateVersion = templateVersion;
×
4218
    }
×
4219

4220
    public static Builder builder() {
4221
      return new Builder();
×
4222
    }
4223

4224
    public static class Builder {
×
4225
      private ApiRequestParams.EnumParam amountTaxDisplay;
4226

4227
      private Map<String, Object> extraParams;
4228

4229
      private Pdf pdf;
4230

4231
      private Object template;
4232

4233
      private Object templateVersion;
4234

4235
      /** Finalize and obtain parameter instance from this builder. */
4236
      public InvoiceUpdateParams.Rendering build() {
4237
        return new InvoiceUpdateParams.Rendering(
×
4238
            this.amountTaxDisplay, this.extraParams, this.pdf, this.template, this.templateVersion);
4239
      }
4240

4241
      /**
4242
       * How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. One
4243
       * of {@code exclude_tax} or {@code include_inclusive_tax}. {@code include_inclusive_tax} will
4244
       * include inclusive tax (and exclude exclusive tax) in invoice PDF amounts. {@code
4245
       * exclude_tax} will exclude all tax (inclusive and exclusive alike) from invoice PDF amounts.
4246
       */
4247
      public Builder setAmountTaxDisplay(
4248
          InvoiceUpdateParams.Rendering.AmountTaxDisplay amountTaxDisplay) {
4249
        this.amountTaxDisplay = amountTaxDisplay;
×
4250
        return this;
×
4251
      }
4252

4253
      /**
4254
       * How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. One
4255
       * of {@code exclude_tax} or {@code include_inclusive_tax}. {@code include_inclusive_tax} will
4256
       * include inclusive tax (and exclude exclusive tax) in invoice PDF amounts. {@code
4257
       * exclude_tax} will exclude all tax (inclusive and exclusive alike) from invoice PDF amounts.
4258
       */
4259
      public Builder setAmountTaxDisplay(EmptyParam amountTaxDisplay) {
4260
        this.amountTaxDisplay = amountTaxDisplay;
×
4261
        return this;
×
4262
      }
4263

4264
      /**
4265
       * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll`
4266
       * call, and subsequent calls add additional key/value pairs to the original map. See {@link
4267
       * InvoiceUpdateParams.Rendering#extraParams} for the field documentation.
4268
       */
4269
      public Builder putExtraParam(String key, Object value) {
4270
        if (this.extraParams == null) {
×
4271
          this.extraParams = new HashMap<>();
×
4272
        }
4273
        this.extraParams.put(key, value);
×
4274
        return this;
×
4275
      }
4276

4277
      /**
4278
       * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
4279
       * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map.
4280
       * See {@link InvoiceUpdateParams.Rendering#extraParams} for the field documentation.
4281
       */
4282
      public Builder putAllExtraParam(Map<String, Object> map) {
4283
        if (this.extraParams == null) {
×
4284
          this.extraParams = new HashMap<>();
×
4285
        }
4286
        this.extraParams.putAll(map);
×
4287
        return this;
×
4288
      }
4289

4290
      /** Invoice pdf rendering options. */
4291
      public Builder setPdf(InvoiceUpdateParams.Rendering.Pdf pdf) {
4292
        this.pdf = pdf;
×
4293
        return this;
×
4294
      }
4295

4296
      /** ID of the invoice rendering template to use for this invoice. */
4297
      public Builder setTemplate(String template) {
4298
        this.template = template;
×
4299
        return this;
×
4300
      }
4301

4302
      /** ID of the invoice rendering template to use for this invoice. */
4303
      public Builder setTemplate(EmptyParam template) {
4304
        this.template = template;
×
4305
        return this;
×
4306
      }
4307

4308
      /** The specific version of invoice rendering template to use for this invoice. */
4309
      public Builder setTemplateVersion(Long templateVersion) {
4310
        this.templateVersion = templateVersion;
×
4311
        return this;
×
4312
      }
4313

4314
      /** The specific version of invoice rendering template to use for this invoice. */
4315
      public Builder setTemplateVersion(EmptyParam templateVersion) {
4316
        this.templateVersion = templateVersion;
×
4317
        return this;
×
4318
      }
4319
    }
4320

4321
    @Getter
4322
    public static class Pdf {
4323
      /**
4324
       * Map of extra parameters for custom features not available in this client library. The
4325
       * content in this map is not serialized under this field's {@code @SerializedName} value.
4326
       * Instead, each key/value pair is serialized as if the key is a root-level field (serialized)
4327
       * name in this param object. Effectively, this map is flattened to its parent instance.
4328
       */
4329
      @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
4330
      Map<String, Object> extraParams;
4331

4332
      /**
4333
       * Page size for invoice PDF. Can be set to {@code a4}, {@code letter}, or {@code auto}. If
4334
       * set to {@code auto}, invoice PDF page size defaults to {@code a4} for customers with
4335
       * Japanese locale and {@code letter} for customers with other locales.
4336
       */
4337
      @SerializedName("page_size")
4338
      PageSize pageSize;
4339

4340
      private Pdf(Map<String, Object> extraParams, PageSize pageSize) {
×
4341
        this.extraParams = extraParams;
×
4342
        this.pageSize = pageSize;
×
4343
      }
×
4344

4345
      public static Builder builder() {
4346
        return new Builder();
×
4347
      }
4348

4349
      public static class Builder {
×
4350
        private Map<String, Object> extraParams;
4351

4352
        private PageSize pageSize;
4353

4354
        /** Finalize and obtain parameter instance from this builder. */
4355
        public InvoiceUpdateParams.Rendering.Pdf build() {
4356
          return new InvoiceUpdateParams.Rendering.Pdf(this.extraParams, this.pageSize);
×
4357
        }
4358

4359
        /**
4360
         * Add a key/value pair to `extraParams` map. A map is initialized for the first
4361
         * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
4362
         * map. See {@link InvoiceUpdateParams.Rendering.Pdf#extraParams} for the field
4363
         * documentation.
4364
         */
4365
        public Builder putExtraParam(String key, Object value) {
4366
          if (this.extraParams == null) {
×
4367
            this.extraParams = new HashMap<>();
×
4368
          }
4369
          this.extraParams.put(key, value);
×
4370
          return this;
×
4371
        }
4372

4373
        /**
4374
         * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
4375
         * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
4376
         * map. See {@link InvoiceUpdateParams.Rendering.Pdf#extraParams} for the field
4377
         * documentation.
4378
         */
4379
        public Builder putAllExtraParam(Map<String, Object> map) {
4380
          if (this.extraParams == null) {
×
4381
            this.extraParams = new HashMap<>();
×
4382
          }
4383
          this.extraParams.putAll(map);
×
4384
          return this;
×
4385
        }
4386

4387
        /**
4388
         * Page size for invoice PDF. Can be set to {@code a4}, {@code letter}, or {@code auto}. If
4389
         * set to {@code auto}, invoice PDF page size defaults to {@code a4} for customers with
4390
         * Japanese locale and {@code letter} for customers with other locales.
4391
         */
4392
        public Builder setPageSize(InvoiceUpdateParams.Rendering.Pdf.PageSize pageSize) {
4393
          this.pageSize = pageSize;
×
4394
          return this;
×
4395
        }
4396
      }
4397

4398
      public enum PageSize implements ApiRequestParams.EnumParam {
×
4399
        @SerializedName("a4")
×
4400
        A4("a4"),
4401

4402
        @SerializedName("auto")
×
4403
        AUTO("auto"),
4404

4405
        @SerializedName("letter")
×
4406
        LETTER("letter");
4407

4408
        @Getter(onMethod_ = {@Override})
4409
        private final String value;
4410

4411
        PageSize(String value) {
×
4412
          this.value = value;
×
4413
        }
×
4414
      }
4415
    }
4416

4417
    public enum AmountTaxDisplay implements ApiRequestParams.EnumParam {
×
4418
      @SerializedName("exclude_tax")
×
4419
      EXCLUDE_TAX("exclude_tax"),
4420

4421
      @SerializedName("include_inclusive_tax")
×
4422
      INCLUDE_INCLUSIVE_TAX("include_inclusive_tax");
4423

4424
      @Getter(onMethod_ = {@Override})
4425
      private final String value;
4426

4427
      AmountTaxDisplay(String value) {
×
4428
        this.value = value;
×
4429
      }
×
4430
    }
4431
  }
4432

4433
  @Getter
4434
  public static class ShippingCost {
4435
    /**
4436
     * Map of extra parameters for custom features not available in this client library. The content
4437
     * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each
4438
     * key/value pair is serialized as if the key is a root-level field (serialized) name in this
4439
     * param object. Effectively, this map is flattened to its parent instance.
4440
     */
4441
    @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
4442
    Map<String, Object> extraParams;
4443

4444
    /** The ID of the shipping rate to use for this order. */
4445
    @SerializedName("shipping_rate")
4446
    Object shippingRate;
4447

4448
    /** Parameters to create a new ad-hoc shipping rate for this order. */
4449
    @SerializedName("shipping_rate_data")
4450
    ShippingRateData shippingRateData;
4451

4452
    private ShippingCost(
4453
        Map<String, Object> extraParams, Object shippingRate, ShippingRateData shippingRateData) {
×
4454
      this.extraParams = extraParams;
×
4455
      this.shippingRate = shippingRate;
×
4456
      this.shippingRateData = shippingRateData;
×
4457
    }
×
4458

4459
    public static Builder builder() {
4460
      return new Builder();
×
4461
    }
4462

4463
    public static class Builder {
×
4464
      private Map<String, Object> extraParams;
4465

4466
      private Object shippingRate;
4467

4468
      private ShippingRateData shippingRateData;
4469

4470
      /** Finalize and obtain parameter instance from this builder. */
4471
      public InvoiceUpdateParams.ShippingCost build() {
4472
        return new InvoiceUpdateParams.ShippingCost(
×
4473
            this.extraParams, this.shippingRate, this.shippingRateData);
4474
      }
4475

4476
      /**
4477
       * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll`
4478
       * call, and subsequent calls add additional key/value pairs to the original map. See {@link
4479
       * InvoiceUpdateParams.ShippingCost#extraParams} for the field documentation.
4480
       */
4481
      public Builder putExtraParam(String key, Object value) {
4482
        if (this.extraParams == null) {
×
4483
          this.extraParams = new HashMap<>();
×
4484
        }
4485
        this.extraParams.put(key, value);
×
4486
        return this;
×
4487
      }
4488

4489
      /**
4490
       * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
4491
       * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map.
4492
       * See {@link InvoiceUpdateParams.ShippingCost#extraParams} for the field documentation.
4493
       */
4494
      public Builder putAllExtraParam(Map<String, Object> map) {
4495
        if (this.extraParams == null) {
×
4496
          this.extraParams = new HashMap<>();
×
4497
        }
4498
        this.extraParams.putAll(map);
×
4499
        return this;
×
4500
      }
4501

4502
      /** The ID of the shipping rate to use for this order. */
4503
      public Builder setShippingRate(String shippingRate) {
4504
        this.shippingRate = shippingRate;
×
4505
        return this;
×
4506
      }
4507

4508
      /** The ID of the shipping rate to use for this order. */
4509
      public Builder setShippingRate(EmptyParam shippingRate) {
4510
        this.shippingRate = shippingRate;
×
4511
        return this;
×
4512
      }
4513

4514
      /** Parameters to create a new ad-hoc shipping rate for this order. */
4515
      public Builder setShippingRateData(
4516
          InvoiceUpdateParams.ShippingCost.ShippingRateData shippingRateData) {
4517
        this.shippingRateData = shippingRateData;
×
4518
        return this;
×
4519
      }
4520
    }
4521

4522
    @Getter
4523
    public static class ShippingRateData {
4524
      /**
4525
       * The estimated range for how long shipping will take, meant to be displayable to the
4526
       * customer. This will appear on CheckoutSessions.
4527
       */
4528
      @SerializedName("delivery_estimate")
4529
      DeliveryEstimate deliveryEstimate;
4530

4531
      /**
4532
       * <strong>Required.</strong> The name of the shipping rate, meant to be displayable to the
4533
       * customer. This will appear on CheckoutSessions.
4534
       */
4535
      @SerializedName("display_name")
4536
      Object displayName;
4537

4538
      /**
4539
       * Map of extra parameters for custom features not available in this client library. The
4540
       * content in this map is not serialized under this field's {@code @SerializedName} value.
4541
       * Instead, each key/value pair is serialized as if the key is a root-level field (serialized)
4542
       * name in this param object. Effectively, this map is flattened to its parent instance.
4543
       */
4544
      @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
4545
      Map<String, Object> extraParams;
4546

4547
      /**
4548
       * Describes a fixed amount to charge for shipping. Must be present if type is {@code
4549
       * fixed_amount}.
4550
       */
4551
      @SerializedName("fixed_amount")
4552
      FixedAmount fixedAmount;
4553

4554
      /**
4555
       * Set of <a href="https://stripe.com/docs/api/metadata">key-value pairs</a> that you can
4556
       * attach to an object. This can be useful for storing additional information about the object
4557
       * in a structured format. Individual keys can be unset by posting an empty value to them. All
4558
       * keys can be unset by posting an empty value to {@code metadata}.
4559
       */
4560
      @SerializedName("metadata")
4561
      Map<String, String> metadata;
4562

4563
      /**
4564
       * Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of
4565
       * {@code inclusive}, {@code exclusive}, or {@code unspecified}.
4566
       */
4567
      @SerializedName("tax_behavior")
4568
      TaxBehavior taxBehavior;
4569

4570
      /**
4571
       * A <a href="https://stripe.com/docs/tax/tax-categories">tax code</a> ID. The Shipping tax
4572
       * code is {@code txcd_92010001}.
4573
       */
4574
      @SerializedName("tax_code")
4575
      Object taxCode;
4576

4577
      /** The type of calculation to use on the shipping rate. */
4578
      @SerializedName("type")
4579
      Type type;
4580

4581
      private ShippingRateData(
4582
          DeliveryEstimate deliveryEstimate,
4583
          Object displayName,
4584
          Map<String, Object> extraParams,
4585
          FixedAmount fixedAmount,
4586
          Map<String, String> metadata,
4587
          TaxBehavior taxBehavior,
4588
          Object taxCode,
4589
          Type type) {
×
4590
        this.deliveryEstimate = deliveryEstimate;
×
4591
        this.displayName = displayName;
×
4592
        this.extraParams = extraParams;
×
4593
        this.fixedAmount = fixedAmount;
×
4594
        this.metadata = metadata;
×
4595
        this.taxBehavior = taxBehavior;
×
4596
        this.taxCode = taxCode;
×
4597
        this.type = type;
×
4598
      }
×
4599

4600
      public static Builder builder() {
4601
        return new Builder();
×
4602
      }
4603

4604
      public static class Builder {
×
4605
        private DeliveryEstimate deliveryEstimate;
4606

4607
        private Object displayName;
4608

4609
        private Map<String, Object> extraParams;
4610

4611
        private FixedAmount fixedAmount;
4612

4613
        private Map<String, String> metadata;
4614

4615
        private TaxBehavior taxBehavior;
4616

4617
        private Object taxCode;
4618

4619
        private Type type;
4620

4621
        /** Finalize and obtain parameter instance from this builder. */
4622
        public InvoiceUpdateParams.ShippingCost.ShippingRateData build() {
4623
          return new InvoiceUpdateParams.ShippingCost.ShippingRateData(
×
4624
              this.deliveryEstimate,
4625
              this.displayName,
4626
              this.extraParams,
4627
              this.fixedAmount,
4628
              this.metadata,
4629
              this.taxBehavior,
4630
              this.taxCode,
4631
              this.type);
4632
        }
4633

4634
        /**
4635
         * The estimated range for how long shipping will take, meant to be displayable to the
4636
         * customer. This will appear on CheckoutSessions.
4637
         */
4638
        public Builder setDeliveryEstimate(
4639
            InvoiceUpdateParams.ShippingCost.ShippingRateData.DeliveryEstimate deliveryEstimate) {
4640
          this.deliveryEstimate = deliveryEstimate;
×
4641
          return this;
×
4642
        }
4643

4644
        /**
4645
         * <strong>Required.</strong> The name of the shipping rate, meant to be displayable to the
4646
         * customer. This will appear on CheckoutSessions.
4647
         */
4648
        public Builder setDisplayName(String displayName) {
4649
          this.displayName = displayName;
×
4650
          return this;
×
4651
        }
4652

4653
        /**
4654
         * <strong>Required.</strong> The name of the shipping rate, meant to be displayable to the
4655
         * customer. This will appear on CheckoutSessions.
4656
         */
4657
        public Builder setDisplayName(EmptyParam displayName) {
4658
          this.displayName = displayName;
×
4659
          return this;
×
4660
        }
4661

4662
        /**
4663
         * Add a key/value pair to `extraParams` map. A map is initialized for the first
4664
         * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
4665
         * map. See {@link InvoiceUpdateParams.ShippingCost.ShippingRateData#extraParams} for the
4666
         * field documentation.
4667
         */
4668
        public Builder putExtraParam(String key, Object value) {
4669
          if (this.extraParams == null) {
×
4670
            this.extraParams = new HashMap<>();
×
4671
          }
4672
          this.extraParams.put(key, value);
×
4673
          return this;
×
4674
        }
4675

4676
        /**
4677
         * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
4678
         * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
4679
         * map. See {@link InvoiceUpdateParams.ShippingCost.ShippingRateData#extraParams} for the
4680
         * field documentation.
4681
         */
4682
        public Builder putAllExtraParam(Map<String, Object> map) {
4683
          if (this.extraParams == null) {
×
4684
            this.extraParams = new HashMap<>();
×
4685
          }
4686
          this.extraParams.putAll(map);
×
4687
          return this;
×
4688
        }
4689

4690
        /**
4691
         * Describes a fixed amount to charge for shipping. Must be present if type is {@code
4692
         * fixed_amount}.
4693
         */
4694
        public Builder setFixedAmount(
4695
            InvoiceUpdateParams.ShippingCost.ShippingRateData.FixedAmount fixedAmount) {
4696
          this.fixedAmount = fixedAmount;
×
4697
          return this;
×
4698
        }
4699

4700
        /**
4701
         * Add a key/value pair to `metadata` map. A map is initialized for the first `put/putAll`
4702
         * call, and subsequent calls add additional key/value pairs to the original map. See {@link
4703
         * InvoiceUpdateParams.ShippingCost.ShippingRateData#metadata} for the field documentation.
4704
         */
4705
        public Builder putMetadata(String key, String value) {
4706
          if (this.metadata == null) {
×
4707
            this.metadata = new HashMap<>();
×
4708
          }
4709
          this.metadata.put(key, value);
×
4710
          return this;
×
4711
        }
4712

4713
        /**
4714
         * Add all map key/value pairs to `metadata` map. A map is initialized for the first
4715
         * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
4716
         * map. See {@link InvoiceUpdateParams.ShippingCost.ShippingRateData#metadata} for the field
4717
         * documentation.
4718
         */
4719
        public Builder putAllMetadata(Map<String, String> map) {
4720
          if (this.metadata == null) {
×
4721
            this.metadata = new HashMap<>();
×
4722
          }
4723
          this.metadata.putAll(map);
×
4724
          return this;
×
4725
        }
4726

4727
        /**
4728
         * Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of
4729
         * {@code inclusive}, {@code exclusive}, or {@code unspecified}.
4730
         */
4731
        public Builder setTaxBehavior(
4732
            InvoiceUpdateParams.ShippingCost.ShippingRateData.TaxBehavior taxBehavior) {
4733
          this.taxBehavior = taxBehavior;
×
4734
          return this;
×
4735
        }
4736

4737
        /**
4738
         * A <a href="https://stripe.com/docs/tax/tax-categories">tax code</a> ID. The Shipping tax
4739
         * code is {@code txcd_92010001}.
4740
         */
4741
        public Builder setTaxCode(String taxCode) {
4742
          this.taxCode = taxCode;
×
4743
          return this;
×
4744
        }
4745

4746
        /**
4747
         * A <a href="https://stripe.com/docs/tax/tax-categories">tax code</a> ID. The Shipping tax
4748
         * code is {@code txcd_92010001}.
4749
         */
4750
        public Builder setTaxCode(EmptyParam taxCode) {
4751
          this.taxCode = taxCode;
×
4752
          return this;
×
4753
        }
4754

4755
        /** The type of calculation to use on the shipping rate. */
4756
        public Builder setType(InvoiceUpdateParams.ShippingCost.ShippingRateData.Type type) {
4757
          this.type = type;
×
4758
          return this;
×
4759
        }
4760
      }
4761

4762
      @Getter
4763
      public static class DeliveryEstimate {
4764
        /**
4765
         * Map of extra parameters for custom features not available in this client library. The
4766
         * content in this map is not serialized under this field's {@code @SerializedName} value.
4767
         * Instead, each key/value pair is serialized as if the key is a root-level field
4768
         * (serialized) name in this param object. Effectively, this map is flattened to its parent
4769
         * instance.
4770
         */
4771
        @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
4772
        Map<String, Object> extraParams;
4773

4774
        /**
4775
         * The upper bound of the estimated range. If empty, represents no upper bound i.e.,
4776
         * infinite.
4777
         */
4778
        @SerializedName("maximum")
4779
        Maximum maximum;
4780

4781
        /** The lower bound of the estimated range. If empty, represents no lower bound. */
4782
        @SerializedName("minimum")
4783
        Minimum minimum;
4784

4785
        private DeliveryEstimate(
4786
            Map<String, Object> extraParams, Maximum maximum, Minimum minimum) {
×
4787
          this.extraParams = extraParams;
×
4788
          this.maximum = maximum;
×
4789
          this.minimum = minimum;
×
4790
        }
×
4791

4792
        public static Builder builder() {
4793
          return new Builder();
×
4794
        }
4795

4796
        public static class Builder {
×
4797
          private Map<String, Object> extraParams;
4798

4799
          private Maximum maximum;
4800

4801
          private Minimum minimum;
4802

4803
          /** Finalize and obtain parameter instance from this builder. */
4804
          public InvoiceUpdateParams.ShippingCost.ShippingRateData.DeliveryEstimate build() {
4805
            return new InvoiceUpdateParams.ShippingCost.ShippingRateData.DeliveryEstimate(
×
4806
                this.extraParams, this.maximum, this.minimum);
4807
          }
4808

4809
          /**
4810
           * Add a key/value pair to `extraParams` map. A map is initialized for the first
4811
           * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
4812
           * map. See {@link
4813
           * InvoiceUpdateParams.ShippingCost.ShippingRateData.DeliveryEstimate#extraParams} for the
4814
           * field documentation.
4815
           */
4816
          public Builder putExtraParam(String key, Object value) {
4817
            if (this.extraParams == null) {
×
4818
              this.extraParams = new HashMap<>();
×
4819
            }
4820
            this.extraParams.put(key, value);
×
4821
            return this;
×
4822
          }
4823

4824
          /**
4825
           * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
4826
           * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
4827
           * map. See {@link
4828
           * InvoiceUpdateParams.ShippingCost.ShippingRateData.DeliveryEstimate#extraParams} for the
4829
           * field documentation.
4830
           */
4831
          public Builder putAllExtraParam(Map<String, Object> map) {
4832
            if (this.extraParams == null) {
×
4833
              this.extraParams = new HashMap<>();
×
4834
            }
4835
            this.extraParams.putAll(map);
×
4836
            return this;
×
4837
          }
4838

4839
          /**
4840
           * The upper bound of the estimated range. If empty, represents no upper bound i.e.,
4841
           * infinite.
4842
           */
4843
          public Builder setMaximum(
4844
              InvoiceUpdateParams.ShippingCost.ShippingRateData.DeliveryEstimate.Maximum maximum) {
4845
            this.maximum = maximum;
×
4846
            return this;
×
4847
          }
4848

4849
          /** The lower bound of the estimated range. If empty, represents no lower bound. */
4850
          public Builder setMinimum(
4851
              InvoiceUpdateParams.ShippingCost.ShippingRateData.DeliveryEstimate.Minimum minimum) {
4852
            this.minimum = minimum;
×
4853
            return this;
×
4854
          }
4855
        }
4856

4857
        @Getter
4858
        public static class Maximum {
4859
          /**
4860
           * Map of extra parameters for custom features not available in this client library. The
4861
           * content in this map is not serialized under this field's {@code @SerializedName} value.
4862
           * Instead, each key/value pair is serialized as if the key is a root-level field
4863
           * (serialized) name in this param object. Effectively, this map is flattened to its
4864
           * parent instance.
4865
           */
4866
          @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
4867
          Map<String, Object> extraParams;
4868

4869
          /** <strong>Required.</strong> A unit of time. */
4870
          @SerializedName("unit")
4871
          Unit unit;
4872

4873
          /** <strong>Required.</strong> Must be greater than 0. */
4874
          @SerializedName("value")
4875
          Long value;
4876

4877
          private Maximum(Map<String, Object> extraParams, Unit unit, Long value) {
×
4878
            this.extraParams = extraParams;
×
4879
            this.unit = unit;
×
4880
            this.value = value;
×
4881
          }
×
4882

4883
          public static Builder builder() {
4884
            return new Builder();
×
4885
          }
4886

4887
          public static class Builder {
×
4888
            private Map<String, Object> extraParams;
4889

4890
            private Unit unit;
4891

4892
            private Long value;
4893

4894
            /** Finalize and obtain parameter instance from this builder. */
4895
            public InvoiceUpdateParams.ShippingCost.ShippingRateData.DeliveryEstimate.Maximum
4896
                build() {
4897
              return new InvoiceUpdateParams.ShippingCost.ShippingRateData.DeliveryEstimate.Maximum(
×
4898
                  this.extraParams, this.unit, this.value);
4899
            }
4900

4901
            /**
4902
             * Add a key/value pair to `extraParams` map. A map is initialized for the first
4903
             * `put/putAll` call, and subsequent calls add additional key/value pairs to the
4904
             * original map. See {@link
4905
             * InvoiceUpdateParams.ShippingCost.ShippingRateData.DeliveryEstimate.Maximum#extraParams}
4906
             * for the field documentation.
4907
             */
4908
            public Builder putExtraParam(String key, Object value) {
4909
              if (this.extraParams == null) {
×
4910
                this.extraParams = new HashMap<>();
×
4911
              }
4912
              this.extraParams.put(key, value);
×
4913
              return this;
×
4914
            }
4915

4916
            /**
4917
             * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
4918
             * `put/putAll` call, and subsequent calls add additional key/value pairs to the
4919
             * original map. See {@link
4920
             * InvoiceUpdateParams.ShippingCost.ShippingRateData.DeliveryEstimate.Maximum#extraParams}
4921
             * for the field documentation.
4922
             */
4923
            public Builder putAllExtraParam(Map<String, Object> map) {
4924
              if (this.extraParams == null) {
×
4925
                this.extraParams = new HashMap<>();
×
4926
              }
4927
              this.extraParams.putAll(map);
×
4928
              return this;
×
4929
            }
4930

4931
            /** <strong>Required.</strong> A unit of time. */
4932
            public Builder setUnit(
4933
                InvoiceUpdateParams.ShippingCost.ShippingRateData.DeliveryEstimate.Maximum.Unit
4934
                    unit) {
4935
              this.unit = unit;
×
4936
              return this;
×
4937
            }
4938

4939
            /** <strong>Required.</strong> Must be greater than 0. */
4940
            public Builder setValue(Long value) {
4941
              this.value = value;
×
4942
              return this;
×
4943
            }
4944
          }
4945

4946
          public enum Unit implements ApiRequestParams.EnumParam {
×
4947
            @SerializedName("business_day")
×
4948
            BUSINESS_DAY("business_day"),
4949

4950
            @SerializedName("day")
×
4951
            DAY("day"),
4952

4953
            @SerializedName("hour")
×
4954
            HOUR("hour"),
4955

4956
            @SerializedName("month")
×
4957
            MONTH("month"),
4958

4959
            @SerializedName("week")
×
4960
            WEEK("week");
4961

4962
            @Getter(onMethod_ = {@Override})
4963
            private final String value;
4964

4965
            Unit(String value) {
×
4966
              this.value = value;
×
4967
            }
×
4968
          }
4969
        }
4970

4971
        @Getter
4972
        public static class Minimum {
4973
          /**
4974
           * Map of extra parameters for custom features not available in this client library. The
4975
           * content in this map is not serialized under this field's {@code @SerializedName} value.
4976
           * Instead, each key/value pair is serialized as if the key is a root-level field
4977
           * (serialized) name in this param object. Effectively, this map is flattened to its
4978
           * parent instance.
4979
           */
4980
          @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
4981
          Map<String, Object> extraParams;
4982

4983
          /** <strong>Required.</strong> A unit of time. */
4984
          @SerializedName("unit")
4985
          Unit unit;
4986

4987
          /** <strong>Required.</strong> Must be greater than 0. */
4988
          @SerializedName("value")
4989
          Long value;
4990

4991
          private Minimum(Map<String, Object> extraParams, Unit unit, Long value) {
×
4992
            this.extraParams = extraParams;
×
4993
            this.unit = unit;
×
4994
            this.value = value;
×
4995
          }
×
4996

4997
          public static Builder builder() {
4998
            return new Builder();
×
4999
          }
5000

5001
          public static class Builder {
×
5002
            private Map<String, Object> extraParams;
5003

5004
            private Unit unit;
5005

5006
            private Long value;
5007

5008
            /** Finalize and obtain parameter instance from this builder. */
5009
            public InvoiceUpdateParams.ShippingCost.ShippingRateData.DeliveryEstimate.Minimum
5010
                build() {
5011
              return new InvoiceUpdateParams.ShippingCost.ShippingRateData.DeliveryEstimate.Minimum(
×
5012
                  this.extraParams, this.unit, this.value);
5013
            }
5014

5015
            /**
5016
             * Add a key/value pair to `extraParams` map. A map is initialized for the first
5017
             * `put/putAll` call, and subsequent calls add additional key/value pairs to the
5018
             * original map. See {@link
5019
             * InvoiceUpdateParams.ShippingCost.ShippingRateData.DeliveryEstimate.Minimum#extraParams}
5020
             * for the field documentation.
5021
             */
5022
            public Builder putExtraParam(String key, Object value) {
5023
              if (this.extraParams == null) {
×
5024
                this.extraParams = new HashMap<>();
×
5025
              }
5026
              this.extraParams.put(key, value);
×
5027
              return this;
×
5028
            }
5029

5030
            /**
5031
             * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
5032
             * `put/putAll` call, and subsequent calls add additional key/value pairs to the
5033
             * original map. See {@link
5034
             * InvoiceUpdateParams.ShippingCost.ShippingRateData.DeliveryEstimate.Minimum#extraParams}
5035
             * for the field documentation.
5036
             */
5037
            public Builder putAllExtraParam(Map<String, Object> map) {
5038
              if (this.extraParams == null) {
×
5039
                this.extraParams = new HashMap<>();
×
5040
              }
5041
              this.extraParams.putAll(map);
×
5042
              return this;
×
5043
            }
5044

5045
            /** <strong>Required.</strong> A unit of time. */
5046
            public Builder setUnit(
5047
                InvoiceUpdateParams.ShippingCost.ShippingRateData.DeliveryEstimate.Minimum.Unit
5048
                    unit) {
5049
              this.unit = unit;
×
5050
              return this;
×
5051
            }
5052

5053
            /** <strong>Required.</strong> Must be greater than 0. */
5054
            public Builder setValue(Long value) {
5055
              this.value = value;
×
5056
              return this;
×
5057
            }
5058
          }
5059

5060
          public enum Unit implements ApiRequestParams.EnumParam {
×
5061
            @SerializedName("business_day")
×
5062
            BUSINESS_DAY("business_day"),
5063

5064
            @SerializedName("day")
×
5065
            DAY("day"),
5066

5067
            @SerializedName("hour")
×
5068
            HOUR("hour"),
5069

5070
            @SerializedName("month")
×
5071
            MONTH("month"),
5072

5073
            @SerializedName("week")
×
5074
            WEEK("week");
5075

5076
            @Getter(onMethod_ = {@Override})
5077
            private final String value;
5078

5079
            Unit(String value) {
×
5080
              this.value = value;
×
5081
            }
×
5082
          }
5083
        }
5084
      }
5085

5086
      @Getter
5087
      public static class FixedAmount {
5088
        /**
5089
         * <strong>Required.</strong> A non-negative integer in cents representing how much to
5090
         * charge.
5091
         */
5092
        @SerializedName("amount")
5093
        Long amount;
5094

5095
        /**
5096
         * <strong>Required.</strong> Three-letter <a
5097
         * href="https://www.iso.org/iso-4217-currency-codes.html">ISO currency code</a>, in
5098
         * lowercase. Must be a <a href="https://stripe.com/docs/currencies">supported currency</a>.
5099
         */
5100
        @SerializedName("currency")
5101
        Object currency;
5102

5103
        /**
5104
         * Shipping rates defined in each available currency option. Each key must be a three-letter
5105
         * <a href="https://www.iso.org/iso-4217-currency-codes.html">ISO currency code</a> and a <a
5106
         * href="https://stripe.com/docs/currencies">supported currency</a>.
5107
         */
5108
        @SerializedName("currency_options")
5109
        Map<String, InvoiceUpdateParams.ShippingCost.ShippingRateData.FixedAmount.CurrencyOption>
5110
            currencyOptions;
5111

5112
        /**
5113
         * Map of extra parameters for custom features not available in this client library. The
5114
         * content in this map is not serialized under this field's {@code @SerializedName} value.
5115
         * Instead, each key/value pair is serialized as if the key is a root-level field
5116
         * (serialized) name in this param object. Effectively, this map is flattened to its parent
5117
         * instance.
5118
         */
5119
        @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
5120
        Map<String, Object> extraParams;
5121

5122
        private FixedAmount(
5123
            Long amount,
5124
            Object currency,
5125
            Map<
5126
                    String,
5127
                    InvoiceUpdateParams.ShippingCost.ShippingRateData.FixedAmount.CurrencyOption>
5128
                currencyOptions,
5129
            Map<String, Object> extraParams) {
×
5130
          this.amount = amount;
×
5131
          this.currency = currency;
×
5132
          this.currencyOptions = currencyOptions;
×
5133
          this.extraParams = extraParams;
×
5134
        }
×
5135

5136
        public static Builder builder() {
5137
          return new Builder();
×
5138
        }
5139

5140
        public static class Builder {
×
5141
          private Long amount;
5142

5143
          private Object currency;
5144

5145
          private Map<
5146
                  String,
5147
                  InvoiceUpdateParams.ShippingCost.ShippingRateData.FixedAmount.CurrencyOption>
5148
              currencyOptions;
5149

5150
          private Map<String, Object> extraParams;
5151

5152
          /** Finalize and obtain parameter instance from this builder. */
5153
          public InvoiceUpdateParams.ShippingCost.ShippingRateData.FixedAmount build() {
5154
            return new InvoiceUpdateParams.ShippingCost.ShippingRateData.FixedAmount(
×
5155
                this.amount, this.currency, this.currencyOptions, this.extraParams);
5156
          }
5157

5158
          /**
5159
           * <strong>Required.</strong> A non-negative integer in cents representing how much to
5160
           * charge.
5161
           */
5162
          public Builder setAmount(Long amount) {
5163
            this.amount = amount;
×
5164
            return this;
×
5165
          }
5166

5167
          /**
5168
           * <strong>Required.</strong> Three-letter <a
5169
           * href="https://www.iso.org/iso-4217-currency-codes.html">ISO currency code</a>, in
5170
           * lowercase. Must be a <a href="https://stripe.com/docs/currencies">supported
5171
           * currency</a>.
5172
           */
5173
          public Builder setCurrency(String currency) {
5174
            this.currency = currency;
×
5175
            return this;
×
5176
          }
5177

5178
          /**
5179
           * <strong>Required.</strong> Three-letter <a
5180
           * href="https://www.iso.org/iso-4217-currency-codes.html">ISO currency code</a>, in
5181
           * lowercase. Must be a <a href="https://stripe.com/docs/currencies">supported
5182
           * currency</a>.
5183
           */
5184
          public Builder setCurrency(EmptyParam currency) {
5185
            this.currency = currency;
×
5186
            return this;
×
5187
          }
5188

5189
          /**
5190
           * Add a key/value pair to `currencyOptions` map. A map is initialized for the first
5191
           * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
5192
           * map. See {@link
5193
           * InvoiceUpdateParams.ShippingCost.ShippingRateData.FixedAmount#currencyOptions} for the
5194
           * field documentation.
5195
           */
5196
          public Builder putCurrencyOption(
5197
              String key,
5198
              InvoiceUpdateParams.ShippingCost.ShippingRateData.FixedAmount.CurrencyOption value) {
5199
            if (this.currencyOptions == null) {
×
5200
              this.currencyOptions = new HashMap<>();
×
5201
            }
5202
            this.currencyOptions.put(key, value);
×
5203
            return this;
×
5204
          }
5205

5206
          /**
5207
           * Add all map key/value pairs to `currencyOptions` map. A map is initialized for the
5208
           * first `put/putAll` call, and subsequent calls add additional key/value pairs to the
5209
           * original map. See {@link
5210
           * InvoiceUpdateParams.ShippingCost.ShippingRateData.FixedAmount#currencyOptions} for the
5211
           * field documentation.
5212
           */
5213
          public Builder putAllCurrencyOption(
5214
              Map<
5215
                      String,
5216
                      InvoiceUpdateParams.ShippingCost.ShippingRateData.FixedAmount.CurrencyOption>
5217
                  map) {
5218
            if (this.currencyOptions == null) {
×
5219
              this.currencyOptions = new HashMap<>();
×
5220
            }
5221
            this.currencyOptions.putAll(map);
×
5222
            return this;
×
5223
          }
5224

5225
          /**
5226
           * Add a key/value pair to `extraParams` map. A map is initialized for the first
5227
           * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
5228
           * map. See {@link
5229
           * InvoiceUpdateParams.ShippingCost.ShippingRateData.FixedAmount#extraParams} for the
5230
           * field documentation.
5231
           */
5232
          public Builder putExtraParam(String key, Object value) {
5233
            if (this.extraParams == null) {
×
5234
              this.extraParams = new HashMap<>();
×
5235
            }
5236
            this.extraParams.put(key, value);
×
5237
            return this;
×
5238
          }
5239

5240
          /**
5241
           * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
5242
           * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
5243
           * map. See {@link
5244
           * InvoiceUpdateParams.ShippingCost.ShippingRateData.FixedAmount#extraParams} for the
5245
           * field documentation.
5246
           */
5247
          public Builder putAllExtraParam(Map<String, Object> map) {
5248
            if (this.extraParams == null) {
×
5249
              this.extraParams = new HashMap<>();
×
5250
            }
5251
            this.extraParams.putAll(map);
×
5252
            return this;
×
5253
          }
5254
        }
5255

5256
        @Getter
5257
        public static class CurrencyOption {
5258
          /**
5259
           * <strong>Required.</strong> A non-negative integer in cents representing how much to
5260
           * charge.
5261
           */
5262
          @SerializedName("amount")
5263
          Long amount;
5264

5265
          /**
5266
           * Map of extra parameters for custom features not available in this client library. The
5267
           * content in this map is not serialized under this field's {@code @SerializedName} value.
5268
           * Instead, each key/value pair is serialized as if the key is a root-level field
5269
           * (serialized) name in this param object. Effectively, this map is flattened to its
5270
           * parent instance.
5271
           */
5272
          @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
5273
          Map<String, Object> extraParams;
5274

5275
          /**
5276
           * Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One
5277
           * of {@code inclusive}, {@code exclusive}, or {@code unspecified}.
5278
           */
5279
          @SerializedName("tax_behavior")
5280
          TaxBehavior taxBehavior;
5281

5282
          private CurrencyOption(
5283
              Long amount, Map<String, Object> extraParams, TaxBehavior taxBehavior) {
×
5284
            this.amount = amount;
×
5285
            this.extraParams = extraParams;
×
5286
            this.taxBehavior = taxBehavior;
×
5287
          }
×
5288

5289
          public static Builder builder() {
5290
            return new Builder();
×
5291
          }
5292

5293
          public static class Builder {
×
5294
            private Long amount;
5295

5296
            private Map<String, Object> extraParams;
5297

5298
            private TaxBehavior taxBehavior;
5299

5300
            /** Finalize and obtain parameter instance from this builder. */
5301
            public InvoiceUpdateParams.ShippingCost.ShippingRateData.FixedAmount.CurrencyOption
5302
                build() {
5303
              return new InvoiceUpdateParams.ShippingCost.ShippingRateData.FixedAmount
×
5304
                  .CurrencyOption(this.amount, this.extraParams, this.taxBehavior);
5305
            }
5306

5307
            /**
5308
             * <strong>Required.</strong> A non-negative integer in cents representing how much to
5309
             * charge.
5310
             */
5311
            public Builder setAmount(Long amount) {
5312
              this.amount = amount;
×
5313
              return this;
×
5314
            }
5315

5316
            /**
5317
             * Add a key/value pair to `extraParams` map. A map is initialized for the first
5318
             * `put/putAll` call, and subsequent calls add additional key/value pairs to the
5319
             * original map. See {@link
5320
             * InvoiceUpdateParams.ShippingCost.ShippingRateData.FixedAmount.CurrencyOption#extraParams}
5321
             * for the field documentation.
5322
             */
5323
            public Builder putExtraParam(String key, Object value) {
5324
              if (this.extraParams == null) {
×
5325
                this.extraParams = new HashMap<>();
×
5326
              }
5327
              this.extraParams.put(key, value);
×
5328
              return this;
×
5329
            }
5330

5331
            /**
5332
             * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
5333
             * `put/putAll` call, and subsequent calls add additional key/value pairs to the
5334
             * original map. See {@link
5335
             * InvoiceUpdateParams.ShippingCost.ShippingRateData.FixedAmount.CurrencyOption#extraParams}
5336
             * for the field documentation.
5337
             */
5338
            public Builder putAllExtraParam(Map<String, Object> map) {
5339
              if (this.extraParams == null) {
×
5340
                this.extraParams = new HashMap<>();
×
5341
              }
5342
              this.extraParams.putAll(map);
×
5343
              return this;
×
5344
            }
5345

5346
            /**
5347
             * Specifies whether the rate is considered inclusive of taxes or exclusive of taxes.
5348
             * One of {@code inclusive}, {@code exclusive}, or {@code unspecified}.
5349
             */
5350
            public Builder setTaxBehavior(
5351
                InvoiceUpdateParams.ShippingCost.ShippingRateData.FixedAmount.CurrencyOption
5352
                        .TaxBehavior
5353
                    taxBehavior) {
5354
              this.taxBehavior = taxBehavior;
×
5355
              return this;
×
5356
            }
5357
          }
5358

5359
          public enum TaxBehavior implements ApiRequestParams.EnumParam {
×
5360
            @SerializedName("exclusive")
×
5361
            EXCLUSIVE("exclusive"),
5362

5363
            @SerializedName("inclusive")
×
5364
            INCLUSIVE("inclusive"),
5365

5366
            @SerializedName("unspecified")
×
5367
            UNSPECIFIED("unspecified");
5368

5369
            @Getter(onMethod_ = {@Override})
5370
            private final String value;
5371

5372
            TaxBehavior(String value) {
×
5373
              this.value = value;
×
5374
            }
×
5375
          }
5376
        }
5377
      }
5378

5379
      public enum TaxBehavior implements ApiRequestParams.EnumParam {
×
5380
        @SerializedName("exclusive")
×
5381
        EXCLUSIVE("exclusive"),
5382

5383
        @SerializedName("inclusive")
×
5384
        INCLUSIVE("inclusive"),
5385

5386
        @SerializedName("unspecified")
×
5387
        UNSPECIFIED("unspecified");
5388

5389
        @Getter(onMethod_ = {@Override})
5390
        private final String value;
5391

5392
        TaxBehavior(String value) {
×
5393
          this.value = value;
×
5394
        }
×
5395
      }
5396

5397
      public enum Type implements ApiRequestParams.EnumParam {
×
5398
        @SerializedName("fixed_amount")
×
5399
        FIXED_AMOUNT("fixed_amount");
5400

5401
        @Getter(onMethod_ = {@Override})
5402
        private final String value;
5403

5404
        Type(String value) {
×
5405
          this.value = value;
×
5406
        }
×
5407
      }
5408
    }
5409
  }
5410

5411
  @Getter
5412
  public static class ShippingDetails {
5413
    /** <strong>Required.</strong> Shipping address */
5414
    @SerializedName("address")
5415
    Address address;
5416

5417
    /**
5418
     * Map of extra parameters for custom features not available in this client library. The content
5419
     * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each
5420
     * key/value pair is serialized as if the key is a root-level field (serialized) name in this
5421
     * param object. Effectively, this map is flattened to its parent instance.
5422
     */
5423
    @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
5424
    Map<String, Object> extraParams;
5425

5426
    /** <strong>Required.</strong> Recipient name. */
5427
    @SerializedName("name")
5428
    Object name;
5429

5430
    /** Recipient phone (including extension). */
5431
    @SerializedName("phone")
5432
    Object phone;
5433

5434
    private ShippingDetails(
5435
        Address address, Map<String, Object> extraParams, Object name, Object phone) {
×
5436
      this.address = address;
×
5437
      this.extraParams = extraParams;
×
5438
      this.name = name;
×
5439
      this.phone = phone;
×
5440
    }
×
5441

5442
    public static Builder builder() {
5443
      return new Builder();
×
5444
    }
5445

5446
    public static class Builder {
×
5447
      private Address address;
5448

5449
      private Map<String, Object> extraParams;
5450

5451
      private Object name;
5452

5453
      private Object phone;
5454

5455
      /** Finalize and obtain parameter instance from this builder. */
5456
      public InvoiceUpdateParams.ShippingDetails build() {
5457
        return new InvoiceUpdateParams.ShippingDetails(
×
5458
            this.address, this.extraParams, this.name, this.phone);
5459
      }
5460

5461
      /** <strong>Required.</strong> Shipping address */
5462
      public Builder setAddress(InvoiceUpdateParams.ShippingDetails.Address address) {
5463
        this.address = address;
×
5464
        return this;
×
5465
      }
5466

5467
      /**
5468
       * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll`
5469
       * call, and subsequent calls add additional key/value pairs to the original map. See {@link
5470
       * InvoiceUpdateParams.ShippingDetails#extraParams} for the field documentation.
5471
       */
5472
      public Builder putExtraParam(String key, Object value) {
5473
        if (this.extraParams == null) {
×
5474
          this.extraParams = new HashMap<>();
×
5475
        }
5476
        this.extraParams.put(key, value);
×
5477
        return this;
×
5478
      }
5479

5480
      /**
5481
       * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
5482
       * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map.
5483
       * See {@link InvoiceUpdateParams.ShippingDetails#extraParams} for the field documentation.
5484
       */
5485
      public Builder putAllExtraParam(Map<String, Object> map) {
5486
        if (this.extraParams == null) {
×
5487
          this.extraParams = new HashMap<>();
×
5488
        }
5489
        this.extraParams.putAll(map);
×
5490
        return this;
×
5491
      }
5492

5493
      /** <strong>Required.</strong> Recipient name. */
5494
      public Builder setName(String name) {
5495
        this.name = name;
×
5496
        return this;
×
5497
      }
5498

5499
      /** <strong>Required.</strong> Recipient name. */
5500
      public Builder setName(EmptyParam name) {
5501
        this.name = name;
×
5502
        return this;
×
5503
      }
5504

5505
      /** Recipient phone (including extension). */
5506
      public Builder setPhone(String phone) {
5507
        this.phone = phone;
×
5508
        return this;
×
5509
      }
5510

5511
      /** Recipient phone (including extension). */
5512
      public Builder setPhone(EmptyParam phone) {
5513
        this.phone = phone;
×
5514
        return this;
×
5515
      }
5516
    }
5517

5518
    @Getter
5519
    public static class Address {
5520
      /** City, district, suburb, town, or village. */
5521
      @SerializedName("city")
5522
      Object city;
5523

5524
      /**
5525
       * Two-letter country code (<a href="https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2">ISO
5526
       * 3166-1 alpha-2</a>).
5527
       */
5528
      @SerializedName("country")
5529
      Object country;
5530

5531
      /**
5532
       * Map of extra parameters for custom features not available in this client library. The
5533
       * content in this map is not serialized under this field's {@code @SerializedName} value.
5534
       * Instead, each key/value pair is serialized as if the key is a root-level field (serialized)
5535
       * name in this param object. Effectively, this map is flattened to its parent instance.
5536
       */
5537
      @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
5538
      Map<String, Object> extraParams;
5539

5540
      /** Address line 1 (e.g., street, PO Box, or company name). */
5541
      @SerializedName("line1")
5542
      Object line1;
5543

5544
      /** Address line 2 (e.g., apartment, suite, unit, or building). */
5545
      @SerializedName("line2")
5546
      Object line2;
5547

5548
      /** ZIP or postal code. */
5549
      @SerializedName("postal_code")
5550
      Object postalCode;
5551

5552
      /** State, county, province, or region. */
5553
      @SerializedName("state")
5554
      Object state;
5555

5556
      private Address(
5557
          Object city,
5558
          Object country,
5559
          Map<String, Object> extraParams,
5560
          Object line1,
5561
          Object line2,
5562
          Object postalCode,
5563
          Object state) {
×
5564
        this.city = city;
×
5565
        this.country = country;
×
5566
        this.extraParams = extraParams;
×
5567
        this.line1 = line1;
×
5568
        this.line2 = line2;
×
5569
        this.postalCode = postalCode;
×
5570
        this.state = state;
×
5571
      }
×
5572

5573
      public static Builder builder() {
5574
        return new Builder();
×
5575
      }
5576

5577
      public static class Builder {
×
5578
        private Object city;
5579

5580
        private Object country;
5581

5582
        private Map<String, Object> extraParams;
5583

5584
        private Object line1;
5585

5586
        private Object line2;
5587

5588
        private Object postalCode;
5589

5590
        private Object state;
5591

5592
        /** Finalize and obtain parameter instance from this builder. */
5593
        public InvoiceUpdateParams.ShippingDetails.Address build() {
5594
          return new InvoiceUpdateParams.ShippingDetails.Address(
×
5595
              this.city,
5596
              this.country,
5597
              this.extraParams,
5598
              this.line1,
5599
              this.line2,
5600
              this.postalCode,
5601
              this.state);
5602
        }
5603

5604
        /** City, district, suburb, town, or village. */
5605
        public Builder setCity(String city) {
5606
          this.city = city;
×
5607
          return this;
×
5608
        }
5609

5610
        /** City, district, suburb, town, or village. */
5611
        public Builder setCity(EmptyParam city) {
5612
          this.city = city;
×
5613
          return this;
×
5614
        }
5615

5616
        /**
5617
         * Two-letter country code (<a href="https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2">ISO
5618
         * 3166-1 alpha-2</a>).
5619
         */
5620
        public Builder setCountry(String country) {
5621
          this.country = country;
×
5622
          return this;
×
5623
        }
5624

5625
        /**
5626
         * Two-letter country code (<a href="https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2">ISO
5627
         * 3166-1 alpha-2</a>).
5628
         */
5629
        public Builder setCountry(EmptyParam country) {
5630
          this.country = country;
×
5631
          return this;
×
5632
        }
5633

5634
        /**
5635
         * Add a key/value pair to `extraParams` map. A map is initialized for the first
5636
         * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
5637
         * map. See {@link InvoiceUpdateParams.ShippingDetails.Address#extraParams} for the field
5638
         * documentation.
5639
         */
5640
        public Builder putExtraParam(String key, Object value) {
5641
          if (this.extraParams == null) {
×
5642
            this.extraParams = new HashMap<>();
×
5643
          }
5644
          this.extraParams.put(key, value);
×
5645
          return this;
×
5646
        }
5647

5648
        /**
5649
         * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
5650
         * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
5651
         * map. See {@link InvoiceUpdateParams.ShippingDetails.Address#extraParams} for the field
5652
         * documentation.
5653
         */
5654
        public Builder putAllExtraParam(Map<String, Object> map) {
5655
          if (this.extraParams == null) {
×
5656
            this.extraParams = new HashMap<>();
×
5657
          }
5658
          this.extraParams.putAll(map);
×
5659
          return this;
×
5660
        }
5661

5662
        /** Address line 1 (e.g., street, PO Box, or company name). */
5663
        public Builder setLine1(String line1) {
5664
          this.line1 = line1;
×
5665
          return this;
×
5666
        }
5667

5668
        /** Address line 1 (e.g., street, PO Box, or company name). */
5669
        public Builder setLine1(EmptyParam line1) {
5670
          this.line1 = line1;
×
5671
          return this;
×
5672
        }
5673

5674
        /** Address line 2 (e.g., apartment, suite, unit, or building). */
5675
        public Builder setLine2(String line2) {
5676
          this.line2 = line2;
×
5677
          return this;
×
5678
        }
5679

5680
        /** Address line 2 (e.g., apartment, suite, unit, or building). */
5681
        public Builder setLine2(EmptyParam line2) {
5682
          this.line2 = line2;
×
5683
          return this;
×
5684
        }
5685

5686
        /** ZIP or postal code. */
5687
        public Builder setPostalCode(String postalCode) {
5688
          this.postalCode = postalCode;
×
5689
          return this;
×
5690
        }
5691

5692
        /** ZIP or postal code. */
5693
        public Builder setPostalCode(EmptyParam postalCode) {
5694
          this.postalCode = postalCode;
×
5695
          return this;
×
5696
        }
5697

5698
        /** State, county, province, or region. */
5699
        public Builder setState(String state) {
5700
          this.state = state;
×
5701
          return this;
×
5702
        }
5703

5704
        /** State, county, province, or region. */
5705
        public Builder setState(EmptyParam state) {
5706
          this.state = state;
×
5707
          return this;
×
5708
        }
5709
      }
5710
    }
5711
  }
5712

5713
  @Getter
5714
  public static class TransferData {
5715
    /**
5716
     * The amount that will be transferred automatically when the invoice is paid. If no amount is
5717
     * set, the full amount is transferred.
5718
     */
5719
    @SerializedName("amount")
5720
    Long amount;
5721

5722
    /** <strong>Required.</strong> ID of an existing, connected Stripe account. */
5723
    @SerializedName("destination")
5724
    Object destination;
5725

5726
    /**
5727
     * Map of extra parameters for custom features not available in this client library. The content
5728
     * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each
5729
     * key/value pair is serialized as if the key is a root-level field (serialized) name in this
5730
     * param object. Effectively, this map is flattened to its parent instance.
5731
     */
5732
    @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
5733
    Map<String, Object> extraParams;
5734

5735
    private TransferData(Long amount, Object destination, Map<String, Object> extraParams) {
×
5736
      this.amount = amount;
×
5737
      this.destination = destination;
×
5738
      this.extraParams = extraParams;
×
5739
    }
×
5740

5741
    public static Builder builder() {
5742
      return new Builder();
×
5743
    }
5744

5745
    public static class Builder {
×
5746
      private Long amount;
5747

5748
      private Object destination;
5749

5750
      private Map<String, Object> extraParams;
5751

5752
      /** Finalize and obtain parameter instance from this builder. */
5753
      public InvoiceUpdateParams.TransferData build() {
5754
        return new InvoiceUpdateParams.TransferData(
×
5755
            this.amount, this.destination, this.extraParams);
5756
      }
5757

5758
      /**
5759
       * The amount that will be transferred automatically when the invoice is paid. If no amount is
5760
       * set, the full amount is transferred.
5761
       */
5762
      public Builder setAmount(Long amount) {
5763
        this.amount = amount;
×
5764
        return this;
×
5765
      }
5766

5767
      /** <strong>Required.</strong> ID of an existing, connected Stripe account. */
5768
      public Builder setDestination(String destination) {
5769
        this.destination = destination;
×
5770
        return this;
×
5771
      }
5772

5773
      /** <strong>Required.</strong> ID of an existing, connected Stripe account. */
5774
      public Builder setDestination(EmptyParam destination) {
5775
        this.destination = destination;
×
5776
        return this;
×
5777
      }
5778

5779
      /**
5780
       * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll`
5781
       * call, and subsequent calls add additional key/value pairs to the original map. See {@link
5782
       * InvoiceUpdateParams.TransferData#extraParams} for the field documentation.
5783
       */
5784
      public Builder putExtraParam(String key, Object value) {
5785
        if (this.extraParams == null) {
×
5786
          this.extraParams = new HashMap<>();
×
5787
        }
5788
        this.extraParams.put(key, value);
×
5789
        return this;
×
5790
      }
5791

5792
      /**
5793
       * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
5794
       * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map.
5795
       * See {@link InvoiceUpdateParams.TransferData#extraParams} for the field documentation.
5796
       */
5797
      public Builder putAllExtraParam(Map<String, Object> map) {
5798
        if (this.extraParams == null) {
×
5799
          this.extraParams = new HashMap<>();
×
5800
        }
5801
        this.extraParams.putAll(map);
×
5802
        return this;
×
5803
      }
5804
    }
5805
  }
5806

5807
  public enum CollectionMethod implements ApiRequestParams.EnumParam {
×
5808
    @SerializedName("charge_automatically")
×
5809
    CHARGE_AUTOMATICALLY("charge_automatically"),
5810

5811
    @SerializedName("send_invoice")
×
5812
    SEND_INVOICE("send_invoice");
5813

5814
    @Getter(onMethod_ = {@Override})
5815
    private final String value;
5816

5817
    CollectionMethod(String value) {
×
5818
      this.value = value;
×
5819
    }
×
5820
  }
5821
}
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

© 2026 Coveralls, Inc