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

stripe / stripe-java / #16624

07 Nov 2024 10:04PM UTC coverage: 12.419% (-0.1%) from 12.519%
#16624

push

github

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

Update generated code for beta

17 of 1341 new or added lines in 57 files covered. (1.27%)

33 existing lines in 29 files now uncovered.

18855 of 151828 relevant lines covered (12.42%)

0.12 hits per line

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

23.05
/src/main/java/com/stripe/model/checkout/Session.java
1
// File generated from our OpenAPI spec
2
package com.stripe.model.checkout;
3

4
import com.google.gson.annotations.SerializedName;
5
import com.stripe.exception.StripeException;
6
import com.stripe.model.Account;
7
import com.stripe.model.Address;
8
import com.stripe.model.Customer;
9
import com.stripe.model.ExpandableField;
10
import com.stripe.model.HasId;
11
import com.stripe.model.Invoice;
12
import com.stripe.model.LineItemCollection;
13
import com.stripe.model.MetadataStore;
14
import com.stripe.model.PaymentIntent;
15
import com.stripe.model.PaymentLink;
16
import com.stripe.model.SetupIntent;
17
import com.stripe.model.ShippingDetails;
18
import com.stripe.model.ShippingRate;
19
import com.stripe.model.StripeObject;
20
import com.stripe.model.Subscription;
21
import com.stripe.model.TaxRate;
22
import com.stripe.net.ApiRequest;
23
import com.stripe.net.ApiRequestParams;
24
import com.stripe.net.ApiResource;
25
import com.stripe.net.BaseAddress;
26
import com.stripe.net.RequestOptions;
27
import com.stripe.net.StripeResponseGetter;
28
import com.stripe.param.checkout.SessionCreateParams;
29
import com.stripe.param.checkout.SessionExpireParams;
30
import com.stripe.param.checkout.SessionListLineItemsParams;
31
import com.stripe.param.checkout.SessionListParams;
32
import com.stripe.param.checkout.SessionRetrieveParams;
33
import com.stripe.param.checkout.SessionUpdateParams;
34
import java.math.BigDecimal;
35
import java.util.List;
36
import java.util.Map;
37
import java.util.stream.Collectors;
38
import lombok.EqualsAndHashCode;
39
import lombok.Getter;
40
import lombok.Setter;
41

42
/**
43
 * A Checkout Session represents your customer's session as they pay for one-time purchases or
44
 * subscriptions through <a href="https://stripe.com/docs/payments/checkout">Checkout</a> or <a
45
 * href="https://stripe.com/docs/payments/payment-links">Payment Links</a>. We recommend creating a
46
 * new Session each time your customer attempts to pay.
47
 *
48
 * <p>Once payment is successful, the Checkout Session will contain a reference to the <a
49
 * href="https://stripe.com/docs/api/customers">Customer</a>, and either the successful <a
50
 * href="https://stripe.com/docs/api/payment_intents">PaymentIntent</a> or an active <a
51
 * href="https://stripe.com/docs/api/subscriptions">Subscription</a>.
52
 *
53
 * <p>You can create a Checkout Session on your server and redirect to its URL to begin Checkout.
54
 *
55
 * <p>Related guide: <a href="https://stripe.com/docs/checkout/quickstart">Checkout quickstart</a>
56
 */
57
@Getter
58
@Setter
59
@EqualsAndHashCode(callSuper = false)
60
public class Session extends ApiResource implements HasId, MetadataStore<Session> {
1✔
61
  /**
62
   * Settings for price localization with <a
63
   * href="https://docs.stripe.com/payments/checkout/adaptive-pricing">Adaptive Pricing</a>.
64
   */
65
  @SerializedName("adaptive_pricing")
66
  AdaptivePricing adaptivePricing;
67

68
  /** When set, provides configuration for actions to take if this Checkout Session expires. */
69
  @SerializedName("after_expiration")
70
  AfterExpiration afterExpiration;
71

72
  /** Enables user redeemable promotion codes. */
73
  @SerializedName("allow_promotion_codes")
74
  Boolean allowPromotionCodes;
75

76
  /** Total of all items before discounts or taxes are applied. */
77
  @SerializedName("amount_subtotal")
78
  Long amountSubtotal;
79

80
  /** Total of all items after discounts and taxes are applied. */
81
  @SerializedName("amount_total")
82
  Long amountTotal;
83

84
  @SerializedName("automatic_tax")
85
  AutomaticTax automaticTax;
86

87
  /**
88
   * Describes whether Checkout should collect the customer's billing address. Defaults to {@code
89
   * auto}.
90
   *
91
   * <p>One of {@code auto}, or {@code required}.
92
   */
93
  @SerializedName("billing_address_collection")
94
  String billingAddressCollection;
95

96
  /**
97
   * If set, Checkout displays a back button and customers will be directed to this URL if they
98
   * decide to cancel payment and return to your website.
99
   */
100
  @SerializedName("cancel_url")
101
  String cancelUrl;
102

103
  /**
104
   * A unique string to reference the Checkout Session. This can be a customer ID, a cart ID, or
105
   * similar, and can be used to reconcile the Session with your internal systems.
106
   */
107
  @SerializedName("client_reference_id")
108
  String clientReferenceId;
109

110
  /**
111
   * The client secret of the Session. Use this with <a
112
   * href="https://stripe.com/docs/js/custom_checkout/init">initCustomCheckout</a> on your front
113
   * end.
114
   */
115
  @SerializedName("client_secret")
116
  String clientSecret;
117

118
  /** Information about the customer collected within the Checkout Session. */
119
  @SerializedName("collected_information")
120
  CollectedInformation collectedInformation;
121

122
  /** Results of {@code consent_collection} for this session. */
123
  @SerializedName("consent")
124
  Consent consent;
125

126
  /**
127
   * When set, provides configuration for the Checkout Session to gather active consent from
128
   * customers.
129
   */
130
  @SerializedName("consent_collection")
131
  ConsentCollection consentCollection;
132

133
  /** Time at which the object was created. Measured in seconds since the Unix epoch. */
134
  @SerializedName("created")
135
  Long created;
136

137
  /**
138
   * Three-letter <a href="https://www.iso.org/iso-4217-currency-codes.html">ISO currency code</a>,
139
   * in lowercase. Must be a <a href="https://stripe.com/docs/currencies">supported currency</a>.
140
   */
141
  @SerializedName("currency")
142
  String currency;
143

144
  /**
145
   * Currency conversion details for <a
146
   * href="https://docs.stripe.com/payments/checkout/adaptive-pricing">Adaptive Pricing</a> sessions
147
   */
148
  @SerializedName("currency_conversion")
149
  CurrencyConversion currencyConversion;
150

151
  /**
152
   * Collect additional information from your customer using custom fields. Up to 3 fields are
153
   * supported.
154
   */
155
  @SerializedName("custom_fields")
156
  List<Session.CustomField> customFields;
157

158
  @SerializedName("custom_text")
159
  CustomText customText;
160

161
  /**
162
   * The ID of the customer for this Session. For Checkout Sessions in {@code subscription} mode or
163
   * Checkout Sessions with {@code customer_creation} set as {@code always} in {@code payment} mode,
164
   * Checkout will create a new customer object based on information provided during the payment
165
   * flow unless an existing customer was provided when the Session was created.
166
   */
167
  @SerializedName("customer")
168
  @Getter(lombok.AccessLevel.NONE)
169
  @Setter(lombok.AccessLevel.NONE)
170
  ExpandableField<Customer> customer;
171

172
  /**
173
   * Configure whether a Checkout Session creates a Customer when the Checkout Session completes.
174
   *
175
   * <p>One of {@code always}, or {@code if_required}.
176
   */
177
  @SerializedName("customer_creation")
178
  String customerCreation;
179

180
  /**
181
   * The customer details including the customer's tax exempt status and the customer's tax IDs.
182
   * Customer's address details are not present on Sessions in {@code setup} mode.
183
   */
184
  @SerializedName("customer_details")
185
  CustomerDetails customerDetails;
186

187
  /**
188
   * If provided, this value will be used when the Customer object is created. If not provided,
189
   * customers will be asked to enter their email address. Use this parameter to prefill customer
190
   * data if you already have an email on file. To access information about the customer once the
191
   * payment flow is complete, use the {@code customer} attribute.
192
   */
193
  @SerializedName("customer_email")
194
  String customerEmail;
195

196
  /** The timestamp at which the Checkout Session will expire. */
197
  @SerializedName("expires_at")
198
  Long expiresAt;
199

200
  /** Unique identifier for the object. */
201
  @Getter(onMethod_ = {@Override})
202
  @SerializedName("id")
203
  String id;
204

205
  /** ID of the invoice created by the Checkout Session, if it exists. */
206
  @SerializedName("invoice")
207
  @Getter(lombok.AccessLevel.NONE)
208
  @Setter(lombok.AccessLevel.NONE)
209
  ExpandableField<Invoice> invoice;
210

211
  /** Details on the state of invoice creation for the Checkout Session. */
212
  @SerializedName("invoice_creation")
213
  InvoiceCreation invoiceCreation;
214

215
  /** The line items purchased by the customer. */
216
  @SerializedName("line_items")
217
  LineItemCollection lineItems;
218

219
  /**
220
   * Has the value {@code true} if the object exists in live mode or the value {@code false} if the
221
   * object exists in test mode.
222
   */
223
  @SerializedName("livemode")
224
  Boolean livemode;
225

226
  /**
227
   * The IETF language tag of the locale Checkout is displayed in. If blank or {@code auto}, the
228
   * browser's locale is used.
229
   *
230
   * <p>One of {@code auto}, {@code bg}, {@code cs}, {@code da}, {@code de}, {@code el}, {@code en},
231
   * {@code en-GB}, {@code es}, {@code es-419}, {@code et}, {@code fi}, {@code fil}, {@code fr},
232
   * {@code fr-CA}, {@code hr}, {@code hu}, {@code id}, {@code it}, {@code ja}, {@code ko}, {@code
233
   * lt}, {@code lv}, {@code ms}, {@code mt}, {@code nb}, {@code nl}, {@code pl}, {@code pt}, {@code
234
   * pt-BR}, {@code ro}, {@code ru}, {@code sk}, {@code sl}, {@code sv}, {@code th}, {@code tr},
235
   * {@code vi}, {@code zh}, {@code zh-HK}, or {@code zh-TW}.
236
   */
237
  @SerializedName("locale")
238
  String locale;
239

240
  /**
241
   * Set of <a href="https://stripe.com/docs/api/metadata">key-value pairs</a> that you can attach
242
   * to an object. This can be useful for storing additional information about the object in a
243
   * structured format.
244
   */
245
  @Getter(onMethod_ = {@Override})
246
  @SerializedName("metadata")
247
  Map<String, String> metadata;
248

249
  /**
250
   * The mode of the Checkout Session.
251
   *
252
   * <p>One of {@code payment}, {@code setup}, or {@code subscription}.
253
   */
254
  @SerializedName("mode")
255
  String mode;
256

257
  /**
258
   * String representing the object's type. Objects of the same type share the same value.
259
   *
260
   * <p>Equal to {@code checkout.session}.
261
   */
262
  @SerializedName("object")
263
  String object;
264

265
  /**
266
   * The ID of the PaymentIntent for Checkout Sessions in {@code payment} mode. You can't confirm or
267
   * cancel the PaymentIntent for a Checkout Session. To cancel, <a
268
   * href="https://stripe.com/docs/api/checkout/sessions/expire">expire the Checkout Session</a>
269
   * instead.
270
   */
271
  @SerializedName("payment_intent")
272
  @Getter(lombok.AccessLevel.NONE)
273
  @Setter(lombok.AccessLevel.NONE)
274
  ExpandableField<PaymentIntent> paymentIntent;
275

276
  /** The ID of the Payment Link that created this Session. */
277
  @SerializedName("payment_link")
278
  @Getter(lombok.AccessLevel.NONE)
279
  @Setter(lombok.AccessLevel.NONE)
280
  ExpandableField<PaymentLink> paymentLink;
281

282
  /**
283
   * Configure whether a Checkout Session should collect a payment method. Defaults to {@code
284
   * always}.
285
   *
286
   * <p>One of {@code always}, or {@code if_required}.
287
   */
288
  @SerializedName("payment_method_collection")
289
  String paymentMethodCollection;
290

291
  /**
292
   * Information about the payment method configuration used for this Checkout session if using
293
   * dynamic payment methods.
294
   */
295
  @SerializedName("payment_method_configuration_details")
296
  PaymentMethodConfigurationDetails paymentMethodConfigurationDetails;
297

298
  /**
299
   * Payment-method-specific configuration for the PaymentIntent or SetupIntent of this
300
   * CheckoutSession.
301
   */
302
  @SerializedName("payment_method_options")
303
  PaymentMethodOptions paymentMethodOptions;
304

305
  /**
306
   * A list of the types of payment methods (e.g. card) this Checkout Session is allowed to accept.
307
   */
308
  @SerializedName("payment_method_types")
309
  List<String> paymentMethodTypes;
310

311
  /**
312
   * The payment status of the Checkout Session, one of {@code paid}, {@code unpaid}, or {@code
313
   * no_payment_required}. You can use this value to decide when to fulfill your customer's order.
314
   */
315
  @SerializedName("payment_status")
316
  String paymentStatus;
317

318
  /**
319
   * This property is used to set up permissions for various actions (e.g., update) on the
320
   * CheckoutSession object.
321
   *
322
   * <p>For specific permissions, please refer to their dedicated subsections, such as {@code
323
   * permissions.update.shipping_details}.
324
   */
325
  @SerializedName("permissions")
326
  Permissions permissions;
327

328
  @SerializedName("phone_number_collection")
329
  PhoneNumberCollection phoneNumberCollection;
330

331
  /** The ID of the original expired Checkout Session that triggered the recovery flow. */
332
  @SerializedName("recovered_from")
333
  String recoveredFrom;
334

335
  /**
336
   * This parameter applies to {@code ui_mode: embedded}. Learn more about the <a
337
   * href="https://stripe.com/docs/payments/checkout/custom-success-page?payment-ui=embedded-form">redirect
338
   * behavior</a> of embedded sessions. Defaults to {@code always}.
339
   *
340
   * <p>One of {@code always}, {@code if_required}, or {@code never}.
341
   */
342
  @SerializedName("redirect_on_completion")
343
  String redirectOnCompletion;
344

345
  /**
346
   * Applies to Checkout Sessions with {@code ui_mode: embedded} or {@code ui_mode: custom}. The URL
347
   * to redirect your customer back to after they authenticate or cancel their payment on the
348
   * payment method's app or site.
349
   */
350
  @SerializedName("return_url")
351
  String returnUrl;
352

353
  /**
354
   * Controls saved payment method settings for the session. Only available in {@code payment} and
355
   * {@code subscription} mode.
356
   */
357
  @SerializedName("saved_payment_method_options")
358
  SavedPaymentMethodOptions savedPaymentMethodOptions;
359

360
  /**
361
   * The ID of the SetupIntent for Checkout Sessions in {@code setup} mode. You can't confirm or
362
   * cancel the SetupIntent for a Checkout Session. To cancel, <a
363
   * href="https://stripe.com/docs/api/checkout/sessions/expire">expire the Checkout Session</a>
364
   * instead.
365
   */
366
  @SerializedName("setup_intent")
367
  @Getter(lombok.AccessLevel.NONE)
368
  @Setter(lombok.AccessLevel.NONE)
369
  ExpandableField<SetupIntent> setupIntent;
370

371
  /**
372
   * When set, provides configuration for Checkout to collect a shipping address from a customer.
373
   */
374
  @SerializedName("shipping_address_collection")
375
  ShippingAddressCollection shippingAddressCollection;
376

377
  /** The details of the customer cost of shipping, including the customer chosen ShippingRate. */
378
  @SerializedName("shipping_cost")
379
  ShippingCost shippingCost;
380

381
  /** Shipping information for this Checkout Session. */
382
  @SerializedName("shipping_details")
383
  ShippingDetails shippingDetails;
384

385
  /** The shipping rate options applied to this Session. */
386
  @SerializedName("shipping_options")
387
  List<Session.ShippingOption> shippingOptions;
388

389
  /**
390
   * The status of the Checkout Session, one of {@code open}, {@code complete}, or {@code expired}.
391
   */
392
  @SerializedName("status")
393
  String status;
394

395
  /**
396
   * Describes the type of transaction being performed by Checkout in order to customize relevant
397
   * text on the page, such as the submit button. {@code submit_type} can only be specified on
398
   * Checkout Sessions in {@code payment} mode. If blank or {@code auto}, {@code pay} is used.
399
   *
400
   * <p>One of {@code auto}, {@code book}, {@code donate}, or {@code pay}.
401
   */
402
  @SerializedName("submit_type")
403
  String submitType;
404

405
  /** The ID of the subscription for Checkout Sessions in {@code subscription} mode. */
406
  @SerializedName("subscription")
407
  @Getter(lombok.AccessLevel.NONE)
408
  @Setter(lombok.AccessLevel.NONE)
409
  ExpandableField<Subscription> subscription;
410

411
  /**
412
   * The URL the customer will be directed to after the payment or subscription creation is
413
   * successful.
414
   */
415
  @SerializedName("success_url")
416
  String successUrl;
417

418
  @SerializedName("tax_id_collection")
419
  TaxIdCollection taxIdCollection;
420

421
  /** Tax and discount details for the computed total amount. */
422
  @SerializedName("total_details")
423
  TotalDetails totalDetails;
424

425
  /**
426
   * The UI mode of the Session. Defaults to {@code hosted}.
427
   *
428
   * <p>One of {@code custom}, {@code embedded}, or {@code hosted}.
429
   */
430
  @SerializedName("ui_mode")
431
  String uiMode;
432

433
  /**
434
   * The URL to the Checkout Session. Redirect customers to this URL to take them to Checkout. If
435
   * you’re using <a href="https://stripe.com/docs/payments/checkout/custom-domains">Custom
436
   * Domains</a>, the URL will use your subdomain. Otherwise, it’ll use {@code checkout.stripe.com.}
437
   * This value is only present when the session is active.
438
   */
439
  @SerializedName("url")
440
  String url;
441

442
  /** Get ID of expandable {@code customer} object. */
443
  public String getCustomer() {
444
    return (this.customer != null) ? this.customer.getId() : null;
×
445
  }
446

447
  public void setCustomer(String id) {
448
    this.customer = ApiResource.setExpandableFieldId(id, this.customer);
×
449
  }
×
450

451
  /** Get expanded {@code customer}. */
452
  public Customer getCustomerObject() {
453
    return (this.customer != null) ? this.customer.getExpanded() : null;
×
454
  }
455

456
  public void setCustomerObject(Customer expandableObject) {
457
    this.customer = new ExpandableField<Customer>(expandableObject.getId(), expandableObject);
×
458
  }
×
459

460
  /** Get ID of expandable {@code invoice} object. */
461
  public String getInvoice() {
462
    return (this.invoice != null) ? this.invoice.getId() : null;
×
463
  }
464

465
  public void setInvoice(String id) {
466
    this.invoice = ApiResource.setExpandableFieldId(id, this.invoice);
×
467
  }
×
468

469
  /** Get expanded {@code invoice}. */
470
  public Invoice getInvoiceObject() {
471
    return (this.invoice != null) ? this.invoice.getExpanded() : null;
×
472
  }
473

474
  public void setInvoiceObject(Invoice expandableObject) {
475
    this.invoice = new ExpandableField<Invoice>(expandableObject.getId(), expandableObject);
×
476
  }
×
477

478
  /** Get ID of expandable {@code paymentIntent} object. */
479
  public String getPaymentIntent() {
480
    return (this.paymentIntent != null) ? this.paymentIntent.getId() : null;
×
481
  }
482

483
  public void setPaymentIntent(String id) {
484
    this.paymentIntent = ApiResource.setExpandableFieldId(id, this.paymentIntent);
×
485
  }
×
486

487
  /** Get expanded {@code paymentIntent}. */
488
  public PaymentIntent getPaymentIntentObject() {
489
    return (this.paymentIntent != null) ? this.paymentIntent.getExpanded() : null;
×
490
  }
491

492
  public void setPaymentIntentObject(PaymentIntent expandableObject) {
493
    this.paymentIntent =
×
494
        new ExpandableField<PaymentIntent>(expandableObject.getId(), expandableObject);
×
495
  }
×
496

497
  /** Get ID of expandable {@code paymentLink} object. */
498
  public String getPaymentLink() {
499
    return (this.paymentLink != null) ? this.paymentLink.getId() : null;
×
500
  }
501

502
  public void setPaymentLink(String id) {
503
    this.paymentLink = ApiResource.setExpandableFieldId(id, this.paymentLink);
×
504
  }
×
505

506
  /** Get expanded {@code paymentLink}. */
507
  public PaymentLink getPaymentLinkObject() {
508
    return (this.paymentLink != null) ? this.paymentLink.getExpanded() : null;
×
509
  }
510

511
  public void setPaymentLinkObject(PaymentLink expandableObject) {
512
    this.paymentLink = new ExpandableField<PaymentLink>(expandableObject.getId(), expandableObject);
×
513
  }
×
514

515
  /** Get ID of expandable {@code setupIntent} object. */
516
  public String getSetupIntent() {
517
    return (this.setupIntent != null) ? this.setupIntent.getId() : null;
×
518
  }
519

520
  public void setSetupIntent(String id) {
521
    this.setupIntent = ApiResource.setExpandableFieldId(id, this.setupIntent);
×
522
  }
×
523

524
  /** Get expanded {@code setupIntent}. */
525
  public SetupIntent getSetupIntentObject() {
526
    return (this.setupIntent != null) ? this.setupIntent.getExpanded() : null;
×
527
  }
528

529
  public void setSetupIntentObject(SetupIntent expandableObject) {
530
    this.setupIntent = new ExpandableField<SetupIntent>(expandableObject.getId(), expandableObject);
×
531
  }
×
532

533
  /** Get ID of expandable {@code subscription} object. */
534
  public String getSubscription() {
535
    return (this.subscription != null) ? this.subscription.getId() : null;
×
536
  }
537

538
  public void setSubscription(String id) {
539
    this.subscription = ApiResource.setExpandableFieldId(id, this.subscription);
×
540
  }
×
541

542
  /** Get expanded {@code subscription}. */
543
  public Subscription getSubscriptionObject() {
544
    return (this.subscription != null) ? this.subscription.getExpanded() : null;
×
545
  }
546

547
  public void setSubscriptionObject(Subscription expandableObject) {
548
    this.subscription =
×
549
        new ExpandableField<Subscription>(expandableObject.getId(), expandableObject);
×
550
  }
×
551

552
  /** Creates a Session object. */
553
  public static Session create(Map<String, Object> params) throws StripeException {
554
    return create(params, (RequestOptions) null);
×
555
  }
556

557
  /** Creates a Session object. */
558
  public static Session create(Map<String, Object> params, RequestOptions options)
559
      throws StripeException {
560
    String path = "/v1/checkout/sessions";
×
561
    ApiRequest request =
×
562
        new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.POST, path, params, options);
563
    return getGlobalResponseGetter().request(request, Session.class);
×
564
  }
565

566
  /** Creates a Session object. */
567
  public static Session create(SessionCreateParams params) throws StripeException {
568
    return create(params, (RequestOptions) null);
1✔
569
  }
570

571
  /** Creates a Session object. */
572
  public static Session create(SessionCreateParams params, RequestOptions options)
573
      throws StripeException {
574
    String path = "/v1/checkout/sessions";
1✔
575
    ApiResource.checkNullTypedParams(path, params);
1✔
576
    ApiRequest request =
1✔
577
        new ApiRequest(
578
            BaseAddress.API,
579
            ApiResource.RequestMethod.POST,
580
            path,
581
            ApiRequestParams.paramsToMap(params),
1✔
582
            options);
583
    return getGlobalResponseGetter().request(request, Session.class);
1✔
584
  }
585

586
  /**
587
   * A Session can be expired when it is in one of these statuses: {@code open}
588
   *
589
   * <p>After it expires, a customer can’t complete a Session and customers loading the Session see
590
   * a message saying the Session is expired.
591
   */
592
  public Session expire() throws StripeException {
593
    return expire((Map<String, Object>) null, (RequestOptions) null);
×
594
  }
595

596
  /**
597
   * A Session can be expired when it is in one of these statuses: {@code open}
598
   *
599
   * <p>After it expires, a customer can’t complete a Session and customers loading the Session see
600
   * a message saying the Session is expired.
601
   */
602
  public Session expire(RequestOptions options) throws StripeException {
603
    return expire((Map<String, Object>) null, options);
×
604
  }
605

606
  /**
607
   * A Session can be expired when it is in one of these statuses: {@code open}
608
   *
609
   * <p>After it expires, a customer can’t complete a Session and customers loading the Session see
610
   * a message saying the Session is expired.
611
   */
612
  public Session expire(Map<String, Object> params) throws StripeException {
613
    return expire(params, (RequestOptions) null);
×
614
  }
615

616
  /**
617
   * A Session can be expired when it is in one of these statuses: {@code open}
618
   *
619
   * <p>After it expires, a customer can’t complete a Session and customers loading the Session see
620
   * a message saying the Session is expired.
621
   */
622
  public Session expire(Map<String, Object> params, RequestOptions options) throws StripeException {
623
    String path =
×
624
        String.format("/v1/checkout/sessions/%s/expire", ApiResource.urlEncodeId(this.getId()));
×
625
    ApiRequest request =
×
626
        new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.POST, path, params, options);
627
    return getResponseGetter().request(request, Session.class);
×
628
  }
629

630
  /**
631
   * A Session can be expired when it is in one of these statuses: {@code open}
632
   *
633
   * <p>After it expires, a customer can’t complete a Session and customers loading the Session see
634
   * a message saying the Session is expired.
635
   */
636
  public Session expire(SessionExpireParams params) throws StripeException {
637
    return expire(params, (RequestOptions) null);
1✔
638
  }
639

640
  /**
641
   * A Session can be expired when it is in one of these statuses: {@code open}
642
   *
643
   * <p>After it expires, a customer can’t complete a Session and customers loading the Session see
644
   * a message saying the Session is expired.
645
   */
646
  public Session expire(SessionExpireParams params, RequestOptions options) throws StripeException {
647
    String path =
1✔
648
        String.format("/v1/checkout/sessions/%s/expire", ApiResource.urlEncodeId(this.getId()));
1✔
649
    ApiResource.checkNullTypedParams(path, params);
1✔
650
    ApiRequest request =
1✔
651
        new ApiRequest(
652
            BaseAddress.API,
653
            ApiResource.RequestMethod.POST,
654
            path,
655
            ApiRequestParams.paramsToMap(params),
1✔
656
            options);
657
    return getResponseGetter().request(request, Session.class);
1✔
658
  }
659

660
  /** Returns a list of Checkout Sessions. */
661
  public static SessionCollection list(Map<String, Object> params) throws StripeException {
662
    return list(params, (RequestOptions) null);
×
663
  }
664

665
  /** Returns a list of Checkout Sessions. */
666
  public static SessionCollection list(Map<String, Object> params, RequestOptions options)
667
      throws StripeException {
668
    String path = "/v1/checkout/sessions";
×
669
    ApiRequest request =
×
670
        new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.GET, path, params, options);
671
    return getGlobalResponseGetter().request(request, SessionCollection.class);
×
672
  }
673

674
  /** Returns a list of Checkout Sessions. */
675
  public static SessionCollection list(SessionListParams params) throws StripeException {
676
    return list(params, (RequestOptions) null);
1✔
677
  }
678

679
  /** Returns a list of Checkout Sessions. */
680
  public static SessionCollection list(SessionListParams params, RequestOptions options)
681
      throws StripeException {
682
    String path = "/v1/checkout/sessions";
1✔
683
    ApiResource.checkNullTypedParams(path, params);
1✔
684
    ApiRequest request =
1✔
685
        new ApiRequest(
686
            BaseAddress.API,
687
            ApiResource.RequestMethod.GET,
688
            path,
689
            ApiRequestParams.paramsToMap(params),
1✔
690
            options);
691
    return getGlobalResponseGetter().request(request, SessionCollection.class);
1✔
692
  }
693

694
  /**
695
   * When retrieving a Checkout Session, there is an includable <strong>line_items</strong> property
696
   * containing the first handful of those items. There is also a URL where you can retrieve the
697
   * full (paginated) list of line items.
698
   */
699
  public LineItemCollection listLineItems() throws StripeException {
700
    return listLineItems((Map<String, Object>) null, (RequestOptions) null);
×
701
  }
702

703
  /**
704
   * When retrieving a Checkout Session, there is an includable <strong>line_items</strong> property
705
   * containing the first handful of those items. There is also a URL where you can retrieve the
706
   * full (paginated) list of line items.
707
   */
708
  public LineItemCollection listLineItems(Map<String, Object> params) throws StripeException {
709
    return listLineItems(params, (RequestOptions) null);
×
710
  }
711

712
  /**
713
   * When retrieving a Checkout Session, there is an includable <strong>line_items</strong> property
714
   * containing the first handful of those items. There is also a URL where you can retrieve the
715
   * full (paginated) list of line items.
716
   */
717
  public LineItemCollection listLineItems(Map<String, Object> params, RequestOptions options)
718
      throws StripeException {
719
    String path =
×
720
        String.format("/v1/checkout/sessions/%s/line_items", ApiResource.urlEncodeId(this.getId()));
×
721
    ApiRequest request =
×
722
        new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.GET, path, params, options);
723
    return getResponseGetter().request(request, LineItemCollection.class);
×
724
  }
725

726
  /**
727
   * When retrieving a Checkout Session, there is an includable <strong>line_items</strong> property
728
   * containing the first handful of those items. There is also a URL where you can retrieve the
729
   * full (paginated) list of line items.
730
   */
731
  public LineItemCollection listLineItems(SessionListLineItemsParams params)
732
      throws StripeException {
733
    return listLineItems(params, (RequestOptions) null);
1✔
734
  }
735

736
  /**
737
   * When retrieving a Checkout Session, there is an includable <strong>line_items</strong> property
738
   * containing the first handful of those items. There is also a URL where you can retrieve the
739
   * full (paginated) list of line items.
740
   */
741
  public LineItemCollection listLineItems(SessionListLineItemsParams params, RequestOptions options)
742
      throws StripeException {
743
    String path =
1✔
744
        String.format("/v1/checkout/sessions/%s/line_items", ApiResource.urlEncodeId(this.getId()));
1✔
745
    ApiResource.checkNullTypedParams(path, params);
1✔
746
    ApiRequest request =
1✔
747
        new ApiRequest(
748
            BaseAddress.API,
749
            ApiResource.RequestMethod.GET,
750
            path,
751
            ApiRequestParams.paramsToMap(params),
1✔
752
            options);
753
    return getResponseGetter().request(request, LineItemCollection.class);
1✔
754
  }
755

756
  /** Retrieves a Session object. */
757
  public static Session retrieve(String session) throws StripeException {
758
    return retrieve(session, (Map<String, Object>) null, (RequestOptions) null);
1✔
759
  }
760

761
  /** Retrieves a Session object. */
762
  public static Session retrieve(String session, RequestOptions options) throws StripeException {
763
    return retrieve(session, (Map<String, Object>) null, options);
×
764
  }
765

766
  /** Retrieves a Session object. */
767
  public static Session retrieve(String session, Map<String, Object> params, RequestOptions options)
768
      throws StripeException {
769
    String path = String.format("/v1/checkout/sessions/%s", ApiResource.urlEncodeId(session));
1✔
770
    ApiRequest request =
1✔
771
        new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.GET, path, params, options);
772
    return getGlobalResponseGetter().request(request, Session.class);
1✔
773
  }
774

775
  /** Retrieves a Session object. */
776
  public static Session retrieve(
777
      String session, SessionRetrieveParams params, RequestOptions options) throws StripeException {
778
    String path = String.format("/v1/checkout/sessions/%s", ApiResource.urlEncodeId(session));
×
779
    ApiResource.checkNullTypedParams(path, params);
×
780
    ApiRequest request =
×
781
        new ApiRequest(
782
            BaseAddress.API,
783
            ApiResource.RequestMethod.GET,
784
            path,
785
            ApiRequestParams.paramsToMap(params),
×
786
            options);
787
    return getGlobalResponseGetter().request(request, Session.class);
×
788
  }
789

790
  /** Updates a Session object. */
791
  @Override
792
  public Session update(Map<String, Object> params) throws StripeException {
793
    return update(params, (RequestOptions) null);
×
794
  }
795

796
  /** Updates a Session object. */
797
  @Override
798
  public Session update(Map<String, Object> params, RequestOptions options) throws StripeException {
799
    String path = String.format("/v1/checkout/sessions/%s", ApiResource.urlEncodeId(this.getId()));
×
800
    ApiRequest request =
×
801
        new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.POST, path, params, options);
802
    return getResponseGetter().request(request, Session.class);
×
803
  }
804

805
  /** Updates a Session object. */
806
  public Session update(SessionUpdateParams params) throws StripeException {
807
    return update(params, (RequestOptions) null);
×
808
  }
809

810
  /** Updates a Session object. */
811
  public Session update(SessionUpdateParams params, RequestOptions options) throws StripeException {
812
    String path = String.format("/v1/checkout/sessions/%s", ApiResource.urlEncodeId(this.getId()));
×
813
    ApiResource.checkNullTypedParams(path, params);
×
814
    ApiRequest request =
×
815
        new ApiRequest(
816
            BaseAddress.API,
817
            ApiResource.RequestMethod.POST,
818
            path,
819
            ApiRequestParams.paramsToMap(params),
×
820
            options);
821
    return getResponseGetter().request(request, Session.class);
×
822
  }
823

824
  /**
825
   * For more details about AdaptivePricing, please refer to the <a
826
   * href="https://docs.stripe.com/api">API Reference.</a>
827
   */
828
  @Getter
829
  @Setter
830
  @EqualsAndHashCode(callSuper = false)
NEW
831
  public static class AdaptivePricing extends StripeObject {
×
832
    /** Whether Adaptive Pricing is enabled. */
833
    @SerializedName("enabled")
834
    Boolean enabled;
835
  }
836

837
  /**
838
   * For more details about AfterExpiration, please refer to the <a
839
   * href="https://docs.stripe.com/api">API Reference.</a>
840
   */
841
  @Getter
842
  @Setter
843
  @EqualsAndHashCode(callSuper = false)
844
  public static class AfterExpiration extends StripeObject {
×
845
    /** When set, configuration used to recover the Checkout Session on expiry. */
846
    @SerializedName("recovery")
847
    Recovery recovery;
848

849
    /**
850
     * For more details about Recovery, please refer to the <a
851
     * href="https://docs.stripe.com/api">API Reference.</a>
852
     */
853
    @Getter
854
    @Setter
855
    @EqualsAndHashCode(callSuper = false)
856
    public static class Recovery extends StripeObject {
×
857
      /**
858
       * Enables user redeemable promotion codes on the recovered Checkout Sessions. Defaults to
859
       * {@code false}
860
       */
861
      @SerializedName("allow_promotion_codes")
862
      Boolean allowPromotionCodes;
863

864
      /**
865
       * If {@code true}, a recovery url will be generated to recover this Checkout Session if it
866
       * expires before a transaction is completed. It will be attached to the Checkout Session
867
       * object upon expiration.
868
       */
869
      @SerializedName("enabled")
870
      Boolean enabled;
871

872
      /** The timestamp at which the recovery URL will expire. */
873
      @SerializedName("expires_at")
874
      Long expiresAt;
875

876
      /**
877
       * URL that creates a new Checkout Session when clicked that is a copy of this expired
878
       * Checkout Session.
879
       */
880
      @SerializedName("url")
881
      String url;
882
    }
883
  }
884

885
  /**
886
   * For more details about AutomaticTax, please refer to the <a
887
   * href="https://docs.stripe.com/api">API Reference.</a>
888
   */
889
  @Getter
890
  @Setter
891
  @EqualsAndHashCode(callSuper = false)
892
  public static class AutomaticTax extends StripeObject {
1✔
893
    /** Indicates whether automatic tax is enabled for the session. */
894
    @SerializedName("enabled")
895
    Boolean enabled;
896

897
    /**
898
     * The account that's liable for tax. If set, the business address and tax registrations
899
     * required to perform the tax calculation are loaded from this account. The tax transaction is
900
     * returned in the report of the connected account.
901
     */
902
    @SerializedName("liability")
903
    Liability liability;
904

905
    /**
906
     * The status of the most recent automated tax calculation for this session.
907
     *
908
     * <p>One of {@code complete}, {@code failed}, or {@code requires_location_inputs}.
909
     */
910
    @SerializedName("status")
911
    String status;
912

913
    /**
914
     * For more details about Liability, please refer to the <a
915
     * href="https://docs.stripe.com/api">API Reference.</a>
916
     */
917
    @Getter
918
    @Setter
919
    @EqualsAndHashCode(callSuper = false)
920
    public static class Liability extends StripeObject {
×
921
      /** The connected account being referenced when {@code type} is {@code account}. */
922
      @SerializedName("account")
923
      @Getter(lombok.AccessLevel.NONE)
924
      @Setter(lombok.AccessLevel.NONE)
925
      ExpandableField<Account> account;
926

927
      /**
928
       * Type of the account referenced.
929
       *
930
       * <p>One of {@code account}, or {@code self}.
931
       */
932
      @SerializedName("type")
933
      String type;
934

935
      /** Get ID of expandable {@code account} object. */
936
      public String getAccount() {
937
        return (this.account != null) ? this.account.getId() : null;
×
938
      }
939

940
      public void setAccount(String id) {
941
        this.account = ApiResource.setExpandableFieldId(id, this.account);
×
942
      }
×
943

944
      /** Get expanded {@code account}. */
945
      public Account getAccountObject() {
946
        return (this.account != null) ? this.account.getExpanded() : null;
×
947
      }
948

949
      public void setAccountObject(Account expandableObject) {
950
        this.account = new ExpandableField<Account>(expandableObject.getId(), expandableObject);
×
951
      }
×
952
    }
953
  }
954

955
  /**
956
   * For more details about CollectedInformation, please refer to the <a
957
   * href="https://docs.stripe.com/api">API Reference.</a>
958
   */
959
  @Getter
960
  @Setter
961
  @EqualsAndHashCode(callSuper = false)
962
  public static class CollectedInformation extends StripeObject {
×
963
    /** Customer’s business name for this Checkout Session. */
964
    @SerializedName("business_name")
965
    String businessName;
966

967
    /** Customer’s email for this Checkout Session. */
968
    @SerializedName("email")
969
    String email;
970

971
    /** Customer’s phone number for this Checkout Session. */
972
    @SerializedName("phone")
973
    String phone;
974

975
    /** Shipping information for this Checkout Session. */
976
    @SerializedName("shipping_details")
977
    ShippingDetails shippingDetails;
978

979
    /** Customer’s tax ids for this Checkout Session. */
980
    @SerializedName("tax_ids")
981
    List<Session.CollectedInformation.TaxId> taxIds;
982

983
    /**
984
     * For more details about TaxId, please refer to the <a href="https://docs.stripe.com/api">API
985
     * Reference.</a>
986
     */
987
    @Getter
988
    @Setter
989
    @EqualsAndHashCode(callSuper = false)
990
    public static class TaxId extends StripeObject {
×
991
      /**
992
       * The type of the tax ID, one of {@code ad_nrt}, {@code ar_cuit}, {@code eu_vat}, {@code
993
       * bo_tin}, {@code br_cnpj}, {@code br_cpf}, {@code cn_tin}, {@code co_nit}, {@code cr_tin},
994
       * {@code do_rcn}, {@code ec_ruc}, {@code eu_oss_vat}, {@code hr_oib}, {@code pe_ruc}, {@code
995
       * ro_tin}, {@code rs_pib}, {@code sv_nit}, {@code uy_ruc}, {@code ve_rif}, {@code vn_tin},
996
       * {@code gb_vat}, {@code nz_gst}, {@code au_abn}, {@code au_arn}, {@code in_gst}, {@code
997
       * no_vat}, {@code no_voec}, {@code za_vat}, {@code ch_vat}, {@code mx_rfc}, {@code sg_uen},
998
       * {@code ru_inn}, {@code ru_kpp}, {@code ca_bn}, {@code hk_br}, {@code es_cif}, {@code
999
       * tw_vat}, {@code th_vat}, {@code jp_cn}, {@code jp_rn}, {@code jp_trn}, {@code li_uid},
1000
       * {@code li_vat}, {@code my_itn}, {@code us_ein}, {@code kr_brn}, {@code ca_qst}, {@code
1001
       * ca_gst_hst}, {@code ca_pst_bc}, {@code ca_pst_mb}, {@code ca_pst_sk}, {@code my_sst},
1002
       * {@code sg_gst}, {@code ae_trn}, {@code cl_tin}, {@code sa_vat}, {@code id_npwp}, {@code
1003
       * my_frp}, {@code il_vat}, {@code ge_vat}, {@code ua_vat}, {@code is_vat}, {@code bg_uic},
1004
       * {@code hu_tin}, {@code si_tin}, {@code ke_pin}, {@code tr_tin}, {@code eg_tin}, {@code
1005
       * ph_tin}, {@code bh_vat}, {@code kz_bin}, {@code ng_tin}, {@code om_vat}, {@code de_stn},
1006
       * {@code ch_uid}, {@code tz_vat}, {@code uz_vat}, {@code uz_tin}, {@code md_vat}, {@code
1007
       * ma_vat}, {@code by_tin}, or {@code unknown}.
1008
       */
1009
      @SerializedName("type")
1010
      String type;
1011

1012
      /** The value of the tax ID. */
1013
      @SerializedName("value")
1014
      String value;
1015
    }
1016
  }
1017

1018
  /**
1019
   * For more details about Consent, please refer to the <a href="https://docs.stripe.com/api">API
1020
   * Reference.</a>
1021
   */
1022
  @Getter
1023
  @Setter
1024
  @EqualsAndHashCode(callSuper = false)
1025
  public static class Consent extends StripeObject {
×
1026
    /**
1027
     * If {@code opt_in}, the customer consents to receiving promotional communications from the
1028
     * merchant about this Checkout Session.
1029
     *
1030
     * <p>One of {@code opt_in}, or {@code opt_out}.
1031
     */
1032
    @SerializedName("promotions")
1033
    String promotions;
1034

1035
    /**
1036
     * If {@code accepted}, the customer in this Checkout Session has agreed to the merchant's terms
1037
     * of service.
1038
     *
1039
     * <p>Equal to {@code accepted}.
1040
     */
1041
    @SerializedName("terms_of_service")
1042
    String termsOfService;
1043
  }
1044

1045
  /**
1046
   * For more details about ConsentCollection, please refer to the <a
1047
   * href="https://docs.stripe.com/api">API Reference.</a>
1048
   */
1049
  @Getter
1050
  @Setter
1051
  @EqualsAndHashCode(callSuper = false)
1052
  public static class ConsentCollection extends StripeObject {
×
1053
    /**
1054
     * If set to {@code hidden}, it will hide legal text related to the reuse of a payment method.
1055
     */
1056
    @SerializedName("payment_method_reuse_agreement")
1057
    PaymentMethodReuseAgreement paymentMethodReuseAgreement;
1058

1059
    /**
1060
     * If set to {@code auto}, enables the collection of customer consent for promotional
1061
     * communications. The Checkout Session will determine whether to display an option to opt into
1062
     * promotional communication from the merchant depending on the customer's locale. Only
1063
     * available to US merchants.
1064
     *
1065
     * <p>One of {@code auto}, or {@code none}.
1066
     */
1067
    @SerializedName("promotions")
1068
    String promotions;
1069

1070
    /**
1071
     * If set to {@code required}, it requires customers to accept the terms of service before being
1072
     * able to pay.
1073
     *
1074
     * <p>One of {@code none}, or {@code required}.
1075
     */
1076
    @SerializedName("terms_of_service")
1077
    String termsOfService;
1078

1079
    /**
1080
     * For more details about PaymentMethodReuseAgreement, please refer to the <a
1081
     * href="https://docs.stripe.com/api">API Reference.</a>
1082
     */
1083
    @Getter
1084
    @Setter
1085
    @EqualsAndHashCode(callSuper = false)
1086
    public static class PaymentMethodReuseAgreement extends StripeObject {
×
1087
      /**
1088
       * Determines the position and visibility of the payment method reuse agreement in the UI.
1089
       * When set to {@code auto}, Stripe's defaults will be used.
1090
       *
1091
       * <p>When set to {@code hidden}, the payment method reuse agreement text will always be
1092
       * hidden in the UI.
1093
       *
1094
       * <p>One of {@code auto}, or {@code hidden}.
1095
       */
1096
      @SerializedName("position")
1097
      String position;
1098
    }
1099
  }
1100

1101
  /**
1102
   * For more details about CurrencyConversion, please refer to the <a
1103
   * href="https://docs.stripe.com/api">API Reference.</a>
1104
   */
1105
  @Getter
1106
  @Setter
1107
  @EqualsAndHashCode(callSuper = false)
1108
  public static class CurrencyConversion extends StripeObject {
×
1109
    /** Total of all items in source currency before discounts or taxes are applied. */
1110
    @SerializedName("amount_subtotal")
1111
    Long amountSubtotal;
1112

1113
    /** Total of all items in source currency after discounts and taxes are applied. */
1114
    @SerializedName("amount_total")
1115
    Long amountTotal;
1116

1117
    /** Exchange rate used to convert source currency amounts to customer currency amounts. */
1118
    @SerializedName("fx_rate")
1119
    BigDecimal fxRate;
1120

1121
    /** Creation currency of the CheckoutSession before localization. */
1122
    @SerializedName("source_currency")
1123
    String sourceCurrency;
1124
  }
1125

1126
  /**
1127
   * For more details about CustomField, please refer to the <a
1128
   * href="https://docs.stripe.com/api">API Reference.</a>
1129
   */
1130
  @Getter
1131
  @Setter
1132
  @EqualsAndHashCode(callSuper = false)
1133
  public static class CustomField extends StripeObject {
×
1134
    @SerializedName("dropdown")
1135
    Dropdown dropdown;
1136

1137
    /**
1138
     * String of your choice that your integration can use to reconcile this field. Must be unique
1139
     * to this field, alphanumeric, and up to 200 characters.
1140
     */
1141
    @SerializedName("key")
1142
    String key;
1143

1144
    @SerializedName("label")
1145
    Label label;
1146

1147
    @SerializedName("numeric")
1148
    Numeric numeric;
1149

1150
    /**
1151
     * Whether the customer is required to complete the field before completing the Checkout
1152
     * Session. Defaults to {@code false}.
1153
     */
1154
    @SerializedName("optional")
1155
    Boolean optional;
1156

1157
    @SerializedName("text")
1158
    Text text;
1159

1160
    /**
1161
     * The type of the field.
1162
     *
1163
     * <p>One of {@code dropdown}, {@code numeric}, or {@code text}.
1164
     */
1165
    @SerializedName("type")
1166
    String type;
1167

1168
    /**
1169
     * For more details about Dropdown, please refer to the <a
1170
     * href="https://docs.stripe.com/api">API Reference.</a>
1171
     */
1172
    @Getter
1173
    @Setter
1174
    @EqualsAndHashCode(callSuper = false)
1175
    public static class Dropdown extends StripeObject {
×
1176
      /** The value that will pre-fill on the payment page. */
1177
      @SerializedName("default_value")
1178
      String defaultValue;
1179

1180
      /** The options available for the customer to select. Up to 200 options allowed. */
1181
      @SerializedName("options")
1182
      List<Session.CustomField.Dropdown.Option> options;
1183

1184
      /** The option selected by the customer. This will be the {@code value} for the option. */
1185
      @SerializedName("value")
1186
      String value;
1187

1188
      /**
1189
       * For more details about Option, please refer to the <a
1190
       * href="https://docs.stripe.com/api">API Reference.</a>
1191
       */
1192
      @Getter
1193
      @Setter
1194
      @EqualsAndHashCode(callSuper = false)
1195
      public static class Option extends StripeObject {
×
1196
        /** The label for the option, displayed to the customer. Up to 100 characters. */
1197
        @SerializedName("label")
1198
        String label;
1199

1200
        /**
1201
         * The value for this option, not displayed to the customer, used by your integration to
1202
         * reconcile the option selected by the customer. Must be unique to this option,
1203
         * alphanumeric, and up to 100 characters.
1204
         */
1205
        @SerializedName("value")
1206
        String value;
1207
      }
1208
    }
1209

1210
    /**
1211
     * For more details about Label, please refer to the <a href="https://docs.stripe.com/api">API
1212
     * Reference.</a>
1213
     */
1214
    @Getter
1215
    @Setter
1216
    @EqualsAndHashCode(callSuper = false)
1217
    public static class Label extends StripeObject {
×
1218
      /** Custom text for the label, displayed to the customer. Up to 50 characters. */
1219
      @SerializedName("custom")
1220
      String custom;
1221

1222
      /**
1223
       * The type of the label.
1224
       *
1225
       * <p>Equal to {@code custom}.
1226
       */
1227
      @SerializedName("type")
1228
      String type;
1229
    }
1230

1231
    /**
1232
     * For more details about Numeric, please refer to the <a href="https://docs.stripe.com/api">API
1233
     * Reference.</a>
1234
     */
1235
    @Getter
1236
    @Setter
1237
    @EqualsAndHashCode(callSuper = false)
1238
    public static class Numeric extends StripeObject {
×
1239
      /** The value that will pre-fill the field on the payment page. */
1240
      @SerializedName("default_value")
1241
      String defaultValue;
1242

1243
      /** The maximum character length constraint for the customer's input. */
1244
      @SerializedName("maximum_length")
1245
      Long maximumLength;
1246

1247
      /** The minimum character length requirement for the customer's input. */
1248
      @SerializedName("minimum_length")
1249
      Long minimumLength;
1250

1251
      /** The value entered by the customer, containing only digits. */
1252
      @SerializedName("value")
1253
      String value;
1254
    }
1255

1256
    /**
1257
     * For more details about Text, please refer to the <a href="https://docs.stripe.com/api">API
1258
     * Reference.</a>
1259
     */
1260
    @Getter
1261
    @Setter
1262
    @EqualsAndHashCode(callSuper = false)
1263
    public static class Text extends StripeObject {
×
1264
      /** The value that will pre-fill the field on the payment page. */
1265
      @SerializedName("default_value")
1266
      String defaultValue;
1267

1268
      /** The maximum character length constraint for the customer's input. */
1269
      @SerializedName("maximum_length")
1270
      Long maximumLength;
1271

1272
      /** The minimum character length requirement for the customer's input. */
1273
      @SerializedName("minimum_length")
1274
      Long minimumLength;
1275

1276
      /** The value entered by the customer. */
1277
      @SerializedName("value")
1278
      String value;
1279
    }
1280
  }
1281

1282
  /**
1283
   * For more details about CustomText, please refer to the <a
1284
   * href="https://docs.stripe.com/api">API Reference.</a>
1285
   */
1286
  @Getter
1287
  @Setter
1288
  @EqualsAndHashCode(callSuper = false)
1289
  public static class CustomText extends StripeObject {
1✔
1290
    /** Custom text that should be displayed after the payment confirmation button. */
1291
    @SerializedName("after_submit")
1292
    AfterSubmit afterSubmit;
1293

1294
    /** Custom text that should be displayed alongside shipping address collection. */
1295
    @SerializedName("shipping_address")
1296
    ShippingAddress shippingAddress;
1297

1298
    /** Custom text that should be displayed alongside the payment confirmation button. */
1299
    @SerializedName("submit")
1300
    Submit submit;
1301

1302
    /**
1303
     * Custom text that should be displayed in place of the default terms of service agreement text.
1304
     */
1305
    @SerializedName("terms_of_service_acceptance")
1306
    TermsOfServiceAcceptance termsOfServiceAcceptance;
1307

1308
    /**
1309
     * For more details about AfterSubmit, please refer to the <a
1310
     * href="https://docs.stripe.com/api">API Reference.</a>
1311
     */
1312
    @Getter
1313
    @Setter
1314
    @EqualsAndHashCode(callSuper = false)
1315
    public static class AfterSubmit extends StripeObject {
×
1316
      /** Text may be up to 1200 characters in length. */
1317
      @SerializedName("message")
1318
      String message;
1319
    }
1320

1321
    /**
1322
     * For more details about ShippingAddress, please refer to the <a
1323
     * href="https://docs.stripe.com/api">API Reference.</a>
1324
     */
1325
    @Getter
1326
    @Setter
1327
    @EqualsAndHashCode(callSuper = false)
1328
    public static class ShippingAddress extends StripeObject {
×
1329
      /** Text may be up to 1200 characters in length. */
1330
      @SerializedName("message")
1331
      String message;
1332
    }
1333

1334
    /**
1335
     * For more details about Submit, please refer to the <a href="https://docs.stripe.com/api">API
1336
     * Reference.</a>
1337
     */
1338
    @Getter
1339
    @Setter
1340
    @EqualsAndHashCode(callSuper = false)
1341
    public static class Submit extends StripeObject {
×
1342
      /** Text may be up to 1200 characters in length. */
1343
      @SerializedName("message")
1344
      String message;
1345
    }
1346

1347
    /**
1348
     * For more details about TermsOfServiceAcceptance, please refer to the <a
1349
     * href="https://docs.stripe.com/api">API Reference.</a>
1350
     */
1351
    @Getter
1352
    @Setter
1353
    @EqualsAndHashCode(callSuper = false)
1354
    public static class TermsOfServiceAcceptance extends StripeObject {
×
1355
      /** Text may be up to 1200 characters in length. */
1356
      @SerializedName("message")
1357
      String message;
1358
    }
1359
  }
1360

1361
  /**
1362
   * For more details about CustomerDetails, please refer to the <a
1363
   * href="https://docs.stripe.com/api">API Reference.</a>
1364
   */
1365
  @Getter
1366
  @Setter
1367
  @EqualsAndHashCode(callSuper = false)
1368
  public static class CustomerDetails extends StripeObject {
1✔
1369
    /**
1370
     * The customer's address after a completed Checkout Session. Note: This property is populated
1371
     * only for sessions on or after March 30, 2022.
1372
     */
1373
    @SerializedName("address")
1374
    Address address;
1375

1376
    /**
1377
     * The email associated with the Customer, if one exists, on the Checkout Session after a
1378
     * completed Checkout Session or at time of session expiry. Otherwise, if the customer has
1379
     * consented to promotional content, this value is the most recent valid email provided by the
1380
     * customer on the Checkout form.
1381
     */
1382
    @SerializedName("email")
1383
    String email;
1384

1385
    /**
1386
     * The customer's name after a completed Checkout Session. Note: This property is populated only
1387
     * for sessions on or after March 30, 2022.
1388
     */
1389
    @SerializedName("name")
1390
    String name;
1391

1392
    /** The customer's phone number after a completed Checkout Session. */
1393
    @SerializedName("phone")
1394
    String phone;
1395

1396
    /**
1397
     * The customer’s tax exempt status after a completed Checkout Session.
1398
     *
1399
     * <p>One of {@code exempt}, {@code none}, or {@code reverse}.
1400
     */
1401
    @SerializedName("tax_exempt")
1402
    String taxExempt;
1403

1404
    /** The customer’s tax IDs after a completed Checkout Session. */
1405
    @SerializedName("tax_ids")
1406
    List<Session.CustomerDetails.TaxId> taxIds;
1407

1408
    /**
1409
     * For more details about TaxId, please refer to the <a href="https://docs.stripe.com/api">API
1410
     * Reference.</a>
1411
     */
1412
    @Getter
1413
    @Setter
1414
    @EqualsAndHashCode(callSuper = false)
1415
    public static class TaxId extends StripeObject {
×
1416
      /**
1417
       * The type of the tax ID, one of {@code ad_nrt}, {@code ar_cuit}, {@code eu_vat}, {@code
1418
       * bo_tin}, {@code br_cnpj}, {@code br_cpf}, {@code cn_tin}, {@code co_nit}, {@code cr_tin},
1419
       * {@code do_rcn}, {@code ec_ruc}, {@code eu_oss_vat}, {@code hr_oib}, {@code pe_ruc}, {@code
1420
       * ro_tin}, {@code rs_pib}, {@code sv_nit}, {@code uy_ruc}, {@code ve_rif}, {@code vn_tin},
1421
       * {@code gb_vat}, {@code nz_gst}, {@code au_abn}, {@code au_arn}, {@code in_gst}, {@code
1422
       * no_vat}, {@code no_voec}, {@code za_vat}, {@code ch_vat}, {@code mx_rfc}, {@code sg_uen},
1423
       * {@code ru_inn}, {@code ru_kpp}, {@code ca_bn}, {@code hk_br}, {@code es_cif}, {@code
1424
       * tw_vat}, {@code th_vat}, {@code jp_cn}, {@code jp_rn}, {@code jp_trn}, {@code li_uid},
1425
       * {@code li_vat}, {@code my_itn}, {@code us_ein}, {@code kr_brn}, {@code ca_qst}, {@code
1426
       * ca_gst_hst}, {@code ca_pst_bc}, {@code ca_pst_mb}, {@code ca_pst_sk}, {@code my_sst},
1427
       * {@code sg_gst}, {@code ae_trn}, {@code cl_tin}, {@code sa_vat}, {@code id_npwp}, {@code
1428
       * my_frp}, {@code il_vat}, {@code ge_vat}, {@code ua_vat}, {@code is_vat}, {@code bg_uic},
1429
       * {@code hu_tin}, {@code si_tin}, {@code ke_pin}, {@code tr_tin}, {@code eg_tin}, {@code
1430
       * ph_tin}, {@code bh_vat}, {@code kz_bin}, {@code ng_tin}, {@code om_vat}, {@code de_stn},
1431
       * {@code ch_uid}, {@code tz_vat}, {@code uz_vat}, {@code uz_tin}, {@code md_vat}, {@code
1432
       * ma_vat}, {@code by_tin}, or {@code unknown}.
1433
       */
1434
      @SerializedName("type")
1435
      String type;
1436

1437
      /** The value of the tax ID. */
1438
      @SerializedName("value")
1439
      String value;
1440
    }
1441
  }
1442

1443
  /**
1444
   * For more details about InvoiceCreation, please refer to the <a
1445
   * href="https://docs.stripe.com/api">API Reference.</a>
1446
   */
1447
  @Getter
1448
  @Setter
1449
  @EqualsAndHashCode(callSuper = false)
1450
  public static class InvoiceCreation extends StripeObject {
×
1451
    /** Indicates whether invoice creation is enabled for the Checkout Session. */
1452
    @SerializedName("enabled")
1453
    Boolean enabled;
1454

1455
    @SerializedName("invoice_data")
1456
    InvoiceData invoiceData;
1457

1458
    /**
1459
     * For more details about InvoiceData, please refer to the <a
1460
     * href="https://docs.stripe.com/api">API Reference.</a>
1461
     */
1462
    @Getter
1463
    @Setter
1464
    @EqualsAndHashCode(callSuper = false)
1465
    public static class InvoiceData extends StripeObject {
×
1466
      /** The account tax IDs associated with the invoice. */
1467
      @SerializedName("account_tax_ids")
1468
      List<ExpandableField<com.stripe.model.TaxId>> accountTaxIds;
1469

1470
      /** Custom fields displayed on the invoice. */
1471
      @SerializedName("custom_fields")
1472
      List<Session.InvoiceCreation.InvoiceData.CustomField> customFields;
1473

1474
      /** An arbitrary string attached to the object. Often useful for displaying to users. */
1475
      @SerializedName("description")
1476
      String description;
1477

1478
      /** Footer displayed on the invoice. */
1479
      @SerializedName("footer")
1480
      String footer;
1481

1482
      /**
1483
       * The connected account that issues the invoice. The invoice is presented with the branding
1484
       * and support information of the specified account.
1485
       */
1486
      @SerializedName("issuer")
1487
      Issuer issuer;
1488

1489
      /**
1490
       * Set of <a href="https://stripe.com/docs/api/metadata">key-value pairs</a> that you can
1491
       * attach to an object. This can be useful for storing additional information about the object
1492
       * in a structured format.
1493
       */
1494
      @SerializedName("metadata")
1495
      Map<String, String> metadata;
1496

1497
      /** Options for invoice PDF rendering. */
1498
      @SerializedName("rendering_options")
1499
      RenderingOptions renderingOptions;
1500

1501
      /** Get IDs of expandable {@code accountTaxIds} object list. */
1502
      public List<String> getAccountTaxIds() {
1503
        return (this.accountTaxIds != null)
×
1504
            ? this.accountTaxIds.stream().map(x -> x.getId()).collect(Collectors.toList())
×
1505
            : null;
×
1506
      }
1507

1508
      public void setAccountTaxIds(List<String> ids) {
1509
        if (ids == null) {
×
1510
          this.accountTaxIds = null;
×
1511
          return;
×
1512
        }
1513
        if (this.accountTaxIds != null
×
1514
            && this.accountTaxIds.stream()
×
1515
                .map(x -> x.getId())
×
1516
                .collect(Collectors.toList())
×
1517
                .equals(ids)) {
×
1518
          // noop if the ids are equal to what are already present
1519
          return;
×
1520
        }
1521
        this.accountTaxIds =
×
1522
            (ids != null)
×
1523
                ? ids.stream()
×
1524
                    .map(id -> new ExpandableField<com.stripe.model.TaxId>(id, null))
×
1525
                    .collect(Collectors.toList())
×
1526
                : null;
×
1527
      }
×
1528

1529
      /** Get expanded {@code accountTaxIds}. */
1530
      public List<com.stripe.model.TaxId> getAccountTaxIdObjects() {
1531
        return (this.accountTaxIds != null)
×
1532
            ? this.accountTaxIds.stream().map(x -> x.getExpanded()).collect(Collectors.toList())
×
1533
            : null;
×
1534
      }
1535

1536
      public void setAccountTaxIdObjects(List<com.stripe.model.TaxId> objs) {
1537
        this.accountTaxIds =
×
1538
            objs != null
×
1539
                ? objs.stream()
×
1540
                    .map(x -> new ExpandableField<com.stripe.model.TaxId>(x.getId(), x))
×
1541
                    .collect(Collectors.toList())
×
1542
                : null;
×
1543
      }
×
1544

1545
      /**
1546
       * For more details about CustomField, please refer to the <a
1547
       * href="https://docs.stripe.com/api">API Reference.</a>
1548
       */
1549
      @Getter
1550
      @Setter
1551
      @EqualsAndHashCode(callSuper = false)
1552
      public static class CustomField extends StripeObject {
×
1553
        /** The name of the custom field. */
1554
        @SerializedName("name")
1555
        String name;
1556

1557
        /** The value of the custom field. */
1558
        @SerializedName("value")
1559
        String value;
1560
      }
1561

1562
      /**
1563
       * For more details about Issuer, please refer to the <a
1564
       * href="https://docs.stripe.com/api">API Reference.</a>
1565
       */
1566
      @Getter
1567
      @Setter
1568
      @EqualsAndHashCode(callSuper = false)
1569
      public static class Issuer extends StripeObject {
×
1570
        /** The connected account being referenced when {@code type} is {@code account}. */
1571
        @SerializedName("account")
1572
        @Getter(lombok.AccessLevel.NONE)
1573
        @Setter(lombok.AccessLevel.NONE)
1574
        ExpandableField<Account> account;
1575

1576
        /**
1577
         * Type of the account referenced.
1578
         *
1579
         * <p>One of {@code account}, or {@code self}.
1580
         */
1581
        @SerializedName("type")
1582
        String type;
1583

1584
        /** Get ID of expandable {@code account} object. */
1585
        public String getAccount() {
1586
          return (this.account != null) ? this.account.getId() : null;
×
1587
        }
1588

1589
        public void setAccount(String id) {
1590
          this.account = ApiResource.setExpandableFieldId(id, this.account);
×
1591
        }
×
1592

1593
        /** Get expanded {@code account}. */
1594
        public Account getAccountObject() {
1595
          return (this.account != null) ? this.account.getExpanded() : null;
×
1596
        }
1597

1598
        public void setAccountObject(Account expandableObject) {
1599
          this.account = new ExpandableField<Account>(expandableObject.getId(), expandableObject);
×
1600
        }
×
1601
      }
1602

1603
      /**
1604
       * For more details about RenderingOptions, please refer to the <a
1605
       * href="https://docs.stripe.com/api">API Reference.</a>
1606
       */
1607
      @Getter
1608
      @Setter
1609
      @EqualsAndHashCode(callSuper = false)
1610
      public static class RenderingOptions extends StripeObject {
×
1611
        /**
1612
         * How line-item prices and amounts will be displayed with respect to tax on invoice PDFs.
1613
         */
1614
        @SerializedName("amount_tax_display")
1615
        String amountTaxDisplay;
1616
      }
1617
    }
1618
  }
1619

1620
  /**
1621
   * For more details about PaymentMethodConfigurationDetails, please refer to the <a
1622
   * href="https://docs.stripe.com/api">API Reference.</a>
1623
   */
1624
  @Getter
1625
  @Setter
1626
  @EqualsAndHashCode(callSuper = false)
1627
  public static class PaymentMethodConfigurationDetails extends StripeObject implements HasId {
×
1628
    /** ID of the payment method configuration used. */
1629
    @Getter(onMethod_ = {@Override})
1630
    @SerializedName("id")
1631
    String id;
1632

1633
    /** ID of the parent payment method configuration used. */
1634
    @SerializedName("parent")
1635
    String parent;
1636
  }
1637

1638
  /**
1639
   * For more details about PaymentMethodOptions, please refer to the <a
1640
   * href="https://docs.stripe.com/api">API Reference.</a>
1641
   */
1642
  @Getter
1643
  @Setter
1644
  @EqualsAndHashCode(callSuper = false)
1645
  public static class PaymentMethodOptions extends StripeObject {
1✔
1646
    @SerializedName("acss_debit")
1647
    AcssDebit acssDebit;
1648

1649
    @SerializedName("affirm")
1650
    Affirm affirm;
1651

1652
    @SerializedName("afterpay_clearpay")
1653
    AfterpayClearpay afterpayClearpay;
1654

1655
    @SerializedName("alipay")
1656
    Alipay alipay;
1657

1658
    @SerializedName("amazon_pay")
1659
    AmazonPay amazonPay;
1660

1661
    @SerializedName("au_becs_debit")
1662
    AuBecsDebit auBecsDebit;
1663

1664
    @SerializedName("bacs_debit")
1665
    BacsDebit bacsDebit;
1666

1667
    @SerializedName("bancontact")
1668
    Bancontact bancontact;
1669

1670
    @SerializedName("boleto")
1671
    Boleto boleto;
1672

1673
    @SerializedName("card")
1674
    Card card;
1675

1676
    @SerializedName("cashapp")
1677
    Cashapp cashapp;
1678

1679
    @SerializedName("customer_balance")
1680
    CustomerBalance customerBalance;
1681

1682
    @SerializedName("eps")
1683
    Eps eps;
1684

1685
    @SerializedName("fpx")
1686
    Fpx fpx;
1687

1688
    @SerializedName("giropay")
1689
    Giropay giropay;
1690

1691
    @SerializedName("grabpay")
1692
    Grabpay grabpay;
1693

1694
    @SerializedName("ideal")
1695
    Ideal ideal;
1696

1697
    @SerializedName("kakao_pay")
1698
    KakaoPay kakaoPay;
1699

1700
    @SerializedName("klarna")
1701
    Klarna klarna;
1702

1703
    @SerializedName("konbini")
1704
    Konbini konbini;
1705

1706
    @SerializedName("kr_card")
1707
    KrCard krCard;
1708

1709
    @SerializedName("link")
1710
    Link link;
1711

1712
    @SerializedName("mobilepay")
1713
    Mobilepay mobilepay;
1714

1715
    @SerializedName("multibanco")
1716
    Multibanco multibanco;
1717

1718
    @SerializedName("naver_pay")
1719
    NaverPay naverPay;
1720

1721
    @SerializedName("oxxo")
1722
    Oxxo oxxo;
1723

1724
    @SerializedName("p24")
1725
    P24 p24;
1726

1727
    @SerializedName("payco")
1728
    Payco payco;
1729

1730
    @SerializedName("paynow")
1731
    Paynow paynow;
1732

1733
    @SerializedName("paypal")
1734
    Paypal paypal;
1735

1736
    @SerializedName("payto")
1737
    Payto payto;
1738

1739
    @SerializedName("pix")
1740
    Pix pix;
1741

1742
    @SerializedName("revolut_pay")
1743
    RevolutPay revolutPay;
1744

1745
    @SerializedName("samsung_pay")
1746
    SamsungPay samsungPay;
1747

1748
    @SerializedName("sepa_debit")
1749
    SepaDebit sepaDebit;
1750

1751
    @SerializedName("sofort")
1752
    Sofort sofort;
1753

1754
    @SerializedName("swish")
1755
    Swish swish;
1756

1757
    @SerializedName("us_bank_account")
1758
    UsBankAccount usBankAccount;
1759

1760
    /**
1761
     * For more details about AcssDebit, please refer to the <a
1762
     * href="https://docs.stripe.com/api">API Reference.</a>
1763
     */
1764
    @Getter
1765
    @Setter
1766
    @EqualsAndHashCode(callSuper = false)
1767
    public static class AcssDebit extends StripeObject {
×
1768
      /**
1769
       * Currency supported by the bank account. Returned when the Session is in {@code setup} mode.
1770
       *
1771
       * <p>One of {@code cad}, or {@code usd}.
1772
       */
1773
      @SerializedName("currency")
1774
      String currency;
1775

1776
      @SerializedName("mandate_options")
1777
      MandateOptions mandateOptions;
1778

1779
      /**
1780
       * Indicates that you intend to make future payments with this PaymentIntent's payment method.
1781
       *
1782
       * <p>If you provide a Customer with the PaymentIntent, you can use this parameter to <a
1783
       * href="https://stripe.com/payments/save-during-payment">attach the payment method</a> to the
1784
       * Customer after the PaymentIntent is confirmed and the customer completes any required
1785
       * actions. If you don't provide a Customer, you can still <a
1786
       * href="https://stripe.com/api/payment_methods/attach">attach</a> the payment method to a
1787
       * Customer after the transaction completes.
1788
       *
1789
       * <p>If the payment method is {@code card_present} and isn't a digital wallet, Stripe creates
1790
       * and attaches a <a
1791
       * href="https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card">generated_card</a>
1792
       * payment method representing the card to the Customer instead.
1793
       *
1794
       * <p>When processing card payments, Stripe uses {@code setup_future_usage} to help you comply
1795
       * with regional legislation and network rules, such as <a
1796
       * href="https://stripe.com/strong-customer-authentication">SCA</a>.
1797
       *
1798
       * <p>One of {@code none}, {@code off_session}, or {@code on_session}.
1799
       */
1800
      @SerializedName("setup_future_usage")
1801
      String setupFutureUsage;
1802

1803
      /**
1804
       * Bank account verification method.
1805
       *
1806
       * <p>One of {@code automatic}, {@code instant}, or {@code microdeposits}.
1807
       */
1808
      @SerializedName("verification_method")
1809
      String verificationMethod;
1810

1811
      /**
1812
       * For more details about MandateOptions, please refer to the <a
1813
       * href="https://docs.stripe.com/api">API Reference.</a>
1814
       */
1815
      @Getter
1816
      @Setter
1817
      @EqualsAndHashCode(callSuper = false)
1818
      public static class MandateOptions extends StripeObject {
×
1819
        /** A URL for custom mandate text. */
1820
        @SerializedName("custom_mandate_url")
1821
        String customMandateUrl;
1822

1823
        /**
1824
         * List of Stripe products where this mandate can be selected automatically. Returned when
1825
         * the Session is in {@code setup} mode.
1826
         */
1827
        @SerializedName("default_for")
1828
        List<String> defaultFor;
1829

1830
        /**
1831
         * Description of the interval. Only required if the 'payment_schedule' parameter is
1832
         * 'interval' or 'combined'.
1833
         */
1834
        @SerializedName("interval_description")
1835
        String intervalDescription;
1836

1837
        /**
1838
         * Payment schedule for the mandate.
1839
         *
1840
         * <p>One of {@code combined}, {@code interval}, or {@code sporadic}.
1841
         */
1842
        @SerializedName("payment_schedule")
1843
        String paymentSchedule;
1844

1845
        /**
1846
         * Transaction type of the mandate.
1847
         *
1848
         * <p>One of {@code business}, or {@code personal}.
1849
         */
1850
        @SerializedName("transaction_type")
1851
        String transactionType;
1852
      }
1853
    }
1854

1855
    /**
1856
     * For more details about Affirm, please refer to the <a href="https://docs.stripe.com/api">API
1857
     * Reference.</a>
1858
     */
1859
    @Getter
1860
    @Setter
1861
    @EqualsAndHashCode(callSuper = false)
1862
    public static class Affirm extends StripeObject {
×
1863
      /**
1864
       * Indicates that you intend to make future payments with this PaymentIntent's payment method.
1865
       *
1866
       * <p>If you provide a Customer with the PaymentIntent, you can use this parameter to <a
1867
       * href="https://stripe.com/payments/save-during-payment">attach the payment method</a> to the
1868
       * Customer after the PaymentIntent is confirmed and the customer completes any required
1869
       * actions. If you don't provide a Customer, you can still <a
1870
       * href="https://stripe.com/api/payment_methods/attach">attach</a> the payment method to a
1871
       * Customer after the transaction completes.
1872
       *
1873
       * <p>If the payment method is {@code card_present} and isn't a digital wallet, Stripe creates
1874
       * and attaches a <a
1875
       * href="https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card">generated_card</a>
1876
       * payment method representing the card to the Customer instead.
1877
       *
1878
       * <p>When processing card payments, Stripe uses {@code setup_future_usage} to help you comply
1879
       * with regional legislation and network rules, such as <a
1880
       * href="https://stripe.com/strong-customer-authentication">SCA</a>.
1881
       *
1882
       * <p>Equal to {@code none}.
1883
       */
1884
      @SerializedName("setup_future_usage")
1885
      String setupFutureUsage;
1886
    }
1887

1888
    /**
1889
     * For more details about AfterpayClearpay, please refer to the <a
1890
     * href="https://docs.stripe.com/api">API Reference.</a>
1891
     */
1892
    @Getter
1893
    @Setter
1894
    @EqualsAndHashCode(callSuper = false)
1895
    public static class AfterpayClearpay extends StripeObject {
×
1896
      /**
1897
       * Indicates that you intend to make future payments with this PaymentIntent's payment method.
1898
       *
1899
       * <p>If you provide a Customer with the PaymentIntent, you can use this parameter to <a
1900
       * href="https://stripe.com/payments/save-during-payment">attach the payment method</a> to the
1901
       * Customer after the PaymentIntent is confirmed and the customer completes any required
1902
       * actions. If you don't provide a Customer, you can still <a
1903
       * href="https://stripe.com/api/payment_methods/attach">attach</a> the payment method to a
1904
       * Customer after the transaction completes.
1905
       *
1906
       * <p>If the payment method is {@code card_present} and isn't a digital wallet, Stripe creates
1907
       * and attaches a <a
1908
       * href="https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card">generated_card</a>
1909
       * payment method representing the card to the Customer instead.
1910
       *
1911
       * <p>When processing card payments, Stripe uses {@code setup_future_usage} to help you comply
1912
       * with regional legislation and network rules, such as <a
1913
       * href="https://stripe.com/strong-customer-authentication">SCA</a>.
1914
       *
1915
       * <p>Equal to {@code none}.
1916
       */
1917
      @SerializedName("setup_future_usage")
1918
      String setupFutureUsage;
1919
    }
1920

1921
    /**
1922
     * For more details about Alipay, please refer to the <a href="https://docs.stripe.com/api">API
1923
     * Reference.</a>
1924
     */
1925
    @Getter
1926
    @Setter
1927
    @EqualsAndHashCode(callSuper = false)
1928
    public static class Alipay extends StripeObject {
×
1929
      /**
1930
       * Indicates that you intend to make future payments with this PaymentIntent's payment method.
1931
       *
1932
       * <p>If you provide a Customer with the PaymentIntent, you can use this parameter to <a
1933
       * href="https://stripe.com/payments/save-during-payment">attach the payment method</a> to the
1934
       * Customer after the PaymentIntent is confirmed and the customer completes any required
1935
       * actions. If you don't provide a Customer, you can still <a
1936
       * href="https://stripe.com/api/payment_methods/attach">attach</a> the payment method to a
1937
       * Customer after the transaction completes.
1938
       *
1939
       * <p>If the payment method is {@code card_present} and isn't a digital wallet, Stripe creates
1940
       * and attaches a <a
1941
       * href="https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card">generated_card</a>
1942
       * payment method representing the card to the Customer instead.
1943
       *
1944
       * <p>When processing card payments, Stripe uses {@code setup_future_usage} to help you comply
1945
       * with regional legislation and network rules, such as <a
1946
       * href="https://stripe.com/strong-customer-authentication">SCA</a>.
1947
       *
1948
       * <p>Equal to {@code none}.
1949
       */
1950
      @SerializedName("setup_future_usage")
1951
      String setupFutureUsage;
1952
    }
1953

1954
    /**
1955
     * For more details about AmazonPay, please refer to the <a
1956
     * href="https://docs.stripe.com/api">API Reference.</a>
1957
     */
1958
    @Getter
1959
    @Setter
1960
    @EqualsAndHashCode(callSuper = false)
1961
    public static class AmazonPay extends StripeObject {
×
1962
      /**
1963
       * Indicates that you intend to make future payments with this PaymentIntent's payment method.
1964
       *
1965
       * <p>If you provide a Customer with the PaymentIntent, you can use this parameter to <a
1966
       * href="https://stripe.com/payments/save-during-payment">attach the payment method</a> to the
1967
       * Customer after the PaymentIntent is confirmed and the customer completes any required
1968
       * actions. If you don't provide a Customer, you can still <a
1969
       * href="https://stripe.com/api/payment_methods/attach">attach</a> the payment method to a
1970
       * Customer after the transaction completes.
1971
       *
1972
       * <p>If the payment method is {@code card_present} and isn't a digital wallet, Stripe creates
1973
       * and attaches a <a
1974
       * href="https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card">generated_card</a>
1975
       * payment method representing the card to the Customer instead.
1976
       *
1977
       * <p>When processing card payments, Stripe uses {@code setup_future_usage} to help you comply
1978
       * with regional legislation and network rules, such as <a
1979
       * href="https://stripe.com/strong-customer-authentication">SCA</a>.
1980
       *
1981
       * <p>One of {@code none}, or {@code off_session}.
1982
       */
1983
      @SerializedName("setup_future_usage")
1984
      String setupFutureUsage;
1985
    }
1986

1987
    /**
1988
     * For more details about AuBecsDebit, please refer to the <a
1989
     * href="https://docs.stripe.com/api">API Reference.</a>
1990
     */
1991
    @Getter
1992
    @Setter
1993
    @EqualsAndHashCode(callSuper = false)
1994
    public static class AuBecsDebit extends StripeObject {
×
1995
      /**
1996
       * Indicates that you intend to make future payments with this PaymentIntent's payment method.
1997
       *
1998
       * <p>If you provide a Customer with the PaymentIntent, you can use this parameter to <a
1999
       * href="https://stripe.com/payments/save-during-payment">attach the payment method</a> to the
2000
       * Customer after the PaymentIntent is confirmed and the customer completes any required
2001
       * actions. If you don't provide a Customer, you can still <a
2002
       * href="https://stripe.com/api/payment_methods/attach">attach</a> the payment method to a
2003
       * Customer after the transaction completes.
2004
       *
2005
       * <p>If the payment method is {@code card_present} and isn't a digital wallet, Stripe creates
2006
       * and attaches a <a
2007
       * href="https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card">generated_card</a>
2008
       * payment method representing the card to the Customer instead.
2009
       *
2010
       * <p>When processing card payments, Stripe uses {@code setup_future_usage} to help you comply
2011
       * with regional legislation and network rules, such as <a
2012
       * href="https://stripe.com/strong-customer-authentication">SCA</a>.
2013
       *
2014
       * <p>Equal to {@code none}.
2015
       */
2016
      @SerializedName("setup_future_usage")
2017
      String setupFutureUsage;
2018
    }
2019

2020
    /**
2021
     * For more details about BacsDebit, please refer to the <a
2022
     * href="https://docs.stripe.com/api">API Reference.</a>
2023
     */
2024
    @Getter
2025
    @Setter
2026
    @EqualsAndHashCode(callSuper = false)
2027
    public static class BacsDebit extends StripeObject {
×
2028
      @SerializedName("mandate_options")
2029
      MandateOptions mandateOptions;
2030

2031
      /**
2032
       * Indicates that you intend to make future payments with this PaymentIntent's payment method.
2033
       *
2034
       * <p>If you provide a Customer with the PaymentIntent, you can use this parameter to <a
2035
       * href="https://stripe.com/payments/save-during-payment">attach the payment method</a> to the
2036
       * Customer after the PaymentIntent is confirmed and the customer completes any required
2037
       * actions. If you don't provide a Customer, you can still <a
2038
       * href="https://stripe.com/api/payment_methods/attach">attach</a> the payment method to a
2039
       * Customer after the transaction completes.
2040
       *
2041
       * <p>If the payment method is {@code card_present} and isn't a digital wallet, Stripe creates
2042
       * and attaches a <a
2043
       * href="https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card">generated_card</a>
2044
       * payment method representing the card to the Customer instead.
2045
       *
2046
       * <p>When processing card payments, Stripe uses {@code setup_future_usage} to help you comply
2047
       * with regional legislation and network rules, such as <a
2048
       * href="https://stripe.com/strong-customer-authentication">SCA</a>.
2049
       *
2050
       * <p>One of {@code none}, {@code off_session}, or {@code on_session}.
2051
       */
2052
      @SerializedName("setup_future_usage")
2053
      String setupFutureUsage;
2054

2055
      /**
2056
       * For more details about MandateOptions, please refer to the <a
2057
       * href="https://docs.stripe.com/api">API Reference.</a>
2058
       */
2059
      @Getter
2060
      @Setter
2061
      @EqualsAndHashCode(callSuper = false)
NEW
2062
      public static class MandateOptions extends StripeObject {}
×
2063
    }
2064

2065
    /**
2066
     * For more details about Bancontact, please refer to the <a
2067
     * href="https://docs.stripe.com/api">API Reference.</a>
2068
     */
2069
    @Getter
2070
    @Setter
2071
    @EqualsAndHashCode(callSuper = false)
2072
    public static class Bancontact extends StripeObject {
×
2073
      /**
2074
       * Indicates that you intend to make future payments with this PaymentIntent's payment method.
2075
       *
2076
       * <p>If you provide a Customer with the PaymentIntent, you can use this parameter to <a
2077
       * href="https://stripe.com/payments/save-during-payment">attach the payment method</a> to the
2078
       * Customer after the PaymentIntent is confirmed and the customer completes any required
2079
       * actions. If you don't provide a Customer, you can still <a
2080
       * href="https://stripe.com/api/payment_methods/attach">attach</a> the payment method to a
2081
       * Customer after the transaction completes.
2082
       *
2083
       * <p>If the payment method is {@code card_present} and isn't a digital wallet, Stripe creates
2084
       * and attaches a <a
2085
       * href="https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card">generated_card</a>
2086
       * payment method representing the card to the Customer instead.
2087
       *
2088
       * <p>When processing card payments, Stripe uses {@code setup_future_usage} to help you comply
2089
       * with regional legislation and network rules, such as <a
2090
       * href="https://stripe.com/strong-customer-authentication">SCA</a>.
2091
       *
2092
       * <p>Equal to {@code none}.
2093
       */
2094
      @SerializedName("setup_future_usage")
2095
      String setupFutureUsage;
2096
    }
2097

2098
    /**
2099
     * For more details about Boleto, please refer to the <a href="https://docs.stripe.com/api">API
2100
     * Reference.</a>
2101
     */
2102
    @Getter
2103
    @Setter
2104
    @EqualsAndHashCode(callSuper = false)
2105
    public static class Boleto extends StripeObject {
×
2106
      /**
2107
       * The number of calendar days before a Boleto voucher expires. For example, if you create a
2108
       * Boleto voucher on Monday and you set expires_after_days to 2, the Boleto voucher will
2109
       * expire on Wednesday at 23:59 America/Sao_Paulo time.
2110
       */
2111
      @SerializedName("expires_after_days")
2112
      Long expiresAfterDays;
2113

2114
      /**
2115
       * Indicates that you intend to make future payments with this PaymentIntent's payment method.
2116
       *
2117
       * <p>If you provide a Customer with the PaymentIntent, you can use this parameter to <a
2118
       * href="https://stripe.com/payments/save-during-payment">attach the payment method</a> to the
2119
       * Customer after the PaymentIntent is confirmed and the customer completes any required
2120
       * actions. If you don't provide a Customer, you can still <a
2121
       * href="https://stripe.com/api/payment_methods/attach">attach</a> the payment method to a
2122
       * Customer after the transaction completes.
2123
       *
2124
       * <p>If the payment method is {@code card_present} and isn't a digital wallet, Stripe creates
2125
       * and attaches a <a
2126
       * href="https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card">generated_card</a>
2127
       * payment method representing the card to the Customer instead.
2128
       *
2129
       * <p>When processing card payments, Stripe uses {@code setup_future_usage} to help you comply
2130
       * with regional legislation and network rules, such as <a
2131
       * href="https://stripe.com/strong-customer-authentication">SCA</a>.
2132
       *
2133
       * <p>One of {@code none}, {@code off_session}, or {@code on_session}.
2134
       */
2135
      @SerializedName("setup_future_usage")
2136
      String setupFutureUsage;
2137
    }
2138

2139
    /**
2140
     * For more details about Card, please refer to the <a href="https://docs.stripe.com/api">API
2141
     * Reference.</a>
2142
     */
2143
    @Getter
2144
    @Setter
2145
    @EqualsAndHashCode(callSuper = false)
2146
    public static class Card extends StripeObject {
×
2147
      @SerializedName("installments")
2148
      Installments installments;
2149

2150
      /**
2151
       * Request ability to <a href="https://stripe.com/payments/extended-authorization">capture
2152
       * beyond the standard authorization validity window</a> for this CheckoutSession.
2153
       *
2154
       * <p>One of {@code if_available}, or {@code never}.
2155
       */
2156
      @SerializedName("request_decremental_authorization")
2157
      String requestDecrementalAuthorization;
2158

2159
      /**
2160
       * Request ability to <a href="https://stripe.com/payments/extended-authorization">capture
2161
       * beyond the standard authorization validity window</a> for this CheckoutSession.
2162
       *
2163
       * <p>One of {@code if_available}, or {@code never}.
2164
       */
2165
      @SerializedName("request_extended_authorization")
2166
      String requestExtendedAuthorization;
2167

2168
      /**
2169
       * Request ability to <a
2170
       * href="https://stripe.com/payments/incremental-authorization">increment the
2171
       * authorization</a> for this CheckoutSession.
2172
       *
2173
       * <p>One of {@code if_available}, or {@code never}.
2174
       */
2175
      @SerializedName("request_incremental_authorization")
2176
      String requestIncrementalAuthorization;
2177

2178
      /**
2179
       * Request ability to make <a href="https://stripe.com/payments/multicapture">multiple
2180
       * captures</a> for this CheckoutSession.
2181
       *
2182
       * <p>One of {@code if_available}, or {@code never}.
2183
       */
2184
      @SerializedName("request_multicapture")
2185
      String requestMulticapture;
2186

2187
      /**
2188
       * Request ability to <a href="https://stripe.com/payments/overcapture">overcapture</a> for
2189
       * this CheckoutSession.
2190
       *
2191
       * <p>One of {@code if_available}, or {@code never}.
2192
       */
2193
      @SerializedName("request_overcapture")
2194
      String requestOvercapture;
2195

2196
      /**
2197
       * We strongly recommend that you rely on our SCA Engine to automatically prompt your
2198
       * customers for authentication based on risk level and <a
2199
       * href="https://stripe.com/docs/strong-customer-authentication">other requirements</a>.
2200
       * However, if you wish to request 3D Secure based on logic from your own fraud engine,
2201
       * provide this option. If not provided, this value defaults to {@code automatic}. Read our
2202
       * guide on <a
2203
       * href="https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds">manually
2204
       * requesting 3D Secure</a> for more information on how this configuration interacts with
2205
       * Radar and our SCA Engine.
2206
       *
2207
       * <p>One of {@code any}, {@code automatic}, or {@code challenge}.
2208
       */
2209
      @SerializedName("request_three_d_secure")
2210
      String requestThreeDSecure;
2211

2212
      /**
2213
       * Indicates that you intend to make future payments with this PaymentIntent's payment method.
2214
       *
2215
       * <p>If you provide a Customer with the PaymentIntent, you can use this parameter to <a
2216
       * href="https://stripe.com/payments/save-during-payment">attach the payment method</a> to the
2217
       * Customer after the PaymentIntent is confirmed and the customer completes any required
2218
       * actions. If you don't provide a Customer, you can still <a
2219
       * href="https://stripe.com/api/payment_methods/attach">attach</a> the payment method to a
2220
       * Customer after the transaction completes.
2221
       *
2222
       * <p>If the payment method is {@code card_present} and isn't a digital wallet, Stripe creates
2223
       * and attaches a <a
2224
       * href="https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card">generated_card</a>
2225
       * payment method representing the card to the Customer instead.
2226
       *
2227
       * <p>When processing card payments, Stripe uses {@code setup_future_usage} to help you comply
2228
       * with regional legislation and network rules, such as <a
2229
       * href="https://stripe.com/strong-customer-authentication">SCA</a>.
2230
       *
2231
       * <p>One of {@code none}, {@code off_session}, or {@code on_session}.
2232
       */
2233
      @SerializedName("setup_future_usage")
2234
      String setupFutureUsage;
2235

2236
      /**
2237
       * Provides information about a card payment that customers see on their statements.
2238
       * Concatenated with the Kana prefix (shortened Kana descriptor) or Kana statement descriptor
2239
       * that’s set on the account to form the complete statement descriptor. Maximum 22 characters.
2240
       * On card statements, the <em>concatenation</em> of both prefix and suffix (including
2241
       * separators) will appear truncated to 22 characters.
2242
       */
2243
      @SerializedName("statement_descriptor_suffix_kana")
2244
      String statementDescriptorSuffixKana;
2245

2246
      /**
2247
       * Provides information about a card payment that customers see on their statements.
2248
       * Concatenated with the Kanji prefix (shortened Kanji descriptor) or Kanji statement
2249
       * descriptor that’s set on the account to form the complete statement descriptor. Maximum 17
2250
       * characters. On card statements, the <em>concatenation</em> of both prefix and suffix
2251
       * (including separators) will appear truncated to 17 characters.
2252
       */
2253
      @SerializedName("statement_descriptor_suffix_kanji")
2254
      String statementDescriptorSuffixKanji;
2255

2256
      /**
2257
       * For more details about Installments, please refer to the <a
2258
       * href="https://docs.stripe.com/api">API Reference.</a>
2259
       */
2260
      @Getter
2261
      @Setter
2262
      @EqualsAndHashCode(callSuper = false)
2263
      public static class Installments extends StripeObject {
×
2264
        /** Indicates if installments are enabled. */
2265
        @SerializedName("enabled")
2266
        Boolean enabled;
2267
      }
2268
    }
2269

2270
    /**
2271
     * For more details about Cashapp, please refer to the <a href="https://docs.stripe.com/api">API
2272
     * Reference.</a>
2273
     */
2274
    @Getter
2275
    @Setter
2276
    @EqualsAndHashCode(callSuper = false)
2277
    public static class Cashapp extends StripeObject {
×
2278
      /**
2279
       * Indicates that you intend to make future payments with this PaymentIntent's payment method.
2280
       *
2281
       * <p>If you provide a Customer with the PaymentIntent, you can use this parameter to <a
2282
       * href="https://stripe.com/payments/save-during-payment">attach the payment method</a> to the
2283
       * Customer after the PaymentIntent is confirmed and the customer completes any required
2284
       * actions. If you don't provide a Customer, you can still <a
2285
       * href="https://stripe.com/api/payment_methods/attach">attach</a> the payment method to a
2286
       * Customer after the transaction completes.
2287
       *
2288
       * <p>If the payment method is {@code card_present} and isn't a digital wallet, Stripe creates
2289
       * and attaches a <a
2290
       * href="https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card">generated_card</a>
2291
       * payment method representing the card to the Customer instead.
2292
       *
2293
       * <p>When processing card payments, Stripe uses {@code setup_future_usage} to help you comply
2294
       * with regional legislation and network rules, such as <a
2295
       * href="https://stripe.com/strong-customer-authentication">SCA</a>.
2296
       *
2297
       * <p>Equal to {@code none}.
2298
       */
2299
      @SerializedName("setup_future_usage")
2300
      String setupFutureUsage;
2301
    }
2302

2303
    /**
2304
     * For more details about CustomerBalance, please refer to the <a
2305
     * href="https://docs.stripe.com/api">API Reference.</a>
2306
     */
2307
    @Getter
2308
    @Setter
2309
    @EqualsAndHashCode(callSuper = false)
2310
    public static class CustomerBalance extends StripeObject {
×
2311
      @SerializedName("bank_transfer")
2312
      BankTransfer bankTransfer;
2313

2314
      /**
2315
       * The funding method type to be used when there are not enough funds in the customer balance.
2316
       * Permitted values include: {@code bank_transfer}.
2317
       *
2318
       * <p>Equal to {@code bank_transfer}.
2319
       */
2320
      @SerializedName("funding_type")
2321
      String fundingType;
2322

2323
      /**
2324
       * Indicates that you intend to make future payments with this PaymentIntent's payment method.
2325
       *
2326
       * <p>If you provide a Customer with the PaymentIntent, you can use this parameter to <a
2327
       * href="https://stripe.com/payments/save-during-payment">attach the payment method</a> to the
2328
       * Customer after the PaymentIntent is confirmed and the customer completes any required
2329
       * actions. If you don't provide a Customer, you can still <a
2330
       * href="https://stripe.com/api/payment_methods/attach">attach</a> the payment method to a
2331
       * Customer after the transaction completes.
2332
       *
2333
       * <p>If the payment method is {@code card_present} and isn't a digital wallet, Stripe creates
2334
       * and attaches a <a
2335
       * href="https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card">generated_card</a>
2336
       * payment method representing the card to the Customer instead.
2337
       *
2338
       * <p>When processing card payments, Stripe uses {@code setup_future_usage} to help you comply
2339
       * with regional legislation and network rules, such as <a
2340
       * href="https://stripe.com/strong-customer-authentication">SCA</a>.
2341
       *
2342
       * <p>Equal to {@code none}.
2343
       */
2344
      @SerializedName("setup_future_usage")
2345
      String setupFutureUsage;
2346

2347
      /**
2348
       * For more details about BankTransfer, please refer to the <a
2349
       * href="https://docs.stripe.com/api">API Reference.</a>
2350
       */
2351
      @Getter
2352
      @Setter
2353
      @EqualsAndHashCode(callSuper = false)
2354
      public static class BankTransfer extends StripeObject {
×
2355
        @SerializedName("eu_bank_transfer")
2356
        EuBankTransfer euBankTransfer;
2357

2358
        /**
2359
         * List of address types that should be returned in the financial_addresses response. If not
2360
         * specified, all valid types will be returned.
2361
         *
2362
         * <p>Permitted values include: {@code sort_code}, {@code zengin}, {@code iban}, or {@code
2363
         * spei}.
2364
         */
2365
        @SerializedName("requested_address_types")
2366
        List<String> requestedAddressTypes;
2367

2368
        /**
2369
         * The bank transfer type that this PaymentIntent is allowed to use for funding Permitted
2370
         * values include: {@code eu_bank_transfer}, {@code gb_bank_transfer}, {@code
2371
         * jp_bank_transfer}, {@code mx_bank_transfer}, or {@code us_bank_transfer}.
2372
         *
2373
         * <p>One of {@code eu_bank_transfer}, {@code gb_bank_transfer}, {@code jp_bank_transfer},
2374
         * {@code mx_bank_transfer}, or {@code us_bank_transfer}.
2375
         */
2376
        @SerializedName("type")
2377
        String type;
2378

2379
        /**
2380
         * For more details about EuBankTransfer, please refer to the <a
2381
         * href="https://docs.stripe.com/api">API Reference.</a>
2382
         */
2383
        @Getter
2384
        @Setter
2385
        @EqualsAndHashCode(callSuper = false)
2386
        public static class EuBankTransfer extends StripeObject {
×
2387
          /**
2388
           * The desired country code of the bank account information. Permitted values include:
2389
           * {@code BE}, {@code DE}, {@code ES}, {@code FR}, {@code IE}, or {@code NL}.
2390
           *
2391
           * <p>One of {@code BE}, {@code DE}, {@code ES}, {@code FR}, {@code IE}, or {@code NL}.
2392
           */
2393
          @SerializedName("country")
2394
          String country;
2395
        }
2396
      }
2397
    }
2398

2399
    /**
2400
     * For more details about Eps, please refer to the <a href="https://docs.stripe.com/api">API
2401
     * Reference.</a>
2402
     */
2403
    @Getter
2404
    @Setter
2405
    @EqualsAndHashCode(callSuper = false)
2406
    public static class Eps extends StripeObject {
×
2407
      /**
2408
       * Indicates that you intend to make future payments with this PaymentIntent's payment method.
2409
       *
2410
       * <p>If you provide a Customer with the PaymentIntent, you can use this parameter to <a
2411
       * href="https://stripe.com/payments/save-during-payment">attach the payment method</a> to the
2412
       * Customer after the PaymentIntent is confirmed and the customer completes any required
2413
       * actions. If you don't provide a Customer, you can still <a
2414
       * href="https://stripe.com/api/payment_methods/attach">attach</a> the payment method to a
2415
       * Customer after the transaction completes.
2416
       *
2417
       * <p>If the payment method is {@code card_present} and isn't a digital wallet, Stripe creates
2418
       * and attaches a <a
2419
       * href="https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card">generated_card</a>
2420
       * payment method representing the card to the Customer instead.
2421
       *
2422
       * <p>When processing card payments, Stripe uses {@code setup_future_usage} to help you comply
2423
       * with regional legislation and network rules, such as <a
2424
       * href="https://stripe.com/strong-customer-authentication">SCA</a>.
2425
       *
2426
       * <p>Equal to {@code none}.
2427
       */
2428
      @SerializedName("setup_future_usage")
2429
      String setupFutureUsage;
2430
    }
2431

2432
    /**
2433
     * For more details about Fpx, please refer to the <a href="https://docs.stripe.com/api">API
2434
     * Reference.</a>
2435
     */
2436
    @Getter
2437
    @Setter
2438
    @EqualsAndHashCode(callSuper = false)
2439
    public static class Fpx extends StripeObject {
×
2440
      /**
2441
       * Indicates that you intend to make future payments with this PaymentIntent's payment method.
2442
       *
2443
       * <p>If you provide a Customer with the PaymentIntent, you can use this parameter to <a
2444
       * href="https://stripe.com/payments/save-during-payment">attach the payment method</a> to the
2445
       * Customer after the PaymentIntent is confirmed and the customer completes any required
2446
       * actions. If you don't provide a Customer, you can still <a
2447
       * href="https://stripe.com/api/payment_methods/attach">attach</a> the payment method to a
2448
       * Customer after the transaction completes.
2449
       *
2450
       * <p>If the payment method is {@code card_present} and isn't a digital wallet, Stripe creates
2451
       * and attaches a <a
2452
       * href="https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card">generated_card</a>
2453
       * payment method representing the card to the Customer instead.
2454
       *
2455
       * <p>When processing card payments, Stripe uses {@code setup_future_usage} to help you comply
2456
       * with regional legislation and network rules, such as <a
2457
       * href="https://stripe.com/strong-customer-authentication">SCA</a>.
2458
       *
2459
       * <p>Equal to {@code none}.
2460
       */
2461
      @SerializedName("setup_future_usage")
2462
      String setupFutureUsage;
2463
    }
2464

2465
    /**
2466
     * For more details about Giropay, please refer to the <a href="https://docs.stripe.com/api">API
2467
     * Reference.</a>
2468
     */
2469
    @Getter
2470
    @Setter
2471
    @EqualsAndHashCode(callSuper = false)
2472
    public static class Giropay extends StripeObject {
×
2473
      /**
2474
       * Indicates that you intend to make future payments with this PaymentIntent's payment method.
2475
       *
2476
       * <p>If you provide a Customer with the PaymentIntent, you can use this parameter to <a
2477
       * href="https://stripe.com/payments/save-during-payment">attach the payment method</a> to the
2478
       * Customer after the PaymentIntent is confirmed and the customer completes any required
2479
       * actions. If you don't provide a Customer, you can still <a
2480
       * href="https://stripe.com/api/payment_methods/attach">attach</a> the payment method to a
2481
       * Customer after the transaction completes.
2482
       *
2483
       * <p>If the payment method is {@code card_present} and isn't a digital wallet, Stripe creates
2484
       * and attaches a <a
2485
       * href="https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card">generated_card</a>
2486
       * payment method representing the card to the Customer instead.
2487
       *
2488
       * <p>When processing card payments, Stripe uses {@code setup_future_usage} to help you comply
2489
       * with regional legislation and network rules, such as <a
2490
       * href="https://stripe.com/strong-customer-authentication">SCA</a>.
2491
       *
2492
       * <p>Equal to {@code none}.
2493
       */
2494
      @SerializedName("setup_future_usage")
2495
      String setupFutureUsage;
2496
    }
2497

2498
    /**
2499
     * For more details about Grabpay, please refer to the <a href="https://docs.stripe.com/api">API
2500
     * Reference.</a>
2501
     */
2502
    @Getter
2503
    @Setter
2504
    @EqualsAndHashCode(callSuper = false)
2505
    public static class Grabpay extends StripeObject {
×
2506
      /**
2507
       * Indicates that you intend to make future payments with this PaymentIntent's payment method.
2508
       *
2509
       * <p>If you provide a Customer with the PaymentIntent, you can use this parameter to <a
2510
       * href="https://stripe.com/payments/save-during-payment">attach the payment method</a> to the
2511
       * Customer after the PaymentIntent is confirmed and the customer completes any required
2512
       * actions. If you don't provide a Customer, you can still <a
2513
       * href="https://stripe.com/api/payment_methods/attach">attach</a> the payment method to a
2514
       * Customer after the transaction completes.
2515
       *
2516
       * <p>If the payment method is {@code card_present} and isn't a digital wallet, Stripe creates
2517
       * and attaches a <a
2518
       * href="https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card">generated_card</a>
2519
       * payment method representing the card to the Customer instead.
2520
       *
2521
       * <p>When processing card payments, Stripe uses {@code setup_future_usage} to help you comply
2522
       * with regional legislation and network rules, such as <a
2523
       * href="https://stripe.com/strong-customer-authentication">SCA</a>.
2524
       *
2525
       * <p>Equal to {@code none}.
2526
       */
2527
      @SerializedName("setup_future_usage")
2528
      String setupFutureUsage;
2529
    }
2530

2531
    /**
2532
     * For more details about Ideal, please refer to the <a href="https://docs.stripe.com/api">API
2533
     * Reference.</a>
2534
     */
2535
    @Getter
2536
    @Setter
2537
    @EqualsAndHashCode(callSuper = false)
2538
    public static class Ideal extends StripeObject {
×
2539
      /**
2540
       * Indicates that you intend to make future payments with this PaymentIntent's payment method.
2541
       *
2542
       * <p>If you provide a Customer with the PaymentIntent, you can use this parameter to <a
2543
       * href="https://stripe.com/payments/save-during-payment">attach the payment method</a> to the
2544
       * Customer after the PaymentIntent is confirmed and the customer completes any required
2545
       * actions. If you don't provide a Customer, you can still <a
2546
       * href="https://stripe.com/api/payment_methods/attach">attach</a> the payment method to a
2547
       * Customer after the transaction completes.
2548
       *
2549
       * <p>If the payment method is {@code card_present} and isn't a digital wallet, Stripe creates
2550
       * and attaches a <a
2551
       * href="https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card">generated_card</a>
2552
       * payment method representing the card to the Customer instead.
2553
       *
2554
       * <p>When processing card payments, Stripe uses {@code setup_future_usage} to help you comply
2555
       * with regional legislation and network rules, such as <a
2556
       * href="https://stripe.com/strong-customer-authentication">SCA</a>.
2557
       *
2558
       * <p>Equal to {@code none}.
2559
       */
2560
      @SerializedName("setup_future_usage")
2561
      String setupFutureUsage;
2562
    }
2563

2564
    /**
2565
     * For more details about KakaoPay, please refer to the <a
2566
     * href="https://docs.stripe.com/api">API Reference.</a>
2567
     */
2568
    @Getter
2569
    @Setter
2570
    @EqualsAndHashCode(callSuper = false)
2571
    public static class KakaoPay extends StripeObject {
×
2572
      /**
2573
       * Controls when the funds will be captured from the customer's account.
2574
       *
2575
       * <p>Equal to {@code manual}.
2576
       */
2577
      @SerializedName("capture_method")
2578
      String captureMethod;
2579

2580
      /**
2581
       * Indicates that you intend to make future payments with this PaymentIntent's payment method.
2582
       *
2583
       * <p>If you provide a Customer with the PaymentIntent, you can use this parameter to <a
2584
       * href="https://stripe.com/payments/save-during-payment">attach the payment method</a> to the
2585
       * Customer after the PaymentIntent is confirmed and the customer completes any required
2586
       * actions. If you don't provide a Customer, you can still <a
2587
       * href="https://stripe.com/api/payment_methods/attach">attach</a> the payment method to a
2588
       * Customer after the transaction completes.
2589
       *
2590
       * <p>If the payment method is {@code card_present} and isn't a digital wallet, Stripe creates
2591
       * and attaches a <a
2592
       * href="https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card">generated_card</a>
2593
       * payment method representing the card to the Customer instead.
2594
       *
2595
       * <p>When processing card payments, Stripe uses {@code setup_future_usage} to help you comply
2596
       * with regional legislation and network rules, such as <a
2597
       * href="https://stripe.com/strong-customer-authentication">SCA</a>.
2598
       *
2599
       * <p>One of {@code none}, or {@code off_session}.
2600
       */
2601
      @SerializedName("setup_future_usage")
2602
      String setupFutureUsage;
2603
    }
2604

2605
    /**
2606
     * For more details about Klarna, please refer to the <a href="https://docs.stripe.com/api">API
2607
     * Reference.</a>
2608
     */
2609
    @Getter
2610
    @Setter
2611
    @EqualsAndHashCode(callSuper = false)
2612
    public static class Klarna extends StripeObject {
×
2613
      /**
2614
       * Indicates that you intend to make future payments with this PaymentIntent's payment method.
2615
       *
2616
       * <p>If you provide a Customer with the PaymentIntent, you can use this parameter to <a
2617
       * href="https://stripe.com/payments/save-during-payment">attach the payment method</a> to the
2618
       * Customer after the PaymentIntent is confirmed and the customer completes any required
2619
       * actions. If you don't provide a Customer, you can still <a
2620
       * href="https://stripe.com/api/payment_methods/attach">attach</a> the payment method to a
2621
       * Customer after the transaction completes.
2622
       *
2623
       * <p>If the payment method is {@code card_present} and isn't a digital wallet, Stripe creates
2624
       * and attaches a <a
2625
       * href="https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card">generated_card</a>
2626
       * payment method representing the card to the Customer instead.
2627
       *
2628
       * <p>When processing card payments, Stripe uses {@code setup_future_usage} to help you comply
2629
       * with regional legislation and network rules, such as <a
2630
       * href="https://stripe.com/strong-customer-authentication">SCA</a>.
2631
       *
2632
       * <p>One of {@code none}, {@code off_session}, or {@code on_session}.
2633
       */
2634
      @SerializedName("setup_future_usage")
2635
      String setupFutureUsage;
2636
    }
2637

2638
    /**
2639
     * For more details about Konbini, please refer to the <a href="https://docs.stripe.com/api">API
2640
     * Reference.</a>
2641
     */
2642
    @Getter
2643
    @Setter
2644
    @EqualsAndHashCode(callSuper = false)
2645
    public static class Konbini extends StripeObject {
×
2646
      /**
2647
       * The number of calendar days (between 1 and 60) after which Konbini payment instructions
2648
       * will expire. For example, if a PaymentIntent is confirmed with Konbini and {@code
2649
       * expires_after_days} set to 2 on Monday JST, the instructions will expire on Wednesday
2650
       * 23:59:59 JST.
2651
       */
2652
      @SerializedName("expires_after_days")
2653
      Long expiresAfterDays;
2654

2655
      /**
2656
       * Indicates that you intend to make future payments with this PaymentIntent's payment method.
2657
       *
2658
       * <p>If you provide a Customer with the PaymentIntent, you can use this parameter to <a
2659
       * href="https://stripe.com/payments/save-during-payment">attach the payment method</a> to the
2660
       * Customer after the PaymentIntent is confirmed and the customer completes any required
2661
       * actions. If you don't provide a Customer, you can still <a
2662
       * href="https://stripe.com/api/payment_methods/attach">attach</a> the payment method to a
2663
       * Customer after the transaction completes.
2664
       *
2665
       * <p>If the payment method is {@code card_present} and isn't a digital wallet, Stripe creates
2666
       * and attaches a <a
2667
       * href="https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card">generated_card</a>
2668
       * payment method representing the card to the Customer instead.
2669
       *
2670
       * <p>When processing card payments, Stripe uses {@code setup_future_usage} to help you comply
2671
       * with regional legislation and network rules, such as <a
2672
       * href="https://stripe.com/strong-customer-authentication">SCA</a>.
2673
       *
2674
       * <p>Equal to {@code none}.
2675
       */
2676
      @SerializedName("setup_future_usage")
2677
      String setupFutureUsage;
2678
    }
2679

2680
    /**
2681
     * For more details about KrCard, please refer to the <a href="https://docs.stripe.com/api">API
2682
     * Reference.</a>
2683
     */
2684
    @Getter
2685
    @Setter
2686
    @EqualsAndHashCode(callSuper = false)
2687
    public static class KrCard extends StripeObject {
×
2688
      /**
2689
       * Controls when the funds will be captured from the customer's account.
2690
       *
2691
       * <p>Equal to {@code manual}.
2692
       */
2693
      @SerializedName("capture_method")
2694
      String captureMethod;
2695

2696
      /**
2697
       * Indicates that you intend to make future payments with this PaymentIntent's payment method.
2698
       *
2699
       * <p>If you provide a Customer with the PaymentIntent, you can use this parameter to <a
2700
       * href="https://stripe.com/payments/save-during-payment">attach the payment method</a> to the
2701
       * Customer after the PaymentIntent is confirmed and the customer completes any required
2702
       * actions. If you don't provide a Customer, you can still <a
2703
       * href="https://stripe.com/api/payment_methods/attach">attach</a> the payment method to a
2704
       * Customer after the transaction completes.
2705
       *
2706
       * <p>If the payment method is {@code card_present} and isn't a digital wallet, Stripe creates
2707
       * and attaches a <a
2708
       * href="https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card">generated_card</a>
2709
       * payment method representing the card to the Customer instead.
2710
       *
2711
       * <p>When processing card payments, Stripe uses {@code setup_future_usage} to help you comply
2712
       * with regional legislation and network rules, such as <a
2713
       * href="https://stripe.com/strong-customer-authentication">SCA</a>.
2714
       *
2715
       * <p>One of {@code none}, or {@code off_session}.
2716
       */
2717
      @SerializedName("setup_future_usage")
2718
      String setupFutureUsage;
2719
    }
2720

2721
    /**
2722
     * For more details about Link, please refer to the <a href="https://docs.stripe.com/api">API
2723
     * Reference.</a>
2724
     */
2725
    @Getter
2726
    @Setter
2727
    @EqualsAndHashCode(callSuper = false)
2728
    public static class Link extends StripeObject {
×
2729
      /**
2730
       * Indicates that you intend to make future payments with this PaymentIntent's payment method.
2731
       *
2732
       * <p>If you provide a Customer with the PaymentIntent, you can use this parameter to <a
2733
       * href="https://stripe.com/payments/save-during-payment">attach the payment method</a> to the
2734
       * Customer after the PaymentIntent is confirmed and the customer completes any required
2735
       * actions. If you don't provide a Customer, you can still <a
2736
       * href="https://stripe.com/api/payment_methods/attach">attach</a> the payment method to a
2737
       * Customer after the transaction completes.
2738
       *
2739
       * <p>If the payment method is {@code card_present} and isn't a digital wallet, Stripe creates
2740
       * and attaches a <a
2741
       * href="https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card">generated_card</a>
2742
       * payment method representing the card to the Customer instead.
2743
       *
2744
       * <p>When processing card payments, Stripe uses {@code setup_future_usage} to help you comply
2745
       * with regional legislation and network rules, such as <a
2746
       * href="https://stripe.com/strong-customer-authentication">SCA</a>.
2747
       *
2748
       * <p>One of {@code none}, or {@code off_session}.
2749
       */
2750
      @SerializedName("setup_future_usage")
2751
      String setupFutureUsage;
2752
    }
2753

2754
    /**
2755
     * For more details about Mobilepay, please refer to the <a
2756
     * href="https://docs.stripe.com/api">API Reference.</a>
2757
     */
2758
    @Getter
2759
    @Setter
2760
    @EqualsAndHashCode(callSuper = false)
2761
    public static class Mobilepay extends StripeObject {
×
2762
      /**
2763
       * Indicates that you intend to make future payments with this PaymentIntent's payment method.
2764
       *
2765
       * <p>If you provide a Customer with the PaymentIntent, you can use this parameter to <a
2766
       * href="https://stripe.com/payments/save-during-payment">attach the payment method</a> to the
2767
       * Customer after the PaymentIntent is confirmed and the customer completes any required
2768
       * actions. If you don't provide a Customer, you can still <a
2769
       * href="https://stripe.com/api/payment_methods/attach">attach</a> the payment method to a
2770
       * Customer after the transaction completes.
2771
       *
2772
       * <p>If the payment method is {@code card_present} and isn't a digital wallet, Stripe creates
2773
       * and attaches a <a
2774
       * href="https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card">generated_card</a>
2775
       * payment method representing the card to the Customer instead.
2776
       *
2777
       * <p>When processing card payments, Stripe uses {@code setup_future_usage} to help you comply
2778
       * with regional legislation and network rules, such as <a
2779
       * href="https://stripe.com/strong-customer-authentication">SCA</a>.
2780
       *
2781
       * <p>Equal to {@code none}.
2782
       */
2783
      @SerializedName("setup_future_usage")
2784
      String setupFutureUsage;
2785
    }
2786

2787
    /**
2788
     * For more details about Multibanco, please refer to the <a
2789
     * href="https://docs.stripe.com/api">API Reference.</a>
2790
     */
2791
    @Getter
2792
    @Setter
2793
    @EqualsAndHashCode(callSuper = false)
2794
    public static class Multibanco extends StripeObject {
×
2795
      /**
2796
       * Indicates that you intend to make future payments with this PaymentIntent's payment method.
2797
       *
2798
       * <p>If you provide a Customer with the PaymentIntent, you can use this parameter to <a
2799
       * href="https://stripe.com/payments/save-during-payment">attach the payment method</a> to the
2800
       * Customer after the PaymentIntent is confirmed and the customer completes any required
2801
       * actions. If you don't provide a Customer, you can still <a
2802
       * href="https://stripe.com/api/payment_methods/attach">attach</a> the payment method to a
2803
       * Customer after the transaction completes.
2804
       *
2805
       * <p>If the payment method is {@code card_present} and isn't a digital wallet, Stripe creates
2806
       * and attaches a <a
2807
       * href="https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card">generated_card</a>
2808
       * payment method representing the card to the Customer instead.
2809
       *
2810
       * <p>When processing card payments, Stripe uses {@code setup_future_usage} to help you comply
2811
       * with regional legislation and network rules, such as <a
2812
       * href="https://stripe.com/strong-customer-authentication">SCA</a>.
2813
       *
2814
       * <p>Equal to {@code none}.
2815
       */
2816
      @SerializedName("setup_future_usage")
2817
      String setupFutureUsage;
2818
    }
2819

2820
    /**
2821
     * For more details about NaverPay, please refer to the <a
2822
     * href="https://docs.stripe.com/api">API Reference.</a>
2823
     */
2824
    @Getter
2825
    @Setter
2826
    @EqualsAndHashCode(callSuper = false)
2827
    public static class NaverPay extends StripeObject {
×
2828
      /**
2829
       * Controls when the funds will be captured from the customer's account.
2830
       *
2831
       * <p>Equal to {@code manual}.
2832
       */
2833
      @SerializedName("capture_method")
2834
      String captureMethod;
2835
    }
2836

2837
    /**
2838
     * For more details about Oxxo, please refer to the <a href="https://docs.stripe.com/api">API
2839
     * Reference.</a>
2840
     */
2841
    @Getter
2842
    @Setter
2843
    @EqualsAndHashCode(callSuper = false)
2844
    public static class Oxxo extends StripeObject {
×
2845
      /**
2846
       * The number of calendar days before an OXXO invoice expires. For example, if you create an
2847
       * OXXO invoice on Monday and you set expires_after_days to 2, the OXXO invoice will expire on
2848
       * Wednesday at 23:59 America/Mexico_City time.
2849
       */
2850
      @SerializedName("expires_after_days")
2851
      Long expiresAfterDays;
2852

2853
      /**
2854
       * Indicates that you intend to make future payments with this PaymentIntent's payment method.
2855
       *
2856
       * <p>If you provide a Customer with the PaymentIntent, you can use this parameter to <a
2857
       * href="https://stripe.com/payments/save-during-payment">attach the payment method</a> to the
2858
       * Customer after the PaymentIntent is confirmed and the customer completes any required
2859
       * actions. If you don't provide a Customer, you can still <a
2860
       * href="https://stripe.com/api/payment_methods/attach">attach</a> the payment method to a
2861
       * Customer after the transaction completes.
2862
       *
2863
       * <p>If the payment method is {@code card_present} and isn't a digital wallet, Stripe creates
2864
       * and attaches a <a
2865
       * href="https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card">generated_card</a>
2866
       * payment method representing the card to the Customer instead.
2867
       *
2868
       * <p>When processing card payments, Stripe uses {@code setup_future_usage} to help you comply
2869
       * with regional legislation and network rules, such as <a
2870
       * href="https://stripe.com/strong-customer-authentication">SCA</a>.
2871
       *
2872
       * <p>Equal to {@code none}.
2873
       */
2874
      @SerializedName("setup_future_usage")
2875
      String setupFutureUsage;
2876
    }
2877

2878
    /**
2879
     * For more details about P24, please refer to the <a href="https://docs.stripe.com/api">API
2880
     * Reference.</a>
2881
     */
2882
    @Getter
2883
    @Setter
2884
    @EqualsAndHashCode(callSuper = false)
2885
    public static class P24 extends StripeObject {
×
2886
      /**
2887
       * Indicates that you intend to make future payments with this PaymentIntent's payment method.
2888
       *
2889
       * <p>If you provide a Customer with the PaymentIntent, you can use this parameter to <a
2890
       * href="https://stripe.com/payments/save-during-payment">attach the payment method</a> to the
2891
       * Customer after the PaymentIntent is confirmed and the customer completes any required
2892
       * actions. If you don't provide a Customer, you can still <a
2893
       * href="https://stripe.com/api/payment_methods/attach">attach</a> the payment method to a
2894
       * Customer after the transaction completes.
2895
       *
2896
       * <p>If the payment method is {@code card_present} and isn't a digital wallet, Stripe creates
2897
       * and attaches a <a
2898
       * href="https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card">generated_card</a>
2899
       * payment method representing the card to the Customer instead.
2900
       *
2901
       * <p>When processing card payments, Stripe uses {@code setup_future_usage} to help you comply
2902
       * with regional legislation and network rules, such as <a
2903
       * href="https://stripe.com/strong-customer-authentication">SCA</a>.
2904
       *
2905
       * <p>Equal to {@code none}.
2906
       */
2907
      @SerializedName("setup_future_usage")
2908
      String setupFutureUsage;
2909
    }
2910

2911
    /**
2912
     * For more details about Payco, please refer to the <a href="https://docs.stripe.com/api">API
2913
     * Reference.</a>
2914
     */
2915
    @Getter
2916
    @Setter
2917
    @EqualsAndHashCode(callSuper = false)
2918
    public static class Payco extends StripeObject {
×
2919
      /**
2920
       * Controls when the funds will be captured from the customer's account.
2921
       *
2922
       * <p>Equal to {@code manual}.
2923
       */
2924
      @SerializedName("capture_method")
2925
      String captureMethod;
2926
    }
2927

2928
    /**
2929
     * For more details about Paynow, please refer to the <a href="https://docs.stripe.com/api">API
2930
     * Reference.</a>
2931
     */
2932
    @Getter
2933
    @Setter
2934
    @EqualsAndHashCode(callSuper = false)
2935
    public static class Paynow extends StripeObject {
×
2936
      /**
2937
       * Indicates that you intend to make future payments with this PaymentIntent's payment method.
2938
       *
2939
       * <p>If you provide a Customer with the PaymentIntent, you can use this parameter to <a
2940
       * href="https://stripe.com/payments/save-during-payment">attach the payment method</a> to the
2941
       * Customer after the PaymentIntent is confirmed and the customer completes any required
2942
       * actions. If you don't provide a Customer, you can still <a
2943
       * href="https://stripe.com/api/payment_methods/attach">attach</a> the payment method to a
2944
       * Customer after the transaction completes.
2945
       *
2946
       * <p>If the payment method is {@code card_present} and isn't a digital wallet, Stripe creates
2947
       * and attaches a <a
2948
       * href="https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card">generated_card</a>
2949
       * payment method representing the card to the Customer instead.
2950
       *
2951
       * <p>When processing card payments, Stripe uses {@code setup_future_usage} to help you comply
2952
       * with regional legislation and network rules, such as <a
2953
       * href="https://stripe.com/strong-customer-authentication">SCA</a>.
2954
       *
2955
       * <p>Equal to {@code none}.
2956
       */
2957
      @SerializedName("setup_future_usage")
2958
      String setupFutureUsage;
2959
    }
2960

2961
    /**
2962
     * For more details about Paypal, please refer to the <a href="https://docs.stripe.com/api">API
2963
     * Reference.</a>
2964
     */
2965
    @Getter
2966
    @Setter
2967
    @EqualsAndHashCode(callSuper = false)
2968
    public static class Paypal extends StripeObject {
×
2969
      /**
2970
       * Controls when the funds will be captured from the customer's account.
2971
       *
2972
       * <p>Equal to {@code manual}.
2973
       */
2974
      @SerializedName("capture_method")
2975
      String captureMethod;
2976

2977
      /** Preferred locale of the PayPal checkout page that the customer is redirected to. */
2978
      @SerializedName("preferred_locale")
2979
      String preferredLocale;
2980

2981
      /**
2982
       * A reference of the PayPal transaction visible to customer which is mapped to PayPal's
2983
       * invoice ID. This must be a globally unique ID if you have configured in your PayPal
2984
       * settings to block multiple payments per invoice ID.
2985
       */
2986
      @SerializedName("reference")
2987
      String reference;
2988

2989
      /**
2990
       * Indicates that you intend to make future payments with this PaymentIntent's payment method.
2991
       *
2992
       * <p>If you provide a Customer with the PaymentIntent, you can use this parameter to <a
2993
       * href="https://stripe.com/payments/save-during-payment">attach the payment method</a> to the
2994
       * Customer after the PaymentIntent is confirmed and the customer completes any required
2995
       * actions. If you don't provide a Customer, you can still <a
2996
       * href="https://stripe.com/api/payment_methods/attach">attach</a> the payment method to a
2997
       * Customer after the transaction completes.
2998
       *
2999
       * <p>If the payment method is {@code card_present} and isn't a digital wallet, Stripe creates
3000
       * and attaches a <a
3001
       * href="https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card">generated_card</a>
3002
       * payment method representing the card to the Customer instead.
3003
       *
3004
       * <p>When processing card payments, Stripe uses {@code setup_future_usage} to help you comply
3005
       * with regional legislation and network rules, such as <a
3006
       * href="https://stripe.com/strong-customer-authentication">SCA</a>.
3007
       *
3008
       * <p>One of {@code none}, or {@code off_session}.
3009
       */
3010
      @SerializedName("setup_future_usage")
3011
      String setupFutureUsage;
3012

3013
      /**
3014
       * The Stripe connected account IDs of the sellers on the platform for this transaction
3015
       * (optional). Only allowed when <a
3016
       * href="https://stripe.com/docs/connect/separate-charges-and-transfers">separate charges and
3017
       * transfers</a> are used.
3018
       */
3019
      @SerializedName("subsellers")
3020
      List<String> subsellers;
3021
    }
3022

3023
    /**
3024
     * For more details about Payto, please refer to the <a href="https://docs.stripe.com/api">API
3025
     * Reference.</a>
3026
     */
3027
    @Getter
3028
    @Setter
3029
    @EqualsAndHashCode(callSuper = false)
3030
    public static class Payto extends StripeObject {
×
3031
      @SerializedName("mandate_options")
3032
      MandateOptions mandateOptions;
3033

3034
      /**
3035
       * Indicates that you intend to make future payments with this PaymentIntent's payment method.
3036
       *
3037
       * <p>If you provide a Customer with the PaymentIntent, you can use this parameter to <a
3038
       * href="https://stripe.com/payments/save-during-payment">attach the payment method</a> to the
3039
       * Customer after the PaymentIntent is confirmed and the customer completes any required
3040
       * actions. If you don't provide a Customer, you can still <a
3041
       * href="https://stripe.com/api/payment_methods/attach">attach</a> the payment method to a
3042
       * Customer after the transaction completes.
3043
       *
3044
       * <p>If the payment method is {@code card_present} and isn't a digital wallet, Stripe creates
3045
       * and attaches a <a
3046
       * href="https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card">generated_card</a>
3047
       * payment method representing the card to the Customer instead.
3048
       *
3049
       * <p>When processing card payments, Stripe uses {@code setup_future_usage} to help you comply
3050
       * with regional legislation and network rules, such as <a
3051
       * href="https://stripe.com/strong-customer-authentication">SCA</a>.
3052
       *
3053
       * <p>One of {@code none}, or {@code off_session}.
3054
       */
3055
      @SerializedName("setup_future_usage")
3056
      String setupFutureUsage;
3057

3058
      /**
3059
       * For more details about MandateOptions, please refer to the <a
3060
       * href="https://docs.stripe.com/api">API Reference.</a>
3061
       */
3062
      @Getter
3063
      @Setter
3064
      @EqualsAndHashCode(callSuper = false)
3065
      public static class MandateOptions extends StripeObject {
×
3066
        /**
3067
         * Amount that will be collected. It is required when {@code amount_type} is {@code fixed}.
3068
         */
3069
        @SerializedName("amount")
3070
        Long amount;
3071

3072
        /**
3073
         * The type of amount that will be collected. The amount charged must be exact or up to the
3074
         * value of {@code amount} param for {@code fixed} or {@code maximum} type respectively.
3075
         *
3076
         * <p>One of {@code fixed}, or {@code maximum}.
3077
         */
3078
        @SerializedName("amount_type")
3079
        String amountType;
3080

3081
        /**
3082
         * Date, in YYYY-MM-DD format, after which payments will not be collected. Defaults to no
3083
         * end date.
3084
         */
3085
        @SerializedName("end_date")
3086
        String endDate;
3087

3088
        /**
3089
         * The periodicity at which payments will be collected.
3090
         *
3091
         * <p>One of {@code adhoc}, {@code annual}, {@code daily}, {@code fortnightly}, {@code
3092
         * monthly}, {@code quarterly}, {@code semi_annual}, or {@code weekly}.
3093
         */
3094
        @SerializedName("payment_schedule")
3095
        String paymentSchedule;
3096

3097
        /**
3098
         * The number of payments that will be made during a payment period. Defaults to 1 except
3099
         * for when {@code payment_schedule} is {@code adhoc}. In that case, it defaults to no
3100
         * limit.
3101
         */
3102
        @SerializedName("payments_per_period")
3103
        Long paymentsPerPeriod;
3104

3105
        /**
3106
         * The purpose for which payments are made. Defaults to retail.
3107
         *
3108
         * <p>One of {@code dependant_support}, {@code government}, {@code loan}, {@code mortgage},
3109
         * {@code other}, {@code pension}, {@code personal}, {@code retail}, {@code salary}, {@code
3110
         * tax}, or {@code utility}.
3111
         */
3112
        @SerializedName("purpose")
3113
        String purpose;
3114

3115
        /**
3116
         * Date, in YYYY-MM-DD format, from which payments will be collected. Defaults to
3117
         * confirmation time.
3118
         */
3119
        @SerializedName("start_date")
3120
        String startDate;
3121
      }
3122
    }
3123

3124
    /**
3125
     * For more details about Pix, please refer to the <a href="https://docs.stripe.com/api">API
3126
     * Reference.</a>
3127
     */
3128
    @Getter
3129
    @Setter
3130
    @EqualsAndHashCode(callSuper = false)
3131
    public static class Pix extends StripeObject {
×
3132
      /** The number of seconds after which Pix payment will expire. */
3133
      @SerializedName("expires_after_seconds")
3134
      Long expiresAfterSeconds;
3135
    }
3136

3137
    /**
3138
     * For more details about RevolutPay, please refer to the <a
3139
     * href="https://docs.stripe.com/api">API Reference.</a>
3140
     */
3141
    @Getter
3142
    @Setter
3143
    @EqualsAndHashCode(callSuper = false)
3144
    public static class RevolutPay extends StripeObject {
×
3145
      /**
3146
       * Indicates that you intend to make future payments with this PaymentIntent's payment method.
3147
       *
3148
       * <p>If you provide a Customer with the PaymentIntent, you can use this parameter to <a
3149
       * href="https://stripe.com/payments/save-during-payment">attach the payment method</a> to the
3150
       * Customer after the PaymentIntent is confirmed and the customer completes any required
3151
       * actions. If you don't provide a Customer, you can still <a
3152
       * href="https://stripe.com/api/payment_methods/attach">attach</a> the payment method to a
3153
       * Customer after the transaction completes.
3154
       *
3155
       * <p>If the payment method is {@code card_present} and isn't a digital wallet, Stripe creates
3156
       * and attaches a <a
3157
       * href="https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card">generated_card</a>
3158
       * payment method representing the card to the Customer instead.
3159
       *
3160
       * <p>When processing card payments, Stripe uses {@code setup_future_usage} to help you comply
3161
       * with regional legislation and network rules, such as <a
3162
       * href="https://stripe.com/strong-customer-authentication">SCA</a>.
3163
       *
3164
       * <p>One of {@code none}, or {@code off_session}.
3165
       */
3166
      @SerializedName("setup_future_usage")
3167
      String setupFutureUsage;
3168
    }
3169

3170
    /**
3171
     * For more details about SamsungPay, please refer to the <a
3172
     * href="https://docs.stripe.com/api">API Reference.</a>
3173
     */
3174
    @Getter
3175
    @Setter
3176
    @EqualsAndHashCode(callSuper = false)
3177
    public static class SamsungPay extends StripeObject {
×
3178
      /**
3179
       * Controls when the funds will be captured from the customer's account.
3180
       *
3181
       * <p>Equal to {@code manual}.
3182
       */
3183
      @SerializedName("capture_method")
3184
      String captureMethod;
3185
    }
3186

3187
    /**
3188
     * For more details about SepaDebit, please refer to the <a
3189
     * href="https://docs.stripe.com/api">API Reference.</a>
3190
     */
3191
    @Getter
3192
    @Setter
3193
    @EqualsAndHashCode(callSuper = false)
3194
    public static class SepaDebit extends StripeObject {
×
3195
      @SerializedName("mandate_options")
3196
      MandateOptions mandateOptions;
3197

3198
      /**
3199
       * Indicates that you intend to make future payments with this PaymentIntent's payment method.
3200
       *
3201
       * <p>If you provide a Customer with the PaymentIntent, you can use this parameter to <a
3202
       * href="https://stripe.com/payments/save-during-payment">attach the payment method</a> to the
3203
       * Customer after the PaymentIntent is confirmed and the customer completes any required
3204
       * actions. If you don't provide a Customer, you can still <a
3205
       * href="https://stripe.com/api/payment_methods/attach">attach</a> the payment method to a
3206
       * Customer after the transaction completes.
3207
       *
3208
       * <p>If the payment method is {@code card_present} and isn't a digital wallet, Stripe creates
3209
       * and attaches a <a
3210
       * href="https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card">generated_card</a>
3211
       * payment method representing the card to the Customer instead.
3212
       *
3213
       * <p>When processing card payments, Stripe uses {@code setup_future_usage} to help you comply
3214
       * with regional legislation and network rules, such as <a
3215
       * href="https://stripe.com/strong-customer-authentication">SCA</a>.
3216
       *
3217
       * <p>One of {@code none}, {@code off_session}, or {@code on_session}.
3218
       */
3219
      @SerializedName("setup_future_usage")
3220
      String setupFutureUsage;
3221

3222
      /**
3223
       * For more details about MandateOptions, please refer to the <a
3224
       * href="https://docs.stripe.com/api">API Reference.</a>
3225
       */
3226
      @Getter
3227
      @Setter
3228
      @EqualsAndHashCode(callSuper = false)
NEW
3229
      public static class MandateOptions extends StripeObject {}
×
3230
    }
3231

3232
    /**
3233
     * For more details about Sofort, please refer to the <a href="https://docs.stripe.com/api">API
3234
     * Reference.</a>
3235
     */
3236
    @Getter
3237
    @Setter
3238
    @EqualsAndHashCode(callSuper = false)
3239
    public static class Sofort extends StripeObject {
×
3240
      /**
3241
       * Indicates that you intend to make future payments with this PaymentIntent's payment method.
3242
       *
3243
       * <p>If you provide a Customer with the PaymentIntent, you can use this parameter to <a
3244
       * href="https://stripe.com/payments/save-during-payment">attach the payment method</a> to the
3245
       * Customer after the PaymentIntent is confirmed and the customer completes any required
3246
       * actions. If you don't provide a Customer, you can still <a
3247
       * href="https://stripe.com/api/payment_methods/attach">attach</a> the payment method to a
3248
       * Customer after the transaction completes.
3249
       *
3250
       * <p>If the payment method is {@code card_present} and isn't a digital wallet, Stripe creates
3251
       * and attaches a <a
3252
       * href="https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card">generated_card</a>
3253
       * payment method representing the card to the Customer instead.
3254
       *
3255
       * <p>When processing card payments, Stripe uses {@code setup_future_usage} to help you comply
3256
       * with regional legislation and network rules, such as <a
3257
       * href="https://stripe.com/strong-customer-authentication">SCA</a>.
3258
       *
3259
       * <p>Equal to {@code none}.
3260
       */
3261
      @SerializedName("setup_future_usage")
3262
      String setupFutureUsage;
3263
    }
3264

3265
    /**
3266
     * For more details about Swish, please refer to the <a href="https://docs.stripe.com/api">API
3267
     * Reference.</a>
3268
     */
3269
    @Getter
3270
    @Setter
3271
    @EqualsAndHashCode(callSuper = false)
3272
    public static class Swish extends StripeObject {
×
3273
      /**
3274
       * The order reference that will be displayed to customers in the Swish application. Defaults
3275
       * to the {@code id} of the Payment Intent.
3276
       */
3277
      @SerializedName("reference")
3278
      String reference;
3279
    }
3280

3281
    /**
3282
     * For more details about UsBankAccount, please refer to the <a
3283
     * href="https://docs.stripe.com/api">API Reference.</a>
3284
     */
3285
    @Getter
3286
    @Setter
3287
    @EqualsAndHashCode(callSuper = false)
3288
    public static class UsBankAccount extends StripeObject {
×
3289
      @SerializedName("financial_connections")
3290
      FinancialConnections financialConnections;
3291

3292
      /**
3293
       * Indicates that you intend to make future payments with this PaymentIntent's payment method.
3294
       *
3295
       * <p>If you provide a Customer with the PaymentIntent, you can use this parameter to <a
3296
       * href="https://stripe.com/payments/save-during-payment">attach the payment method</a> to the
3297
       * Customer after the PaymentIntent is confirmed and the customer completes any required
3298
       * actions. If you don't provide a Customer, you can still <a
3299
       * href="https://stripe.com/api/payment_methods/attach">attach</a> the payment method to a
3300
       * Customer after the transaction completes.
3301
       *
3302
       * <p>If the payment method is {@code card_present} and isn't a digital wallet, Stripe creates
3303
       * and attaches a <a
3304
       * href="https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card">generated_card</a>
3305
       * payment method representing the card to the Customer instead.
3306
       *
3307
       * <p>When processing card payments, Stripe uses {@code setup_future_usage} to help you comply
3308
       * with regional legislation and network rules, such as <a
3309
       * href="https://stripe.com/strong-customer-authentication">SCA</a>.
3310
       *
3311
       * <p>One of {@code none}, {@code off_session}, or {@code on_session}.
3312
       */
3313
      @SerializedName("setup_future_usage")
3314
      String setupFutureUsage;
3315

3316
      /**
3317
       * Bank account verification method.
3318
       *
3319
       * <p>One of {@code automatic}, or {@code instant}.
3320
       */
3321
      @SerializedName("verification_method")
3322
      String verificationMethod;
3323

3324
      /**
3325
       * For more details about FinancialConnections, please refer to the <a
3326
       * href="https://docs.stripe.com/api">API Reference.</a>
3327
       */
3328
      @Getter
3329
      @Setter
3330
      @EqualsAndHashCode(callSuper = false)
3331
      public static class FinancialConnections extends StripeObject {
×
3332
        @SerializedName("filters")
3333
        Filters filters;
3334

3335
        @SerializedName("manual_entry")
3336
        ManualEntry manualEntry;
3337

3338
        /**
3339
         * The list of permissions to request. The {@code payment_method} permission must be
3340
         * included.
3341
         */
3342
        @SerializedName("permissions")
3343
        List<String> permissions;
3344

3345
        /** Data features requested to be retrieved upon account creation. */
3346
        @SerializedName("prefetch")
3347
        List<String> prefetch;
3348

3349
        /**
3350
         * For webview integrations only. Upon completing OAuth login in the native browser, the
3351
         * user will be redirected to this URL to return to your app.
3352
         */
3353
        @SerializedName("return_url")
3354
        String returnUrl;
3355

3356
        /**
3357
         * For more details about Filters, please refer to the <a
3358
         * href="https://docs.stripe.com/api">API Reference.</a>
3359
         */
3360
        @Getter
3361
        @Setter
3362
        @EqualsAndHashCode(callSuper = false)
3363
        public static class Filters extends StripeObject {
×
3364
          /**
3365
           * The account subcategories to use to filter for possible accounts to link. Valid
3366
           * subcategories are {@code checking} and {@code savings}.
3367
           */
3368
          @SerializedName("account_subcategories")
3369
          List<String> accountSubcategories;
3370

3371
          /** The institution to use to filter for possible accounts to link. */
3372
          @SerializedName("institution")
3373
          String institution;
3374
        }
3375

3376
        /**
3377
         * For more details about ManualEntry, please refer to the <a
3378
         * href="https://docs.stripe.com/api">API Reference.</a>
3379
         */
3380
        @Getter
3381
        @Setter
3382
        @EqualsAndHashCode(callSuper = false)
3383
        public static class ManualEntry extends StripeObject {
×
3384
          /**
3385
           * Settings for configuring manual entry of account details.
3386
           *
3387
           * <p>One of {@code automatic}, or {@code custom}.
3388
           */
3389
          @SerializedName("mode")
3390
          String mode;
3391
        }
3392
      }
3393
    }
3394
  }
3395

3396
  /**
3397
   * For more details about Permissions, please refer to the <a
3398
   * href="https://docs.stripe.com/api">API Reference.</a>
3399
   */
3400
  @Getter
3401
  @Setter
3402
  @EqualsAndHashCode(callSuper = false)
3403
  public static class Permissions extends StripeObject {
×
3404
    /** Permissions for updating the Checkout Session. */
3405
    @SerializedName("update")
3406
    Update update;
3407

3408
    /**
3409
     * For more details about Update, please refer to the <a href="https://docs.stripe.com/api">API
3410
     * Reference.</a>
3411
     */
3412
    @Getter
3413
    @Setter
3414
    @EqualsAndHashCode(callSuper = false)
3415
    public static class Update extends StripeObject {
×
3416
      /**
3417
       * Determines which entity is allowed to update the shipping details.
3418
       *
3419
       * <p>Default is {@code client_only}. Stripe Checkout client will automatically update the
3420
       * shipping details. If set to {@code server_only}, only your server is allowed to update the
3421
       * shipping details.
3422
       *
3423
       * <p>When set to {@code server_only}, you must add the onShippingDetailsChange event handler
3424
       * when initializing the Stripe Checkout client and manually update the shipping details from
3425
       * your server using the Stripe API.
3426
       *
3427
       * <p>One of {@code client_only}, or {@code server_only}.
3428
       */
3429
      @SerializedName("shipping_details")
3430
      String shippingDetails;
3431
    }
3432
  }
3433

3434
  /**
3435
   * For more details about PhoneNumberCollection, please refer to the <a
3436
   * href="https://docs.stripe.com/api">API Reference.</a>
3437
   */
3438
  @Getter
3439
  @Setter
3440
  @EqualsAndHashCode(callSuper = false)
3441
  public static class PhoneNumberCollection extends StripeObject {
1✔
3442
    /** Indicates whether phone number collection is enabled for the session. */
3443
    @SerializedName("enabled")
3444
    Boolean enabled;
3445
  }
3446

3447
  /**
3448
   * For more details about SavedPaymentMethodOptions, please refer to the <a
3449
   * href="https://docs.stripe.com/api">API Reference.</a>
3450
   */
3451
  @Getter
3452
  @Setter
3453
  @EqualsAndHashCode(callSuper = false)
3454
  public static class SavedPaymentMethodOptions extends StripeObject {
×
3455
    /**
3456
     * Uses the {@code allow_redisplay} value of each saved payment method to filter the set
3457
     * presented to a returning customer. By default, only saved payment methods with
3458
     * ’allow_redisplay: ‘always’ are shown in Checkout.
3459
     */
3460
    @SerializedName("allow_redisplay_filters")
3461
    List<String> allowRedisplayFilters;
3462

3463
    /**
3464
     * Enable customers to choose if they wish to remove their saved payment methods. Disabled by
3465
     * default.
3466
     *
3467
     * <p>One of {@code disabled}, or {@code enabled}.
3468
     */
3469
    @SerializedName("payment_method_remove")
3470
    String paymentMethodRemove;
3471

3472
    /**
3473
     * Enable customers to choose if they wish to save their payment method for future use. Disabled
3474
     * by default.
3475
     *
3476
     * <p>One of {@code disabled}, or {@code enabled}.
3477
     */
3478
    @SerializedName("payment_method_save")
3479
    String paymentMethodSave;
3480
  }
3481

3482
  /**
3483
   * For more details about ShippingAddressCollection, please refer to the <a
3484
   * href="https://docs.stripe.com/api">API Reference.</a>
3485
   */
3486
  @Getter
3487
  @Setter
3488
  @EqualsAndHashCode(callSuper = false)
3489
  public static class ShippingAddressCollection extends StripeObject {
×
3490
    /**
3491
     * An array of two-letter ISO country codes representing which countries Checkout should provide
3492
     * as options for shipping locations. Unsupported country codes: {@code AS, CX, CC, CU, HM, IR,
3493
     * KP, MH, FM, NF, MP, PW, SD, SY, UM, VI}.
3494
     */
3495
    @SerializedName("allowed_countries")
3496
    List<String> allowedCountries;
3497
  }
3498

3499
  /**
3500
   * For more details about ShippingCost, please refer to the <a
3501
   * href="https://docs.stripe.com/api">API Reference.</a>
3502
   */
3503
  @Getter
3504
  @Setter
3505
  @EqualsAndHashCode(callSuper = false)
3506
  public static class ShippingCost extends StripeObject {
×
3507
    /** Total shipping cost before any discounts or taxes are applied. */
3508
    @SerializedName("amount_subtotal")
3509
    Long amountSubtotal;
3510

3511
    /** Total tax amount applied due to shipping costs. If no tax was applied, defaults to 0. */
3512
    @SerializedName("amount_tax")
3513
    Long amountTax;
3514

3515
    /** Total shipping cost after discounts and taxes are applied. */
3516
    @SerializedName("amount_total")
3517
    Long amountTotal;
3518

3519
    /** The ID of the ShippingRate for this order. */
3520
    @SerializedName("shipping_rate")
3521
    @Getter(lombok.AccessLevel.NONE)
3522
    @Setter(lombok.AccessLevel.NONE)
3523
    ExpandableField<ShippingRate> shippingRate;
3524

3525
    /** The taxes applied to the shipping rate. */
3526
    @SerializedName("taxes")
3527
    List<Session.ShippingCost.Tax> taxes;
3528

3529
    /** Get ID of expandable {@code shippingRate} object. */
3530
    public String getShippingRate() {
3531
      return (this.shippingRate != null) ? this.shippingRate.getId() : null;
×
3532
    }
3533

3534
    public void setShippingRate(String id) {
3535
      this.shippingRate = ApiResource.setExpandableFieldId(id, this.shippingRate);
×
3536
    }
×
3537

3538
    /** Get expanded {@code shippingRate}. */
3539
    public ShippingRate getShippingRateObject() {
3540
      return (this.shippingRate != null) ? this.shippingRate.getExpanded() : null;
×
3541
    }
3542

3543
    public void setShippingRateObject(ShippingRate expandableObject) {
3544
      this.shippingRate =
×
3545
          new ExpandableField<ShippingRate>(expandableObject.getId(), expandableObject);
×
3546
    }
×
3547

3548
    /**
3549
     * For more details about Tax, please refer to the <a href="https://docs.stripe.com/api">API
3550
     * Reference.</a>
3551
     */
3552
    @Getter
3553
    @Setter
3554
    @EqualsAndHashCode(callSuper = false)
3555
    public static class Tax extends StripeObject {
×
3556
      /** Amount of tax applied for this rate. */
3557
      @SerializedName("amount")
3558
      Long amount;
3559

3560
      /**
3561
       * Tax rates can be applied to <a
3562
       * href="https://stripe.com/docs/billing/invoices/tax-rates">invoices</a>, <a
3563
       * href="https://stripe.com/docs/billing/subscriptions/taxes">subscriptions</a> and <a
3564
       * href="https://stripe.com/docs/payments/checkout/set-up-a-subscription#tax-rates">Checkout
3565
       * Sessions</a> to collect tax.
3566
       *
3567
       * <p>Related guide: <a href="https://stripe.com/docs/billing/taxes/tax-rates">Tax rates</a>
3568
       */
3569
      @SerializedName("rate")
3570
      TaxRate rate;
3571

3572
      /**
3573
       * The reasoning behind this tax, for example, if the product is tax exempt. The possible
3574
       * values for this field may be extended as new tax rules are supported.
3575
       *
3576
       * <p>One of {@code customer_exempt}, {@code not_collecting}, {@code not_subject_to_tax},
3577
       * {@code not_supported}, {@code portion_product_exempt}, {@code portion_reduced_rated},
3578
       * {@code portion_standard_rated}, {@code product_exempt}, {@code product_exempt_holiday},
3579
       * {@code proportionally_rated}, {@code reduced_rated}, {@code reverse_charge}, {@code
3580
       * standard_rated}, {@code taxable_basis_reduced}, or {@code zero_rated}.
3581
       */
3582
      @SerializedName("taxability_reason")
3583
      String taxabilityReason;
3584

3585
      /** The amount on which tax is calculated, in cents (or local equivalent). */
3586
      @SerializedName("taxable_amount")
3587
      Long taxableAmount;
3588
    }
3589
  }
3590

3591
  /**
3592
   * For more details about ShippingOption, please refer to the <a
3593
   * href="https://docs.stripe.com/api">API Reference.</a>
3594
   */
3595
  @Getter
3596
  @Setter
3597
  @EqualsAndHashCode(callSuper = false)
3598
  public static class ShippingOption extends StripeObject {
×
3599
    /** A non-negative integer in cents representing how much to charge. */
3600
    @SerializedName("shipping_amount")
3601
    Long shippingAmount;
3602

3603
    /** The shipping rate. */
3604
    @SerializedName("shipping_rate")
3605
    @Getter(lombok.AccessLevel.NONE)
3606
    @Setter(lombok.AccessLevel.NONE)
3607
    ExpandableField<ShippingRate> shippingRate;
3608

3609
    /** Get ID of expandable {@code shippingRate} object. */
3610
    public String getShippingRate() {
3611
      return (this.shippingRate != null) ? this.shippingRate.getId() : null;
×
3612
    }
3613

3614
    public void setShippingRate(String id) {
3615
      this.shippingRate = ApiResource.setExpandableFieldId(id, this.shippingRate);
×
3616
    }
×
3617

3618
    /** Get expanded {@code shippingRate}. */
3619
    public ShippingRate getShippingRateObject() {
3620
      return (this.shippingRate != null) ? this.shippingRate.getExpanded() : null;
×
3621
    }
3622

3623
    public void setShippingRateObject(ShippingRate expandableObject) {
3624
      this.shippingRate =
×
3625
          new ExpandableField<ShippingRate>(expandableObject.getId(), expandableObject);
×
3626
    }
×
3627
  }
3628

3629
  /**
3630
   * For more details about TaxIdCollection, please refer to the <a
3631
   * href="https://docs.stripe.com/api">API Reference.</a>
3632
   */
3633
  @Getter
3634
  @Setter
3635
  @EqualsAndHashCode(callSuper = false)
3636
  public static class TaxIdCollection extends StripeObject {
×
3637
    /** Indicates whether tax ID collection is enabled for the session. */
3638
    @SerializedName("enabled")
3639
    Boolean enabled;
3640

3641
    /**
3642
     * Indicates whether a tax ID is required on the payment page
3643
     *
3644
     * <p>One of {@code if_supported}, or {@code never}.
3645
     */
3646
    @SerializedName("required")
3647
    String required;
3648
  }
3649

3650
  /**
3651
   * For more details about TotalDetails, please refer to the <a
3652
   * href="https://docs.stripe.com/api">API Reference.</a>
3653
   */
3654
  @Getter
3655
  @Setter
3656
  @EqualsAndHashCode(callSuper = false)
3657
  public static class TotalDetails extends StripeObject {
×
3658
    /** This is the sum of all the discounts. */
3659
    @SerializedName("amount_discount")
3660
    Long amountDiscount;
3661

3662
    /** This is the sum of all the shipping amounts. */
3663
    @SerializedName("amount_shipping")
3664
    Long amountShipping;
3665

3666
    /** This is the sum of all the tax amounts. */
3667
    @SerializedName("amount_tax")
3668
    Long amountTax;
3669

3670
    @SerializedName("breakdown")
3671
    Breakdown breakdown;
3672

3673
    /**
3674
     * For more details about Breakdown, please refer to the <a
3675
     * href="https://docs.stripe.com/api">API Reference.</a>
3676
     */
3677
    @Getter
3678
    @Setter
3679
    @EqualsAndHashCode(callSuper = false)
3680
    public static class Breakdown extends StripeObject {
×
3681
      /** The aggregated discounts. */
3682
      @SerializedName("discounts")
3683
      List<Session.TotalDetails.Breakdown.Discount> discounts;
3684

3685
      /** The aggregated tax amounts by rate. */
3686
      @SerializedName("taxes")
3687
      List<Session.TotalDetails.Breakdown.Tax> taxes;
3688

3689
      /**
3690
       * For more details about Discount, please refer to the <a
3691
       * href="https://docs.stripe.com/api">API Reference.</a>
3692
       */
3693
      @Getter
3694
      @Setter
3695
      @EqualsAndHashCode(callSuper = false)
3696
      public static class Discount extends StripeObject {
×
3697
        /** The amount discounted. */
3698
        @SerializedName("amount")
3699
        Long amount;
3700

3701
        /**
3702
         * A discount represents the actual application of a <a
3703
         * href="https://stripe.com/docs/api#coupons">coupon</a> or <a
3704
         * href="https://stripe.com/docs/api#promotion_codes">promotion code</a>. It contains
3705
         * information about when the discount began, when it will end, and what it is applied to.
3706
         *
3707
         * <p>Related guide: <a
3708
         * href="https://stripe.com/docs/billing/subscriptions/discounts">Applying discounts to
3709
         * subscriptions</a>
3710
         */
3711
        @SerializedName("discount")
3712
        com.stripe.model.Discount discount;
3713
      }
3714

3715
      /**
3716
       * For more details about Tax, please refer to the <a href="https://docs.stripe.com/api">API
3717
       * Reference.</a>
3718
       */
3719
      @Getter
3720
      @Setter
3721
      @EqualsAndHashCode(callSuper = false)
3722
      public static class Tax extends StripeObject {
×
3723
        /** Amount of tax applied for this rate. */
3724
        @SerializedName("amount")
3725
        Long amount;
3726

3727
        /**
3728
         * Tax rates can be applied to <a
3729
         * href="https://stripe.com/docs/billing/invoices/tax-rates">invoices</a>, <a
3730
         * href="https://stripe.com/docs/billing/subscriptions/taxes">subscriptions</a> and <a
3731
         * href="https://stripe.com/docs/payments/checkout/set-up-a-subscription#tax-rates">Checkout
3732
         * Sessions</a> to collect tax.
3733
         *
3734
         * <p>Related guide: <a href="https://stripe.com/docs/billing/taxes/tax-rates">Tax rates</a>
3735
         */
3736
        @SerializedName("rate")
3737
        TaxRate rate;
3738

3739
        /**
3740
         * The reasoning behind this tax, for example, if the product is tax exempt. The possible
3741
         * values for this field may be extended as new tax rules are supported.
3742
         *
3743
         * <p>One of {@code customer_exempt}, {@code not_collecting}, {@code not_subject_to_tax},
3744
         * {@code not_supported}, {@code portion_product_exempt}, {@code portion_reduced_rated},
3745
         * {@code portion_standard_rated}, {@code product_exempt}, {@code product_exempt_holiday},
3746
         * {@code proportionally_rated}, {@code reduced_rated}, {@code reverse_charge}, {@code
3747
         * standard_rated}, {@code taxable_basis_reduced}, or {@code zero_rated}.
3748
         */
3749
        @SerializedName("taxability_reason")
3750
        String taxabilityReason;
3751

3752
        /** The amount on which tax is calculated, in cents (or local equivalent). */
3753
        @SerializedName("taxable_amount")
3754
        Long taxableAmount;
3755
      }
3756
    }
3757
  }
3758

3759
  @Override
3760
  public void setResponseGetter(StripeResponseGetter responseGetter) {
3761
    super.setResponseGetter(responseGetter);
1✔
3762
    trySetResponseGetter(adaptivePricing, responseGetter);
1✔
3763
    trySetResponseGetter(afterExpiration, responseGetter);
1✔
3764
    trySetResponseGetter(automaticTax, responseGetter);
1✔
3765
    trySetResponseGetter(collectedInformation, responseGetter);
1✔
3766
    trySetResponseGetter(consent, responseGetter);
1✔
3767
    trySetResponseGetter(consentCollection, responseGetter);
1✔
3768
    trySetResponseGetter(currencyConversion, responseGetter);
1✔
3769
    trySetResponseGetter(customText, responseGetter);
1✔
3770
    trySetResponseGetter(customer, responseGetter);
1✔
3771
    trySetResponseGetter(customerDetails, responseGetter);
1✔
3772
    trySetResponseGetter(invoice, responseGetter);
1✔
3773
    trySetResponseGetter(invoiceCreation, responseGetter);
1✔
3774
    trySetResponseGetter(lineItems, responseGetter);
1✔
3775
    trySetResponseGetter(paymentIntent, responseGetter);
1✔
3776
    trySetResponseGetter(paymentLink, responseGetter);
1✔
3777
    trySetResponseGetter(paymentMethodConfigurationDetails, responseGetter);
1✔
3778
    trySetResponseGetter(paymentMethodOptions, responseGetter);
1✔
3779
    trySetResponseGetter(permissions, responseGetter);
1✔
3780
    trySetResponseGetter(phoneNumberCollection, responseGetter);
1✔
3781
    trySetResponseGetter(savedPaymentMethodOptions, responseGetter);
1✔
3782
    trySetResponseGetter(setupIntent, responseGetter);
1✔
3783
    trySetResponseGetter(shippingAddressCollection, responseGetter);
1✔
3784
    trySetResponseGetter(shippingCost, responseGetter);
1✔
3785
    trySetResponseGetter(shippingDetails, responseGetter);
1✔
3786
    trySetResponseGetter(subscription, responseGetter);
1✔
3787
    trySetResponseGetter(taxIdCollection, responseGetter);
1✔
3788
    trySetResponseGetter(totalDetails, responseGetter);
1✔
3789
  }
1✔
3790
}
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