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

stripe / stripe-java / #16707

14 Dec 2024 12:12AM UTC coverage: 15.91% (-0.08%) from 15.988%
#16707

Pull #1931

github

web-flow
Merge 90c2dfd77 into cf528f2c8
Pull Request #1931: Update generated code

43 of 1442 new or added lines in 28 files covered. (2.98%)

137 existing lines in 17 files now uncovered.

18625 of 117068 relevant lines covered (15.91%)

0.16 hits per line

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

2.26
/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
  /** Settings that restrict the usage of a payment link. */
127
  @SerializedName("restrictions")
128
  Object restrictions;
129

130
  /** Configuration for collecting the customer's shipping address. */
131
  @SerializedName("shipping_address_collection")
132
  Object shippingAddressCollection;
133

134
  /**
135
   * Describes the type of transaction being performed in order to customize relevant text on the
136
   * page, such as the submit button. Changing this value will also affect the hostname in the <a
137
   * href="https://stripe.com/docs/api/payment_links/payment_links/object#url">url</a> property
138
   * (example: {@code donate.stripe.com}).
139
   */
140
  @SerializedName("submit_type")
141
  SubmitType submitType;
142

143
  /**
144
   * When creating a subscription, the specified configuration data will be used. There must be at
145
   * least one line item with a recurring price to use {@code subscription_data}.
146
   */
147
  @SerializedName("subscription_data")
148
  SubscriptionData subscriptionData;
149

150
  /** Controls tax ID collection during checkout. */
151
  @SerializedName("tax_id_collection")
152
  TaxIdCollection taxIdCollection;
153

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

201
  public static Builder builder() {
202
    return new Builder();
1✔
203
  }
204

205
  public static class Builder {
1✔
206
    private Boolean active;
207

208
    private AfterCompletion afterCompletion;
209

210
    private Boolean allowPromotionCodes;
211

212
    private AutomaticTax automaticTax;
213

214
    private BillingAddressCollection billingAddressCollection;
215

216
    private Object customFields;
217

218
    private CustomText customText;
219

220
    private CustomerCreation customerCreation;
221

222
    private List<String> expand;
223

224
    private Map<String, Object> extraParams;
225

226
    private Object inactiveMessage;
227

228
    private InvoiceCreation invoiceCreation;
229

230
    private List<PaymentLinkUpdateParams.LineItem> lineItems;
231

232
    private Map<String, String> metadata;
233

234
    private PaymentIntentData paymentIntentData;
235

236
    private PaymentMethodCollection paymentMethodCollection;
237

238
    private Object paymentMethodTypes;
239

240
    private Object restrictions;
241

242
    private Object shippingAddressCollection;
243

244
    private SubmitType submitType;
245

246
    private SubscriptionData subscriptionData;
247

248
    private TaxIdCollection taxIdCollection;
249

250
    /** Finalize and obtain parameter instance from this builder. */
251
    public PaymentLinkUpdateParams build() {
252
      return new PaymentLinkUpdateParams(
1✔
253
          this.active,
254
          this.afterCompletion,
255
          this.allowPromotionCodes,
256
          this.automaticTax,
257
          this.billingAddressCollection,
258
          this.customFields,
259
          this.customText,
260
          this.customerCreation,
261
          this.expand,
262
          this.extraParams,
263
          this.inactiveMessage,
264
          this.invoiceCreation,
265
          this.lineItems,
266
          this.metadata,
267
          this.paymentIntentData,
268
          this.paymentMethodCollection,
269
          this.paymentMethodTypes,
270
          this.restrictions,
271
          this.shippingAddressCollection,
272
          this.submitType,
273
          this.subscriptionData,
274
          this.taxIdCollection);
275
    }
276

277
    /**
278
     * Whether the payment link's {@code url} is active. If {@code false}, customers visiting the
279
     * URL will be shown a page saying that the link has been deactivated.
280
     */
281
    public Builder setActive(Boolean active) {
282
      this.active = active;
1✔
283
      return this;
1✔
284
    }
285

286
    /** Behavior after the purchase is complete. */
287
    public Builder setAfterCompletion(PaymentLinkUpdateParams.AfterCompletion afterCompletion) {
288
      this.afterCompletion = afterCompletion;
×
289
      return this;
×
290
    }
291

292
    /** Enables user redeemable promotion codes. */
293
    public Builder setAllowPromotionCodes(Boolean allowPromotionCodes) {
294
      this.allowPromotionCodes = allowPromotionCodes;
×
295
      return this;
×
296
    }
297

298
    /** Configuration for automatic tax collection. */
299
    public Builder setAutomaticTax(PaymentLinkUpdateParams.AutomaticTax automaticTax) {
300
      this.automaticTax = automaticTax;
×
301
      return this;
×
302
    }
303

304
    /** Configuration for collecting the customer's billing address. Defaults to {@code auto}. */
305
    public Builder setBillingAddressCollection(
306
        PaymentLinkUpdateParams.BillingAddressCollection billingAddressCollection) {
307
      this.billingAddressCollection = billingAddressCollection;
×
308
      return this;
×
309
    }
310

311
    /**
312
     * Add an element to `customFields` list. A list is initialized for the first `add/addAll` call,
313
     * and subsequent calls adds additional elements to the original list. See {@link
314
     * PaymentLinkUpdateParams#customFields} for the field documentation.
315
     */
316
    @SuppressWarnings("unchecked")
317
    public Builder addCustomField(PaymentLinkUpdateParams.CustomField element) {
318
      if (this.customFields == null || this.customFields instanceof EmptyParam) {
×
319
        this.customFields = new ArrayList<PaymentLinkUpdateParams.CustomField>();
×
320
      }
321
      ((List<PaymentLinkUpdateParams.CustomField>) this.customFields).add(element);
×
322
      return this;
×
323
    }
324

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

339
    /**
340
     * Collect additional information from your customer using custom fields. Up to 3 fields are
341
     * supported.
342
     */
343
    public Builder setCustomFields(EmptyParam customFields) {
344
      this.customFields = customFields;
×
345
      return this;
×
346
    }
347

348
    /**
349
     * Collect additional information from your customer using custom fields. Up to 3 fields are
350
     * supported.
351
     */
352
    public Builder setCustomFields(List<PaymentLinkUpdateParams.CustomField> customFields) {
353
      this.customFields = customFields;
×
354
      return this;
×
355
    }
356

357
    /** Display additional text for your customers using custom text. */
358
    public Builder setCustomText(PaymentLinkUpdateParams.CustomText customText) {
359
      this.customText = customText;
×
360
      return this;
×
361
    }
362

363
    /**
364
     * Configures whether <a href="https://stripe.com/docs/api/checkout/sessions">checkout
365
     * sessions</a> created by this payment link create a <a
366
     * href="https://stripe.com/docs/api/customers">Customer</a>.
367
     */
368
    public Builder setCustomerCreation(PaymentLinkUpdateParams.CustomerCreation customerCreation) {
369
      this.customerCreation = customerCreation;
×
370
      return this;
×
371
    }
372

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

386
    /**
387
     * Add all elements 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 addAllExpand(List<String> elements) {
392
      if (this.expand == null) {
×
393
        this.expand = new ArrayList<>();
×
394
      }
395
      this.expand.addAll(elements);
×
396
      return this;
×
397
    }
398

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

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

425
    /** The custom message to be displayed to a customer when a payment link is no longer active. */
426
    public Builder setInactiveMessage(String inactiveMessage) {
427
      this.inactiveMessage = inactiveMessage;
×
428
      return this;
×
429
    }
430

431
    /** The custom message to be displayed to a customer when a payment link is no longer active. */
432
    public Builder setInactiveMessage(EmptyParam inactiveMessage) {
433
      this.inactiveMessage = inactiveMessage;
×
434
      return this;
×
435
    }
436

437
    /** Generate a post-purchase Invoice for one-time payments. */
438
    public Builder setInvoiceCreation(PaymentLinkUpdateParams.InvoiceCreation invoiceCreation) {
439
      this.invoiceCreation = invoiceCreation;
×
440
      return this;
×
441
    }
442

443
    /**
444
     * Add an element to `lineItems` list. A list is initialized for the first `add/addAll` call,
445
     * and subsequent calls adds additional elements to the original list. See {@link
446
     * PaymentLinkUpdateParams#lineItems} for the field documentation.
447
     */
448
    public Builder addLineItem(PaymentLinkUpdateParams.LineItem element) {
449
      if (this.lineItems == null) {
×
450
        this.lineItems = new ArrayList<>();
×
451
      }
452
      this.lineItems.add(element);
×
453
      return this;
×
454
    }
455

456
    /**
457
     * Add all elements 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 addAllLineItem(List<PaymentLinkUpdateParams.LineItem> elements) {
462
      if (this.lineItems == null) {
×
463
        this.lineItems = new ArrayList<>();
×
464
      }
465
      this.lineItems.addAll(elements);
×
466
      return this;
×
467
    }
468

469
    /**
470
     * Add a key/value pair to `metadata` map. A map is initialized for the first `put/putAll` call,
471
     * and subsequent calls add additional key/value pairs to the original map. See {@link
472
     * PaymentLinkUpdateParams#metadata} for the field documentation.
473
     */
474
    public Builder putMetadata(String key, String value) {
475
      if (this.metadata == null) {
×
476
        this.metadata = new HashMap<>();
×
477
      }
478
      this.metadata.put(key, value);
×
479
      return this;
×
480
    }
481

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

495
    /**
496
     * A subset of parameters to be passed to PaymentIntent creation for Checkout Sessions in {@code
497
     * payment} mode.
498
     */
499
    public Builder setPaymentIntentData(
500
        PaymentLinkUpdateParams.PaymentIntentData paymentIntentData) {
501
      this.paymentIntentData = paymentIntentData;
×
502
      return this;
×
503
    }
504

505
    /**
506
     * Specify whether Checkout should collect a payment method. When set to {@code if_required},
507
     * Checkout will not collect a payment method when the total due for the session is 0.This may
508
     * occur if the Checkout Session includes a free trial or a discount.
509
     *
510
     * <p>Can only be set in {@code subscription} mode. Defaults to {@code always}.
511
     *
512
     * <p>If you'd like information on how to collect a payment method outside of Checkout, read the
513
     * guide on <a href="https://stripe.com/docs/payments/checkout/free-trials">configuring
514
     * subscriptions with a free trial</a>.
515
     */
516
    public Builder setPaymentMethodCollection(
517
        PaymentLinkUpdateParams.PaymentMethodCollection paymentMethodCollection) {
518
      this.paymentMethodCollection = paymentMethodCollection;
×
519
      return this;
×
520
    }
521

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

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

551
    /**
552
     * The list of payment method types that customers can use. Pass an empty string to enable
553
     * dynamic payment methods that use your <a
554
     * href="https://dashboard.stripe.com/settings/payment_methods">payment method settings</a>.
555
     */
556
    public Builder setPaymentMethodTypes(EmptyParam paymentMethodTypes) {
557
      this.paymentMethodTypes = paymentMethodTypes;
×
558
      return this;
×
559
    }
560

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

572
    /** Settings that restrict the usage of a payment link. */
573
    public Builder setRestrictions(PaymentLinkUpdateParams.Restrictions restrictions) {
574
      this.restrictions = restrictions;
×
575
      return this;
×
576
    }
577

578
    /** Settings that restrict the usage of a payment link. */
579
    public Builder setRestrictions(EmptyParam restrictions) {
580
      this.restrictions = restrictions;
×
581
      return this;
×
582
    }
583

584
    /** Configuration for collecting the customer's shipping address. */
585
    public Builder setShippingAddressCollection(
586
        PaymentLinkUpdateParams.ShippingAddressCollection shippingAddressCollection) {
587
      this.shippingAddressCollection = shippingAddressCollection;
×
588
      return this;
×
589
    }
590

591
    /** Configuration for collecting the customer's shipping address. */
592
    public Builder setShippingAddressCollection(EmptyParam shippingAddressCollection) {
593
      this.shippingAddressCollection = shippingAddressCollection;
×
594
      return this;
×
595
    }
596

597
    /**
598
     * Describes the type of transaction being performed in order to customize relevant text on the
599
     * page, such as the submit button. Changing this value will also affect the hostname in the <a
600
     * href="https://stripe.com/docs/api/payment_links/payment_links/object#url">url</a> property
601
     * (example: {@code donate.stripe.com}).
602
     */
603
    public Builder setSubmitType(PaymentLinkUpdateParams.SubmitType submitType) {
604
      this.submitType = submitType;
×
605
      return this;
×
606
    }
607

608
    /**
609
     * When creating a subscription, the specified configuration data will be used. There must be at
610
     * least one line item with a recurring price to use {@code subscription_data}.
611
     */
612
    public Builder setSubscriptionData(PaymentLinkUpdateParams.SubscriptionData subscriptionData) {
613
      this.subscriptionData = subscriptionData;
×
614
      return this;
×
615
    }
616

617
    /** Controls tax ID collection during checkout. */
618
    public Builder setTaxIdCollection(PaymentLinkUpdateParams.TaxIdCollection taxIdCollection) {
619
      this.taxIdCollection = taxIdCollection;
×
620
      return this;
×
621
    }
622
  }
623

624
  @Getter
625
  public static class AfterCompletion {
626
    /**
627
     * Map of extra parameters for custom features not available in this client library. The content
628
     * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each
629
     * key/value pair is serialized as if the key is a root-level field (serialized) name in this
630
     * param object. Effectively, this map is flattened to its parent instance.
631
     */
632
    @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
633
    Map<String, Object> extraParams;
634

635
    /** Configuration when {@code type=hosted_confirmation}. */
636
    @SerializedName("hosted_confirmation")
637
    HostedConfirmation hostedConfirmation;
638

639
    /** Configuration when {@code type=redirect}. */
640
    @SerializedName("redirect")
641
    Redirect redirect;
642

643
    /**
644
     * <strong>Required.</strong> The specified behavior after the purchase is complete. Either
645
     * {@code redirect} or {@code hosted_confirmation}.
646
     */
647
    @SerializedName("type")
648
    Type type;
649

650
    private AfterCompletion(
651
        Map<String, Object> extraParams,
652
        HostedConfirmation hostedConfirmation,
653
        Redirect redirect,
654
        Type type) {
×
655
      this.extraParams = extraParams;
×
656
      this.hostedConfirmation = hostedConfirmation;
×
657
      this.redirect = redirect;
×
658
      this.type = type;
×
659
    }
×
660

661
    public static Builder builder() {
662
      return new Builder();
×
663
    }
664

665
    public static class Builder {
×
666
      private Map<String, Object> extraParams;
667

668
      private HostedConfirmation hostedConfirmation;
669

670
      private Redirect redirect;
671

672
      private Type type;
673

674
      /** Finalize and obtain parameter instance from this builder. */
675
      public PaymentLinkUpdateParams.AfterCompletion build() {
676
        return new PaymentLinkUpdateParams.AfterCompletion(
×
677
            this.extraParams, this.hostedConfirmation, this.redirect, this.type);
678
      }
679

680
      /**
681
       * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll`
682
       * call, and subsequent calls add additional key/value pairs to the original map. See {@link
683
       * PaymentLinkUpdateParams.AfterCompletion#extraParams} for the field documentation.
684
       */
685
      public Builder putExtraParam(String key, Object value) {
686
        if (this.extraParams == null) {
×
687
          this.extraParams = new HashMap<>();
×
688
        }
689
        this.extraParams.put(key, value);
×
690
        return this;
×
691
      }
692

693
      /**
694
       * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
695
       * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map.
696
       * See {@link PaymentLinkUpdateParams.AfterCompletion#extraParams} for the field
697
       * documentation.
698
       */
699
      public Builder putAllExtraParam(Map<String, Object> map) {
700
        if (this.extraParams == null) {
×
701
          this.extraParams = new HashMap<>();
×
702
        }
703
        this.extraParams.putAll(map);
×
704
        return this;
×
705
      }
706

707
      /** Configuration when {@code type=hosted_confirmation}. */
708
      public Builder setHostedConfirmation(
709
          PaymentLinkUpdateParams.AfterCompletion.HostedConfirmation hostedConfirmation) {
710
        this.hostedConfirmation = hostedConfirmation;
×
711
        return this;
×
712
      }
713

714
      /** Configuration when {@code type=redirect}. */
715
      public Builder setRedirect(PaymentLinkUpdateParams.AfterCompletion.Redirect redirect) {
716
        this.redirect = redirect;
×
717
        return this;
×
718
      }
719

720
      /**
721
       * <strong>Required.</strong> The specified behavior after the purchase is complete. Either
722
       * {@code redirect} or {@code hosted_confirmation}.
723
       */
724
      public Builder setType(PaymentLinkUpdateParams.AfterCompletion.Type type) {
725
        this.type = type;
×
726
        return this;
×
727
      }
728
    }
729

730
    @Getter
731
    public static class HostedConfirmation {
732
      /** A custom message to display to the customer after the purchase is complete. */
733
      @SerializedName("custom_message")
734
      Object customMessage;
735

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

745
      private HostedConfirmation(Object customMessage, Map<String, Object> extraParams) {
×
746
        this.customMessage = customMessage;
×
747
        this.extraParams = extraParams;
×
748
      }
×
749

750
      public static Builder builder() {
751
        return new Builder();
×
752
      }
753

754
      public static class Builder {
×
755
        private Object customMessage;
756

757
        private Map<String, Object> extraParams;
758

759
        /** Finalize and obtain parameter instance from this builder. */
760
        public PaymentLinkUpdateParams.AfterCompletion.HostedConfirmation build() {
761
          return new PaymentLinkUpdateParams.AfterCompletion.HostedConfirmation(
×
762
              this.customMessage, this.extraParams);
763
        }
764

765
        /** A custom message to display to the customer after the purchase is complete. */
766
        public Builder setCustomMessage(String customMessage) {
767
          this.customMessage = customMessage;
×
768
          return this;
×
769
        }
770

771
        /** A custom message to display to the customer after the purchase is complete. */
772
        public Builder setCustomMessage(EmptyParam customMessage) {
773
          this.customMessage = customMessage;
×
774
          return this;
×
775
        }
776

777
        /**
778
         * Add a key/value pair to `extraParams` map. A map is initialized for the first
779
         * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
780
         * map. See {@link PaymentLinkUpdateParams.AfterCompletion.HostedConfirmation#extraParams}
781
         * for the field documentation.
782
         */
783
        public Builder putExtraParam(String key, Object value) {
784
          if (this.extraParams == null) {
×
785
            this.extraParams = new HashMap<>();
×
786
          }
787
          this.extraParams.put(key, value);
×
788
          return this;
×
789
        }
790

791
        /**
792
         * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
793
         * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
794
         * map. See {@link PaymentLinkUpdateParams.AfterCompletion.HostedConfirmation#extraParams}
795
         * for the field documentation.
796
         */
797
        public Builder putAllExtraParam(Map<String, Object> map) {
798
          if (this.extraParams == null) {
×
799
            this.extraParams = new HashMap<>();
×
800
          }
801
          this.extraParams.putAll(map);
×
802
          return this;
×
803
        }
804
      }
805
    }
806

807
    @Getter
808
    public static class Redirect {
809
      /**
810
       * Map of extra parameters for custom features not available in this client library. The
811
       * content in this map is not serialized under this field's {@code @SerializedName} value.
812
       * Instead, each key/value pair is serialized as if the key is a root-level field (serialized)
813
       * name in this param object. Effectively, this map is flattened to its parent instance.
814
       */
815
      @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
816
      Map<String, Object> extraParams;
817

818
      /**
819
       * <strong>Required.</strong> The URL the customer will be redirected to after the purchase is
820
       * complete. You can embed {@code {CHECKOUT_SESSION_ID}} into the URL to have the {@code id}
821
       * of the completed <a
822
       * href="https://stripe.com/docs/api/checkout/sessions/object#checkout_session_object-id">checkout
823
       * session</a> included.
824
       */
825
      @SerializedName("url")
826
      Object url;
827

828
      private Redirect(Map<String, Object> extraParams, Object url) {
×
829
        this.extraParams = extraParams;
×
830
        this.url = url;
×
831
      }
×
832

833
      public static Builder builder() {
834
        return new Builder();
×
835
      }
836

837
      public static class Builder {
×
838
        private Map<String, Object> extraParams;
839

840
        private Object url;
841

842
        /** Finalize and obtain parameter instance from this builder. */
843
        public PaymentLinkUpdateParams.AfterCompletion.Redirect build() {
844
          return new PaymentLinkUpdateParams.AfterCompletion.Redirect(this.extraParams, this.url);
×
845
        }
846

847
        /**
848
         * Add a key/value pair to `extraParams` map. A map is initialized for the first
849
         * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
850
         * map. See {@link PaymentLinkUpdateParams.AfterCompletion.Redirect#extraParams} for the
851
         * field documentation.
852
         */
853
        public Builder putExtraParam(String key, Object value) {
854
          if (this.extraParams == null) {
×
855
            this.extraParams = new HashMap<>();
×
856
          }
857
          this.extraParams.put(key, value);
×
858
          return this;
×
859
        }
860

861
        /**
862
         * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
863
         * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
864
         * map. See {@link PaymentLinkUpdateParams.AfterCompletion.Redirect#extraParams} for the
865
         * field documentation.
866
         */
867
        public Builder putAllExtraParam(Map<String, Object> map) {
868
          if (this.extraParams == null) {
×
869
            this.extraParams = new HashMap<>();
×
870
          }
871
          this.extraParams.putAll(map);
×
872
          return this;
×
873
        }
874

875
        /**
876
         * <strong>Required.</strong> The URL the customer will be redirected to after the purchase
877
         * is complete. You can embed {@code {CHECKOUT_SESSION_ID}} into the URL to have the {@code
878
         * id} of the completed <a
879
         * href="https://stripe.com/docs/api/checkout/sessions/object#checkout_session_object-id">checkout
880
         * session</a> included.
881
         */
882
        public Builder setUrl(String url) {
883
          this.url = url;
×
884
          return this;
×
885
        }
886

887
        /**
888
         * <strong>Required.</strong> The URL the customer will be redirected to after the purchase
889
         * is complete. You can embed {@code {CHECKOUT_SESSION_ID}} into the URL to have the {@code
890
         * id} of the completed <a
891
         * href="https://stripe.com/docs/api/checkout/sessions/object#checkout_session_object-id">checkout
892
         * session</a> included.
893
         */
894
        public Builder setUrl(EmptyParam url) {
895
          this.url = url;
×
896
          return this;
×
897
        }
898
      }
899
    }
900

901
    public enum Type implements ApiRequestParams.EnumParam {
×
902
      @SerializedName("hosted_confirmation")
×
903
      HOSTED_CONFIRMATION("hosted_confirmation"),
904

905
      @SerializedName("redirect")
×
906
      REDIRECT("redirect");
907

908
      @Getter(onMethod_ = {@Override})
909
      private final String value;
910

911
      Type(String value) {
×
912
        this.value = value;
×
913
      }
×
914
    }
915
  }
916

917
  @Getter
918
  public static class AutomaticTax {
919
    /**
920
     * <strong>Required.</strong> Set to {@code true} to <a
921
     * href="https://docs.stripe.com/tax">calculate tax automatically</a> using the customer's
922
     * location.
923
     *
924
     * <p>Enabling this parameter causes the payment link to collect any billing address information
925
     * necessary for tax calculation.
926
     */
927
    @SerializedName("enabled")
928
    Boolean enabled;
929

930
    /**
931
     * Map of extra parameters for custom features not available in this client library. The content
932
     * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each
933
     * key/value pair is serialized as if the key is a root-level field (serialized) name in this
934
     * param object. Effectively, this map is flattened to its parent instance.
935
     */
936
    @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
937
    Map<String, Object> extraParams;
938

939
    /**
940
     * The account that's liable for tax. If set, the business address and tax registrations
941
     * required to perform the tax calculation are loaded from this account. The tax transaction is
942
     * returned in the report of the connected account.
943
     */
944
    @SerializedName("liability")
945
    Liability liability;
946

947
    private AutomaticTax(Boolean enabled, Map<String, Object> extraParams, Liability liability) {
×
948
      this.enabled = enabled;
×
949
      this.extraParams = extraParams;
×
950
      this.liability = liability;
×
951
    }
×
952

953
    public static Builder builder() {
954
      return new Builder();
×
955
    }
956

957
    public static class Builder {
×
958
      private Boolean enabled;
959

960
      private Map<String, Object> extraParams;
961

962
      private Liability liability;
963

964
      /** Finalize and obtain parameter instance from this builder. */
965
      public PaymentLinkUpdateParams.AutomaticTax build() {
966
        return new PaymentLinkUpdateParams.AutomaticTax(
×
967
            this.enabled, this.extraParams, this.liability);
968
      }
969

970
      /**
971
       * <strong>Required.</strong> Set to {@code true} to <a
972
       * href="https://docs.stripe.com/tax">calculate tax automatically</a> using the customer's
973
       * location.
974
       *
975
       * <p>Enabling this parameter causes the payment link to collect any billing address
976
       * information necessary for tax calculation.
977
       */
978
      public Builder setEnabled(Boolean enabled) {
979
        this.enabled = enabled;
×
980
        return this;
×
981
      }
982

983
      /**
984
       * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll`
985
       * call, and subsequent calls add additional key/value pairs to the original map. See {@link
986
       * PaymentLinkUpdateParams.AutomaticTax#extraParams} for the field documentation.
987
       */
988
      public Builder putExtraParam(String key, Object value) {
989
        if (this.extraParams == null) {
×
990
          this.extraParams = new HashMap<>();
×
991
        }
992
        this.extraParams.put(key, value);
×
993
        return this;
×
994
      }
995

996
      /**
997
       * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
998
       * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map.
999
       * See {@link PaymentLinkUpdateParams.AutomaticTax#extraParams} for the field documentation.
1000
       */
1001
      public Builder putAllExtraParam(Map<String, Object> map) {
1002
        if (this.extraParams == null) {
×
1003
          this.extraParams = new HashMap<>();
×
1004
        }
1005
        this.extraParams.putAll(map);
×
1006
        return this;
×
1007
      }
1008

1009
      /**
1010
       * The account that's liable for tax. If set, the business address and tax registrations
1011
       * required to perform the tax calculation are loaded from this account. The tax transaction
1012
       * is returned in the report of the connected account.
1013
       */
1014
      public Builder setLiability(PaymentLinkUpdateParams.AutomaticTax.Liability liability) {
1015
        this.liability = liability;
×
1016
        return this;
×
1017
      }
1018
    }
1019

1020
    @Getter
1021
    public static class Liability {
1022
      /** The connected account being referenced when {@code type} is {@code account}. */
1023
      @SerializedName("account")
1024
      Object account;
1025

1026
      /**
1027
       * Map of extra parameters for custom features not available in this client library. The
1028
       * content in this map is not serialized under this field's {@code @SerializedName} value.
1029
       * Instead, each key/value pair is serialized as if the key is a root-level field (serialized)
1030
       * name in this param object. Effectively, this map is flattened to its parent instance.
1031
       */
1032
      @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
1033
      Map<String, Object> extraParams;
1034

1035
      /** <strong>Required.</strong> Type of the account referenced in the request. */
1036
      @SerializedName("type")
1037
      Type type;
1038

1039
      private Liability(Object account, Map<String, Object> extraParams, Type type) {
×
1040
        this.account = account;
×
1041
        this.extraParams = extraParams;
×
1042
        this.type = type;
×
1043
      }
×
1044

1045
      public static Builder builder() {
1046
        return new Builder();
×
1047
      }
1048

1049
      public static class Builder {
×
1050
        private Object account;
1051

1052
        private Map<String, Object> extraParams;
1053

1054
        private Type type;
1055

1056
        /** Finalize and obtain parameter instance from this builder. */
1057
        public PaymentLinkUpdateParams.AutomaticTax.Liability build() {
1058
          return new PaymentLinkUpdateParams.AutomaticTax.Liability(
×
1059
              this.account, this.extraParams, this.type);
1060
        }
1061

1062
        /** The connected account being referenced when {@code type} is {@code account}. */
1063
        public Builder setAccount(String account) {
1064
          this.account = account;
×
1065
          return this;
×
1066
        }
1067

1068
        /** The connected account being referenced when {@code type} is {@code account}. */
1069
        public Builder setAccount(EmptyParam account) {
1070
          this.account = account;
×
1071
          return this;
×
1072
        }
1073

1074
        /**
1075
         * Add a key/value pair to `extraParams` map. A map is initialized for the first
1076
         * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
1077
         * map. See {@link PaymentLinkUpdateParams.AutomaticTax.Liability#extraParams} for the field
1078
         * documentation.
1079
         */
1080
        public Builder putExtraParam(String key, Object value) {
1081
          if (this.extraParams == null) {
×
1082
            this.extraParams = new HashMap<>();
×
1083
          }
1084
          this.extraParams.put(key, value);
×
1085
          return this;
×
1086
        }
1087

1088
        /**
1089
         * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
1090
         * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
1091
         * map. See {@link PaymentLinkUpdateParams.AutomaticTax.Liability#extraParams} for the field
1092
         * documentation.
1093
         */
1094
        public Builder putAllExtraParam(Map<String, Object> map) {
1095
          if (this.extraParams == null) {
×
1096
            this.extraParams = new HashMap<>();
×
1097
          }
1098
          this.extraParams.putAll(map);
×
1099
          return this;
×
1100
        }
1101

1102
        /** <strong>Required.</strong> Type of the account referenced in the request. */
1103
        public Builder setType(PaymentLinkUpdateParams.AutomaticTax.Liability.Type type) {
1104
          this.type = type;
×
1105
          return this;
×
1106
        }
1107
      }
1108

1109
      public enum Type implements ApiRequestParams.EnumParam {
×
1110
        @SerializedName("account")
×
1111
        ACCOUNT("account"),
1112

1113
        @SerializedName("self")
×
1114
        SELF("self");
1115

1116
        @Getter(onMethod_ = {@Override})
1117
        private final String value;
1118

1119
        Type(String value) {
×
1120
          this.value = value;
×
1121
        }
×
1122
      }
1123
    }
1124
  }
1125

1126
  @Getter
1127
  public static class CustomField {
1128
    /** Configuration for {@code type=dropdown} fields. */
1129
    @SerializedName("dropdown")
1130
    Dropdown dropdown;
1131

1132
    /**
1133
     * Map of extra parameters for custom features not available in this client library. The content
1134
     * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each
1135
     * key/value pair is serialized as if the key is a root-level field (serialized) name in this
1136
     * param object. Effectively, this map is flattened to its parent instance.
1137
     */
1138
    @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
1139
    Map<String, Object> extraParams;
1140

1141
    /**
1142
     * <strong>Required.</strong> String of your choice that your integration can use to reconcile
1143
     * this field. Must be unique to this field, alphanumeric, and up to 200 characters.
1144
     */
1145
    @SerializedName("key")
1146
    Object key;
1147

1148
    /** <strong>Required.</strong> The label for the field, displayed to the customer. */
1149
    @SerializedName("label")
1150
    Label label;
1151

1152
    /** Configuration for {@code type=numeric} fields. */
1153
    @SerializedName("numeric")
1154
    Numeric numeric;
1155

1156
    /**
1157
     * Whether the customer is required to complete the field before completing the Checkout
1158
     * Session. Defaults to {@code false}.
1159
     */
1160
    @SerializedName("optional")
1161
    Boolean optional;
1162

1163
    /** Configuration for {@code type=text} fields. */
1164
    @SerializedName("text")
1165
    Text text;
1166

1167
    /** <strong>Required.</strong> The type of the field. */
1168
    @SerializedName("type")
1169
    Type type;
1170

1171
    private CustomField(
1172
        Dropdown dropdown,
1173
        Map<String, Object> extraParams,
1174
        Object key,
1175
        Label label,
1176
        Numeric numeric,
1177
        Boolean optional,
1178
        Text text,
1179
        Type type) {
×
1180
      this.dropdown = dropdown;
×
1181
      this.extraParams = extraParams;
×
1182
      this.key = key;
×
1183
      this.label = label;
×
1184
      this.numeric = numeric;
×
1185
      this.optional = optional;
×
1186
      this.text = text;
×
1187
      this.type = type;
×
1188
    }
×
1189

1190
    public static Builder builder() {
1191
      return new Builder();
×
1192
    }
1193

1194
    public static class Builder {
×
1195
      private Dropdown dropdown;
1196

1197
      private Map<String, Object> extraParams;
1198

1199
      private Object key;
1200

1201
      private Label label;
1202

1203
      private Numeric numeric;
1204

1205
      private Boolean optional;
1206

1207
      private Text text;
1208

1209
      private Type type;
1210

1211
      /** Finalize and obtain parameter instance from this builder. */
1212
      public PaymentLinkUpdateParams.CustomField build() {
1213
        return new PaymentLinkUpdateParams.CustomField(
×
1214
            this.dropdown,
1215
            this.extraParams,
1216
            this.key,
1217
            this.label,
1218
            this.numeric,
1219
            this.optional,
1220
            this.text,
1221
            this.type);
1222
      }
1223

1224
      /** Configuration for {@code type=dropdown} fields. */
1225
      public Builder setDropdown(PaymentLinkUpdateParams.CustomField.Dropdown dropdown) {
1226
        this.dropdown = dropdown;
×
1227
        return this;
×
1228
      }
1229

1230
      /**
1231
       * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll`
1232
       * call, and subsequent calls add additional key/value pairs to the original map. See {@link
1233
       * PaymentLinkUpdateParams.CustomField#extraParams} for the field documentation.
1234
       */
1235
      public Builder putExtraParam(String key, Object value) {
1236
        if (this.extraParams == null) {
×
1237
          this.extraParams = new HashMap<>();
×
1238
        }
1239
        this.extraParams.put(key, value);
×
1240
        return this;
×
1241
      }
1242

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

1256
      /**
1257
       * <strong>Required.</strong> String of your choice that your integration can use to reconcile
1258
       * this field. Must be unique to this field, alphanumeric, and up to 200 characters.
1259
       */
1260
      public Builder setKey(String key) {
1261
        this.key = key;
×
1262
        return this;
×
1263
      }
1264

1265
      /**
1266
       * <strong>Required.</strong> String of your choice that your integration can use to reconcile
1267
       * this field. Must be unique to this field, alphanumeric, and up to 200 characters.
1268
       */
1269
      public Builder setKey(EmptyParam key) {
1270
        this.key = key;
×
1271
        return this;
×
1272
      }
1273

1274
      /** <strong>Required.</strong> The label for the field, displayed to the customer. */
1275
      public Builder setLabel(PaymentLinkUpdateParams.CustomField.Label label) {
1276
        this.label = label;
×
1277
        return this;
×
1278
      }
1279

1280
      /** Configuration for {@code type=numeric} fields. */
1281
      public Builder setNumeric(PaymentLinkUpdateParams.CustomField.Numeric numeric) {
1282
        this.numeric = numeric;
×
1283
        return this;
×
1284
      }
1285

1286
      /**
1287
       * Whether the customer is required to complete the field before completing the Checkout
1288
       * Session. Defaults to {@code false}.
1289
       */
1290
      public Builder setOptional(Boolean optional) {
1291
        this.optional = optional;
×
1292
        return this;
×
1293
      }
1294

1295
      /** Configuration for {@code type=text} fields. */
1296
      public Builder setText(PaymentLinkUpdateParams.CustomField.Text text) {
1297
        this.text = text;
×
1298
        return this;
×
1299
      }
1300

1301
      /** <strong>Required.</strong> The type of the field. */
1302
      public Builder setType(PaymentLinkUpdateParams.CustomField.Type type) {
1303
        this.type = type;
×
1304
        return this;
×
1305
      }
1306
    }
1307

1308
    @Getter
1309
    public static class Dropdown {
1310
      /**
1311
       * Map of extra parameters for custom features not available in this client library. The
1312
       * content in this map is not serialized under this field's {@code @SerializedName} value.
1313
       * Instead, each key/value pair is serialized as if the key is a root-level field (serialized)
1314
       * name in this param object. Effectively, this map is flattened to its parent instance.
1315
       */
1316
      @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
1317
      Map<String, Object> extraParams;
1318

1319
      /**
1320
       * <strong>Required.</strong> The options available for the customer to select. Up to 200
1321
       * options allowed.
1322
       */
1323
      @SerializedName("options")
1324
      List<PaymentLinkUpdateParams.CustomField.Dropdown.Option> options;
1325

1326
      private Dropdown(
1327
          Map<String, Object> extraParams,
1328
          List<PaymentLinkUpdateParams.CustomField.Dropdown.Option> options) {
×
1329
        this.extraParams = extraParams;
×
1330
        this.options = options;
×
1331
      }
×
1332

1333
      public static Builder builder() {
1334
        return new Builder();
×
1335
      }
1336

1337
      public static class Builder {
×
1338
        private Map<String, Object> extraParams;
1339

1340
        private List<PaymentLinkUpdateParams.CustomField.Dropdown.Option> options;
1341

1342
        /** Finalize and obtain parameter instance from this builder. */
1343
        public PaymentLinkUpdateParams.CustomField.Dropdown build() {
1344
          return new PaymentLinkUpdateParams.CustomField.Dropdown(this.extraParams, this.options);
×
1345
        }
1346

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

1361
        /**
1362
         * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
1363
         * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
1364
         * map. See {@link PaymentLinkUpdateParams.CustomField.Dropdown#extraParams} for the field
1365
         * documentation.
1366
         */
1367
        public Builder putAllExtraParam(Map<String, Object> map) {
1368
          if (this.extraParams == null) {
×
1369
            this.extraParams = new HashMap<>();
×
1370
          }
1371
          this.extraParams.putAll(map);
×
1372
          return this;
×
1373
        }
1374

1375
        /**
1376
         * Add an element to `options` list. A list is initialized for the first `add/addAll` call,
1377
         * and subsequent calls adds additional elements to the original list. See {@link
1378
         * PaymentLinkUpdateParams.CustomField.Dropdown#options} for the field documentation.
1379
         */
1380
        public Builder addOption(PaymentLinkUpdateParams.CustomField.Dropdown.Option element) {
1381
          if (this.options == null) {
×
1382
            this.options = new ArrayList<>();
×
1383
          }
1384
          this.options.add(element);
×
1385
          return this;
×
1386
        }
1387

1388
        /**
1389
         * Add all elements to `options` list. A list is initialized for the first `add/addAll`
1390
         * call, and subsequent calls adds additional elements to the original list. See {@link
1391
         * PaymentLinkUpdateParams.CustomField.Dropdown#options} for the field documentation.
1392
         */
1393
        public Builder addAllOption(
1394
            List<PaymentLinkUpdateParams.CustomField.Dropdown.Option> elements) {
1395
          if (this.options == null) {
×
1396
            this.options = new ArrayList<>();
×
1397
          }
1398
          this.options.addAll(elements);
×
1399
          return this;
×
1400
        }
1401
      }
1402

1403
      @Getter
1404
      public static class Option {
1405
        /**
1406
         * Map of extra parameters for custom features not available in this client library. The
1407
         * content in this map is not serialized under this field's {@code @SerializedName} value.
1408
         * Instead, each key/value pair is serialized as if the key is a root-level field
1409
         * (serialized) name in this param object. Effectively, this map is flattened to its parent
1410
         * instance.
1411
         */
1412
        @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
1413
        Map<String, Object> extraParams;
1414

1415
        /**
1416
         * <strong>Required.</strong> The label for the option, displayed to the customer. Up to 100
1417
         * characters.
1418
         */
1419
        @SerializedName("label")
1420
        Object label;
1421

1422
        /**
1423
         * <strong>Required.</strong> The value for this option, not displayed to the customer, used
1424
         * by your integration to reconcile the option selected by the customer. Must be unique to
1425
         * this option, alphanumeric, and up to 100 characters.
1426
         */
1427
        @SerializedName("value")
1428
        Object value;
1429

1430
        private Option(Map<String, Object> extraParams, Object label, Object value) {
×
1431
          this.extraParams = extraParams;
×
1432
          this.label = label;
×
1433
          this.value = value;
×
1434
        }
×
1435

1436
        public static Builder builder() {
1437
          return new Builder();
×
1438
        }
1439

1440
        public static class Builder {
×
1441
          private Map<String, Object> extraParams;
1442

1443
          private Object label;
1444

1445
          private Object value;
1446

1447
          /** Finalize and obtain parameter instance from this builder. */
1448
          public PaymentLinkUpdateParams.CustomField.Dropdown.Option build() {
1449
            return new PaymentLinkUpdateParams.CustomField.Dropdown.Option(
×
1450
                this.extraParams, this.label, this.value);
1451
          }
1452

1453
          /**
1454
           * Add a key/value pair to `extraParams` map. A map is initialized for the first
1455
           * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
1456
           * map. See {@link PaymentLinkUpdateParams.CustomField.Dropdown.Option#extraParams} for
1457
           * the field documentation.
1458
           */
1459
          public Builder putExtraParam(String key, Object value) {
1460
            if (this.extraParams == null) {
×
1461
              this.extraParams = new HashMap<>();
×
1462
            }
1463
            this.extraParams.put(key, value);
×
1464
            return this;
×
1465
          }
1466

1467
          /**
1468
           * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
1469
           * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
1470
           * map. See {@link PaymentLinkUpdateParams.CustomField.Dropdown.Option#extraParams} for
1471
           * the field documentation.
1472
           */
1473
          public Builder putAllExtraParam(Map<String, Object> map) {
1474
            if (this.extraParams == null) {
×
1475
              this.extraParams = new HashMap<>();
×
1476
            }
1477
            this.extraParams.putAll(map);
×
1478
            return this;
×
1479
          }
1480

1481
          /**
1482
           * <strong>Required.</strong> The label for the option, displayed to the customer. Up to
1483
           * 100 characters.
1484
           */
1485
          public Builder setLabel(String label) {
1486
            this.label = label;
×
1487
            return this;
×
1488
          }
1489

1490
          /**
1491
           * <strong>Required.</strong> The label for the option, displayed to the customer. Up to
1492
           * 100 characters.
1493
           */
1494
          public Builder setLabel(EmptyParam label) {
1495
            this.label = label;
×
1496
            return this;
×
1497
          }
1498

1499
          /**
1500
           * <strong>Required.</strong> The value for this option, not displayed to the customer,
1501
           * used by your integration to reconcile the option selected by the customer. Must be
1502
           * unique to this option, alphanumeric, and up to 100 characters.
1503
           */
1504
          public Builder setValue(String value) {
1505
            this.value = value;
×
1506
            return this;
×
1507
          }
1508

1509
          /**
1510
           * <strong>Required.</strong> The value for this option, not displayed to the customer,
1511
           * used by your integration to reconcile the option selected by the customer. Must be
1512
           * unique to this option, alphanumeric, and up to 100 characters.
1513
           */
1514
          public Builder setValue(EmptyParam value) {
1515
            this.value = value;
×
1516
            return this;
×
1517
          }
1518
        }
1519
      }
1520
    }
1521

1522
    @Getter
1523
    public static class Label {
1524
      /**
1525
       * <strong>Required.</strong> Custom text for the label, displayed to the customer. Up to 50
1526
       * characters.
1527
       */
1528
      @SerializedName("custom")
1529
      Object custom;
1530

1531
      /**
1532
       * Map of extra parameters for custom features not available in this client library. The
1533
       * content in this map is not serialized under this field's {@code @SerializedName} value.
1534
       * Instead, each key/value pair is serialized as if the key is a root-level field (serialized)
1535
       * name in this param object. Effectively, this map is flattened to its parent instance.
1536
       */
1537
      @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
1538
      Map<String, Object> extraParams;
1539

1540
      /** <strong>Required.</strong> The type of the label. */
1541
      @SerializedName("type")
1542
      Type type;
1543

1544
      private Label(Object custom, Map<String, Object> extraParams, Type type) {
×
1545
        this.custom = custom;
×
1546
        this.extraParams = extraParams;
×
1547
        this.type = type;
×
1548
      }
×
1549

1550
      public static Builder builder() {
1551
        return new Builder();
×
1552
      }
1553

1554
      public static class Builder {
×
1555
        private Object custom;
1556

1557
        private Map<String, Object> extraParams;
1558

1559
        private Type type;
1560

1561
        /** Finalize and obtain parameter instance from this builder. */
1562
        public PaymentLinkUpdateParams.CustomField.Label build() {
1563
          return new PaymentLinkUpdateParams.CustomField.Label(
×
1564
              this.custom, this.extraParams, this.type);
1565
        }
1566

1567
        /**
1568
         * <strong>Required.</strong> Custom text for the label, displayed to the customer. Up to 50
1569
         * characters.
1570
         */
1571
        public Builder setCustom(String custom) {
1572
          this.custom = custom;
×
1573
          return this;
×
1574
        }
1575

1576
        /**
1577
         * <strong>Required.</strong> Custom text for the label, displayed to the customer. Up to 50
1578
         * characters.
1579
         */
1580
        public Builder setCustom(EmptyParam custom) {
1581
          this.custom = custom;
×
1582
          return this;
×
1583
        }
1584

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

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

1613
        /** <strong>Required.</strong> The type of the label. */
1614
        public Builder setType(PaymentLinkUpdateParams.CustomField.Label.Type type) {
1615
          this.type = type;
×
1616
          return this;
×
1617
        }
1618
      }
1619

1620
      public enum Type implements ApiRequestParams.EnumParam {
×
1621
        @SerializedName("custom")
×
1622
        CUSTOM("custom");
1623

1624
        @Getter(onMethod_ = {@Override})
1625
        private final String value;
1626

1627
        Type(String value) {
×
1628
          this.value = value;
×
1629
        }
×
1630
      }
1631
    }
1632

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

1644
      /** The maximum character length constraint for the customer's input. */
1645
      @SerializedName("maximum_length")
1646
      Long maximumLength;
1647

1648
      /** The minimum character length requirement for the customer's input. */
1649
      @SerializedName("minimum_length")
1650
      Long minimumLength;
1651

1652
      private Numeric(Map<String, Object> extraParams, Long maximumLength, Long minimumLength) {
×
1653
        this.extraParams = extraParams;
×
1654
        this.maximumLength = maximumLength;
×
1655
        this.minimumLength = minimumLength;
×
1656
      }
×
1657

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

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

1665
        private Long maximumLength;
1666

1667
        private Long minimumLength;
1668

1669
        /** Finalize and obtain parameter instance from this builder. */
1670
        public PaymentLinkUpdateParams.CustomField.Numeric build() {
1671
          return new PaymentLinkUpdateParams.CustomField.Numeric(
×
1672
              this.extraParams, this.maximumLength, this.minimumLength);
1673
        }
1674

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

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

1703
        /** The maximum character length constraint for the customer's input. */
1704
        public Builder setMaximumLength(Long maximumLength) {
1705
          this.maximumLength = maximumLength;
×
1706
          return this;
×
1707
        }
1708

1709
        /** The minimum character length requirement for the customer's input. */
1710
        public Builder setMinimumLength(Long minimumLength) {
1711
          this.minimumLength = minimumLength;
×
1712
          return this;
×
1713
        }
1714
      }
1715
    }
1716

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

1728
      /** The maximum character length constraint for the customer's input. */
1729
      @SerializedName("maximum_length")
1730
      Long maximumLength;
1731

1732
      /** The minimum character length requirement for the customer's input. */
1733
      @SerializedName("minimum_length")
1734
      Long minimumLength;
1735

1736
      private Text(Map<String, Object> extraParams, Long maximumLength, Long minimumLength) {
×
1737
        this.extraParams = extraParams;
×
1738
        this.maximumLength = maximumLength;
×
1739
        this.minimumLength = minimumLength;
×
1740
      }
×
1741

1742
      public static Builder builder() {
1743
        return new Builder();
×
1744
      }
1745

1746
      public static class Builder {
×
1747
        private Map<String, Object> extraParams;
1748

1749
        private Long maximumLength;
1750

1751
        private Long minimumLength;
1752

1753
        /** Finalize and obtain parameter instance from this builder. */
1754
        public PaymentLinkUpdateParams.CustomField.Text build() {
1755
          return new PaymentLinkUpdateParams.CustomField.Text(
×
1756
              this.extraParams, this.maximumLength, this.minimumLength);
1757
        }
1758

1759
        /**
1760
         * Add a key/value pair to `extraParams` map. A map is initialized for the first
1761
         * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
1762
         * map. See {@link PaymentLinkUpdateParams.CustomField.Text#extraParams} for the field
1763
         * documentation.
1764
         */
1765
        public Builder putExtraParam(String key, Object value) {
1766
          if (this.extraParams == null) {
×
1767
            this.extraParams = new HashMap<>();
×
1768
          }
1769
          this.extraParams.put(key, value);
×
1770
          return this;
×
1771
        }
1772

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

1787
        /** The maximum character length constraint for the customer's input. */
1788
        public Builder setMaximumLength(Long maximumLength) {
1789
          this.maximumLength = maximumLength;
×
1790
          return this;
×
1791
        }
1792

1793
        /** The minimum character length requirement for the customer's input. */
1794
        public Builder setMinimumLength(Long minimumLength) {
1795
          this.minimumLength = minimumLength;
×
1796
          return this;
×
1797
        }
1798
      }
1799
    }
1800

1801
    public enum Type implements ApiRequestParams.EnumParam {
×
1802
      @SerializedName("dropdown")
×
1803
      DROPDOWN("dropdown"),
1804

1805
      @SerializedName("numeric")
×
1806
      NUMERIC("numeric"),
1807

1808
      @SerializedName("text")
×
1809
      TEXT("text");
1810

1811
      @Getter(onMethod_ = {@Override})
1812
      private final String value;
1813

1814
      Type(String value) {
×
1815
        this.value = value;
×
1816
      }
×
1817
    }
1818
  }
1819

1820
  @Getter
1821
  public static class CustomText {
1822
    /** Custom text that should be displayed after the payment confirmation button. */
1823
    @SerializedName("after_submit")
1824
    Object afterSubmit;
1825

1826
    /**
1827
     * Map of extra parameters for custom features not available in this client library. The content
1828
     * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each
1829
     * key/value pair is serialized as if the key is a root-level field (serialized) name in this
1830
     * param object. Effectively, this map is flattened to its parent instance.
1831
     */
1832
    @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
1833
    Map<String, Object> extraParams;
1834

1835
    /** Custom text that should be displayed alongside shipping address collection. */
1836
    @SerializedName("shipping_address")
1837
    Object shippingAddress;
1838

1839
    /** Custom text that should be displayed alongside the payment confirmation button. */
1840
    @SerializedName("submit")
1841
    Object submit;
1842

1843
    /**
1844
     * Custom text that should be displayed in place of the default terms of service agreement text.
1845
     */
1846
    @SerializedName("terms_of_service_acceptance")
1847
    Object termsOfServiceAcceptance;
1848

1849
    private CustomText(
1850
        Object afterSubmit,
1851
        Map<String, Object> extraParams,
1852
        Object shippingAddress,
1853
        Object submit,
1854
        Object termsOfServiceAcceptance) {
×
1855
      this.afterSubmit = afterSubmit;
×
1856
      this.extraParams = extraParams;
×
1857
      this.shippingAddress = shippingAddress;
×
1858
      this.submit = submit;
×
1859
      this.termsOfServiceAcceptance = termsOfServiceAcceptance;
×
1860
    }
×
1861

1862
    public static Builder builder() {
1863
      return new Builder();
×
1864
    }
1865

1866
    public static class Builder {
×
1867
      private Object afterSubmit;
1868

1869
      private Map<String, Object> extraParams;
1870

1871
      private Object shippingAddress;
1872

1873
      private Object submit;
1874

1875
      private Object termsOfServiceAcceptance;
1876

1877
      /** Finalize and obtain parameter instance from this builder. */
1878
      public PaymentLinkUpdateParams.CustomText build() {
1879
        return new PaymentLinkUpdateParams.CustomText(
×
1880
            this.afterSubmit,
1881
            this.extraParams,
1882
            this.shippingAddress,
1883
            this.submit,
1884
            this.termsOfServiceAcceptance);
1885
      }
1886

1887
      /** Custom text that should be displayed after the payment confirmation button. */
1888
      public Builder setAfterSubmit(PaymentLinkUpdateParams.CustomText.AfterSubmit afterSubmit) {
1889
        this.afterSubmit = afterSubmit;
×
1890
        return this;
×
1891
      }
1892

1893
      /** Custom text that should be displayed after the payment confirmation button. */
1894
      public Builder setAfterSubmit(EmptyParam afterSubmit) {
1895
        this.afterSubmit = afterSubmit;
×
1896
        return this;
×
1897
      }
1898

1899
      /**
1900
       * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll`
1901
       * call, and subsequent calls add additional key/value pairs to the original map. See {@link
1902
       * PaymentLinkUpdateParams.CustomText#extraParams} for the field documentation.
1903
       */
1904
      public Builder putExtraParam(String key, Object value) {
1905
        if (this.extraParams == null) {
×
1906
          this.extraParams = new HashMap<>();
×
1907
        }
1908
        this.extraParams.put(key, value);
×
1909
        return this;
×
1910
      }
1911

1912
      /**
1913
       * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
1914
       * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map.
1915
       * See {@link PaymentLinkUpdateParams.CustomText#extraParams} for the field documentation.
1916
       */
1917
      public Builder putAllExtraParam(Map<String, Object> map) {
1918
        if (this.extraParams == null) {
×
1919
          this.extraParams = new HashMap<>();
×
1920
        }
1921
        this.extraParams.putAll(map);
×
1922
        return this;
×
1923
      }
1924

1925
      /** Custom text that should be displayed alongside shipping address collection. */
1926
      public Builder setShippingAddress(
1927
          PaymentLinkUpdateParams.CustomText.ShippingAddress shippingAddress) {
1928
        this.shippingAddress = shippingAddress;
×
1929
        return this;
×
1930
      }
1931

1932
      /** Custom text that should be displayed alongside shipping address collection. */
1933
      public Builder setShippingAddress(EmptyParam shippingAddress) {
1934
        this.shippingAddress = shippingAddress;
×
1935
        return this;
×
1936
      }
1937

1938
      /** Custom text that should be displayed alongside the payment confirmation button. */
1939
      public Builder setSubmit(PaymentLinkUpdateParams.CustomText.Submit submit) {
1940
        this.submit = submit;
×
1941
        return this;
×
1942
      }
1943

1944
      /** Custom text that should be displayed alongside the payment confirmation button. */
1945
      public Builder setSubmit(EmptyParam submit) {
1946
        this.submit = submit;
×
1947
        return this;
×
1948
      }
1949

1950
      /**
1951
       * Custom text that should be displayed in place of the default terms of service agreement
1952
       * text.
1953
       */
1954
      public Builder setTermsOfServiceAcceptance(
1955
          PaymentLinkUpdateParams.CustomText.TermsOfServiceAcceptance termsOfServiceAcceptance) {
1956
        this.termsOfServiceAcceptance = termsOfServiceAcceptance;
×
1957
        return this;
×
1958
      }
1959

1960
      /**
1961
       * Custom text that should be displayed in place of the default terms of service agreement
1962
       * text.
1963
       */
1964
      public Builder setTermsOfServiceAcceptance(EmptyParam termsOfServiceAcceptance) {
1965
        this.termsOfServiceAcceptance = termsOfServiceAcceptance;
×
1966
        return this;
×
1967
      }
1968
    }
1969

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

1981
      /** <strong>Required.</strong> Text may be up to 1200 characters in length. */
1982
      @SerializedName("message")
1983
      Object message;
1984

1985
      private AfterSubmit(Map<String, Object> extraParams, Object message) {
×
1986
        this.extraParams = extraParams;
×
1987
        this.message = message;
×
1988
      }
×
1989

1990
      public static Builder builder() {
1991
        return new Builder();
×
1992
      }
1993

1994
      public static class Builder {
×
1995
        private Map<String, Object> extraParams;
1996

1997
        private Object message;
1998

1999
        /** Finalize and obtain parameter instance from this builder. */
2000
        public PaymentLinkUpdateParams.CustomText.AfterSubmit build() {
2001
          return new PaymentLinkUpdateParams.CustomText.AfterSubmit(this.extraParams, this.message);
×
2002
        }
2003

2004
        /**
2005
         * Add a key/value pair to `extraParams` map. A map is initialized for the first
2006
         * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
2007
         * map. See {@link PaymentLinkUpdateParams.CustomText.AfterSubmit#extraParams} for the field
2008
         * documentation.
2009
         */
2010
        public Builder putExtraParam(String key, Object value) {
2011
          if (this.extraParams == null) {
×
2012
            this.extraParams = new HashMap<>();
×
2013
          }
2014
          this.extraParams.put(key, value);
×
2015
          return this;
×
2016
        }
2017

2018
        /**
2019
         * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
2020
         * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
2021
         * map. See {@link PaymentLinkUpdateParams.CustomText.AfterSubmit#extraParams} for the field
2022
         * documentation.
2023
         */
2024
        public Builder putAllExtraParam(Map<String, Object> map) {
2025
          if (this.extraParams == null) {
×
2026
            this.extraParams = new HashMap<>();
×
2027
          }
2028
          this.extraParams.putAll(map);
×
2029
          return this;
×
2030
        }
2031

2032
        /** <strong>Required.</strong> Text may be up to 1200 characters in length. */
2033
        public Builder setMessage(String message) {
2034
          this.message = message;
×
2035
          return this;
×
2036
        }
2037

2038
        /** <strong>Required.</strong> Text may be up to 1200 characters in length. */
2039
        public Builder setMessage(EmptyParam message) {
2040
          this.message = message;
×
2041
          return this;
×
2042
        }
2043
      }
2044
    }
2045

2046
    @Getter
2047
    public static class ShippingAddress {
2048
      /**
2049
       * Map of extra parameters for custom features not available in this client library. The
2050
       * content in this map is not serialized under this field's {@code @SerializedName} value.
2051
       * Instead, each key/value pair is serialized as if the key is a root-level field (serialized)
2052
       * name in this param object. Effectively, this map is flattened to its parent instance.
2053
       */
2054
      @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
2055
      Map<String, Object> extraParams;
2056

2057
      /** <strong>Required.</strong> Text may be up to 1200 characters in length. */
2058
      @SerializedName("message")
2059
      Object message;
2060

2061
      private ShippingAddress(Map<String, Object> extraParams, Object message) {
×
2062
        this.extraParams = extraParams;
×
2063
        this.message = message;
×
2064
      }
×
2065

2066
      public static Builder builder() {
2067
        return new Builder();
×
2068
      }
2069

2070
      public static class Builder {
×
2071
        private Map<String, Object> extraParams;
2072

2073
        private Object message;
2074

2075
        /** Finalize and obtain parameter instance from this builder. */
2076
        public PaymentLinkUpdateParams.CustomText.ShippingAddress build() {
2077
          return new PaymentLinkUpdateParams.CustomText.ShippingAddress(
×
2078
              this.extraParams, this.message);
2079
        }
2080

2081
        /**
2082
         * Add a key/value pair to `extraParams` map. A map is initialized for the first
2083
         * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
2084
         * map. See {@link PaymentLinkUpdateParams.CustomText.ShippingAddress#extraParams} for the
2085
         * field documentation.
2086
         */
2087
        public Builder putExtraParam(String key, Object value) {
2088
          if (this.extraParams == null) {
×
2089
            this.extraParams = new HashMap<>();
×
2090
          }
2091
          this.extraParams.put(key, value);
×
2092
          return this;
×
2093
        }
2094

2095
        /**
2096
         * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
2097
         * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
2098
         * map. See {@link PaymentLinkUpdateParams.CustomText.ShippingAddress#extraParams} for the
2099
         * field documentation.
2100
         */
2101
        public Builder putAllExtraParam(Map<String, Object> map) {
2102
          if (this.extraParams == null) {
×
2103
            this.extraParams = new HashMap<>();
×
2104
          }
2105
          this.extraParams.putAll(map);
×
2106
          return this;
×
2107
        }
2108

2109
        /** <strong>Required.</strong> Text may be up to 1200 characters in length. */
2110
        public Builder setMessage(String message) {
2111
          this.message = message;
×
2112
          return this;
×
2113
        }
2114

2115
        /** <strong>Required.</strong> Text may be up to 1200 characters in length. */
2116
        public Builder setMessage(EmptyParam message) {
2117
          this.message = message;
×
2118
          return this;
×
2119
        }
2120
      }
2121
    }
2122

2123
    @Getter
2124
    public static class Submit {
2125
      /**
2126
       * Map of extra parameters for custom features not available in this client library. The
2127
       * content in this map is not serialized under this field's {@code @SerializedName} value.
2128
       * Instead, each key/value pair is serialized as if the key is a root-level field (serialized)
2129
       * name in this param object. Effectively, this map is flattened to its parent instance.
2130
       */
2131
      @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
2132
      Map<String, Object> extraParams;
2133

2134
      /** <strong>Required.</strong> Text may be up to 1200 characters in length. */
2135
      @SerializedName("message")
2136
      Object message;
2137

2138
      private Submit(Map<String, Object> extraParams, Object message) {
×
2139
        this.extraParams = extraParams;
×
2140
        this.message = message;
×
2141
      }
×
2142

2143
      public static Builder builder() {
2144
        return new Builder();
×
2145
      }
2146

2147
      public static class Builder {
×
2148
        private Map<String, Object> extraParams;
2149

2150
        private Object message;
2151

2152
        /** Finalize and obtain parameter instance from this builder. */
2153
        public PaymentLinkUpdateParams.CustomText.Submit build() {
2154
          return new PaymentLinkUpdateParams.CustomText.Submit(this.extraParams, this.message);
×
2155
        }
2156

2157
        /**
2158
         * Add a key/value pair to `extraParams` map. A map is initialized for the first
2159
         * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
2160
         * map. See {@link PaymentLinkUpdateParams.CustomText.Submit#extraParams} for the field
2161
         * documentation.
2162
         */
2163
        public Builder putExtraParam(String key, Object value) {
2164
          if (this.extraParams == null) {
×
2165
            this.extraParams = new HashMap<>();
×
2166
          }
2167
          this.extraParams.put(key, value);
×
2168
          return this;
×
2169
        }
2170

2171
        /**
2172
         * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
2173
         * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
2174
         * map. See {@link PaymentLinkUpdateParams.CustomText.Submit#extraParams} for the field
2175
         * documentation.
2176
         */
2177
        public Builder putAllExtraParam(Map<String, Object> map) {
2178
          if (this.extraParams == null) {
×
2179
            this.extraParams = new HashMap<>();
×
2180
          }
2181
          this.extraParams.putAll(map);
×
2182
          return this;
×
2183
        }
2184

2185
        /** <strong>Required.</strong> Text may be up to 1200 characters in length. */
2186
        public Builder setMessage(String message) {
2187
          this.message = message;
×
2188
          return this;
×
2189
        }
2190

2191
        /** <strong>Required.</strong> Text may be up to 1200 characters in length. */
2192
        public Builder setMessage(EmptyParam message) {
2193
          this.message = message;
×
2194
          return this;
×
2195
        }
2196
      }
2197
    }
2198

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

2210
      /** <strong>Required.</strong> Text may be up to 1200 characters in length. */
2211
      @SerializedName("message")
2212
      Object message;
2213

2214
      private TermsOfServiceAcceptance(Map<String, Object> extraParams, Object message) {
×
2215
        this.extraParams = extraParams;
×
2216
        this.message = message;
×
2217
      }
×
2218

2219
      public static Builder builder() {
2220
        return new Builder();
×
2221
      }
2222

2223
      public static class Builder {
×
2224
        private Map<String, Object> extraParams;
2225

2226
        private Object message;
2227

2228
        /** Finalize and obtain parameter instance from this builder. */
2229
        public PaymentLinkUpdateParams.CustomText.TermsOfServiceAcceptance build() {
2230
          return new PaymentLinkUpdateParams.CustomText.TermsOfServiceAcceptance(
×
2231
              this.extraParams, this.message);
2232
        }
2233

2234
        /**
2235
         * Add a key/value pair to `extraParams` map. A map is initialized for the first
2236
         * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
2237
         * map. See {@link PaymentLinkUpdateParams.CustomText.TermsOfServiceAcceptance#extraParams}
2238
         * for the field documentation.
2239
         */
2240
        public Builder putExtraParam(String key, Object value) {
2241
          if (this.extraParams == null) {
×
2242
            this.extraParams = new HashMap<>();
×
2243
          }
2244
          this.extraParams.put(key, value);
×
2245
          return this;
×
2246
        }
2247

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

2262
        /** <strong>Required.</strong> Text may be up to 1200 characters in length. */
2263
        public Builder setMessage(String message) {
2264
          this.message = message;
×
2265
          return this;
×
2266
        }
2267

2268
        /** <strong>Required.</strong> Text may be up to 1200 characters in length. */
2269
        public Builder setMessage(EmptyParam message) {
2270
          this.message = message;
×
2271
          return this;
×
2272
        }
2273
      }
2274
    }
2275
  }
2276

2277
  @Getter
2278
  public static class InvoiceCreation {
2279
    /** <strong>Required.</strong> Whether the feature is enabled */
2280
    @SerializedName("enabled")
2281
    Boolean enabled;
2282

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

2292
    /** Invoice PDF configuration. */
2293
    @SerializedName("invoice_data")
2294
    InvoiceData invoiceData;
2295

2296
    private InvoiceCreation(
2297
        Boolean enabled, Map<String, Object> extraParams, InvoiceData invoiceData) {
×
2298
      this.enabled = enabled;
×
2299
      this.extraParams = extraParams;
×
2300
      this.invoiceData = invoiceData;
×
2301
    }
×
2302

2303
    public static Builder builder() {
2304
      return new Builder();
×
2305
    }
2306

2307
    public static class Builder {
×
2308
      private Boolean enabled;
2309

2310
      private Map<String, Object> extraParams;
2311

2312
      private InvoiceData invoiceData;
2313

2314
      /** Finalize and obtain parameter instance from this builder. */
2315
      public PaymentLinkUpdateParams.InvoiceCreation build() {
2316
        return new PaymentLinkUpdateParams.InvoiceCreation(
×
2317
            this.enabled, this.extraParams, this.invoiceData);
2318
      }
2319

2320
      /** <strong>Required.</strong> Whether the feature is enabled */
2321
      public Builder setEnabled(Boolean enabled) {
2322
        this.enabled = enabled;
×
2323
        return this;
×
2324
      }
2325

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

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

2353
      /** Invoice PDF configuration. */
2354
      public Builder setInvoiceData(
2355
          PaymentLinkUpdateParams.InvoiceCreation.InvoiceData invoiceData) {
2356
        this.invoiceData = invoiceData;
×
2357
        return this;
×
2358
      }
2359
    }
2360

2361
    @Getter
2362
    public static class InvoiceData {
2363
      /** The account tax IDs associated with the invoice. */
2364
      @SerializedName("account_tax_ids")
2365
      Object accountTaxIds;
2366

2367
      /** Default custom fields to be displayed on invoices for this customer. */
2368
      @SerializedName("custom_fields")
2369
      Object customFields;
2370

2371
      /** An arbitrary string attached to the object. Often useful for displaying to users. */
2372
      @SerializedName("description")
2373
      Object description;
2374

2375
      /**
2376
       * Map of extra parameters for custom features not available in this client library. The
2377
       * content in this map is not serialized under this field's {@code @SerializedName} value.
2378
       * Instead, each key/value pair is serialized as if the key is a root-level field (serialized)
2379
       * name in this param object. Effectively, this map is flattened to its parent instance.
2380
       */
2381
      @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
2382
      Map<String, Object> extraParams;
2383

2384
      /** Default footer to be displayed on invoices for this customer. */
2385
      @SerializedName("footer")
2386
      Object footer;
2387

2388
      /**
2389
       * The connected account that issues the invoice. The invoice is presented with the branding
2390
       * and support information of the specified account.
2391
       */
2392
      @SerializedName("issuer")
2393
      Issuer issuer;
2394

2395
      /**
2396
       * Set of <a href="https://stripe.com/docs/api/metadata">key-value pairs</a> that you can
2397
       * attach to an object. This can be useful for storing additional information about the object
2398
       * in a structured format. Individual keys can be unset by posting an empty value to them. All
2399
       * keys can be unset by posting an empty value to {@code metadata}.
2400
       */
2401
      @SerializedName("metadata")
2402
      Object metadata;
2403

2404
      /** Default options for invoice PDF rendering for this customer. */
2405
      @SerializedName("rendering_options")
2406
      Object renderingOptions;
2407

2408
      private InvoiceData(
2409
          Object accountTaxIds,
2410
          Object customFields,
2411
          Object description,
2412
          Map<String, Object> extraParams,
2413
          Object footer,
2414
          Issuer issuer,
2415
          Object metadata,
2416
          Object renderingOptions) {
×
2417
        this.accountTaxIds = accountTaxIds;
×
2418
        this.customFields = customFields;
×
2419
        this.description = description;
×
2420
        this.extraParams = extraParams;
×
2421
        this.footer = footer;
×
2422
        this.issuer = issuer;
×
2423
        this.metadata = metadata;
×
2424
        this.renderingOptions = renderingOptions;
×
2425
      }
×
2426

2427
      public static Builder builder() {
2428
        return new Builder();
×
2429
      }
2430

2431
      public static class Builder {
×
2432
        private Object accountTaxIds;
2433

2434
        private Object customFields;
2435

2436
        private Object description;
2437

2438
        private Map<String, Object> extraParams;
2439

2440
        private Object footer;
2441

2442
        private Issuer issuer;
2443

2444
        private Object metadata;
2445

2446
        private Object renderingOptions;
2447

2448
        /** Finalize and obtain parameter instance from this builder. */
2449
        public PaymentLinkUpdateParams.InvoiceCreation.InvoiceData build() {
2450
          return new PaymentLinkUpdateParams.InvoiceCreation.InvoiceData(
×
2451
              this.accountTaxIds,
2452
              this.customFields,
2453
              this.description,
2454
              this.extraParams,
2455
              this.footer,
2456
              this.issuer,
2457
              this.metadata,
2458
              this.renderingOptions);
2459
        }
2460

2461
        /**
2462
         * Add an element to `accountTaxIds` list. A list is initialized for the first `add/addAll`
2463
         * call, and subsequent calls adds additional elements to the original list. See {@link
2464
         * PaymentLinkUpdateParams.InvoiceCreation.InvoiceData#accountTaxIds} for the field
2465
         * documentation.
2466
         */
2467
        @SuppressWarnings("unchecked")
2468
        public Builder addAccountTaxId(String element) {
2469
          if (this.accountTaxIds == null || this.accountTaxIds instanceof EmptyParam) {
×
2470
            this.accountTaxIds = new ArrayList<String>();
×
2471
          }
2472
          ((List<String>) this.accountTaxIds).add(element);
×
2473
          return this;
×
2474
        }
2475

2476
        /**
2477
         * Add all elements to `accountTaxIds` list. A list is initialized for the first
2478
         * `add/addAll` call, and subsequent calls adds additional elements to the original list.
2479
         * See {@link PaymentLinkUpdateParams.InvoiceCreation.InvoiceData#accountTaxIds} for the
2480
         * field documentation.
2481
         */
2482
        @SuppressWarnings("unchecked")
2483
        public Builder addAllAccountTaxId(List<String> elements) {
2484
          if (this.accountTaxIds == null || this.accountTaxIds instanceof EmptyParam) {
×
2485
            this.accountTaxIds = new ArrayList<String>();
×
2486
          }
2487
          ((List<String>) this.accountTaxIds).addAll(elements);
×
2488
          return this;
×
2489
        }
2490

2491
        /** The account tax IDs associated with the invoice. */
2492
        public Builder setAccountTaxIds(EmptyParam accountTaxIds) {
2493
          this.accountTaxIds = accountTaxIds;
×
2494
          return this;
×
2495
        }
2496

2497
        /** The account tax IDs associated with the invoice. */
2498
        public Builder setAccountTaxIds(List<String> accountTaxIds) {
2499
          this.accountTaxIds = accountTaxIds;
×
2500
          return this;
×
2501
        }
2502

2503
        /**
2504
         * Add an element to `customFields` list. A list is initialized for the first `add/addAll`
2505
         * call, and subsequent calls adds additional elements to the original list. See {@link
2506
         * PaymentLinkUpdateParams.InvoiceCreation.InvoiceData#customFields} for the field
2507
         * documentation.
2508
         */
2509
        @SuppressWarnings("unchecked")
2510
        public Builder addCustomField(
2511
            PaymentLinkUpdateParams.InvoiceCreation.InvoiceData.CustomField element) {
2512
          if (this.customFields == null || this.customFields instanceof EmptyParam) {
×
2513
            this.customFields =
×
2514
                new ArrayList<PaymentLinkUpdateParams.InvoiceCreation.InvoiceData.CustomField>();
2515
          }
2516
          ((List<PaymentLinkUpdateParams.InvoiceCreation.InvoiceData.CustomField>)
×
2517
                  this.customFields)
2518
              .add(element);
×
2519
          return this;
×
2520
        }
2521

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

2541
        /** Default custom fields to be displayed on invoices for this customer. */
2542
        public Builder setCustomFields(EmptyParam customFields) {
2543
          this.customFields = customFields;
×
2544
          return this;
×
2545
        }
2546

2547
        /** Default custom fields to be displayed on invoices for this customer. */
2548
        public Builder setCustomFields(
2549
            List<PaymentLinkUpdateParams.InvoiceCreation.InvoiceData.CustomField> customFields) {
2550
          this.customFields = customFields;
×
2551
          return this;
×
2552
        }
2553

2554
        /** An arbitrary string attached to the object. Often useful for displaying to users. */
2555
        public Builder setDescription(String description) {
2556
          this.description = description;
×
2557
          return this;
×
2558
        }
2559

2560
        /** An arbitrary string attached to the object. Often useful for displaying to users. */
2561
        public Builder setDescription(EmptyParam description) {
2562
          this.description = description;
×
2563
          return this;
×
2564
        }
2565

2566
        /**
2567
         * Add a key/value pair to `extraParams` map. A map is initialized for the first
2568
         * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
2569
         * map. See {@link PaymentLinkUpdateParams.InvoiceCreation.InvoiceData#extraParams} for the
2570
         * field documentation.
2571
         */
2572
        public Builder putExtraParam(String key, Object value) {
2573
          if (this.extraParams == null) {
×
2574
            this.extraParams = new HashMap<>();
×
2575
          }
2576
          this.extraParams.put(key, value);
×
2577
          return this;
×
2578
        }
2579

2580
        /**
2581
         * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
2582
         * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
2583
         * map. See {@link PaymentLinkUpdateParams.InvoiceCreation.InvoiceData#extraParams} for the
2584
         * field documentation.
2585
         */
2586
        public Builder putAllExtraParam(Map<String, Object> map) {
2587
          if (this.extraParams == null) {
×
2588
            this.extraParams = new HashMap<>();
×
2589
          }
2590
          this.extraParams.putAll(map);
×
2591
          return this;
×
2592
        }
2593

2594
        /** Default footer to be displayed on invoices for this customer. */
2595
        public Builder setFooter(String footer) {
2596
          this.footer = footer;
×
2597
          return this;
×
2598
        }
2599

2600
        /** Default footer to be displayed on invoices for this customer. */
2601
        public Builder setFooter(EmptyParam footer) {
2602
          this.footer = footer;
×
2603
          return this;
×
2604
        }
2605

2606
        /**
2607
         * The connected account that issues the invoice. The invoice is presented with the branding
2608
         * and support information of the specified account.
2609
         */
2610
        public Builder setIssuer(
2611
            PaymentLinkUpdateParams.InvoiceCreation.InvoiceData.Issuer issuer) {
2612
          this.issuer = issuer;
×
2613
          return this;
×
2614
        }
2615

2616
        /**
2617
         * Add a key/value pair to `metadata` map. A map is initialized for the first `put/putAll`
2618
         * call, and subsequent calls add additional key/value pairs to the original map. See {@link
2619
         * PaymentLinkUpdateParams.InvoiceCreation.InvoiceData#metadata} for the field
2620
         * documentation.
2621
         */
2622
        @SuppressWarnings("unchecked")
2623
        public Builder putMetadata(String key, String value) {
2624
          if (this.metadata == null || this.metadata instanceof EmptyParam) {
×
2625
            this.metadata = new HashMap<String, String>();
×
2626
          }
2627
          ((Map<String, String>) this.metadata).put(key, value);
×
2628
          return this;
×
2629
        }
2630

2631
        /**
2632
         * Add all map key/value pairs to `metadata` map. A map is initialized for the first
2633
         * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
2634
         * map. See {@link PaymentLinkUpdateParams.InvoiceCreation.InvoiceData#metadata} for the
2635
         * field documentation.
2636
         */
2637
        @SuppressWarnings("unchecked")
2638
        public Builder putAllMetadata(Map<String, String> map) {
2639
          if (this.metadata == null || this.metadata instanceof EmptyParam) {
×
2640
            this.metadata = new HashMap<String, String>();
×
2641
          }
2642
          ((Map<String, String>) this.metadata).putAll(map);
×
2643
          return this;
×
2644
        }
2645

2646
        /**
2647
         * Set of <a href="https://stripe.com/docs/api/metadata">key-value pairs</a> that you can
2648
         * attach to an object. This can be useful for storing additional information about the
2649
         * object in a structured format. Individual keys can be unset by posting an empty value to
2650
         * them. All keys can be unset by posting an empty value to {@code metadata}.
2651
         */
2652
        public Builder setMetadata(EmptyParam metadata) {
2653
          this.metadata = metadata;
×
2654
          return this;
×
2655
        }
2656

2657
        /**
2658
         * Set of <a href="https://stripe.com/docs/api/metadata">key-value pairs</a> that you can
2659
         * attach to an object. This can be useful for storing additional information about the
2660
         * object in a structured format. Individual keys can be unset by posting an empty value to
2661
         * them. All keys can be unset by posting an empty value to {@code metadata}.
2662
         */
2663
        public Builder setMetadata(Map<String, String> metadata) {
2664
          this.metadata = metadata;
×
2665
          return this;
×
2666
        }
2667

2668
        /** Default options for invoice PDF rendering for this customer. */
2669
        public Builder setRenderingOptions(
2670
            PaymentLinkUpdateParams.InvoiceCreation.InvoiceData.RenderingOptions renderingOptions) {
2671
          this.renderingOptions = renderingOptions;
×
2672
          return this;
×
2673
        }
2674

2675
        /** Default options for invoice PDF rendering for this customer. */
2676
        public Builder setRenderingOptions(EmptyParam renderingOptions) {
2677
          this.renderingOptions = renderingOptions;
×
2678
          return this;
×
2679
        }
2680
      }
2681

2682
      @Getter
2683
      public static class CustomField {
2684
        /**
2685
         * Map of extra parameters for custom features not available in this client library. The
2686
         * content in this map is not serialized under this field's {@code @SerializedName} value.
2687
         * Instead, each key/value pair is serialized as if the key is a root-level field
2688
         * (serialized) name in this param object. Effectively, this map is flattened to its parent
2689
         * instance.
2690
         */
2691
        @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
2692
        Map<String, Object> extraParams;
2693

2694
        /**
2695
         * <strong>Required.</strong> The name of the custom field. This may be up to 40 characters.
2696
         */
2697
        @SerializedName("name")
2698
        Object name;
2699

2700
        /**
2701
         * <strong>Required.</strong> The value of the custom field. This may be up to 140
2702
         * characters.
2703
         */
2704
        @SerializedName("value")
2705
        Object value;
2706

2707
        private CustomField(Map<String, Object> extraParams, Object name, Object value) {
×
2708
          this.extraParams = extraParams;
×
2709
          this.name = name;
×
2710
          this.value = value;
×
2711
        }
×
2712

2713
        public static Builder builder() {
2714
          return new Builder();
×
2715
        }
2716

2717
        public static class Builder {
×
2718
          private Map<String, Object> extraParams;
2719

2720
          private Object name;
2721

2722
          private Object value;
2723

2724
          /** Finalize and obtain parameter instance from this builder. */
2725
          public PaymentLinkUpdateParams.InvoiceCreation.InvoiceData.CustomField build() {
2726
            return new PaymentLinkUpdateParams.InvoiceCreation.InvoiceData.CustomField(
×
2727
                this.extraParams, this.name, this.value);
2728
          }
2729

2730
          /**
2731
           * Add a key/value pair to `extraParams` map. A map is initialized for the first
2732
           * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
2733
           * map. See {@link
2734
           * PaymentLinkUpdateParams.InvoiceCreation.InvoiceData.CustomField#extraParams} for the
2735
           * field documentation.
2736
           */
2737
          public Builder putExtraParam(String key, Object value) {
2738
            if (this.extraParams == null) {
×
2739
              this.extraParams = new HashMap<>();
×
2740
            }
2741
            this.extraParams.put(key, value);
×
2742
            return this;
×
2743
          }
2744

2745
          /**
2746
           * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
2747
           * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
2748
           * map. See {@link
2749
           * PaymentLinkUpdateParams.InvoiceCreation.InvoiceData.CustomField#extraParams} for the
2750
           * field documentation.
2751
           */
2752
          public Builder putAllExtraParam(Map<String, Object> map) {
2753
            if (this.extraParams == null) {
×
2754
              this.extraParams = new HashMap<>();
×
2755
            }
2756
            this.extraParams.putAll(map);
×
2757
            return this;
×
2758
          }
2759

2760
          /**
2761
           * <strong>Required.</strong> The name of the custom field. This may be up to 40
2762
           * characters.
2763
           */
2764
          public Builder setName(String name) {
2765
            this.name = name;
×
2766
            return this;
×
2767
          }
2768

2769
          /**
2770
           * <strong>Required.</strong> The name of the custom field. This may be up to 40
2771
           * characters.
2772
           */
2773
          public Builder setName(EmptyParam name) {
2774
            this.name = name;
×
2775
            return this;
×
2776
          }
2777

2778
          /**
2779
           * <strong>Required.</strong> The value of the custom field. This may be up to 140
2780
           * characters.
2781
           */
2782
          public Builder setValue(String value) {
2783
            this.value = value;
×
2784
            return this;
×
2785
          }
2786

2787
          /**
2788
           * <strong>Required.</strong> The value of the custom field. This may be up to 140
2789
           * characters.
2790
           */
2791
          public Builder setValue(EmptyParam value) {
2792
            this.value = value;
×
2793
            return this;
×
2794
          }
2795
        }
2796
      }
2797

2798
      @Getter
2799
      public static class Issuer {
2800
        /** The connected account being referenced when {@code type} is {@code account}. */
2801
        @SerializedName("account")
2802
        Object account;
2803

2804
        /**
2805
         * Map of extra parameters for custom features not available in this client library. The
2806
         * content in this map is not serialized under this field's {@code @SerializedName} value.
2807
         * Instead, each key/value pair is serialized as if the key is a root-level field
2808
         * (serialized) name in this param object. Effectively, this map is flattened to its parent
2809
         * instance.
2810
         */
2811
        @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
2812
        Map<String, Object> extraParams;
2813

2814
        /** <strong>Required.</strong> Type of the account referenced in the request. */
2815
        @SerializedName("type")
2816
        Type type;
2817

2818
        private Issuer(Object account, Map<String, Object> extraParams, Type type) {
×
2819
          this.account = account;
×
2820
          this.extraParams = extraParams;
×
2821
          this.type = type;
×
2822
        }
×
2823

2824
        public static Builder builder() {
2825
          return new Builder();
×
2826
        }
2827

2828
        public static class Builder {
×
2829
          private Object account;
2830

2831
          private Map<String, Object> extraParams;
2832

2833
          private Type type;
2834

2835
          /** Finalize and obtain parameter instance from this builder. */
2836
          public PaymentLinkUpdateParams.InvoiceCreation.InvoiceData.Issuer build() {
2837
            return new PaymentLinkUpdateParams.InvoiceCreation.InvoiceData.Issuer(
×
2838
                this.account, this.extraParams, this.type);
2839
          }
2840

2841
          /** The connected account being referenced when {@code type} is {@code account}. */
2842
          public Builder setAccount(String account) {
2843
            this.account = account;
×
2844
            return this;
×
2845
          }
2846

2847
          /** The connected account being referenced when {@code type} is {@code account}. */
2848
          public Builder setAccount(EmptyParam account) {
2849
            this.account = account;
×
2850
            return this;
×
2851
          }
2852

2853
          /**
2854
           * Add a key/value pair to `extraParams` map. A map is initialized for the first
2855
           * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
2856
           * map. See {@link PaymentLinkUpdateParams.InvoiceCreation.InvoiceData.Issuer#extraParams}
2857
           * for the field documentation.
2858
           */
2859
          public Builder putExtraParam(String key, Object value) {
2860
            if (this.extraParams == null) {
×
2861
              this.extraParams = new HashMap<>();
×
2862
            }
2863
            this.extraParams.put(key, value);
×
2864
            return this;
×
2865
          }
2866

2867
          /**
2868
           * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
2869
           * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
2870
           * map. See {@link PaymentLinkUpdateParams.InvoiceCreation.InvoiceData.Issuer#extraParams}
2871
           * for the field documentation.
2872
           */
2873
          public Builder putAllExtraParam(Map<String, Object> map) {
2874
            if (this.extraParams == null) {
×
2875
              this.extraParams = new HashMap<>();
×
2876
            }
2877
            this.extraParams.putAll(map);
×
2878
            return this;
×
2879
          }
2880

2881
          /** <strong>Required.</strong> Type of the account referenced in the request. */
2882
          public Builder setType(
2883
              PaymentLinkUpdateParams.InvoiceCreation.InvoiceData.Issuer.Type type) {
2884
            this.type = type;
×
2885
            return this;
×
2886
          }
2887
        }
2888

2889
        public enum Type implements ApiRequestParams.EnumParam {
×
2890
          @SerializedName("account")
×
2891
          ACCOUNT("account"),
2892

2893
          @SerializedName("self")
×
2894
          SELF("self");
2895

2896
          @Getter(onMethod_ = {@Override})
2897
          private final String value;
2898

2899
          Type(String value) {
×
2900
            this.value = value;
×
2901
          }
×
2902
        }
2903
      }
2904

2905
      @Getter
2906
      public static class RenderingOptions {
2907
        /**
2908
         * How line-item prices and amounts will be displayed with respect to tax on invoice PDFs.
2909
         * One of {@code exclude_tax} or {@code include_inclusive_tax}. {@code
2910
         * include_inclusive_tax} will include inclusive tax (and exclude exclusive tax) in invoice
2911
         * PDF amounts. {@code exclude_tax} will exclude all tax (inclusive and exclusive alike)
2912
         * from invoice PDF amounts.
2913
         */
2914
        @SerializedName("amount_tax_display")
2915
        ApiRequestParams.EnumParam amountTaxDisplay;
2916

2917
        /**
2918
         * Map of extra parameters for custom features not available in this client library. The
2919
         * content in this map is not serialized under this field's {@code @SerializedName} value.
2920
         * Instead, each key/value pair is serialized as if the key is a root-level field
2921
         * (serialized) name in this param object. Effectively, this map is flattened to its parent
2922
         * instance.
2923
         */
2924
        @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
2925
        Map<String, Object> extraParams;
2926

2927
        private RenderingOptions(
2928
            ApiRequestParams.EnumParam amountTaxDisplay, Map<String, Object> extraParams) {
×
2929
          this.amountTaxDisplay = amountTaxDisplay;
×
2930
          this.extraParams = extraParams;
×
2931
        }
×
2932

2933
        public static Builder builder() {
2934
          return new Builder();
×
2935
        }
2936

2937
        public static class Builder {
×
2938
          private ApiRequestParams.EnumParam amountTaxDisplay;
2939

2940
          private Map<String, Object> extraParams;
2941

2942
          /** Finalize and obtain parameter instance from this builder. */
2943
          public PaymentLinkUpdateParams.InvoiceCreation.InvoiceData.RenderingOptions build() {
2944
            return new PaymentLinkUpdateParams.InvoiceCreation.InvoiceData.RenderingOptions(
×
2945
                this.amountTaxDisplay, this.extraParams);
2946
          }
2947

2948
          /**
2949
           * How line-item prices and amounts will be displayed with respect to tax on invoice PDFs.
2950
           * One of {@code exclude_tax} or {@code include_inclusive_tax}. {@code
2951
           * include_inclusive_tax} will include inclusive tax (and exclude exclusive tax) in
2952
           * invoice PDF amounts. {@code exclude_tax} will exclude all tax (inclusive and exclusive
2953
           * alike) from invoice PDF amounts.
2954
           */
2955
          public Builder setAmountTaxDisplay(
2956
              PaymentLinkUpdateParams.InvoiceCreation.InvoiceData.RenderingOptions.AmountTaxDisplay
2957
                  amountTaxDisplay) {
2958
            this.amountTaxDisplay = amountTaxDisplay;
×
2959
            return this;
×
2960
          }
2961

2962
          /**
2963
           * How line-item prices and amounts will be displayed with respect to tax on invoice PDFs.
2964
           * One of {@code exclude_tax} or {@code include_inclusive_tax}. {@code
2965
           * include_inclusive_tax} will include inclusive tax (and exclude exclusive tax) in
2966
           * invoice PDF amounts. {@code exclude_tax} will exclude all tax (inclusive and exclusive
2967
           * alike) from invoice PDF amounts.
2968
           */
2969
          public Builder setAmountTaxDisplay(EmptyParam amountTaxDisplay) {
2970
            this.amountTaxDisplay = amountTaxDisplay;
×
2971
            return this;
×
2972
          }
2973

2974
          /**
2975
           * Add a key/value pair to `extraParams` map. A map is initialized for the first
2976
           * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
2977
           * map. See {@link
2978
           * PaymentLinkUpdateParams.InvoiceCreation.InvoiceData.RenderingOptions#extraParams} for
2979
           * the field documentation.
2980
           */
2981
          public Builder putExtraParam(String key, Object value) {
2982
            if (this.extraParams == null) {
×
2983
              this.extraParams = new HashMap<>();
×
2984
            }
2985
            this.extraParams.put(key, value);
×
2986
            return this;
×
2987
          }
2988

2989
          /**
2990
           * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
2991
           * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
2992
           * map. See {@link
2993
           * PaymentLinkUpdateParams.InvoiceCreation.InvoiceData.RenderingOptions#extraParams} for
2994
           * the field documentation.
2995
           */
2996
          public Builder putAllExtraParam(Map<String, Object> map) {
2997
            if (this.extraParams == null) {
×
2998
              this.extraParams = new HashMap<>();
×
2999
            }
3000
            this.extraParams.putAll(map);
×
3001
            return this;
×
3002
          }
3003
        }
3004

3005
        public enum AmountTaxDisplay implements ApiRequestParams.EnumParam {
×
3006
          @SerializedName("exclude_tax")
×
3007
          EXCLUDE_TAX("exclude_tax"),
3008

3009
          @SerializedName("include_inclusive_tax")
×
3010
          INCLUDE_INCLUSIVE_TAX("include_inclusive_tax");
3011

3012
          @Getter(onMethod_ = {@Override})
3013
          private final String value;
3014

3015
          AmountTaxDisplay(String value) {
×
3016
            this.value = value;
×
3017
          }
×
3018
        }
3019
      }
3020
    }
3021
  }
3022

3023
  @Getter
3024
  public static class LineItem {
3025
    /**
3026
     * When set, provides configuration for this item’s quantity to be adjusted by the customer
3027
     * during checkout.
3028
     */
3029
    @SerializedName("adjustable_quantity")
3030
    AdjustableQuantity adjustableQuantity;
3031

3032
    /**
3033
     * Map of extra parameters for custom features not available in this client library. The content
3034
     * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each
3035
     * key/value pair is serialized as if the key is a root-level field (serialized) name in this
3036
     * param object. Effectively, this map is flattened to its parent instance.
3037
     */
3038
    @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
3039
    Map<String, Object> extraParams;
3040

3041
    /** <strong>Required.</strong> The ID of an existing line item on the payment link. */
3042
    @SerializedName("id")
3043
    Object id;
3044

3045
    /** The quantity of the line item being purchased. */
3046
    @SerializedName("quantity")
3047
    Long quantity;
3048

3049
    private LineItem(
3050
        AdjustableQuantity adjustableQuantity,
3051
        Map<String, Object> extraParams,
3052
        Object id,
3053
        Long quantity) {
×
3054
      this.adjustableQuantity = adjustableQuantity;
×
3055
      this.extraParams = extraParams;
×
3056
      this.id = id;
×
3057
      this.quantity = quantity;
×
3058
    }
×
3059

3060
    public static Builder builder() {
3061
      return new Builder();
×
3062
    }
3063

3064
    public static class Builder {
×
3065
      private AdjustableQuantity adjustableQuantity;
3066

3067
      private Map<String, Object> extraParams;
3068

3069
      private Object id;
3070

3071
      private Long quantity;
3072

3073
      /** Finalize and obtain parameter instance from this builder. */
3074
      public PaymentLinkUpdateParams.LineItem build() {
3075
        return new PaymentLinkUpdateParams.LineItem(
×
3076
            this.adjustableQuantity, this.extraParams, this.id, this.quantity);
3077
      }
3078

3079
      /**
3080
       * When set, provides configuration for this item’s quantity to be adjusted by the customer
3081
       * during checkout.
3082
       */
3083
      public Builder setAdjustableQuantity(
3084
          PaymentLinkUpdateParams.LineItem.AdjustableQuantity adjustableQuantity) {
3085
        this.adjustableQuantity = adjustableQuantity;
×
3086
        return this;
×
3087
      }
3088

3089
      /**
3090
       * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll`
3091
       * call, and subsequent calls add additional key/value pairs to the original map. See {@link
3092
       * PaymentLinkUpdateParams.LineItem#extraParams} for the field documentation.
3093
       */
3094
      public Builder putExtraParam(String key, Object value) {
3095
        if (this.extraParams == null) {
×
3096
          this.extraParams = new HashMap<>();
×
3097
        }
3098
        this.extraParams.put(key, value);
×
3099
        return this;
×
3100
      }
3101

3102
      /**
3103
       * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
3104
       * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map.
3105
       * See {@link PaymentLinkUpdateParams.LineItem#extraParams} for the field documentation.
3106
       */
3107
      public Builder putAllExtraParam(Map<String, Object> map) {
3108
        if (this.extraParams == null) {
×
3109
          this.extraParams = new HashMap<>();
×
3110
        }
3111
        this.extraParams.putAll(map);
×
3112
        return this;
×
3113
      }
3114

3115
      /** <strong>Required.</strong> The ID of an existing line item on the payment link. */
3116
      public Builder setId(String id) {
3117
        this.id = id;
×
3118
        return this;
×
3119
      }
3120

3121
      /** <strong>Required.</strong> The ID of an existing line item on the payment link. */
3122
      public Builder setId(EmptyParam id) {
3123
        this.id = id;
×
3124
        return this;
×
3125
      }
3126

3127
      /** The quantity of the line item being purchased. */
3128
      public Builder setQuantity(Long quantity) {
3129
        this.quantity = quantity;
×
3130
        return this;
×
3131
      }
3132
    }
3133

3134
    @Getter
3135
    public static class AdjustableQuantity {
3136
      /**
3137
       * <strong>Required.</strong> Set to true if the quantity can be adjusted to any non-negative
3138
       * Integer.
3139
       */
3140
      @SerializedName("enabled")
3141
      Boolean enabled;
3142

3143
      /**
3144
       * Map of extra parameters for custom features not available in this client library. The
3145
       * content in this map is not serialized under this field's {@code @SerializedName} value.
3146
       * Instead, each key/value pair is serialized as if the key is a root-level field (serialized)
3147
       * name in this param object. Effectively, this map is flattened to its parent instance.
3148
       */
3149
      @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
3150
      Map<String, Object> extraParams;
3151

3152
      /**
3153
       * The maximum quantity the customer can purchase. By default this value is 99. You can
3154
       * specify a value up to 999.
3155
       */
3156
      @SerializedName("maximum")
3157
      Long maximum;
3158

3159
      /**
3160
       * The minimum quantity the customer can purchase. By default this value is 0. If there is
3161
       * only one item in the cart then that item's quantity cannot go down to 0.
3162
       */
3163
      @SerializedName("minimum")
3164
      Long minimum;
3165

3166
      private AdjustableQuantity(
3167
          Boolean enabled, Map<String, Object> extraParams, Long maximum, Long minimum) {
×
3168
        this.enabled = enabled;
×
3169
        this.extraParams = extraParams;
×
3170
        this.maximum = maximum;
×
3171
        this.minimum = minimum;
×
3172
      }
×
3173

3174
      public static Builder builder() {
3175
        return new Builder();
×
3176
      }
3177

3178
      public static class Builder {
×
3179
        private Boolean enabled;
3180

3181
        private Map<String, Object> extraParams;
3182

3183
        private Long maximum;
3184

3185
        private Long minimum;
3186

3187
        /** Finalize and obtain parameter instance from this builder. */
3188
        public PaymentLinkUpdateParams.LineItem.AdjustableQuantity build() {
3189
          return new PaymentLinkUpdateParams.LineItem.AdjustableQuantity(
×
3190
              this.enabled, this.extraParams, this.maximum, this.minimum);
3191
        }
3192

3193
        /**
3194
         * <strong>Required.</strong> Set to true if the quantity can be adjusted to any
3195
         * non-negative Integer.
3196
         */
3197
        public Builder setEnabled(Boolean enabled) {
3198
          this.enabled = enabled;
×
3199
          return this;
×
3200
        }
3201

3202
        /**
3203
         * Add a key/value pair to `extraParams` map. A map is initialized for the first
3204
         * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
3205
         * map. See {@link PaymentLinkUpdateParams.LineItem.AdjustableQuantity#extraParams} for the
3206
         * field documentation.
3207
         */
3208
        public Builder putExtraParam(String key, Object value) {
3209
          if (this.extraParams == null) {
×
3210
            this.extraParams = new HashMap<>();
×
3211
          }
3212
          this.extraParams.put(key, value);
×
3213
          return this;
×
3214
        }
3215

3216
        /**
3217
         * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
3218
         * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
3219
         * map. See {@link PaymentLinkUpdateParams.LineItem.AdjustableQuantity#extraParams} for the
3220
         * field documentation.
3221
         */
3222
        public Builder putAllExtraParam(Map<String, Object> map) {
3223
          if (this.extraParams == null) {
×
3224
            this.extraParams = new HashMap<>();
×
3225
          }
3226
          this.extraParams.putAll(map);
×
3227
          return this;
×
3228
        }
3229

3230
        /**
3231
         * The maximum quantity the customer can purchase. By default this value is 99. You can
3232
         * specify a value up to 999.
3233
         */
3234
        public Builder setMaximum(Long maximum) {
3235
          this.maximum = maximum;
×
3236
          return this;
×
3237
        }
3238

3239
        /**
3240
         * The minimum quantity the customer can purchase. By default this value is 0. If there is
3241
         * only one item in the cart then that item's quantity cannot go down to 0.
3242
         */
3243
        public Builder setMinimum(Long minimum) {
3244
          this.minimum = minimum;
×
3245
          return this;
×
3246
        }
3247
      }
3248
    }
3249
  }
3250

3251
  @Getter
3252
  public static class PaymentIntentData {
3253
    /** An arbitrary string attached to the object. Often useful for displaying to users. */
3254
    @SerializedName("description")
3255
    Object description;
3256

3257
    /**
3258
     * Map of extra parameters for custom features not available in this client library. The content
3259
     * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each
3260
     * key/value pair is serialized as if the key is a root-level field (serialized) name in this
3261
     * param object. Effectively, this map is flattened to its parent instance.
3262
     */
3263
    @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
3264
    Map<String, Object> extraParams;
3265

3266
    /**
3267
     * Set of <a href="https://stripe.com/docs/api/metadata">key-value pairs</a> that will
3268
     * declaratively set metadata on <a href="https://stripe.com/docs/api/payment_intents">Payment
3269
     * Intents</a> generated from this payment link. Unlike object-level metadata, this field is
3270
     * declarative. Updates will clear prior values.
3271
     */
3272
    @SerializedName("metadata")
3273
    Object metadata;
3274

3275
    /**
3276
     * Text that appears on the customer's statement as the statement descriptor for a non-card
3277
     * charge. This value overrides the account's default statement descriptor. For information
3278
     * about requirements, including the 22-character limit, see <a
3279
     * href="https://docs.stripe.com/get-started/account/statement-descriptors">the Statement
3280
     * Descriptor docs</a>.
3281
     *
3282
     * <p>Setting this value for a card charge returns an error. For card charges, set the <a
3283
     * href="https://docs.stripe.com/get-started/account/statement-descriptors#dynamic">statement_descriptor_suffix</a>
3284
     * instead.
3285
     */
3286
    @SerializedName("statement_descriptor")
3287
    Object statementDescriptor;
3288

3289
    /**
3290
     * Provides information about a card charge. Concatenated to the account's <a
3291
     * href="https://docs.stripe.com/get-started/account/statement-descriptors#static">statement
3292
     * descriptor prefix</a> to form the complete statement descriptor that appears on the
3293
     * customer's statement.
3294
     */
3295
    @SerializedName("statement_descriptor_suffix")
3296
    Object statementDescriptorSuffix;
3297

3298
    /**
3299
     * A string that identifies the resulting payment as part of a group. See the PaymentIntents <a
3300
     * href="https://stripe.com/docs/connect/separate-charges-and-transfers">use case for connected
3301
     * accounts</a> for details.
3302
     */
3303
    @SerializedName("transfer_group")
3304
    Object transferGroup;
3305

3306
    private PaymentIntentData(
3307
        Object description,
3308
        Map<String, Object> extraParams,
3309
        Object metadata,
3310
        Object statementDescriptor,
3311
        Object statementDescriptorSuffix,
3312
        Object transferGroup) {
×
3313
      this.description = description;
×
3314
      this.extraParams = extraParams;
×
3315
      this.metadata = metadata;
×
3316
      this.statementDescriptor = statementDescriptor;
×
3317
      this.statementDescriptorSuffix = statementDescriptorSuffix;
×
3318
      this.transferGroup = transferGroup;
×
3319
    }
×
3320

3321
    public static Builder builder() {
3322
      return new Builder();
×
3323
    }
3324

3325
    public static class Builder {
×
3326
      private Object description;
3327

3328
      private Map<String, Object> extraParams;
3329

3330
      private Object metadata;
3331

3332
      private Object statementDescriptor;
3333

3334
      private Object statementDescriptorSuffix;
3335

3336
      private Object transferGroup;
3337

3338
      /** Finalize and obtain parameter instance from this builder. */
3339
      public PaymentLinkUpdateParams.PaymentIntentData build() {
3340
        return new PaymentLinkUpdateParams.PaymentIntentData(
×
3341
            this.description,
3342
            this.extraParams,
3343
            this.metadata,
3344
            this.statementDescriptor,
3345
            this.statementDescriptorSuffix,
3346
            this.transferGroup);
3347
      }
3348

3349
      /** An arbitrary string attached to the object. Often useful for displaying to users. */
3350
      public Builder setDescription(String description) {
3351
        this.description = description;
×
3352
        return this;
×
3353
      }
3354

3355
      /** An arbitrary string attached to the object. Often useful for displaying to users. */
3356
      public Builder setDescription(EmptyParam description) {
3357
        this.description = description;
×
3358
        return this;
×
3359
      }
3360

3361
      /**
3362
       * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll`
3363
       * call, and subsequent calls add additional key/value pairs to the original map. See {@link
3364
       * PaymentLinkUpdateParams.PaymentIntentData#extraParams} for the field documentation.
3365
       */
3366
      public Builder putExtraParam(String key, Object value) {
3367
        if (this.extraParams == null) {
×
3368
          this.extraParams = new HashMap<>();
×
3369
        }
3370
        this.extraParams.put(key, value);
×
3371
        return this;
×
3372
      }
3373

3374
      /**
3375
       * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
3376
       * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map.
3377
       * See {@link PaymentLinkUpdateParams.PaymentIntentData#extraParams} for the field
3378
       * documentation.
3379
       */
3380
      public Builder putAllExtraParam(Map<String, Object> map) {
3381
        if (this.extraParams == null) {
×
3382
          this.extraParams = new HashMap<>();
×
3383
        }
3384
        this.extraParams.putAll(map);
×
3385
        return this;
×
3386
      }
3387

3388
      /**
3389
       * Add a key/value pair to `metadata` map. A map is initialized for the first `put/putAll`
3390
       * call, and subsequent calls add additional key/value pairs to the original map. See {@link
3391
       * PaymentLinkUpdateParams.PaymentIntentData#metadata} for the field documentation.
3392
       */
3393
      @SuppressWarnings("unchecked")
3394
      public Builder putMetadata(String key, String value) {
3395
        if (this.metadata == null || this.metadata instanceof EmptyParam) {
×
3396
          this.metadata = new HashMap<String, String>();
×
3397
        }
3398
        ((Map<String, String>) this.metadata).put(key, value);
×
3399
        return this;
×
3400
      }
3401

3402
      /**
3403
       * Add all map key/value pairs to `metadata` map. A map is initialized for the first
3404
       * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map.
3405
       * See {@link PaymentLinkUpdateParams.PaymentIntentData#metadata} for the field documentation.
3406
       */
3407
      @SuppressWarnings("unchecked")
3408
      public Builder putAllMetadata(Map<String, String> map) {
3409
        if (this.metadata == null || this.metadata instanceof EmptyParam) {
×
3410
          this.metadata = new HashMap<String, String>();
×
3411
        }
3412
        ((Map<String, String>) this.metadata).putAll(map);
×
3413
        return this;
×
3414
      }
3415

3416
      /**
3417
       * Set of <a href="https://stripe.com/docs/api/metadata">key-value pairs</a> that will
3418
       * declaratively set metadata on <a href="https://stripe.com/docs/api/payment_intents">Payment
3419
       * Intents</a> generated from this payment link. Unlike object-level metadata, this field is
3420
       * declarative. Updates will clear prior values.
3421
       */
3422
      public Builder setMetadata(EmptyParam metadata) {
3423
        this.metadata = metadata;
×
3424
        return this;
×
3425
      }
3426

3427
      /**
3428
       * Set of <a href="https://stripe.com/docs/api/metadata">key-value pairs</a> that will
3429
       * declaratively set metadata on <a href="https://stripe.com/docs/api/payment_intents">Payment
3430
       * Intents</a> generated from this payment link. Unlike object-level metadata, this field is
3431
       * declarative. Updates will clear prior values.
3432
       */
3433
      public Builder setMetadata(Map<String, String> metadata) {
3434
        this.metadata = metadata;
×
3435
        return this;
×
3436
      }
3437

3438
      /**
3439
       * Text that appears on the customer's statement as the statement descriptor for a non-card
3440
       * charge. This value overrides the account's default statement descriptor. For information
3441
       * about requirements, including the 22-character limit, see <a
3442
       * href="https://docs.stripe.com/get-started/account/statement-descriptors">the Statement
3443
       * Descriptor docs</a>.
3444
       *
3445
       * <p>Setting this value for a card charge returns an error. For card charges, set the <a
3446
       * href="https://docs.stripe.com/get-started/account/statement-descriptors#dynamic">statement_descriptor_suffix</a>
3447
       * instead.
3448
       */
3449
      public Builder setStatementDescriptor(String statementDescriptor) {
3450
        this.statementDescriptor = statementDescriptor;
×
3451
        return this;
×
3452
      }
3453

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

3470
      /**
3471
       * Provides information about a card charge. Concatenated to the account's <a
3472
       * href="https://docs.stripe.com/get-started/account/statement-descriptors#static">statement
3473
       * descriptor prefix</a> to form the complete statement descriptor that appears on the
3474
       * customer's statement.
3475
       */
3476
      public Builder setStatementDescriptorSuffix(String statementDescriptorSuffix) {
3477
        this.statementDescriptorSuffix = statementDescriptorSuffix;
×
3478
        return this;
×
3479
      }
3480

3481
      /**
3482
       * Provides information about a card charge. Concatenated to the account's <a
3483
       * href="https://docs.stripe.com/get-started/account/statement-descriptors#static">statement
3484
       * descriptor prefix</a> to form the complete statement descriptor that appears on the
3485
       * customer's statement.
3486
       */
3487
      public Builder setStatementDescriptorSuffix(EmptyParam statementDescriptorSuffix) {
3488
        this.statementDescriptorSuffix = statementDescriptorSuffix;
×
3489
        return this;
×
3490
      }
3491

3492
      /**
3493
       * A string that identifies the resulting payment as part of a group. See the PaymentIntents
3494
       * <a href="https://stripe.com/docs/connect/separate-charges-and-transfers">use case for
3495
       * connected accounts</a> for details.
3496
       */
3497
      public Builder setTransferGroup(String transferGroup) {
3498
        this.transferGroup = transferGroup;
×
3499
        return this;
×
3500
      }
3501

3502
      /**
3503
       * A string that identifies the resulting payment as part of a group. See the PaymentIntents
3504
       * <a href="https://stripe.com/docs/connect/separate-charges-and-transfers">use case for
3505
       * connected accounts</a> for details.
3506
       */
3507
      public Builder setTransferGroup(EmptyParam transferGroup) {
3508
        this.transferGroup = transferGroup;
×
3509
        return this;
×
3510
      }
3511
    }
3512
  }
3513

3514
  @Getter
3515
  public static class Restrictions {
3516
    /**
3517
     * <strong>Required.</strong> Configuration for the {@code completed_sessions} restriction type.
3518
     */
3519
    @SerializedName("completed_sessions")
3520
    CompletedSessions completedSessions;
3521

3522
    /**
3523
     * Map of extra parameters for custom features not available in this client library. The content
3524
     * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each
3525
     * key/value pair is serialized as if the key is a root-level field (serialized) name in this
3526
     * param object. Effectively, this map is flattened to its parent instance.
3527
     */
3528
    @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
3529
    Map<String, Object> extraParams;
3530

3531
    private Restrictions(CompletedSessions completedSessions, Map<String, Object> extraParams) {
×
3532
      this.completedSessions = completedSessions;
×
3533
      this.extraParams = extraParams;
×
3534
    }
×
3535

3536
    public static Builder builder() {
3537
      return new Builder();
×
3538
    }
3539

3540
    public static class Builder {
×
3541
      private CompletedSessions completedSessions;
3542

3543
      private Map<String, Object> extraParams;
3544

3545
      /** Finalize and obtain parameter instance from this builder. */
3546
      public PaymentLinkUpdateParams.Restrictions build() {
3547
        return new PaymentLinkUpdateParams.Restrictions(this.completedSessions, this.extraParams);
×
3548
      }
3549

3550
      /**
3551
       * <strong>Required.</strong> Configuration for the {@code completed_sessions} restriction
3552
       * type.
3553
       */
3554
      public Builder setCompletedSessions(
3555
          PaymentLinkUpdateParams.Restrictions.CompletedSessions completedSessions) {
3556
        this.completedSessions = completedSessions;
×
3557
        return this;
×
3558
      }
3559

3560
      /**
3561
       * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll`
3562
       * call, and subsequent calls add additional key/value pairs to the original map. See {@link
3563
       * PaymentLinkUpdateParams.Restrictions#extraParams} for the field documentation.
3564
       */
3565
      public Builder putExtraParam(String key, Object value) {
3566
        if (this.extraParams == null) {
×
3567
          this.extraParams = new HashMap<>();
×
3568
        }
3569
        this.extraParams.put(key, value);
×
3570
        return this;
×
3571
      }
3572

3573
      /**
3574
       * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
3575
       * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map.
3576
       * See {@link PaymentLinkUpdateParams.Restrictions#extraParams} for the field documentation.
3577
       */
3578
      public Builder putAllExtraParam(Map<String, Object> map) {
3579
        if (this.extraParams == null) {
×
3580
          this.extraParams = new HashMap<>();
×
3581
        }
3582
        this.extraParams.putAll(map);
×
3583
        return this;
×
3584
      }
3585
    }
3586

3587
    @Getter
3588
    public static class CompletedSessions {
3589
      /**
3590
       * Map of extra parameters for custom features not available in this client library. The
3591
       * content in this map is not serialized under this field's {@code @SerializedName} value.
3592
       * Instead, each key/value pair is serialized as if the key is a root-level field (serialized)
3593
       * name in this param object. Effectively, this map is flattened to its parent instance.
3594
       */
3595
      @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
3596
      Map<String, Object> extraParams;
3597

3598
      /**
3599
       * <strong>Required.</strong> The maximum number of checkout sessions that can be completed
3600
       * for the {@code completed_sessions} restriction to be met.
3601
       */
3602
      @SerializedName("limit")
3603
      Long limit;
3604

3605
      private CompletedSessions(Map<String, Object> extraParams, Long limit) {
×
3606
        this.extraParams = extraParams;
×
3607
        this.limit = limit;
×
3608
      }
×
3609

3610
      public static Builder builder() {
3611
        return new Builder();
×
3612
      }
3613

3614
      public static class Builder {
×
3615
        private Map<String, Object> extraParams;
3616

3617
        private Long limit;
3618

3619
        /** Finalize and obtain parameter instance from this builder. */
3620
        public PaymentLinkUpdateParams.Restrictions.CompletedSessions build() {
3621
          return new PaymentLinkUpdateParams.Restrictions.CompletedSessions(
×
3622
              this.extraParams, this.limit);
3623
        }
3624

3625
        /**
3626
         * Add a key/value pair to `extraParams` map. A map is initialized for the first
3627
         * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
3628
         * map. See {@link PaymentLinkUpdateParams.Restrictions.CompletedSessions#extraParams} for
3629
         * the field documentation.
3630
         */
3631
        public Builder putExtraParam(String key, Object value) {
3632
          if (this.extraParams == null) {
×
3633
            this.extraParams = new HashMap<>();
×
3634
          }
3635
          this.extraParams.put(key, value);
×
3636
          return this;
×
3637
        }
3638

3639
        /**
3640
         * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
3641
         * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
3642
         * map. See {@link PaymentLinkUpdateParams.Restrictions.CompletedSessions#extraParams} for
3643
         * the field documentation.
3644
         */
3645
        public Builder putAllExtraParam(Map<String, Object> map) {
3646
          if (this.extraParams == null) {
×
3647
            this.extraParams = new HashMap<>();
×
3648
          }
3649
          this.extraParams.putAll(map);
×
3650
          return this;
×
3651
        }
3652

3653
        /**
3654
         * <strong>Required.</strong> The maximum number of checkout sessions that can be completed
3655
         * for the {@code completed_sessions} restriction to be met.
3656
         */
3657
        public Builder setLimit(Long limit) {
3658
          this.limit = limit;
×
3659
          return this;
×
3660
        }
3661
      }
3662
    }
3663
  }
3664

3665
  @Getter
3666
  public static class ShippingAddressCollection {
3667
    /**
3668
     * <strong>Required.</strong> An array of two-letter ISO country codes representing which
3669
     * countries Checkout should provide as options for shipping locations.
3670
     */
3671
    @SerializedName("allowed_countries")
3672
    List<PaymentLinkUpdateParams.ShippingAddressCollection.AllowedCountry> allowedCountries;
3673

3674
    /**
3675
     * Map of extra parameters for custom features not available in this client library. The content
3676
     * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each
3677
     * key/value pair is serialized as if the key is a root-level field (serialized) name in this
3678
     * param object. Effectively, this map is flattened to its parent instance.
3679
     */
3680
    @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
3681
    Map<String, Object> extraParams;
3682

3683
    private ShippingAddressCollection(
3684
        List<PaymentLinkUpdateParams.ShippingAddressCollection.AllowedCountry> allowedCountries,
3685
        Map<String, Object> extraParams) {
×
3686
      this.allowedCountries = allowedCountries;
×
3687
      this.extraParams = extraParams;
×
3688
    }
×
3689

3690
    public static Builder builder() {
3691
      return new Builder();
×
3692
    }
3693

3694
    public static class Builder {
×
3695
      private List<PaymentLinkUpdateParams.ShippingAddressCollection.AllowedCountry>
3696
          allowedCountries;
3697

3698
      private Map<String, Object> extraParams;
3699

3700
      /** Finalize and obtain parameter instance from this builder. */
3701
      public PaymentLinkUpdateParams.ShippingAddressCollection build() {
3702
        return new PaymentLinkUpdateParams.ShippingAddressCollection(
×
3703
            this.allowedCountries, this.extraParams);
3704
      }
3705

3706
      /**
3707
       * Add an element to `allowedCountries` list. A list is initialized for the first `add/addAll`
3708
       * call, and subsequent calls adds additional elements to the original list. See {@link
3709
       * PaymentLinkUpdateParams.ShippingAddressCollection#allowedCountries} for the field
3710
       * documentation.
3711
       */
3712
      public Builder addAllowedCountry(
3713
          PaymentLinkUpdateParams.ShippingAddressCollection.AllowedCountry element) {
3714
        if (this.allowedCountries == null) {
×
3715
          this.allowedCountries = new ArrayList<>();
×
3716
        }
3717
        this.allowedCountries.add(element);
×
3718
        return this;
×
3719
      }
3720

3721
      /**
3722
       * Add all elements to `allowedCountries` list. A list is initialized for the first
3723
       * `add/addAll` call, and subsequent calls adds additional elements to the original list. See
3724
       * {@link PaymentLinkUpdateParams.ShippingAddressCollection#allowedCountries} for the field
3725
       * documentation.
3726
       */
3727
      public Builder addAllAllowedCountry(
3728
          List<PaymentLinkUpdateParams.ShippingAddressCollection.AllowedCountry> elements) {
3729
        if (this.allowedCountries == null) {
×
3730
          this.allowedCountries = new ArrayList<>();
×
3731
        }
3732
        this.allowedCountries.addAll(elements);
×
3733
        return this;
×
3734
      }
3735

3736
      /**
3737
       * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll`
3738
       * call, and subsequent calls add additional key/value pairs to the original map. See {@link
3739
       * PaymentLinkUpdateParams.ShippingAddressCollection#extraParams} for the field documentation.
3740
       */
3741
      public Builder putExtraParam(String key, Object value) {
3742
        if (this.extraParams == null) {
×
3743
          this.extraParams = new HashMap<>();
×
3744
        }
3745
        this.extraParams.put(key, value);
×
3746
        return this;
×
3747
      }
3748

3749
      /**
3750
       * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
3751
       * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map.
3752
       * See {@link PaymentLinkUpdateParams.ShippingAddressCollection#extraParams} for the field
3753
       * documentation.
3754
       */
3755
      public Builder putAllExtraParam(Map<String, Object> map) {
3756
        if (this.extraParams == null) {
×
3757
          this.extraParams = new HashMap<>();
×
3758
        }
3759
        this.extraParams.putAll(map);
×
3760
        return this;
×
3761
      }
3762
    }
3763

3764
    public enum AllowedCountry implements ApiRequestParams.EnumParam {
×
3765
      @SerializedName("AC")
×
3766
      AC("AC"),
3767

3768
      @SerializedName("AD")
×
3769
      AD("AD"),
3770

3771
      @SerializedName("AE")
×
3772
      AE("AE"),
3773

3774
      @SerializedName("AF")
×
3775
      AF("AF"),
3776

3777
      @SerializedName("AG")
×
3778
      AG("AG"),
3779

3780
      @SerializedName("AI")
×
3781
      AI("AI"),
3782

3783
      @SerializedName("AL")
×
3784
      AL("AL"),
3785

3786
      @SerializedName("AM")
×
3787
      AM("AM"),
3788

3789
      @SerializedName("AO")
×
3790
      AO("AO"),
3791

3792
      @SerializedName("AQ")
×
3793
      AQ("AQ"),
3794

3795
      @SerializedName("AR")
×
3796
      AR("AR"),
3797

3798
      @SerializedName("AT")
×
3799
      AT("AT"),
3800

3801
      @SerializedName("AU")
×
3802
      AU("AU"),
3803

3804
      @SerializedName("AW")
×
3805
      AW("AW"),
3806

3807
      @SerializedName("AX")
×
3808
      AX("AX"),
3809

3810
      @SerializedName("AZ")
×
3811
      AZ("AZ"),
3812

3813
      @SerializedName("BA")
×
3814
      BA("BA"),
3815

3816
      @SerializedName("BB")
×
3817
      BB("BB"),
3818

3819
      @SerializedName("BD")
×
3820
      BD("BD"),
3821

3822
      @SerializedName("BE")
×
3823
      BE("BE"),
3824

3825
      @SerializedName("BF")
×
3826
      BF("BF"),
3827

3828
      @SerializedName("BG")
×
3829
      BG("BG"),
3830

3831
      @SerializedName("BH")
×
3832
      BH("BH"),
3833

3834
      @SerializedName("BI")
×
3835
      BI("BI"),
3836

3837
      @SerializedName("BJ")
×
3838
      BJ("BJ"),
3839

3840
      @SerializedName("BL")
×
3841
      BL("BL"),
3842

3843
      @SerializedName("BM")
×
3844
      BM("BM"),
3845

3846
      @SerializedName("BN")
×
3847
      BN("BN"),
3848

3849
      @SerializedName("BO")
×
3850
      BO("BO"),
3851

3852
      @SerializedName("BQ")
×
3853
      BQ("BQ"),
3854

3855
      @SerializedName("BR")
×
3856
      BR("BR"),
3857

3858
      @SerializedName("BS")
×
3859
      BS("BS"),
3860

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

4473
      @SerializedName("ZZ")
×
4474
      ZZ("ZZ");
4475

4476
      @Getter(onMethod_ = {@Override})
4477
      private final String value;
4478

4479
      AllowedCountry(String value) {
×
4480
        this.value = value;
×
4481
      }
×
4482
    }
4483
  }
4484

4485
  @Getter
4486
  public static class SubscriptionData {
4487
    /**
4488
     * Map of extra parameters for custom features not available in this client library. The content
4489
     * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each
4490
     * key/value pair is serialized as if the key is a root-level field (serialized) name in this
4491
     * param object. Effectively, this map is flattened to its parent instance.
4492
     */
4493
    @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
4494
    Map<String, Object> extraParams;
4495

4496
    /** All invoices will be billed using the specified settings. */
4497
    @SerializedName("invoice_settings")
4498
    InvoiceSettings invoiceSettings;
4499

4500
    /**
4501
     * Set of <a href="https://stripe.com/docs/api/metadata">key-value pairs</a> that will
4502
     * declaratively set metadata on <a
4503
     * href="https://stripe.com/docs/api/subscriptions">Subscriptions</a> generated from this
4504
     * payment link. Unlike object-level metadata, this field is declarative. Updates will clear
4505
     * prior values.
4506
     */
4507
    @SerializedName("metadata")
4508
    Object metadata;
4509

4510
    /**
4511
     * Integer representing the number of trial period days before the customer is charged for the
4512
     * first time. Has to be at least 1.
4513
     */
4514
    @SerializedName("trial_period_days")
4515
    Object trialPeriodDays;
4516

4517
    /** Settings related to subscription trials. */
4518
    @SerializedName("trial_settings")
4519
    Object trialSettings;
4520

4521
    private SubscriptionData(
4522
        Map<String, Object> extraParams,
4523
        InvoiceSettings invoiceSettings,
4524
        Object metadata,
4525
        Object trialPeriodDays,
4526
        Object trialSettings) {
×
4527
      this.extraParams = extraParams;
×
4528
      this.invoiceSettings = invoiceSettings;
×
4529
      this.metadata = metadata;
×
NEW
4530
      this.trialPeriodDays = trialPeriodDays;
×
4531
      this.trialSettings = trialSettings;
×
4532
    }
×
4533

4534
    public static Builder builder() {
4535
      return new Builder();
×
4536
    }
4537

4538
    public static class Builder {
×
4539
      private Map<String, Object> extraParams;
4540

4541
      private InvoiceSettings invoiceSettings;
4542

4543
      private Object metadata;
4544

4545
      private Object trialPeriodDays;
4546

4547
      private Object trialSettings;
4548

4549
      /** Finalize and obtain parameter instance from this builder. */
4550
      public PaymentLinkUpdateParams.SubscriptionData build() {
4551
        return new PaymentLinkUpdateParams.SubscriptionData(
×
4552
            this.extraParams,
4553
            this.invoiceSettings,
4554
            this.metadata,
4555
            this.trialPeriodDays,
4556
            this.trialSettings);
4557
      }
4558

4559
      /**
4560
       * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll`
4561
       * call, and subsequent calls add additional key/value pairs to the original map. See {@link
4562
       * PaymentLinkUpdateParams.SubscriptionData#extraParams} for the field documentation.
4563
       */
4564
      public Builder putExtraParam(String key, Object value) {
4565
        if (this.extraParams == null) {
×
4566
          this.extraParams = new HashMap<>();
×
4567
        }
4568
        this.extraParams.put(key, value);
×
4569
        return this;
×
4570
      }
4571

4572
      /**
4573
       * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
4574
       * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map.
4575
       * See {@link PaymentLinkUpdateParams.SubscriptionData#extraParams} for the field
4576
       * documentation.
4577
       */
4578
      public Builder putAllExtraParam(Map<String, Object> map) {
4579
        if (this.extraParams == null) {
×
4580
          this.extraParams = new HashMap<>();
×
4581
        }
4582
        this.extraParams.putAll(map);
×
4583
        return this;
×
4584
      }
4585

4586
      /** All invoices will be billed using the specified settings. */
4587
      public Builder setInvoiceSettings(
4588
          PaymentLinkUpdateParams.SubscriptionData.InvoiceSettings invoiceSettings) {
4589
        this.invoiceSettings = invoiceSettings;
×
4590
        return this;
×
4591
      }
4592

4593
      /**
4594
       * Add a key/value pair to `metadata` map. A map is initialized for the first `put/putAll`
4595
       * call, and subsequent calls add additional key/value pairs to the original map. See {@link
4596
       * PaymentLinkUpdateParams.SubscriptionData#metadata} for the field documentation.
4597
       */
4598
      @SuppressWarnings("unchecked")
4599
      public Builder putMetadata(String key, String value) {
4600
        if (this.metadata == null || this.metadata instanceof EmptyParam) {
×
4601
          this.metadata = new HashMap<String, String>();
×
4602
        }
4603
        ((Map<String, String>) this.metadata).put(key, value);
×
4604
        return this;
×
4605
      }
4606

4607
      /**
4608
       * Add all map key/value pairs to `metadata` map. A map is initialized for the first
4609
       * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map.
4610
       * See {@link PaymentLinkUpdateParams.SubscriptionData#metadata} for the field documentation.
4611
       */
4612
      @SuppressWarnings("unchecked")
4613
      public Builder putAllMetadata(Map<String, String> map) {
4614
        if (this.metadata == null || this.metadata instanceof EmptyParam) {
×
4615
          this.metadata = new HashMap<String, String>();
×
4616
        }
4617
        ((Map<String, String>) this.metadata).putAll(map);
×
4618
        return this;
×
4619
      }
4620

4621
      /**
4622
       * Set of <a href="https://stripe.com/docs/api/metadata">key-value pairs</a> that will
4623
       * declaratively set metadata on <a
4624
       * href="https://stripe.com/docs/api/subscriptions">Subscriptions</a> generated from this
4625
       * payment link. Unlike object-level metadata, this field is declarative. Updates will clear
4626
       * prior values.
4627
       */
4628
      public Builder setMetadata(EmptyParam metadata) {
4629
        this.metadata = metadata;
×
4630
        return this;
×
4631
      }
4632

4633
      /**
4634
       * Set of <a href="https://stripe.com/docs/api/metadata">key-value pairs</a> that will
4635
       * declaratively set metadata on <a
4636
       * href="https://stripe.com/docs/api/subscriptions">Subscriptions</a> generated from this
4637
       * payment link. Unlike object-level metadata, this field is declarative. Updates will clear
4638
       * prior values.
4639
       */
4640
      public Builder setMetadata(Map<String, String> metadata) {
4641
        this.metadata = metadata;
×
4642
        return this;
×
4643
      }
4644

4645
      /**
4646
       * Integer representing the number of trial period days before the customer is charged for the
4647
       * first time. Has to be at least 1.
4648
       */
4649
      public Builder setTrialPeriodDays(Long trialPeriodDays) {
NEW
4650
        this.trialPeriodDays = trialPeriodDays;
×
NEW
4651
        return this;
×
4652
      }
4653

4654
      /**
4655
       * Integer representing the number of trial period days before the customer is charged for the
4656
       * first time. Has to be at least 1.
4657
       */
4658
      public Builder setTrialPeriodDays(EmptyParam trialPeriodDays) {
NEW
4659
        this.trialPeriodDays = trialPeriodDays;
×
NEW
4660
        return this;
×
4661
      }
4662

4663
      /** Settings related to subscription trials. */
4664
      public Builder setTrialSettings(
4665
          PaymentLinkUpdateParams.SubscriptionData.TrialSettings trialSettings) {
4666
        this.trialSettings = trialSettings;
×
4667
        return this;
×
4668
      }
4669

4670
      /** Settings related to subscription trials. */
4671
      public Builder setTrialSettings(EmptyParam trialSettings) {
4672
        this.trialSettings = trialSettings;
×
4673
        return this;
×
4674
      }
4675
    }
4676

4677
    @Getter
4678
    public static class InvoiceSettings {
4679
      /**
4680
       * Map of extra parameters for custom features not available in this client library. The
4681
       * content in this map is not serialized under this field's {@code @SerializedName} value.
4682
       * Instead, each key/value pair is serialized as if the key is a root-level field (serialized)
4683
       * name in this param object. Effectively, this map is flattened to its parent instance.
4684
       */
4685
      @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
4686
      Map<String, Object> extraParams;
4687

4688
      /**
4689
       * The connected account that issues the invoice. The invoice is presented with the branding
4690
       * and support information of the specified account.
4691
       */
4692
      @SerializedName("issuer")
4693
      Issuer issuer;
4694

4695
      private InvoiceSettings(Map<String, Object> extraParams, Issuer issuer) {
×
4696
        this.extraParams = extraParams;
×
4697
        this.issuer = issuer;
×
4698
      }
×
4699

4700
      public static Builder builder() {
4701
        return new Builder();
×
4702
      }
4703

4704
      public static class Builder {
×
4705
        private Map<String, Object> extraParams;
4706

4707
        private Issuer issuer;
4708

4709
        /** Finalize and obtain parameter instance from this builder. */
4710
        public PaymentLinkUpdateParams.SubscriptionData.InvoiceSettings build() {
4711
          return new PaymentLinkUpdateParams.SubscriptionData.InvoiceSettings(
×
4712
              this.extraParams, this.issuer);
4713
        }
4714

4715
        /**
4716
         * Add a key/value pair to `extraParams` map. A map is initialized for the first
4717
         * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
4718
         * map. See {@link PaymentLinkUpdateParams.SubscriptionData.InvoiceSettings#extraParams} for
4719
         * the field documentation.
4720
         */
4721
        public Builder putExtraParam(String key, Object value) {
4722
          if (this.extraParams == null) {
×
4723
            this.extraParams = new HashMap<>();
×
4724
          }
4725
          this.extraParams.put(key, value);
×
4726
          return this;
×
4727
        }
4728

4729
        /**
4730
         * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
4731
         * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
4732
         * map. See {@link PaymentLinkUpdateParams.SubscriptionData.InvoiceSettings#extraParams} for
4733
         * the field documentation.
4734
         */
4735
        public Builder putAllExtraParam(Map<String, Object> map) {
4736
          if (this.extraParams == null) {
×
4737
            this.extraParams = new HashMap<>();
×
4738
          }
4739
          this.extraParams.putAll(map);
×
4740
          return this;
×
4741
        }
4742

4743
        /**
4744
         * The connected account that issues the invoice. The invoice is presented with the branding
4745
         * and support information of the specified account.
4746
         */
4747
        public Builder setIssuer(
4748
            PaymentLinkUpdateParams.SubscriptionData.InvoiceSettings.Issuer issuer) {
4749
          this.issuer = issuer;
×
4750
          return this;
×
4751
        }
4752
      }
4753

4754
      @Getter
4755
      public static class Issuer {
4756
        /** The connected account being referenced when {@code type} is {@code account}. */
4757
        @SerializedName("account")
4758
        Object account;
4759

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

4770
        /** <strong>Required.</strong> Type of the account referenced in the request. */
4771
        @SerializedName("type")
4772
        Type type;
4773

4774
        private Issuer(Object account, Map<String, Object> extraParams, Type type) {
×
4775
          this.account = account;
×
4776
          this.extraParams = extraParams;
×
4777
          this.type = type;
×
4778
        }
×
4779

4780
        public static Builder builder() {
4781
          return new Builder();
×
4782
        }
4783

4784
        public static class Builder {
×
4785
          private Object account;
4786

4787
          private Map<String, Object> extraParams;
4788

4789
          private Type type;
4790

4791
          /** Finalize and obtain parameter instance from this builder. */
4792
          public PaymentLinkUpdateParams.SubscriptionData.InvoiceSettings.Issuer build() {
4793
            return new PaymentLinkUpdateParams.SubscriptionData.InvoiceSettings.Issuer(
×
4794
                this.account, this.extraParams, this.type);
4795
          }
4796

4797
          /** The connected account being referenced when {@code type} is {@code account}. */
4798
          public Builder setAccount(String account) {
4799
            this.account = account;
×
4800
            return this;
×
4801
          }
4802

4803
          /** The connected account being referenced when {@code type} is {@code account}. */
4804
          public Builder setAccount(EmptyParam account) {
4805
            this.account = account;
×
4806
            return this;
×
4807
          }
4808

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

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

4839
          /** <strong>Required.</strong> Type of the account referenced in the request. */
4840
          public Builder setType(
4841
              PaymentLinkUpdateParams.SubscriptionData.InvoiceSettings.Issuer.Type type) {
4842
            this.type = type;
×
4843
            return this;
×
4844
          }
4845
        }
4846

4847
        public enum Type implements ApiRequestParams.EnumParam {
×
4848
          @SerializedName("account")
×
4849
          ACCOUNT("account"),
4850

4851
          @SerializedName("self")
×
4852
          SELF("self");
4853

4854
          @Getter(onMethod_ = {@Override})
4855
          private final String value;
4856

4857
          Type(String value) {
×
4858
            this.value = value;
×
4859
          }
×
4860
        }
4861
      }
4862
    }
4863

4864
    @Getter
4865
    public static class TrialSettings {
4866
      /**
4867
       * <strong>Required.</strong> Defines how the subscription should behave when the user's free
4868
       * trial ends.
4869
       */
4870
      @SerializedName("end_behavior")
4871
      EndBehavior endBehavior;
4872

4873
      /**
4874
       * Map of extra parameters for custom features not available in this client library. The
4875
       * content in this map is not serialized under this field's {@code @SerializedName} value.
4876
       * Instead, each key/value pair is serialized as if the key is a root-level field (serialized)
4877
       * name in this param object. Effectively, this map is flattened to its parent instance.
4878
       */
4879
      @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
4880
      Map<String, Object> extraParams;
4881

4882
      private TrialSettings(EndBehavior endBehavior, Map<String, Object> extraParams) {
×
4883
        this.endBehavior = endBehavior;
×
4884
        this.extraParams = extraParams;
×
4885
      }
×
4886

4887
      public static Builder builder() {
4888
        return new Builder();
×
4889
      }
4890

4891
      public static class Builder {
×
4892
        private EndBehavior endBehavior;
4893

4894
        private Map<String, Object> extraParams;
4895

4896
        /** Finalize and obtain parameter instance from this builder. */
4897
        public PaymentLinkUpdateParams.SubscriptionData.TrialSettings build() {
4898
          return new PaymentLinkUpdateParams.SubscriptionData.TrialSettings(
×
4899
              this.endBehavior, this.extraParams);
4900
        }
4901

4902
        /**
4903
         * <strong>Required.</strong> Defines how the subscription should behave when the user's
4904
         * free trial ends.
4905
         */
4906
        public Builder setEndBehavior(
4907
            PaymentLinkUpdateParams.SubscriptionData.TrialSettings.EndBehavior endBehavior) {
4908
          this.endBehavior = endBehavior;
×
4909
          return this;
×
4910
        }
4911

4912
        /**
4913
         * Add a key/value pair to `extraParams` map. A map is initialized for the first
4914
         * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
4915
         * map. See {@link PaymentLinkUpdateParams.SubscriptionData.TrialSettings#extraParams} for
4916
         * the field documentation.
4917
         */
4918
        public Builder putExtraParam(String key, Object value) {
4919
          if (this.extraParams == null) {
×
4920
            this.extraParams = new HashMap<>();
×
4921
          }
4922
          this.extraParams.put(key, value);
×
4923
          return this;
×
4924
        }
4925

4926
        /**
4927
         * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
4928
         * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
4929
         * map. See {@link PaymentLinkUpdateParams.SubscriptionData.TrialSettings#extraParams} for
4930
         * the field documentation.
4931
         */
4932
        public Builder putAllExtraParam(Map<String, Object> map) {
4933
          if (this.extraParams == null) {
×
4934
            this.extraParams = new HashMap<>();
×
4935
          }
4936
          this.extraParams.putAll(map);
×
4937
          return this;
×
4938
        }
4939
      }
4940

4941
      @Getter
4942
      public static class EndBehavior {
4943
        /**
4944
         * Map of extra parameters for custom features not available in this client library. The
4945
         * content in this map is not serialized under this field's {@code @SerializedName} value.
4946
         * Instead, each key/value pair is serialized as if the key is a root-level field
4947
         * (serialized) name in this param object. Effectively, this map is flattened to its parent
4948
         * instance.
4949
         */
4950
        @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
4951
        Map<String, Object> extraParams;
4952

4953
        /**
4954
         * <strong>Required.</strong> Indicates how the subscription should change when the trial
4955
         * ends if the user did not provide a payment method.
4956
         */
4957
        @SerializedName("missing_payment_method")
4958
        MissingPaymentMethod missingPaymentMethod;
4959

4960
        private EndBehavior(
4961
            Map<String, Object> extraParams, MissingPaymentMethod missingPaymentMethod) {
×
4962
          this.extraParams = extraParams;
×
4963
          this.missingPaymentMethod = missingPaymentMethod;
×
4964
        }
×
4965

4966
        public static Builder builder() {
4967
          return new Builder();
×
4968
        }
4969

4970
        public static class Builder {
×
4971
          private Map<String, Object> extraParams;
4972

4973
          private MissingPaymentMethod missingPaymentMethod;
4974

4975
          /** Finalize and obtain parameter instance from this builder. */
4976
          public PaymentLinkUpdateParams.SubscriptionData.TrialSettings.EndBehavior build() {
4977
            return new PaymentLinkUpdateParams.SubscriptionData.TrialSettings.EndBehavior(
×
4978
                this.extraParams, this.missingPaymentMethod);
4979
          }
4980

4981
          /**
4982
           * Add a key/value pair to `extraParams` map. A map is initialized for the first
4983
           * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
4984
           * map. See {@link
4985
           * PaymentLinkUpdateParams.SubscriptionData.TrialSettings.EndBehavior#extraParams} for the
4986
           * field documentation.
4987
           */
4988
          public Builder putExtraParam(String key, Object value) {
4989
            if (this.extraParams == null) {
×
4990
              this.extraParams = new HashMap<>();
×
4991
            }
4992
            this.extraParams.put(key, value);
×
4993
            return this;
×
4994
          }
4995

4996
          /**
4997
           * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
4998
           * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
4999
           * map. See {@link
5000
           * PaymentLinkUpdateParams.SubscriptionData.TrialSettings.EndBehavior#extraParams} for the
5001
           * field documentation.
5002
           */
5003
          public Builder putAllExtraParam(Map<String, Object> map) {
5004
            if (this.extraParams == null) {
×
5005
              this.extraParams = new HashMap<>();
×
5006
            }
5007
            this.extraParams.putAll(map);
×
5008
            return this;
×
5009
          }
5010

5011
          /**
5012
           * <strong>Required.</strong> Indicates how the subscription should change when the trial
5013
           * ends if the user did not provide a payment method.
5014
           */
5015
          public Builder setMissingPaymentMethod(
5016
              PaymentLinkUpdateParams.SubscriptionData.TrialSettings.EndBehavior
5017
                      .MissingPaymentMethod
5018
                  missingPaymentMethod) {
5019
            this.missingPaymentMethod = missingPaymentMethod;
×
5020
            return this;
×
5021
          }
5022
        }
5023

5024
        public enum MissingPaymentMethod implements ApiRequestParams.EnumParam {
×
5025
          @SerializedName("cancel")
×
5026
          CANCEL("cancel"),
5027

5028
          @SerializedName("create_invoice")
×
5029
          CREATE_INVOICE("create_invoice"),
5030

5031
          @SerializedName("pause")
×
5032
          PAUSE("pause");
5033

5034
          @Getter(onMethod_ = {@Override})
5035
          private final String value;
5036

5037
          MissingPaymentMethod(String value) {
×
5038
            this.value = value;
×
5039
          }
×
5040
        }
5041
      }
5042
    }
5043
  }
5044

5045
  @Getter
5046
  public static class TaxIdCollection {
5047
    /**
5048
     * <strong>Required.</strong> Enable tax ID collection during checkout. Defaults to {@code
5049
     * false}.
5050
     */
5051
    @SerializedName("enabled")
5052
    Boolean enabled;
5053

5054
    /**
5055
     * Map of extra parameters for custom features not available in this client library. The content
5056
     * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each
5057
     * key/value pair is serialized as if the key is a root-level field (serialized) name in this
5058
     * param object. Effectively, this map is flattened to its parent instance.
5059
     */
5060
    @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
5061
    Map<String, Object> extraParams;
5062

5063
    /** Describes whether a tax ID is required during checkout. Defaults to {@code never}. */
5064
    @SerializedName("required")
5065
    Required required;
5066

5067
    private TaxIdCollection(Boolean enabled, Map<String, Object> extraParams, Required required) {
×
5068
      this.enabled = enabled;
×
5069
      this.extraParams = extraParams;
×
5070
      this.required = required;
×
5071
    }
×
5072

5073
    public static Builder builder() {
5074
      return new Builder();
×
5075
    }
5076

5077
    public static class Builder {
×
5078
      private Boolean enabled;
5079

5080
      private Map<String, Object> extraParams;
5081

5082
      private Required required;
5083

5084
      /** Finalize and obtain parameter instance from this builder. */
5085
      public PaymentLinkUpdateParams.TaxIdCollection build() {
5086
        return new PaymentLinkUpdateParams.TaxIdCollection(
×
5087
            this.enabled, this.extraParams, this.required);
5088
      }
5089

5090
      /**
5091
       * <strong>Required.</strong> Enable tax ID collection during checkout. Defaults to {@code
5092
       * false}.
5093
       */
5094
      public Builder setEnabled(Boolean enabled) {
5095
        this.enabled = enabled;
×
5096
        return this;
×
5097
      }
5098

5099
      /**
5100
       * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll`
5101
       * call, and subsequent calls add additional key/value pairs to the original map. See {@link
5102
       * PaymentLinkUpdateParams.TaxIdCollection#extraParams} for the field documentation.
5103
       */
5104
      public Builder putExtraParam(String key, Object value) {
5105
        if (this.extraParams == null) {
×
5106
          this.extraParams = new HashMap<>();
×
5107
        }
5108
        this.extraParams.put(key, value);
×
5109
        return this;
×
5110
      }
5111

5112
      /**
5113
       * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
5114
       * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map.
5115
       * See {@link PaymentLinkUpdateParams.TaxIdCollection#extraParams} for the field
5116
       * documentation.
5117
       */
5118
      public Builder putAllExtraParam(Map<String, Object> map) {
5119
        if (this.extraParams == null) {
×
5120
          this.extraParams = new HashMap<>();
×
5121
        }
5122
        this.extraParams.putAll(map);
×
5123
        return this;
×
5124
      }
5125

5126
      /** Describes whether a tax ID is required during checkout. Defaults to {@code never}. */
5127
      public Builder setRequired(PaymentLinkUpdateParams.TaxIdCollection.Required required) {
5128
        this.required = required;
×
5129
        return this;
×
5130
      }
5131
    }
5132

5133
    public enum Required implements ApiRequestParams.EnumParam {
×
5134
      @SerializedName("if_supported")
×
5135
      IF_SUPPORTED("if_supported"),
5136

5137
      @SerializedName("never")
×
5138
      NEVER("never");
5139

5140
      @Getter(onMethod_ = {@Override})
5141
      private final String value;
5142

5143
      Required(String value) {
×
5144
        this.value = value;
×
5145
      }
×
5146
    }
5147
  }
5148

5149
  public enum BillingAddressCollection implements ApiRequestParams.EnumParam {
×
5150
    @SerializedName("auto")
×
5151
    AUTO("auto"),
5152

5153
    @SerializedName("required")
×
5154
    REQUIRED("required");
5155

5156
    @Getter(onMethod_ = {@Override})
5157
    private final String value;
5158

5159
    BillingAddressCollection(String value) {
×
5160
      this.value = value;
×
5161
    }
×
5162
  }
5163

5164
  public enum CustomerCreation implements ApiRequestParams.EnumParam {
×
5165
    @SerializedName("always")
×
5166
    ALWAYS("always"),
5167

5168
    @SerializedName("if_required")
×
5169
    IF_REQUIRED("if_required");
5170

5171
    @Getter(onMethod_ = {@Override})
5172
    private final String value;
5173

5174
    CustomerCreation(String value) {
×
5175
      this.value = value;
×
5176
    }
×
5177
  }
5178

5179
  public enum PaymentMethodCollection implements ApiRequestParams.EnumParam {
×
5180
    @SerializedName("always")
×
5181
    ALWAYS("always"),
5182

5183
    @SerializedName("if_required")
×
5184
    IF_REQUIRED("if_required");
5185

5186
    @Getter(onMethod_ = {@Override})
5187
    private final String value;
5188

5189
    PaymentMethodCollection(String value) {
×
5190
      this.value = value;
×
5191
    }
×
5192
  }
5193

5194
  public enum PaymentMethodType implements ApiRequestParams.EnumParam {
×
5195
    @SerializedName("affirm")
×
5196
    AFFIRM("affirm"),
5197

5198
    @SerializedName("afterpay_clearpay")
×
5199
    AFTERPAY_CLEARPAY("afterpay_clearpay"),
5200

5201
    @SerializedName("alipay")
×
5202
    ALIPAY("alipay"),
5203

5204
    @SerializedName("alma")
×
5205
    ALMA("alma"),
5206

5207
    @SerializedName("au_becs_debit")
×
5208
    AU_BECS_DEBIT("au_becs_debit"),
5209

5210
    @SerializedName("bacs_debit")
×
5211
    BACS_DEBIT("bacs_debit"),
5212

5213
    @SerializedName("bancontact")
×
5214
    BANCONTACT("bancontact"),
5215

5216
    @SerializedName("blik")
×
5217
    BLIK("blik"),
5218

5219
    @SerializedName("boleto")
×
5220
    BOLETO("boleto"),
5221

5222
    @SerializedName("card")
×
5223
    CARD("card"),
5224

5225
    @SerializedName("cashapp")
×
5226
    CASHAPP("cashapp"),
5227

5228
    @SerializedName("eps")
×
5229
    EPS("eps"),
5230

5231
    @SerializedName("fpx")
×
5232
    FPX("fpx"),
5233

5234
    @SerializedName("giropay")
×
5235
    GIROPAY("giropay"),
5236

5237
    @SerializedName("grabpay")
×
5238
    GRABPAY("grabpay"),
5239

5240
    @SerializedName("ideal")
×
5241
    IDEAL("ideal"),
5242

5243
    @SerializedName("klarna")
×
5244
    KLARNA("klarna"),
5245

5246
    @SerializedName("konbini")
×
5247
    KONBINI("konbini"),
5248

5249
    @SerializedName("link")
×
5250
    LINK("link"),
5251

5252
    @SerializedName("mobilepay")
×
5253
    MOBILEPAY("mobilepay"),
5254

5255
    @SerializedName("multibanco")
×
5256
    MULTIBANCO("multibanco"),
5257

5258
    @SerializedName("oxxo")
×
5259
    OXXO("oxxo"),
5260

5261
    @SerializedName("p24")
×
5262
    P24("p24"),
5263

5264
    @SerializedName("paynow")
×
5265
    PAYNOW("paynow"),
5266

5267
    @SerializedName("paypal")
×
5268
    PAYPAL("paypal"),
5269

5270
    @SerializedName("pix")
×
5271
    PIX("pix"),
5272

5273
    @SerializedName("promptpay")
×
5274
    PROMPTPAY("promptpay"),
5275

5276
    @SerializedName("sepa_debit")
×
5277
    SEPA_DEBIT("sepa_debit"),
5278

5279
    @SerializedName("sofort")
×
5280
    SOFORT("sofort"),
5281

5282
    @SerializedName("swish")
×
5283
    SWISH("swish"),
5284

5285
    @SerializedName("twint")
×
5286
    TWINT("twint"),
5287

5288
    @SerializedName("us_bank_account")
×
5289
    US_BANK_ACCOUNT("us_bank_account"),
5290

5291
    @SerializedName("wechat_pay")
×
5292
    WECHAT_PAY("wechat_pay"),
5293

5294
    @SerializedName("zip")
×
5295
    ZIP("zip");
5296

5297
    @Getter(onMethod_ = {@Override})
5298
    private final String value;
5299

5300
    PaymentMethodType(String value) {
×
5301
      this.value = value;
×
5302
    }
×
5303
  }
5304

5305
  public enum SubmitType implements ApiRequestParams.EnumParam {
×
5306
    @SerializedName("auto")
×
5307
    AUTO("auto"),
5308

5309
    @SerializedName("book")
×
5310
    BOOK("book"),
5311

5312
    @SerializedName("donate")
×
5313
    DONATE("donate"),
5314

5315
    @SerializedName("pay")
×
5316
    PAY("pay"),
5317

5318
    @SerializedName("subscribe")
×
5319
    SUBSCRIBE("subscribe");
5320

5321
    @Getter(onMethod_ = {@Override})
5322
    private final String value;
5323

5324
    SubmitType(String value) {
×
5325
      this.value = value;
×
5326
    }
×
5327
  }
5328
}
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