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

stripe / stripe-java / #16562

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

push

github

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

Update generated code for beta

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

68 existing lines in 20 files now uncovered.

18798 of 149026 relevant lines covered (12.61%)

0.13 hits per line

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

6.91
/src/main/java/com/stripe/param/billingportal/ConfigurationUpdateParams.java
1
// File generated from our OpenAPI spec
2
package com.stripe.param.billingportal;
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 ConfigurationUpdateParams extends ApiRequestParams {
15
  /** Whether the configuration is active and can be used to create portal sessions. */
16
  @SerializedName("active")
17
  Boolean active;
18

19
  /** The business information shown to customers in the portal. */
20
  @SerializedName("business_profile")
21
  BusinessProfile businessProfile;
22

23
  /**
24
   * The default URL to redirect customers to when they click on the portal's link to return to your
25
   * website. This can be <a
26
   * href="https://stripe.com/docs/api/customer_portal/sessions/create#create_portal_session-return_url">overriden</a>
27
   * when creating the session.
28
   */
29
  @SerializedName("default_return_url")
30
  Object defaultReturnUrl;
31

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

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

45
  /** Information about the features available in the portal. */
46
  @SerializedName("features")
47
  Features features;
48

49
  /**
50
   * The hosted login page for this configuration. Learn more about the portal login page in our <a
51
   * href="https://stripe.com/docs/billing/subscriptions/integrating-customer-portal#share">integration
52
   * docs</a>.
53
   */
54
  @SerializedName("login_page")
55
  LoginPage loginPage;
56

57
  /**
58
   * Set of <a href="https://stripe.com/docs/api/metadata">key-value pairs</a> that you can attach
59
   * to an object. This can be useful for storing additional information about the object in a
60
   * structured format. Individual keys can be unset by posting an empty value to them. All keys can
61
   * be unset by posting an empty value to {@code metadata}.
62
   */
63
  @SerializedName("metadata")
64
  Object metadata;
65

66
  private ConfigurationUpdateParams(
67
      Boolean active,
68
      BusinessProfile businessProfile,
69
      Object defaultReturnUrl,
70
      List<String> expand,
71
      Map<String, Object> extraParams,
72
      Features features,
73
      LoginPage loginPage,
74
      Object metadata) {
1✔
75
    this.active = active;
1✔
76
    this.businessProfile = businessProfile;
1✔
77
    this.defaultReturnUrl = defaultReturnUrl;
1✔
78
    this.expand = expand;
1✔
79
    this.extraParams = extraParams;
1✔
80
    this.features = features;
1✔
81
    this.loginPage = loginPage;
1✔
82
    this.metadata = metadata;
1✔
83
  }
1✔
84

85
  public static Builder builder() {
86
    return new Builder();
1✔
87
  }
88

89
  public static class Builder {
1✔
90
    private Boolean active;
91

92
    private BusinessProfile businessProfile;
93

94
    private Object defaultReturnUrl;
95

96
    private List<String> expand;
97

98
    private Map<String, Object> extraParams;
99

100
    private Features features;
101

102
    private LoginPage loginPage;
103

104
    private Object metadata;
105

106
    /** Finalize and obtain parameter instance from this builder. */
107
    public ConfigurationUpdateParams build() {
108
      return new ConfigurationUpdateParams(
1✔
109
          this.active,
110
          this.businessProfile,
111
          this.defaultReturnUrl,
112
          this.expand,
113
          this.extraParams,
114
          this.features,
115
          this.loginPage,
116
          this.metadata);
117
    }
118

119
    /** Whether the configuration is active and can be used to create portal sessions. */
120
    public Builder setActive(Boolean active) {
121
      this.active = active;
1✔
122
      return this;
1✔
123
    }
124

125
    /** The business information shown to customers in the portal. */
126
    public Builder setBusinessProfile(ConfigurationUpdateParams.BusinessProfile businessProfile) {
127
      this.businessProfile = businessProfile;
1✔
128
      return this;
1✔
129
    }
130

131
    /**
132
     * The default URL to redirect customers to when they click on the portal's link to return to
133
     * your website. This can be <a
134
     * href="https://stripe.com/docs/api/customer_portal/sessions/create#create_portal_session-return_url">overriden</a>
135
     * when creating the session.
136
     */
137
    public Builder setDefaultReturnUrl(String defaultReturnUrl) {
138
      this.defaultReturnUrl = defaultReturnUrl;
×
139
      return this;
×
140
    }
141

142
    /**
143
     * The default URL to redirect customers to when they click on the portal's link to return to
144
     * your website. This can be <a
145
     * href="https://stripe.com/docs/api/customer_portal/sessions/create#create_portal_session-return_url">overriden</a>
146
     * when creating the session.
147
     */
148
    public Builder setDefaultReturnUrl(EmptyParam defaultReturnUrl) {
149
      this.defaultReturnUrl = defaultReturnUrl;
×
150
      return this;
×
151
    }
152

153
    /**
154
     * Add an element to `expand` list. A list is initialized for the first `add/addAll` call, and
155
     * subsequent calls adds additional elements to the original list. See {@link
156
     * ConfigurationUpdateParams#expand} for the field documentation.
157
     */
158
    public Builder addExpand(String element) {
159
      if (this.expand == null) {
×
160
        this.expand = new ArrayList<>();
×
161
      }
162
      this.expand.add(element);
×
163
      return this;
×
164
    }
165

166
    /**
167
     * Add all elements to `expand` list. A list is initialized for the first `add/addAll` call, and
168
     * subsequent calls adds additional elements to the original list. See {@link
169
     * ConfigurationUpdateParams#expand} for the field documentation.
170
     */
171
    public Builder addAllExpand(List<String> elements) {
172
      if (this.expand == null) {
×
173
        this.expand = new ArrayList<>();
×
174
      }
175
      this.expand.addAll(elements);
×
176
      return this;
×
177
    }
178

179
    /**
180
     * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll`
181
     * call, and subsequent calls add additional key/value pairs to the original map. See {@link
182
     * ConfigurationUpdateParams#extraParams} for the field documentation.
183
     */
184
    public Builder putExtraParam(String key, Object value) {
185
      if (this.extraParams == null) {
×
186
        this.extraParams = new HashMap<>();
×
187
      }
188
      this.extraParams.put(key, value);
×
189
      return this;
×
190
    }
191

192
    /**
193
     * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
194
     * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map.
195
     * See {@link ConfigurationUpdateParams#extraParams} for the field documentation.
196
     */
197
    public Builder putAllExtraParam(Map<String, Object> map) {
198
      if (this.extraParams == null) {
×
199
        this.extraParams = new HashMap<>();
×
200
      }
201
      this.extraParams.putAll(map);
×
202
      return this;
×
203
    }
204

205
    /** Information about the features available in the portal. */
206
    public Builder setFeatures(ConfigurationUpdateParams.Features features) {
207
      this.features = features;
×
208
      return this;
×
209
    }
210

211
    /**
212
     * The hosted login page for this configuration. Learn more about the portal login page in our
213
     * <a
214
     * href="https://stripe.com/docs/billing/subscriptions/integrating-customer-portal#share">integration
215
     * docs</a>.
216
     */
217
    public Builder setLoginPage(ConfigurationUpdateParams.LoginPage loginPage) {
218
      this.loginPage = loginPage;
×
219
      return this;
×
220
    }
221

222
    /**
223
     * Add a key/value pair to `metadata` map. A map is initialized for the first `put/putAll` call,
224
     * and subsequent calls add additional key/value pairs to the original map. See {@link
225
     * ConfigurationUpdateParams#metadata} for the field documentation.
226
     */
227
    @SuppressWarnings("unchecked")
228
    public Builder putMetadata(String key, String value) {
229
      if (this.metadata == null || this.metadata instanceof EmptyParam) {
×
230
        this.metadata = new HashMap<String, String>();
×
231
      }
232
      ((Map<String, String>) this.metadata).put(key, value);
×
233
      return this;
×
234
    }
235

236
    /**
237
     * Add all map key/value pairs to `metadata` map. A map is initialized for the first
238
     * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map.
239
     * See {@link ConfigurationUpdateParams#metadata} for the field documentation.
240
     */
241
    @SuppressWarnings("unchecked")
242
    public Builder putAllMetadata(Map<String, String> map) {
243
      if (this.metadata == null || this.metadata instanceof EmptyParam) {
×
244
        this.metadata = new HashMap<String, String>();
×
245
      }
246
      ((Map<String, String>) this.metadata).putAll(map);
×
247
      return this;
×
248
    }
249

250
    /**
251
     * Set of <a href="https://stripe.com/docs/api/metadata">key-value pairs</a> that you can attach
252
     * to an object. This can be useful for storing additional information about the object in a
253
     * structured format. Individual keys can be unset by posting an empty value to them. All keys
254
     * can be unset by posting an empty value to {@code metadata}.
255
     */
256
    public Builder setMetadata(EmptyParam metadata) {
257
      this.metadata = metadata;
×
258
      return this;
×
259
    }
260

261
    /**
262
     * Set of <a href="https://stripe.com/docs/api/metadata">key-value pairs</a> that you can attach
263
     * to an object. This can be useful for storing additional information about the object in a
264
     * structured format. Individual keys can be unset by posting an empty value to them. All keys
265
     * can be unset by posting an empty value to {@code metadata}.
266
     */
267
    public Builder setMetadata(Map<String, String> metadata) {
268
      this.metadata = metadata;
×
269
      return this;
×
270
    }
271
  }
272

273
  @Getter
274
  public static class BusinessProfile {
275
    /**
276
     * Map of extra parameters for custom features not available in this client library. The content
277
     * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each
278
     * key/value pair is serialized as if the key is a root-level field (serialized) name in this
279
     * param object. Effectively, this map is flattened to its parent instance.
280
     */
281
    @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
282
    Map<String, Object> extraParams;
283

284
    /** The messaging shown to customers in the portal. */
285
    @SerializedName("headline")
286
    Object headline;
287

288
    /** A link to the business’s publicly available privacy policy. */
289
    @SerializedName("privacy_policy_url")
290
    Object privacyPolicyUrl;
291

292
    /** A link to the business’s publicly available terms of service. */
293
    @SerializedName("terms_of_service_url")
294
    Object termsOfServiceUrl;
295

296
    private BusinessProfile(
297
        Map<String, Object> extraParams,
298
        Object headline,
299
        Object privacyPolicyUrl,
300
        Object termsOfServiceUrl) {
1✔
301
      this.extraParams = extraParams;
1✔
302
      this.headline = headline;
1✔
303
      this.privacyPolicyUrl = privacyPolicyUrl;
1✔
304
      this.termsOfServiceUrl = termsOfServiceUrl;
1✔
305
    }
1✔
306

307
    public static Builder builder() {
308
      return new Builder();
1✔
309
    }
310

311
    public static class Builder {
1✔
312
      private Map<String, Object> extraParams;
313

314
      private Object headline;
315

316
      private Object privacyPolicyUrl;
317

318
      private Object termsOfServiceUrl;
319

320
      /** Finalize and obtain parameter instance from this builder. */
321
      public ConfigurationUpdateParams.BusinessProfile build() {
322
        return new ConfigurationUpdateParams.BusinessProfile(
1✔
323
            this.extraParams, this.headline, this.privacyPolicyUrl, this.termsOfServiceUrl);
324
      }
325

326
      /**
327
       * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll`
328
       * call, and subsequent calls add additional key/value pairs to the original map. See {@link
329
       * ConfigurationUpdateParams.BusinessProfile#extraParams} for the field documentation.
330
       */
331
      public Builder putExtraParam(String key, Object value) {
332
        if (this.extraParams == null) {
×
333
          this.extraParams = new HashMap<>();
×
334
        }
335
        this.extraParams.put(key, value);
×
336
        return this;
×
337
      }
338

339
      /**
340
       * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
341
       * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map.
342
       * See {@link ConfigurationUpdateParams.BusinessProfile#extraParams} for the field
343
       * documentation.
344
       */
345
      public Builder putAllExtraParam(Map<String, Object> map) {
346
        if (this.extraParams == null) {
×
347
          this.extraParams = new HashMap<>();
×
348
        }
349
        this.extraParams.putAll(map);
×
350
        return this;
×
351
      }
352

353
      /** The messaging shown to customers in the portal. */
354
      public Builder setHeadline(String headline) {
355
        this.headline = headline;
×
356
        return this;
×
357
      }
358

359
      /** The messaging shown to customers in the portal. */
360
      public Builder setHeadline(EmptyParam headline) {
361
        this.headline = headline;
×
362
        return this;
×
363
      }
364

365
      /** A link to the business’s publicly available privacy policy. */
366
      public Builder setPrivacyPolicyUrl(String privacyPolicyUrl) {
367
        this.privacyPolicyUrl = privacyPolicyUrl;
1✔
368
        return this;
1✔
369
      }
370

371
      /** A link to the business’s publicly available privacy policy. */
372
      public Builder setPrivacyPolicyUrl(EmptyParam privacyPolicyUrl) {
373
        this.privacyPolicyUrl = privacyPolicyUrl;
×
374
        return this;
×
375
      }
376

377
      /** A link to the business’s publicly available terms of service. */
378
      public Builder setTermsOfServiceUrl(String termsOfServiceUrl) {
379
        this.termsOfServiceUrl = termsOfServiceUrl;
1✔
380
        return this;
1✔
381
      }
382

383
      /** A link to the business’s publicly available terms of service. */
384
      public Builder setTermsOfServiceUrl(EmptyParam termsOfServiceUrl) {
385
        this.termsOfServiceUrl = termsOfServiceUrl;
×
386
        return this;
×
387
      }
388
    }
389
  }
390

391
  @Getter
392
  public static class Features {
393
    /** Information about updating the customer details in the portal. */
394
    @SerializedName("customer_update")
395
    CustomerUpdate customerUpdate;
396

397
    /**
398
     * Map of extra parameters for custom features not available in this client library. The content
399
     * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each
400
     * key/value pair is serialized as if the key is a root-level field (serialized) name in this
401
     * param object. Effectively, this map is flattened to its parent instance.
402
     */
403
    @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
404
    Map<String, Object> extraParams;
405

406
    /** Information about showing the billing history in the portal. */
407
    @SerializedName("invoice_history")
408
    InvoiceHistory invoiceHistory;
409

410
    /** Information about updating payment methods in the portal. */
411
    @SerializedName("payment_method_update")
412
    PaymentMethodUpdate paymentMethodUpdate;
413

414
    /** Information about canceling subscriptions in the portal. */
415
    @SerializedName("subscription_cancel")
416
    SubscriptionCancel subscriptionCancel;
417

418
    /** Information about updating subscriptions in the portal. */
419
    @SerializedName("subscription_update")
420
    SubscriptionUpdate subscriptionUpdate;
421

422
    private Features(
423
        CustomerUpdate customerUpdate,
424
        Map<String, Object> extraParams,
425
        InvoiceHistory invoiceHistory,
426
        PaymentMethodUpdate paymentMethodUpdate,
427
        SubscriptionCancel subscriptionCancel,
428
        SubscriptionUpdate subscriptionUpdate) {
×
429
      this.customerUpdate = customerUpdate;
×
430
      this.extraParams = extraParams;
×
431
      this.invoiceHistory = invoiceHistory;
×
432
      this.paymentMethodUpdate = paymentMethodUpdate;
×
433
      this.subscriptionCancel = subscriptionCancel;
×
434
      this.subscriptionUpdate = subscriptionUpdate;
×
435
    }
×
436

437
    public static Builder builder() {
438
      return new Builder();
×
439
    }
440

441
    public static class Builder {
×
442
      private CustomerUpdate customerUpdate;
443

444
      private Map<String, Object> extraParams;
445

446
      private InvoiceHistory invoiceHistory;
447

448
      private PaymentMethodUpdate paymentMethodUpdate;
449

450
      private SubscriptionCancel subscriptionCancel;
451

452
      private SubscriptionUpdate subscriptionUpdate;
453

454
      /** Finalize and obtain parameter instance from this builder. */
455
      public ConfigurationUpdateParams.Features build() {
456
        return new ConfigurationUpdateParams.Features(
×
457
            this.customerUpdate,
458
            this.extraParams,
459
            this.invoiceHistory,
460
            this.paymentMethodUpdate,
461
            this.subscriptionCancel,
462
            this.subscriptionUpdate);
463
      }
464

465
      /** Information about updating the customer details in the portal. */
466
      public Builder setCustomerUpdate(
467
          ConfigurationUpdateParams.Features.CustomerUpdate customerUpdate) {
468
        this.customerUpdate = customerUpdate;
×
469
        return this;
×
470
      }
471

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

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

498
      /** Information about showing the billing history in the portal. */
499
      public Builder setInvoiceHistory(
500
          ConfigurationUpdateParams.Features.InvoiceHistory invoiceHistory) {
501
        this.invoiceHistory = invoiceHistory;
×
502
        return this;
×
503
      }
504

505
      /** Information about updating payment methods in the portal. */
506
      public Builder setPaymentMethodUpdate(
507
          ConfigurationUpdateParams.Features.PaymentMethodUpdate paymentMethodUpdate) {
508
        this.paymentMethodUpdate = paymentMethodUpdate;
×
509
        return this;
×
510
      }
511

512
      /** Information about canceling subscriptions in the portal. */
513
      public Builder setSubscriptionCancel(
514
          ConfigurationUpdateParams.Features.SubscriptionCancel subscriptionCancel) {
515
        this.subscriptionCancel = subscriptionCancel;
×
516
        return this;
×
517
      }
518

519
      /** Information about updating subscriptions in the portal. */
520
      public Builder setSubscriptionUpdate(
521
          ConfigurationUpdateParams.Features.SubscriptionUpdate subscriptionUpdate) {
522
        this.subscriptionUpdate = subscriptionUpdate;
×
523
        return this;
×
524
      }
525
    }
526

527
    @Getter
528
    public static class CustomerUpdate {
529
      /**
530
       * The types of customer updates that are supported. When empty, customers are not updateable.
531
       */
532
      @SerializedName("allowed_updates")
533
      Object allowedUpdates;
534

535
      /** Whether the feature is enabled. */
536
      @SerializedName("enabled")
537
      Boolean enabled;
538

539
      /**
540
       * Map of extra parameters for custom features not available in this client library. The
541
       * content in this map is not serialized under this field's {@code @SerializedName} value.
542
       * Instead, each key/value pair is serialized as if the key is a root-level field (serialized)
543
       * name in this param object. Effectively, this map is flattened to its parent instance.
544
       */
545
      @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
546
      Map<String, Object> extraParams;
547

548
      private CustomerUpdate(
549
          Object allowedUpdates, Boolean enabled, Map<String, Object> extraParams) {
×
550
        this.allowedUpdates = allowedUpdates;
×
551
        this.enabled = enabled;
×
552
        this.extraParams = extraParams;
×
553
      }
×
554

555
      public static Builder builder() {
556
        return new Builder();
×
557
      }
558

559
      public static class Builder {
×
560
        private Object allowedUpdates;
561

562
        private Boolean enabled;
563

564
        private Map<String, Object> extraParams;
565

566
        /** Finalize and obtain parameter instance from this builder. */
567
        public ConfigurationUpdateParams.Features.CustomerUpdate build() {
568
          return new ConfigurationUpdateParams.Features.CustomerUpdate(
×
569
              this.allowedUpdates, this.enabled, this.extraParams);
570
        }
571

572
        /**
573
         * Add an element to `allowedUpdates` list. A list is initialized for the first `add/addAll`
574
         * call, and subsequent calls adds additional elements to the original list. See {@link
575
         * ConfigurationUpdateParams.Features.CustomerUpdate#allowedUpdates} for the field
576
         * documentation.
577
         */
578
        @SuppressWarnings("unchecked")
579
        public Builder addAllowedUpdate(
580
            ConfigurationUpdateParams.Features.CustomerUpdate.AllowedUpdate element) {
581
          if (this.allowedUpdates == null || this.allowedUpdates instanceof EmptyParam) {
×
582
            this.allowedUpdates =
×
583
                new ArrayList<ConfigurationUpdateParams.Features.CustomerUpdate.AllowedUpdate>();
584
          }
585
          ((List<ConfigurationUpdateParams.Features.CustomerUpdate.AllowedUpdate>)
×
586
                  this.allowedUpdates)
587
              .add(element);
×
588
          return this;
×
589
        }
590

591
        /**
592
         * Add all elements to `allowedUpdates` list. A list is initialized for the first
593
         * `add/addAll` call, and subsequent calls adds additional elements to the original list.
594
         * See {@link ConfigurationUpdateParams.Features.CustomerUpdate#allowedUpdates} for the
595
         * field documentation.
596
         */
597
        @SuppressWarnings("unchecked")
598
        public Builder addAllAllowedUpdate(
599
            List<ConfigurationUpdateParams.Features.CustomerUpdate.AllowedUpdate> elements) {
600
          if (this.allowedUpdates == null || this.allowedUpdates instanceof EmptyParam) {
×
601
            this.allowedUpdates =
×
602
                new ArrayList<ConfigurationUpdateParams.Features.CustomerUpdate.AllowedUpdate>();
603
          }
604
          ((List<ConfigurationUpdateParams.Features.CustomerUpdate.AllowedUpdate>)
×
605
                  this.allowedUpdates)
606
              .addAll(elements);
×
607
          return this;
×
608
        }
609

610
        /**
611
         * The types of customer updates that are supported. When empty, customers are not
612
         * updateable.
613
         */
614
        public Builder setAllowedUpdates(EmptyParam allowedUpdates) {
615
          this.allowedUpdates = allowedUpdates;
×
616
          return this;
×
617
        }
618

619
        /**
620
         * The types of customer updates that are supported. When empty, customers are not
621
         * updateable.
622
         */
623
        public Builder setAllowedUpdates(
624
            List<ConfigurationUpdateParams.Features.CustomerUpdate.AllowedUpdate> allowedUpdates) {
625
          this.allowedUpdates = allowedUpdates;
×
626
          return this;
×
627
        }
628

629
        /** Whether the feature is enabled. */
630
        public Builder setEnabled(Boolean enabled) {
631
          this.enabled = enabled;
×
632
          return this;
×
633
        }
634

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

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

664
      public enum AllowedUpdate implements ApiRequestParams.EnumParam {
×
665
        @SerializedName("address")
×
666
        ADDRESS("address"),
667

668
        @SerializedName("email")
×
669
        EMAIL("email"),
670

671
        @SerializedName("name")
×
672
        NAME("name"),
673

674
        @SerializedName("phone")
×
675
        PHONE("phone"),
676

677
        @SerializedName("shipping")
×
678
        SHIPPING("shipping"),
679

680
        @SerializedName("tax_id")
×
681
        TAX_ID("tax_id");
682

683
        @Getter(onMethod_ = {@Override})
684
        private final String value;
685

686
        AllowedUpdate(String value) {
×
687
          this.value = value;
×
688
        }
×
689
      }
690
    }
691

692
    @Getter
693
    public static class InvoiceHistory {
694
      /** <strong>Required.</strong> Whether the feature is enabled. */
695
      @SerializedName("enabled")
696
      Boolean enabled;
697

698
      /**
699
       * Map of extra parameters for custom features not available in this client library. The
700
       * content in this map is not serialized under this field's {@code @SerializedName} value.
701
       * Instead, each key/value pair is serialized as if the key is a root-level field (serialized)
702
       * name in this param object. Effectively, this map is flattened to its parent instance.
703
       */
704
      @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
705
      Map<String, Object> extraParams;
706

707
      private InvoiceHistory(Boolean enabled, Map<String, Object> extraParams) {
×
708
        this.enabled = enabled;
×
709
        this.extraParams = extraParams;
×
710
      }
×
711

712
      public static Builder builder() {
713
        return new Builder();
×
714
      }
715

716
      public static class Builder {
×
717
        private Boolean enabled;
718

719
        private Map<String, Object> extraParams;
720

721
        /** Finalize and obtain parameter instance from this builder. */
722
        public ConfigurationUpdateParams.Features.InvoiceHistory build() {
723
          return new ConfigurationUpdateParams.Features.InvoiceHistory(
×
724
              this.enabled, this.extraParams);
725
        }
726

727
        /** <strong>Required.</strong> Whether the feature is enabled. */
728
        public Builder setEnabled(Boolean enabled) {
729
          this.enabled = enabled;
×
730
          return this;
×
731
        }
732

733
        /**
734
         * Add a key/value pair to `extraParams` map. A map is initialized for the first
735
         * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
736
         * map. See {@link ConfigurationUpdateParams.Features.InvoiceHistory#extraParams} for the
737
         * field documentation.
738
         */
739
        public Builder putExtraParam(String key, Object value) {
740
          if (this.extraParams == null) {
×
741
            this.extraParams = new HashMap<>();
×
742
          }
743
          this.extraParams.put(key, value);
×
744
          return this;
×
745
        }
746

747
        /**
748
         * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
749
         * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
750
         * map. See {@link ConfigurationUpdateParams.Features.InvoiceHistory#extraParams} for the
751
         * field documentation.
752
         */
753
        public Builder putAllExtraParam(Map<String, Object> map) {
754
          if (this.extraParams == null) {
×
755
            this.extraParams = new HashMap<>();
×
756
          }
757
          this.extraParams.putAll(map);
×
758
          return this;
×
759
        }
760
      }
761
    }
762

763
    @Getter
764
    public static class PaymentMethodUpdate {
765
      /** <strong>Required.</strong> Whether the feature is enabled. */
766
      @SerializedName("enabled")
767
      Boolean enabled;
768

769
      /**
770
       * Map of extra parameters for custom features not available in this client library. The
771
       * content in this map is not serialized under this field's {@code @SerializedName} value.
772
       * Instead, each key/value pair is serialized as if the key is a root-level field (serialized)
773
       * name in this param object. Effectively, this map is flattened to its parent instance.
774
       */
775
      @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
776
      Map<String, Object> extraParams;
777

778
      private PaymentMethodUpdate(Boolean enabled, Map<String, Object> extraParams) {
×
779
        this.enabled = enabled;
×
780
        this.extraParams = extraParams;
×
781
      }
×
782

783
      public static Builder builder() {
784
        return new Builder();
×
785
      }
786

787
      public static class Builder {
×
788
        private Boolean enabled;
789

790
        private Map<String, Object> extraParams;
791

792
        /** Finalize and obtain parameter instance from this builder. */
793
        public ConfigurationUpdateParams.Features.PaymentMethodUpdate build() {
794
          return new ConfigurationUpdateParams.Features.PaymentMethodUpdate(
×
795
              this.enabled, this.extraParams);
796
        }
797

798
        /** <strong>Required.</strong> Whether the feature is enabled. */
799
        public Builder setEnabled(Boolean enabled) {
800
          this.enabled = enabled;
×
801
          return this;
×
802
        }
803

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

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

834
    @Getter
835
    public static class SubscriptionCancel {
836
      /**
837
       * Whether the cancellation reasons will be collected in the portal and which options are
838
       * exposed to the customer.
839
       */
840
      @SerializedName("cancellation_reason")
841
      CancellationReason cancellationReason;
842

843
      /** Whether the feature is enabled. */
844
      @SerializedName("enabled")
845
      Boolean enabled;
846

847
      /**
848
       * Map of extra parameters for custom features not available in this client library. The
849
       * content in this map is not serialized under this field's {@code @SerializedName} value.
850
       * Instead, each key/value pair is serialized as if the key is a root-level field (serialized)
851
       * name in this param object. Effectively, this map is flattened to its parent instance.
852
       */
853
      @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
854
      Map<String, Object> extraParams;
855

856
      /** Whether to cancel subscriptions immediately or at the end of the billing period. */
857
      @SerializedName("mode")
858
      Mode mode;
859

860
      /**
861
       * Whether to create prorations when canceling subscriptions. Possible values are {@code none}
862
       * and {@code create_prorations}, which is only compatible with {@code mode=immediately}. No
863
       * prorations are generated when canceling a subscription at the end of its natural billing
864
       * period.
865
       */
866
      @SerializedName("proration_behavior")
867
      ProrationBehavior prorationBehavior;
868

869
      private SubscriptionCancel(
870
          CancellationReason cancellationReason,
871
          Boolean enabled,
872
          Map<String, Object> extraParams,
873
          Mode mode,
874
          ProrationBehavior prorationBehavior) {
×
875
        this.cancellationReason = cancellationReason;
×
876
        this.enabled = enabled;
×
877
        this.extraParams = extraParams;
×
878
        this.mode = mode;
×
879
        this.prorationBehavior = prorationBehavior;
×
880
      }
×
881

882
      public static Builder builder() {
883
        return new Builder();
×
884
      }
885

886
      public static class Builder {
×
887
        private CancellationReason cancellationReason;
888

889
        private Boolean enabled;
890

891
        private Map<String, Object> extraParams;
892

893
        private Mode mode;
894

895
        private ProrationBehavior prorationBehavior;
896

897
        /** Finalize and obtain parameter instance from this builder. */
898
        public ConfigurationUpdateParams.Features.SubscriptionCancel build() {
899
          return new ConfigurationUpdateParams.Features.SubscriptionCancel(
×
900
              this.cancellationReason,
901
              this.enabled,
902
              this.extraParams,
903
              this.mode,
904
              this.prorationBehavior);
905
        }
906

907
        /**
908
         * Whether the cancellation reasons will be collected in the portal and which options are
909
         * exposed to the customer.
910
         */
911
        public Builder setCancellationReason(
912
            ConfigurationUpdateParams.Features.SubscriptionCancel.CancellationReason
913
                cancellationReason) {
914
          this.cancellationReason = cancellationReason;
×
915
          return this;
×
916
        }
917

918
        /** Whether the feature is enabled. */
919
        public Builder setEnabled(Boolean enabled) {
920
          this.enabled = enabled;
×
921
          return this;
×
922
        }
923

924
        /**
925
         * Add a key/value pair to `extraParams` map. A map is initialized for the first
926
         * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
927
         * map. See {@link ConfigurationUpdateParams.Features.SubscriptionCancel#extraParams} for
928
         * the field documentation.
929
         */
930
        public Builder putExtraParam(String key, Object value) {
931
          if (this.extraParams == null) {
×
932
            this.extraParams = new HashMap<>();
×
933
          }
934
          this.extraParams.put(key, value);
×
935
          return this;
×
936
        }
937

938
        /**
939
         * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
940
         * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
941
         * map. See {@link ConfigurationUpdateParams.Features.SubscriptionCancel#extraParams} for
942
         * the field documentation.
943
         */
944
        public Builder putAllExtraParam(Map<String, Object> map) {
945
          if (this.extraParams == null) {
×
946
            this.extraParams = new HashMap<>();
×
947
          }
948
          this.extraParams.putAll(map);
×
949
          return this;
×
950
        }
951

952
        /** Whether to cancel subscriptions immediately or at the end of the billing period. */
953
        public Builder setMode(ConfigurationUpdateParams.Features.SubscriptionCancel.Mode mode) {
954
          this.mode = mode;
×
955
          return this;
×
956
        }
957

958
        /**
959
         * Whether to create prorations when canceling subscriptions. Possible values are {@code
960
         * none} and {@code create_prorations}, which is only compatible with {@code
961
         * mode=immediately}. No prorations are generated when canceling a subscription at the end
962
         * of its natural billing period.
963
         */
964
        public Builder setProrationBehavior(
965
            ConfigurationUpdateParams.Features.SubscriptionCancel.ProrationBehavior
966
                prorationBehavior) {
967
          this.prorationBehavior = prorationBehavior;
×
968
          return this;
×
969
        }
970
      }
971

972
      @Getter
973
      public static class CancellationReason {
974
        /** <strong>Required.</strong> Whether the feature is enabled. */
975
        @SerializedName("enabled")
976
        Boolean enabled;
977

978
        /**
979
         * Map of extra parameters for custom features not available in this client library. The
980
         * content in this map is not serialized under this field's {@code @SerializedName} value.
981
         * Instead, each key/value pair is serialized as if the key is a root-level field
982
         * (serialized) name in this param object. Effectively, this map is flattened to its parent
983
         * instance.
984
         */
985
        @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
986
        Map<String, Object> extraParams;
987

988
        /** Which cancellation reasons will be given as options to the customer. */
989
        @SerializedName("options")
990
        Object options;
991

992
        private CancellationReason(
993
            Boolean enabled, Map<String, Object> extraParams, Object options) {
×
994
          this.enabled = enabled;
×
995
          this.extraParams = extraParams;
×
996
          this.options = options;
×
997
        }
×
998

999
        public static Builder builder() {
1000
          return new Builder();
×
1001
        }
1002

1003
        public static class Builder {
×
1004
          private Boolean enabled;
1005

1006
          private Map<String, Object> extraParams;
1007

1008
          private Object options;
1009

1010
          /** Finalize and obtain parameter instance from this builder. */
1011
          public ConfigurationUpdateParams.Features.SubscriptionCancel.CancellationReason build() {
1012
            return new ConfigurationUpdateParams.Features.SubscriptionCancel.CancellationReason(
×
1013
                this.enabled, this.extraParams, this.options);
1014
          }
1015

1016
          /** <strong>Required.</strong> Whether the feature is enabled. */
1017
          public Builder setEnabled(Boolean enabled) {
1018
            this.enabled = enabled;
×
1019
            return this;
×
1020
          }
1021

1022
          /**
1023
           * Add a key/value pair to `extraParams` map. A map is initialized for the first
1024
           * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
1025
           * map. See {@link
1026
           * ConfigurationUpdateParams.Features.SubscriptionCancel.CancellationReason#extraParams}
1027
           * for the field documentation.
1028
           */
1029
          public Builder putExtraParam(String key, Object value) {
1030
            if (this.extraParams == null) {
×
1031
              this.extraParams = new HashMap<>();
×
1032
            }
1033
            this.extraParams.put(key, value);
×
1034
            return this;
×
1035
          }
1036

1037
          /**
1038
           * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
1039
           * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
1040
           * map. See {@link
1041
           * ConfigurationUpdateParams.Features.SubscriptionCancel.CancellationReason#extraParams}
1042
           * for the field documentation.
1043
           */
1044
          public Builder putAllExtraParam(Map<String, Object> map) {
1045
            if (this.extraParams == null) {
×
1046
              this.extraParams = new HashMap<>();
×
1047
            }
1048
            this.extraParams.putAll(map);
×
1049
            return this;
×
1050
          }
1051

1052
          /**
1053
           * Add an element to `options` list. A list is initialized for the first `add/addAll`
1054
           * call, and subsequent calls adds additional elements to the original list. See {@link
1055
           * ConfigurationUpdateParams.Features.SubscriptionCancel.CancellationReason#options} for
1056
           * the field documentation.
1057
           */
1058
          @SuppressWarnings("unchecked")
1059
          public Builder addOption(
1060
              ConfigurationUpdateParams.Features.SubscriptionCancel.CancellationReason.Option
1061
                  element) {
1062
            if (this.options == null || this.options instanceof EmptyParam) {
×
1063
              this.options =
×
1064
                  new ArrayList<
1065
                      ConfigurationUpdateParams.Features.SubscriptionCancel.CancellationReason
1066
                          .Option>();
1067
            }
1068
            ((List<ConfigurationUpdateParams.Features.SubscriptionCancel.CancellationReason.Option>)
×
1069
                    this.options)
1070
                .add(element);
×
1071
            return this;
×
1072
          }
1073

1074
          /**
1075
           * Add all elements to `options` list. A list is initialized for the first `add/addAll`
1076
           * call, and subsequent calls adds additional elements to the original list. See {@link
1077
           * ConfigurationUpdateParams.Features.SubscriptionCancel.CancellationReason#options} for
1078
           * the field documentation.
1079
           */
1080
          @SuppressWarnings("unchecked")
1081
          public Builder addAllOption(
1082
              List<ConfigurationUpdateParams.Features.SubscriptionCancel.CancellationReason.Option>
1083
                  elements) {
1084
            if (this.options == null || this.options instanceof EmptyParam) {
×
1085
              this.options =
×
1086
                  new ArrayList<
1087
                      ConfigurationUpdateParams.Features.SubscriptionCancel.CancellationReason
1088
                          .Option>();
1089
            }
1090
            ((List<ConfigurationUpdateParams.Features.SubscriptionCancel.CancellationReason.Option>)
×
1091
                    this.options)
1092
                .addAll(elements);
×
1093
            return this;
×
1094
          }
1095

1096
          /** Which cancellation reasons will be given as options to the customer. */
1097
          public Builder setOptions(EmptyParam options) {
1098
            this.options = options;
×
1099
            return this;
×
1100
          }
1101

1102
          /** Which cancellation reasons will be given as options to the customer. */
1103
          public Builder setOptions(
1104
              List<ConfigurationUpdateParams.Features.SubscriptionCancel.CancellationReason.Option>
1105
                  options) {
1106
            this.options = options;
×
1107
            return this;
×
1108
          }
1109
        }
1110

1111
        public enum Option implements ApiRequestParams.EnumParam {
×
1112
          @SerializedName("customer_service")
×
1113
          CUSTOMER_SERVICE("customer_service"),
1114

1115
          @SerializedName("low_quality")
×
1116
          LOW_QUALITY("low_quality"),
1117

1118
          @SerializedName("missing_features")
×
1119
          MISSING_FEATURES("missing_features"),
1120

1121
          @SerializedName("other")
×
1122
          OTHER("other"),
1123

1124
          @SerializedName("switched_service")
×
1125
          SWITCHED_SERVICE("switched_service"),
1126

1127
          @SerializedName("too_complex")
×
1128
          TOO_COMPLEX("too_complex"),
1129

1130
          @SerializedName("too_expensive")
×
1131
          TOO_EXPENSIVE("too_expensive"),
1132

1133
          @SerializedName("unused")
×
1134
          UNUSED("unused");
1135

1136
          @Getter(onMethod_ = {@Override})
1137
          private final String value;
1138

1139
          Option(String value) {
×
1140
            this.value = value;
×
1141
          }
×
1142
        }
1143
      }
1144

1145
      public enum Mode implements ApiRequestParams.EnumParam {
×
1146
        @SerializedName("at_period_end")
×
1147
        AT_PERIOD_END("at_period_end"),
1148

1149
        @SerializedName("immediately")
×
1150
        IMMEDIATELY("immediately");
1151

1152
        @Getter(onMethod_ = {@Override})
1153
        private final String value;
1154

1155
        Mode(String value) {
×
1156
          this.value = value;
×
1157
        }
×
1158
      }
1159

1160
      public enum ProrationBehavior implements ApiRequestParams.EnumParam {
×
1161
        @SerializedName("always_invoice")
×
1162
        ALWAYS_INVOICE("always_invoice"),
1163

1164
        @SerializedName("create_prorations")
×
1165
        CREATE_PRORATIONS("create_prorations"),
1166

1167
        @SerializedName("none")
×
1168
        NONE("none");
1169

1170
        @Getter(onMethod_ = {@Override})
1171
        private final String value;
1172

1173
        ProrationBehavior(String value) {
×
1174
          this.value = value;
×
1175
        }
×
1176
      }
1177
    }
1178

1179
    @Getter
1180
    public static class SubscriptionUpdate {
1181
      /**
1182
       * The types of subscription updates that are supported. When empty, subscriptions are not
1183
       * updateable.
1184
       */
1185
      @SerializedName("default_allowed_updates")
1186
      Object defaultAllowedUpdates;
1187

1188
      /** Whether the feature is enabled. */
1189
      @SerializedName("enabled")
1190
      Boolean enabled;
1191

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

1201
      /** The list of up to 10 products that support subscription updates. */
1202
      @SerializedName("products")
1203
      Object products;
1204

1205
      /**
1206
       * Determines how to handle prorations resulting from subscription updates. Valid values are
1207
       * {@code none}, {@code create_prorations}, and {@code always_invoice}.
1208
       */
1209
      @SerializedName("proration_behavior")
1210
      ProrationBehavior prorationBehavior;
1211

1212
      /**
1213
       * Setting to control when an update should be scheduled at the end of the period instead of
1214
       * applying immediately.
1215
       */
1216
      @SerializedName("schedule_at_period_end")
1217
      ScheduleAtPeriodEnd scheduleAtPeriodEnd;
1218

1219
      private SubscriptionUpdate(
1220
          Object defaultAllowedUpdates,
1221
          Boolean enabled,
1222
          Map<String, Object> extraParams,
1223
          Object products,
1224
          ProrationBehavior prorationBehavior,
NEW
1225
          ScheduleAtPeriodEnd scheduleAtPeriodEnd) {
×
1226
        this.defaultAllowedUpdates = defaultAllowedUpdates;
×
1227
        this.enabled = enabled;
×
1228
        this.extraParams = extraParams;
×
1229
        this.products = products;
×
1230
        this.prorationBehavior = prorationBehavior;
×
NEW
1231
        this.scheduleAtPeriodEnd = scheduleAtPeriodEnd;
×
UNCOV
1232
      }
×
1233

1234
      public static Builder builder() {
1235
        return new Builder();
×
1236
      }
1237

1238
      public static class Builder {
×
1239
        private Object defaultAllowedUpdates;
1240

1241
        private Boolean enabled;
1242

1243
        private Map<String, Object> extraParams;
1244

1245
        private Object products;
1246

1247
        private ProrationBehavior prorationBehavior;
1248

1249
        private ScheduleAtPeriodEnd scheduleAtPeriodEnd;
1250

1251
        /** Finalize and obtain parameter instance from this builder. */
1252
        public ConfigurationUpdateParams.Features.SubscriptionUpdate build() {
1253
          return new ConfigurationUpdateParams.Features.SubscriptionUpdate(
×
1254
              this.defaultAllowedUpdates,
1255
              this.enabled,
1256
              this.extraParams,
1257
              this.products,
1258
              this.prorationBehavior,
1259
              this.scheduleAtPeriodEnd);
1260
        }
1261

1262
        /**
1263
         * Add an element to `defaultAllowedUpdates` list. A list is initialized for the first
1264
         * `add/addAll` call, and subsequent calls adds additional elements to the original list.
1265
         * See {@link ConfigurationUpdateParams.Features.SubscriptionUpdate#defaultAllowedUpdates}
1266
         * for the field documentation.
1267
         */
1268
        @SuppressWarnings("unchecked")
1269
        public Builder addDefaultAllowedUpdate(
1270
            ConfigurationUpdateParams.Features.SubscriptionUpdate.DefaultAllowedUpdate element) {
1271
          if (this.defaultAllowedUpdates == null
×
1272
              || this.defaultAllowedUpdates instanceof EmptyParam) {
1273
            this.defaultAllowedUpdates =
×
1274
                new ArrayList<
1275
                    ConfigurationUpdateParams.Features.SubscriptionUpdate.DefaultAllowedUpdate>();
1276
          }
1277
          ((List<ConfigurationUpdateParams.Features.SubscriptionUpdate.DefaultAllowedUpdate>)
×
1278
                  this.defaultAllowedUpdates)
1279
              .add(element);
×
1280
          return this;
×
1281
        }
1282

1283
        /**
1284
         * Add all elements to `defaultAllowedUpdates` list. A list is initialized for the first
1285
         * `add/addAll` call, and subsequent calls adds additional elements to the original list.
1286
         * See {@link ConfigurationUpdateParams.Features.SubscriptionUpdate#defaultAllowedUpdates}
1287
         * for the field documentation.
1288
         */
1289
        @SuppressWarnings("unchecked")
1290
        public Builder addAllDefaultAllowedUpdate(
1291
            List<ConfigurationUpdateParams.Features.SubscriptionUpdate.DefaultAllowedUpdate>
1292
                elements) {
1293
          if (this.defaultAllowedUpdates == null
×
1294
              || this.defaultAllowedUpdates instanceof EmptyParam) {
1295
            this.defaultAllowedUpdates =
×
1296
                new ArrayList<
1297
                    ConfigurationUpdateParams.Features.SubscriptionUpdate.DefaultAllowedUpdate>();
1298
          }
1299
          ((List<ConfigurationUpdateParams.Features.SubscriptionUpdate.DefaultAllowedUpdate>)
×
1300
                  this.defaultAllowedUpdates)
1301
              .addAll(elements);
×
1302
          return this;
×
1303
        }
1304

1305
        /**
1306
         * The types of subscription updates that are supported. When empty, subscriptions are not
1307
         * updateable.
1308
         */
1309
        public Builder setDefaultAllowedUpdates(EmptyParam defaultAllowedUpdates) {
1310
          this.defaultAllowedUpdates = defaultAllowedUpdates;
×
1311
          return this;
×
1312
        }
1313

1314
        /**
1315
         * The types of subscription updates that are supported. When empty, subscriptions are not
1316
         * updateable.
1317
         */
1318
        public Builder setDefaultAllowedUpdates(
1319
            List<ConfigurationUpdateParams.Features.SubscriptionUpdate.DefaultAllowedUpdate>
1320
                defaultAllowedUpdates) {
1321
          this.defaultAllowedUpdates = defaultAllowedUpdates;
×
1322
          return this;
×
1323
        }
1324

1325
        /** Whether the feature is enabled. */
1326
        public Builder setEnabled(Boolean enabled) {
1327
          this.enabled = enabled;
×
1328
          return this;
×
1329
        }
1330

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

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

1359
        /**
1360
         * Add an element to `products` list. A list is initialized for the first `add/addAll` call,
1361
         * and subsequent calls adds additional elements to the original list. See {@link
1362
         * ConfigurationUpdateParams.Features.SubscriptionUpdate#products} for the field
1363
         * documentation.
1364
         */
1365
        @SuppressWarnings("unchecked")
1366
        public Builder addProduct(
1367
            ConfigurationUpdateParams.Features.SubscriptionUpdate.Product element) {
1368
          if (this.products == null || this.products instanceof EmptyParam) {
×
1369
            this.products =
×
1370
                new ArrayList<ConfigurationUpdateParams.Features.SubscriptionUpdate.Product>();
1371
          }
1372
          ((List<ConfigurationUpdateParams.Features.SubscriptionUpdate.Product>) this.products)
×
1373
              .add(element);
×
1374
          return this;
×
1375
        }
1376

1377
        /**
1378
         * Add all elements to `products` list. A list is initialized for the first `add/addAll`
1379
         * call, and subsequent calls adds additional elements to the original list. See {@link
1380
         * ConfigurationUpdateParams.Features.SubscriptionUpdate#products} for the field
1381
         * documentation.
1382
         */
1383
        @SuppressWarnings("unchecked")
1384
        public Builder addAllProduct(
1385
            List<ConfigurationUpdateParams.Features.SubscriptionUpdate.Product> elements) {
1386
          if (this.products == null || this.products instanceof EmptyParam) {
×
1387
            this.products =
×
1388
                new ArrayList<ConfigurationUpdateParams.Features.SubscriptionUpdate.Product>();
1389
          }
1390
          ((List<ConfigurationUpdateParams.Features.SubscriptionUpdate.Product>) this.products)
×
1391
              .addAll(elements);
×
1392
          return this;
×
1393
        }
1394

1395
        /** The list of up to 10 products that support subscription updates. */
1396
        public Builder setProducts(EmptyParam products) {
1397
          this.products = products;
×
1398
          return this;
×
1399
        }
1400

1401
        /** The list of up to 10 products that support subscription updates. */
1402
        public Builder setProducts(
1403
            List<ConfigurationUpdateParams.Features.SubscriptionUpdate.Product> products) {
1404
          this.products = products;
×
1405
          return this;
×
1406
        }
1407

1408
        /**
1409
         * Determines how to handle prorations resulting from subscription updates. Valid values are
1410
         * {@code none}, {@code create_prorations}, and {@code always_invoice}.
1411
         */
1412
        public Builder setProrationBehavior(
1413
            ConfigurationUpdateParams.Features.SubscriptionUpdate.ProrationBehavior
1414
                prorationBehavior) {
1415
          this.prorationBehavior = prorationBehavior;
×
1416
          return this;
×
1417
        }
1418

1419
        /**
1420
         * Setting to control when an update should be scheduled at the end of the period instead of
1421
         * applying immediately.
1422
         */
1423
        public Builder setScheduleAtPeriodEnd(
1424
            ConfigurationUpdateParams.Features.SubscriptionUpdate.ScheduleAtPeriodEnd
1425
                scheduleAtPeriodEnd) {
NEW
1426
          this.scheduleAtPeriodEnd = scheduleAtPeriodEnd;
×
NEW
1427
          return this;
×
1428
        }
1429
      }
1430

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

1443
        /**
1444
         * <strong>Required.</strong> The list of price IDs for the product that a subscription can
1445
         * be updated to.
1446
         */
1447
        @SerializedName("prices")
1448
        List<String> prices;
1449

1450
        /** <strong>Required.</strong> The product id. */
1451
        @SerializedName("product")
1452
        Object product;
1453

1454
        private Product(Map<String, Object> extraParams, List<String> prices, Object product) {
×
1455
          this.extraParams = extraParams;
×
1456
          this.prices = prices;
×
1457
          this.product = product;
×
1458
        }
×
1459

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

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

1467
          private List<String> prices;
1468

1469
          private Object product;
1470

1471
          /** Finalize and obtain parameter instance from this builder. */
1472
          public ConfigurationUpdateParams.Features.SubscriptionUpdate.Product build() {
1473
            return new ConfigurationUpdateParams.Features.SubscriptionUpdate.Product(
×
1474
                this.extraParams, this.prices, this.product);
1475
          }
1476

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

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

1507
          /**
1508
           * Add an element to `prices` list. A list is initialized for the first `add/addAll` call,
1509
           * and subsequent calls adds additional elements to the original list. See {@link
1510
           * ConfigurationUpdateParams.Features.SubscriptionUpdate.Product#prices} for the field
1511
           * documentation.
1512
           */
1513
          public Builder addPrice(String element) {
1514
            if (this.prices == null) {
×
1515
              this.prices = new ArrayList<>();
×
1516
            }
1517
            this.prices.add(element);
×
1518
            return this;
×
1519
          }
1520

1521
          /**
1522
           * Add all elements to `prices` list. A list is initialized for the first `add/addAll`
1523
           * call, and subsequent calls adds additional elements to the original list. See {@link
1524
           * ConfigurationUpdateParams.Features.SubscriptionUpdate.Product#prices} for the field
1525
           * documentation.
1526
           */
1527
          public Builder addAllPrice(List<String> elements) {
1528
            if (this.prices == null) {
×
1529
              this.prices = new ArrayList<>();
×
1530
            }
1531
            this.prices.addAll(elements);
×
1532
            return this;
×
1533
          }
1534

1535
          /** <strong>Required.</strong> The product id. */
1536
          public Builder setProduct(String product) {
1537
            this.product = product;
×
1538
            return this;
×
1539
          }
1540

1541
          /** <strong>Required.</strong> The product id. */
1542
          public Builder setProduct(EmptyParam product) {
1543
            this.product = product;
×
1544
            return this;
×
1545
          }
1546
        }
1547
      }
1548

1549
      @Getter
1550
      public static class ScheduleAtPeriodEnd {
1551
        /**
1552
         * List of conditions. When any condition is true, the update will be scheduled at the end
1553
         * of the current period.
1554
         */
1555
        @SerializedName("conditions")
1556
        Object conditions;
1557

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

NEW
1568
        private ScheduleAtPeriodEnd(Object conditions, Map<String, Object> extraParams) {
×
NEW
1569
          this.conditions = conditions;
×
NEW
1570
          this.extraParams = extraParams;
×
NEW
1571
        }
×
1572

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

NEW
1577
        public static class Builder {
×
1578
          private Object conditions;
1579

1580
          private Map<String, Object> extraParams;
1581

1582
          /** Finalize and obtain parameter instance from this builder. */
1583
          public ConfigurationUpdateParams.Features.SubscriptionUpdate.ScheduleAtPeriodEnd build() {
NEW
1584
            return new ConfigurationUpdateParams.Features.SubscriptionUpdate.ScheduleAtPeriodEnd(
×
1585
                this.conditions, this.extraParams);
1586
          }
1587

1588
          /**
1589
           * Add an element to `conditions` list. A list is initialized for the first `add/addAll`
1590
           * call, and subsequent calls adds additional elements to the original list. See {@link
1591
           * ConfigurationUpdateParams.Features.SubscriptionUpdate.ScheduleAtPeriodEnd#conditions}
1592
           * for the field documentation.
1593
           */
1594
          @SuppressWarnings("unchecked")
1595
          public Builder addCondition(
1596
              ConfigurationUpdateParams.Features.SubscriptionUpdate.ScheduleAtPeriodEnd.Condition
1597
                  element) {
NEW
1598
            if (this.conditions == null || this.conditions instanceof EmptyParam) {
×
NEW
1599
              this.conditions =
×
1600
                  new ArrayList<
1601
                      ConfigurationUpdateParams.Features.SubscriptionUpdate.ScheduleAtPeriodEnd
1602
                          .Condition>();
1603
            }
NEW
1604
            ((List<
×
1605
                        ConfigurationUpdateParams.Features.SubscriptionUpdate.ScheduleAtPeriodEnd
1606
                            .Condition>)
1607
                    this.conditions)
NEW
1608
                .add(element);
×
NEW
1609
            return this;
×
1610
          }
1611

1612
          /**
1613
           * Add all elements to `conditions` list. A list is initialized for the first `add/addAll`
1614
           * call, and subsequent calls adds additional elements to the original list. See {@link
1615
           * ConfigurationUpdateParams.Features.SubscriptionUpdate.ScheduleAtPeriodEnd#conditions}
1616
           * for the field documentation.
1617
           */
1618
          @SuppressWarnings("unchecked")
1619
          public Builder addAllCondition(
1620
              List<
1621
                      ConfigurationUpdateParams.Features.SubscriptionUpdate.ScheduleAtPeriodEnd
1622
                          .Condition>
1623
                  elements) {
NEW
1624
            if (this.conditions == null || this.conditions instanceof EmptyParam) {
×
NEW
1625
              this.conditions =
×
1626
                  new ArrayList<
1627
                      ConfigurationUpdateParams.Features.SubscriptionUpdate.ScheduleAtPeriodEnd
1628
                          .Condition>();
1629
            }
NEW
1630
            ((List<
×
1631
                        ConfigurationUpdateParams.Features.SubscriptionUpdate.ScheduleAtPeriodEnd
1632
                            .Condition>)
1633
                    this.conditions)
NEW
1634
                .addAll(elements);
×
NEW
1635
            return this;
×
1636
          }
1637

1638
          /**
1639
           * List of conditions. When any condition is true, the update will be scheduled at the end
1640
           * of the current period.
1641
           */
1642
          public Builder setConditions(EmptyParam conditions) {
NEW
1643
            this.conditions = conditions;
×
NEW
1644
            return this;
×
1645
          }
1646

1647
          /**
1648
           * List of conditions. When any condition is true, the update will be scheduled at the end
1649
           * of the current period.
1650
           */
1651
          public Builder setConditions(
1652
              List<
1653
                      ConfigurationUpdateParams.Features.SubscriptionUpdate.ScheduleAtPeriodEnd
1654
                          .Condition>
1655
                  conditions) {
NEW
1656
            this.conditions = conditions;
×
NEW
1657
            return this;
×
1658
          }
1659

1660
          /**
1661
           * Add a key/value pair to `extraParams` map. A map is initialized for the first
1662
           * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
1663
           * map. See {@link
1664
           * ConfigurationUpdateParams.Features.SubscriptionUpdate.ScheduleAtPeriodEnd#extraParams}
1665
           * for the field documentation.
1666
           */
1667
          public Builder putExtraParam(String key, Object value) {
NEW
1668
            if (this.extraParams == null) {
×
NEW
1669
              this.extraParams = new HashMap<>();
×
1670
            }
NEW
1671
            this.extraParams.put(key, value);
×
NEW
1672
            return this;
×
1673
          }
1674

1675
          /**
1676
           * Add all map key/value pairs 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
1679
           * ConfigurationUpdateParams.Features.SubscriptionUpdate.ScheduleAtPeriodEnd#extraParams}
1680
           * for the field documentation.
1681
           */
1682
          public Builder putAllExtraParam(Map<String, Object> map) {
NEW
1683
            if (this.extraParams == null) {
×
NEW
1684
              this.extraParams = new HashMap<>();
×
1685
            }
NEW
1686
            this.extraParams.putAll(map);
×
NEW
1687
            return this;
×
1688
          }
1689
        }
1690

1691
        @Getter
1692
        public static class Condition {
1693
          /**
1694
           * Map of extra parameters for custom features not available in this client library. The
1695
           * content in this map is not serialized under this field's {@code @SerializedName} value.
1696
           * Instead, each key/value pair is serialized as if the key is a root-level field
1697
           * (serialized) name in this param object. Effectively, this map is flattened to its
1698
           * parent instance.
1699
           */
1700
          @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
1701
          Map<String, Object> extraParams;
1702

1703
          /** <strong>Required.</strong> The type of condition. */
1704
          @SerializedName("type")
1705
          Type type;
1706

NEW
1707
          private Condition(Map<String, Object> extraParams, Type type) {
×
NEW
1708
            this.extraParams = extraParams;
×
NEW
1709
            this.type = type;
×
NEW
1710
          }
×
1711

1712
          public static Builder builder() {
NEW
1713
            return new Builder();
×
1714
          }
1715

NEW
1716
          public static class Builder {
×
1717
            private Map<String, Object> extraParams;
1718

1719
            private Type type;
1720

1721
            /** Finalize and obtain parameter instance from this builder. */
1722
            public ConfigurationUpdateParams.Features.SubscriptionUpdate.ScheduleAtPeriodEnd
1723
                    .Condition
1724
                build() {
NEW
1725
              return new ConfigurationUpdateParams.Features.SubscriptionUpdate.ScheduleAtPeriodEnd
×
1726
                  .Condition(this.extraParams, this.type);
1727
            }
1728

1729
            /**
1730
             * Add a key/value pair to `extraParams` map. A map is initialized for the first
1731
             * `put/putAll` call, and subsequent calls add additional key/value pairs to the
1732
             * original map. See {@link
1733
             * ConfigurationUpdateParams.Features.SubscriptionUpdate.ScheduleAtPeriodEnd.Condition#extraParams}
1734
             * for the field documentation.
1735
             */
1736
            public Builder putExtraParam(String key, Object value) {
NEW
1737
              if (this.extraParams == null) {
×
NEW
1738
                this.extraParams = new HashMap<>();
×
1739
              }
NEW
1740
              this.extraParams.put(key, value);
×
NEW
1741
              return this;
×
1742
            }
1743

1744
            /**
1745
             * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
1746
             * `put/putAll` call, and subsequent calls add additional key/value pairs to the
1747
             * original map. See {@link
1748
             * ConfigurationUpdateParams.Features.SubscriptionUpdate.ScheduleAtPeriodEnd.Condition#extraParams}
1749
             * for the field documentation.
1750
             */
1751
            public Builder putAllExtraParam(Map<String, Object> map) {
NEW
1752
              if (this.extraParams == null) {
×
NEW
1753
                this.extraParams = new HashMap<>();
×
1754
              }
NEW
1755
              this.extraParams.putAll(map);
×
NEW
1756
              return this;
×
1757
            }
1758

1759
            /** <strong>Required.</strong> The type of condition. */
1760
            public Builder setType(
1761
                ConfigurationUpdateParams.Features.SubscriptionUpdate.ScheduleAtPeriodEnd.Condition
1762
                        .Type
1763
                    type) {
NEW
1764
              this.type = type;
×
NEW
1765
              return this;
×
1766
            }
1767
          }
1768

NEW
1769
          public enum Type implements ApiRequestParams.EnumParam {
×
NEW
1770
            @SerializedName("decreasing_item_amount")
×
1771
            DECREASING_ITEM_AMOUNT("decreasing_item_amount"),
1772

NEW
1773
            @SerializedName("shortening_interval")
×
1774
            SHORTENING_INTERVAL("shortening_interval");
1775

1776
            @Getter(onMethod_ = {@Override})
1777
            private final String value;
1778

NEW
1779
            Type(String value) {
×
NEW
1780
              this.value = value;
×
NEW
1781
            }
×
1782
          }
1783
        }
1784
      }
1785

1786
      public enum DefaultAllowedUpdate implements ApiRequestParams.EnumParam {
×
1787
        @SerializedName("price")
×
1788
        PRICE("price"),
1789

1790
        @SerializedName("promotion_code")
×
1791
        PROMOTION_CODE("promotion_code"),
1792

1793
        @SerializedName("quantity")
×
1794
        QUANTITY("quantity");
1795

1796
        @Getter(onMethod_ = {@Override})
1797
        private final String value;
1798

1799
        DefaultAllowedUpdate(String value) {
×
1800
          this.value = value;
×
1801
        }
×
1802
      }
1803

1804
      public enum ProrationBehavior implements ApiRequestParams.EnumParam {
×
1805
        @SerializedName("always_invoice")
×
1806
        ALWAYS_INVOICE("always_invoice"),
1807

1808
        @SerializedName("create_prorations")
×
1809
        CREATE_PRORATIONS("create_prorations"),
1810

1811
        @SerializedName("none")
×
1812
        NONE("none");
1813

1814
        @Getter(onMethod_ = {@Override})
1815
        private final String value;
1816

1817
        ProrationBehavior(String value) {
×
1818
          this.value = value;
×
1819
        }
×
1820
      }
1821
    }
1822
  }
1823

1824
  @Getter
1825
  public static class LoginPage {
1826
    /**
1827
     * <strong>Required.</strong> Set to {@code true} to generate a shareable URL <a
1828
     * href="https://stripe.com/docs/api/customer_portal/configuration#portal_configuration_object-login_page-url">{@code
1829
     * login_page.url}</a> that will take your customers to a hosted login page for the customer
1830
     * portal.
1831
     *
1832
     * <p>Set to {@code false} to deactivate the {@code login_page.url}.
1833
     */
1834
    @SerializedName("enabled")
1835
    Boolean enabled;
1836

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

1846
    private LoginPage(Boolean enabled, Map<String, Object> extraParams) {
×
1847
      this.enabled = enabled;
×
1848
      this.extraParams = extraParams;
×
1849
    }
×
1850

1851
    public static Builder builder() {
1852
      return new Builder();
×
1853
    }
1854

1855
    public static class Builder {
×
1856
      private Boolean enabled;
1857

1858
      private Map<String, Object> extraParams;
1859

1860
      /** Finalize and obtain parameter instance from this builder. */
1861
      public ConfigurationUpdateParams.LoginPage build() {
1862
        return new ConfigurationUpdateParams.LoginPage(this.enabled, this.extraParams);
×
1863
      }
1864

1865
      /**
1866
       * <strong>Required.</strong> Set to {@code true} to generate a shareable URL <a
1867
       * href="https://stripe.com/docs/api/customer_portal/configuration#portal_configuration_object-login_page-url">{@code
1868
       * login_page.url}</a> that will take your customers to a hosted login page for the customer
1869
       * portal.
1870
       *
1871
       * <p>Set to {@code false} to deactivate the {@code login_page.url}.
1872
       */
1873
      public Builder setEnabled(Boolean enabled) {
1874
        this.enabled = enabled;
×
1875
        return this;
×
1876
      }
1877

1878
      /**
1879
       * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll`
1880
       * call, and subsequent calls add additional key/value pairs to the original map. See {@link
1881
       * ConfigurationUpdateParams.LoginPage#extraParams} for the field documentation.
1882
       */
1883
      public Builder putExtraParam(String key, Object value) {
1884
        if (this.extraParams == null) {
×
1885
          this.extraParams = new HashMap<>();
×
1886
        }
1887
        this.extraParams.put(key, value);
×
1888
        return this;
×
1889
      }
1890

1891
      /**
1892
       * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
1893
       * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map.
1894
       * See {@link ConfigurationUpdateParams.LoginPage#extraParams} for the field documentation.
1895
       */
1896
      public Builder putAllExtraParam(Map<String, Object> map) {
1897
        if (this.extraParams == null) {
×
1898
          this.extraParams = new HashMap<>();
×
1899
        }
1900
        this.extraParams.putAll(map);
×
1901
        return this;
×
1902
      }
1903
    }
1904
  }
1905
}
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