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

stripe / stripe-java / #16493

03 Oct 2024 07:15PM UTC coverage: 12.942% (+0.08%) from 12.864%
#16493

push

github

web-flow
Merge Stripe-java v27.0.0 to beta branch (#1888)

409 of 1651 new or added lines in 88 files covered. (24.77%)

31 existing lines in 7 files now uncovered.

18773 of 145050 relevant lines covered (12.94%)

0.13 hits per line

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

6.04
/src/main/java/com/stripe/param/ProductCreateParams.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 java.math.BigDecimal;
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 ProductCreateParams extends ApiRequestParams {
15
  /** Whether the product is currently available for purchase. Defaults to {@code true}. */
16
  @SerializedName("active")
17
  Boolean active;
18

19
  /**
20
   * Data used to generate a new <a href="https://stripe.com/docs/api/prices">Price</a> object. This
21
   * Price will be set as the default price for this product.
22
   */
23
  @SerializedName("default_price_data")
24
  DefaultPriceData defaultPriceData;
25

26
  /**
27
   * The product's description, meant to be displayable to the customer. Use this field to
28
   * optionally store a long form explanation of the product being sold for your own rendering
29
   * purposes.
30
   */
31
  @SerializedName("description")
32
  String description;
33

34
  /** Specifies which fields in the response should be expanded. */
35
  @SerializedName("expand")
36
  List<String> expand;
37

38
  /**
39
   * Map of extra parameters for custom features not available in this client library. The content
40
   * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each
41
   * key/value pair is serialized as if the key is a root-level field (serialized) name in this
42
   * param object. Effectively, this map is flattened to its parent instance.
43
   */
44
  @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
45
  Map<String, Object> extraParams;
46

47
  /**
48
   * An identifier will be randomly generated by Stripe. You can optionally override this ID, but
49
   * the ID must be unique across all products in your Stripe account.
50
   */
51
  @SerializedName("id")
52
  String id;
53

54
  /** A list of up to 8 URLs of images for this product, meant to be displayable to the customer. */
55
  @SerializedName("images")
56
  List<String> images;
57

58
  /**
59
   * A list of up to 15 marketing features for this product. These are displayed in <a
60
   * href="https://stripe.com/docs/payments/checkout/pricing-table">pricing tables</a>.
61
   */
62
  @SerializedName("marketing_features")
63
  List<ProductCreateParams.MarketingFeature> marketingFeatures;
64

65
  /**
66
   * Set of <a href="https://stripe.com/docs/api/metadata">key-value pairs</a> that you can attach
67
   * to an object. This can be useful for storing additional information about the object in a
68
   * structured format. Individual keys can be unset by posting an empty value to them. All keys can
69
   * be unset by posting an empty value to {@code metadata}.
70
   */
71
  @SerializedName("metadata")
72
  Map<String, String> metadata;
73

74
  /** <strong>Required.</strong> The product's name, meant to be displayable to the customer. */
75
  @SerializedName("name")
76
  String name;
77

78
  /** The dimensions of this product for shipping purposes. */
79
  @SerializedName("package_dimensions")
80
  PackageDimensions packageDimensions;
81

82
  /** Provisioning configuration for this product. */
83
  @SerializedName("provisioning")
84
  Provisioning provisioning;
85

86
  /** Whether this product is shipped (i.e., physical goods). */
87
  @SerializedName("shippable")
88
  Boolean shippable;
89

90
  /**
91
   * An arbitrary string to be displayed on your customer's credit card or bank statement. While
92
   * most banks display this information consistently, some may display it incorrectly or not at
93
   * all.
94
   *
95
   * <p>This may be up to 22 characters. The statement description may not include {@code <}, {@code
96
   * >}, {@code \}, {@code "}, {@code '} characters, and will appear on your customer's statement in
97
   * capital letters. Non-ASCII characters are automatically stripped. It must contain at least one
98
   * letter. Only used for subscription payments.
99
   */
100
  @SerializedName("statement_descriptor")
101
  String statementDescriptor;
102

103
  /** A <a href="https://stripe.com/docs/tax/tax-categories">tax code</a> ID. */
104
  @SerializedName("tax_code")
105
  String taxCode;
106

107
  /**
108
   * The type of the product. Defaults to {@code service} if not explicitly specified, enabling use
109
   * of this product with Subscriptions and Plans. Set this parameter to {@code good} to use this
110
   * product with Orders and SKUs. On API versions before {@code 2018-02-05}, this field defaults to
111
   * {@code good} for compatibility reasons.
112
   */
113
  @SerializedName("type")
114
  Type type;
115

116
  /**
117
   * A label that represents units of this product. When set, this will be included in customers'
118
   * receipts, invoices, Checkout, and the customer portal.
119
   */
120
  @SerializedName("unit_label")
121
  String unitLabel;
122

123
  /** A URL of a publicly-accessible webpage for this product. */
124
  @SerializedName("url")
125
  String url;
126

127
  private ProductCreateParams(
128
      Boolean active,
129
      DefaultPriceData defaultPriceData,
130
      String description,
131
      List<String> expand,
132
      Map<String, Object> extraParams,
133
      String id,
134
      List<String> images,
135
      List<ProductCreateParams.MarketingFeature> marketingFeatures,
136
      Map<String, String> metadata,
137
      String name,
138
      PackageDimensions packageDimensions,
139
      Provisioning provisioning,
140
      Boolean shippable,
141
      String statementDescriptor,
142
      String taxCode,
143
      Type type,
144
      String unitLabel,
145
      String url) {
1✔
146
    this.active = active;
1✔
147
    this.defaultPriceData = defaultPriceData;
1✔
148
    this.description = description;
1✔
149
    this.expand = expand;
1✔
150
    this.extraParams = extraParams;
1✔
151
    this.id = id;
1✔
152
    this.images = images;
1✔
153
    this.marketingFeatures = marketingFeatures;
1✔
154
    this.metadata = metadata;
1✔
155
    this.name = name;
1✔
156
    this.packageDimensions = packageDimensions;
1✔
157
    this.provisioning = provisioning;
1✔
158
    this.shippable = shippable;
1✔
159
    this.statementDescriptor = statementDescriptor;
1✔
160
    this.taxCode = taxCode;
1✔
161
    this.type = type;
1✔
162
    this.unitLabel = unitLabel;
1✔
163
    this.url = url;
1✔
164
  }
1✔
165

166
  public static Builder builder() {
167
    return new Builder();
1✔
168
  }
169

170
  public static class Builder {
1✔
171
    private Boolean active;
172

173
    private DefaultPriceData defaultPriceData;
174

175
    private String description;
176

177
    private List<String> expand;
178

179
    private Map<String, Object> extraParams;
180

181
    private String id;
182

183
    private List<String> images;
184

185
    private List<ProductCreateParams.MarketingFeature> marketingFeatures;
186

187
    private Map<String, String> metadata;
188

189
    private String name;
190

191
    private PackageDimensions packageDimensions;
192

193
    private Provisioning provisioning;
194

195
    private Boolean shippable;
196

197
    private String statementDescriptor;
198

199
    private String taxCode;
200

201
    private Type type;
202

203
    private String unitLabel;
204

205
    private String url;
206

207
    /** Finalize and obtain parameter instance from this builder. */
208
    public ProductCreateParams build() {
209
      return new ProductCreateParams(
1✔
210
          this.active,
211
          this.defaultPriceData,
212
          this.description,
213
          this.expand,
214
          this.extraParams,
215
          this.id,
216
          this.images,
217
          this.marketingFeatures,
218
          this.metadata,
219
          this.name,
220
          this.packageDimensions,
221
          this.provisioning,
222
          this.shippable,
223
          this.statementDescriptor,
224
          this.taxCode,
225
          this.type,
226
          this.unitLabel,
227
          this.url);
228
    }
229

230
    /** Whether the product is currently available for purchase. Defaults to {@code true}. */
231
    public Builder setActive(Boolean active) {
232
      this.active = active;
×
233
      return this;
×
234
    }
235

236
    /**
237
     * Data used to generate a new <a href="https://stripe.com/docs/api/prices">Price</a> object.
238
     * This Price will be set as the default price for this product.
239
     */
240
    public Builder setDefaultPriceData(ProductCreateParams.DefaultPriceData defaultPriceData) {
241
      this.defaultPriceData = defaultPriceData;
×
242
      return this;
×
243
    }
244

245
    /**
246
     * The product's description, meant to be displayable to the customer. Use this field to
247
     * optionally store a long form explanation of the product being sold for your own rendering
248
     * purposes.
249
     */
250
    public Builder setDescription(String description) {
251
      this.description = description;
×
252
      return this;
×
253
    }
254

255
    /**
256
     * Add an element to `expand` list. A list is initialized for the first `add/addAll` call, and
257
     * subsequent calls adds additional elements to the original list. See {@link
258
     * ProductCreateParams#expand} for the field documentation.
259
     */
260
    public Builder addExpand(String element) {
261
      if (this.expand == null) {
×
262
        this.expand = new ArrayList<>();
×
263
      }
264
      this.expand.add(element);
×
265
      return this;
×
266
    }
267

268
    /**
269
     * Add all elements to `expand` list. A list is initialized for the first `add/addAll` call, and
270
     * subsequent calls adds additional elements to the original list. See {@link
271
     * ProductCreateParams#expand} for the field documentation.
272
     */
273
    public Builder addAllExpand(List<String> elements) {
274
      if (this.expand == null) {
×
275
        this.expand = new ArrayList<>();
×
276
      }
277
      this.expand.addAll(elements);
×
278
      return this;
×
279
    }
280

281
    /**
282
     * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll`
283
     * call, and subsequent calls add additional key/value pairs to the original map. See {@link
284
     * ProductCreateParams#extraParams} for the field documentation.
285
     */
286
    public Builder putExtraParam(String key, Object value) {
287
      if (this.extraParams == null) {
×
288
        this.extraParams = new HashMap<>();
×
289
      }
290
      this.extraParams.put(key, value);
×
291
      return this;
×
292
    }
293

294
    /**
295
     * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
296
     * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map.
297
     * See {@link ProductCreateParams#extraParams} for the field documentation.
298
     */
299
    public Builder putAllExtraParam(Map<String, Object> map) {
300
      if (this.extraParams == null) {
×
301
        this.extraParams = new HashMap<>();
×
302
      }
303
      this.extraParams.putAll(map);
×
304
      return this;
×
305
    }
306

307
    /**
308
     * An identifier will be randomly generated by Stripe. You can optionally override this ID, but
309
     * the ID must be unique across all products in your Stripe account.
310
     */
311
    public Builder setId(String id) {
312
      this.id = id;
×
313
      return this;
×
314
    }
315

316
    /**
317
     * Add an element to `images` list. A list is initialized for the first `add/addAll` call, and
318
     * subsequent calls adds additional elements to the original list. See {@link
319
     * ProductCreateParams#images} for the field documentation.
320
     */
321
    public Builder addImage(String element) {
322
      if (this.images == null) {
×
323
        this.images = new ArrayList<>();
×
324
      }
325
      this.images.add(element);
×
326
      return this;
×
327
    }
328

329
    /**
330
     * Add all elements to `images` list. A list is initialized for the first `add/addAll` call, and
331
     * subsequent calls adds additional elements to the original list. See {@link
332
     * ProductCreateParams#images} for the field documentation.
333
     */
334
    public Builder addAllImage(List<String> elements) {
335
      if (this.images == null) {
×
336
        this.images = new ArrayList<>();
×
337
      }
338
      this.images.addAll(elements);
×
339
      return this;
×
340
    }
341

342
    /**
343
     * Add an element to `marketingFeatures` list. A list is initialized for the first `add/addAll`
344
     * call, and subsequent calls adds additional elements to the original list. See {@link
345
     * ProductCreateParams#marketingFeatures} for the field documentation.
346
     */
347
    public Builder addMarketingFeature(ProductCreateParams.MarketingFeature element) {
348
      if (this.marketingFeatures == null) {
×
349
        this.marketingFeatures = new ArrayList<>();
×
350
      }
351
      this.marketingFeatures.add(element);
×
352
      return this;
×
353
    }
354

355
    /**
356
     * Add all elements to `marketingFeatures` list. A list is initialized for the first
357
     * `add/addAll` call, and subsequent calls adds additional elements to the original list. See
358
     * {@link ProductCreateParams#marketingFeatures} for the field documentation.
359
     */
360
    public Builder addAllMarketingFeature(List<ProductCreateParams.MarketingFeature> elements) {
361
      if (this.marketingFeatures == null) {
×
362
        this.marketingFeatures = new ArrayList<>();
×
363
      }
364
      this.marketingFeatures.addAll(elements);
×
365
      return this;
×
366
    }
367

368
    /**
369
     * Add a key/value pair to `metadata` map. A map is initialized for the first `put/putAll` call,
370
     * and subsequent calls add additional key/value pairs to the original map. See {@link
371
     * ProductCreateParams#metadata} for the field documentation.
372
     */
373
    public Builder putMetadata(String key, String value) {
374
      if (this.metadata == null) {
×
375
        this.metadata = new HashMap<>();
×
376
      }
377
      this.metadata.put(key, value);
×
378
      return this;
×
379
    }
380

381
    /**
382
     * Add all map key/value pairs to `metadata` map. A map is initialized for the first
383
     * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map.
384
     * See {@link ProductCreateParams#metadata} for the field documentation.
385
     */
386
    public Builder putAllMetadata(Map<String, String> map) {
387
      if (this.metadata == null) {
×
388
        this.metadata = new HashMap<>();
×
389
      }
390
      this.metadata.putAll(map);
×
391
      return this;
×
392
    }
393

394
    /** <strong>Required.</strong> The product's name, meant to be displayable to the customer. */
395
    public Builder setName(String name) {
396
      this.name = name;
1✔
397
      return this;
1✔
398
    }
399

400
    /** The dimensions of this product for shipping purposes. */
401
    public Builder setPackageDimensions(ProductCreateParams.PackageDimensions packageDimensions) {
402
      this.packageDimensions = packageDimensions;
×
403
      return this;
×
404
    }
405

406
    /** Provisioning configuration for this product. */
407
    public Builder setProvisioning(ProductCreateParams.Provisioning provisioning) {
408
      this.provisioning = provisioning;
×
409
      return this;
×
410
    }
411

412
    /** Whether this product is shipped (i.e., physical goods). */
413
    public Builder setShippable(Boolean shippable) {
414
      this.shippable = shippable;
×
415
      return this;
×
416
    }
417

418
    /**
419
     * An arbitrary string to be displayed on your customer's credit card or bank statement. While
420
     * most banks display this information consistently, some may display it incorrectly or not at
421
     * all.
422
     *
423
     * <p>This may be up to 22 characters. The statement description may not include {@code <},
424
     * {@code >}, {@code \}, {@code "}, {@code '} characters, and will appear on your customer's
425
     * statement in capital letters. Non-ASCII characters are automatically stripped. It must
426
     * contain at least one letter. Only used for subscription payments.
427
     */
428
    public Builder setStatementDescriptor(String statementDescriptor) {
429
      this.statementDescriptor = statementDescriptor;
×
430
      return this;
×
431
    }
432

433
    /** A <a href="https://stripe.com/docs/tax/tax-categories">tax code</a> ID. */
434
    public Builder setTaxCode(String taxCode) {
435
      this.taxCode = taxCode;
×
436
      return this;
×
437
    }
438

439
    /**
440
     * The type of the product. Defaults to {@code service} if not explicitly specified, enabling
441
     * use of this product with Subscriptions and Plans. Set this parameter to {@code good} to use
442
     * this product with Orders and SKUs. On API versions before {@code 2018-02-05}, this field
443
     * defaults to {@code good} for compatibility reasons.
444
     */
445
    public Builder setType(ProductCreateParams.Type type) {
446
      this.type = type;
×
447
      return this;
×
448
    }
449

450
    /**
451
     * A label that represents units of this product. When set, this will be included in customers'
452
     * receipts, invoices, Checkout, and the customer portal.
453
     */
454
    public Builder setUnitLabel(String unitLabel) {
455
      this.unitLabel = unitLabel;
×
456
      return this;
×
457
    }
458

459
    /** A URL of a publicly-accessible webpage for this product. */
460
    public Builder setUrl(String url) {
461
      this.url = url;
×
462
      return this;
×
463
    }
464
  }
465

466
  @Getter
467
  public static class DefaultPriceData {
468
    /**
469
     * <strong>Required.</strong> Three-letter <a
470
     * href="https://www.iso.org/iso-4217-currency-codes.html">ISO currency code</a>, in lowercase.
471
     * Must be a <a href="https://stripe.com/docs/currencies">supported currency</a>.
472
     */
473
    @SerializedName("currency")
474
    String currency;
475

476
    /**
477
     * Prices defined in each available currency option. Each key must be a three-letter <a
478
     * href="https://www.iso.org/iso-4217-currency-codes.html">ISO currency code</a> and a <a
479
     * href="https://stripe.com/docs/currencies">supported currency</a>.
480
     */
481
    @SerializedName("currency_options")
482
    Map<String, ProductCreateParams.DefaultPriceData.CurrencyOption> currencyOptions;
483

484
    /**
485
     * When set, provides configuration for the amount to be adjusted by the customer during
486
     * Checkout Sessions and Payment Links.
487
     */
488
    @SerializedName("custom_unit_amount")
489
    CustomUnitAmount customUnitAmount;
490

491
    /**
492
     * Map of extra parameters for custom features not available in this client library. The content
493
     * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each
494
     * key/value pair is serialized as if the key is a root-level field (serialized) name in this
495
     * param object. Effectively, this map is flattened to its parent instance.
496
     */
497
    @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
498
    Map<String, Object> extraParams;
499

500
    /** The recurring components of a price such as {@code interval} and {@code interval_count}. */
501
    @SerializedName("recurring")
502
    Recurring recurring;
503

504
    /**
505
     * Only required if a <a
506
     * href="https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)">default
507
     * tax behavior</a> was not provided in the Stripe Tax settings. Specifies whether the price is
508
     * considered inclusive of taxes or exclusive of taxes. One of {@code inclusive}, {@code
509
     * exclusive}, or {@code unspecified}. Once specified as either {@code inclusive} or {@code
510
     * exclusive}, it cannot be changed.
511
     */
512
    @SerializedName("tax_behavior")
513
    TaxBehavior taxBehavior;
514

515
    /**
516
     * A positive integer in cents (or local equivalent) (or 0 for a free price) representing how
517
     * much to charge. One of {@code unit_amount}, {@code unit_amount_decimal}, or {@code
518
     * custom_unit_amount} is required.
519
     */
520
    @SerializedName("unit_amount")
521
    Long unitAmount;
522

523
    /**
524
     * Same as {@code unit_amount}, but accepts a decimal value in cents (or local equivalent) with
525
     * at most 12 decimal places. Only one of {@code unit_amount} and {@code unit_amount_decimal}
526
     * can be set.
527
     */
528
    @SerializedName("unit_amount_decimal")
529
    BigDecimal unitAmountDecimal;
530

531
    private DefaultPriceData(
532
        String currency,
533
        Map<String, ProductCreateParams.DefaultPriceData.CurrencyOption> currencyOptions,
534
        CustomUnitAmount customUnitAmount,
535
        Map<String, Object> extraParams,
536
        Recurring recurring,
537
        TaxBehavior taxBehavior,
538
        Long unitAmount,
539
        BigDecimal unitAmountDecimal) {
×
540
      this.currency = currency;
×
541
      this.currencyOptions = currencyOptions;
×
NEW
542
      this.customUnitAmount = customUnitAmount;
×
543
      this.extraParams = extraParams;
×
544
      this.recurring = recurring;
×
545
      this.taxBehavior = taxBehavior;
×
546
      this.unitAmount = unitAmount;
×
547
      this.unitAmountDecimal = unitAmountDecimal;
×
548
    }
×
549

550
    public static Builder builder() {
551
      return new Builder();
×
552
    }
553

554
    public static class Builder {
×
555
      private String currency;
556

557
      private Map<String, ProductCreateParams.DefaultPriceData.CurrencyOption> currencyOptions;
558

559
      private CustomUnitAmount customUnitAmount;
560

561
      private Map<String, Object> extraParams;
562

563
      private Recurring recurring;
564

565
      private TaxBehavior taxBehavior;
566

567
      private Long unitAmount;
568

569
      private BigDecimal unitAmountDecimal;
570

571
      /** Finalize and obtain parameter instance from this builder. */
572
      public ProductCreateParams.DefaultPriceData build() {
573
        return new ProductCreateParams.DefaultPriceData(
×
574
            this.currency,
575
            this.currencyOptions,
576
            this.customUnitAmount,
577
            this.extraParams,
578
            this.recurring,
579
            this.taxBehavior,
580
            this.unitAmount,
581
            this.unitAmountDecimal);
582
      }
583

584
      /**
585
       * <strong>Required.</strong> Three-letter <a
586
       * href="https://www.iso.org/iso-4217-currency-codes.html">ISO currency code</a>, in
587
       * lowercase. Must be a <a href="https://stripe.com/docs/currencies">supported currency</a>.
588
       */
589
      public Builder setCurrency(String currency) {
590
        this.currency = currency;
×
591
        return this;
×
592
      }
593

594
      /**
595
       * Add a key/value pair to `currencyOptions` map. A map is initialized for the first
596
       * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map.
597
       * See {@link ProductCreateParams.DefaultPriceData#currencyOptions} for the field
598
       * documentation.
599
       */
600
      public Builder putCurrencyOption(
601
          String key, ProductCreateParams.DefaultPriceData.CurrencyOption value) {
602
        if (this.currencyOptions == null) {
×
603
          this.currencyOptions = new HashMap<>();
×
604
        }
605
        this.currencyOptions.put(key, value);
×
606
        return this;
×
607
      }
608

609
      /**
610
       * Add all map key/value pairs to `currencyOptions` map. A map is initialized for the first
611
       * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map.
612
       * See {@link ProductCreateParams.DefaultPriceData#currencyOptions} for the field
613
       * documentation.
614
       */
615
      public Builder putAllCurrencyOption(
616
          Map<String, ProductCreateParams.DefaultPriceData.CurrencyOption> map) {
617
        if (this.currencyOptions == null) {
×
618
          this.currencyOptions = new HashMap<>();
×
619
        }
620
        this.currencyOptions.putAll(map);
×
621
        return this;
×
622
      }
623

624
      /**
625
       * When set, provides configuration for the amount to be adjusted by the customer during
626
       * Checkout Sessions and Payment Links.
627
       */
628
      public Builder setCustomUnitAmount(
629
          ProductCreateParams.DefaultPriceData.CustomUnitAmount customUnitAmount) {
NEW
630
        this.customUnitAmount = customUnitAmount;
×
NEW
631
        return this;
×
632
      }
633

634
      /**
635
       * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll`
636
       * call, and subsequent calls add additional key/value pairs to the original map. See {@link
637
       * ProductCreateParams.DefaultPriceData#extraParams} for the field documentation.
638
       */
639
      public Builder putExtraParam(String key, Object value) {
640
        if (this.extraParams == null) {
×
641
          this.extraParams = new HashMap<>();
×
642
        }
643
        this.extraParams.put(key, value);
×
644
        return this;
×
645
      }
646

647
      /**
648
       * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
649
       * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map.
650
       * See {@link ProductCreateParams.DefaultPriceData#extraParams} for the field documentation.
651
       */
652
      public Builder putAllExtraParam(Map<String, Object> map) {
653
        if (this.extraParams == null) {
×
654
          this.extraParams = new HashMap<>();
×
655
        }
656
        this.extraParams.putAll(map);
×
657
        return this;
×
658
      }
659

660
      /**
661
       * The recurring components of a price such as {@code interval} and {@code interval_count}.
662
       */
663
      public Builder setRecurring(ProductCreateParams.DefaultPriceData.Recurring recurring) {
664
        this.recurring = recurring;
×
665
        return this;
×
666
      }
667

668
      /**
669
       * Only required if a <a
670
       * href="https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)">default
671
       * tax behavior</a> was not provided in the Stripe Tax settings. Specifies whether the price
672
       * is considered inclusive of taxes or exclusive of taxes. One of {@code inclusive}, {@code
673
       * exclusive}, or {@code unspecified}. Once specified as either {@code inclusive} or {@code
674
       * exclusive}, it cannot be changed.
675
       */
676
      public Builder setTaxBehavior(ProductCreateParams.DefaultPriceData.TaxBehavior taxBehavior) {
677
        this.taxBehavior = taxBehavior;
×
678
        return this;
×
679
      }
680

681
      /**
682
       * A positive integer in cents (or local equivalent) (or 0 for a free price) representing how
683
       * much to charge. One of {@code unit_amount}, {@code unit_amount_decimal}, or {@code
684
       * custom_unit_amount} is required.
685
       */
686
      public Builder setUnitAmount(Long unitAmount) {
687
        this.unitAmount = unitAmount;
×
688
        return this;
×
689
      }
690

691
      /**
692
       * Same as {@code unit_amount}, but accepts a decimal value in cents (or local equivalent)
693
       * with at most 12 decimal places. Only one of {@code unit_amount} and {@code
694
       * unit_amount_decimal} can be set.
695
       */
696
      public Builder setUnitAmountDecimal(BigDecimal unitAmountDecimal) {
697
        this.unitAmountDecimal = unitAmountDecimal;
×
698
        return this;
×
699
      }
700
    }
701

702
    @Getter
703
    public static class CurrencyOption {
704
      /**
705
       * When set, provides configuration for the amount to be adjusted by the customer during
706
       * Checkout Sessions and Payment Links.
707
       */
708
      @SerializedName("custom_unit_amount")
709
      CustomUnitAmount customUnitAmount;
710

711
      /**
712
       * Map of extra parameters for custom features not available in this client library. The
713
       * content in this map is not serialized under this field's {@code @SerializedName} value.
714
       * Instead, each key/value pair is serialized as if the key is a root-level field (serialized)
715
       * name in this param object. Effectively, this map is flattened to its parent instance.
716
       */
717
      @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
718
      Map<String, Object> extraParams;
719

720
      /**
721
       * Only required if a <a
722
       * href="https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)">default
723
       * tax behavior</a> was not provided in the Stripe Tax settings. Specifies whether the price
724
       * is considered inclusive of taxes or exclusive of taxes. One of {@code inclusive}, {@code
725
       * exclusive}, or {@code unspecified}. Once specified as either {@code inclusive} or {@code
726
       * exclusive}, it cannot be changed.
727
       */
728
      @SerializedName("tax_behavior")
729
      TaxBehavior taxBehavior;
730

731
      /**
732
       * Each element represents a pricing tier. This parameter requires {@code billing_scheme} to
733
       * be set to {@code tiered}. See also the documentation for {@code billing_scheme}.
734
       */
735
      @SerializedName("tiers")
736
      List<ProductCreateParams.DefaultPriceData.CurrencyOption.Tier> tiers;
737

738
      /**
739
       * A positive integer in cents (or local equivalent) (or 0 for a free price) representing how
740
       * much to charge.
741
       */
742
      @SerializedName("unit_amount")
743
      Long unitAmount;
744

745
      /**
746
       * Same as {@code unit_amount}, but accepts a decimal value in cents (or local equivalent)
747
       * with at most 12 decimal places. Only one of {@code unit_amount} and {@code
748
       * unit_amount_decimal} can be set.
749
       */
750
      @SerializedName("unit_amount_decimal")
751
      BigDecimal unitAmountDecimal;
752

753
      private CurrencyOption(
754
          CustomUnitAmount customUnitAmount,
755
          Map<String, Object> extraParams,
756
          TaxBehavior taxBehavior,
757
          List<ProductCreateParams.DefaultPriceData.CurrencyOption.Tier> tiers,
758
          Long unitAmount,
759
          BigDecimal unitAmountDecimal) {
×
760
        this.customUnitAmount = customUnitAmount;
×
761
        this.extraParams = extraParams;
×
762
        this.taxBehavior = taxBehavior;
×
763
        this.tiers = tiers;
×
764
        this.unitAmount = unitAmount;
×
765
        this.unitAmountDecimal = unitAmountDecimal;
×
766
      }
×
767

768
      public static Builder builder() {
769
        return new Builder();
×
770
      }
771

772
      public static class Builder {
×
773
        private CustomUnitAmount customUnitAmount;
774

775
        private Map<String, Object> extraParams;
776

777
        private TaxBehavior taxBehavior;
778

779
        private List<ProductCreateParams.DefaultPriceData.CurrencyOption.Tier> tiers;
780

781
        private Long unitAmount;
782

783
        private BigDecimal unitAmountDecimal;
784

785
        /** Finalize and obtain parameter instance from this builder. */
786
        public ProductCreateParams.DefaultPriceData.CurrencyOption build() {
787
          return new ProductCreateParams.DefaultPriceData.CurrencyOption(
×
788
              this.customUnitAmount,
789
              this.extraParams,
790
              this.taxBehavior,
791
              this.tiers,
792
              this.unitAmount,
793
              this.unitAmountDecimal);
794
        }
795

796
        /**
797
         * When set, provides configuration for the amount to be adjusted by the customer during
798
         * Checkout Sessions and Payment Links.
799
         */
800
        public Builder setCustomUnitAmount(
801
            ProductCreateParams.DefaultPriceData.CurrencyOption.CustomUnitAmount customUnitAmount) {
802
          this.customUnitAmount = customUnitAmount;
×
803
          return this;
×
804
        }
805

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

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

834
        /**
835
         * Only required if a <a
836
         * href="https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)">default
837
         * tax behavior</a> was not provided in the Stripe Tax settings. Specifies whether the price
838
         * is considered inclusive of taxes or exclusive of taxes. One of {@code inclusive}, {@code
839
         * exclusive}, or {@code unspecified}. Once specified as either {@code inclusive} or {@code
840
         * exclusive}, it cannot be changed.
841
         */
842
        public Builder setTaxBehavior(
843
            ProductCreateParams.DefaultPriceData.CurrencyOption.TaxBehavior taxBehavior) {
844
          this.taxBehavior = taxBehavior;
×
845
          return this;
×
846
        }
847

848
        /**
849
         * Add an element to `tiers` list. A list is initialized for the first `add/addAll` call,
850
         * and subsequent calls adds additional elements to the original list. See {@link
851
         * ProductCreateParams.DefaultPriceData.CurrencyOption#tiers} for the field documentation.
852
         */
853
        public Builder addTier(ProductCreateParams.DefaultPriceData.CurrencyOption.Tier element) {
854
          if (this.tiers == null) {
×
855
            this.tiers = new ArrayList<>();
×
856
          }
857
          this.tiers.add(element);
×
858
          return this;
×
859
        }
860

861
        /**
862
         * Add all elements to `tiers` list. A list is initialized for the first `add/addAll` call,
863
         * and subsequent calls adds additional elements to the original list. See {@link
864
         * ProductCreateParams.DefaultPriceData.CurrencyOption#tiers} for the field documentation.
865
         */
866
        public Builder addAllTier(
867
            List<ProductCreateParams.DefaultPriceData.CurrencyOption.Tier> elements) {
868
          if (this.tiers == null) {
×
869
            this.tiers = new ArrayList<>();
×
870
          }
871
          this.tiers.addAll(elements);
×
872
          return this;
×
873
        }
874

875
        /**
876
         * A positive integer in cents (or local equivalent) (or 0 for a free price) representing
877
         * how much to charge.
878
         */
879
        public Builder setUnitAmount(Long unitAmount) {
880
          this.unitAmount = unitAmount;
×
881
          return this;
×
882
        }
883

884
        /**
885
         * Same as {@code unit_amount}, but accepts a decimal value in cents (or local equivalent)
886
         * with at most 12 decimal places. Only one of {@code unit_amount} and {@code
887
         * unit_amount_decimal} can be set.
888
         */
889
        public Builder setUnitAmountDecimal(BigDecimal unitAmountDecimal) {
890
          this.unitAmountDecimal = unitAmountDecimal;
×
891
          return this;
×
892
        }
893
      }
894

895
      @Getter
896
      public static class CustomUnitAmount {
897
        /**
898
         * <strong>Required.</strong> Pass in {@code true} to enable {@code custom_unit_amount},
899
         * otherwise omit {@code custom_unit_amount}.
900
         */
901
        @SerializedName("enabled")
902
        Boolean enabled;
903

904
        /**
905
         * Map of extra parameters for custom features not available in this client library. The
906
         * content in this map is not serialized under this field's {@code @SerializedName} value.
907
         * Instead, each key/value pair is serialized as if the key is a root-level field
908
         * (serialized) name in this param object. Effectively, this map is flattened to its parent
909
         * instance.
910
         */
911
        @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
912
        Map<String, Object> extraParams;
913

914
        /** The maximum unit amount the customer can specify for this item. */
915
        @SerializedName("maximum")
916
        Long maximum;
917

918
        /**
919
         * The minimum unit amount the customer can specify for this item. Must be at least the
920
         * minimum charge amount.
921
         */
922
        @SerializedName("minimum")
923
        Long minimum;
924

925
        /** The starting unit amount which can be updated by the customer. */
926
        @SerializedName("preset")
927
        Long preset;
928

929
        private CustomUnitAmount(
930
            Boolean enabled,
931
            Map<String, Object> extraParams,
932
            Long maximum,
933
            Long minimum,
934
            Long preset) {
×
935
          this.enabled = enabled;
×
936
          this.extraParams = extraParams;
×
937
          this.maximum = maximum;
×
938
          this.minimum = minimum;
×
939
          this.preset = preset;
×
940
        }
×
941

942
        public static Builder builder() {
943
          return new Builder();
×
944
        }
945

946
        public static class Builder {
×
947
          private Boolean enabled;
948

949
          private Map<String, Object> extraParams;
950

951
          private Long maximum;
952

953
          private Long minimum;
954

955
          private Long preset;
956

957
          /** Finalize and obtain parameter instance from this builder. */
958
          public ProductCreateParams.DefaultPriceData.CurrencyOption.CustomUnitAmount build() {
959
            return new ProductCreateParams.DefaultPriceData.CurrencyOption.CustomUnitAmount(
×
960
                this.enabled, this.extraParams, this.maximum, this.minimum, this.preset);
961
          }
962

963
          /**
964
           * <strong>Required.</strong> Pass in {@code true} to enable {@code custom_unit_amount},
965
           * otherwise omit {@code custom_unit_amount}.
966
           */
967
          public Builder setEnabled(Boolean enabled) {
968
            this.enabled = enabled;
×
969
            return this;
×
970
          }
971

972
          /**
973
           * Add a key/value pair to `extraParams` map. A map is initialized for the first
974
           * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
975
           * map. See {@link
976
           * ProductCreateParams.DefaultPriceData.CurrencyOption.CustomUnitAmount#extraParams} for
977
           * the field documentation.
978
           */
979
          public Builder putExtraParam(String key, Object value) {
980
            if (this.extraParams == null) {
×
981
              this.extraParams = new HashMap<>();
×
982
            }
983
            this.extraParams.put(key, value);
×
984
            return this;
×
985
          }
986

987
          /**
988
           * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
989
           * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
990
           * map. See {@link
991
           * ProductCreateParams.DefaultPriceData.CurrencyOption.CustomUnitAmount#extraParams} for
992
           * the field documentation.
993
           */
994
          public Builder putAllExtraParam(Map<String, Object> map) {
995
            if (this.extraParams == null) {
×
996
              this.extraParams = new HashMap<>();
×
997
            }
998
            this.extraParams.putAll(map);
×
999
            return this;
×
1000
          }
1001

1002
          /** The maximum unit amount the customer can specify for this item. */
1003
          public Builder setMaximum(Long maximum) {
1004
            this.maximum = maximum;
×
1005
            return this;
×
1006
          }
1007

1008
          /**
1009
           * The minimum unit amount the customer can specify for this item. Must be at least the
1010
           * minimum charge amount.
1011
           */
1012
          public Builder setMinimum(Long minimum) {
1013
            this.minimum = minimum;
×
1014
            return this;
×
1015
          }
1016

1017
          /** The starting unit amount which can be updated by the customer. */
1018
          public Builder setPreset(Long preset) {
1019
            this.preset = preset;
×
1020
            return this;
×
1021
          }
1022
        }
1023
      }
1024

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

1037
        /**
1038
         * The flat billing amount for an entire tier, regardless of the number of units in the
1039
         * tier.
1040
         */
1041
        @SerializedName("flat_amount")
1042
        Long flatAmount;
1043

1044
        /**
1045
         * Same as {@code flat_amount}, but accepts a decimal value representing an integer in the
1046
         * minor units of the currency. Only one of {@code flat_amount} and {@code
1047
         * flat_amount_decimal} can be set.
1048
         */
1049
        @SerializedName("flat_amount_decimal")
1050
        BigDecimal flatAmountDecimal;
1051

1052
        /** The per unit billing amount for each individual unit for which this tier applies. */
1053
        @SerializedName("unit_amount")
1054
        Long unitAmount;
1055

1056
        /**
1057
         * Same as {@code unit_amount}, but accepts a decimal value in cents (or local equivalent)
1058
         * with at most 12 decimal places. Only one of {@code unit_amount} and {@code
1059
         * unit_amount_decimal} can be set.
1060
         */
1061
        @SerializedName("unit_amount_decimal")
1062
        BigDecimal unitAmountDecimal;
1063

1064
        /**
1065
         * <strong>Required.</strong> Specifies the upper bound of this tier. The lower bound of a
1066
         * tier is the upper bound of the previous tier adding one. Use {@code inf} to define a
1067
         * fallback tier.
1068
         */
1069
        @SerializedName("up_to")
1070
        Object upTo;
1071

1072
        private Tier(
1073
            Map<String, Object> extraParams,
1074
            Long flatAmount,
1075
            BigDecimal flatAmountDecimal,
1076
            Long unitAmount,
1077
            BigDecimal unitAmountDecimal,
1078
            Object upTo) {
×
1079
          this.extraParams = extraParams;
×
1080
          this.flatAmount = flatAmount;
×
1081
          this.flatAmountDecimal = flatAmountDecimal;
×
1082
          this.unitAmount = unitAmount;
×
1083
          this.unitAmountDecimal = unitAmountDecimal;
×
1084
          this.upTo = upTo;
×
1085
        }
×
1086

1087
        public static Builder builder() {
1088
          return new Builder();
×
1089
        }
1090

1091
        public static class Builder {
×
1092
          private Map<String, Object> extraParams;
1093

1094
          private Long flatAmount;
1095

1096
          private BigDecimal flatAmountDecimal;
1097

1098
          private Long unitAmount;
1099

1100
          private BigDecimal unitAmountDecimal;
1101

1102
          private Object upTo;
1103

1104
          /** Finalize and obtain parameter instance from this builder. */
1105
          public ProductCreateParams.DefaultPriceData.CurrencyOption.Tier build() {
1106
            return new ProductCreateParams.DefaultPriceData.CurrencyOption.Tier(
×
1107
                this.extraParams,
1108
                this.flatAmount,
1109
                this.flatAmountDecimal,
1110
                this.unitAmount,
1111
                this.unitAmountDecimal,
1112
                this.upTo);
1113
          }
1114

1115
          /**
1116
           * Add a key/value pair to `extraParams` map. A map is initialized for the first
1117
           * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
1118
           * map. See {@link ProductCreateParams.DefaultPriceData.CurrencyOption.Tier#extraParams}
1119
           * for the field documentation.
1120
           */
1121
          public Builder putExtraParam(String key, Object value) {
1122
            if (this.extraParams == null) {
×
1123
              this.extraParams = new HashMap<>();
×
1124
            }
1125
            this.extraParams.put(key, value);
×
1126
            return this;
×
1127
          }
1128

1129
          /**
1130
           * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
1131
           * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
1132
           * map. See {@link ProductCreateParams.DefaultPriceData.CurrencyOption.Tier#extraParams}
1133
           * for the field documentation.
1134
           */
1135
          public Builder putAllExtraParam(Map<String, Object> map) {
1136
            if (this.extraParams == null) {
×
1137
              this.extraParams = new HashMap<>();
×
1138
            }
1139
            this.extraParams.putAll(map);
×
1140
            return this;
×
1141
          }
1142

1143
          /**
1144
           * The flat billing amount for an entire tier, regardless of the number of units in the
1145
           * tier.
1146
           */
1147
          public Builder setFlatAmount(Long flatAmount) {
1148
            this.flatAmount = flatAmount;
×
1149
            return this;
×
1150
          }
1151

1152
          /**
1153
           * Same as {@code flat_amount}, but accepts a decimal value representing an integer in the
1154
           * minor units of the currency. Only one of {@code flat_amount} and {@code
1155
           * flat_amount_decimal} can be set.
1156
           */
1157
          public Builder setFlatAmountDecimal(BigDecimal flatAmountDecimal) {
1158
            this.flatAmountDecimal = flatAmountDecimal;
×
1159
            return this;
×
1160
          }
1161

1162
          /** The per unit billing amount for each individual unit for which this tier applies. */
1163
          public Builder setUnitAmount(Long unitAmount) {
1164
            this.unitAmount = unitAmount;
×
1165
            return this;
×
1166
          }
1167

1168
          /**
1169
           * Same as {@code unit_amount}, but accepts a decimal value in cents (or local equivalent)
1170
           * with at most 12 decimal places. Only one of {@code unit_amount} and {@code
1171
           * unit_amount_decimal} can be set.
1172
           */
1173
          public Builder setUnitAmountDecimal(BigDecimal unitAmountDecimal) {
1174
            this.unitAmountDecimal = unitAmountDecimal;
×
1175
            return this;
×
1176
          }
1177

1178
          /**
1179
           * <strong>Required.</strong> Specifies the upper bound of this tier. The lower bound of a
1180
           * tier is the upper bound of the previous tier adding one. Use {@code inf} to define a
1181
           * fallback tier.
1182
           */
1183
          public Builder setUpTo(
1184
              ProductCreateParams.DefaultPriceData.CurrencyOption.Tier.UpTo upTo) {
1185
            this.upTo = upTo;
×
1186
            return this;
×
1187
          }
1188

1189
          /**
1190
           * <strong>Required.</strong> Specifies the upper bound of this tier. The lower bound of a
1191
           * tier is the upper bound of the previous tier adding one. Use {@code inf} to define a
1192
           * fallback tier.
1193
           */
1194
          public Builder setUpTo(Long upTo) {
1195
            this.upTo = upTo;
×
1196
            return this;
×
1197
          }
1198
        }
1199

1200
        public enum UpTo implements ApiRequestParams.EnumParam {
×
1201
          @SerializedName("inf")
×
1202
          INF("inf");
1203

1204
          @Getter(onMethod_ = {@Override})
1205
          private final String value;
1206

1207
          UpTo(String value) {
×
1208
            this.value = value;
×
1209
          }
×
1210
        }
1211
      }
1212

1213
      public enum TaxBehavior implements ApiRequestParams.EnumParam {
×
1214
        @SerializedName("exclusive")
×
1215
        EXCLUSIVE("exclusive"),
1216

1217
        @SerializedName("inclusive")
×
1218
        INCLUSIVE("inclusive"),
1219

1220
        @SerializedName("unspecified")
×
1221
        UNSPECIFIED("unspecified");
1222

1223
        @Getter(onMethod_ = {@Override})
1224
        private final String value;
1225

1226
        TaxBehavior(String value) {
×
1227
          this.value = value;
×
1228
        }
×
1229
      }
1230
    }
1231

1232
    @Getter
1233
    public static class CustomUnitAmount {
1234
      /**
1235
       * <strong>Required.</strong> Pass in {@code true} to enable {@code custom_unit_amount},
1236
       * otherwise omit {@code custom_unit_amount}.
1237
       */
1238
      @SerializedName("enabled")
1239
      Boolean enabled;
1240

1241
      /**
1242
       * Map of extra parameters for custom features not available in this client library. The
1243
       * content in this map is not serialized under this field's {@code @SerializedName} value.
1244
       * Instead, each key/value pair is serialized as if the key is a root-level field (serialized)
1245
       * name in this param object. Effectively, this map is flattened to its parent instance.
1246
       */
1247
      @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
1248
      Map<String, Object> extraParams;
1249

1250
      /** The maximum unit amount the customer can specify for this item. */
1251
      @SerializedName("maximum")
1252
      Long maximum;
1253

1254
      /**
1255
       * The minimum unit amount the customer can specify for this item. Must be at least the
1256
       * minimum charge amount.
1257
       */
1258
      @SerializedName("minimum")
1259
      Long minimum;
1260

1261
      /** The starting unit amount which can be updated by the customer. */
1262
      @SerializedName("preset")
1263
      Long preset;
1264

1265
      private CustomUnitAmount(
1266
          Boolean enabled,
1267
          Map<String, Object> extraParams,
1268
          Long maximum,
1269
          Long minimum,
NEW
1270
          Long preset) {
×
NEW
1271
        this.enabled = enabled;
×
NEW
1272
        this.extraParams = extraParams;
×
NEW
1273
        this.maximum = maximum;
×
NEW
1274
        this.minimum = minimum;
×
NEW
1275
        this.preset = preset;
×
NEW
1276
      }
×
1277

1278
      public static Builder builder() {
NEW
1279
        return new Builder();
×
1280
      }
1281

NEW
1282
      public static class Builder {
×
1283
        private Boolean enabled;
1284

1285
        private Map<String, Object> extraParams;
1286

1287
        private Long maximum;
1288

1289
        private Long minimum;
1290

1291
        private Long preset;
1292

1293
        /** Finalize and obtain parameter instance from this builder. */
1294
        public ProductCreateParams.DefaultPriceData.CustomUnitAmount build() {
NEW
1295
          return new ProductCreateParams.DefaultPriceData.CustomUnitAmount(
×
1296
              this.enabled, this.extraParams, this.maximum, this.minimum, this.preset);
1297
        }
1298

1299
        /**
1300
         * <strong>Required.</strong> Pass in {@code true} to enable {@code custom_unit_amount},
1301
         * otherwise omit {@code custom_unit_amount}.
1302
         */
1303
        public Builder setEnabled(Boolean enabled) {
NEW
1304
          this.enabled = enabled;
×
NEW
1305
          return this;
×
1306
        }
1307

1308
        /**
1309
         * Add a key/value pair to `extraParams` map. A map is initialized for the first
1310
         * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
1311
         * map. See {@link ProductCreateParams.DefaultPriceData.CustomUnitAmount#extraParams} for
1312
         * the field documentation.
1313
         */
1314
        public Builder putExtraParam(String key, Object value) {
NEW
1315
          if (this.extraParams == null) {
×
NEW
1316
            this.extraParams = new HashMap<>();
×
1317
          }
NEW
1318
          this.extraParams.put(key, value);
×
NEW
1319
          return this;
×
1320
        }
1321

1322
        /**
1323
         * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
1324
         * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
1325
         * map. See {@link ProductCreateParams.DefaultPriceData.CustomUnitAmount#extraParams} for
1326
         * the field documentation.
1327
         */
1328
        public Builder putAllExtraParam(Map<String, Object> map) {
NEW
1329
          if (this.extraParams == null) {
×
NEW
1330
            this.extraParams = new HashMap<>();
×
1331
          }
NEW
1332
          this.extraParams.putAll(map);
×
NEW
1333
          return this;
×
1334
        }
1335

1336
        /** The maximum unit amount the customer can specify for this item. */
1337
        public Builder setMaximum(Long maximum) {
NEW
1338
          this.maximum = maximum;
×
NEW
1339
          return this;
×
1340
        }
1341

1342
        /**
1343
         * The minimum unit amount the customer can specify for this item. Must be at least the
1344
         * minimum charge amount.
1345
         */
1346
        public Builder setMinimum(Long minimum) {
NEW
1347
          this.minimum = minimum;
×
NEW
1348
          return this;
×
1349
        }
1350

1351
        /** The starting unit amount which can be updated by the customer. */
1352
        public Builder setPreset(Long preset) {
NEW
1353
          this.preset = preset;
×
NEW
1354
          return this;
×
1355
        }
1356
      }
1357
    }
1358

1359
    @Getter
1360
    public static class Recurring {
1361
      /**
1362
       * Map of extra parameters for custom features not available in this client library. The
1363
       * content in this map is not serialized under this field's {@code @SerializedName} value.
1364
       * Instead, each key/value pair is serialized as if the key is a root-level field (serialized)
1365
       * name in this param object. Effectively, this map is flattened to its parent instance.
1366
       */
1367
      @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
1368
      Map<String, Object> extraParams;
1369

1370
      /**
1371
       * <strong>Required.</strong> Specifies billing frequency. Either {@code day}, {@code week},
1372
       * {@code month} or {@code year}.
1373
       */
1374
      @SerializedName("interval")
1375
      Interval interval;
1376

1377
      /**
1378
       * The number of intervals between subscription billings. For example, {@code interval=month}
1379
       * and {@code interval_count=3} bills every 3 months. Maximum of three years interval allowed
1380
       * (3 years, 36 months, or 156 weeks).
1381
       */
1382
      @SerializedName("interval_count")
1383
      Long intervalCount;
1384

1385
      private Recurring(Map<String, Object> extraParams, Interval interval, Long intervalCount) {
×
1386
        this.extraParams = extraParams;
×
1387
        this.interval = interval;
×
1388
        this.intervalCount = intervalCount;
×
1389
      }
×
1390

1391
      public static Builder builder() {
1392
        return new Builder();
×
1393
      }
1394

1395
      public static class Builder {
×
1396
        private Map<String, Object> extraParams;
1397

1398
        private Interval interval;
1399

1400
        private Long intervalCount;
1401

1402
        /** Finalize and obtain parameter instance from this builder. */
1403
        public ProductCreateParams.DefaultPriceData.Recurring build() {
1404
          return new ProductCreateParams.DefaultPriceData.Recurring(
×
1405
              this.extraParams, this.interval, this.intervalCount);
1406
        }
1407

1408
        /**
1409
         * Add a key/value pair to `extraParams` map. A map is initialized for the first
1410
         * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
1411
         * map. See {@link ProductCreateParams.DefaultPriceData.Recurring#extraParams} for the field
1412
         * documentation.
1413
         */
1414
        public Builder putExtraParam(String key, Object value) {
1415
          if (this.extraParams == null) {
×
1416
            this.extraParams = new HashMap<>();
×
1417
          }
1418
          this.extraParams.put(key, value);
×
1419
          return this;
×
1420
        }
1421

1422
        /**
1423
         * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
1424
         * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
1425
         * map. See {@link ProductCreateParams.DefaultPriceData.Recurring#extraParams} for the field
1426
         * documentation.
1427
         */
1428
        public Builder putAllExtraParam(Map<String, Object> map) {
1429
          if (this.extraParams == null) {
×
1430
            this.extraParams = new HashMap<>();
×
1431
          }
1432
          this.extraParams.putAll(map);
×
1433
          return this;
×
1434
        }
1435

1436
        /**
1437
         * <strong>Required.</strong> Specifies billing frequency. Either {@code day}, {@code week},
1438
         * {@code month} or {@code year}.
1439
         */
1440
        public Builder setInterval(
1441
            ProductCreateParams.DefaultPriceData.Recurring.Interval interval) {
1442
          this.interval = interval;
×
1443
          return this;
×
1444
        }
1445

1446
        /**
1447
         * The number of intervals between subscription billings. For example, {@code
1448
         * interval=month} and {@code interval_count=3} bills every 3 months. Maximum of three years
1449
         * interval allowed (3 years, 36 months, or 156 weeks).
1450
         */
1451
        public Builder setIntervalCount(Long intervalCount) {
1452
          this.intervalCount = intervalCount;
×
1453
          return this;
×
1454
        }
1455
      }
1456

1457
      public enum Interval implements ApiRequestParams.EnumParam {
×
1458
        @SerializedName("day")
×
1459
        DAY("day"),
1460

1461
        @SerializedName("month")
×
1462
        MONTH("month"),
1463

1464
        @SerializedName("week")
×
1465
        WEEK("week"),
1466

1467
        @SerializedName("year")
×
1468
        YEAR("year");
1469

1470
        @Getter(onMethod_ = {@Override})
1471
        private final String value;
1472

1473
        Interval(String value) {
×
1474
          this.value = value;
×
1475
        }
×
1476
      }
1477
    }
1478

1479
    public enum TaxBehavior implements ApiRequestParams.EnumParam {
×
1480
      @SerializedName("exclusive")
×
1481
      EXCLUSIVE("exclusive"),
1482

1483
      @SerializedName("inclusive")
×
1484
      INCLUSIVE("inclusive"),
1485

1486
      @SerializedName("unspecified")
×
1487
      UNSPECIFIED("unspecified");
1488

1489
      @Getter(onMethod_ = {@Override})
1490
      private final String value;
1491

1492
      TaxBehavior(String value) {
×
1493
        this.value = value;
×
1494
      }
×
1495
    }
1496
  }
1497

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

1509
    /** <strong>Required.</strong> The marketing feature name. Up to 80 characters long. */
1510
    @SerializedName("name")
1511
    String name;
1512

1513
    private MarketingFeature(Map<String, Object> extraParams, String name) {
×
1514
      this.extraParams = extraParams;
×
1515
      this.name = name;
×
1516
    }
×
1517

1518
    public static Builder builder() {
1519
      return new Builder();
×
1520
    }
1521

1522
    public static class Builder {
×
1523
      private Map<String, Object> extraParams;
1524

1525
      private String name;
1526

1527
      /** Finalize and obtain parameter instance from this builder. */
1528
      public ProductCreateParams.MarketingFeature build() {
1529
        return new ProductCreateParams.MarketingFeature(this.extraParams, this.name);
×
1530
      }
1531

1532
      /**
1533
       * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll`
1534
       * call, and subsequent calls add additional key/value pairs to the original map. See {@link
1535
       * ProductCreateParams.MarketingFeature#extraParams} for the field documentation.
1536
       */
1537
      public Builder putExtraParam(String key, Object value) {
1538
        if (this.extraParams == null) {
×
1539
          this.extraParams = new HashMap<>();
×
1540
        }
1541
        this.extraParams.put(key, value);
×
1542
        return this;
×
1543
      }
1544

1545
      /**
1546
       * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
1547
       * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map.
1548
       * See {@link ProductCreateParams.MarketingFeature#extraParams} for the field documentation.
1549
       */
1550
      public Builder putAllExtraParam(Map<String, Object> map) {
1551
        if (this.extraParams == null) {
×
1552
          this.extraParams = new HashMap<>();
×
1553
        }
1554
        this.extraParams.putAll(map);
×
1555
        return this;
×
1556
      }
1557

1558
      /** <strong>Required.</strong> The marketing feature name. Up to 80 characters long. */
1559
      public Builder setName(String name) {
1560
        this.name = name;
×
1561
        return this;
×
1562
      }
1563
    }
1564
  }
1565

1566
  @Getter
1567
  public static class PackageDimensions {
1568
    /**
1569
     * Map of extra parameters for custom features not available in this client library. The content
1570
     * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each
1571
     * key/value pair is serialized as if the key is a root-level field (serialized) name in this
1572
     * param object. Effectively, this map is flattened to its parent instance.
1573
     */
1574
    @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
1575
    Map<String, Object> extraParams;
1576

1577
    /** <strong>Required.</strong> Height, in inches. Maximum precision is 2 decimal places. */
1578
    @SerializedName("height")
1579
    BigDecimal height;
1580

1581
    /** <strong>Required.</strong> Length, in inches. Maximum precision is 2 decimal places. */
1582
    @SerializedName("length")
1583
    BigDecimal length;
1584

1585
    /** <strong>Required.</strong> Weight, in ounces. Maximum precision is 2 decimal places. */
1586
    @SerializedName("weight")
1587
    BigDecimal weight;
1588

1589
    /** <strong>Required.</strong> Width, in inches. Maximum precision is 2 decimal places. */
1590
    @SerializedName("width")
1591
    BigDecimal width;
1592

1593
    private PackageDimensions(
1594
        Map<String, Object> extraParams,
1595
        BigDecimal height,
1596
        BigDecimal length,
1597
        BigDecimal weight,
1598
        BigDecimal width) {
×
1599
      this.extraParams = extraParams;
×
1600
      this.height = height;
×
1601
      this.length = length;
×
1602
      this.weight = weight;
×
1603
      this.width = width;
×
1604
    }
×
1605

1606
    public static Builder builder() {
1607
      return new Builder();
×
1608
    }
1609

1610
    public static class Builder {
×
1611
      private Map<String, Object> extraParams;
1612

1613
      private BigDecimal height;
1614

1615
      private BigDecimal length;
1616

1617
      private BigDecimal weight;
1618

1619
      private BigDecimal width;
1620

1621
      /** Finalize and obtain parameter instance from this builder. */
1622
      public ProductCreateParams.PackageDimensions build() {
1623
        return new ProductCreateParams.PackageDimensions(
×
1624
            this.extraParams, this.height, this.length, this.weight, this.width);
1625
      }
1626

1627
      /**
1628
       * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll`
1629
       * call, and subsequent calls add additional key/value pairs to the original map. See {@link
1630
       * ProductCreateParams.PackageDimensions#extraParams} for the field documentation.
1631
       */
1632
      public Builder putExtraParam(String key, Object value) {
1633
        if (this.extraParams == null) {
×
1634
          this.extraParams = new HashMap<>();
×
1635
        }
1636
        this.extraParams.put(key, value);
×
1637
        return this;
×
1638
      }
1639

1640
      /**
1641
       * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
1642
       * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map.
1643
       * See {@link ProductCreateParams.PackageDimensions#extraParams} for the field documentation.
1644
       */
1645
      public Builder putAllExtraParam(Map<String, Object> map) {
1646
        if (this.extraParams == null) {
×
1647
          this.extraParams = new HashMap<>();
×
1648
        }
1649
        this.extraParams.putAll(map);
×
1650
        return this;
×
1651
      }
1652

1653
      /** <strong>Required.</strong> Height, in inches. Maximum precision is 2 decimal places. */
1654
      public Builder setHeight(BigDecimal height) {
1655
        this.height = height;
×
1656
        return this;
×
1657
      }
1658

1659
      /** <strong>Required.</strong> Length, in inches. Maximum precision is 2 decimal places. */
1660
      public Builder setLength(BigDecimal length) {
1661
        this.length = length;
×
1662
        return this;
×
1663
      }
1664

1665
      /** <strong>Required.</strong> Weight, in ounces. Maximum precision is 2 decimal places. */
1666
      public Builder setWeight(BigDecimal weight) {
1667
        this.weight = weight;
×
1668
        return this;
×
1669
      }
1670

1671
      /** <strong>Required.</strong> Width, in inches. Maximum precision is 2 decimal places. */
1672
      public Builder setWidth(BigDecimal width) {
1673
        this.width = width;
×
1674
        return this;
×
1675
      }
1676
    }
1677
  }
1678

1679
  @Getter
1680
  public static class Provisioning {
1681
    /**
1682
     * Map of extra parameters for custom features not available in this client library. The content
1683
     * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each
1684
     * key/value pair is serialized as if the key is a root-level field (serialized) name in this
1685
     * param object. Effectively, this map is flattened to its parent instance.
1686
     */
1687
    @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
1688
    Map<String, Object> extraParams;
1689

1690
    @SerializedName("gift_card")
1691
    GiftCard giftCard;
1692

1693
    /**
1694
     * <strong>Required.</strong> The type of provisioning, only {@code gift_card} currently
1695
     * supported.
1696
     */
1697
    @SerializedName("type")
1698
    Type type;
1699

1700
    private Provisioning(Map<String, Object> extraParams, GiftCard giftCard, Type type) {
×
1701
      this.extraParams = extraParams;
×
1702
      this.giftCard = giftCard;
×
1703
      this.type = type;
×
1704
    }
×
1705

1706
    public static Builder builder() {
1707
      return new Builder();
×
1708
    }
1709

1710
    public static class Builder {
×
1711
      private Map<String, Object> extraParams;
1712

1713
      private GiftCard giftCard;
1714

1715
      private Type type;
1716

1717
      /** Finalize and obtain parameter instance from this builder. */
1718
      public ProductCreateParams.Provisioning build() {
1719
        return new ProductCreateParams.Provisioning(this.extraParams, this.giftCard, this.type);
×
1720
      }
1721

1722
      /**
1723
       * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll`
1724
       * call, and subsequent calls add additional key/value pairs to the original map. See {@link
1725
       * ProductCreateParams.Provisioning#extraParams} for the field documentation.
1726
       */
1727
      public Builder putExtraParam(String key, Object value) {
1728
        if (this.extraParams == null) {
×
1729
          this.extraParams = new HashMap<>();
×
1730
        }
1731
        this.extraParams.put(key, value);
×
1732
        return this;
×
1733
      }
1734

1735
      /**
1736
       * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
1737
       * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map.
1738
       * See {@link ProductCreateParams.Provisioning#extraParams} for the field documentation.
1739
       */
1740
      public Builder putAllExtraParam(Map<String, Object> map) {
1741
        if (this.extraParams == null) {
×
1742
          this.extraParams = new HashMap<>();
×
1743
        }
1744
        this.extraParams.putAll(map);
×
1745
        return this;
×
1746
      }
1747

1748
      public Builder setGiftCard(ProductCreateParams.Provisioning.GiftCard giftCard) {
1749
        this.giftCard = giftCard;
×
1750
        return this;
×
1751
      }
1752

1753
      /**
1754
       * <strong>Required.</strong> The type of provisioning, only {@code gift_card} currently
1755
       * supported.
1756
       */
1757
      public Builder setType(ProductCreateParams.Provisioning.Type type) {
1758
        this.type = type;
×
1759
        return this;
×
1760
      }
1761
    }
1762

1763
    @Getter
1764
    public static class GiftCard {
1765
      /**
1766
       * Map of extra parameters for custom features not available in this client library. The
1767
       * content in this map is not serialized under this field's {@code @SerializedName} value.
1768
       * Instead, each key/value pair is serialized as if the key is a root-level field (serialized)
1769
       * name in this param object. Effectively, this map is flattened to its parent instance.
1770
       */
1771
      @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
1772
      Map<String, Object> extraParams;
1773

1774
      @SerializedName("fixed_amount")
1775
      FixedAmount fixedAmount;
1776

1777
      /**
1778
       * <strong>Required.</strong> The specific type of gift_card provisioning, only {@code
1779
       * fixed_amount} currently supported.
1780
       */
1781
      @SerializedName("type")
1782
      Type type;
1783

1784
      private GiftCard(Map<String, Object> extraParams, FixedAmount fixedAmount, Type type) {
×
1785
        this.extraParams = extraParams;
×
1786
        this.fixedAmount = fixedAmount;
×
1787
        this.type = type;
×
1788
      }
×
1789

1790
      public static Builder builder() {
1791
        return new Builder();
×
1792
      }
1793

1794
      public static class Builder {
×
1795
        private Map<String, Object> extraParams;
1796

1797
        private FixedAmount fixedAmount;
1798

1799
        private Type type;
1800

1801
        /** Finalize and obtain parameter instance from this builder. */
1802
        public ProductCreateParams.Provisioning.GiftCard build() {
1803
          return new ProductCreateParams.Provisioning.GiftCard(
×
1804
              this.extraParams, this.fixedAmount, this.type);
1805
        }
1806

1807
        /**
1808
         * Add a key/value pair to `extraParams` map. A map is initialized for the first
1809
         * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
1810
         * map. See {@link ProductCreateParams.Provisioning.GiftCard#extraParams} for the field
1811
         * documentation.
1812
         */
1813
        public Builder putExtraParam(String key, Object value) {
1814
          if (this.extraParams == null) {
×
1815
            this.extraParams = new HashMap<>();
×
1816
          }
1817
          this.extraParams.put(key, value);
×
1818
          return this;
×
1819
        }
1820

1821
        /**
1822
         * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
1823
         * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
1824
         * map. See {@link ProductCreateParams.Provisioning.GiftCard#extraParams} for the field
1825
         * documentation.
1826
         */
1827
        public Builder putAllExtraParam(Map<String, Object> map) {
1828
          if (this.extraParams == null) {
×
1829
            this.extraParams = new HashMap<>();
×
1830
          }
1831
          this.extraParams.putAll(map);
×
1832
          return this;
×
1833
        }
1834

1835
        public Builder setFixedAmount(
1836
            ProductCreateParams.Provisioning.GiftCard.FixedAmount fixedAmount) {
1837
          this.fixedAmount = fixedAmount;
×
1838
          return this;
×
1839
        }
1840

1841
        /**
1842
         * <strong>Required.</strong> The specific type of gift_card provisioning, only {@code
1843
         * fixed_amount} currently supported.
1844
         */
1845
        public Builder setType(ProductCreateParams.Provisioning.GiftCard.Type type) {
1846
          this.type = type;
×
1847
          return this;
×
1848
        }
1849
      }
1850

1851
      @Getter
1852
      public static class FixedAmount {
1853
        /**
1854
         * <strong>Required.</strong> The initial amount with which the provisioned gift card will
1855
         * be created.
1856
         */
1857
        @SerializedName("amount")
1858
        Long amount;
1859

1860
        /** <strong>Required.</strong> */
1861
        @SerializedName("currency")
1862
        String currency;
1863

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

1874
        private FixedAmount(Long amount, String currency, Map<String, Object> extraParams) {
×
1875
          this.amount = amount;
×
1876
          this.currency = currency;
×
1877
          this.extraParams = extraParams;
×
1878
        }
×
1879

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

1884
        public static class Builder {
×
1885
          private Long amount;
1886

1887
          private String currency;
1888

1889
          private Map<String, Object> extraParams;
1890

1891
          /** Finalize and obtain parameter instance from this builder. */
1892
          public ProductCreateParams.Provisioning.GiftCard.FixedAmount build() {
1893
            return new ProductCreateParams.Provisioning.GiftCard.FixedAmount(
×
1894
                this.amount, this.currency, this.extraParams);
1895
          }
1896

1897
          /**
1898
           * <strong>Required.</strong> The initial amount with which the provisioned gift card will
1899
           * be created.
1900
           */
1901
          public Builder setAmount(Long amount) {
1902
            this.amount = amount;
×
1903
            return this;
×
1904
          }
1905

1906
          /** <strong>Required.</strong> */
1907
          public Builder setCurrency(String currency) {
1908
            this.currency = currency;
×
1909
            return this;
×
1910
          }
1911

1912
          /**
1913
           * Add a key/value pair 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
1915
           * map. See {@link ProductCreateParams.Provisioning.GiftCard.FixedAmount#extraParams} for
1916
           * the field documentation.
1917
           */
1918
          public Builder putExtraParam(String key, Object value) {
1919
            if (this.extraParams == null) {
×
1920
              this.extraParams = new HashMap<>();
×
1921
            }
1922
            this.extraParams.put(key, value);
×
1923
            return this;
×
1924
          }
1925

1926
          /**
1927
           * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
1928
           * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
1929
           * map. See {@link ProductCreateParams.Provisioning.GiftCard.FixedAmount#extraParams} for
1930
           * the field documentation.
1931
           */
1932
          public Builder putAllExtraParam(Map<String, Object> map) {
1933
            if (this.extraParams == null) {
×
1934
              this.extraParams = new HashMap<>();
×
1935
            }
1936
            this.extraParams.putAll(map);
×
1937
            return this;
×
1938
          }
1939
        }
1940
      }
1941

1942
      public enum Type implements ApiRequestParams.EnumParam {
×
1943
        @SerializedName("fixed_amount")
×
1944
        FIXED_AMOUNT("fixed_amount");
1945

1946
        @Getter(onMethod_ = {@Override})
1947
        private final String value;
1948

1949
        Type(String value) {
×
1950
          this.value = value;
×
1951
        }
×
1952
      }
1953
    }
1954

1955
    public enum Type implements ApiRequestParams.EnumParam {
×
1956
      @SerializedName("gift_card")
×
1957
      GIFT_CARD("gift_card");
1958

1959
      @Getter(onMethod_ = {@Override})
1960
      private final String value;
1961

1962
      Type(String value) {
×
1963
        this.value = value;
×
1964
      }
×
1965
    }
1966
  }
1967

1968
  public enum Type implements ApiRequestParams.EnumParam {
×
1969
    @SerializedName("good")
×
1970
    GOOD("good"),
1971

1972
    @SerializedName("service")
×
1973
    SERVICE("service");
1974

1975
    @Getter(onMethod_ = {@Override})
1976
    private final String value;
1977

1978
    Type(String value) {
×
1979
      this.value = value;
×
1980
    }
×
1981
  }
1982
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc