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

stripe / stripe-java / #16727

09 Jan 2025 09:36PM UTC coverage: 12.34% (-0.04%) from 12.384%
#16727

push

github

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

* Update generated code for v1407

* Update generated code for v1408

* Update generated code for v1409

* Update generated code for v1410

* Update generated code for v1411

* Update generated code for v1413

* Update generated code for v1414

* Update generated code for v1415

* Update generated code for v1416

* Update generated code (#1931)

* Update generated code for v1399

* Update generated code for v1402

* Update generated code for v1409

* Update generated code for v1412

---------

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

* Bump version to 28.2.0

* Added pull request template (#1933)

* Update generated code for v1423

* Update generated code for v1429

* Update generated code for v1430

* Update generated code for v1431

* Update generated code for v1432

* Update generated code for v1433

* Update generated code for v1435

* Update generated code for v1436

---------

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

30 of 1359 new or added lines in 26 files covered. (2.21%)

45 existing lines in 12 files now uncovered.

18906 of 153209 relevant lines covered (12.34%)

0.12 hits per line

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

2.29
/src/main/java/com/stripe/param/PaymentLinkUpdateParams.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 PaymentLinkUpdateParams extends ApiRequestParams {
15
  /**
16
   * Whether the payment link's {@code url} is active. If {@code false}, customers visiting the URL
17
   * will be shown a page saying that the link has been deactivated.
18
   */
19
  @SerializedName("active")
20
  Boolean active;
21

22
  /** Behavior after the purchase is complete. */
23
  @SerializedName("after_completion")
24
  AfterCompletion afterCompletion;
25

26
  /** Enables user redeemable promotion codes. */
27
  @SerializedName("allow_promotion_codes")
28
  Boolean allowPromotionCodes;
29

30
  /** Configuration for automatic tax collection. */
31
  @SerializedName("automatic_tax")
32
  AutomaticTax automaticTax;
33

34
  /** Configuration for collecting the customer's billing address. Defaults to {@code auto}. */
35
  @SerializedName("billing_address_collection")
36
  BillingAddressCollection billingAddressCollection;
37

38
  /**
39
   * Collect additional information from your customer using custom fields. Up to 3 fields are
40
   * supported.
41
   */
42
  @SerializedName("custom_fields")
43
  Object customFields;
44

45
  /** Display additional text for your customers using custom text. */
46
  @SerializedName("custom_text")
47
  CustomText customText;
48

49
  /**
50
   * Configures whether <a href="https://stripe.com/docs/api/checkout/sessions">checkout
51
   * sessions</a> created by this payment link create a <a
52
   * href="https://stripe.com/docs/api/customers">Customer</a>.
53
   */
54
  @SerializedName("customer_creation")
55
  CustomerCreation customerCreation;
56

57
  /** Specifies which fields in the response should be expanded. */
58
  @SerializedName("expand")
59
  List<String> expand;
60

61
  /**
62
   * Map of extra parameters for custom features not available in this client library. The content
63
   * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each
64
   * key/value pair is serialized as if the key is a root-level field (serialized) name in this
65
   * param object. Effectively, this map is flattened to its parent instance.
66
   */
67
  @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
68
  Map<String, Object> extraParams;
69

70
  /** The custom message to be displayed to a customer when a payment link is no longer active. */
71
  @SerializedName("inactive_message")
72
  Object inactiveMessage;
73

74
  /** Generate a post-purchase Invoice for one-time payments. */
75
  @SerializedName("invoice_creation")
76
  InvoiceCreation invoiceCreation;
77

78
  /**
79
   * The line items representing what is being sold. Each line item represents an item being sold.
80
   * Up to 20 line items are supported.
81
   */
82
  @SerializedName("line_items")
83
  List<PaymentLinkUpdateParams.LineItem> lineItems;
84

85
  /**
86
   * Set of <a href="https://stripe.com/docs/api/metadata">key-value pairs</a> that you can attach
87
   * to an object. This can be useful for storing additional information about the object in a
88
   * structured format. Individual keys can be unset by posting an empty value to them. All keys can
89
   * be unset by posting an empty value to {@code metadata}. Metadata associated with this Payment
90
   * Link will automatically be copied to <a
91
   * href="https://stripe.com/docs/api/checkout/sessions">checkout sessions</a> created by this
92
   * payment link.
93
   */
94
  @SerializedName("metadata")
95
  Map<String, String> metadata;
96

97
  /**
98
   * A subset of parameters to be passed to PaymentIntent creation for Checkout Sessions in {@code
99
   * payment} mode.
100
   */
101
  @SerializedName("payment_intent_data")
102
  PaymentIntentData paymentIntentData;
103

104
  /**
105
   * Specify whether Checkout should collect a payment method. When set to {@code if_required},
106
   * Checkout will not collect a payment method when the total due for the session is 0.This may
107
   * occur if the Checkout Session includes a free trial or a discount.
108
   *
109
   * <p>Can only be set in {@code subscription} mode. Defaults to {@code always}.
110
   *
111
   * <p>If you'd like information on how to collect a payment method outside of Checkout, read the
112
   * guide on <a href="https://stripe.com/docs/payments/checkout/free-trials">configuring
113
   * subscriptions with a free trial</a>.
114
   */
115
  @SerializedName("payment_method_collection")
116
  PaymentMethodCollection paymentMethodCollection;
117

118
  /**
119
   * The list of payment method types that customers can use. Pass an empty string to enable dynamic
120
   * payment methods that use your <a
121
   * href="https://dashboard.stripe.com/settings/payment_methods">payment method settings</a>.
122
   */
123
  @SerializedName("payment_method_types")
124
  Object paymentMethodTypes;
125

126
  /**
127
   * Controls phone number collection settings during checkout.
128
   *
129
   * <p>We recommend that you review your privacy policy and check with your legal contacts.
130
   */
131
  @SerializedName("phone_number_collection")
132
  PhoneNumberCollection phoneNumberCollection;
133

134
  /** Settings that restrict the usage of a payment link. */
135
  @SerializedName("restrictions")
136
  Object restrictions;
137

138
  /** Configuration for collecting the customer's shipping address. */
139
  @SerializedName("shipping_address_collection")
140
  Object shippingAddressCollection;
141

142
  /**
143
   * Describes the type of transaction being performed in order to customize relevant text on the
144
   * page, such as the submit button. Changing this value will also affect the hostname in the <a
145
   * href="https://stripe.com/docs/api/payment_links/payment_links/object#url">url</a> property
146
   * (example: {@code donate.stripe.com}).
147
   */
148
  @SerializedName("submit_type")
149
  SubmitType submitType;
150

151
  /**
152
   * When creating a subscription, the specified configuration data will be used. There must be at
153
   * least one line item with a recurring price to use {@code subscription_data}.
154
   */
155
  @SerializedName("subscription_data")
156
  SubscriptionData subscriptionData;
157

158
  /** Controls tax ID collection during checkout. */
159
  @SerializedName("tax_id_collection")
160
  TaxIdCollection taxIdCollection;
161

162
  private PaymentLinkUpdateParams(
163
      Boolean active,
164
      AfterCompletion afterCompletion,
165
      Boolean allowPromotionCodes,
166
      AutomaticTax automaticTax,
167
      BillingAddressCollection billingAddressCollection,
168
      Object customFields,
169
      CustomText customText,
170
      CustomerCreation customerCreation,
171
      List<String> expand,
172
      Map<String, Object> extraParams,
173
      Object inactiveMessage,
174
      InvoiceCreation invoiceCreation,
175
      List<PaymentLinkUpdateParams.LineItem> lineItems,
176
      Map<String, String> metadata,
177
      PaymentIntentData paymentIntentData,
178
      PaymentMethodCollection paymentMethodCollection,
179
      Object paymentMethodTypes,
180
      PhoneNumberCollection phoneNumberCollection,
181
      Object restrictions,
182
      Object shippingAddressCollection,
183
      SubmitType submitType,
184
      SubscriptionData subscriptionData,
185
      TaxIdCollection taxIdCollection) {
1✔
186
    this.active = active;
1✔
187
    this.afterCompletion = afterCompletion;
1✔
188
    this.allowPromotionCodes = allowPromotionCodes;
1✔
189
    this.automaticTax = automaticTax;
1✔
190
    this.billingAddressCollection = billingAddressCollection;
1✔
191
    this.customFields = customFields;
1✔
192
    this.customText = customText;
1✔
193
    this.customerCreation = customerCreation;
1✔
194
    this.expand = expand;
1✔
195
    this.extraParams = extraParams;
1✔
196
    this.inactiveMessage = inactiveMessage;
1✔
197
    this.invoiceCreation = invoiceCreation;
1✔
198
    this.lineItems = lineItems;
1✔
199
    this.metadata = metadata;
1✔
200
    this.paymentIntentData = paymentIntentData;
1✔
201
    this.paymentMethodCollection = paymentMethodCollection;
1✔
202
    this.paymentMethodTypes = paymentMethodTypes;
1✔
203
    this.phoneNumberCollection = phoneNumberCollection;
1✔
204
    this.restrictions = restrictions;
1✔
205
    this.shippingAddressCollection = shippingAddressCollection;
1✔
206
    this.submitType = submitType;
1✔
207
    this.subscriptionData = subscriptionData;
1✔
208
    this.taxIdCollection = taxIdCollection;
1✔
209
  }
1✔
210

211
  public static Builder builder() {
212
    return new Builder();
1✔
213
  }
214

215
  public static class Builder {
1✔
216
    private Boolean active;
217

218
    private AfterCompletion afterCompletion;
219

220
    private Boolean allowPromotionCodes;
221

222
    private AutomaticTax automaticTax;
223

224
    private BillingAddressCollection billingAddressCollection;
225

226
    private Object customFields;
227

228
    private CustomText customText;
229

230
    private CustomerCreation customerCreation;
231

232
    private List<String> expand;
233

234
    private Map<String, Object> extraParams;
235

236
    private Object inactiveMessage;
237

238
    private InvoiceCreation invoiceCreation;
239

240
    private List<PaymentLinkUpdateParams.LineItem> lineItems;
241

242
    private Map<String, String> metadata;
243

244
    private PaymentIntentData paymentIntentData;
245

246
    private PaymentMethodCollection paymentMethodCollection;
247

248
    private Object paymentMethodTypes;
249

250
    private PhoneNumberCollection phoneNumberCollection;
251

252
    private Object restrictions;
253

254
    private Object shippingAddressCollection;
255

256
    private SubmitType submitType;
257

258
    private SubscriptionData subscriptionData;
259

260
    private TaxIdCollection taxIdCollection;
261

262
    /** Finalize and obtain parameter instance from this builder. */
263
    public PaymentLinkUpdateParams build() {
264
      return new PaymentLinkUpdateParams(
1✔
265
          this.active,
266
          this.afterCompletion,
267
          this.allowPromotionCodes,
268
          this.automaticTax,
269
          this.billingAddressCollection,
270
          this.customFields,
271
          this.customText,
272
          this.customerCreation,
273
          this.expand,
274
          this.extraParams,
275
          this.inactiveMessage,
276
          this.invoiceCreation,
277
          this.lineItems,
278
          this.metadata,
279
          this.paymentIntentData,
280
          this.paymentMethodCollection,
281
          this.paymentMethodTypes,
282
          this.phoneNumberCollection,
283
          this.restrictions,
284
          this.shippingAddressCollection,
285
          this.submitType,
286
          this.subscriptionData,
287
          this.taxIdCollection);
288
    }
289

290
    /**
291
     * Whether the payment link's {@code url} is active. If {@code false}, customers visiting the
292
     * URL will be shown a page saying that the link has been deactivated.
293
     */
294
    public Builder setActive(Boolean active) {
295
      this.active = active;
1✔
296
      return this;
1✔
297
    }
298

299
    /** Behavior after the purchase is complete. */
300
    public Builder setAfterCompletion(PaymentLinkUpdateParams.AfterCompletion afterCompletion) {
301
      this.afterCompletion = afterCompletion;
×
302
      return this;
×
303
    }
304

305
    /** Enables user redeemable promotion codes. */
306
    public Builder setAllowPromotionCodes(Boolean allowPromotionCodes) {
307
      this.allowPromotionCodes = allowPromotionCodes;
×
308
      return this;
×
309
    }
310

311
    /** Configuration for automatic tax collection. */
312
    public Builder setAutomaticTax(PaymentLinkUpdateParams.AutomaticTax automaticTax) {
313
      this.automaticTax = automaticTax;
×
314
      return this;
×
315
    }
316

317
    /** Configuration for collecting the customer's billing address. Defaults to {@code auto}. */
318
    public Builder setBillingAddressCollection(
319
        PaymentLinkUpdateParams.BillingAddressCollection billingAddressCollection) {
320
      this.billingAddressCollection = billingAddressCollection;
×
321
      return this;
×
322
    }
323

324
    /**
325
     * Add an element to `customFields` list. A list is initialized for the first `add/addAll` call,
326
     * and subsequent calls adds additional elements to the original list. See {@link
327
     * PaymentLinkUpdateParams#customFields} for the field documentation.
328
     */
329
    @SuppressWarnings("unchecked")
330
    public Builder addCustomField(PaymentLinkUpdateParams.CustomField element) {
331
      if (this.customFields == null || this.customFields instanceof EmptyParam) {
×
332
        this.customFields = new ArrayList<PaymentLinkUpdateParams.CustomField>();
×
333
      }
334
      ((List<PaymentLinkUpdateParams.CustomField>) this.customFields).add(element);
×
335
      return this;
×
336
    }
337

338
    /**
339
     * Add all elements to `customFields` list. A list is initialized for the first `add/addAll`
340
     * call, and subsequent calls adds additional elements to the original list. See {@link
341
     * PaymentLinkUpdateParams#customFields} for the field documentation.
342
     */
343
    @SuppressWarnings("unchecked")
344
    public Builder addAllCustomField(List<PaymentLinkUpdateParams.CustomField> elements) {
345
      if (this.customFields == null || this.customFields instanceof EmptyParam) {
×
346
        this.customFields = new ArrayList<PaymentLinkUpdateParams.CustomField>();
×
347
      }
348
      ((List<PaymentLinkUpdateParams.CustomField>) this.customFields).addAll(elements);
×
349
      return this;
×
350
    }
351

352
    /**
353
     * Collect additional information from your customer using custom fields. Up to 3 fields are
354
     * supported.
355
     */
356
    public Builder setCustomFields(EmptyParam customFields) {
357
      this.customFields = customFields;
×
358
      return this;
×
359
    }
360

361
    /**
362
     * Collect additional information from your customer using custom fields. Up to 3 fields are
363
     * supported.
364
     */
365
    public Builder setCustomFields(List<PaymentLinkUpdateParams.CustomField> customFields) {
366
      this.customFields = customFields;
×
367
      return this;
×
368
    }
369

370
    /** Display additional text for your customers using custom text. */
371
    public Builder setCustomText(PaymentLinkUpdateParams.CustomText customText) {
372
      this.customText = customText;
×
373
      return this;
×
374
    }
375

376
    /**
377
     * Configures whether <a href="https://stripe.com/docs/api/checkout/sessions">checkout
378
     * sessions</a> created by this payment link create a <a
379
     * href="https://stripe.com/docs/api/customers">Customer</a>.
380
     */
381
    public Builder setCustomerCreation(PaymentLinkUpdateParams.CustomerCreation customerCreation) {
382
      this.customerCreation = customerCreation;
×
383
      return this;
×
384
    }
385

386
    /**
387
     * Add an element to `expand` list. A list is initialized for the first `add/addAll` call, and
388
     * subsequent calls adds additional elements to the original list. See {@link
389
     * PaymentLinkUpdateParams#expand} for the field documentation.
390
     */
391
    public Builder addExpand(String element) {
392
      if (this.expand == null) {
×
393
        this.expand = new ArrayList<>();
×
394
      }
395
      this.expand.add(element);
×
396
      return this;
×
397
    }
398

399
    /**
400
     * Add all elements to `expand` list. A list is initialized for the first `add/addAll` call, and
401
     * subsequent calls adds additional elements to the original list. See {@link
402
     * PaymentLinkUpdateParams#expand} for the field documentation.
403
     */
404
    public Builder addAllExpand(List<String> elements) {
405
      if (this.expand == null) {
×
406
        this.expand = new ArrayList<>();
×
407
      }
408
      this.expand.addAll(elements);
×
409
      return this;
×
410
    }
411

412
    /**
413
     * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll`
414
     * call, and subsequent calls add additional key/value pairs to the original map. See {@link
415
     * PaymentLinkUpdateParams#extraParams} for the field documentation.
416
     */
417
    public Builder putExtraParam(String key, Object value) {
418
      if (this.extraParams == null) {
×
419
        this.extraParams = new HashMap<>();
×
420
      }
421
      this.extraParams.put(key, value);
×
422
      return this;
×
423
    }
424

425
    /**
426
     * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
427
     * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map.
428
     * See {@link PaymentLinkUpdateParams#extraParams} for the field documentation.
429
     */
430
    public Builder putAllExtraParam(Map<String, Object> map) {
431
      if (this.extraParams == null) {
×
432
        this.extraParams = new HashMap<>();
×
433
      }
434
      this.extraParams.putAll(map);
×
435
      return this;
×
436
    }
437

438
    /** The custom message to be displayed to a customer when a payment link is no longer active. */
439
    public Builder setInactiveMessage(String inactiveMessage) {
440
      this.inactiveMessage = inactiveMessage;
×
441
      return this;
×
442
    }
443

444
    /** The custom message to be displayed to a customer when a payment link is no longer active. */
445
    public Builder setInactiveMessage(EmptyParam inactiveMessage) {
446
      this.inactiveMessage = inactiveMessage;
×
447
      return this;
×
448
    }
449

450
    /** Generate a post-purchase Invoice for one-time payments. */
451
    public Builder setInvoiceCreation(PaymentLinkUpdateParams.InvoiceCreation invoiceCreation) {
452
      this.invoiceCreation = invoiceCreation;
×
453
      return this;
×
454
    }
455

456
    /**
457
     * Add an element to `lineItems` list. A list is initialized for the first `add/addAll` call,
458
     * and subsequent calls adds additional elements to the original list. See {@link
459
     * PaymentLinkUpdateParams#lineItems} for the field documentation.
460
     */
461
    public Builder addLineItem(PaymentLinkUpdateParams.LineItem element) {
462
      if (this.lineItems == null) {
×
463
        this.lineItems = new ArrayList<>();
×
464
      }
465
      this.lineItems.add(element);
×
466
      return this;
×
467
    }
468

469
    /**
470
     * Add all elements to `lineItems` list. A list is initialized for the first `add/addAll` call,
471
     * and subsequent calls adds additional elements to the original list. See {@link
472
     * PaymentLinkUpdateParams#lineItems} for the field documentation.
473
     */
474
    public Builder addAllLineItem(List<PaymentLinkUpdateParams.LineItem> elements) {
475
      if (this.lineItems == null) {
×
476
        this.lineItems = new ArrayList<>();
×
477
      }
478
      this.lineItems.addAll(elements);
×
479
      return this;
×
480
    }
481

482
    /**
483
     * Add a key/value pair to `metadata` map. A map is initialized for the first `put/putAll` call,
484
     * and subsequent calls add additional key/value pairs to the original map. See {@link
485
     * PaymentLinkUpdateParams#metadata} for the field documentation.
486
     */
487
    public Builder putMetadata(String key, String value) {
488
      if (this.metadata == null) {
×
489
        this.metadata = new HashMap<>();
×
490
      }
491
      this.metadata.put(key, value);
×
492
      return this;
×
493
    }
494

495
    /**
496
     * Add all map key/value pairs to `metadata` map. A map is initialized for the first
497
     * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map.
498
     * See {@link PaymentLinkUpdateParams#metadata} for the field documentation.
499
     */
500
    public Builder putAllMetadata(Map<String, String> map) {
501
      if (this.metadata == null) {
×
502
        this.metadata = new HashMap<>();
×
503
      }
504
      this.metadata.putAll(map);
×
505
      return this;
×
506
    }
507

508
    /**
509
     * A subset of parameters to be passed to PaymentIntent creation for Checkout Sessions in {@code
510
     * payment} mode.
511
     */
512
    public Builder setPaymentIntentData(
513
        PaymentLinkUpdateParams.PaymentIntentData paymentIntentData) {
514
      this.paymentIntentData = paymentIntentData;
×
515
      return this;
×
516
    }
517

518
    /**
519
     * Specify whether Checkout should collect a payment method. When set to {@code if_required},
520
     * Checkout will not collect a payment method when the total due for the session is 0.This may
521
     * occur if the Checkout Session includes a free trial or a discount.
522
     *
523
     * <p>Can only be set in {@code subscription} mode. Defaults to {@code always}.
524
     *
525
     * <p>If you'd like information on how to collect a payment method outside of Checkout, read the
526
     * guide on <a href="https://stripe.com/docs/payments/checkout/free-trials">configuring
527
     * subscriptions with a free trial</a>.
528
     */
529
    public Builder setPaymentMethodCollection(
530
        PaymentLinkUpdateParams.PaymentMethodCollection paymentMethodCollection) {
531
      this.paymentMethodCollection = paymentMethodCollection;
×
532
      return this;
×
533
    }
534

535
    /**
536
     * Add an element to `paymentMethodTypes` list. A list is initialized for the first `add/addAll`
537
     * call, and subsequent calls adds additional elements to the original list. See {@link
538
     * PaymentLinkUpdateParams#paymentMethodTypes} for the field documentation.
539
     */
540
    @SuppressWarnings("unchecked")
541
    public Builder addPaymentMethodType(PaymentLinkUpdateParams.PaymentMethodType element) {
542
      if (this.paymentMethodTypes == null || this.paymentMethodTypes instanceof EmptyParam) {
×
543
        this.paymentMethodTypes = new ArrayList<PaymentLinkUpdateParams.PaymentMethodType>();
×
544
      }
545
      ((List<PaymentLinkUpdateParams.PaymentMethodType>) this.paymentMethodTypes).add(element);
×
546
      return this;
×
547
    }
548

549
    /**
550
     * Add all elements to `paymentMethodTypes` list. A list is initialized for the first
551
     * `add/addAll` call, and subsequent calls adds additional elements to the original list. See
552
     * {@link PaymentLinkUpdateParams#paymentMethodTypes} for the field documentation.
553
     */
554
    @SuppressWarnings("unchecked")
555
    public Builder addAllPaymentMethodType(
556
        List<PaymentLinkUpdateParams.PaymentMethodType> elements) {
557
      if (this.paymentMethodTypes == null || this.paymentMethodTypes instanceof EmptyParam) {
×
558
        this.paymentMethodTypes = new ArrayList<PaymentLinkUpdateParams.PaymentMethodType>();
×
559
      }
560
      ((List<PaymentLinkUpdateParams.PaymentMethodType>) this.paymentMethodTypes).addAll(elements);
×
561
      return this;
×
562
    }
563

564
    /**
565
     * The list of payment method types that customers can use. Pass an empty string to enable
566
     * dynamic payment methods that use your <a
567
     * href="https://dashboard.stripe.com/settings/payment_methods">payment method settings</a>.
568
     */
569
    public Builder setPaymentMethodTypes(EmptyParam paymentMethodTypes) {
570
      this.paymentMethodTypes = paymentMethodTypes;
×
571
      return this;
×
572
    }
573

574
    /**
575
     * The list of payment method types that customers can use. Pass an empty string to enable
576
     * dynamic payment methods that use your <a
577
     * href="https://dashboard.stripe.com/settings/payment_methods">payment method settings</a>.
578
     */
579
    public Builder setPaymentMethodTypes(
580
        List<PaymentLinkUpdateParams.PaymentMethodType> paymentMethodTypes) {
581
      this.paymentMethodTypes = paymentMethodTypes;
×
582
      return this;
×
583
    }
584

585
    /**
586
     * Controls phone number collection settings during checkout.
587
     *
588
     * <p>We recommend that you review your privacy policy and check with your legal contacts.
589
     */
590
    public Builder setPhoneNumberCollection(
591
        PaymentLinkUpdateParams.PhoneNumberCollection phoneNumberCollection) {
NEW
592
      this.phoneNumberCollection = phoneNumberCollection;
×
NEW
593
      return this;
×
594
    }
595

596
    /** Settings that restrict the usage of a payment link. */
597
    public Builder setRestrictions(PaymentLinkUpdateParams.Restrictions restrictions) {
598
      this.restrictions = restrictions;
×
599
      return this;
×
600
    }
601

602
    /** Settings that restrict the usage of a payment link. */
603
    public Builder setRestrictions(EmptyParam restrictions) {
604
      this.restrictions = restrictions;
×
605
      return this;
×
606
    }
607

608
    /** Configuration for collecting the customer's shipping address. */
609
    public Builder setShippingAddressCollection(
610
        PaymentLinkUpdateParams.ShippingAddressCollection shippingAddressCollection) {
611
      this.shippingAddressCollection = shippingAddressCollection;
×
612
      return this;
×
613
    }
614

615
    /** Configuration for collecting the customer's shipping address. */
616
    public Builder setShippingAddressCollection(EmptyParam shippingAddressCollection) {
617
      this.shippingAddressCollection = shippingAddressCollection;
×
618
      return this;
×
619
    }
620

621
    /**
622
     * Describes the type of transaction being performed in order to customize relevant text on the
623
     * page, such as the submit button. Changing this value will also affect the hostname in the <a
624
     * href="https://stripe.com/docs/api/payment_links/payment_links/object#url">url</a> property
625
     * (example: {@code donate.stripe.com}).
626
     */
627
    public Builder setSubmitType(PaymentLinkUpdateParams.SubmitType submitType) {
628
      this.submitType = submitType;
×
629
      return this;
×
630
    }
631

632
    /**
633
     * When creating a subscription, the specified configuration data will be used. There must be at
634
     * least one line item with a recurring price to use {@code subscription_data}.
635
     */
636
    public Builder setSubscriptionData(PaymentLinkUpdateParams.SubscriptionData subscriptionData) {
637
      this.subscriptionData = subscriptionData;
×
638
      return this;
×
639
    }
640

641
    /** Controls tax ID collection during checkout. */
642
    public Builder setTaxIdCollection(PaymentLinkUpdateParams.TaxIdCollection taxIdCollection) {
643
      this.taxIdCollection = taxIdCollection;
×
644
      return this;
×
645
    }
646
  }
647

648
  @Getter
649
  public static class AfterCompletion {
650
    /**
651
     * Map of extra parameters for custom features not available in this client library. The content
652
     * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each
653
     * key/value pair is serialized as if the key is a root-level field (serialized) name in this
654
     * param object. Effectively, this map is flattened to its parent instance.
655
     */
656
    @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
657
    Map<String, Object> extraParams;
658

659
    /** Configuration when {@code type=hosted_confirmation}. */
660
    @SerializedName("hosted_confirmation")
661
    HostedConfirmation hostedConfirmation;
662

663
    /** Configuration when {@code type=redirect}. */
664
    @SerializedName("redirect")
665
    Redirect redirect;
666

667
    /**
668
     * <strong>Required.</strong> The specified behavior after the purchase is complete. Either
669
     * {@code redirect} or {@code hosted_confirmation}.
670
     */
671
    @SerializedName("type")
672
    Type type;
673

674
    private AfterCompletion(
675
        Map<String, Object> extraParams,
676
        HostedConfirmation hostedConfirmation,
677
        Redirect redirect,
678
        Type type) {
×
679
      this.extraParams = extraParams;
×
680
      this.hostedConfirmation = hostedConfirmation;
×
681
      this.redirect = redirect;
×
682
      this.type = type;
×
683
    }
×
684

685
    public static Builder builder() {
686
      return new Builder();
×
687
    }
688

689
    public static class Builder {
×
690
      private Map<String, Object> extraParams;
691

692
      private HostedConfirmation hostedConfirmation;
693

694
      private Redirect redirect;
695

696
      private Type type;
697

698
      /** Finalize and obtain parameter instance from this builder. */
699
      public PaymentLinkUpdateParams.AfterCompletion build() {
700
        return new PaymentLinkUpdateParams.AfterCompletion(
×
701
            this.extraParams, this.hostedConfirmation, this.redirect, this.type);
702
      }
703

704
      /**
705
       * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll`
706
       * call, and subsequent calls add additional key/value pairs to the original map. See {@link
707
       * PaymentLinkUpdateParams.AfterCompletion#extraParams} for the field documentation.
708
       */
709
      public Builder putExtraParam(String key, Object value) {
710
        if (this.extraParams == null) {
×
711
          this.extraParams = new HashMap<>();
×
712
        }
713
        this.extraParams.put(key, value);
×
714
        return this;
×
715
      }
716

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

731
      /** Configuration when {@code type=hosted_confirmation}. */
732
      public Builder setHostedConfirmation(
733
          PaymentLinkUpdateParams.AfterCompletion.HostedConfirmation hostedConfirmation) {
734
        this.hostedConfirmation = hostedConfirmation;
×
735
        return this;
×
736
      }
737

738
      /** Configuration when {@code type=redirect}. */
739
      public Builder setRedirect(PaymentLinkUpdateParams.AfterCompletion.Redirect redirect) {
740
        this.redirect = redirect;
×
741
        return this;
×
742
      }
743

744
      /**
745
       * <strong>Required.</strong> The specified behavior after the purchase is complete. Either
746
       * {@code redirect} or {@code hosted_confirmation}.
747
       */
748
      public Builder setType(PaymentLinkUpdateParams.AfterCompletion.Type type) {
749
        this.type = type;
×
750
        return this;
×
751
      }
752
    }
753

754
    @Getter
755
    public static class HostedConfirmation {
756
      /** A custom message to display to the customer after the purchase is complete. */
757
      @SerializedName("custom_message")
758
      Object customMessage;
759

760
      /**
761
       * Map of extra parameters for custom features not available in this client library. The
762
       * content in this map is not serialized under this field's {@code @SerializedName} value.
763
       * Instead, each key/value pair is serialized as if the key is a root-level field (serialized)
764
       * name in this param object. Effectively, this map is flattened to its parent instance.
765
       */
766
      @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
767
      Map<String, Object> extraParams;
768

769
      private HostedConfirmation(Object customMessage, Map<String, Object> extraParams) {
×
770
        this.customMessage = customMessage;
×
771
        this.extraParams = extraParams;
×
772
      }
×
773

774
      public static Builder builder() {
775
        return new Builder();
×
776
      }
777

778
      public static class Builder {
×
779
        private Object customMessage;
780

781
        private Map<String, Object> extraParams;
782

783
        /** Finalize and obtain parameter instance from this builder. */
784
        public PaymentLinkUpdateParams.AfterCompletion.HostedConfirmation build() {
785
          return new PaymentLinkUpdateParams.AfterCompletion.HostedConfirmation(
×
786
              this.customMessage, this.extraParams);
787
        }
788

789
        /** A custom message to display to the customer after the purchase is complete. */
790
        public Builder setCustomMessage(String customMessage) {
791
          this.customMessage = customMessage;
×
792
          return this;
×
793
        }
794

795
        /** A custom message to display to the customer after the purchase is complete. */
796
        public Builder setCustomMessage(EmptyParam customMessage) {
797
          this.customMessage = customMessage;
×
798
          return this;
×
799
        }
800

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

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

831
    @Getter
832
    public static class Redirect {
833
      /**
834
       * Map of extra parameters for custom features not available in this client library. The
835
       * content in this map is not serialized under this field's {@code @SerializedName} value.
836
       * Instead, each key/value pair is serialized as if the key is a root-level field (serialized)
837
       * name in this param object. Effectively, this map is flattened to its parent instance.
838
       */
839
      @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
840
      Map<String, Object> extraParams;
841

842
      /**
843
       * <strong>Required.</strong> The URL the customer will be redirected to after the purchase is
844
       * complete. You can embed {@code {CHECKOUT_SESSION_ID}} into the URL to have the {@code id}
845
       * of the completed <a
846
       * href="https://stripe.com/docs/api/checkout/sessions/object#checkout_session_object-id">checkout
847
       * session</a> included.
848
       */
849
      @SerializedName("url")
850
      Object url;
851

852
      private Redirect(Map<String, Object> extraParams, Object url) {
×
853
        this.extraParams = extraParams;
×
854
        this.url = url;
×
855
      }
×
856

857
      public static Builder builder() {
858
        return new Builder();
×
859
      }
860

861
      public static class Builder {
×
862
        private Map<String, Object> extraParams;
863

864
        private Object url;
865

866
        /** Finalize and obtain parameter instance from this builder. */
867
        public PaymentLinkUpdateParams.AfterCompletion.Redirect build() {
868
          return new PaymentLinkUpdateParams.AfterCompletion.Redirect(this.extraParams, this.url);
×
869
        }
870

871
        /**
872
         * Add a key/value pair to `extraParams` map. A map is initialized for the first
873
         * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
874
         * map. See {@link PaymentLinkUpdateParams.AfterCompletion.Redirect#extraParams} for the
875
         * field documentation.
876
         */
877
        public Builder putExtraParam(String key, Object value) {
878
          if (this.extraParams == null) {
×
879
            this.extraParams = new HashMap<>();
×
880
          }
881
          this.extraParams.put(key, value);
×
882
          return this;
×
883
        }
884

885
        /**
886
         * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
887
         * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
888
         * map. See {@link PaymentLinkUpdateParams.AfterCompletion.Redirect#extraParams} for the
889
         * field documentation.
890
         */
891
        public Builder putAllExtraParam(Map<String, Object> map) {
892
          if (this.extraParams == null) {
×
893
            this.extraParams = new HashMap<>();
×
894
          }
895
          this.extraParams.putAll(map);
×
896
          return this;
×
897
        }
898

899
        /**
900
         * <strong>Required.</strong> The URL the customer will be redirected to after the purchase
901
         * is complete. You can embed {@code {CHECKOUT_SESSION_ID}} into the URL to have the {@code
902
         * id} of the completed <a
903
         * href="https://stripe.com/docs/api/checkout/sessions/object#checkout_session_object-id">checkout
904
         * session</a> included.
905
         */
906
        public Builder setUrl(String url) {
907
          this.url = url;
×
908
          return this;
×
909
        }
910

911
        /**
912
         * <strong>Required.</strong> The URL the customer will be redirected to after the purchase
913
         * is complete. You can embed {@code {CHECKOUT_SESSION_ID}} into the URL to have the {@code
914
         * id} of the completed <a
915
         * href="https://stripe.com/docs/api/checkout/sessions/object#checkout_session_object-id">checkout
916
         * session</a> included.
917
         */
918
        public Builder setUrl(EmptyParam url) {
919
          this.url = url;
×
920
          return this;
×
921
        }
922
      }
923
    }
924

925
    public enum Type implements ApiRequestParams.EnumParam {
×
926
      @SerializedName("hosted_confirmation")
×
927
      HOSTED_CONFIRMATION("hosted_confirmation"),
928

929
      @SerializedName("redirect")
×
930
      REDIRECT("redirect");
931

932
      @Getter(onMethod_ = {@Override})
933
      private final String value;
934

935
      Type(String value) {
×
936
        this.value = value;
×
937
      }
×
938
    }
939
  }
940

941
  @Getter
942
  public static class AutomaticTax {
943
    /**
944
     * <strong>Required.</strong> Set to {@code true} to <a
945
     * href="https://docs.stripe.com/tax">calculate tax automatically</a> using the customer's
946
     * location.
947
     *
948
     * <p>Enabling this parameter causes the payment link to collect any billing address information
949
     * necessary for tax calculation.
950
     */
951
    @SerializedName("enabled")
952
    Boolean enabled;
953

954
    /**
955
     * Map of extra parameters for custom features not available in this client library. The content
956
     * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each
957
     * key/value pair is serialized as if the key is a root-level field (serialized) name in this
958
     * param object. Effectively, this map is flattened to its parent instance.
959
     */
960
    @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
961
    Map<String, Object> extraParams;
962

963
    /**
964
     * The account that's liable for tax. If set, the business address and tax registrations
965
     * required to perform the tax calculation are loaded from this account. The tax transaction is
966
     * returned in the report of the connected account.
967
     */
968
    @SerializedName("liability")
969
    Liability liability;
970

971
    private AutomaticTax(Boolean enabled, Map<String, Object> extraParams, Liability liability) {
×
972
      this.enabled = enabled;
×
973
      this.extraParams = extraParams;
×
974
      this.liability = liability;
×
975
    }
×
976

977
    public static Builder builder() {
978
      return new Builder();
×
979
    }
980

981
    public static class Builder {
×
982
      private Boolean enabled;
983

984
      private Map<String, Object> extraParams;
985

986
      private Liability liability;
987

988
      /** Finalize and obtain parameter instance from this builder. */
989
      public PaymentLinkUpdateParams.AutomaticTax build() {
990
        return new PaymentLinkUpdateParams.AutomaticTax(
×
991
            this.enabled, this.extraParams, this.liability);
992
      }
993

994
      /**
995
       * <strong>Required.</strong> Set to {@code true} to <a
996
       * href="https://docs.stripe.com/tax">calculate tax automatically</a> using the customer's
997
       * location.
998
       *
999
       * <p>Enabling this parameter causes the payment link to collect any billing address
1000
       * information necessary for tax calculation.
1001
       */
1002
      public Builder setEnabled(Boolean enabled) {
1003
        this.enabled = enabled;
×
1004
        return this;
×
1005
      }
1006

1007
      /**
1008
       * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll`
1009
       * call, and subsequent calls add additional key/value pairs to the original map. See {@link
1010
       * PaymentLinkUpdateParams.AutomaticTax#extraParams} for the field documentation.
1011
       */
1012
      public Builder putExtraParam(String key, Object value) {
1013
        if (this.extraParams == null) {
×
1014
          this.extraParams = new HashMap<>();
×
1015
        }
1016
        this.extraParams.put(key, value);
×
1017
        return this;
×
1018
      }
1019

1020
      /**
1021
       * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
1022
       * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map.
1023
       * See {@link PaymentLinkUpdateParams.AutomaticTax#extraParams} for the field documentation.
1024
       */
1025
      public Builder putAllExtraParam(Map<String, Object> map) {
1026
        if (this.extraParams == null) {
×
1027
          this.extraParams = new HashMap<>();
×
1028
        }
1029
        this.extraParams.putAll(map);
×
1030
        return this;
×
1031
      }
1032

1033
      /**
1034
       * The account that's liable for tax. If set, the business address and tax registrations
1035
       * required to perform the tax calculation are loaded from this account. The tax transaction
1036
       * is returned in the report of the connected account.
1037
       */
1038
      public Builder setLiability(PaymentLinkUpdateParams.AutomaticTax.Liability liability) {
1039
        this.liability = liability;
×
1040
        return this;
×
1041
      }
1042
    }
1043

1044
    @Getter
1045
    public static class Liability {
1046
      /** The connected account being referenced when {@code type} is {@code account}. */
1047
      @SerializedName("account")
1048
      Object account;
1049

1050
      /**
1051
       * Map of extra parameters for custom features not available in this client library. The
1052
       * content in this map is not serialized under this field's {@code @SerializedName} value.
1053
       * Instead, each key/value pair is serialized as if the key is a root-level field (serialized)
1054
       * name in this param object. Effectively, this map is flattened to its parent instance.
1055
       */
1056
      @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
1057
      Map<String, Object> extraParams;
1058

1059
      /** <strong>Required.</strong> Type of the account referenced in the request. */
1060
      @SerializedName("type")
1061
      Type type;
1062

1063
      private Liability(Object account, Map<String, Object> extraParams, Type type) {
×
1064
        this.account = account;
×
1065
        this.extraParams = extraParams;
×
1066
        this.type = type;
×
1067
      }
×
1068

1069
      public static Builder builder() {
1070
        return new Builder();
×
1071
      }
1072

1073
      public static class Builder {
×
1074
        private Object account;
1075

1076
        private Map<String, Object> extraParams;
1077

1078
        private Type type;
1079

1080
        /** Finalize and obtain parameter instance from this builder. */
1081
        public PaymentLinkUpdateParams.AutomaticTax.Liability build() {
1082
          return new PaymentLinkUpdateParams.AutomaticTax.Liability(
×
1083
              this.account, this.extraParams, this.type);
1084
        }
1085

1086
        /** The connected account being referenced when {@code type} is {@code account}. */
1087
        public Builder setAccount(String account) {
1088
          this.account = account;
×
1089
          return this;
×
1090
        }
1091

1092
        /** The connected account being referenced when {@code type} is {@code account}. */
1093
        public Builder setAccount(EmptyParam account) {
1094
          this.account = account;
×
1095
          return this;
×
1096
        }
1097

1098
        /**
1099
         * Add a key/value pair to `extraParams` map. A map is initialized for the first
1100
         * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
1101
         * map. See {@link PaymentLinkUpdateParams.AutomaticTax.Liability#extraParams} for the field
1102
         * documentation.
1103
         */
1104
        public Builder putExtraParam(String key, Object value) {
1105
          if (this.extraParams == null) {
×
1106
            this.extraParams = new HashMap<>();
×
1107
          }
1108
          this.extraParams.put(key, value);
×
1109
          return this;
×
1110
        }
1111

1112
        /**
1113
         * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
1114
         * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
1115
         * map. See {@link PaymentLinkUpdateParams.AutomaticTax.Liability#extraParams} for the field
1116
         * documentation.
1117
         */
1118
        public Builder putAllExtraParam(Map<String, Object> map) {
1119
          if (this.extraParams == null) {
×
1120
            this.extraParams = new HashMap<>();
×
1121
          }
1122
          this.extraParams.putAll(map);
×
1123
          return this;
×
1124
        }
1125

1126
        /** <strong>Required.</strong> Type of the account referenced in the request. */
1127
        public Builder setType(PaymentLinkUpdateParams.AutomaticTax.Liability.Type type) {
1128
          this.type = type;
×
1129
          return this;
×
1130
        }
1131
      }
1132

1133
      public enum Type implements ApiRequestParams.EnumParam {
×
1134
        @SerializedName("account")
×
1135
        ACCOUNT("account"),
1136

1137
        @SerializedName("self")
×
1138
        SELF("self");
1139

1140
        @Getter(onMethod_ = {@Override})
1141
        private final String value;
1142

1143
        Type(String value) {
×
1144
          this.value = value;
×
1145
        }
×
1146
      }
1147
    }
1148
  }
1149

1150
  @Getter
1151
  public static class CustomField {
1152
    /** Configuration for {@code type=dropdown} fields. */
1153
    @SerializedName("dropdown")
1154
    Dropdown dropdown;
1155

1156
    /**
1157
     * Map of extra parameters for custom features not available in this client library. The content
1158
     * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each
1159
     * key/value pair is serialized as if the key is a root-level field (serialized) name in this
1160
     * param object. Effectively, this map is flattened to its parent instance.
1161
     */
1162
    @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
1163
    Map<String, Object> extraParams;
1164

1165
    /**
1166
     * <strong>Required.</strong> String of your choice that your integration can use to reconcile
1167
     * this field. Must be unique to this field, alphanumeric, and up to 200 characters.
1168
     */
1169
    @SerializedName("key")
1170
    Object key;
1171

1172
    /** <strong>Required.</strong> The label for the field, displayed to the customer. */
1173
    @SerializedName("label")
1174
    Label label;
1175

1176
    /** Configuration for {@code type=numeric} fields. */
1177
    @SerializedName("numeric")
1178
    Numeric numeric;
1179

1180
    /**
1181
     * Whether the customer is required to complete the field before completing the Checkout
1182
     * Session. Defaults to {@code false}.
1183
     */
1184
    @SerializedName("optional")
1185
    Boolean optional;
1186

1187
    /** Configuration for {@code type=text} fields. */
1188
    @SerializedName("text")
1189
    Text text;
1190

1191
    /** <strong>Required.</strong> The type of the field. */
1192
    @SerializedName("type")
1193
    Type type;
1194

1195
    private CustomField(
1196
        Dropdown dropdown,
1197
        Map<String, Object> extraParams,
1198
        Object key,
1199
        Label label,
1200
        Numeric numeric,
1201
        Boolean optional,
1202
        Text text,
1203
        Type type) {
×
1204
      this.dropdown = dropdown;
×
1205
      this.extraParams = extraParams;
×
1206
      this.key = key;
×
1207
      this.label = label;
×
1208
      this.numeric = numeric;
×
1209
      this.optional = optional;
×
1210
      this.text = text;
×
1211
      this.type = type;
×
1212
    }
×
1213

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

1218
    public static class Builder {
×
1219
      private Dropdown dropdown;
1220

1221
      private Map<String, Object> extraParams;
1222

1223
      private Object key;
1224

1225
      private Label label;
1226

1227
      private Numeric numeric;
1228

1229
      private Boolean optional;
1230

1231
      private Text text;
1232

1233
      private Type type;
1234

1235
      /** Finalize and obtain parameter instance from this builder. */
1236
      public PaymentLinkUpdateParams.CustomField build() {
1237
        return new PaymentLinkUpdateParams.CustomField(
×
1238
            this.dropdown,
1239
            this.extraParams,
1240
            this.key,
1241
            this.label,
1242
            this.numeric,
1243
            this.optional,
1244
            this.text,
1245
            this.type);
1246
      }
1247

1248
      /** Configuration for {@code type=dropdown} fields. */
1249
      public Builder setDropdown(PaymentLinkUpdateParams.CustomField.Dropdown dropdown) {
1250
        this.dropdown = dropdown;
×
1251
        return this;
×
1252
      }
1253

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

1267
      /**
1268
       * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
1269
       * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map.
1270
       * See {@link PaymentLinkUpdateParams.CustomField#extraParams} for the field documentation.
1271
       */
1272
      public Builder putAllExtraParam(Map<String, Object> map) {
1273
        if (this.extraParams == null) {
×
1274
          this.extraParams = new HashMap<>();
×
1275
        }
1276
        this.extraParams.putAll(map);
×
1277
        return this;
×
1278
      }
1279

1280
      /**
1281
       * <strong>Required.</strong> String of your choice that your integration can use to reconcile
1282
       * this field. Must be unique to this field, alphanumeric, and up to 200 characters.
1283
       */
1284
      public Builder setKey(String key) {
1285
        this.key = key;
×
1286
        return this;
×
1287
      }
1288

1289
      /**
1290
       * <strong>Required.</strong> String of your choice that your integration can use to reconcile
1291
       * this field. Must be unique to this field, alphanumeric, and up to 200 characters.
1292
       */
1293
      public Builder setKey(EmptyParam key) {
1294
        this.key = key;
×
1295
        return this;
×
1296
      }
1297

1298
      /** <strong>Required.</strong> The label for the field, displayed to the customer. */
1299
      public Builder setLabel(PaymentLinkUpdateParams.CustomField.Label label) {
1300
        this.label = label;
×
1301
        return this;
×
1302
      }
1303

1304
      /** Configuration for {@code type=numeric} fields. */
1305
      public Builder setNumeric(PaymentLinkUpdateParams.CustomField.Numeric numeric) {
1306
        this.numeric = numeric;
×
1307
        return this;
×
1308
      }
1309

1310
      /**
1311
       * Whether the customer is required to complete the field before completing the Checkout
1312
       * Session. Defaults to {@code false}.
1313
       */
1314
      public Builder setOptional(Boolean optional) {
1315
        this.optional = optional;
×
1316
        return this;
×
1317
      }
1318

1319
      /** Configuration for {@code type=text} fields. */
1320
      public Builder setText(PaymentLinkUpdateParams.CustomField.Text text) {
1321
        this.text = text;
×
1322
        return this;
×
1323
      }
1324

1325
      /** <strong>Required.</strong> The type of the field. */
1326
      public Builder setType(PaymentLinkUpdateParams.CustomField.Type type) {
1327
        this.type = type;
×
1328
        return this;
×
1329
      }
1330
    }
1331

1332
    @Getter
1333
    public static class Dropdown {
1334
      /**
1335
       * Map of extra parameters for custom features not available in this client library. The
1336
       * content in this map is not serialized under this field's {@code @SerializedName} value.
1337
       * Instead, each key/value pair is serialized as if the key is a root-level field (serialized)
1338
       * name in this param object. Effectively, this map is flattened to its parent instance.
1339
       */
1340
      @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
1341
      Map<String, Object> extraParams;
1342

1343
      /**
1344
       * <strong>Required.</strong> The options available for the customer to select. Up to 200
1345
       * options allowed.
1346
       */
1347
      @SerializedName("options")
1348
      List<PaymentLinkUpdateParams.CustomField.Dropdown.Option> options;
1349

1350
      private Dropdown(
1351
          Map<String, Object> extraParams,
1352
          List<PaymentLinkUpdateParams.CustomField.Dropdown.Option> options) {
×
1353
        this.extraParams = extraParams;
×
1354
        this.options = options;
×
1355
      }
×
1356

1357
      public static Builder builder() {
1358
        return new Builder();
×
1359
      }
1360

1361
      public static class Builder {
×
1362
        private Map<String, Object> extraParams;
1363

1364
        private List<PaymentLinkUpdateParams.CustomField.Dropdown.Option> options;
1365

1366
        /** Finalize and obtain parameter instance from this builder. */
1367
        public PaymentLinkUpdateParams.CustomField.Dropdown build() {
1368
          return new PaymentLinkUpdateParams.CustomField.Dropdown(this.extraParams, this.options);
×
1369
        }
1370

1371
        /**
1372
         * Add a key/value pair to `extraParams` map. A map is initialized for the first
1373
         * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
1374
         * map. See {@link PaymentLinkUpdateParams.CustomField.Dropdown#extraParams} for the field
1375
         * documentation.
1376
         */
1377
        public Builder putExtraParam(String key, Object value) {
1378
          if (this.extraParams == null) {
×
1379
            this.extraParams = new HashMap<>();
×
1380
          }
1381
          this.extraParams.put(key, value);
×
1382
          return this;
×
1383
        }
1384

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

1399
        /**
1400
         * Add an element to `options` list. A list is initialized for the first `add/addAll` call,
1401
         * and subsequent calls adds additional elements to the original list. See {@link
1402
         * PaymentLinkUpdateParams.CustomField.Dropdown#options} for the field documentation.
1403
         */
1404
        public Builder addOption(PaymentLinkUpdateParams.CustomField.Dropdown.Option element) {
1405
          if (this.options == null) {
×
1406
            this.options = new ArrayList<>();
×
1407
          }
1408
          this.options.add(element);
×
1409
          return this;
×
1410
        }
1411

1412
        /**
1413
         * Add all elements to `options` list. A list is initialized for the first `add/addAll`
1414
         * call, and subsequent calls adds additional elements to the original list. See {@link
1415
         * PaymentLinkUpdateParams.CustomField.Dropdown#options} for the field documentation.
1416
         */
1417
        public Builder addAllOption(
1418
            List<PaymentLinkUpdateParams.CustomField.Dropdown.Option> elements) {
1419
          if (this.options == null) {
×
1420
            this.options = new ArrayList<>();
×
1421
          }
1422
          this.options.addAll(elements);
×
1423
          return this;
×
1424
        }
1425
      }
1426

1427
      @Getter
1428
      public static class Option {
1429
        /**
1430
         * Map of extra parameters for custom features not available in this client library. The
1431
         * content in this map is not serialized under this field's {@code @SerializedName} value.
1432
         * Instead, each key/value pair is serialized as if the key is a root-level field
1433
         * (serialized) name in this param object. Effectively, this map is flattened to its parent
1434
         * instance.
1435
         */
1436
        @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
1437
        Map<String, Object> extraParams;
1438

1439
        /**
1440
         * <strong>Required.</strong> The label for the option, displayed to the customer. Up to 100
1441
         * characters.
1442
         */
1443
        @SerializedName("label")
1444
        Object label;
1445

1446
        /**
1447
         * <strong>Required.</strong> The value for this option, not displayed to the customer, used
1448
         * by your integration to reconcile the option selected by the customer. Must be unique to
1449
         * this option, alphanumeric, and up to 100 characters.
1450
         */
1451
        @SerializedName("value")
1452
        Object value;
1453

1454
        private Option(Map<String, Object> extraParams, Object label, Object value) {
×
1455
          this.extraParams = extraParams;
×
1456
          this.label = label;
×
1457
          this.value = value;
×
1458
        }
×
1459

1460
        public static Builder builder() {
1461
          return new Builder();
×
1462
        }
1463

1464
        public static class Builder {
×
1465
          private Map<String, Object> extraParams;
1466

1467
          private Object label;
1468

1469
          private Object value;
1470

1471
          /** Finalize and obtain parameter instance from this builder. */
1472
          public PaymentLinkUpdateParams.CustomField.Dropdown.Option build() {
1473
            return new PaymentLinkUpdateParams.CustomField.Dropdown.Option(
×
1474
                this.extraParams, this.label, this.value);
1475
          }
1476

1477
          /**
1478
           * Add a key/value pair to `extraParams` map. A map is initialized for the first
1479
           * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
1480
           * map. See {@link PaymentLinkUpdateParams.CustomField.Dropdown.Option#extraParams} for
1481
           * the field documentation.
1482
           */
1483
          public Builder putExtraParam(String key, Object value) {
1484
            if (this.extraParams == null) {
×
1485
              this.extraParams = new HashMap<>();
×
1486
            }
1487
            this.extraParams.put(key, value);
×
1488
            return this;
×
1489
          }
1490

1491
          /**
1492
           * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
1493
           * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
1494
           * map. See {@link PaymentLinkUpdateParams.CustomField.Dropdown.Option#extraParams} for
1495
           * the field documentation.
1496
           */
1497
          public Builder putAllExtraParam(Map<String, Object> map) {
1498
            if (this.extraParams == null) {
×
1499
              this.extraParams = new HashMap<>();
×
1500
            }
1501
            this.extraParams.putAll(map);
×
1502
            return this;
×
1503
          }
1504

1505
          /**
1506
           * <strong>Required.</strong> The label for the option, displayed to the customer. Up to
1507
           * 100 characters.
1508
           */
1509
          public Builder setLabel(String label) {
1510
            this.label = label;
×
1511
            return this;
×
1512
          }
1513

1514
          /**
1515
           * <strong>Required.</strong> The label for the option, displayed to the customer. Up to
1516
           * 100 characters.
1517
           */
1518
          public Builder setLabel(EmptyParam label) {
1519
            this.label = label;
×
1520
            return this;
×
1521
          }
1522

1523
          /**
1524
           * <strong>Required.</strong> The value for this option, not displayed to the customer,
1525
           * used by your integration to reconcile the option selected by the customer. Must be
1526
           * unique to this option, alphanumeric, and up to 100 characters.
1527
           */
1528
          public Builder setValue(String value) {
1529
            this.value = value;
×
1530
            return this;
×
1531
          }
1532

1533
          /**
1534
           * <strong>Required.</strong> The value for this option, not displayed to the customer,
1535
           * used by your integration to reconcile the option selected by the customer. Must be
1536
           * unique to this option, alphanumeric, and up to 100 characters.
1537
           */
1538
          public Builder setValue(EmptyParam value) {
1539
            this.value = value;
×
1540
            return this;
×
1541
          }
1542
        }
1543
      }
1544
    }
1545

1546
    @Getter
1547
    public static class Label {
1548
      /**
1549
       * <strong>Required.</strong> Custom text for the label, displayed to the customer. Up to 50
1550
       * characters.
1551
       */
1552
      @SerializedName("custom")
1553
      Object custom;
1554

1555
      /**
1556
       * Map of extra parameters for custom features not available in this client library. The
1557
       * content in this map is not serialized under this field's {@code @SerializedName} value.
1558
       * Instead, each key/value pair is serialized as if the key is a root-level field (serialized)
1559
       * name in this param object. Effectively, this map is flattened to its parent instance.
1560
       */
1561
      @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
1562
      Map<String, Object> extraParams;
1563

1564
      /** <strong>Required.</strong> The type of the label. */
1565
      @SerializedName("type")
1566
      Type type;
1567

1568
      private Label(Object custom, Map<String, Object> extraParams, Type type) {
×
1569
        this.custom = custom;
×
1570
        this.extraParams = extraParams;
×
1571
        this.type = type;
×
1572
      }
×
1573

1574
      public static Builder builder() {
1575
        return new Builder();
×
1576
      }
1577

1578
      public static class Builder {
×
1579
        private Object custom;
1580

1581
        private Map<String, Object> extraParams;
1582

1583
        private Type type;
1584

1585
        /** Finalize and obtain parameter instance from this builder. */
1586
        public PaymentLinkUpdateParams.CustomField.Label build() {
1587
          return new PaymentLinkUpdateParams.CustomField.Label(
×
1588
              this.custom, this.extraParams, this.type);
1589
        }
1590

1591
        /**
1592
         * <strong>Required.</strong> Custom text for the label, displayed to the customer. Up to 50
1593
         * characters.
1594
         */
1595
        public Builder setCustom(String custom) {
1596
          this.custom = custom;
×
1597
          return this;
×
1598
        }
1599

1600
        /**
1601
         * <strong>Required.</strong> Custom text for the label, displayed to the customer. Up to 50
1602
         * characters.
1603
         */
1604
        public Builder setCustom(EmptyParam custom) {
1605
          this.custom = custom;
×
1606
          return this;
×
1607
        }
1608

1609
        /**
1610
         * Add a key/value pair to `extraParams` map. A map is initialized for the first
1611
         * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
1612
         * map. See {@link PaymentLinkUpdateParams.CustomField.Label#extraParams} for the field
1613
         * documentation.
1614
         */
1615
        public Builder putExtraParam(String key, Object value) {
1616
          if (this.extraParams == null) {
×
1617
            this.extraParams = new HashMap<>();
×
1618
          }
1619
          this.extraParams.put(key, value);
×
1620
          return this;
×
1621
        }
1622

1623
        /**
1624
         * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
1625
         * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
1626
         * map. See {@link PaymentLinkUpdateParams.CustomField.Label#extraParams} for the field
1627
         * documentation.
1628
         */
1629
        public Builder putAllExtraParam(Map<String, Object> map) {
1630
          if (this.extraParams == null) {
×
1631
            this.extraParams = new HashMap<>();
×
1632
          }
1633
          this.extraParams.putAll(map);
×
1634
          return this;
×
1635
        }
1636

1637
        /** <strong>Required.</strong> The type of the label. */
1638
        public Builder setType(PaymentLinkUpdateParams.CustomField.Label.Type type) {
1639
          this.type = type;
×
1640
          return this;
×
1641
        }
1642
      }
1643

1644
      public enum Type implements ApiRequestParams.EnumParam {
×
1645
        @SerializedName("custom")
×
1646
        CUSTOM("custom");
1647

1648
        @Getter(onMethod_ = {@Override})
1649
        private final String value;
1650

1651
        Type(String value) {
×
1652
          this.value = value;
×
1653
        }
×
1654
      }
1655
    }
1656

1657
    @Getter
1658
    public static class Numeric {
1659
      /**
1660
       * Map of extra parameters for custom features not available in this client library. The
1661
       * content in this map is not serialized under this field's {@code @SerializedName} value.
1662
       * Instead, each key/value pair is serialized as if the key is a root-level field (serialized)
1663
       * name in this param object. Effectively, this map is flattened to its parent instance.
1664
       */
1665
      @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
1666
      Map<String, Object> extraParams;
1667

1668
      /** The maximum character length constraint for the customer's input. */
1669
      @SerializedName("maximum_length")
1670
      Long maximumLength;
1671

1672
      /** The minimum character length requirement for the customer's input. */
1673
      @SerializedName("minimum_length")
1674
      Long minimumLength;
1675

1676
      private Numeric(Map<String, Object> extraParams, Long maximumLength, Long minimumLength) {
×
1677
        this.extraParams = extraParams;
×
1678
        this.maximumLength = maximumLength;
×
1679
        this.minimumLength = minimumLength;
×
1680
      }
×
1681

1682
      public static Builder builder() {
1683
        return new Builder();
×
1684
      }
1685

1686
      public static class Builder {
×
1687
        private Map<String, Object> extraParams;
1688

1689
        private Long maximumLength;
1690

1691
        private Long minimumLength;
1692

1693
        /** Finalize and obtain parameter instance from this builder. */
1694
        public PaymentLinkUpdateParams.CustomField.Numeric build() {
1695
          return new PaymentLinkUpdateParams.CustomField.Numeric(
×
1696
              this.extraParams, this.maximumLength, this.minimumLength);
1697
        }
1698

1699
        /**
1700
         * Add a key/value pair to `extraParams` map. A map is initialized for the first
1701
         * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
1702
         * map. See {@link PaymentLinkUpdateParams.CustomField.Numeric#extraParams} for the field
1703
         * documentation.
1704
         */
1705
        public Builder putExtraParam(String key, Object value) {
1706
          if (this.extraParams == null) {
×
1707
            this.extraParams = new HashMap<>();
×
1708
          }
1709
          this.extraParams.put(key, value);
×
1710
          return this;
×
1711
        }
1712

1713
        /**
1714
         * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
1715
         * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
1716
         * map. See {@link PaymentLinkUpdateParams.CustomField.Numeric#extraParams} for the field
1717
         * documentation.
1718
         */
1719
        public Builder putAllExtraParam(Map<String, Object> map) {
1720
          if (this.extraParams == null) {
×
1721
            this.extraParams = new HashMap<>();
×
1722
          }
1723
          this.extraParams.putAll(map);
×
1724
          return this;
×
1725
        }
1726

1727
        /** The maximum character length constraint for the customer's input. */
1728
        public Builder setMaximumLength(Long maximumLength) {
1729
          this.maximumLength = maximumLength;
×
1730
          return this;
×
1731
        }
1732

1733
        /** The minimum character length requirement for the customer's input. */
1734
        public Builder setMinimumLength(Long minimumLength) {
1735
          this.minimumLength = minimumLength;
×
1736
          return this;
×
1737
        }
1738
      }
1739
    }
1740

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

1752
      /** The maximum character length constraint for the customer's input. */
1753
      @SerializedName("maximum_length")
1754
      Long maximumLength;
1755

1756
      /** The minimum character length requirement for the customer's input. */
1757
      @SerializedName("minimum_length")
1758
      Long minimumLength;
1759

1760
      private Text(Map<String, Object> extraParams, Long maximumLength, Long minimumLength) {
×
1761
        this.extraParams = extraParams;
×
1762
        this.maximumLength = maximumLength;
×
1763
        this.minimumLength = minimumLength;
×
1764
      }
×
1765

1766
      public static Builder builder() {
1767
        return new Builder();
×
1768
      }
1769

1770
      public static class Builder {
×
1771
        private Map<String, Object> extraParams;
1772

1773
        private Long maximumLength;
1774

1775
        private Long minimumLength;
1776

1777
        /** Finalize and obtain parameter instance from this builder. */
1778
        public PaymentLinkUpdateParams.CustomField.Text build() {
1779
          return new PaymentLinkUpdateParams.CustomField.Text(
×
1780
              this.extraParams, this.maximumLength, this.minimumLength);
1781
        }
1782

1783
        /**
1784
         * Add a key/value pair 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 PaymentLinkUpdateParams.CustomField.Text#extraParams} for the field
1787
         * documentation.
1788
         */
1789
        public Builder putExtraParam(String key, Object value) {
1790
          if (this.extraParams == null) {
×
1791
            this.extraParams = new HashMap<>();
×
1792
          }
1793
          this.extraParams.put(key, value);
×
1794
          return this;
×
1795
        }
1796

1797
        /**
1798
         * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
1799
         * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
1800
         * map. See {@link PaymentLinkUpdateParams.CustomField.Text#extraParams} for the field
1801
         * documentation.
1802
         */
1803
        public Builder putAllExtraParam(Map<String, Object> map) {
1804
          if (this.extraParams == null) {
×
1805
            this.extraParams = new HashMap<>();
×
1806
          }
1807
          this.extraParams.putAll(map);
×
1808
          return this;
×
1809
        }
1810

1811
        /** The maximum character length constraint for the customer's input. */
1812
        public Builder setMaximumLength(Long maximumLength) {
1813
          this.maximumLength = maximumLength;
×
1814
          return this;
×
1815
        }
1816

1817
        /** The minimum character length requirement for the customer's input. */
1818
        public Builder setMinimumLength(Long minimumLength) {
1819
          this.minimumLength = minimumLength;
×
1820
          return this;
×
1821
        }
1822
      }
1823
    }
1824

1825
    public enum Type implements ApiRequestParams.EnumParam {
×
1826
      @SerializedName("dropdown")
×
1827
      DROPDOWN("dropdown"),
1828

1829
      @SerializedName("numeric")
×
1830
      NUMERIC("numeric"),
1831

1832
      @SerializedName("text")
×
1833
      TEXT("text");
1834

1835
      @Getter(onMethod_ = {@Override})
1836
      private final String value;
1837

1838
      Type(String value) {
×
1839
        this.value = value;
×
1840
      }
×
1841
    }
1842
  }
1843

1844
  @Getter
1845
  public static class CustomText {
1846
    /** Custom text that should be displayed after the payment confirmation button. */
1847
    @SerializedName("after_submit")
1848
    Object afterSubmit;
1849

1850
    /**
1851
     * Map of extra parameters for custom features not available in this client library. The content
1852
     * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each
1853
     * key/value pair is serialized as if the key is a root-level field (serialized) name in this
1854
     * param object. Effectively, this map is flattened to its parent instance.
1855
     */
1856
    @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
1857
    Map<String, Object> extraParams;
1858

1859
    /** Custom text that should be displayed alongside shipping address collection. */
1860
    @SerializedName("shipping_address")
1861
    Object shippingAddress;
1862

1863
    /** Custom text that should be displayed alongside the payment confirmation button. */
1864
    @SerializedName("submit")
1865
    Object submit;
1866

1867
    /**
1868
     * Custom text that should be displayed in place of the default terms of service agreement text.
1869
     */
1870
    @SerializedName("terms_of_service_acceptance")
1871
    Object termsOfServiceAcceptance;
1872

1873
    private CustomText(
1874
        Object afterSubmit,
1875
        Map<String, Object> extraParams,
1876
        Object shippingAddress,
1877
        Object submit,
1878
        Object termsOfServiceAcceptance) {
×
1879
      this.afterSubmit = afterSubmit;
×
1880
      this.extraParams = extraParams;
×
1881
      this.shippingAddress = shippingAddress;
×
1882
      this.submit = submit;
×
1883
      this.termsOfServiceAcceptance = termsOfServiceAcceptance;
×
1884
    }
×
1885

1886
    public static Builder builder() {
1887
      return new Builder();
×
1888
    }
1889

1890
    public static class Builder {
×
1891
      private Object afterSubmit;
1892

1893
      private Map<String, Object> extraParams;
1894

1895
      private Object shippingAddress;
1896

1897
      private Object submit;
1898

1899
      private Object termsOfServiceAcceptance;
1900

1901
      /** Finalize and obtain parameter instance from this builder. */
1902
      public PaymentLinkUpdateParams.CustomText build() {
1903
        return new PaymentLinkUpdateParams.CustomText(
×
1904
            this.afterSubmit,
1905
            this.extraParams,
1906
            this.shippingAddress,
1907
            this.submit,
1908
            this.termsOfServiceAcceptance);
1909
      }
1910

1911
      /** Custom text that should be displayed after the payment confirmation button. */
1912
      public Builder setAfterSubmit(PaymentLinkUpdateParams.CustomText.AfterSubmit afterSubmit) {
1913
        this.afterSubmit = afterSubmit;
×
1914
        return this;
×
1915
      }
1916

1917
      /** Custom text that should be displayed after the payment confirmation button. */
1918
      public Builder setAfterSubmit(EmptyParam afterSubmit) {
1919
        this.afterSubmit = afterSubmit;
×
1920
        return this;
×
1921
      }
1922

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

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

1949
      /** Custom text that should be displayed alongside shipping address collection. */
1950
      public Builder setShippingAddress(
1951
          PaymentLinkUpdateParams.CustomText.ShippingAddress shippingAddress) {
1952
        this.shippingAddress = shippingAddress;
×
1953
        return this;
×
1954
      }
1955

1956
      /** Custom text that should be displayed alongside shipping address collection. */
1957
      public Builder setShippingAddress(EmptyParam shippingAddress) {
1958
        this.shippingAddress = shippingAddress;
×
1959
        return this;
×
1960
      }
1961

1962
      /** Custom text that should be displayed alongside the payment confirmation button. */
1963
      public Builder setSubmit(PaymentLinkUpdateParams.CustomText.Submit submit) {
1964
        this.submit = submit;
×
1965
        return this;
×
1966
      }
1967

1968
      /** Custom text that should be displayed alongside the payment confirmation button. */
1969
      public Builder setSubmit(EmptyParam submit) {
1970
        this.submit = submit;
×
1971
        return this;
×
1972
      }
1973

1974
      /**
1975
       * Custom text that should be displayed in place of the default terms of service agreement
1976
       * text.
1977
       */
1978
      public Builder setTermsOfServiceAcceptance(
1979
          PaymentLinkUpdateParams.CustomText.TermsOfServiceAcceptance termsOfServiceAcceptance) {
1980
        this.termsOfServiceAcceptance = termsOfServiceAcceptance;
×
1981
        return this;
×
1982
      }
1983

1984
      /**
1985
       * Custom text that should be displayed in place of the default terms of service agreement
1986
       * text.
1987
       */
1988
      public Builder setTermsOfServiceAcceptance(EmptyParam termsOfServiceAcceptance) {
1989
        this.termsOfServiceAcceptance = termsOfServiceAcceptance;
×
1990
        return this;
×
1991
      }
1992
    }
1993

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

2005
      /** <strong>Required.</strong> Text may be up to 1200 characters in length. */
2006
      @SerializedName("message")
2007
      Object message;
2008

2009
      private AfterSubmit(Map<String, Object> extraParams, Object message) {
×
2010
        this.extraParams = extraParams;
×
2011
        this.message = message;
×
2012
      }
×
2013

2014
      public static Builder builder() {
2015
        return new Builder();
×
2016
      }
2017

2018
      public static class Builder {
×
2019
        private Map<String, Object> extraParams;
2020

2021
        private Object message;
2022

2023
        /** Finalize and obtain parameter instance from this builder. */
2024
        public PaymentLinkUpdateParams.CustomText.AfterSubmit build() {
2025
          return new PaymentLinkUpdateParams.CustomText.AfterSubmit(this.extraParams, this.message);
×
2026
        }
2027

2028
        /**
2029
         * Add a key/value pair to `extraParams` map. A map is initialized for the first
2030
         * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
2031
         * map. See {@link PaymentLinkUpdateParams.CustomText.AfterSubmit#extraParams} for the field
2032
         * documentation.
2033
         */
2034
        public Builder putExtraParam(String key, Object value) {
2035
          if (this.extraParams == null) {
×
2036
            this.extraParams = new HashMap<>();
×
2037
          }
2038
          this.extraParams.put(key, value);
×
2039
          return this;
×
2040
        }
2041

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

2056
        /** <strong>Required.</strong> Text may be up to 1200 characters in length. */
2057
        public Builder setMessage(String message) {
2058
          this.message = message;
×
2059
          return this;
×
2060
        }
2061

2062
        /** <strong>Required.</strong> Text may be up to 1200 characters in length. */
2063
        public Builder setMessage(EmptyParam message) {
2064
          this.message = message;
×
2065
          return this;
×
2066
        }
2067
      }
2068
    }
2069

2070
    @Getter
2071
    public static class ShippingAddress {
2072
      /**
2073
       * Map of extra parameters for custom features not available in this client library. The
2074
       * content in this map is not serialized under this field's {@code @SerializedName} value.
2075
       * Instead, each key/value pair is serialized as if the key is a root-level field (serialized)
2076
       * name in this param object. Effectively, this map is flattened to its parent instance.
2077
       */
2078
      @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
2079
      Map<String, Object> extraParams;
2080

2081
      /** <strong>Required.</strong> Text may be up to 1200 characters in length. */
2082
      @SerializedName("message")
2083
      Object message;
2084

2085
      private ShippingAddress(Map<String, Object> extraParams, Object message) {
×
2086
        this.extraParams = extraParams;
×
2087
        this.message = message;
×
2088
      }
×
2089

2090
      public static Builder builder() {
2091
        return new Builder();
×
2092
      }
2093

2094
      public static class Builder {
×
2095
        private Map<String, Object> extraParams;
2096

2097
        private Object message;
2098

2099
        /** Finalize and obtain parameter instance from this builder. */
2100
        public PaymentLinkUpdateParams.CustomText.ShippingAddress build() {
2101
          return new PaymentLinkUpdateParams.CustomText.ShippingAddress(
×
2102
              this.extraParams, this.message);
2103
        }
2104

2105
        /**
2106
         * Add a key/value pair to `extraParams` map. A map is initialized for the first
2107
         * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
2108
         * map. See {@link PaymentLinkUpdateParams.CustomText.ShippingAddress#extraParams} for the
2109
         * field documentation.
2110
         */
2111
        public Builder putExtraParam(String key, Object value) {
2112
          if (this.extraParams == null) {
×
2113
            this.extraParams = new HashMap<>();
×
2114
          }
2115
          this.extraParams.put(key, value);
×
2116
          return this;
×
2117
        }
2118

2119
        /**
2120
         * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
2121
         * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
2122
         * map. See {@link PaymentLinkUpdateParams.CustomText.ShippingAddress#extraParams} for the
2123
         * field documentation.
2124
         */
2125
        public Builder putAllExtraParam(Map<String, Object> map) {
2126
          if (this.extraParams == null) {
×
2127
            this.extraParams = new HashMap<>();
×
2128
          }
2129
          this.extraParams.putAll(map);
×
2130
          return this;
×
2131
        }
2132

2133
        /** <strong>Required.</strong> Text may be up to 1200 characters in length. */
2134
        public Builder setMessage(String message) {
2135
          this.message = message;
×
2136
          return this;
×
2137
        }
2138

2139
        /** <strong>Required.</strong> Text may be up to 1200 characters in length. */
2140
        public Builder setMessage(EmptyParam message) {
2141
          this.message = message;
×
2142
          return this;
×
2143
        }
2144
      }
2145
    }
2146

2147
    @Getter
2148
    public static class Submit {
2149
      /**
2150
       * Map of extra parameters for custom features not available in this client library. The
2151
       * content in this map is not serialized under this field's {@code @SerializedName} value.
2152
       * Instead, each key/value pair is serialized as if the key is a root-level field (serialized)
2153
       * name in this param object. Effectively, this map is flattened to its parent instance.
2154
       */
2155
      @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
2156
      Map<String, Object> extraParams;
2157

2158
      /** <strong>Required.</strong> Text may be up to 1200 characters in length. */
2159
      @SerializedName("message")
2160
      Object message;
2161

2162
      private Submit(Map<String, Object> extraParams, Object message) {
×
2163
        this.extraParams = extraParams;
×
2164
        this.message = message;
×
2165
      }
×
2166

2167
      public static Builder builder() {
2168
        return new Builder();
×
2169
      }
2170

2171
      public static class Builder {
×
2172
        private Map<String, Object> extraParams;
2173

2174
        private Object message;
2175

2176
        /** Finalize and obtain parameter instance from this builder. */
2177
        public PaymentLinkUpdateParams.CustomText.Submit build() {
2178
          return new PaymentLinkUpdateParams.CustomText.Submit(this.extraParams, this.message);
×
2179
        }
2180

2181
        /**
2182
         * Add a key/value pair to `extraParams` map. A map is initialized for the first
2183
         * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
2184
         * map. See {@link PaymentLinkUpdateParams.CustomText.Submit#extraParams} for the field
2185
         * documentation.
2186
         */
2187
        public Builder putExtraParam(String key, Object value) {
2188
          if (this.extraParams == null) {
×
2189
            this.extraParams = new HashMap<>();
×
2190
          }
2191
          this.extraParams.put(key, value);
×
2192
          return this;
×
2193
        }
2194

2195
        /**
2196
         * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
2197
         * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
2198
         * map. See {@link PaymentLinkUpdateParams.CustomText.Submit#extraParams} for the field
2199
         * documentation.
2200
         */
2201
        public Builder putAllExtraParam(Map<String, Object> map) {
2202
          if (this.extraParams == null) {
×
2203
            this.extraParams = new HashMap<>();
×
2204
          }
2205
          this.extraParams.putAll(map);
×
2206
          return this;
×
2207
        }
2208

2209
        /** <strong>Required.</strong> Text may be up to 1200 characters in length. */
2210
        public Builder setMessage(String message) {
2211
          this.message = message;
×
2212
          return this;
×
2213
        }
2214

2215
        /** <strong>Required.</strong> Text may be up to 1200 characters in length. */
2216
        public Builder setMessage(EmptyParam message) {
2217
          this.message = message;
×
2218
          return this;
×
2219
        }
2220
      }
2221
    }
2222

2223
    @Getter
2224
    public static class TermsOfServiceAcceptance {
2225
      /**
2226
       * Map of extra parameters for custom features not available in this client library. The
2227
       * content in this map is not serialized under this field's {@code @SerializedName} value.
2228
       * Instead, each key/value pair is serialized as if the key is a root-level field (serialized)
2229
       * name in this param object. Effectively, this map is flattened to its parent instance.
2230
       */
2231
      @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
2232
      Map<String, Object> extraParams;
2233

2234
      /** <strong>Required.</strong> Text may be up to 1200 characters in length. */
2235
      @SerializedName("message")
2236
      Object message;
2237

2238
      private TermsOfServiceAcceptance(Map<String, Object> extraParams, Object message) {
×
2239
        this.extraParams = extraParams;
×
2240
        this.message = message;
×
2241
      }
×
2242

2243
      public static Builder builder() {
2244
        return new Builder();
×
2245
      }
2246

2247
      public static class Builder {
×
2248
        private Map<String, Object> extraParams;
2249

2250
        private Object message;
2251

2252
        /** Finalize and obtain parameter instance from this builder. */
2253
        public PaymentLinkUpdateParams.CustomText.TermsOfServiceAcceptance build() {
2254
          return new PaymentLinkUpdateParams.CustomText.TermsOfServiceAcceptance(
×
2255
              this.extraParams, this.message);
2256
        }
2257

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

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

2286
        /** <strong>Required.</strong> Text may be up to 1200 characters in length. */
2287
        public Builder setMessage(String message) {
2288
          this.message = message;
×
2289
          return this;
×
2290
        }
2291

2292
        /** <strong>Required.</strong> Text may be up to 1200 characters in length. */
2293
        public Builder setMessage(EmptyParam message) {
2294
          this.message = message;
×
2295
          return this;
×
2296
        }
2297
      }
2298
    }
2299
  }
2300

2301
  @Getter
2302
  public static class InvoiceCreation {
2303
    /** <strong>Required.</strong> Whether the feature is enabled */
2304
    @SerializedName("enabled")
2305
    Boolean enabled;
2306

2307
    /**
2308
     * Map of extra parameters for custom features not available in this client library. The content
2309
     * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each
2310
     * key/value pair is serialized as if the key is a root-level field (serialized) name in this
2311
     * param object. Effectively, this map is flattened to its parent instance.
2312
     */
2313
    @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
2314
    Map<String, Object> extraParams;
2315

2316
    /** Invoice PDF configuration. */
2317
    @SerializedName("invoice_data")
2318
    InvoiceData invoiceData;
2319

2320
    private InvoiceCreation(
2321
        Boolean enabled, Map<String, Object> extraParams, InvoiceData invoiceData) {
×
2322
      this.enabled = enabled;
×
2323
      this.extraParams = extraParams;
×
2324
      this.invoiceData = invoiceData;
×
2325
    }
×
2326

2327
    public static Builder builder() {
2328
      return new Builder();
×
2329
    }
2330

2331
    public static class Builder {
×
2332
      private Boolean enabled;
2333

2334
      private Map<String, Object> extraParams;
2335

2336
      private InvoiceData invoiceData;
2337

2338
      /** Finalize and obtain parameter instance from this builder. */
2339
      public PaymentLinkUpdateParams.InvoiceCreation build() {
2340
        return new PaymentLinkUpdateParams.InvoiceCreation(
×
2341
            this.enabled, this.extraParams, this.invoiceData);
2342
      }
2343

2344
      /** <strong>Required.</strong> Whether the feature is enabled */
2345
      public Builder setEnabled(Boolean enabled) {
2346
        this.enabled = enabled;
×
2347
        return this;
×
2348
      }
2349

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

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

2377
      /** Invoice PDF configuration. */
2378
      public Builder setInvoiceData(
2379
          PaymentLinkUpdateParams.InvoiceCreation.InvoiceData invoiceData) {
2380
        this.invoiceData = invoiceData;
×
2381
        return this;
×
2382
      }
2383
    }
2384

2385
    @Getter
2386
    public static class InvoiceData {
2387
      /** The account tax IDs associated with the invoice. */
2388
      @SerializedName("account_tax_ids")
2389
      Object accountTaxIds;
2390

2391
      /** Default custom fields to be displayed on invoices for this customer. */
2392
      @SerializedName("custom_fields")
2393
      Object customFields;
2394

2395
      /** An arbitrary string attached to the object. Often useful for displaying to users. */
2396
      @SerializedName("description")
2397
      Object description;
2398

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

2408
      /** Default footer to be displayed on invoices for this customer. */
2409
      @SerializedName("footer")
2410
      Object footer;
2411

2412
      /**
2413
       * The connected account that issues the invoice. The invoice is presented with the branding
2414
       * and support information of the specified account.
2415
       */
2416
      @SerializedName("issuer")
2417
      Issuer issuer;
2418

2419
      /**
2420
       * Set of <a href="https://stripe.com/docs/api/metadata">key-value pairs</a> that you can
2421
       * attach to an object. This can be useful for storing additional information about the object
2422
       * in a structured format. Individual keys can be unset by posting an empty value to them. All
2423
       * keys can be unset by posting an empty value to {@code metadata}.
2424
       */
2425
      @SerializedName("metadata")
2426
      Object metadata;
2427

2428
      /** Default options for invoice PDF rendering for this customer. */
2429
      @SerializedName("rendering_options")
2430
      Object renderingOptions;
2431

2432
      private InvoiceData(
2433
          Object accountTaxIds,
2434
          Object customFields,
2435
          Object description,
2436
          Map<String, Object> extraParams,
2437
          Object footer,
2438
          Issuer issuer,
2439
          Object metadata,
2440
          Object renderingOptions) {
×
2441
        this.accountTaxIds = accountTaxIds;
×
2442
        this.customFields = customFields;
×
2443
        this.description = description;
×
2444
        this.extraParams = extraParams;
×
2445
        this.footer = footer;
×
2446
        this.issuer = issuer;
×
2447
        this.metadata = metadata;
×
2448
        this.renderingOptions = renderingOptions;
×
2449
      }
×
2450

2451
      public static Builder builder() {
2452
        return new Builder();
×
2453
      }
2454

2455
      public static class Builder {
×
2456
        private Object accountTaxIds;
2457

2458
        private Object customFields;
2459

2460
        private Object description;
2461

2462
        private Map<String, Object> extraParams;
2463

2464
        private Object footer;
2465

2466
        private Issuer issuer;
2467

2468
        private Object metadata;
2469

2470
        private Object renderingOptions;
2471

2472
        /** Finalize and obtain parameter instance from this builder. */
2473
        public PaymentLinkUpdateParams.InvoiceCreation.InvoiceData build() {
2474
          return new PaymentLinkUpdateParams.InvoiceCreation.InvoiceData(
×
2475
              this.accountTaxIds,
2476
              this.customFields,
2477
              this.description,
2478
              this.extraParams,
2479
              this.footer,
2480
              this.issuer,
2481
              this.metadata,
2482
              this.renderingOptions);
2483
        }
2484

2485
        /**
2486
         * Add an element to `accountTaxIds` list. A list is initialized for the first `add/addAll`
2487
         * call, and subsequent calls adds additional elements to the original list. See {@link
2488
         * PaymentLinkUpdateParams.InvoiceCreation.InvoiceData#accountTaxIds} for the field
2489
         * documentation.
2490
         */
2491
        @SuppressWarnings("unchecked")
2492
        public Builder addAccountTaxId(String element) {
2493
          if (this.accountTaxIds == null || this.accountTaxIds instanceof EmptyParam) {
×
2494
            this.accountTaxIds = new ArrayList<String>();
×
2495
          }
2496
          ((List<String>) this.accountTaxIds).add(element);
×
2497
          return this;
×
2498
        }
2499

2500
        /**
2501
         * Add all elements to `accountTaxIds` list. A list is initialized for the first
2502
         * `add/addAll` call, and subsequent calls adds additional elements to the original list.
2503
         * See {@link PaymentLinkUpdateParams.InvoiceCreation.InvoiceData#accountTaxIds} for the
2504
         * field documentation.
2505
         */
2506
        @SuppressWarnings("unchecked")
2507
        public Builder addAllAccountTaxId(List<String> elements) {
2508
          if (this.accountTaxIds == null || this.accountTaxIds instanceof EmptyParam) {
×
2509
            this.accountTaxIds = new ArrayList<String>();
×
2510
          }
2511
          ((List<String>) this.accountTaxIds).addAll(elements);
×
2512
          return this;
×
2513
        }
2514

2515
        /** The account tax IDs associated with the invoice. */
2516
        public Builder setAccountTaxIds(EmptyParam accountTaxIds) {
2517
          this.accountTaxIds = accountTaxIds;
×
2518
          return this;
×
2519
        }
2520

2521
        /** The account tax IDs associated with the invoice. */
2522
        public Builder setAccountTaxIds(List<String> accountTaxIds) {
2523
          this.accountTaxIds = accountTaxIds;
×
2524
          return this;
×
2525
        }
2526

2527
        /**
2528
         * Add an element to `customFields` list. A list is initialized for the first `add/addAll`
2529
         * call, and subsequent calls adds additional elements to the original list. See {@link
2530
         * PaymentLinkUpdateParams.InvoiceCreation.InvoiceData#customFields} for the field
2531
         * documentation.
2532
         */
2533
        @SuppressWarnings("unchecked")
2534
        public Builder addCustomField(
2535
            PaymentLinkUpdateParams.InvoiceCreation.InvoiceData.CustomField element) {
2536
          if (this.customFields == null || this.customFields instanceof EmptyParam) {
×
2537
            this.customFields =
×
2538
                new ArrayList<PaymentLinkUpdateParams.InvoiceCreation.InvoiceData.CustomField>();
2539
          }
2540
          ((List<PaymentLinkUpdateParams.InvoiceCreation.InvoiceData.CustomField>)
×
2541
                  this.customFields)
2542
              .add(element);
×
2543
          return this;
×
2544
        }
2545

2546
        /**
2547
         * Add all elements to `customFields` list. A list is initialized for the first `add/addAll`
2548
         * call, and subsequent calls adds additional elements to the original list. See {@link
2549
         * PaymentLinkUpdateParams.InvoiceCreation.InvoiceData#customFields} for the field
2550
         * documentation.
2551
         */
2552
        @SuppressWarnings("unchecked")
2553
        public Builder addAllCustomField(
2554
            List<PaymentLinkUpdateParams.InvoiceCreation.InvoiceData.CustomField> elements) {
2555
          if (this.customFields == null || this.customFields instanceof EmptyParam) {
×
2556
            this.customFields =
×
2557
                new ArrayList<PaymentLinkUpdateParams.InvoiceCreation.InvoiceData.CustomField>();
2558
          }
2559
          ((List<PaymentLinkUpdateParams.InvoiceCreation.InvoiceData.CustomField>)
×
2560
                  this.customFields)
2561
              .addAll(elements);
×
2562
          return this;
×
2563
        }
2564

2565
        /** Default custom fields to be displayed on invoices for this customer. */
2566
        public Builder setCustomFields(EmptyParam customFields) {
2567
          this.customFields = customFields;
×
2568
          return this;
×
2569
        }
2570

2571
        /** Default custom fields to be displayed on invoices for this customer. */
2572
        public Builder setCustomFields(
2573
            List<PaymentLinkUpdateParams.InvoiceCreation.InvoiceData.CustomField> customFields) {
2574
          this.customFields = customFields;
×
2575
          return this;
×
2576
        }
2577

2578
        /** An arbitrary string attached to the object. Often useful for displaying to users. */
2579
        public Builder setDescription(String description) {
2580
          this.description = description;
×
2581
          return this;
×
2582
        }
2583

2584
        /** An arbitrary string attached to the object. Often useful for displaying to users. */
2585
        public Builder setDescription(EmptyParam description) {
2586
          this.description = description;
×
2587
          return this;
×
2588
        }
2589

2590
        /**
2591
         * Add a key/value pair to `extraParams` map. A map is initialized for the first
2592
         * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
2593
         * map. See {@link PaymentLinkUpdateParams.InvoiceCreation.InvoiceData#extraParams} for the
2594
         * field documentation.
2595
         */
2596
        public Builder putExtraParam(String key, Object value) {
2597
          if (this.extraParams == null) {
×
2598
            this.extraParams = new HashMap<>();
×
2599
          }
2600
          this.extraParams.put(key, value);
×
2601
          return this;
×
2602
        }
2603

2604
        /**
2605
         * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
2606
         * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
2607
         * map. See {@link PaymentLinkUpdateParams.InvoiceCreation.InvoiceData#extraParams} for the
2608
         * field documentation.
2609
         */
2610
        public Builder putAllExtraParam(Map<String, Object> map) {
2611
          if (this.extraParams == null) {
×
2612
            this.extraParams = new HashMap<>();
×
2613
          }
2614
          this.extraParams.putAll(map);
×
2615
          return this;
×
2616
        }
2617

2618
        /** Default footer to be displayed on invoices for this customer. */
2619
        public Builder setFooter(String footer) {
2620
          this.footer = footer;
×
2621
          return this;
×
2622
        }
2623

2624
        /** Default footer to be displayed on invoices for this customer. */
2625
        public Builder setFooter(EmptyParam footer) {
2626
          this.footer = footer;
×
2627
          return this;
×
2628
        }
2629

2630
        /**
2631
         * The connected account that issues the invoice. The invoice is presented with the branding
2632
         * and support information of the specified account.
2633
         */
2634
        public Builder setIssuer(
2635
            PaymentLinkUpdateParams.InvoiceCreation.InvoiceData.Issuer issuer) {
2636
          this.issuer = issuer;
×
2637
          return this;
×
2638
        }
2639

2640
        /**
2641
         * Add a key/value pair to `metadata` map. A map is initialized for the first `put/putAll`
2642
         * call, and subsequent calls add additional key/value pairs to the original map. See {@link
2643
         * PaymentLinkUpdateParams.InvoiceCreation.InvoiceData#metadata} for the field
2644
         * documentation.
2645
         */
2646
        @SuppressWarnings("unchecked")
2647
        public Builder putMetadata(String key, String value) {
2648
          if (this.metadata == null || this.metadata instanceof EmptyParam) {
×
2649
            this.metadata = new HashMap<String, String>();
×
2650
          }
2651
          ((Map<String, String>) this.metadata).put(key, value);
×
2652
          return this;
×
2653
        }
2654

2655
        /**
2656
         * Add all map key/value pairs to `metadata` 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 PaymentLinkUpdateParams.InvoiceCreation.InvoiceData#metadata} for the
2659
         * field documentation.
2660
         */
2661
        @SuppressWarnings("unchecked")
2662
        public Builder putAllMetadata(Map<String, String> map) {
2663
          if (this.metadata == null || this.metadata instanceof EmptyParam) {
×
2664
            this.metadata = new HashMap<String, String>();
×
2665
          }
2666
          ((Map<String, String>) this.metadata).putAll(map);
×
2667
          return this;
×
2668
        }
2669

2670
        /**
2671
         * Set of <a href="https://stripe.com/docs/api/metadata">key-value pairs</a> that you can
2672
         * attach to an object. This can be useful for storing additional information about the
2673
         * object in a structured format. Individual keys can be unset by posting an empty value to
2674
         * them. All keys can be unset by posting an empty value to {@code metadata}.
2675
         */
2676
        public Builder setMetadata(EmptyParam metadata) {
2677
          this.metadata = metadata;
×
2678
          return this;
×
2679
        }
2680

2681
        /**
2682
         * Set of <a href="https://stripe.com/docs/api/metadata">key-value pairs</a> that you can
2683
         * attach to an object. This can be useful for storing additional information about the
2684
         * object in a structured format. Individual keys can be unset by posting an empty value to
2685
         * them. All keys can be unset by posting an empty value to {@code metadata}.
2686
         */
2687
        public Builder setMetadata(Map<String, String> metadata) {
2688
          this.metadata = metadata;
×
2689
          return this;
×
2690
        }
2691

2692
        /** Default options for invoice PDF rendering for this customer. */
2693
        public Builder setRenderingOptions(
2694
            PaymentLinkUpdateParams.InvoiceCreation.InvoiceData.RenderingOptions renderingOptions) {
2695
          this.renderingOptions = renderingOptions;
×
2696
          return this;
×
2697
        }
2698

2699
        /** Default options for invoice PDF rendering for this customer. */
2700
        public Builder setRenderingOptions(EmptyParam renderingOptions) {
2701
          this.renderingOptions = renderingOptions;
×
2702
          return this;
×
2703
        }
2704
      }
2705

2706
      @Getter
2707
      public static class CustomField {
2708
        /**
2709
         * Map of extra parameters for custom features not available in this client library. The
2710
         * content in this map is not serialized under this field's {@code @SerializedName} value.
2711
         * Instead, each key/value pair is serialized as if the key is a root-level field
2712
         * (serialized) name in this param object. Effectively, this map is flattened to its parent
2713
         * instance.
2714
         */
2715
        @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
2716
        Map<String, Object> extraParams;
2717

2718
        /**
2719
         * <strong>Required.</strong> The name of the custom field. This may be up to 40 characters.
2720
         */
2721
        @SerializedName("name")
2722
        Object name;
2723

2724
        /**
2725
         * <strong>Required.</strong> The value of the custom field. This may be up to 140
2726
         * characters.
2727
         */
2728
        @SerializedName("value")
2729
        Object value;
2730

2731
        private CustomField(Map<String, Object> extraParams, Object name, Object value) {
×
2732
          this.extraParams = extraParams;
×
2733
          this.name = name;
×
2734
          this.value = value;
×
2735
        }
×
2736

2737
        public static Builder builder() {
2738
          return new Builder();
×
2739
        }
2740

2741
        public static class Builder {
×
2742
          private Map<String, Object> extraParams;
2743

2744
          private Object name;
2745

2746
          private Object value;
2747

2748
          /** Finalize and obtain parameter instance from this builder. */
2749
          public PaymentLinkUpdateParams.InvoiceCreation.InvoiceData.CustomField build() {
2750
            return new PaymentLinkUpdateParams.InvoiceCreation.InvoiceData.CustomField(
×
2751
                this.extraParams, this.name, this.value);
2752
          }
2753

2754
          /**
2755
           * Add a key/value pair to `extraParams` map. A map is initialized for the first
2756
           * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
2757
           * map. See {@link
2758
           * PaymentLinkUpdateParams.InvoiceCreation.InvoiceData.CustomField#extraParams} for the
2759
           * field documentation.
2760
           */
2761
          public Builder putExtraParam(String key, Object value) {
2762
            if (this.extraParams == null) {
×
2763
              this.extraParams = new HashMap<>();
×
2764
            }
2765
            this.extraParams.put(key, value);
×
2766
            return this;
×
2767
          }
2768

2769
          /**
2770
           * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
2771
           * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
2772
           * map. See {@link
2773
           * PaymentLinkUpdateParams.InvoiceCreation.InvoiceData.CustomField#extraParams} for the
2774
           * field documentation.
2775
           */
2776
          public Builder putAllExtraParam(Map<String, Object> map) {
2777
            if (this.extraParams == null) {
×
2778
              this.extraParams = new HashMap<>();
×
2779
            }
2780
            this.extraParams.putAll(map);
×
2781
            return this;
×
2782
          }
2783

2784
          /**
2785
           * <strong>Required.</strong> The name of the custom field. This may be up to 40
2786
           * characters.
2787
           */
2788
          public Builder setName(String name) {
2789
            this.name = name;
×
2790
            return this;
×
2791
          }
2792

2793
          /**
2794
           * <strong>Required.</strong> The name of the custom field. This may be up to 40
2795
           * characters.
2796
           */
2797
          public Builder setName(EmptyParam name) {
2798
            this.name = name;
×
2799
            return this;
×
2800
          }
2801

2802
          /**
2803
           * <strong>Required.</strong> The value of the custom field. This may be up to 140
2804
           * characters.
2805
           */
2806
          public Builder setValue(String value) {
2807
            this.value = value;
×
2808
            return this;
×
2809
          }
2810

2811
          /**
2812
           * <strong>Required.</strong> The value of the custom field. This may be up to 140
2813
           * characters.
2814
           */
2815
          public Builder setValue(EmptyParam value) {
2816
            this.value = value;
×
2817
            return this;
×
2818
          }
2819
        }
2820
      }
2821

2822
      @Getter
2823
      public static class Issuer {
2824
        /** The connected account being referenced when {@code type} is {@code account}. */
2825
        @SerializedName("account")
2826
        Object account;
2827

2828
        /**
2829
         * Map of extra parameters for custom features not available in this client library. The
2830
         * content in this map is not serialized under this field's {@code @SerializedName} value.
2831
         * Instead, each key/value pair is serialized as if the key is a root-level field
2832
         * (serialized) name in this param object. Effectively, this map is flattened to its parent
2833
         * instance.
2834
         */
2835
        @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
2836
        Map<String, Object> extraParams;
2837

2838
        /** <strong>Required.</strong> Type of the account referenced in the request. */
2839
        @SerializedName("type")
2840
        Type type;
2841

2842
        private Issuer(Object account, Map<String, Object> extraParams, Type type) {
×
2843
          this.account = account;
×
2844
          this.extraParams = extraParams;
×
2845
          this.type = type;
×
2846
        }
×
2847

2848
        public static Builder builder() {
2849
          return new Builder();
×
2850
        }
2851

2852
        public static class Builder {
×
2853
          private Object account;
2854

2855
          private Map<String, Object> extraParams;
2856

2857
          private Type type;
2858

2859
          /** Finalize and obtain parameter instance from this builder. */
2860
          public PaymentLinkUpdateParams.InvoiceCreation.InvoiceData.Issuer build() {
2861
            return new PaymentLinkUpdateParams.InvoiceCreation.InvoiceData.Issuer(
×
2862
                this.account, this.extraParams, this.type);
2863
          }
2864

2865
          /** The connected account being referenced when {@code type} is {@code account}. */
2866
          public Builder setAccount(String account) {
2867
            this.account = account;
×
2868
            return this;
×
2869
          }
2870

2871
          /** The connected account being referenced when {@code type} is {@code account}. */
2872
          public Builder setAccount(EmptyParam account) {
2873
            this.account = account;
×
2874
            return this;
×
2875
          }
2876

2877
          /**
2878
           * Add a key/value pair to `extraParams` map. A map is initialized for the first
2879
           * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
2880
           * map. See {@link PaymentLinkUpdateParams.InvoiceCreation.InvoiceData.Issuer#extraParams}
2881
           * for the field documentation.
2882
           */
2883
          public Builder putExtraParam(String key, Object value) {
2884
            if (this.extraParams == null) {
×
2885
              this.extraParams = new HashMap<>();
×
2886
            }
2887
            this.extraParams.put(key, value);
×
2888
            return this;
×
2889
          }
2890

2891
          /**
2892
           * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
2893
           * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
2894
           * map. See {@link PaymentLinkUpdateParams.InvoiceCreation.InvoiceData.Issuer#extraParams}
2895
           * for the field documentation.
2896
           */
2897
          public Builder putAllExtraParam(Map<String, Object> map) {
2898
            if (this.extraParams == null) {
×
2899
              this.extraParams = new HashMap<>();
×
2900
            }
2901
            this.extraParams.putAll(map);
×
2902
            return this;
×
2903
          }
2904

2905
          /** <strong>Required.</strong> Type of the account referenced in the request. */
2906
          public Builder setType(
2907
              PaymentLinkUpdateParams.InvoiceCreation.InvoiceData.Issuer.Type type) {
2908
            this.type = type;
×
2909
            return this;
×
2910
          }
2911
        }
2912

2913
        public enum Type implements ApiRequestParams.EnumParam {
×
2914
          @SerializedName("account")
×
2915
          ACCOUNT("account"),
2916

2917
          @SerializedName("self")
×
2918
          SELF("self");
2919

2920
          @Getter(onMethod_ = {@Override})
2921
          private final String value;
2922

2923
          Type(String value) {
×
2924
            this.value = value;
×
2925
          }
×
2926
        }
2927
      }
2928

2929
      @Getter
2930
      public static class RenderingOptions {
2931
        /**
2932
         * How line-item prices and amounts will be displayed with respect to tax on invoice PDFs.
2933
         * One of {@code exclude_tax} or {@code include_inclusive_tax}. {@code
2934
         * include_inclusive_tax} will include inclusive tax (and exclude exclusive tax) in invoice
2935
         * PDF amounts. {@code exclude_tax} will exclude all tax (inclusive and exclusive alike)
2936
         * from invoice PDF amounts.
2937
         */
2938
        @SerializedName("amount_tax_display")
2939
        ApiRequestParams.EnumParam amountTaxDisplay;
2940

2941
        /**
2942
         * Map of extra parameters for custom features not available in this client library. The
2943
         * content in this map is not serialized under this field's {@code @SerializedName} value.
2944
         * Instead, each key/value pair is serialized as if the key is a root-level field
2945
         * (serialized) name in this param object. Effectively, this map is flattened to its parent
2946
         * instance.
2947
         */
2948
        @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
2949
        Map<String, Object> extraParams;
2950

2951
        private RenderingOptions(
2952
            ApiRequestParams.EnumParam amountTaxDisplay, Map<String, Object> extraParams) {
×
2953
          this.amountTaxDisplay = amountTaxDisplay;
×
2954
          this.extraParams = extraParams;
×
2955
        }
×
2956

2957
        public static Builder builder() {
2958
          return new Builder();
×
2959
        }
2960

2961
        public static class Builder {
×
2962
          private ApiRequestParams.EnumParam amountTaxDisplay;
2963

2964
          private Map<String, Object> extraParams;
2965

2966
          /** Finalize and obtain parameter instance from this builder. */
2967
          public PaymentLinkUpdateParams.InvoiceCreation.InvoiceData.RenderingOptions build() {
2968
            return new PaymentLinkUpdateParams.InvoiceCreation.InvoiceData.RenderingOptions(
×
2969
                this.amountTaxDisplay, this.extraParams);
2970
          }
2971

2972
          /**
2973
           * How line-item prices and amounts will be displayed with respect to tax on invoice PDFs.
2974
           * One of {@code exclude_tax} or {@code include_inclusive_tax}. {@code
2975
           * include_inclusive_tax} will include inclusive tax (and exclude exclusive tax) in
2976
           * invoice PDF amounts. {@code exclude_tax} will exclude all tax (inclusive and exclusive
2977
           * alike) from invoice PDF amounts.
2978
           */
2979
          public Builder setAmountTaxDisplay(
2980
              PaymentLinkUpdateParams.InvoiceCreation.InvoiceData.RenderingOptions.AmountTaxDisplay
2981
                  amountTaxDisplay) {
2982
            this.amountTaxDisplay = amountTaxDisplay;
×
2983
            return this;
×
2984
          }
2985

2986
          /**
2987
           * How line-item prices and amounts will be displayed with respect to tax on invoice PDFs.
2988
           * One of {@code exclude_tax} or {@code include_inclusive_tax}. {@code
2989
           * include_inclusive_tax} will include inclusive tax (and exclude exclusive tax) in
2990
           * invoice PDF amounts. {@code exclude_tax} will exclude all tax (inclusive and exclusive
2991
           * alike) from invoice PDF amounts.
2992
           */
2993
          public Builder setAmountTaxDisplay(EmptyParam amountTaxDisplay) {
2994
            this.amountTaxDisplay = amountTaxDisplay;
×
2995
            return this;
×
2996
          }
2997

2998
          /**
2999
           * Add a key/value pair to `extraParams` map. A map is initialized for the first
3000
           * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
3001
           * map. See {@link
3002
           * PaymentLinkUpdateParams.InvoiceCreation.InvoiceData.RenderingOptions#extraParams} for
3003
           * the field documentation.
3004
           */
3005
          public Builder putExtraParam(String key, Object value) {
3006
            if (this.extraParams == null) {
×
3007
              this.extraParams = new HashMap<>();
×
3008
            }
3009
            this.extraParams.put(key, value);
×
3010
            return this;
×
3011
          }
3012

3013
          /**
3014
           * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
3015
           * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
3016
           * map. See {@link
3017
           * PaymentLinkUpdateParams.InvoiceCreation.InvoiceData.RenderingOptions#extraParams} for
3018
           * the field documentation.
3019
           */
3020
          public Builder putAllExtraParam(Map<String, Object> map) {
3021
            if (this.extraParams == null) {
×
3022
              this.extraParams = new HashMap<>();
×
3023
            }
3024
            this.extraParams.putAll(map);
×
3025
            return this;
×
3026
          }
3027
        }
3028

3029
        public enum AmountTaxDisplay implements ApiRequestParams.EnumParam {
×
3030
          @SerializedName("exclude_tax")
×
3031
          EXCLUDE_TAX("exclude_tax"),
3032

3033
          @SerializedName("include_inclusive_tax")
×
3034
          INCLUDE_INCLUSIVE_TAX("include_inclusive_tax");
3035

3036
          @Getter(onMethod_ = {@Override})
3037
          private final String value;
3038

3039
          AmountTaxDisplay(String value) {
×
3040
            this.value = value;
×
3041
          }
×
3042
        }
3043
      }
3044
    }
3045
  }
3046

3047
  @Getter
3048
  public static class LineItem {
3049
    /**
3050
     * When set, provides configuration for this item’s quantity to be adjusted by the customer
3051
     * during checkout.
3052
     */
3053
    @SerializedName("adjustable_quantity")
3054
    AdjustableQuantity adjustableQuantity;
3055

3056
    /**
3057
     * Map of extra parameters for custom features not available in this client library. The content
3058
     * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each
3059
     * key/value pair is serialized as if the key is a root-level field (serialized) name in this
3060
     * param object. Effectively, this map is flattened to its parent instance.
3061
     */
3062
    @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
3063
    Map<String, Object> extraParams;
3064

3065
    /** <strong>Required.</strong> The ID of an existing line item on the payment link. */
3066
    @SerializedName("id")
3067
    Object id;
3068

3069
    /** The quantity of the line item being purchased. */
3070
    @SerializedName("quantity")
3071
    Long quantity;
3072

3073
    private LineItem(
3074
        AdjustableQuantity adjustableQuantity,
3075
        Map<String, Object> extraParams,
3076
        Object id,
3077
        Long quantity) {
×
3078
      this.adjustableQuantity = adjustableQuantity;
×
3079
      this.extraParams = extraParams;
×
3080
      this.id = id;
×
3081
      this.quantity = quantity;
×
3082
    }
×
3083

3084
    public static Builder builder() {
3085
      return new Builder();
×
3086
    }
3087

3088
    public static class Builder {
×
3089
      private AdjustableQuantity adjustableQuantity;
3090

3091
      private Map<String, Object> extraParams;
3092

3093
      private Object id;
3094

3095
      private Long quantity;
3096

3097
      /** Finalize and obtain parameter instance from this builder. */
3098
      public PaymentLinkUpdateParams.LineItem build() {
3099
        return new PaymentLinkUpdateParams.LineItem(
×
3100
            this.adjustableQuantity, this.extraParams, this.id, this.quantity);
3101
      }
3102

3103
      /**
3104
       * When set, provides configuration for this item’s quantity to be adjusted by the customer
3105
       * during checkout.
3106
       */
3107
      public Builder setAdjustableQuantity(
3108
          PaymentLinkUpdateParams.LineItem.AdjustableQuantity adjustableQuantity) {
3109
        this.adjustableQuantity = adjustableQuantity;
×
3110
        return this;
×
3111
      }
3112

3113
      /**
3114
       * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll`
3115
       * call, and subsequent calls add additional key/value pairs to the original map. See {@link
3116
       * PaymentLinkUpdateParams.LineItem#extraParams} for the field documentation.
3117
       */
3118
      public Builder putExtraParam(String key, Object value) {
3119
        if (this.extraParams == null) {
×
3120
          this.extraParams = new HashMap<>();
×
3121
        }
3122
        this.extraParams.put(key, value);
×
3123
        return this;
×
3124
      }
3125

3126
      /**
3127
       * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
3128
       * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map.
3129
       * See {@link PaymentLinkUpdateParams.LineItem#extraParams} for the field documentation.
3130
       */
3131
      public Builder putAllExtraParam(Map<String, Object> map) {
3132
        if (this.extraParams == null) {
×
3133
          this.extraParams = new HashMap<>();
×
3134
        }
3135
        this.extraParams.putAll(map);
×
3136
        return this;
×
3137
      }
3138

3139
      /** <strong>Required.</strong> The ID of an existing line item on the payment link. */
3140
      public Builder setId(String id) {
3141
        this.id = id;
×
3142
        return this;
×
3143
      }
3144

3145
      /** <strong>Required.</strong> The ID of an existing line item on the payment link. */
3146
      public Builder setId(EmptyParam id) {
3147
        this.id = id;
×
3148
        return this;
×
3149
      }
3150

3151
      /** The quantity of the line item being purchased. */
3152
      public Builder setQuantity(Long quantity) {
3153
        this.quantity = quantity;
×
3154
        return this;
×
3155
      }
3156
    }
3157

3158
    @Getter
3159
    public static class AdjustableQuantity {
3160
      /**
3161
       * <strong>Required.</strong> Set to true if the quantity can be adjusted to any non-negative
3162
       * Integer.
3163
       */
3164
      @SerializedName("enabled")
3165
      Boolean enabled;
3166

3167
      /**
3168
       * Map of extra parameters for custom features not available in this client library. The
3169
       * content in this map is not serialized under this field's {@code @SerializedName} value.
3170
       * Instead, each key/value pair is serialized as if the key is a root-level field (serialized)
3171
       * name in this param object. Effectively, this map is flattened to its parent instance.
3172
       */
3173
      @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
3174
      Map<String, Object> extraParams;
3175

3176
      /**
3177
       * The maximum quantity the customer can purchase. By default this value is 99. You can
3178
       * specify a value up to 999.
3179
       */
3180
      @SerializedName("maximum")
3181
      Long maximum;
3182

3183
      /**
3184
       * The minimum quantity the customer can purchase. By default this value is 0. If there is
3185
       * only one item in the cart then that item's quantity cannot go down to 0.
3186
       */
3187
      @SerializedName("minimum")
3188
      Long minimum;
3189

3190
      private AdjustableQuantity(
3191
          Boolean enabled, Map<String, Object> extraParams, Long maximum, Long minimum) {
×
3192
        this.enabled = enabled;
×
3193
        this.extraParams = extraParams;
×
3194
        this.maximum = maximum;
×
3195
        this.minimum = minimum;
×
3196
      }
×
3197

3198
      public static Builder builder() {
3199
        return new Builder();
×
3200
      }
3201

3202
      public static class Builder {
×
3203
        private Boolean enabled;
3204

3205
        private Map<String, Object> extraParams;
3206

3207
        private Long maximum;
3208

3209
        private Long minimum;
3210

3211
        /** Finalize and obtain parameter instance from this builder. */
3212
        public PaymentLinkUpdateParams.LineItem.AdjustableQuantity build() {
3213
          return new PaymentLinkUpdateParams.LineItem.AdjustableQuantity(
×
3214
              this.enabled, this.extraParams, this.maximum, this.minimum);
3215
        }
3216

3217
        /**
3218
         * <strong>Required.</strong> Set to true if the quantity can be adjusted to any
3219
         * non-negative Integer.
3220
         */
3221
        public Builder setEnabled(Boolean enabled) {
3222
          this.enabled = enabled;
×
3223
          return this;
×
3224
        }
3225

3226
        /**
3227
         * Add a key/value pair to `extraParams` map. A map is initialized for the first
3228
         * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
3229
         * map. See {@link PaymentLinkUpdateParams.LineItem.AdjustableQuantity#extraParams} for the
3230
         * field documentation.
3231
         */
3232
        public Builder putExtraParam(String key, Object value) {
3233
          if (this.extraParams == null) {
×
3234
            this.extraParams = new HashMap<>();
×
3235
          }
3236
          this.extraParams.put(key, value);
×
3237
          return this;
×
3238
        }
3239

3240
        /**
3241
         * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
3242
         * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
3243
         * map. See {@link PaymentLinkUpdateParams.LineItem.AdjustableQuantity#extraParams} for the
3244
         * field documentation.
3245
         */
3246
        public Builder putAllExtraParam(Map<String, Object> map) {
3247
          if (this.extraParams == null) {
×
3248
            this.extraParams = new HashMap<>();
×
3249
          }
3250
          this.extraParams.putAll(map);
×
3251
          return this;
×
3252
        }
3253

3254
        /**
3255
         * The maximum quantity the customer can purchase. By default this value is 99. You can
3256
         * specify a value up to 999.
3257
         */
3258
        public Builder setMaximum(Long maximum) {
3259
          this.maximum = maximum;
×
3260
          return this;
×
3261
        }
3262

3263
        /**
3264
         * The minimum quantity the customer can purchase. By default this value is 0. If there is
3265
         * only one item in the cart then that item's quantity cannot go down to 0.
3266
         */
3267
        public Builder setMinimum(Long minimum) {
3268
          this.minimum = minimum;
×
3269
          return this;
×
3270
        }
3271
      }
3272
    }
3273
  }
3274

3275
  @Getter
3276
  public static class PaymentIntentData {
3277
    /** An arbitrary string attached to the object. Often useful for displaying to users. */
3278
    @SerializedName("description")
3279
    Object description;
3280

3281
    /**
3282
     * Map of extra parameters for custom features not available in this client library. The content
3283
     * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each
3284
     * key/value pair is serialized as if the key is a root-level field (serialized) name in this
3285
     * param object. Effectively, this map is flattened to its parent instance.
3286
     */
3287
    @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
3288
    Map<String, Object> extraParams;
3289

3290
    /**
3291
     * Set of <a href="https://stripe.com/docs/api/metadata">key-value pairs</a> that will
3292
     * declaratively set metadata on <a href="https://stripe.com/docs/api/payment_intents">Payment
3293
     * Intents</a> generated from this payment link. Unlike object-level metadata, this field is
3294
     * declarative. Updates will clear prior values.
3295
     */
3296
    @SerializedName("metadata")
3297
    Object metadata;
3298

3299
    /**
3300
     * Text that appears on the customer's statement as the statement descriptor for a non-card
3301
     * charge. This value overrides the account's default statement descriptor. For information
3302
     * about requirements, including the 22-character limit, see <a
3303
     * href="https://docs.stripe.com/get-started/account/statement-descriptors">the Statement
3304
     * Descriptor docs</a>.
3305
     *
3306
     * <p>Setting this value for a card charge returns an error. For card charges, set the <a
3307
     * href="https://docs.stripe.com/get-started/account/statement-descriptors#dynamic">statement_descriptor_suffix</a>
3308
     * instead.
3309
     */
3310
    @SerializedName("statement_descriptor")
3311
    Object statementDescriptor;
3312

3313
    /**
3314
     * Provides information about a card charge. Concatenated to the account's <a
3315
     * href="https://docs.stripe.com/get-started/account/statement-descriptors#static">statement
3316
     * descriptor prefix</a> to form the complete statement descriptor that appears on the
3317
     * customer's statement.
3318
     */
3319
    @SerializedName("statement_descriptor_suffix")
3320
    Object statementDescriptorSuffix;
3321

3322
    /**
3323
     * A string that identifies the resulting payment as part of a group. See the PaymentIntents <a
3324
     * href="https://stripe.com/docs/connect/separate-charges-and-transfers">use case for connected
3325
     * accounts</a> for details.
3326
     */
3327
    @SerializedName("transfer_group")
3328
    Object transferGroup;
3329

3330
    private PaymentIntentData(
3331
        Object description,
3332
        Map<String, Object> extraParams,
3333
        Object metadata,
3334
        Object statementDescriptor,
3335
        Object statementDescriptorSuffix,
3336
        Object transferGroup) {
×
3337
      this.description = description;
×
3338
      this.extraParams = extraParams;
×
3339
      this.metadata = metadata;
×
3340
      this.statementDescriptor = statementDescriptor;
×
3341
      this.statementDescriptorSuffix = statementDescriptorSuffix;
×
3342
      this.transferGroup = transferGroup;
×
3343
    }
×
3344

3345
    public static Builder builder() {
3346
      return new Builder();
×
3347
    }
3348

3349
    public static class Builder {
×
3350
      private Object description;
3351

3352
      private Map<String, Object> extraParams;
3353

3354
      private Object metadata;
3355

3356
      private Object statementDescriptor;
3357

3358
      private Object statementDescriptorSuffix;
3359

3360
      private Object transferGroup;
3361

3362
      /** Finalize and obtain parameter instance from this builder. */
3363
      public PaymentLinkUpdateParams.PaymentIntentData build() {
3364
        return new PaymentLinkUpdateParams.PaymentIntentData(
×
3365
            this.description,
3366
            this.extraParams,
3367
            this.metadata,
3368
            this.statementDescriptor,
3369
            this.statementDescriptorSuffix,
3370
            this.transferGroup);
3371
      }
3372

3373
      /** An arbitrary string attached to the object. Often useful for displaying to users. */
3374
      public Builder setDescription(String description) {
3375
        this.description = description;
×
3376
        return this;
×
3377
      }
3378

3379
      /** An arbitrary string attached to the object. Often useful for displaying to users. */
3380
      public Builder setDescription(EmptyParam description) {
3381
        this.description = description;
×
3382
        return this;
×
3383
      }
3384

3385
      /**
3386
       * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll`
3387
       * call, and subsequent calls add additional key/value pairs to the original map. See {@link
3388
       * PaymentLinkUpdateParams.PaymentIntentData#extraParams} for the field documentation.
3389
       */
3390
      public Builder putExtraParam(String key, Object value) {
3391
        if (this.extraParams == null) {
×
3392
          this.extraParams = new HashMap<>();
×
3393
        }
3394
        this.extraParams.put(key, value);
×
3395
        return this;
×
3396
      }
3397

3398
      /**
3399
       * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
3400
       * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map.
3401
       * See {@link PaymentLinkUpdateParams.PaymentIntentData#extraParams} for the field
3402
       * documentation.
3403
       */
3404
      public Builder putAllExtraParam(Map<String, Object> map) {
3405
        if (this.extraParams == null) {
×
3406
          this.extraParams = new HashMap<>();
×
3407
        }
3408
        this.extraParams.putAll(map);
×
3409
        return this;
×
3410
      }
3411

3412
      /**
3413
       * Add a key/value pair to `metadata` map. A map is initialized for the first `put/putAll`
3414
       * call, and subsequent calls add additional key/value pairs to the original map. See {@link
3415
       * PaymentLinkUpdateParams.PaymentIntentData#metadata} for the field documentation.
3416
       */
3417
      @SuppressWarnings("unchecked")
3418
      public Builder putMetadata(String key, String value) {
3419
        if (this.metadata == null || this.metadata instanceof EmptyParam) {
×
3420
          this.metadata = new HashMap<String, String>();
×
3421
        }
3422
        ((Map<String, String>) this.metadata).put(key, value);
×
3423
        return this;
×
3424
      }
3425

3426
      /**
3427
       * Add all map key/value pairs to `metadata` map. A map is initialized for the first
3428
       * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map.
3429
       * See {@link PaymentLinkUpdateParams.PaymentIntentData#metadata} for the field documentation.
3430
       */
3431
      @SuppressWarnings("unchecked")
3432
      public Builder putAllMetadata(Map<String, String> map) {
3433
        if (this.metadata == null || this.metadata instanceof EmptyParam) {
×
3434
          this.metadata = new HashMap<String, String>();
×
3435
        }
3436
        ((Map<String, String>) this.metadata).putAll(map);
×
3437
        return this;
×
3438
      }
3439

3440
      /**
3441
       * Set of <a href="https://stripe.com/docs/api/metadata">key-value pairs</a> that will
3442
       * declaratively set metadata on <a href="https://stripe.com/docs/api/payment_intents">Payment
3443
       * Intents</a> generated from this payment link. Unlike object-level metadata, this field is
3444
       * declarative. Updates will clear prior values.
3445
       */
3446
      public Builder setMetadata(EmptyParam metadata) {
3447
        this.metadata = metadata;
×
3448
        return this;
×
3449
      }
3450

3451
      /**
3452
       * Set of <a href="https://stripe.com/docs/api/metadata">key-value pairs</a> that will
3453
       * declaratively set metadata on <a href="https://stripe.com/docs/api/payment_intents">Payment
3454
       * Intents</a> generated from this payment link. Unlike object-level metadata, this field is
3455
       * declarative. Updates will clear prior values.
3456
       */
3457
      public Builder setMetadata(Map<String, String> metadata) {
3458
        this.metadata = metadata;
×
3459
        return this;
×
3460
      }
3461

3462
      /**
3463
       * Text that appears on the customer's statement as the statement descriptor for a non-card
3464
       * charge. This value overrides the account's default statement descriptor. For information
3465
       * about requirements, including the 22-character limit, see <a
3466
       * href="https://docs.stripe.com/get-started/account/statement-descriptors">the Statement
3467
       * Descriptor docs</a>.
3468
       *
3469
       * <p>Setting this value for a card charge returns an error. For card charges, set the <a
3470
       * href="https://docs.stripe.com/get-started/account/statement-descriptors#dynamic">statement_descriptor_suffix</a>
3471
       * instead.
3472
       */
3473
      public Builder setStatementDescriptor(String statementDescriptor) {
3474
        this.statementDescriptor = statementDescriptor;
×
3475
        return this;
×
3476
      }
3477

3478
      /**
3479
       * Text that appears on the customer's statement as the statement descriptor for a non-card
3480
       * charge. This value overrides the account's default statement descriptor. For information
3481
       * about requirements, including the 22-character limit, see <a
3482
       * href="https://docs.stripe.com/get-started/account/statement-descriptors">the Statement
3483
       * Descriptor docs</a>.
3484
       *
3485
       * <p>Setting this value for a card charge returns an error. For card charges, set the <a
3486
       * href="https://docs.stripe.com/get-started/account/statement-descriptors#dynamic">statement_descriptor_suffix</a>
3487
       * instead.
3488
       */
3489
      public Builder setStatementDescriptor(EmptyParam statementDescriptor) {
3490
        this.statementDescriptor = statementDescriptor;
×
3491
        return this;
×
3492
      }
3493

3494
      /**
3495
       * Provides information about a card charge. Concatenated to the account's <a
3496
       * href="https://docs.stripe.com/get-started/account/statement-descriptors#static">statement
3497
       * descriptor prefix</a> to form the complete statement descriptor that appears on the
3498
       * customer's statement.
3499
       */
3500
      public Builder setStatementDescriptorSuffix(String statementDescriptorSuffix) {
3501
        this.statementDescriptorSuffix = statementDescriptorSuffix;
×
3502
        return this;
×
3503
      }
3504

3505
      /**
3506
       * Provides information about a card charge. Concatenated to the account's <a
3507
       * href="https://docs.stripe.com/get-started/account/statement-descriptors#static">statement
3508
       * descriptor prefix</a> to form the complete statement descriptor that appears on the
3509
       * customer's statement.
3510
       */
3511
      public Builder setStatementDescriptorSuffix(EmptyParam statementDescriptorSuffix) {
3512
        this.statementDescriptorSuffix = statementDescriptorSuffix;
×
3513
        return this;
×
3514
      }
3515

3516
      /**
3517
       * A string that identifies the resulting payment as part of a group. See the PaymentIntents
3518
       * <a href="https://stripe.com/docs/connect/separate-charges-and-transfers">use case for
3519
       * connected accounts</a> for details.
3520
       */
3521
      public Builder setTransferGroup(String transferGroup) {
3522
        this.transferGroup = transferGroup;
×
3523
        return this;
×
3524
      }
3525

3526
      /**
3527
       * A string that identifies the resulting payment as part of a group. See the PaymentIntents
3528
       * <a href="https://stripe.com/docs/connect/separate-charges-and-transfers">use case for
3529
       * connected accounts</a> for details.
3530
       */
3531
      public Builder setTransferGroup(EmptyParam transferGroup) {
3532
        this.transferGroup = transferGroup;
×
3533
        return this;
×
3534
      }
3535
    }
3536
  }
3537

3538
  @Getter
3539
  public static class PhoneNumberCollection {
3540
    /** <strong>Required.</strong> Set to {@code true} to enable phone number collection. */
3541
    @SerializedName("enabled")
3542
    Boolean enabled;
3543

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

NEW
3553
    private PhoneNumberCollection(Boolean enabled, Map<String, Object> extraParams) {
×
NEW
3554
      this.enabled = enabled;
×
NEW
3555
      this.extraParams = extraParams;
×
NEW
3556
    }
×
3557

3558
    public static Builder builder() {
NEW
3559
      return new Builder();
×
3560
    }
3561

NEW
3562
    public static class Builder {
×
3563
      private Boolean enabled;
3564

3565
      private Map<String, Object> extraParams;
3566

3567
      /** Finalize and obtain parameter instance from this builder. */
3568
      public PaymentLinkUpdateParams.PhoneNumberCollection build() {
NEW
3569
        return new PaymentLinkUpdateParams.PhoneNumberCollection(this.enabled, this.extraParams);
×
3570
      }
3571

3572
      /** <strong>Required.</strong> Set to {@code true} to enable phone number collection. */
3573
      public Builder setEnabled(Boolean enabled) {
NEW
3574
        this.enabled = enabled;
×
NEW
3575
        return this;
×
3576
      }
3577

3578
      /**
3579
       * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll`
3580
       * call, and subsequent calls add additional key/value pairs to the original map. See {@link
3581
       * PaymentLinkUpdateParams.PhoneNumberCollection#extraParams} for the field documentation.
3582
       */
3583
      public Builder putExtraParam(String key, Object value) {
NEW
3584
        if (this.extraParams == null) {
×
NEW
3585
          this.extraParams = new HashMap<>();
×
3586
        }
NEW
3587
        this.extraParams.put(key, value);
×
NEW
3588
        return this;
×
3589
      }
3590

3591
      /**
3592
       * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
3593
       * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map.
3594
       * See {@link PaymentLinkUpdateParams.PhoneNumberCollection#extraParams} for the field
3595
       * documentation.
3596
       */
3597
      public Builder putAllExtraParam(Map<String, Object> map) {
NEW
3598
        if (this.extraParams == null) {
×
NEW
3599
          this.extraParams = new HashMap<>();
×
3600
        }
NEW
3601
        this.extraParams.putAll(map);
×
NEW
3602
        return this;
×
3603
      }
3604
    }
3605
  }
3606

3607
  @Getter
3608
  public static class Restrictions {
3609
    /**
3610
     * <strong>Required.</strong> Configuration for the {@code completed_sessions} restriction type.
3611
     */
3612
    @SerializedName("completed_sessions")
3613
    CompletedSessions completedSessions;
3614

3615
    /**
3616
     * Map of extra parameters for custom features not available in this client library. The content
3617
     * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each
3618
     * key/value pair is serialized as if the key is a root-level field (serialized) name in this
3619
     * param object. Effectively, this map is flattened to its parent instance.
3620
     */
3621
    @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
3622
    Map<String, Object> extraParams;
3623

3624
    private Restrictions(CompletedSessions completedSessions, Map<String, Object> extraParams) {
×
3625
      this.completedSessions = completedSessions;
×
3626
      this.extraParams = extraParams;
×
3627
    }
×
3628

3629
    public static Builder builder() {
3630
      return new Builder();
×
3631
    }
3632

3633
    public static class Builder {
×
3634
      private CompletedSessions completedSessions;
3635

3636
      private Map<String, Object> extraParams;
3637

3638
      /** Finalize and obtain parameter instance from this builder. */
3639
      public PaymentLinkUpdateParams.Restrictions build() {
3640
        return new PaymentLinkUpdateParams.Restrictions(this.completedSessions, this.extraParams);
×
3641
      }
3642

3643
      /**
3644
       * <strong>Required.</strong> Configuration for the {@code completed_sessions} restriction
3645
       * type.
3646
       */
3647
      public Builder setCompletedSessions(
3648
          PaymentLinkUpdateParams.Restrictions.CompletedSessions completedSessions) {
3649
        this.completedSessions = completedSessions;
×
3650
        return this;
×
3651
      }
3652

3653
      /**
3654
       * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll`
3655
       * call, and subsequent calls add additional key/value pairs to the original map. See {@link
3656
       * PaymentLinkUpdateParams.Restrictions#extraParams} for the field documentation.
3657
       */
3658
      public Builder putExtraParam(String key, Object value) {
3659
        if (this.extraParams == null) {
×
3660
          this.extraParams = new HashMap<>();
×
3661
        }
3662
        this.extraParams.put(key, value);
×
3663
        return this;
×
3664
      }
3665

3666
      /**
3667
       * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
3668
       * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map.
3669
       * See {@link PaymentLinkUpdateParams.Restrictions#extraParams} for the field documentation.
3670
       */
3671
      public Builder putAllExtraParam(Map<String, Object> map) {
3672
        if (this.extraParams == null) {
×
3673
          this.extraParams = new HashMap<>();
×
3674
        }
3675
        this.extraParams.putAll(map);
×
3676
        return this;
×
3677
      }
3678
    }
3679

3680
    @Getter
3681
    public static class CompletedSessions {
3682
      /**
3683
       * Map of extra parameters for custom features not available in this client library. The
3684
       * content in this map is not serialized under this field's {@code @SerializedName} value.
3685
       * Instead, each key/value pair is serialized as if the key is a root-level field (serialized)
3686
       * name in this param object. Effectively, this map is flattened to its parent instance.
3687
       */
3688
      @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
3689
      Map<String, Object> extraParams;
3690

3691
      /**
3692
       * <strong>Required.</strong> The maximum number of checkout sessions that can be completed
3693
       * for the {@code completed_sessions} restriction to be met.
3694
       */
3695
      @SerializedName("limit")
3696
      Long limit;
3697

3698
      private CompletedSessions(Map<String, Object> extraParams, Long limit) {
×
3699
        this.extraParams = extraParams;
×
3700
        this.limit = limit;
×
3701
      }
×
3702

3703
      public static Builder builder() {
3704
        return new Builder();
×
3705
      }
3706

3707
      public static class Builder {
×
3708
        private Map<String, Object> extraParams;
3709

3710
        private Long limit;
3711

3712
        /** Finalize and obtain parameter instance from this builder. */
3713
        public PaymentLinkUpdateParams.Restrictions.CompletedSessions build() {
3714
          return new PaymentLinkUpdateParams.Restrictions.CompletedSessions(
×
3715
              this.extraParams, this.limit);
3716
        }
3717

3718
        /**
3719
         * Add a key/value pair to `extraParams` map. A map is initialized for the first
3720
         * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
3721
         * map. See {@link PaymentLinkUpdateParams.Restrictions.CompletedSessions#extraParams} for
3722
         * the field documentation.
3723
         */
3724
        public Builder putExtraParam(String key, Object value) {
3725
          if (this.extraParams == null) {
×
3726
            this.extraParams = new HashMap<>();
×
3727
          }
3728
          this.extraParams.put(key, value);
×
3729
          return this;
×
3730
        }
3731

3732
        /**
3733
         * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
3734
         * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
3735
         * map. See {@link PaymentLinkUpdateParams.Restrictions.CompletedSessions#extraParams} for
3736
         * the field documentation.
3737
         */
3738
        public Builder putAllExtraParam(Map<String, Object> map) {
3739
          if (this.extraParams == null) {
×
3740
            this.extraParams = new HashMap<>();
×
3741
          }
3742
          this.extraParams.putAll(map);
×
3743
          return this;
×
3744
        }
3745

3746
        /**
3747
         * <strong>Required.</strong> The maximum number of checkout sessions that can be completed
3748
         * for the {@code completed_sessions} restriction to be met.
3749
         */
3750
        public Builder setLimit(Long limit) {
3751
          this.limit = limit;
×
3752
          return this;
×
3753
        }
3754
      }
3755
    }
3756
  }
3757

3758
  @Getter
3759
  public static class ShippingAddressCollection {
3760
    /**
3761
     * <strong>Required.</strong> An array of two-letter ISO country codes representing which
3762
     * countries Checkout should provide as options for shipping locations.
3763
     */
3764
    @SerializedName("allowed_countries")
3765
    List<PaymentLinkUpdateParams.ShippingAddressCollection.AllowedCountry> allowedCountries;
3766

3767
    /**
3768
     * Map of extra parameters for custom features not available in this client library. The content
3769
     * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each
3770
     * key/value pair is serialized as if the key is a root-level field (serialized) name in this
3771
     * param object. Effectively, this map is flattened to its parent instance.
3772
     */
3773
    @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
3774
    Map<String, Object> extraParams;
3775

3776
    private ShippingAddressCollection(
3777
        List<PaymentLinkUpdateParams.ShippingAddressCollection.AllowedCountry> allowedCountries,
3778
        Map<String, Object> extraParams) {
×
3779
      this.allowedCountries = allowedCountries;
×
3780
      this.extraParams = extraParams;
×
3781
    }
×
3782

3783
    public static Builder builder() {
3784
      return new Builder();
×
3785
    }
3786

3787
    public static class Builder {
×
3788
      private List<PaymentLinkUpdateParams.ShippingAddressCollection.AllowedCountry>
3789
          allowedCountries;
3790

3791
      private Map<String, Object> extraParams;
3792

3793
      /** Finalize and obtain parameter instance from this builder. */
3794
      public PaymentLinkUpdateParams.ShippingAddressCollection build() {
3795
        return new PaymentLinkUpdateParams.ShippingAddressCollection(
×
3796
            this.allowedCountries, this.extraParams);
3797
      }
3798

3799
      /**
3800
       * Add an element to `allowedCountries` list. A list is initialized for the first `add/addAll`
3801
       * call, and subsequent calls adds additional elements to the original list. See {@link
3802
       * PaymentLinkUpdateParams.ShippingAddressCollection#allowedCountries} for the field
3803
       * documentation.
3804
       */
3805
      public Builder addAllowedCountry(
3806
          PaymentLinkUpdateParams.ShippingAddressCollection.AllowedCountry element) {
3807
        if (this.allowedCountries == null) {
×
3808
          this.allowedCountries = new ArrayList<>();
×
3809
        }
3810
        this.allowedCountries.add(element);
×
3811
        return this;
×
3812
      }
3813

3814
      /**
3815
       * Add all elements to `allowedCountries` list. A list is initialized for the first
3816
       * `add/addAll` call, and subsequent calls adds additional elements to the original list. See
3817
       * {@link PaymentLinkUpdateParams.ShippingAddressCollection#allowedCountries} for the field
3818
       * documentation.
3819
       */
3820
      public Builder addAllAllowedCountry(
3821
          List<PaymentLinkUpdateParams.ShippingAddressCollection.AllowedCountry> elements) {
3822
        if (this.allowedCountries == null) {
×
3823
          this.allowedCountries = new ArrayList<>();
×
3824
        }
3825
        this.allowedCountries.addAll(elements);
×
3826
        return this;
×
3827
      }
3828

3829
      /**
3830
       * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll`
3831
       * call, and subsequent calls add additional key/value pairs to the original map. See {@link
3832
       * PaymentLinkUpdateParams.ShippingAddressCollection#extraParams} for the field documentation.
3833
       */
3834
      public Builder putExtraParam(String key, Object value) {
3835
        if (this.extraParams == null) {
×
3836
          this.extraParams = new HashMap<>();
×
3837
        }
3838
        this.extraParams.put(key, value);
×
3839
        return this;
×
3840
      }
3841

3842
      /**
3843
       * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
3844
       * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map.
3845
       * See {@link PaymentLinkUpdateParams.ShippingAddressCollection#extraParams} for the field
3846
       * documentation.
3847
       */
3848
      public Builder putAllExtraParam(Map<String, Object> map) {
3849
        if (this.extraParams == null) {
×
3850
          this.extraParams = new HashMap<>();
×
3851
        }
3852
        this.extraParams.putAll(map);
×
3853
        return this;
×
3854
      }
3855
    }
3856

3857
    public enum AllowedCountry implements ApiRequestParams.EnumParam {
×
3858
      @SerializedName("AC")
×
3859
      AC("AC"),
3860

3861
      @SerializedName("AD")
×
3862
      AD("AD"),
3863

3864
      @SerializedName("AE")
×
3865
      AE("AE"),
3866

3867
      @SerializedName("AF")
×
3868
      AF("AF"),
3869

3870
      @SerializedName("AG")
×
3871
      AG("AG"),
3872

3873
      @SerializedName("AI")
×
3874
      AI("AI"),
3875

3876
      @SerializedName("AL")
×
3877
      AL("AL"),
3878

3879
      @SerializedName("AM")
×
3880
      AM("AM"),
3881

3882
      @SerializedName("AO")
×
3883
      AO("AO"),
3884

3885
      @SerializedName("AQ")
×
3886
      AQ("AQ"),
3887

3888
      @SerializedName("AR")
×
3889
      AR("AR"),
3890

3891
      @SerializedName("AT")
×
3892
      AT("AT"),
3893

3894
      @SerializedName("AU")
×
3895
      AU("AU"),
3896

3897
      @SerializedName("AW")
×
3898
      AW("AW"),
3899

3900
      @SerializedName("AX")
×
3901
      AX("AX"),
3902

3903
      @SerializedName("AZ")
×
3904
      AZ("AZ"),
3905

3906
      @SerializedName("BA")
×
3907
      BA("BA"),
3908

3909
      @SerializedName("BB")
×
3910
      BB("BB"),
3911

3912
      @SerializedName("BD")
×
3913
      BD("BD"),
3914

3915
      @SerializedName("BE")
×
3916
      BE("BE"),
3917

3918
      @SerializedName("BF")
×
3919
      BF("BF"),
3920

3921
      @SerializedName("BG")
×
3922
      BG("BG"),
3923

3924
      @SerializedName("BH")
×
3925
      BH("BH"),
3926

3927
      @SerializedName("BI")
×
3928
      BI("BI"),
3929

3930
      @SerializedName("BJ")
×
3931
      BJ("BJ"),
3932

3933
      @SerializedName("BL")
×
3934
      BL("BL"),
3935

3936
      @SerializedName("BM")
×
3937
      BM("BM"),
3938

3939
      @SerializedName("BN")
×
3940
      BN("BN"),
3941

3942
      @SerializedName("BO")
×
3943
      BO("BO"),
3944

3945
      @SerializedName("BQ")
×
3946
      BQ("BQ"),
3947

3948
      @SerializedName("BR")
×
3949
      BR("BR"),
3950

3951
      @SerializedName("BS")
×
3952
      BS("BS"),
3953

3954
      @SerializedName("BT")
×
3955
      BT("BT"),
3956

3957
      @SerializedName("BV")
×
3958
      BV("BV"),
3959

3960
      @SerializedName("BW")
×
3961
      BW("BW"),
3962

3963
      @SerializedName("BY")
×
3964
      BY("BY"),
3965

3966
      @SerializedName("BZ")
×
3967
      BZ("BZ"),
3968

3969
      @SerializedName("CA")
×
3970
      CA("CA"),
3971

3972
      @SerializedName("CD")
×
3973
      CD("CD"),
3974

3975
      @SerializedName("CF")
×
3976
      CF("CF"),
3977

3978
      @SerializedName("CG")
×
3979
      CG("CG"),
3980

3981
      @SerializedName("CH")
×
3982
      CH("CH"),
3983

3984
      @SerializedName("CI")
×
3985
      CI("CI"),
3986

3987
      @SerializedName("CK")
×
3988
      CK("CK"),
3989

3990
      @SerializedName("CL")
×
3991
      CL("CL"),
3992

3993
      @SerializedName("CM")
×
3994
      CM("CM"),
3995

3996
      @SerializedName("CN")
×
3997
      CN("CN"),
3998

3999
      @SerializedName("CO")
×
4000
      CO("CO"),
4001

4002
      @SerializedName("CR")
×
4003
      CR("CR"),
4004

4005
      @SerializedName("CV")
×
4006
      CV("CV"),
4007

4008
      @SerializedName("CW")
×
4009
      CW("CW"),
4010

4011
      @SerializedName("CY")
×
4012
      CY("CY"),
4013

4014
      @SerializedName("CZ")
×
4015
      CZ("CZ"),
4016

4017
      @SerializedName("DE")
×
4018
      DE("DE"),
4019

4020
      @SerializedName("DJ")
×
4021
      DJ("DJ"),
4022

4023
      @SerializedName("DK")
×
4024
      DK("DK"),
4025

4026
      @SerializedName("DM")
×
4027
      DM("DM"),
4028

4029
      @SerializedName("DO")
×
4030
      DO("DO"),
4031

4032
      @SerializedName("DZ")
×
4033
      DZ("DZ"),
4034

4035
      @SerializedName("EC")
×
4036
      EC("EC"),
4037

4038
      @SerializedName("EE")
×
4039
      EE("EE"),
4040

4041
      @SerializedName("EG")
×
4042
      EG("EG"),
4043

4044
      @SerializedName("EH")
×
4045
      EH("EH"),
4046

4047
      @SerializedName("ER")
×
4048
      ER("ER"),
4049

4050
      @SerializedName("ES")
×
4051
      ES("ES"),
4052

4053
      @SerializedName("ET")
×
4054
      ET("ET"),
4055

4056
      @SerializedName("FI")
×
4057
      FI("FI"),
4058

4059
      @SerializedName("FJ")
×
4060
      FJ("FJ"),
4061

4062
      @SerializedName("FK")
×
4063
      FK("FK"),
4064

4065
      @SerializedName("FO")
×
4066
      FO("FO"),
4067

4068
      @SerializedName("FR")
×
4069
      FR("FR"),
4070

4071
      @SerializedName("GA")
×
4072
      GA("GA"),
4073

4074
      @SerializedName("GB")
×
4075
      GB("GB"),
4076

4077
      @SerializedName("GD")
×
4078
      GD("GD"),
4079

4080
      @SerializedName("GE")
×
4081
      GE("GE"),
4082

4083
      @SerializedName("GF")
×
4084
      GF("GF"),
4085

4086
      @SerializedName("GG")
×
4087
      GG("GG"),
4088

4089
      @SerializedName("GH")
×
4090
      GH("GH"),
4091

4092
      @SerializedName("GI")
×
4093
      GI("GI"),
4094

4095
      @SerializedName("GL")
×
4096
      GL("GL"),
4097

4098
      @SerializedName("GM")
×
4099
      GM("GM"),
4100

4101
      @SerializedName("GN")
×
4102
      GN("GN"),
4103

4104
      @SerializedName("GP")
×
4105
      GP("GP"),
4106

4107
      @SerializedName("GQ")
×
4108
      GQ("GQ"),
4109

4110
      @SerializedName("GR")
×
4111
      GR("GR"),
4112

4113
      @SerializedName("GS")
×
4114
      GS("GS"),
4115

4116
      @SerializedName("GT")
×
4117
      GT("GT"),
4118

4119
      @SerializedName("GU")
×
4120
      GU("GU"),
4121

4122
      @SerializedName("GW")
×
4123
      GW("GW"),
4124

4125
      @SerializedName("GY")
×
4126
      GY("GY"),
4127

4128
      @SerializedName("HK")
×
4129
      HK("HK"),
4130

4131
      @SerializedName("HN")
×
4132
      HN("HN"),
4133

4134
      @SerializedName("HR")
×
4135
      HR("HR"),
4136

4137
      @SerializedName("HT")
×
4138
      HT("HT"),
4139

4140
      @SerializedName("HU")
×
4141
      HU("HU"),
4142

4143
      @SerializedName("ID")
×
4144
      ID("ID"),
4145

4146
      @SerializedName("IE")
×
4147
      IE("IE"),
4148

4149
      @SerializedName("IL")
×
4150
      IL("IL"),
4151

4152
      @SerializedName("IM")
×
4153
      IM("IM"),
4154

4155
      @SerializedName("IN")
×
4156
      IN("IN"),
4157

4158
      @SerializedName("IO")
×
4159
      IO("IO"),
4160

4161
      @SerializedName("IQ")
×
4162
      IQ("IQ"),
4163

4164
      @SerializedName("IS")
×
4165
      IS("IS"),
4166

4167
      @SerializedName("IT")
×
4168
      IT("IT"),
4169

4170
      @SerializedName("JE")
×
4171
      JE("JE"),
4172

4173
      @SerializedName("JM")
×
4174
      JM("JM"),
4175

4176
      @SerializedName("JO")
×
4177
      JO("JO"),
4178

4179
      @SerializedName("JP")
×
4180
      JP("JP"),
4181

4182
      @SerializedName("KE")
×
4183
      KE("KE"),
4184

4185
      @SerializedName("KG")
×
4186
      KG("KG"),
4187

4188
      @SerializedName("KH")
×
4189
      KH("KH"),
4190

4191
      @SerializedName("KI")
×
4192
      KI("KI"),
4193

4194
      @SerializedName("KM")
×
4195
      KM("KM"),
4196

4197
      @SerializedName("KN")
×
4198
      KN("KN"),
4199

4200
      @SerializedName("KR")
×
4201
      KR("KR"),
4202

4203
      @SerializedName("KW")
×
4204
      KW("KW"),
4205

4206
      @SerializedName("KY")
×
4207
      KY("KY"),
4208

4209
      @SerializedName("KZ")
×
4210
      KZ("KZ"),
4211

4212
      @SerializedName("LA")
×
4213
      LA("LA"),
4214

4215
      @SerializedName("LB")
×
4216
      LB("LB"),
4217

4218
      @SerializedName("LC")
×
4219
      LC("LC"),
4220

4221
      @SerializedName("LI")
×
4222
      LI("LI"),
4223

4224
      @SerializedName("LK")
×
4225
      LK("LK"),
4226

4227
      @SerializedName("LR")
×
4228
      LR("LR"),
4229

4230
      @SerializedName("LS")
×
4231
      LS("LS"),
4232

4233
      @SerializedName("LT")
×
4234
      LT("LT"),
4235

4236
      @SerializedName("LU")
×
4237
      LU("LU"),
4238

4239
      @SerializedName("LV")
×
4240
      LV("LV"),
4241

4242
      @SerializedName("LY")
×
4243
      LY("LY"),
4244

4245
      @SerializedName("MA")
×
4246
      MA("MA"),
4247

4248
      @SerializedName("MC")
×
4249
      MC("MC"),
4250

4251
      @SerializedName("MD")
×
4252
      MD("MD"),
4253

4254
      @SerializedName("ME")
×
4255
      ME("ME"),
4256

4257
      @SerializedName("MF")
×
4258
      MF("MF"),
4259

4260
      @SerializedName("MG")
×
4261
      MG("MG"),
4262

4263
      @SerializedName("MK")
×
4264
      MK("MK"),
4265

4266
      @SerializedName("ML")
×
4267
      ML("ML"),
4268

4269
      @SerializedName("MM")
×
4270
      MM("MM"),
4271

4272
      @SerializedName("MN")
×
4273
      MN("MN"),
4274

4275
      @SerializedName("MO")
×
4276
      MO("MO"),
4277

4278
      @SerializedName("MQ")
×
4279
      MQ("MQ"),
4280

4281
      @SerializedName("MR")
×
4282
      MR("MR"),
4283

4284
      @SerializedName("MS")
×
4285
      MS("MS"),
4286

4287
      @SerializedName("MT")
×
4288
      MT("MT"),
4289

4290
      @SerializedName("MU")
×
4291
      MU("MU"),
4292

4293
      @SerializedName("MV")
×
4294
      MV("MV"),
4295

4296
      @SerializedName("MW")
×
4297
      MW("MW"),
4298

4299
      @SerializedName("MX")
×
4300
      MX("MX"),
4301

4302
      @SerializedName("MY")
×
4303
      MY("MY"),
4304

4305
      @SerializedName("MZ")
×
4306
      MZ("MZ"),
4307

4308
      @SerializedName("NA")
×
4309
      NA("NA"),
4310

4311
      @SerializedName("NC")
×
4312
      NC("NC"),
4313

4314
      @SerializedName("NE")
×
4315
      NE("NE"),
4316

4317
      @SerializedName("NG")
×
4318
      NG("NG"),
4319

4320
      @SerializedName("NI")
×
4321
      NI("NI"),
4322

4323
      @SerializedName("NL")
×
4324
      NL("NL"),
4325

4326
      @SerializedName("NO")
×
4327
      NO("NO"),
4328

4329
      @SerializedName("NP")
×
4330
      NP("NP"),
4331

4332
      @SerializedName("NR")
×
4333
      NR("NR"),
4334

4335
      @SerializedName("NU")
×
4336
      NU("NU"),
4337

4338
      @SerializedName("NZ")
×
4339
      NZ("NZ"),
4340

4341
      @SerializedName("OM")
×
4342
      OM("OM"),
4343

4344
      @SerializedName("PA")
×
4345
      PA("PA"),
4346

4347
      @SerializedName("PE")
×
4348
      PE("PE"),
4349

4350
      @SerializedName("PF")
×
4351
      PF("PF"),
4352

4353
      @SerializedName("PG")
×
4354
      PG("PG"),
4355

4356
      @SerializedName("PH")
×
4357
      PH("PH"),
4358

4359
      @SerializedName("PK")
×
4360
      PK("PK"),
4361

4362
      @SerializedName("PL")
×
4363
      PL("PL"),
4364

4365
      @SerializedName("PM")
×
4366
      PM("PM"),
4367

4368
      @SerializedName("PN")
×
4369
      PN("PN"),
4370

4371
      @SerializedName("PR")
×
4372
      PR("PR"),
4373

4374
      @SerializedName("PS")
×
4375
      PS("PS"),
4376

4377
      @SerializedName("PT")
×
4378
      PT("PT"),
4379

4380
      @SerializedName("PY")
×
4381
      PY("PY"),
4382

4383
      @SerializedName("QA")
×
4384
      QA("QA"),
4385

4386
      @SerializedName("RE")
×
4387
      RE("RE"),
4388

4389
      @SerializedName("RO")
×
4390
      RO("RO"),
4391

4392
      @SerializedName("RS")
×
4393
      RS("RS"),
4394

4395
      @SerializedName("RU")
×
4396
      RU("RU"),
4397

4398
      @SerializedName("RW")
×
4399
      RW("RW"),
4400

4401
      @SerializedName("SA")
×
4402
      SA("SA"),
4403

4404
      @SerializedName("SB")
×
4405
      SB("SB"),
4406

4407
      @SerializedName("SC")
×
4408
      SC("SC"),
4409

4410
      @SerializedName("SE")
×
4411
      SE("SE"),
4412

4413
      @SerializedName("SG")
×
4414
      SG("SG"),
4415

4416
      @SerializedName("SH")
×
4417
      SH("SH"),
4418

4419
      @SerializedName("SI")
×
4420
      SI("SI"),
4421

4422
      @SerializedName("SJ")
×
4423
      SJ("SJ"),
4424

4425
      @SerializedName("SK")
×
4426
      SK("SK"),
4427

4428
      @SerializedName("SL")
×
4429
      SL("SL"),
4430

4431
      @SerializedName("SM")
×
4432
      SM("SM"),
4433

4434
      @SerializedName("SN")
×
4435
      SN("SN"),
4436

4437
      @SerializedName("SO")
×
4438
      SO("SO"),
4439

4440
      @SerializedName("SR")
×
4441
      SR("SR"),
4442

4443
      @SerializedName("SS")
×
4444
      SS("SS"),
4445

4446
      @SerializedName("ST")
×
4447
      ST("ST"),
4448

4449
      @SerializedName("SV")
×
4450
      SV("SV"),
4451

4452
      @SerializedName("SX")
×
4453
      SX("SX"),
4454

4455
      @SerializedName("SZ")
×
4456
      SZ("SZ"),
4457

4458
      @SerializedName("TA")
×
4459
      TA("TA"),
4460

4461
      @SerializedName("TC")
×
4462
      TC("TC"),
4463

4464
      @SerializedName("TD")
×
4465
      TD("TD"),
4466

4467
      @SerializedName("TF")
×
4468
      TF("TF"),
4469

4470
      @SerializedName("TG")
×
4471
      TG("TG"),
4472

4473
      @SerializedName("TH")
×
4474
      TH("TH"),
4475

4476
      @SerializedName("TJ")
×
4477
      TJ("TJ"),
4478

4479
      @SerializedName("TK")
×
4480
      TK("TK"),
4481

4482
      @SerializedName("TL")
×
4483
      TL("TL"),
4484

4485
      @SerializedName("TM")
×
4486
      TM("TM"),
4487

4488
      @SerializedName("TN")
×
4489
      TN("TN"),
4490

4491
      @SerializedName("TO")
×
4492
      TO("TO"),
4493

4494
      @SerializedName("TR")
×
4495
      TR("TR"),
4496

4497
      @SerializedName("TT")
×
4498
      TT("TT"),
4499

4500
      @SerializedName("TV")
×
4501
      TV("TV"),
4502

4503
      @SerializedName("TW")
×
4504
      TW("TW"),
4505

4506
      @SerializedName("TZ")
×
4507
      TZ("TZ"),
4508

4509
      @SerializedName("UA")
×
4510
      UA("UA"),
4511

4512
      @SerializedName("UG")
×
4513
      UG("UG"),
4514

4515
      @SerializedName("US")
×
4516
      US("US"),
4517

4518
      @SerializedName("UY")
×
4519
      UY("UY"),
4520

4521
      @SerializedName("UZ")
×
4522
      UZ("UZ"),
4523

4524
      @SerializedName("VA")
×
4525
      VA("VA"),
4526

4527
      @SerializedName("VC")
×
4528
      VC("VC"),
4529

4530
      @SerializedName("VE")
×
4531
      VE("VE"),
4532

4533
      @SerializedName("VG")
×
4534
      VG("VG"),
4535

4536
      @SerializedName("VN")
×
4537
      VN("VN"),
4538

4539
      @SerializedName("VU")
×
4540
      VU("VU"),
4541

4542
      @SerializedName("WF")
×
4543
      WF("WF"),
4544

4545
      @SerializedName("WS")
×
4546
      WS("WS"),
4547

4548
      @SerializedName("XK")
×
4549
      XK("XK"),
4550

4551
      @SerializedName("YE")
×
4552
      YE("YE"),
4553

4554
      @SerializedName("YT")
×
4555
      YT("YT"),
4556

4557
      @SerializedName("ZA")
×
4558
      ZA("ZA"),
4559

4560
      @SerializedName("ZM")
×
4561
      ZM("ZM"),
4562

4563
      @SerializedName("ZW")
×
4564
      ZW("ZW"),
4565

4566
      @SerializedName("ZZ")
×
4567
      ZZ("ZZ");
4568

4569
      @Getter(onMethod_ = {@Override})
4570
      private final String value;
4571

4572
      AllowedCountry(String value) {
×
4573
        this.value = value;
×
4574
      }
×
4575
    }
4576
  }
4577

4578
  @Getter
4579
  public static class SubscriptionData {
4580
    /**
4581
     * Map of extra parameters for custom features not available in this client library. The content
4582
     * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each
4583
     * key/value pair is serialized as if the key is a root-level field (serialized) name in this
4584
     * param object. Effectively, this map is flattened to its parent instance.
4585
     */
4586
    @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
4587
    Map<String, Object> extraParams;
4588

4589
    /** All invoices will be billed using the specified settings. */
4590
    @SerializedName("invoice_settings")
4591
    InvoiceSettings invoiceSettings;
4592

4593
    /**
4594
     * Set of <a href="https://stripe.com/docs/api/metadata">key-value pairs</a> that will
4595
     * declaratively set metadata on <a
4596
     * href="https://stripe.com/docs/api/subscriptions">Subscriptions</a> generated from this
4597
     * payment link. Unlike object-level metadata, this field is declarative. Updates will clear
4598
     * prior values.
4599
     */
4600
    @SerializedName("metadata")
4601
    Object metadata;
4602

4603
    /**
4604
     * Integer representing the number of trial period days before the customer is charged for the
4605
     * first time. Has to be at least 1.
4606
     */
4607
    @SerializedName("trial_period_days")
4608
    Object trialPeriodDays;
4609

4610
    /** Settings related to subscription trials. */
4611
    @SerializedName("trial_settings")
4612
    Object trialSettings;
4613

4614
    private SubscriptionData(
4615
        Map<String, Object> extraParams,
4616
        InvoiceSettings invoiceSettings,
4617
        Object metadata,
4618
        Object trialPeriodDays,
4619
        Object trialSettings) {
×
4620
      this.extraParams = extraParams;
×
4621
      this.invoiceSettings = invoiceSettings;
×
4622
      this.metadata = metadata;
×
4623
      this.trialPeriodDays = trialPeriodDays;
×
4624
      this.trialSettings = trialSettings;
×
4625
    }
×
4626

4627
    public static Builder builder() {
4628
      return new Builder();
×
4629
    }
4630

4631
    public static class Builder {
×
4632
      private Map<String, Object> extraParams;
4633

4634
      private InvoiceSettings invoiceSettings;
4635

4636
      private Object metadata;
4637

4638
      private Object trialPeriodDays;
4639

4640
      private Object trialSettings;
4641

4642
      /** Finalize and obtain parameter instance from this builder. */
4643
      public PaymentLinkUpdateParams.SubscriptionData build() {
4644
        return new PaymentLinkUpdateParams.SubscriptionData(
×
4645
            this.extraParams,
4646
            this.invoiceSettings,
4647
            this.metadata,
4648
            this.trialPeriodDays,
4649
            this.trialSettings);
4650
      }
4651

4652
      /**
4653
       * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll`
4654
       * call, and subsequent calls add additional key/value pairs to the original map. See {@link
4655
       * PaymentLinkUpdateParams.SubscriptionData#extraParams} for the field documentation.
4656
       */
4657
      public Builder putExtraParam(String key, Object value) {
4658
        if (this.extraParams == null) {
×
4659
          this.extraParams = new HashMap<>();
×
4660
        }
4661
        this.extraParams.put(key, value);
×
4662
        return this;
×
4663
      }
4664

4665
      /**
4666
       * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
4667
       * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map.
4668
       * See {@link PaymentLinkUpdateParams.SubscriptionData#extraParams} for the field
4669
       * documentation.
4670
       */
4671
      public Builder putAllExtraParam(Map<String, Object> map) {
4672
        if (this.extraParams == null) {
×
4673
          this.extraParams = new HashMap<>();
×
4674
        }
4675
        this.extraParams.putAll(map);
×
4676
        return this;
×
4677
      }
4678

4679
      /** All invoices will be billed using the specified settings. */
4680
      public Builder setInvoiceSettings(
4681
          PaymentLinkUpdateParams.SubscriptionData.InvoiceSettings invoiceSettings) {
4682
        this.invoiceSettings = invoiceSettings;
×
4683
        return this;
×
4684
      }
4685

4686
      /**
4687
       * Add a key/value pair to `metadata` map. A map is initialized for the first `put/putAll`
4688
       * call, and subsequent calls add additional key/value pairs to the original map. See {@link
4689
       * PaymentLinkUpdateParams.SubscriptionData#metadata} for the field documentation.
4690
       */
4691
      @SuppressWarnings("unchecked")
4692
      public Builder putMetadata(String key, String value) {
4693
        if (this.metadata == null || this.metadata instanceof EmptyParam) {
×
4694
          this.metadata = new HashMap<String, String>();
×
4695
        }
4696
        ((Map<String, String>) this.metadata).put(key, value);
×
4697
        return this;
×
4698
      }
4699

4700
      /**
4701
       * Add all map key/value pairs to `metadata` map. A map is initialized for the first
4702
       * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map.
4703
       * See {@link PaymentLinkUpdateParams.SubscriptionData#metadata} for the field documentation.
4704
       */
4705
      @SuppressWarnings("unchecked")
4706
      public Builder putAllMetadata(Map<String, String> map) {
4707
        if (this.metadata == null || this.metadata instanceof EmptyParam) {
×
4708
          this.metadata = new HashMap<String, String>();
×
4709
        }
4710
        ((Map<String, String>) this.metadata).putAll(map);
×
4711
        return this;
×
4712
      }
4713

4714
      /**
4715
       * Set of <a href="https://stripe.com/docs/api/metadata">key-value pairs</a> that will
4716
       * declaratively set metadata on <a
4717
       * href="https://stripe.com/docs/api/subscriptions">Subscriptions</a> generated from this
4718
       * payment link. Unlike object-level metadata, this field is declarative. Updates will clear
4719
       * prior values.
4720
       */
4721
      public Builder setMetadata(EmptyParam metadata) {
4722
        this.metadata = metadata;
×
4723
        return this;
×
4724
      }
4725

4726
      /**
4727
       * Set of <a href="https://stripe.com/docs/api/metadata">key-value pairs</a> that will
4728
       * declaratively set metadata on <a
4729
       * href="https://stripe.com/docs/api/subscriptions">Subscriptions</a> generated from this
4730
       * payment link. Unlike object-level metadata, this field is declarative. Updates will clear
4731
       * prior values.
4732
       */
4733
      public Builder setMetadata(Map<String, String> metadata) {
4734
        this.metadata = metadata;
×
4735
        return this;
×
4736
      }
4737

4738
      /**
4739
       * Integer representing the number of trial period days before the customer is charged for the
4740
       * first time. Has to be at least 1.
4741
       */
4742
      public Builder setTrialPeriodDays(Long trialPeriodDays) {
4743
        this.trialPeriodDays = trialPeriodDays;
×
4744
        return this;
×
4745
      }
4746

4747
      /**
4748
       * Integer representing the number of trial period days before the customer is charged for the
4749
       * first time. Has to be at least 1.
4750
       */
4751
      public Builder setTrialPeriodDays(EmptyParam trialPeriodDays) {
4752
        this.trialPeriodDays = trialPeriodDays;
×
4753
        return this;
×
4754
      }
4755

4756
      /** Settings related to subscription trials. */
4757
      public Builder setTrialSettings(
4758
          PaymentLinkUpdateParams.SubscriptionData.TrialSettings trialSettings) {
4759
        this.trialSettings = trialSettings;
×
4760
        return this;
×
4761
      }
4762

4763
      /** Settings related to subscription trials. */
4764
      public Builder setTrialSettings(EmptyParam trialSettings) {
4765
        this.trialSettings = trialSettings;
×
4766
        return this;
×
4767
      }
4768
    }
4769

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

4781
      /**
4782
       * The connected account that issues the invoice. The invoice is presented with the branding
4783
       * and support information of the specified account.
4784
       */
4785
      @SerializedName("issuer")
4786
      Issuer issuer;
4787

4788
      private InvoiceSettings(Map<String, Object> extraParams, Issuer issuer) {
×
4789
        this.extraParams = extraParams;
×
4790
        this.issuer = issuer;
×
4791
      }
×
4792

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

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

4800
        private Issuer issuer;
4801

4802
        /** Finalize and obtain parameter instance from this builder. */
4803
        public PaymentLinkUpdateParams.SubscriptionData.InvoiceSettings build() {
4804
          return new PaymentLinkUpdateParams.SubscriptionData.InvoiceSettings(
×
4805
              this.extraParams, this.issuer);
4806
        }
4807

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

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

4836
        /**
4837
         * The connected account that issues the invoice. The invoice is presented with the branding
4838
         * and support information of the specified account.
4839
         */
4840
        public Builder setIssuer(
4841
            PaymentLinkUpdateParams.SubscriptionData.InvoiceSettings.Issuer issuer) {
4842
          this.issuer = issuer;
×
4843
          return this;
×
4844
        }
4845
      }
4846

4847
      @Getter
4848
      public static class Issuer {
4849
        /** The connected account being referenced when {@code type} is {@code account}. */
4850
        @SerializedName("account")
4851
        Object account;
4852

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

4863
        /** <strong>Required.</strong> Type of the account referenced in the request. */
4864
        @SerializedName("type")
4865
        Type type;
4866

4867
        private Issuer(Object account, Map<String, Object> extraParams, Type type) {
×
4868
          this.account = account;
×
4869
          this.extraParams = extraParams;
×
4870
          this.type = type;
×
4871
        }
×
4872

4873
        public static Builder builder() {
4874
          return new Builder();
×
4875
        }
4876

4877
        public static class Builder {
×
4878
          private Object account;
4879

4880
          private Map<String, Object> extraParams;
4881

4882
          private Type type;
4883

4884
          /** Finalize and obtain parameter instance from this builder. */
4885
          public PaymentLinkUpdateParams.SubscriptionData.InvoiceSettings.Issuer build() {
4886
            return new PaymentLinkUpdateParams.SubscriptionData.InvoiceSettings.Issuer(
×
4887
                this.account, this.extraParams, this.type);
4888
          }
4889

4890
          /** The connected account being referenced when {@code type} is {@code account}. */
4891
          public Builder setAccount(String account) {
4892
            this.account = account;
×
4893
            return this;
×
4894
          }
4895

4896
          /** The connected account being referenced when {@code type} is {@code account}. */
4897
          public Builder setAccount(EmptyParam account) {
4898
            this.account = account;
×
4899
            return this;
×
4900
          }
4901

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

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

4932
          /** <strong>Required.</strong> Type of the account referenced in the request. */
4933
          public Builder setType(
4934
              PaymentLinkUpdateParams.SubscriptionData.InvoiceSettings.Issuer.Type type) {
4935
            this.type = type;
×
4936
            return this;
×
4937
          }
4938
        }
4939

4940
        public enum Type implements ApiRequestParams.EnumParam {
×
4941
          @SerializedName("account")
×
4942
          ACCOUNT("account"),
4943

4944
          @SerializedName("self")
×
4945
          SELF("self");
4946

4947
          @Getter(onMethod_ = {@Override})
4948
          private final String value;
4949

4950
          Type(String value) {
×
4951
            this.value = value;
×
4952
          }
×
4953
        }
4954
      }
4955
    }
4956

4957
    @Getter
4958
    public static class TrialSettings {
4959
      /**
4960
       * <strong>Required.</strong> Defines how the subscription should behave when the user's free
4961
       * trial ends.
4962
       */
4963
      @SerializedName("end_behavior")
4964
      EndBehavior endBehavior;
4965

4966
      /**
4967
       * Map of extra parameters for custom features not available in this client library. The
4968
       * content in this map is not serialized under this field's {@code @SerializedName} value.
4969
       * Instead, each key/value pair is serialized as if the key is a root-level field (serialized)
4970
       * name in this param object. Effectively, this map is flattened to its parent instance.
4971
       */
4972
      @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
4973
      Map<String, Object> extraParams;
4974

4975
      private TrialSettings(EndBehavior endBehavior, Map<String, Object> extraParams) {
×
4976
        this.endBehavior = endBehavior;
×
4977
        this.extraParams = extraParams;
×
4978
      }
×
4979

4980
      public static Builder builder() {
4981
        return new Builder();
×
4982
      }
4983

4984
      public static class Builder {
×
4985
        private EndBehavior endBehavior;
4986

4987
        private Map<String, Object> extraParams;
4988

4989
        /** Finalize and obtain parameter instance from this builder. */
4990
        public PaymentLinkUpdateParams.SubscriptionData.TrialSettings build() {
4991
          return new PaymentLinkUpdateParams.SubscriptionData.TrialSettings(
×
4992
              this.endBehavior, this.extraParams);
4993
        }
4994

4995
        /**
4996
         * <strong>Required.</strong> Defines how the subscription should behave when the user's
4997
         * free trial ends.
4998
         */
4999
        public Builder setEndBehavior(
5000
            PaymentLinkUpdateParams.SubscriptionData.TrialSettings.EndBehavior endBehavior) {
5001
          this.endBehavior = endBehavior;
×
5002
          return this;
×
5003
        }
5004

5005
        /**
5006
         * Add a key/value pair to `extraParams` map. A map is initialized for the first
5007
         * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
5008
         * map. See {@link PaymentLinkUpdateParams.SubscriptionData.TrialSettings#extraParams} for
5009
         * the field documentation.
5010
         */
5011
        public Builder putExtraParam(String key, Object value) {
5012
          if (this.extraParams == null) {
×
5013
            this.extraParams = new HashMap<>();
×
5014
          }
5015
          this.extraParams.put(key, value);
×
5016
          return this;
×
5017
        }
5018

5019
        /**
5020
         * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
5021
         * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
5022
         * map. See {@link PaymentLinkUpdateParams.SubscriptionData.TrialSettings#extraParams} for
5023
         * the field documentation.
5024
         */
5025
        public Builder putAllExtraParam(Map<String, Object> map) {
5026
          if (this.extraParams == null) {
×
5027
            this.extraParams = new HashMap<>();
×
5028
          }
5029
          this.extraParams.putAll(map);
×
5030
          return this;
×
5031
        }
5032
      }
5033

5034
      @Getter
5035
      public static class EndBehavior {
5036
        /**
5037
         * Map of extra parameters for custom features not available in this client library. The
5038
         * content in this map is not serialized under this field's {@code @SerializedName} value.
5039
         * Instead, each key/value pair is serialized as if the key is a root-level field
5040
         * (serialized) name in this param object. Effectively, this map is flattened to its parent
5041
         * instance.
5042
         */
5043
        @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
5044
        Map<String, Object> extraParams;
5045

5046
        /**
5047
         * <strong>Required.</strong> Indicates how the subscription should change when the trial
5048
         * ends if the user did not provide a payment method.
5049
         */
5050
        @SerializedName("missing_payment_method")
5051
        MissingPaymentMethod missingPaymentMethod;
5052

5053
        private EndBehavior(
5054
            Map<String, Object> extraParams, MissingPaymentMethod missingPaymentMethod) {
×
5055
          this.extraParams = extraParams;
×
5056
          this.missingPaymentMethod = missingPaymentMethod;
×
5057
        }
×
5058

5059
        public static Builder builder() {
5060
          return new Builder();
×
5061
        }
5062

5063
        public static class Builder {
×
5064
          private Map<String, Object> extraParams;
5065

5066
          private MissingPaymentMethod missingPaymentMethod;
5067

5068
          /** Finalize and obtain parameter instance from this builder. */
5069
          public PaymentLinkUpdateParams.SubscriptionData.TrialSettings.EndBehavior build() {
5070
            return new PaymentLinkUpdateParams.SubscriptionData.TrialSettings.EndBehavior(
×
5071
                this.extraParams, this.missingPaymentMethod);
5072
          }
5073

5074
          /**
5075
           * Add a key/value pair to `extraParams` map. A map is initialized for the first
5076
           * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
5077
           * map. See {@link
5078
           * PaymentLinkUpdateParams.SubscriptionData.TrialSettings.EndBehavior#extraParams} for the
5079
           * field documentation.
5080
           */
5081
          public Builder putExtraParam(String key, Object value) {
5082
            if (this.extraParams == null) {
×
5083
              this.extraParams = new HashMap<>();
×
5084
            }
5085
            this.extraParams.put(key, value);
×
5086
            return this;
×
5087
          }
5088

5089
          /**
5090
           * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
5091
           * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
5092
           * map. See {@link
5093
           * PaymentLinkUpdateParams.SubscriptionData.TrialSettings.EndBehavior#extraParams} for the
5094
           * field documentation.
5095
           */
5096
          public Builder putAllExtraParam(Map<String, Object> map) {
5097
            if (this.extraParams == null) {
×
5098
              this.extraParams = new HashMap<>();
×
5099
            }
5100
            this.extraParams.putAll(map);
×
5101
            return this;
×
5102
          }
5103

5104
          /**
5105
           * <strong>Required.</strong> Indicates how the subscription should change when the trial
5106
           * ends if the user did not provide a payment method.
5107
           */
5108
          public Builder setMissingPaymentMethod(
5109
              PaymentLinkUpdateParams.SubscriptionData.TrialSettings.EndBehavior
5110
                      .MissingPaymentMethod
5111
                  missingPaymentMethod) {
5112
            this.missingPaymentMethod = missingPaymentMethod;
×
5113
            return this;
×
5114
          }
5115
        }
5116

5117
        public enum MissingPaymentMethod implements ApiRequestParams.EnumParam {
×
5118
          @SerializedName("cancel")
×
5119
          CANCEL("cancel"),
5120

5121
          @SerializedName("create_invoice")
×
5122
          CREATE_INVOICE("create_invoice"),
5123

5124
          @SerializedName("pause")
×
5125
          PAUSE("pause");
5126

5127
          @Getter(onMethod_ = {@Override})
5128
          private final String value;
5129

5130
          MissingPaymentMethod(String value) {
×
5131
            this.value = value;
×
5132
          }
×
5133
        }
5134
      }
5135
    }
5136
  }
5137

5138
  @Getter
5139
  public static class TaxIdCollection {
5140
    /**
5141
     * <strong>Required.</strong> Enable tax ID collection during checkout. Defaults to {@code
5142
     * false}.
5143
     */
5144
    @SerializedName("enabled")
5145
    Boolean enabled;
5146

5147
    /**
5148
     * Map of extra parameters for custom features not available in this client library. The content
5149
     * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each
5150
     * key/value pair is serialized as if the key is a root-level field (serialized) name in this
5151
     * param object. Effectively, this map is flattened to its parent instance.
5152
     */
5153
    @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
5154
    Map<String, Object> extraParams;
5155

5156
    /** Describes whether a tax ID is required during checkout. Defaults to {@code never}. */
5157
    @SerializedName("required")
5158
    Required required;
5159

5160
    private TaxIdCollection(Boolean enabled, Map<String, Object> extraParams, Required required) {
×
5161
      this.enabled = enabled;
×
5162
      this.extraParams = extraParams;
×
5163
      this.required = required;
×
5164
    }
×
5165

5166
    public static Builder builder() {
5167
      return new Builder();
×
5168
    }
5169

5170
    public static class Builder {
×
5171
      private Boolean enabled;
5172

5173
      private Map<String, Object> extraParams;
5174

5175
      private Required required;
5176

5177
      /** Finalize and obtain parameter instance from this builder. */
5178
      public PaymentLinkUpdateParams.TaxIdCollection build() {
5179
        return new PaymentLinkUpdateParams.TaxIdCollection(
×
5180
            this.enabled, this.extraParams, this.required);
5181
      }
5182

5183
      /**
5184
       * <strong>Required.</strong> Enable tax ID collection during checkout. Defaults to {@code
5185
       * false}.
5186
       */
5187
      public Builder setEnabled(Boolean enabled) {
5188
        this.enabled = enabled;
×
5189
        return this;
×
5190
      }
5191

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

5205
      /**
5206
       * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
5207
       * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map.
5208
       * See {@link PaymentLinkUpdateParams.TaxIdCollection#extraParams} for the field
5209
       * documentation.
5210
       */
5211
      public Builder putAllExtraParam(Map<String, Object> map) {
5212
        if (this.extraParams == null) {
×
5213
          this.extraParams = new HashMap<>();
×
5214
        }
5215
        this.extraParams.putAll(map);
×
5216
        return this;
×
5217
      }
5218

5219
      /** Describes whether a tax ID is required during checkout. Defaults to {@code never}. */
5220
      public Builder setRequired(PaymentLinkUpdateParams.TaxIdCollection.Required required) {
5221
        this.required = required;
×
5222
        return this;
×
5223
      }
5224
    }
5225

5226
    public enum Required implements ApiRequestParams.EnumParam {
×
5227
      @SerializedName("if_supported")
×
5228
      IF_SUPPORTED("if_supported"),
5229

5230
      @SerializedName("never")
×
5231
      NEVER("never");
5232

5233
      @Getter(onMethod_ = {@Override})
5234
      private final String value;
5235

5236
      Required(String value) {
×
5237
        this.value = value;
×
5238
      }
×
5239
    }
5240
  }
5241

5242
  public enum BillingAddressCollection implements ApiRequestParams.EnumParam {
×
5243
    @SerializedName("auto")
×
5244
    AUTO("auto"),
5245

5246
    @SerializedName("required")
×
5247
    REQUIRED("required");
5248

5249
    @Getter(onMethod_ = {@Override})
5250
    private final String value;
5251

5252
    BillingAddressCollection(String value) {
×
5253
      this.value = value;
×
5254
    }
×
5255
  }
5256

5257
  public enum CustomerCreation implements ApiRequestParams.EnumParam {
×
5258
    @SerializedName("always")
×
5259
    ALWAYS("always"),
5260

5261
    @SerializedName("if_required")
×
5262
    IF_REQUIRED("if_required");
5263

5264
    @Getter(onMethod_ = {@Override})
5265
    private final String value;
5266

5267
    CustomerCreation(String value) {
×
5268
      this.value = value;
×
5269
    }
×
5270
  }
5271

5272
  public enum PaymentMethodCollection implements ApiRequestParams.EnumParam {
×
5273
    @SerializedName("always")
×
5274
    ALWAYS("always"),
5275

5276
    @SerializedName("if_required")
×
5277
    IF_REQUIRED("if_required");
5278

5279
    @Getter(onMethod_ = {@Override})
5280
    private final String value;
5281

5282
    PaymentMethodCollection(String value) {
×
5283
      this.value = value;
×
5284
    }
×
5285
  }
5286

5287
  public enum PaymentMethodType implements ApiRequestParams.EnumParam {
×
5288
    @SerializedName("affirm")
×
5289
    AFFIRM("affirm"),
5290

5291
    @SerializedName("afterpay_clearpay")
×
5292
    AFTERPAY_CLEARPAY("afterpay_clearpay"),
5293

5294
    @SerializedName("alipay")
×
5295
    ALIPAY("alipay"),
5296

5297
    @SerializedName("alma")
×
5298
    ALMA("alma"),
5299

5300
    @SerializedName("au_becs_debit")
×
5301
    AU_BECS_DEBIT("au_becs_debit"),
5302

5303
    @SerializedName("bacs_debit")
×
5304
    BACS_DEBIT("bacs_debit"),
5305

5306
    @SerializedName("bancontact")
×
5307
    BANCONTACT("bancontact"),
5308

5309
    @SerializedName("blik")
×
5310
    BLIK("blik"),
5311

5312
    @SerializedName("boleto")
×
5313
    BOLETO("boleto"),
5314

5315
    @SerializedName("card")
×
5316
    CARD("card"),
5317

5318
    @SerializedName("cashapp")
×
5319
    CASHAPP("cashapp"),
5320

5321
    @SerializedName("eps")
×
5322
    EPS("eps"),
5323

5324
    @SerializedName("fpx")
×
5325
    FPX("fpx"),
5326

5327
    @SerializedName("giropay")
×
5328
    GIROPAY("giropay"),
5329

5330
    @SerializedName("gopay")
×
5331
    GOPAY("gopay"),
5332

5333
    @SerializedName("grabpay")
×
5334
    GRABPAY("grabpay"),
5335

5336
    @SerializedName("ideal")
×
5337
    IDEAL("ideal"),
5338

5339
    @SerializedName("klarna")
×
5340
    KLARNA("klarna"),
5341

5342
    @SerializedName("konbini")
×
5343
    KONBINI("konbini"),
5344

5345
    @SerializedName("link")
×
5346
    LINK("link"),
5347

5348
    @SerializedName("mb_way")
×
5349
    MB_WAY("mb_way"),
5350

5351
    @SerializedName("mobilepay")
×
5352
    MOBILEPAY("mobilepay"),
5353

5354
    @SerializedName("multibanco")
×
5355
    MULTIBANCO("multibanco"),
5356

5357
    @SerializedName("oxxo")
×
5358
    OXXO("oxxo"),
5359

5360
    @SerializedName("p24")
×
5361
    P24("p24"),
5362

5363
    @SerializedName("paynow")
×
5364
    PAYNOW("paynow"),
5365

5366
    @SerializedName("paypal")
×
5367
    PAYPAL("paypal"),
5368

5369
    @SerializedName("payto")
×
5370
    PAYTO("payto"),
5371

5372
    @SerializedName("pix")
×
5373
    PIX("pix"),
5374

5375
    @SerializedName("promptpay")
×
5376
    PROMPTPAY("promptpay"),
5377

5378
    @SerializedName("qris")
×
5379
    QRIS("qris"),
5380

5381
    @SerializedName("rechnung")
×
5382
    RECHNUNG("rechnung"),
5383

5384
    @SerializedName("sepa_debit")
×
5385
    SEPA_DEBIT("sepa_debit"),
5386

5387
    @SerializedName("shopeepay")
×
5388
    SHOPEEPAY("shopeepay"),
5389

5390
    @SerializedName("sofort")
×
5391
    SOFORT("sofort"),
5392

5393
    @SerializedName("swish")
×
5394
    SWISH("swish"),
5395

5396
    @SerializedName("twint")
×
5397
    TWINT("twint"),
5398

5399
    @SerializedName("us_bank_account")
×
5400
    US_BANK_ACCOUNT("us_bank_account"),
5401

5402
    @SerializedName("wechat_pay")
×
5403
    WECHAT_PAY("wechat_pay"),
5404

5405
    @SerializedName("zip")
×
5406
    ZIP("zip");
5407

5408
    @Getter(onMethod_ = {@Override})
5409
    private final String value;
5410

5411
    PaymentMethodType(String value) {
×
5412
      this.value = value;
×
5413
    }
×
5414
  }
5415

5416
  public enum SubmitType implements ApiRequestParams.EnumParam {
×
5417
    @SerializedName("auto")
×
5418
    AUTO("auto"),
5419

5420
    @SerializedName("book")
×
5421
    BOOK("book"),
5422

5423
    @SerializedName("donate")
×
5424
    DONATE("donate"),
5425

5426
    @SerializedName("pay")
×
5427
    PAY("pay"),
5428

5429
    @SerializedName("subscribe")
×
5430
    SUBSCRIBE("subscribe");
5431

5432
    @Getter(onMethod_ = {@Override})
5433
    private final String value;
5434

5435
    SubmitType(String value) {
×
5436
      this.value = value;
×
5437
    }
×
5438
  }
5439
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc