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

stripe / stripe-java / #16599

29 Oct 2024 11:04PM UTC coverage: 12.519% (-0.1%) from 12.62%
#16599

push

github

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

Update generated code for beta

40 of 1580 new or added lines in 51 files covered. (2.53%)

19 existing lines in 15 files now uncovered.

18843 of 150513 relevant lines covered (12.52%)

0.13 hits per line

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

23.02
/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
  /** When set, provides configuration for actions to take if this Checkout Session expires. */
62
  @SerializedName("after_expiration")
63
  AfterExpiration afterExpiration;
64

65
  /** Enables user redeemable promotion codes. */
66
  @SerializedName("allow_promotion_codes")
67
  Boolean allowPromotionCodes;
68

69
  /** Total of all items before discounts or taxes are applied. */
70
  @SerializedName("amount_subtotal")
71
  Long amountSubtotal;
72

73
  /** Total of all items after discounts and taxes are applied. */
74
  @SerializedName("amount_total")
75
  Long amountTotal;
76

77
  @SerializedName("automatic_tax")
78
  AutomaticTax automaticTax;
79

80
  /**
81
   * Describes whether Checkout should collect the customer's billing address. Defaults to {@code
82
   * auto}.
83
   *
84
   * <p>One of {@code auto}, or {@code required}.
85
   */
86
  @SerializedName("billing_address_collection")
87
  String billingAddressCollection;
88

89
  /**
90
   * If set, Checkout displays a back button and customers will be directed to this URL if they
91
   * decide to cancel payment and return to your website.
92
   */
93
  @SerializedName("cancel_url")
94
  String cancelUrl;
95

96
  /**
97
   * A unique string to reference the Checkout Session. This can be a customer ID, a cart ID, or
98
   * similar, and can be used to reconcile the Session with your internal systems.
99
   */
100
  @SerializedName("client_reference_id")
101
  String clientReferenceId;
102

103
  /**
104
   * The client secret of the Session. Use this with <a
105
   * href="https://stripe.com/docs/js/custom_checkout/init">initCustomCheckout</a> on your front
106
   * end.
107
   */
108
  @SerializedName("client_secret")
109
  String clientSecret;
110

111
  /** Information about the customer collected within the Checkout Session. */
112
  @SerializedName("collected_information")
113
  CollectedInformation collectedInformation;
114

115
  /** Results of {@code consent_collection} for this session. */
116
  @SerializedName("consent")
117
  Consent consent;
118

119
  /**
120
   * When set, provides configuration for the Checkout Session to gather active consent from
121
   * customers.
122
   */
123
  @SerializedName("consent_collection")
124
  ConsentCollection consentCollection;
125

126
  /** Time at which the object was created. Measured in seconds since the Unix epoch. */
127
  @SerializedName("created")
128
  Long created;
129

130
  /**
131
   * Three-letter <a href="https://www.iso.org/iso-4217-currency-codes.html">ISO currency code</a>,
132
   * in lowercase. Must be a <a href="https://stripe.com/docs/currencies">supported currency</a>.
133
   */
134
  @SerializedName("currency")
135
  String currency;
136

137
  /**
138
   * Currency conversion details for <a
139
   * href="https://docs.stripe.com/payments/checkout/adaptive-pricing">Adaptive Pricing</a> sessions
140
   */
141
  @SerializedName("currency_conversion")
142
  CurrencyConversion currencyConversion;
143

144
  /**
145
   * Collect additional information from your customer using custom fields. Up to 3 fields are
146
   * supported.
147
   */
148
  @SerializedName("custom_fields")
149
  List<Session.CustomField> customFields;
150

151
  @SerializedName("custom_text")
152
  CustomText customText;
153

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

165
  /**
166
   * Configure whether a Checkout Session creates a Customer when the Checkout Session completes.
167
   *
168
   * <p>One of {@code always}, or {@code if_required}.
169
   */
170
  @SerializedName("customer_creation")
171
  String customerCreation;
172

173
  /**
174
   * The customer details including the customer's tax exempt status and the customer's tax IDs.
175
   * Customer's address details are not present on Sessions in {@code setup} mode.
176
   */
177
  @SerializedName("customer_details")
178
  CustomerDetails customerDetails;
179

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

189
  /** The timestamp at which the Checkout Session will expire. */
190
  @SerializedName("expires_at")
191
  Long expiresAt;
192

193
  /** Unique identifier for the object. */
194
  @Getter(onMethod_ = {@Override})
195
  @SerializedName("id")
196
  String id;
197

198
  /** ID of the invoice created by the Checkout Session, if it exists. */
199
  @SerializedName("invoice")
200
  @Getter(lombok.AccessLevel.NONE)
201
  @Setter(lombok.AccessLevel.NONE)
202
  ExpandableField<Invoice> invoice;
203

204
  /** Details on the state of invoice creation for the Checkout Session. */
205
  @SerializedName("invoice_creation")
206
  InvoiceCreation invoiceCreation;
207

208
  /** The line items purchased by the customer. */
209
  @SerializedName("line_items")
210
  LineItemCollection lineItems;
211

212
  /**
213
   * Has the value {@code true} if the object exists in live mode or the value {@code false} if the
214
   * object exists in test mode.
215
   */
216
  @SerializedName("livemode")
217
  Boolean livemode;
218

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

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

242
  /**
243
   * The mode of the Checkout Session.
244
   *
245
   * <p>One of {@code payment}, {@code setup}, or {@code subscription}.
246
   */
247
  @SerializedName("mode")
248
  String mode;
249

250
  /**
251
   * String representing the object's type. Objects of the same type share the same value.
252
   *
253
   * <p>Equal to {@code checkout.session}.
254
   */
255
  @SerializedName("object")
256
  String object;
257

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

269
  /** The ID of the Payment Link that created this Session. */
270
  @SerializedName("payment_link")
271
  @Getter(lombok.AccessLevel.NONE)
272
  @Setter(lombok.AccessLevel.NONE)
273
  ExpandableField<PaymentLink> paymentLink;
274

275
  /**
276
   * Configure whether a Checkout Session should collect a payment method. Defaults to {@code
277
   * always}.
278
   *
279
   * <p>One of {@code always}, or {@code if_required}.
280
   */
281
  @SerializedName("payment_method_collection")
282
  String paymentMethodCollection;
283

284
  /**
285
   * Information about the payment method configuration used for this Checkout session if using
286
   * dynamic payment methods.
287
   */
288
  @SerializedName("payment_method_configuration_details")
289
  PaymentMethodConfigurationDetails paymentMethodConfigurationDetails;
290

291
  /**
292
   * Payment-method-specific configuration for the PaymentIntent or SetupIntent of this
293
   * CheckoutSession.
294
   */
295
  @SerializedName("payment_method_options")
296
  PaymentMethodOptions paymentMethodOptions;
297

298
  /**
299
   * A list of the types of payment methods (e.g. card) this Checkout Session is allowed to accept.
300
   */
301
  @SerializedName("payment_method_types")
302
  List<String> paymentMethodTypes;
303

304
  /**
305
   * The payment status of the Checkout Session, one of {@code paid}, {@code unpaid}, or {@code
306
   * no_payment_required}. You can use this value to decide when to fulfill your customer's order.
307
   */
308
  @SerializedName("payment_status")
309
  String paymentStatus;
310

311
  /**
312
   * This property is used to set up permissions for various actions (e.g., update) on the
313
   * CheckoutSession object.
314
   *
315
   * <p>For specific permissions, please refer to their dedicated subsections, such as {@code
316
   * permissions.update.shipping_details}.
317
   */
318
  @SerializedName("permissions")
319
  Permissions permissions;
320

321
  @SerializedName("phone_number_collection")
322
  PhoneNumberCollection phoneNumberCollection;
323

324
  /** The ID of the original expired Checkout Session that triggered the recovery flow. */
325
  @SerializedName("recovered_from")
326
  String recoveredFrom;
327

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

338
  /**
339
   * Applies to Checkout Sessions with {@code ui_mode: embedded} or {@code ui_mode: custom}. The URL
340
   * to redirect your customer back to after they authenticate or cancel their payment on the
341
   * payment method's app or site.
342
   */
343
  @SerializedName("return_url")
344
  String returnUrl;
345

346
  /**
347
   * Controls saved payment method settings for the session. Only available in {@code payment} and
348
   * {@code subscription} mode.
349
   */
350
  @SerializedName("saved_payment_method_options")
351
  SavedPaymentMethodOptions savedPaymentMethodOptions;
352

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

364
  /**
365
   * When set, provides configuration for Checkout to collect a shipping address from a customer.
366
   */
367
  @SerializedName("shipping_address_collection")
368
  ShippingAddressCollection shippingAddressCollection;
369

370
  /** The details of the customer cost of shipping, including the customer chosen ShippingRate. */
371
  @SerializedName("shipping_cost")
372
  ShippingCost shippingCost;
373

374
  /** Shipping information for this Checkout Session. */
375
  @SerializedName("shipping_details")
376
  ShippingDetails shippingDetails;
377

378
  /** The shipping rate options applied to this Session. */
379
  @SerializedName("shipping_options")
380
  List<Session.ShippingOption> shippingOptions;
381

382
  /**
383
   * The status of the Checkout Session, one of {@code open}, {@code complete}, or {@code expired}.
384
   */
385
  @SerializedName("status")
386
  String status;
387

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

398
  /** The ID of the subscription for Checkout Sessions in {@code subscription} mode. */
399
  @SerializedName("subscription")
400
  @Getter(lombok.AccessLevel.NONE)
401
  @Setter(lombok.AccessLevel.NONE)
402
  ExpandableField<Subscription> subscription;
403

404
  /**
405
   * The URL the customer will be directed to after the payment or subscription creation is
406
   * successful.
407
   */
408
  @SerializedName("success_url")
409
  String successUrl;
410

411
  @SerializedName("tax_id_collection")
412
  TaxIdCollection taxIdCollection;
413

414
  /** Tax and discount details for the computed total amount. */
415
  @SerializedName("total_details")
416
  TotalDetails totalDetails;
417

418
  /**
419
   * The UI mode of the Session. Defaults to {@code hosted}.
420
   *
421
   * <p>One of {@code custom}, {@code embedded}, or {@code hosted}.
422
   */
423
  @SerializedName("ui_mode")
424
  String uiMode;
425

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

435
  /** Get ID of expandable {@code customer} object. */
436
  public String getCustomer() {
437
    return (this.customer != null) ? this.customer.getId() : null;
×
438
  }
439

440
  public void setCustomer(String id) {
441
    this.customer = ApiResource.setExpandableFieldId(id, this.customer);
×
442
  }
×
443

444
  /** Get expanded {@code customer}. */
445
  public Customer getCustomerObject() {
446
    return (this.customer != null) ? this.customer.getExpanded() : null;
×
447
  }
448

449
  public void setCustomerObject(Customer expandableObject) {
450
    this.customer = new ExpandableField<Customer>(expandableObject.getId(), expandableObject);
×
451
  }
×
452

453
  /** Get ID of expandable {@code invoice} object. */
454
  public String getInvoice() {
455
    return (this.invoice != null) ? this.invoice.getId() : null;
×
456
  }
457

458
  public void setInvoice(String id) {
459
    this.invoice = ApiResource.setExpandableFieldId(id, this.invoice);
×
460
  }
×
461

462
  /** Get expanded {@code invoice}. */
463
  public Invoice getInvoiceObject() {
464
    return (this.invoice != null) ? this.invoice.getExpanded() : null;
×
465
  }
466

467
  public void setInvoiceObject(Invoice expandableObject) {
468
    this.invoice = new ExpandableField<Invoice>(expandableObject.getId(), expandableObject);
×
469
  }
×
470

471
  /** Get ID of expandable {@code paymentIntent} object. */
472
  public String getPaymentIntent() {
473
    return (this.paymentIntent != null) ? this.paymentIntent.getId() : null;
×
474
  }
475

476
  public void setPaymentIntent(String id) {
477
    this.paymentIntent = ApiResource.setExpandableFieldId(id, this.paymentIntent);
×
478
  }
×
479

480
  /** Get expanded {@code paymentIntent}. */
481
  public PaymentIntent getPaymentIntentObject() {
482
    return (this.paymentIntent != null) ? this.paymentIntent.getExpanded() : null;
×
483
  }
484

485
  public void setPaymentIntentObject(PaymentIntent expandableObject) {
486
    this.paymentIntent =
×
487
        new ExpandableField<PaymentIntent>(expandableObject.getId(), expandableObject);
×
488
  }
×
489

490
  /** Get ID of expandable {@code paymentLink} object. */
491
  public String getPaymentLink() {
492
    return (this.paymentLink != null) ? this.paymentLink.getId() : null;
×
493
  }
494

495
  public void setPaymentLink(String id) {
496
    this.paymentLink = ApiResource.setExpandableFieldId(id, this.paymentLink);
×
497
  }
×
498

499
  /** Get expanded {@code paymentLink}. */
500
  public PaymentLink getPaymentLinkObject() {
501
    return (this.paymentLink != null) ? this.paymentLink.getExpanded() : null;
×
502
  }
503

504
  public void setPaymentLinkObject(PaymentLink expandableObject) {
505
    this.paymentLink = new ExpandableField<PaymentLink>(expandableObject.getId(), expandableObject);
×
506
  }
×
507

508
  /** Get ID of expandable {@code setupIntent} object. */
509
  public String getSetupIntent() {
510
    return (this.setupIntent != null) ? this.setupIntent.getId() : null;
×
511
  }
512

513
  public void setSetupIntent(String id) {
514
    this.setupIntent = ApiResource.setExpandableFieldId(id, this.setupIntent);
×
515
  }
×
516

517
  /** Get expanded {@code setupIntent}. */
518
  public SetupIntent getSetupIntentObject() {
519
    return (this.setupIntent != null) ? this.setupIntent.getExpanded() : null;
×
520
  }
521

522
  public void setSetupIntentObject(SetupIntent expandableObject) {
523
    this.setupIntent = new ExpandableField<SetupIntent>(expandableObject.getId(), expandableObject);
×
524
  }
×
525

526
  /** Get ID of expandable {@code subscription} object. */
527
  public String getSubscription() {
528
    return (this.subscription != null) ? this.subscription.getId() : null;
×
529
  }
530

531
  public void setSubscription(String id) {
532
    this.subscription = ApiResource.setExpandableFieldId(id, this.subscription);
×
533
  }
×
534

535
  /** Get expanded {@code subscription}. */
536
  public Subscription getSubscriptionObject() {
537
    return (this.subscription != null) ? this.subscription.getExpanded() : null;
×
538
  }
539

540
  public void setSubscriptionObject(Subscription expandableObject) {
541
    this.subscription =
×
542
        new ExpandableField<Subscription>(expandableObject.getId(), expandableObject);
×
543
  }
×
544

545
  /** Creates a Session object. */
546
  public static Session create(Map<String, Object> params) throws StripeException {
547
    return create(params, (RequestOptions) null);
×
548
  }
549

550
  /** Creates a Session object. */
551
  public static Session create(Map<String, Object> params, RequestOptions options)
552
      throws StripeException {
553
    String path = "/v1/checkout/sessions";
×
554
    ApiRequest request =
×
555
        new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.POST, path, params, options);
556
    return getGlobalResponseGetter().request(request, Session.class);
×
557
  }
558

559
  /** Creates a Session object. */
560
  public static Session create(SessionCreateParams params) throws StripeException {
561
    return create(params, (RequestOptions) null);
1✔
562
  }
563

564
  /** Creates a Session object. */
565
  public static Session create(SessionCreateParams params, RequestOptions options)
566
      throws StripeException {
567
    String path = "/v1/checkout/sessions";
1✔
568
    ApiResource.checkNullTypedParams(path, params);
1✔
569
    ApiRequest request =
1✔
570
        new ApiRequest(
571
            BaseAddress.API,
572
            ApiResource.RequestMethod.POST,
573
            path,
574
            ApiRequestParams.paramsToMap(params),
1✔
575
            options);
576
    return getGlobalResponseGetter().request(request, Session.class);
1✔
577
  }
578

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

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

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

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

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

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

653
  /** Returns a list of Checkout Sessions. */
654
  public static SessionCollection list(Map<String, Object> params) throws StripeException {
655
    return list(params, (RequestOptions) null);
×
656
  }
657

658
  /** Returns a list of Checkout Sessions. */
659
  public static SessionCollection list(Map<String, Object> params, RequestOptions options)
660
      throws StripeException {
661
    String path = "/v1/checkout/sessions";
×
662
    ApiRequest request =
×
663
        new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.GET, path, params, options);
664
    return getGlobalResponseGetter().request(request, SessionCollection.class);
×
665
  }
666

667
  /** Returns a list of Checkout Sessions. */
668
  public static SessionCollection list(SessionListParams params) throws StripeException {
669
    return list(params, (RequestOptions) null);
1✔
670
  }
671

672
  /** Returns a list of Checkout Sessions. */
673
  public static SessionCollection list(SessionListParams params, RequestOptions options)
674
      throws StripeException {
675
    String path = "/v1/checkout/sessions";
1✔
676
    ApiResource.checkNullTypedParams(path, params);
1✔
677
    ApiRequest request =
1✔
678
        new ApiRequest(
679
            BaseAddress.API,
680
            ApiResource.RequestMethod.GET,
681
            path,
682
            ApiRequestParams.paramsToMap(params),
1✔
683
            options);
684
    return getGlobalResponseGetter().request(request, SessionCollection.class);
1✔
685
  }
686

687
  /**
688
   * When retrieving a Checkout Session, there is an includable <strong>line_items</strong> property
689
   * containing the first handful of those items. There is also a URL where you can retrieve the
690
   * full (paginated) list of line items.
691
   */
692
  public LineItemCollection listLineItems() throws StripeException {
693
    return listLineItems((Map<String, Object>) null, (RequestOptions) null);
×
694
  }
695

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

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

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

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

749
  /** Retrieves a Session object. */
750
  public static Session retrieve(String session) throws StripeException {
751
    return retrieve(session, (Map<String, Object>) null, (RequestOptions) null);
1✔
752
  }
753

754
  /** Retrieves a Session object. */
755
  public static Session retrieve(String session, RequestOptions options) throws StripeException {
756
    return retrieve(session, (Map<String, Object>) null, options);
×
757
  }
758

759
  /** Retrieves a Session object. */
760
  public static Session retrieve(String session, Map<String, Object> params, RequestOptions options)
761
      throws StripeException {
762
    String path = String.format("/v1/checkout/sessions/%s", ApiResource.urlEncodeId(session));
1✔
763
    ApiRequest request =
1✔
764
        new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.GET, path, params, options);
765
    return getGlobalResponseGetter().request(request, Session.class);
1✔
766
  }
767

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

783
  /** Updates a Session object. */
784
  @Override
785
  public Session update(Map<String, Object> params) throws StripeException {
786
    return update(params, (RequestOptions) null);
×
787
  }
788

789
  /** Updates a Session object. */
790
  @Override
791
  public Session update(Map<String, Object> params, RequestOptions options) throws StripeException {
792
    String path = String.format("/v1/checkout/sessions/%s", ApiResource.urlEncodeId(this.getId()));
×
793
    ApiRequest request =
×
794
        new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.POST, path, params, options);
795
    return getResponseGetter().request(request, Session.class);
×
796
  }
797

798
  /** Updates a Session object. */
799
  public Session update(SessionUpdateParams params) throws StripeException {
800
    return update(params, (RequestOptions) null);
×
801
  }
802

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

817
  /**
818
   * For more details about AfterExpiration, please refer to the <a
819
   * href="https://docs.stripe.com/api">API Reference.</a>
820
   */
821
  @Getter
822
  @Setter
823
  @EqualsAndHashCode(callSuper = false)
824
  public static class AfterExpiration extends StripeObject {
×
825
    /** When set, configuration used to recover the Checkout Session on expiry. */
826
    @SerializedName("recovery")
827
    Recovery recovery;
828

829
    /**
830
     * For more details about Recovery, please refer to the <a
831
     * href="https://docs.stripe.com/api">API Reference.</a>
832
     */
833
    @Getter
834
    @Setter
835
    @EqualsAndHashCode(callSuper = false)
836
    public static class Recovery extends StripeObject {
×
837
      /**
838
       * Enables user redeemable promotion codes on the recovered Checkout Sessions. Defaults to
839
       * {@code false}
840
       */
841
      @SerializedName("allow_promotion_codes")
842
      Boolean allowPromotionCodes;
843

844
      /**
845
       * If {@code true}, a recovery url will be generated to recover this Checkout Session if it
846
       * expires before a transaction is completed. It will be attached to the Checkout Session
847
       * object upon expiration.
848
       */
849
      @SerializedName("enabled")
850
      Boolean enabled;
851

852
      /** The timestamp at which the recovery URL will expire. */
853
      @SerializedName("expires_at")
854
      Long expiresAt;
855

856
      /**
857
       * URL that creates a new Checkout Session when clicked that is a copy of this expired
858
       * Checkout Session.
859
       */
860
      @SerializedName("url")
861
      String url;
862
    }
863
  }
864

865
  /**
866
   * For more details about AutomaticTax, please refer to the <a
867
   * href="https://docs.stripe.com/api">API Reference.</a>
868
   */
869
  @Getter
870
  @Setter
871
  @EqualsAndHashCode(callSuper = false)
872
  public static class AutomaticTax extends StripeObject {
1✔
873
    /** Indicates whether automatic tax is enabled for the session. */
874
    @SerializedName("enabled")
875
    Boolean enabled;
876

877
    /**
878
     * The account that's liable for tax. If set, the business address and tax registrations
879
     * required to perform the tax calculation are loaded from this account. The tax transaction is
880
     * returned in the report of the connected account.
881
     */
882
    @SerializedName("liability")
883
    Liability liability;
884

885
    /**
886
     * The status of the most recent automated tax calculation for this session.
887
     *
888
     * <p>One of {@code complete}, {@code failed}, or {@code requires_location_inputs}.
889
     */
890
    @SerializedName("status")
891
    String status;
892

893
    /**
894
     * For more details about Liability, please refer to the <a
895
     * href="https://docs.stripe.com/api">API Reference.</a>
896
     */
897
    @Getter
898
    @Setter
899
    @EqualsAndHashCode(callSuper = false)
900
    public static class Liability extends StripeObject {
×
901
      /** The connected account being referenced when {@code type} is {@code account}. */
902
      @SerializedName("account")
903
      @Getter(lombok.AccessLevel.NONE)
904
      @Setter(lombok.AccessLevel.NONE)
905
      ExpandableField<Account> account;
906

907
      /**
908
       * Type of the account referenced.
909
       *
910
       * <p>One of {@code account}, or {@code self}.
911
       */
912
      @SerializedName("type")
913
      String type;
914

915
      /** Get ID of expandable {@code account} object. */
916
      public String getAccount() {
917
        return (this.account != null) ? this.account.getId() : null;
×
918
      }
919

920
      public void setAccount(String id) {
921
        this.account = ApiResource.setExpandableFieldId(id, this.account);
×
922
      }
×
923

924
      /** Get expanded {@code account}. */
925
      public Account getAccountObject() {
926
        return (this.account != null) ? this.account.getExpanded() : null;
×
927
      }
928

929
      public void setAccountObject(Account expandableObject) {
930
        this.account = new ExpandableField<Account>(expandableObject.getId(), expandableObject);
×
931
      }
×
932
    }
933
  }
934

935
  /**
936
   * For more details about CollectedInformation, please refer to the <a
937
   * href="https://docs.stripe.com/api">API Reference.</a>
938
   */
939
  @Getter
940
  @Setter
941
  @EqualsAndHashCode(callSuper = false)
942
  public static class CollectedInformation extends StripeObject {
×
943
    /** Customer’s business name for this Checkout Session. */
944
    @SerializedName("business_name")
945
    String businessName;
946

947
    /** Customer’s email for this Checkout Session. */
948
    @SerializedName("email")
949
    String email;
950

951
    /** Customer’s phone number for this Checkout Session. */
952
    @SerializedName("phone")
953
    String phone;
954

955
    /** Shipping information for this Checkout Session. */
956
    @SerializedName("shipping_details")
957
    ShippingDetails shippingDetails;
958

959
    /** Customer’s tax ids for this Checkout Session. */
960
    @SerializedName("tax_ids")
961
    List<Session.CollectedInformation.TaxId> taxIds;
962

963
    /**
964
     * For more details about TaxId, please refer to the <a href="https://docs.stripe.com/api">API
965
     * Reference.</a>
966
     */
967
    @Getter
968
    @Setter
969
    @EqualsAndHashCode(callSuper = false)
970
    public static class TaxId extends StripeObject {
×
971
      /**
972
       * The type of the tax ID, one of {@code ad_nrt}, {@code ar_cuit}, {@code eu_vat}, {@code
973
       * bo_tin}, {@code br_cnpj}, {@code br_cpf}, {@code cn_tin}, {@code co_nit}, {@code cr_tin},
974
       * {@code do_rcn}, {@code ec_ruc}, {@code eu_oss_vat}, {@code hr_oib}, {@code pe_ruc}, {@code
975
       * ro_tin}, {@code rs_pib}, {@code sv_nit}, {@code uy_ruc}, {@code ve_rif}, {@code vn_tin},
976
       * {@code gb_vat}, {@code nz_gst}, {@code au_abn}, {@code au_arn}, {@code in_gst}, {@code
977
       * no_vat}, {@code no_voec}, {@code za_vat}, {@code ch_vat}, {@code mx_rfc}, {@code sg_uen},
978
       * {@code ru_inn}, {@code ru_kpp}, {@code ca_bn}, {@code hk_br}, {@code es_cif}, {@code
979
       * tw_vat}, {@code th_vat}, {@code jp_cn}, {@code jp_rn}, {@code jp_trn}, {@code li_uid},
980
       * {@code my_itn}, {@code us_ein}, {@code kr_brn}, {@code ca_qst}, {@code ca_gst_hst}, {@code
981
       * ca_pst_bc}, {@code ca_pst_mb}, {@code ca_pst_sk}, {@code my_sst}, {@code sg_gst}, {@code
982
       * ae_trn}, {@code cl_tin}, {@code sa_vat}, {@code id_npwp}, {@code my_frp}, {@code il_vat},
983
       * {@code ge_vat}, {@code ua_vat}, {@code is_vat}, {@code bg_uic}, {@code hu_tin}, {@code
984
       * si_tin}, {@code ke_pin}, {@code tr_tin}, {@code eg_tin}, {@code ph_tin}, {@code bh_vat},
985
       * {@code kz_bin}, {@code ng_tin}, {@code om_vat}, {@code de_stn}, {@code ch_uid}, {@code
986
       * tz_vat}, {@code uz_vat}, {@code uz_tin}, {@code md_vat}, {@code ma_vat}, {@code by_tin}, or
987
       * {@code unknown}.
988
       */
989
      @SerializedName("type")
990
      String type;
991

992
      /** The value of the tax ID. */
993
      @SerializedName("value")
994
      String value;
995
    }
996
  }
997

998
  /**
999
   * For more details about Consent, please refer to the <a href="https://docs.stripe.com/api">API
1000
   * Reference.</a>
1001
   */
1002
  @Getter
1003
  @Setter
1004
  @EqualsAndHashCode(callSuper = false)
1005
  public static class Consent extends StripeObject {
×
1006
    /**
1007
     * If {@code opt_in}, the customer consents to receiving promotional communications from the
1008
     * merchant about this Checkout Session.
1009
     *
1010
     * <p>One of {@code opt_in}, or {@code opt_out}.
1011
     */
1012
    @SerializedName("promotions")
1013
    String promotions;
1014

1015
    /**
1016
     * If {@code accepted}, the customer in this Checkout Session has agreed to the merchant's terms
1017
     * of service.
1018
     *
1019
     * <p>Equal to {@code accepted}.
1020
     */
1021
    @SerializedName("terms_of_service")
1022
    String termsOfService;
1023
  }
1024

1025
  /**
1026
   * For more details about ConsentCollection, please refer to the <a
1027
   * href="https://docs.stripe.com/api">API Reference.</a>
1028
   */
1029
  @Getter
1030
  @Setter
1031
  @EqualsAndHashCode(callSuper = false)
1032
  public static class ConsentCollection extends StripeObject {
×
1033
    /**
1034
     * If set to {@code hidden}, it will hide legal text related to the reuse of a payment method.
1035
     */
1036
    @SerializedName("payment_method_reuse_agreement")
1037
    PaymentMethodReuseAgreement paymentMethodReuseAgreement;
1038

1039
    /**
1040
     * If set to {@code auto}, enables the collection of customer consent for promotional
1041
     * communications. The Checkout Session will determine whether to display an option to opt into
1042
     * promotional communication from the merchant depending on the customer's locale. Only
1043
     * available to US merchants.
1044
     *
1045
     * <p>One of {@code auto}, or {@code none}.
1046
     */
1047
    @SerializedName("promotions")
1048
    String promotions;
1049

1050
    /**
1051
     * If set to {@code required}, it requires customers to accept the terms of service before being
1052
     * able to pay.
1053
     *
1054
     * <p>One of {@code none}, or {@code required}.
1055
     */
1056
    @SerializedName("terms_of_service")
1057
    String termsOfService;
1058

1059
    /**
1060
     * For more details about PaymentMethodReuseAgreement, please refer to the <a
1061
     * href="https://docs.stripe.com/api">API Reference.</a>
1062
     */
1063
    @Getter
1064
    @Setter
1065
    @EqualsAndHashCode(callSuper = false)
1066
    public static class PaymentMethodReuseAgreement extends StripeObject {
×
1067
      /**
1068
       * Determines the position and visibility of the payment method reuse agreement in the UI.
1069
       * When set to {@code auto}, Stripe's defaults will be used.
1070
       *
1071
       * <p>When set to {@code hidden}, the payment method reuse agreement text will always be
1072
       * hidden in the UI.
1073
       *
1074
       * <p>One of {@code auto}, or {@code hidden}.
1075
       */
1076
      @SerializedName("position")
1077
      String position;
1078
    }
1079
  }
1080

1081
  /**
1082
   * For more details about CurrencyConversion, please refer to the <a
1083
   * href="https://docs.stripe.com/api">API Reference.</a>
1084
   */
1085
  @Getter
1086
  @Setter
1087
  @EqualsAndHashCode(callSuper = false)
1088
  public static class CurrencyConversion extends StripeObject {
×
1089
    /** Total of all items in source currency before discounts or taxes are applied. */
1090
    @SerializedName("amount_subtotal")
1091
    Long amountSubtotal;
1092

1093
    /** Total of all items in source currency after discounts and taxes are applied. */
1094
    @SerializedName("amount_total")
1095
    Long amountTotal;
1096

1097
    /** Exchange rate used to convert source currency amounts to customer currency amounts. */
1098
    @SerializedName("fx_rate")
1099
    BigDecimal fxRate;
1100

1101
    /** Creation currency of the CheckoutSession before localization. */
1102
    @SerializedName("source_currency")
1103
    String sourceCurrency;
1104
  }
1105

1106
  /**
1107
   * For more details about CustomField, please refer to the <a
1108
   * href="https://docs.stripe.com/api">API Reference.</a>
1109
   */
1110
  @Getter
1111
  @Setter
1112
  @EqualsAndHashCode(callSuper = false)
1113
  public static class CustomField extends StripeObject {
×
1114
    @SerializedName("dropdown")
1115
    Dropdown dropdown;
1116

1117
    /**
1118
     * String of your choice that your integration can use to reconcile this field. Must be unique
1119
     * to this field, alphanumeric, and up to 200 characters.
1120
     */
1121
    @SerializedName("key")
1122
    String key;
1123

1124
    @SerializedName("label")
1125
    Label label;
1126

1127
    @SerializedName("numeric")
1128
    Numeric numeric;
1129

1130
    /**
1131
     * Whether the customer is required to complete the field before completing the Checkout
1132
     * Session. Defaults to {@code false}.
1133
     */
1134
    @SerializedName("optional")
1135
    Boolean optional;
1136

1137
    @SerializedName("text")
1138
    Text text;
1139

1140
    /**
1141
     * The type of the field.
1142
     *
1143
     * <p>One of {@code dropdown}, {@code numeric}, or {@code text}.
1144
     */
1145
    @SerializedName("type")
1146
    String type;
1147

1148
    /**
1149
     * For more details about Dropdown, please refer to the <a
1150
     * href="https://docs.stripe.com/api">API Reference.</a>
1151
     */
1152
    @Getter
1153
    @Setter
1154
    @EqualsAndHashCode(callSuper = false)
1155
    public static class Dropdown extends StripeObject {
×
1156
      /** The value that will pre-fill on the payment page. */
1157
      @SerializedName("default_value")
1158
      String defaultValue;
1159

1160
      /** The options available for the customer to select. Up to 200 options allowed. */
1161
      @SerializedName("options")
1162
      List<Session.CustomField.Dropdown.Option> options;
1163

1164
      /** The option selected by the customer. This will be the {@code value} for the option. */
1165
      @SerializedName("value")
1166
      String value;
1167

1168
      /**
1169
       * For more details about Option, 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 Option extends StripeObject {
×
1176
        /** The label for the option, displayed to the customer. Up to 100 characters. */
1177
        @SerializedName("label")
1178
        String label;
1179

1180
        /**
1181
         * The value for this option, not displayed to the customer, used by your integration to
1182
         * reconcile the option selected by the customer. Must be unique to this option,
1183
         * alphanumeric, and up to 100 characters.
1184
         */
1185
        @SerializedName("value")
1186
        String value;
1187
      }
1188
    }
1189

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

1202
      /**
1203
       * The type of the label.
1204
       *
1205
       * <p>Equal to {@code custom}.
1206
       */
1207
      @SerializedName("type")
1208
      String type;
1209
    }
1210

1211
    /**
1212
     * For more details about Numeric, please refer to the <a href="https://docs.stripe.com/api">API
1213
     * Reference.</a>
1214
     */
1215
    @Getter
1216
    @Setter
1217
    @EqualsAndHashCode(callSuper = false)
1218
    public static class Numeric extends StripeObject {
×
1219
      /** The value that will pre-fill the field on the payment page. */
1220
      @SerializedName("default_value")
1221
      String defaultValue;
1222

1223
      /** The maximum character length constraint for the customer's input. */
1224
      @SerializedName("maximum_length")
1225
      Long maximumLength;
1226

1227
      /** The minimum character length requirement for the customer's input. */
1228
      @SerializedName("minimum_length")
1229
      Long minimumLength;
1230

1231
      /** The value entered by the customer, containing only digits. */
1232
      @SerializedName("value")
1233
      String value;
1234
    }
1235

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

1248
      /** The maximum character length constraint for the customer's input. */
1249
      @SerializedName("maximum_length")
1250
      Long maximumLength;
1251

1252
      /** The minimum character length requirement for the customer's input. */
1253
      @SerializedName("minimum_length")
1254
      Long minimumLength;
1255

1256
      /** The value entered by the customer. */
1257
      @SerializedName("value")
1258
      String value;
1259
    }
1260
  }
1261

1262
  /**
1263
   * For more details about CustomText, please refer to the <a
1264
   * href="https://docs.stripe.com/api">API Reference.</a>
1265
   */
1266
  @Getter
1267
  @Setter
1268
  @EqualsAndHashCode(callSuper = false)
1269
  public static class CustomText extends StripeObject {
1✔
1270
    /** Custom text that should be displayed after the payment confirmation button. */
1271
    @SerializedName("after_submit")
1272
    AfterSubmit afterSubmit;
1273

1274
    /** Custom text that should be displayed alongside shipping address collection. */
1275
    @SerializedName("shipping_address")
1276
    ShippingAddress shippingAddress;
1277

1278
    /** Custom text that should be displayed alongside the payment confirmation button. */
1279
    @SerializedName("submit")
1280
    Submit submit;
1281

1282
    /**
1283
     * Custom text that should be displayed in place of the default terms of service agreement text.
1284
     */
1285
    @SerializedName("terms_of_service_acceptance")
1286
    TermsOfServiceAcceptance termsOfServiceAcceptance;
1287

1288
    /**
1289
     * For more details about AfterSubmit, please refer to the <a
1290
     * href="https://docs.stripe.com/api">API Reference.</a>
1291
     */
1292
    @Getter
1293
    @Setter
1294
    @EqualsAndHashCode(callSuper = false)
1295
    public static class AfterSubmit extends StripeObject {
×
1296
      /** Text may be up to 1200 characters in length. */
1297
      @SerializedName("message")
1298
      String message;
1299
    }
1300

1301
    /**
1302
     * For more details about ShippingAddress, please refer to the <a
1303
     * href="https://docs.stripe.com/api">API Reference.</a>
1304
     */
1305
    @Getter
1306
    @Setter
1307
    @EqualsAndHashCode(callSuper = false)
1308
    public static class ShippingAddress extends StripeObject {
×
1309
      /** Text may be up to 1200 characters in length. */
1310
      @SerializedName("message")
1311
      String message;
1312
    }
1313

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

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

1341
  /**
1342
   * For more details about CustomerDetails, please refer to the <a
1343
   * href="https://docs.stripe.com/api">API Reference.</a>
1344
   */
1345
  @Getter
1346
  @Setter
1347
  @EqualsAndHashCode(callSuper = false)
1348
  public static class CustomerDetails extends StripeObject {
1✔
1349
    /**
1350
     * The customer's address after a completed Checkout Session. Note: This property is populated
1351
     * only for sessions on or after March 30, 2022.
1352
     */
1353
    @SerializedName("address")
1354
    Address address;
1355

1356
    /**
1357
     * The email associated with the Customer, if one exists, on the Checkout Session after a
1358
     * completed Checkout Session or at time of session expiry. Otherwise, if the customer has
1359
     * consented to promotional content, this value is the most recent valid email provided by the
1360
     * customer on the Checkout form.
1361
     */
1362
    @SerializedName("email")
1363
    String email;
1364

1365
    /**
1366
     * The customer's name after a completed Checkout Session. Note: This property is populated only
1367
     * for sessions on or after March 30, 2022.
1368
     */
1369
    @SerializedName("name")
1370
    String name;
1371

1372
    /** The customer's phone number after a completed Checkout Session. */
1373
    @SerializedName("phone")
1374
    String phone;
1375

1376
    /**
1377
     * The customer’s tax exempt status after a completed Checkout Session.
1378
     *
1379
     * <p>One of {@code exempt}, {@code none}, or {@code reverse}.
1380
     */
1381
    @SerializedName("tax_exempt")
1382
    String taxExempt;
1383

1384
    /** The customer’s tax IDs after a completed Checkout Session. */
1385
    @SerializedName("tax_ids")
1386
    List<Session.CustomerDetails.TaxId> taxIds;
1387

1388
    /**
1389
     * For more details about TaxId, please refer to the <a href="https://docs.stripe.com/api">API
1390
     * Reference.</a>
1391
     */
1392
    @Getter
1393
    @Setter
1394
    @EqualsAndHashCode(callSuper = false)
1395
    public static class TaxId extends StripeObject {
×
1396
      /**
1397
       * The type of the tax ID, one of {@code ad_nrt}, {@code ar_cuit}, {@code eu_vat}, {@code
1398
       * bo_tin}, {@code br_cnpj}, {@code br_cpf}, {@code cn_tin}, {@code co_nit}, {@code cr_tin},
1399
       * {@code do_rcn}, {@code ec_ruc}, {@code eu_oss_vat}, {@code hr_oib}, {@code pe_ruc}, {@code
1400
       * ro_tin}, {@code rs_pib}, {@code sv_nit}, {@code uy_ruc}, {@code ve_rif}, {@code vn_tin},
1401
       * {@code gb_vat}, {@code nz_gst}, {@code au_abn}, {@code au_arn}, {@code in_gst}, {@code
1402
       * no_vat}, {@code no_voec}, {@code za_vat}, {@code ch_vat}, {@code mx_rfc}, {@code sg_uen},
1403
       * {@code ru_inn}, {@code ru_kpp}, {@code ca_bn}, {@code hk_br}, {@code es_cif}, {@code
1404
       * tw_vat}, {@code th_vat}, {@code jp_cn}, {@code jp_rn}, {@code jp_trn}, {@code li_uid},
1405
       * {@code my_itn}, {@code us_ein}, {@code kr_brn}, {@code ca_qst}, {@code ca_gst_hst}, {@code
1406
       * ca_pst_bc}, {@code ca_pst_mb}, {@code ca_pst_sk}, {@code my_sst}, {@code sg_gst}, {@code
1407
       * ae_trn}, {@code cl_tin}, {@code sa_vat}, {@code id_npwp}, {@code my_frp}, {@code il_vat},
1408
       * {@code ge_vat}, {@code ua_vat}, {@code is_vat}, {@code bg_uic}, {@code hu_tin}, {@code
1409
       * si_tin}, {@code ke_pin}, {@code tr_tin}, {@code eg_tin}, {@code ph_tin}, {@code bh_vat},
1410
       * {@code kz_bin}, {@code ng_tin}, {@code om_vat}, {@code de_stn}, {@code ch_uid}, {@code
1411
       * tz_vat}, {@code uz_vat}, {@code uz_tin}, {@code md_vat}, {@code ma_vat}, {@code by_tin}, or
1412
       * {@code unknown}.
1413
       */
1414
      @SerializedName("type")
1415
      String type;
1416

1417
      /** The value of the tax ID. */
1418
      @SerializedName("value")
1419
      String value;
1420
    }
1421
  }
1422

1423
  /**
1424
   * For more details about InvoiceCreation, please refer to the <a
1425
   * href="https://docs.stripe.com/api">API Reference.</a>
1426
   */
1427
  @Getter
1428
  @Setter
1429
  @EqualsAndHashCode(callSuper = false)
1430
  public static class InvoiceCreation extends StripeObject {
×
1431
    /** Indicates whether invoice creation is enabled for the Checkout Session. */
1432
    @SerializedName("enabled")
1433
    Boolean enabled;
1434

1435
    @SerializedName("invoice_data")
1436
    InvoiceData invoiceData;
1437

1438
    /**
1439
     * For more details about InvoiceData, please refer to the <a
1440
     * href="https://docs.stripe.com/api">API Reference.</a>
1441
     */
1442
    @Getter
1443
    @Setter
1444
    @EqualsAndHashCode(callSuper = false)
1445
    public static class InvoiceData extends StripeObject {
×
1446
      /** The account tax IDs associated with the invoice. */
1447
      @SerializedName("account_tax_ids")
1448
      List<ExpandableField<com.stripe.model.TaxId>> accountTaxIds;
1449

1450
      /** Custom fields displayed on the invoice. */
1451
      @SerializedName("custom_fields")
1452
      List<Session.InvoiceCreation.InvoiceData.CustomField> customFields;
1453

1454
      /** An arbitrary string attached to the object. Often useful for displaying to users. */
1455
      @SerializedName("description")
1456
      String description;
1457

1458
      /** Footer displayed on the invoice. */
1459
      @SerializedName("footer")
1460
      String footer;
1461

1462
      /**
1463
       * The connected account that issues the invoice. The invoice is presented with the branding
1464
       * and support information of the specified account.
1465
       */
1466
      @SerializedName("issuer")
1467
      Issuer issuer;
1468

1469
      /**
1470
       * Set of <a href="https://stripe.com/docs/api/metadata">key-value pairs</a> that you can
1471
       * attach to an object. This can be useful for storing additional information about the object
1472
       * in a structured format.
1473
       */
1474
      @SerializedName("metadata")
1475
      Map<String, String> metadata;
1476

1477
      /** Options for invoice PDF rendering. */
1478
      @SerializedName("rendering_options")
1479
      RenderingOptions renderingOptions;
1480

1481
      /** Get IDs of expandable {@code accountTaxIds} object list. */
1482
      public List<String> getAccountTaxIds() {
1483
        return (this.accountTaxIds != null)
×
1484
            ? this.accountTaxIds.stream().map(x -> x.getId()).collect(Collectors.toList())
×
1485
            : null;
×
1486
      }
1487

1488
      public void setAccountTaxIds(List<String> ids) {
1489
        if (ids == null) {
×
1490
          this.accountTaxIds = null;
×
1491
          return;
×
1492
        }
1493
        if (this.accountTaxIds != null
×
1494
            && this.accountTaxIds.stream()
×
1495
                .map(x -> x.getId())
×
1496
                .collect(Collectors.toList())
×
1497
                .equals(ids)) {
×
1498
          // noop if the ids are equal to what are already present
1499
          return;
×
1500
        }
1501
        this.accountTaxIds =
×
1502
            (ids != null)
×
1503
                ? ids.stream()
×
1504
                    .map(id -> new ExpandableField<com.stripe.model.TaxId>(id, null))
×
1505
                    .collect(Collectors.toList())
×
1506
                : null;
×
1507
      }
×
1508

1509
      /** Get expanded {@code accountTaxIds}. */
1510
      public List<com.stripe.model.TaxId> getAccountTaxIdObjects() {
1511
        return (this.accountTaxIds != null)
×
1512
            ? this.accountTaxIds.stream().map(x -> x.getExpanded()).collect(Collectors.toList())
×
1513
            : null;
×
1514
      }
1515

1516
      public void setAccountTaxIdObjects(List<com.stripe.model.TaxId> objs) {
1517
        this.accountTaxIds =
×
1518
            objs != null
×
1519
                ? objs.stream()
×
1520
                    .map(x -> new ExpandableField<com.stripe.model.TaxId>(x.getId(), x))
×
1521
                    .collect(Collectors.toList())
×
1522
                : null;
×
1523
      }
×
1524

1525
      /**
1526
       * For more details about CustomField, please refer to the <a
1527
       * href="https://docs.stripe.com/api">API Reference.</a>
1528
       */
1529
      @Getter
1530
      @Setter
1531
      @EqualsAndHashCode(callSuper = false)
1532
      public static class CustomField extends StripeObject {
×
1533
        /** The name of the custom field. */
1534
        @SerializedName("name")
1535
        String name;
1536

1537
        /** The value of the custom field. */
1538
        @SerializedName("value")
1539
        String value;
1540
      }
1541

1542
      /**
1543
       * For more details about Issuer, please refer to the <a
1544
       * href="https://docs.stripe.com/api">API Reference.</a>
1545
       */
1546
      @Getter
1547
      @Setter
1548
      @EqualsAndHashCode(callSuper = false)
1549
      public static class Issuer extends StripeObject {
×
1550
        /** The connected account being referenced when {@code type} is {@code account}. */
1551
        @SerializedName("account")
1552
        @Getter(lombok.AccessLevel.NONE)
1553
        @Setter(lombok.AccessLevel.NONE)
1554
        ExpandableField<Account> account;
1555

1556
        /**
1557
         * Type of the account referenced.
1558
         *
1559
         * <p>One of {@code account}, or {@code self}.
1560
         */
1561
        @SerializedName("type")
1562
        String type;
1563

1564
        /** Get ID of expandable {@code account} object. */
1565
        public String getAccount() {
1566
          return (this.account != null) ? this.account.getId() : null;
×
1567
        }
1568

1569
        public void setAccount(String id) {
1570
          this.account = ApiResource.setExpandableFieldId(id, this.account);
×
1571
        }
×
1572

1573
        /** Get expanded {@code account}. */
1574
        public Account getAccountObject() {
1575
          return (this.account != null) ? this.account.getExpanded() : null;
×
1576
        }
1577

1578
        public void setAccountObject(Account expandableObject) {
1579
          this.account = new ExpandableField<Account>(expandableObject.getId(), expandableObject);
×
1580
        }
×
1581
      }
1582

1583
      /**
1584
       * For more details about RenderingOptions, please refer to the <a
1585
       * href="https://docs.stripe.com/api">API Reference.</a>
1586
       */
1587
      @Getter
1588
      @Setter
1589
      @EqualsAndHashCode(callSuper = false)
1590
      public static class RenderingOptions extends StripeObject {
×
1591
        /**
1592
         * How line-item prices and amounts will be displayed with respect to tax on invoice PDFs.
1593
         */
1594
        @SerializedName("amount_tax_display")
1595
        String amountTaxDisplay;
1596
      }
1597
    }
1598
  }
1599

1600
  /**
1601
   * For more details about PaymentMethodConfigurationDetails, please refer to the <a
1602
   * href="https://docs.stripe.com/api">API Reference.</a>
1603
   */
1604
  @Getter
1605
  @Setter
1606
  @EqualsAndHashCode(callSuper = false)
1607
  public static class PaymentMethodConfigurationDetails extends StripeObject implements HasId {
×
1608
    /** ID of the payment method configuration used. */
1609
    @Getter(onMethod_ = {@Override})
1610
    @SerializedName("id")
1611
    String id;
1612

1613
    /** ID of the parent payment method configuration used. */
1614
    @SerializedName("parent")
1615
    String parent;
1616
  }
1617

1618
  /**
1619
   * For more details about PaymentMethodOptions, please refer to the <a
1620
   * href="https://docs.stripe.com/api">API Reference.</a>
1621
   */
1622
  @Getter
1623
  @Setter
1624
  @EqualsAndHashCode(callSuper = false)
1625
  public static class PaymentMethodOptions extends StripeObject {
1✔
1626
    @SerializedName("acss_debit")
1627
    AcssDebit acssDebit;
1628

1629
    @SerializedName("affirm")
1630
    Affirm affirm;
1631

1632
    @SerializedName("afterpay_clearpay")
1633
    AfterpayClearpay afterpayClearpay;
1634

1635
    @SerializedName("alipay")
1636
    Alipay alipay;
1637

1638
    @SerializedName("amazon_pay")
1639
    AmazonPay amazonPay;
1640

1641
    @SerializedName("au_becs_debit")
1642
    AuBecsDebit auBecsDebit;
1643

1644
    @SerializedName("bacs_debit")
1645
    BacsDebit bacsDebit;
1646

1647
    @SerializedName("bancontact")
1648
    Bancontact bancontact;
1649

1650
    @SerializedName("boleto")
1651
    Boleto boleto;
1652

1653
    @SerializedName("card")
1654
    Card card;
1655

1656
    @SerializedName("cashapp")
1657
    Cashapp cashapp;
1658

1659
    @SerializedName("customer_balance")
1660
    CustomerBalance customerBalance;
1661

1662
    @SerializedName("eps")
1663
    Eps eps;
1664

1665
    @SerializedName("fpx")
1666
    Fpx fpx;
1667

1668
    @SerializedName("giropay")
1669
    Giropay giropay;
1670

1671
    @SerializedName("grabpay")
1672
    Grabpay grabpay;
1673

1674
    @SerializedName("ideal")
1675
    Ideal ideal;
1676

1677
    @SerializedName("kakao_pay")
1678
    KakaoPay kakaoPay;
1679

1680
    @SerializedName("klarna")
1681
    Klarna klarna;
1682

1683
    @SerializedName("konbini")
1684
    Konbini konbini;
1685

1686
    @SerializedName("kr_card")
1687
    KrCard krCard;
1688

1689
    @SerializedName("link")
1690
    Link link;
1691

1692
    @SerializedName("mobilepay")
1693
    Mobilepay mobilepay;
1694

1695
    @SerializedName("multibanco")
1696
    Multibanco multibanco;
1697

1698
    @SerializedName("naver_pay")
1699
    NaverPay naverPay;
1700

1701
    @SerializedName("oxxo")
1702
    Oxxo oxxo;
1703

1704
    @SerializedName("p24")
1705
    P24 p24;
1706

1707
    @SerializedName("payco")
1708
    Payco payco;
1709

1710
    @SerializedName("paynow")
1711
    Paynow paynow;
1712

1713
    @SerializedName("paypal")
1714
    Paypal paypal;
1715

1716
    @SerializedName("payto")
1717
    Payto payto;
1718

1719
    @SerializedName("pix")
1720
    Pix pix;
1721

1722
    @SerializedName("revolut_pay")
1723
    RevolutPay revolutPay;
1724

1725
    @SerializedName("samsung_pay")
1726
    SamsungPay samsungPay;
1727

1728
    @SerializedName("sepa_debit")
1729
    SepaDebit sepaDebit;
1730

1731
    @SerializedName("sofort")
1732
    Sofort sofort;
1733

1734
    @SerializedName("swish")
1735
    Swish swish;
1736

1737
    @SerializedName("us_bank_account")
1738
    UsBankAccount usBankAccount;
1739

1740
    /**
1741
     * For more details about AcssDebit, please refer to the <a
1742
     * href="https://docs.stripe.com/api">API Reference.</a>
1743
     */
1744
    @Getter
1745
    @Setter
1746
    @EqualsAndHashCode(callSuper = false)
1747
    public static class AcssDebit extends StripeObject {
×
1748
      /**
1749
       * Currency supported by the bank account. Returned when the Session is in {@code setup} mode.
1750
       *
1751
       * <p>One of {@code cad}, or {@code usd}.
1752
       */
1753
      @SerializedName("currency")
1754
      String currency;
1755

1756
      @SerializedName("mandate_options")
1757
      MandateOptions mandateOptions;
1758

1759
      /**
1760
       * Indicates that you intend to make future payments with this PaymentIntent's payment method.
1761
       *
1762
       * <p>If you provide a Customer with the PaymentIntent, you can use this parameter to <a
1763
       * href="https://stripe.com/payments/save-during-payment">attach the payment method</a> to the
1764
       * Customer after the PaymentIntent is confirmed and the customer completes any required
1765
       * actions. If you don't provide a Customer, you can still <a
1766
       * href="https://stripe.com/api/payment_methods/attach">attach</a> the payment method to a
1767
       * Customer after the transaction completes.
1768
       *
1769
       * <p>If the payment method is {@code card_present} and isn't a digital wallet, Stripe creates
1770
       * and attaches a <a
1771
       * href="https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card">generated_card</a>
1772
       * payment method representing the card to the Customer instead.
1773
       *
1774
       * <p>When processing card payments, Stripe uses {@code setup_future_usage} to help you comply
1775
       * with regional legislation and network rules, such as <a
1776
       * href="https://stripe.com/strong-customer-authentication">SCA</a>.
1777
       *
1778
       * <p>One of {@code none}, {@code off_session}, or {@code on_session}.
1779
       */
1780
      @SerializedName("setup_future_usage")
1781
      String setupFutureUsage;
1782

1783
      /**
1784
       * Bank account verification method.
1785
       *
1786
       * <p>One of {@code automatic}, {@code instant}, or {@code microdeposits}.
1787
       */
1788
      @SerializedName("verification_method")
1789
      String verificationMethod;
1790

1791
      /**
1792
       * For more details about MandateOptions, please refer to the <a
1793
       * href="https://docs.stripe.com/api">API Reference.</a>
1794
       */
1795
      @Getter
1796
      @Setter
1797
      @EqualsAndHashCode(callSuper = false)
1798
      public static class MandateOptions extends StripeObject {
×
1799
        /** A URL for custom mandate text. */
1800
        @SerializedName("custom_mandate_url")
1801
        String customMandateUrl;
1802

1803
        /**
1804
         * List of Stripe products where this mandate can be selected automatically. Returned when
1805
         * the Session is in {@code setup} mode.
1806
         */
1807
        @SerializedName("default_for")
1808
        List<String> defaultFor;
1809

1810
        /**
1811
         * Description of the interval. Only required if the 'payment_schedule' parameter is
1812
         * 'interval' or 'combined'.
1813
         */
1814
        @SerializedName("interval_description")
1815
        String intervalDescription;
1816

1817
        /**
1818
         * Payment schedule for the mandate.
1819
         *
1820
         * <p>One of {@code combined}, {@code interval}, or {@code sporadic}.
1821
         */
1822
        @SerializedName("payment_schedule")
1823
        String paymentSchedule;
1824

1825
        /**
1826
         * Transaction type of the mandate.
1827
         *
1828
         * <p>One of {@code business}, or {@code personal}.
1829
         */
1830
        @SerializedName("transaction_type")
1831
        String transactionType;
1832
      }
1833
    }
1834

1835
    /**
1836
     * For more details about Affirm, please refer to the <a href="https://docs.stripe.com/api">API
1837
     * Reference.</a>
1838
     */
1839
    @Getter
1840
    @Setter
1841
    @EqualsAndHashCode(callSuper = false)
1842
    public static class Affirm extends StripeObject {
×
1843
      /**
1844
       * Indicates that you intend to make future payments with this PaymentIntent's payment method.
1845
       *
1846
       * <p>If you provide a Customer with the PaymentIntent, you can use this parameter to <a
1847
       * href="https://stripe.com/payments/save-during-payment">attach the payment method</a> to the
1848
       * Customer after the PaymentIntent is confirmed and the customer completes any required
1849
       * actions. If you don't provide a Customer, you can still <a
1850
       * href="https://stripe.com/api/payment_methods/attach">attach</a> the payment method to a
1851
       * Customer after the transaction completes.
1852
       *
1853
       * <p>If the payment method is {@code card_present} and isn't a digital wallet, Stripe creates
1854
       * and attaches a <a
1855
       * href="https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card">generated_card</a>
1856
       * payment method representing the card to the Customer instead.
1857
       *
1858
       * <p>When processing card payments, Stripe uses {@code setup_future_usage} to help you comply
1859
       * with regional legislation and network rules, such as <a
1860
       * href="https://stripe.com/strong-customer-authentication">SCA</a>.
1861
       *
1862
       * <p>Equal to {@code none}.
1863
       */
1864
      @SerializedName("setup_future_usage")
1865
      String setupFutureUsage;
1866
    }
1867

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

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

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

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

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

2033
    /**
2034
     * For more details about Bancontact, please refer to the <a
2035
     * href="https://docs.stripe.com/api">API Reference.</a>
2036
     */
2037
    @Getter
2038
    @Setter
2039
    @EqualsAndHashCode(callSuper = false)
2040
    public static class Bancontact extends StripeObject {
×
2041
      /**
2042
       * Indicates that you intend to make future payments with this PaymentIntent's payment method.
2043
       *
2044
       * <p>If you provide a Customer with the PaymentIntent, you can use this parameter to <a
2045
       * href="https://stripe.com/payments/save-during-payment">attach the payment method</a> to the
2046
       * Customer after the PaymentIntent is confirmed and the customer completes any required
2047
       * actions. If you don't provide a Customer, you can still <a
2048
       * href="https://stripe.com/api/payment_methods/attach">attach</a> the payment method to a
2049
       * Customer after the transaction completes.
2050
       *
2051
       * <p>If the payment method is {@code card_present} and isn't a digital wallet, Stripe creates
2052
       * and attaches a <a
2053
       * href="https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card">generated_card</a>
2054
       * payment method representing the card to the Customer instead.
2055
       *
2056
       * <p>When processing card payments, Stripe uses {@code setup_future_usage} to help you comply
2057
       * with regional legislation and network rules, such as <a
2058
       * href="https://stripe.com/strong-customer-authentication">SCA</a>.
2059
       *
2060
       * <p>Equal to {@code none}.
2061
       */
2062
      @SerializedName("setup_future_usage")
2063
      String setupFutureUsage;
2064
    }
2065

2066
    /**
2067
     * For more details about Boleto, please refer to the <a href="https://docs.stripe.com/api">API
2068
     * Reference.</a>
2069
     */
2070
    @Getter
2071
    @Setter
2072
    @EqualsAndHashCode(callSuper = false)
2073
    public static class Boleto extends StripeObject {
×
2074
      /**
2075
       * The number of calendar days before a Boleto voucher expires. For example, if you create a
2076
       * Boleto voucher on Monday and you set expires_after_days to 2, the Boleto voucher will
2077
       * expire on Wednesday at 23:59 America/Sao_Paulo time.
2078
       */
2079
      @SerializedName("expires_after_days")
2080
      Long expiresAfterDays;
2081

2082
      /**
2083
       * Indicates that you intend to make future payments with this PaymentIntent's payment method.
2084
       *
2085
       * <p>If you provide a Customer with the PaymentIntent, you can use this parameter to <a
2086
       * href="https://stripe.com/payments/save-during-payment">attach the payment method</a> to the
2087
       * Customer after the PaymentIntent is confirmed and the customer completes any required
2088
       * actions. If you don't provide a Customer, you can still <a
2089
       * href="https://stripe.com/api/payment_methods/attach">attach</a> the payment method to a
2090
       * Customer after the transaction completes.
2091
       *
2092
       * <p>If the payment method is {@code card_present} and isn't a digital wallet, Stripe creates
2093
       * and attaches a <a
2094
       * href="https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card">generated_card</a>
2095
       * payment method representing the card to the Customer instead.
2096
       *
2097
       * <p>When processing card payments, Stripe uses {@code setup_future_usage} to help you comply
2098
       * with regional legislation and network rules, such as <a
2099
       * href="https://stripe.com/strong-customer-authentication">SCA</a>.
2100
       *
2101
       * <p>One of {@code none}, {@code off_session}, or {@code on_session}.
2102
       */
2103
      @SerializedName("setup_future_usage")
2104
      String setupFutureUsage;
2105
    }
2106

2107
    /**
2108
     * For more details about Card, please refer to the <a href="https://docs.stripe.com/api">API
2109
     * Reference.</a>
2110
     */
2111
    @Getter
2112
    @Setter
2113
    @EqualsAndHashCode(callSuper = false)
2114
    public static class Card extends StripeObject {
×
2115
      @SerializedName("installments")
2116
      Installments installments;
2117

2118
      /**
2119
       * We strongly recommend that you rely on our SCA Engine to automatically prompt your
2120
       * customers for authentication based on risk level and <a
2121
       * href="https://stripe.com/docs/strong-customer-authentication">other requirements</a>.
2122
       * However, if you wish to request 3D Secure based on logic from your own fraud engine,
2123
       * provide this option. If not provided, this value defaults to {@code automatic}. Read our
2124
       * guide on <a
2125
       * href="https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds">manually
2126
       * requesting 3D Secure</a> for more information on how this configuration interacts with
2127
       * Radar and our SCA Engine.
2128
       *
2129
       * <p>One of {@code any}, {@code automatic}, or {@code challenge}.
2130
       */
2131
      @SerializedName("request_three_d_secure")
2132
      String requestThreeDSecure;
2133

2134
      /**
2135
       * Indicates that you intend to make future payments with this PaymentIntent's payment method.
2136
       *
2137
       * <p>If you provide a Customer with the PaymentIntent, you can use this parameter to <a
2138
       * href="https://stripe.com/payments/save-during-payment">attach the payment method</a> to the
2139
       * Customer after the PaymentIntent is confirmed and the customer completes any required
2140
       * actions. If you don't provide a Customer, you can still <a
2141
       * href="https://stripe.com/api/payment_methods/attach">attach</a> the payment method to a
2142
       * Customer after the transaction completes.
2143
       *
2144
       * <p>If the payment method is {@code card_present} and isn't a digital wallet, Stripe creates
2145
       * and attaches a <a
2146
       * href="https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card">generated_card</a>
2147
       * payment method representing the card to the Customer instead.
2148
       *
2149
       * <p>When processing card payments, Stripe uses {@code setup_future_usage} to help you comply
2150
       * with regional legislation and network rules, such as <a
2151
       * href="https://stripe.com/strong-customer-authentication">SCA</a>.
2152
       *
2153
       * <p>One of {@code none}, {@code off_session}, or {@code on_session}.
2154
       */
2155
      @SerializedName("setup_future_usage")
2156
      String setupFutureUsage;
2157

2158
      /**
2159
       * Provides information about a card payment that customers see on their statements.
2160
       * Concatenated with the Kana prefix (shortened Kana descriptor) or Kana statement descriptor
2161
       * that’s set on the account to form the complete statement descriptor. Maximum 22 characters.
2162
       * On card statements, the <em>concatenation</em> of both prefix and suffix (including
2163
       * separators) will appear truncated to 22 characters.
2164
       */
2165
      @SerializedName("statement_descriptor_suffix_kana")
2166
      String statementDescriptorSuffixKana;
2167

2168
      /**
2169
       * Provides information about a card payment that customers see on their statements.
2170
       * Concatenated with the Kanji prefix (shortened Kanji descriptor) or Kanji statement
2171
       * descriptor that’s set on the account to form the complete statement descriptor. Maximum 17
2172
       * characters. On card statements, the <em>concatenation</em> of both prefix and suffix
2173
       * (including separators) will appear truncated to 17 characters.
2174
       */
2175
      @SerializedName("statement_descriptor_suffix_kanji")
2176
      String statementDescriptorSuffixKanji;
2177

2178
      /**
2179
       * For more details about Installments, please refer to the <a
2180
       * href="https://docs.stripe.com/api">API Reference.</a>
2181
       */
2182
      @Getter
2183
      @Setter
2184
      @EqualsAndHashCode(callSuper = false)
2185
      public static class Installments extends StripeObject {
×
2186
        /** Indicates if installments are enabled. */
2187
        @SerializedName("enabled")
2188
        Boolean enabled;
2189
      }
2190
    }
2191

2192
    /**
2193
     * For more details about Cashapp, please refer to the <a href="https://docs.stripe.com/api">API
2194
     * Reference.</a>
2195
     */
2196
    @Getter
2197
    @Setter
2198
    @EqualsAndHashCode(callSuper = false)
2199
    public static class Cashapp extends StripeObject {
×
2200
      /**
2201
       * Indicates that you intend to make future payments with this PaymentIntent's payment method.
2202
       *
2203
       * <p>If you provide a Customer with the PaymentIntent, you can use this parameter to <a
2204
       * href="https://stripe.com/payments/save-during-payment">attach the payment method</a> to the
2205
       * Customer after the PaymentIntent is confirmed and the customer completes any required
2206
       * actions. If you don't provide a Customer, you can still <a
2207
       * href="https://stripe.com/api/payment_methods/attach">attach</a> the payment method to a
2208
       * Customer after the transaction completes.
2209
       *
2210
       * <p>If the payment method is {@code card_present} and isn't a digital wallet, Stripe creates
2211
       * and attaches a <a
2212
       * href="https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card">generated_card</a>
2213
       * payment method representing the card to the Customer instead.
2214
       *
2215
       * <p>When processing card payments, Stripe uses {@code setup_future_usage} to help you comply
2216
       * with regional legislation and network rules, such as <a
2217
       * href="https://stripe.com/strong-customer-authentication">SCA</a>.
2218
       *
2219
       * <p>Equal to {@code none}.
2220
       */
2221
      @SerializedName("setup_future_usage")
2222
      String setupFutureUsage;
2223
    }
2224

2225
    /**
2226
     * For more details about CustomerBalance, please refer to the <a
2227
     * href="https://docs.stripe.com/api">API Reference.</a>
2228
     */
2229
    @Getter
2230
    @Setter
2231
    @EqualsAndHashCode(callSuper = false)
2232
    public static class CustomerBalance extends StripeObject {
×
2233
      @SerializedName("bank_transfer")
2234
      BankTransfer bankTransfer;
2235

2236
      /**
2237
       * The funding method type to be used when there are not enough funds in the customer balance.
2238
       * Permitted values include: {@code bank_transfer}.
2239
       *
2240
       * <p>Equal to {@code bank_transfer}.
2241
       */
2242
      @SerializedName("funding_type")
2243
      String fundingType;
2244

2245
      /**
2246
       * Indicates that you intend to make future payments with this PaymentIntent's payment method.
2247
       *
2248
       * <p>If you provide a Customer with the PaymentIntent, you can use this parameter to <a
2249
       * href="https://stripe.com/payments/save-during-payment">attach the payment method</a> to the
2250
       * Customer after the PaymentIntent is confirmed and the customer completes any required
2251
       * actions. If you don't provide a Customer, you can still <a
2252
       * href="https://stripe.com/api/payment_methods/attach">attach</a> the payment method to a
2253
       * Customer after the transaction completes.
2254
       *
2255
       * <p>If the payment method is {@code card_present} and isn't a digital wallet, Stripe creates
2256
       * and attaches a <a
2257
       * href="https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card">generated_card</a>
2258
       * payment method representing the card to the Customer instead.
2259
       *
2260
       * <p>When processing card payments, Stripe uses {@code setup_future_usage} to help you comply
2261
       * with regional legislation and network rules, such as <a
2262
       * href="https://stripe.com/strong-customer-authentication">SCA</a>.
2263
       *
2264
       * <p>Equal to {@code none}.
2265
       */
2266
      @SerializedName("setup_future_usage")
2267
      String setupFutureUsage;
2268

2269
      /**
2270
       * For more details about BankTransfer, please refer to the <a
2271
       * href="https://docs.stripe.com/api">API Reference.</a>
2272
       */
2273
      @Getter
2274
      @Setter
2275
      @EqualsAndHashCode(callSuper = false)
2276
      public static class BankTransfer extends StripeObject {
×
2277
        @SerializedName("eu_bank_transfer")
2278
        EuBankTransfer euBankTransfer;
2279

2280
        /**
2281
         * List of address types that should be returned in the financial_addresses response. If not
2282
         * specified, all valid types will be returned.
2283
         *
2284
         * <p>Permitted values include: {@code sort_code}, {@code zengin}, {@code iban}, or {@code
2285
         * spei}.
2286
         */
2287
        @SerializedName("requested_address_types")
2288
        List<String> requestedAddressTypes;
2289

2290
        /**
2291
         * The bank transfer type that this PaymentIntent is allowed to use for funding Permitted
2292
         * values include: {@code eu_bank_transfer}, {@code gb_bank_transfer}, {@code
2293
         * jp_bank_transfer}, {@code mx_bank_transfer}, or {@code us_bank_transfer}.
2294
         *
2295
         * <p>One of {@code eu_bank_transfer}, {@code gb_bank_transfer}, {@code jp_bank_transfer},
2296
         * {@code mx_bank_transfer}, or {@code us_bank_transfer}.
2297
         */
2298
        @SerializedName("type")
2299
        String type;
2300

2301
        /**
2302
         * For more details about EuBankTransfer, please refer to the <a
2303
         * href="https://docs.stripe.com/api">API Reference.</a>
2304
         */
2305
        @Getter
2306
        @Setter
2307
        @EqualsAndHashCode(callSuper = false)
2308
        public static class EuBankTransfer extends StripeObject {
×
2309
          /**
2310
           * The desired country code of the bank account information. Permitted values include:
2311
           * {@code BE}, {@code DE}, {@code ES}, {@code FR}, {@code IE}, or {@code NL}.
2312
           *
2313
           * <p>One of {@code BE}, {@code DE}, {@code ES}, {@code FR}, {@code IE}, or {@code NL}.
2314
           */
2315
          @SerializedName("country")
2316
          String country;
2317
        }
2318
      }
2319
    }
2320

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

2354
    /**
2355
     * For more details about Fpx, please refer to the <a href="https://docs.stripe.com/api">API
2356
     * Reference.</a>
2357
     */
2358
    @Getter
2359
    @Setter
2360
    @EqualsAndHashCode(callSuper = false)
2361
    public static class Fpx extends StripeObject {
×
2362
      /**
2363
       * Indicates that you intend to make future payments with this PaymentIntent's payment method.
2364
       *
2365
       * <p>If you provide a Customer with the PaymentIntent, you can use this parameter to <a
2366
       * href="https://stripe.com/payments/save-during-payment">attach the payment method</a> to the
2367
       * Customer after the PaymentIntent is confirmed and the customer completes any required
2368
       * actions. If you don't provide a Customer, you can still <a
2369
       * href="https://stripe.com/api/payment_methods/attach">attach</a> the payment method to a
2370
       * Customer after the transaction completes.
2371
       *
2372
       * <p>If the payment method is {@code card_present} and isn't a digital wallet, Stripe creates
2373
       * and attaches a <a
2374
       * href="https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card">generated_card</a>
2375
       * payment method representing the card to the Customer instead.
2376
       *
2377
       * <p>When processing card payments, Stripe uses {@code setup_future_usage} to help you comply
2378
       * with regional legislation and network rules, such as <a
2379
       * href="https://stripe.com/strong-customer-authentication">SCA</a>.
2380
       *
2381
       * <p>Equal to {@code none}.
2382
       */
2383
      @SerializedName("setup_future_usage")
2384
      String setupFutureUsage;
2385
    }
2386

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

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

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

2486
    /**
2487
     * For more details about KakaoPay, please refer to the <a
2488
     * href="https://docs.stripe.com/api">API Reference.</a>
2489
     */
2490
    @Getter
2491
    @Setter
2492
    @EqualsAndHashCode(callSuper = false)
NEW
2493
    public static class KakaoPay extends StripeObject {
×
2494
      /**
2495
       * Controls when the funds will be captured from the customer's account.
2496
       *
2497
       * <p>Equal to {@code manual}.
2498
       */
2499
      @SerializedName("capture_method")
2500
      String captureMethod;
2501

2502
      /**
2503
       * Indicates that you intend to make future payments with this PaymentIntent's payment method.
2504
       *
2505
       * <p>If you provide a Customer with the PaymentIntent, you can use this parameter to <a
2506
       * href="https://stripe.com/payments/save-during-payment">attach the payment method</a> to the
2507
       * Customer after the PaymentIntent is confirmed and the customer completes any required
2508
       * actions. If you don't provide a Customer, you can still <a
2509
       * href="https://stripe.com/api/payment_methods/attach">attach</a> the payment method to a
2510
       * Customer after the transaction completes.
2511
       *
2512
       * <p>If the payment method is {@code card_present} and isn't a digital wallet, Stripe creates
2513
       * and attaches a <a
2514
       * href="https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card">generated_card</a>
2515
       * payment method representing the card to the Customer instead.
2516
       *
2517
       * <p>When processing card payments, Stripe uses {@code setup_future_usage} to help you comply
2518
       * with regional legislation and network rules, such as <a
2519
       * href="https://stripe.com/strong-customer-authentication">SCA</a>.
2520
       *
2521
       * <p>One of {@code none}, or {@code off_session}.
2522
       */
2523
      @SerializedName("setup_future_usage")
2524
      String setupFutureUsage;
2525
    }
2526

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

2560
    /**
2561
     * For more details about Konbini, please refer to the <a href="https://docs.stripe.com/api">API
2562
     * Reference.</a>
2563
     */
2564
    @Getter
2565
    @Setter
2566
    @EqualsAndHashCode(callSuper = false)
2567
    public static class Konbini extends StripeObject {
×
2568
      /**
2569
       * The number of calendar days (between 1 and 60) after which Konbini payment instructions
2570
       * will expire. For example, if a PaymentIntent is confirmed with Konbini and {@code
2571
       * expires_after_days} set to 2 on Monday JST, the instructions will expire on Wednesday
2572
       * 23:59:59 JST.
2573
       */
2574
      @SerializedName("expires_after_days")
2575
      Long expiresAfterDays;
2576

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

2602
    /**
2603
     * For more details about KrCard, please refer to the <a href="https://docs.stripe.com/api">API
2604
     * Reference.</a>
2605
     */
2606
    @Getter
2607
    @Setter
2608
    @EqualsAndHashCode(callSuper = false)
NEW
2609
    public static class KrCard extends StripeObject {
×
2610
      /**
2611
       * Controls when the funds will be captured from the customer's account.
2612
       *
2613
       * <p>Equal to {@code manual}.
2614
       */
2615
      @SerializedName("capture_method")
2616
      String captureMethod;
2617

2618
      /**
2619
       * Indicates that you intend to make future payments with this PaymentIntent's payment method.
2620
       *
2621
       * <p>If you provide a Customer with the PaymentIntent, you can use this parameter to <a
2622
       * href="https://stripe.com/payments/save-during-payment">attach the payment method</a> to the
2623
       * Customer after the PaymentIntent is confirmed and the customer completes any required
2624
       * actions. If you don't provide a Customer, you can still <a
2625
       * href="https://stripe.com/api/payment_methods/attach">attach</a> the payment method to a
2626
       * Customer after the transaction completes.
2627
       *
2628
       * <p>If the payment method is {@code card_present} and isn't a digital wallet, Stripe creates
2629
       * and attaches a <a
2630
       * href="https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card">generated_card</a>
2631
       * payment method representing the card to the Customer instead.
2632
       *
2633
       * <p>When processing card payments, Stripe uses {@code setup_future_usage} to help you comply
2634
       * with regional legislation and network rules, such as <a
2635
       * href="https://stripe.com/strong-customer-authentication">SCA</a>.
2636
       *
2637
       * <p>One of {@code none}, or {@code off_session}.
2638
       */
2639
      @SerializedName("setup_future_usage")
2640
      String setupFutureUsage;
2641
    }
2642

2643
    /**
2644
     * For more details about Link, please refer to the <a href="https://docs.stripe.com/api">API
2645
     * Reference.</a>
2646
     */
2647
    @Getter
2648
    @Setter
2649
    @EqualsAndHashCode(callSuper = false)
2650
    public static class Link extends StripeObject {
×
2651
      /**
2652
       * Indicates that you intend to make future payments with this PaymentIntent's payment method.
2653
       *
2654
       * <p>If you provide a Customer with the PaymentIntent, you can use this parameter to <a
2655
       * href="https://stripe.com/payments/save-during-payment">attach the payment method</a> to the
2656
       * Customer after the PaymentIntent is confirmed and the customer completes any required
2657
       * actions. If you don't provide a Customer, you can still <a
2658
       * href="https://stripe.com/api/payment_methods/attach">attach</a> the payment method to a
2659
       * Customer after the transaction completes.
2660
       *
2661
       * <p>If the payment method is {@code card_present} and isn't a digital wallet, Stripe creates
2662
       * and attaches a <a
2663
       * href="https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card">generated_card</a>
2664
       * payment method representing the card to the Customer instead.
2665
       *
2666
       * <p>When processing card payments, Stripe uses {@code setup_future_usage} to help you comply
2667
       * with regional legislation and network rules, such as <a
2668
       * href="https://stripe.com/strong-customer-authentication">SCA</a>.
2669
       *
2670
       * <p>One of {@code none}, or {@code off_session}.
2671
       */
2672
      @SerializedName("setup_future_usage")
2673
      String setupFutureUsage;
2674
    }
2675

2676
    /**
2677
     * For more details about Mobilepay, please refer to the <a
2678
     * href="https://docs.stripe.com/api">API Reference.</a>
2679
     */
2680
    @Getter
2681
    @Setter
2682
    @EqualsAndHashCode(callSuper = false)
2683
    public static class Mobilepay extends StripeObject {
×
2684
      /**
2685
       * Indicates that you intend to make future payments with this PaymentIntent's payment method.
2686
       *
2687
       * <p>If you provide a Customer with the PaymentIntent, you can use this parameter to <a
2688
       * href="https://stripe.com/payments/save-during-payment">attach the payment method</a> to the
2689
       * Customer after the PaymentIntent is confirmed and the customer completes any required
2690
       * actions. If you don't provide a Customer, you can still <a
2691
       * href="https://stripe.com/api/payment_methods/attach">attach</a> the payment method to a
2692
       * Customer after the transaction completes.
2693
       *
2694
       * <p>If the payment method is {@code card_present} and isn't a digital wallet, Stripe creates
2695
       * and attaches a <a
2696
       * href="https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card">generated_card</a>
2697
       * payment method representing the card to the Customer instead.
2698
       *
2699
       * <p>When processing card payments, Stripe uses {@code setup_future_usage} to help you comply
2700
       * with regional legislation and network rules, such as <a
2701
       * href="https://stripe.com/strong-customer-authentication">SCA</a>.
2702
       *
2703
       * <p>Equal to {@code none}.
2704
       */
2705
      @SerializedName("setup_future_usage")
2706
      String setupFutureUsage;
2707
    }
2708

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

2742
    /**
2743
     * For more details about NaverPay, please refer to the <a
2744
     * href="https://docs.stripe.com/api">API Reference.</a>
2745
     */
2746
    @Getter
2747
    @Setter
2748
    @EqualsAndHashCode(callSuper = false)
NEW
2749
    public static class NaverPay extends StripeObject {
×
2750
      /**
2751
       * Controls when the funds will be captured from the customer's account.
2752
       *
2753
       * <p>Equal to {@code manual}.
2754
       */
2755
      @SerializedName("capture_method")
2756
      String captureMethod;
2757
    }
2758

2759
    /**
2760
     * For more details about Oxxo, please refer to the <a href="https://docs.stripe.com/api">API
2761
     * Reference.</a>
2762
     */
2763
    @Getter
2764
    @Setter
2765
    @EqualsAndHashCode(callSuper = false)
2766
    public static class Oxxo extends StripeObject {
×
2767
      /**
2768
       * The number of calendar days before an OXXO invoice expires. For example, if you create an
2769
       * OXXO invoice on Monday and you set expires_after_days to 2, the OXXO invoice will expire on
2770
       * Wednesday at 23:59 America/Mexico_City time.
2771
       */
2772
      @SerializedName("expires_after_days")
2773
      Long expiresAfterDays;
2774

2775
      /**
2776
       * Indicates that you intend to make future payments with this PaymentIntent's payment method.
2777
       *
2778
       * <p>If you provide a Customer with the PaymentIntent, you can use this parameter to <a
2779
       * href="https://stripe.com/payments/save-during-payment">attach the payment method</a> to the
2780
       * Customer after the PaymentIntent is confirmed and the customer completes any required
2781
       * actions. If you don't provide a Customer, you can still <a
2782
       * href="https://stripe.com/api/payment_methods/attach">attach</a> the payment method to a
2783
       * Customer after the transaction completes.
2784
       *
2785
       * <p>If the payment method is {@code card_present} and isn't a digital wallet, Stripe creates
2786
       * and attaches a <a
2787
       * href="https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card">generated_card</a>
2788
       * payment method representing the card to the Customer instead.
2789
       *
2790
       * <p>When processing card payments, Stripe uses {@code setup_future_usage} to help you comply
2791
       * with regional legislation and network rules, such as <a
2792
       * href="https://stripe.com/strong-customer-authentication">SCA</a>.
2793
       *
2794
       * <p>Equal to {@code none}.
2795
       */
2796
      @SerializedName("setup_future_usage")
2797
      String setupFutureUsage;
2798
    }
2799

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

2833
    /**
2834
     * For more details about Payco, please refer to the <a href="https://docs.stripe.com/api">API
2835
     * Reference.</a>
2836
     */
2837
    @Getter
2838
    @Setter
2839
    @EqualsAndHashCode(callSuper = false)
NEW
2840
    public static class Payco extends StripeObject {
×
2841
      /**
2842
       * Controls when the funds will be captured from the customer's account.
2843
       *
2844
       * <p>Equal to {@code manual}.
2845
       */
2846
      @SerializedName("capture_method")
2847
      String captureMethod;
2848
    }
2849

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

2883
    /**
2884
     * For more details about Paypal, please refer to the <a href="https://docs.stripe.com/api">API
2885
     * Reference.</a>
2886
     */
2887
    @Getter
2888
    @Setter
2889
    @EqualsAndHashCode(callSuper = false)
2890
    public static class Paypal extends StripeObject {
×
2891
      /**
2892
       * Controls when the funds will be captured from the customer's account.
2893
       *
2894
       * <p>Equal to {@code manual}.
2895
       */
2896
      @SerializedName("capture_method")
2897
      String captureMethod;
2898

2899
      /** Preferred locale of the PayPal checkout page that the customer is redirected to. */
2900
      @SerializedName("preferred_locale")
2901
      String preferredLocale;
2902

2903
      /**
2904
       * A reference of the PayPal transaction visible to customer which is mapped to PayPal's
2905
       * invoice ID. This must be a globally unique ID if you have configured in your PayPal
2906
       * settings to block multiple payments per invoice ID.
2907
       */
2908
      @SerializedName("reference")
2909
      String reference;
2910

2911
      /**
2912
       * Indicates that you intend to make future payments with this PaymentIntent's payment method.
2913
       *
2914
       * <p>If you provide a Customer with the PaymentIntent, you can use this parameter to <a
2915
       * href="https://stripe.com/payments/save-during-payment">attach the payment method</a> to the
2916
       * Customer after the PaymentIntent is confirmed and the customer completes any required
2917
       * actions. If you don't provide a Customer, you can still <a
2918
       * href="https://stripe.com/api/payment_methods/attach">attach</a> the payment method to a
2919
       * Customer after the transaction completes.
2920
       *
2921
       * <p>If the payment method is {@code card_present} and isn't a digital wallet, Stripe creates
2922
       * and attaches a <a
2923
       * href="https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card">generated_card</a>
2924
       * payment method representing the card to the Customer instead.
2925
       *
2926
       * <p>When processing card payments, Stripe uses {@code setup_future_usage} to help you comply
2927
       * with regional legislation and network rules, such as <a
2928
       * href="https://stripe.com/strong-customer-authentication">SCA</a>.
2929
       *
2930
       * <p>One of {@code none}, or {@code off_session}.
2931
       */
2932
      @SerializedName("setup_future_usage")
2933
      String setupFutureUsage;
2934

2935
      /**
2936
       * The Stripe connected account IDs of the sellers on the platform for this transaction
2937
       * (optional). Only allowed when <a
2938
       * href="https://stripe.com/docs/connect/separate-charges-and-transfers">separate charges and
2939
       * transfers</a> are used.
2940
       */
2941
      @SerializedName("subsellers")
2942
      List<String> subsellers;
2943
    }
2944

2945
    /**
2946
     * For more details about Payto, please refer to the <a href="https://docs.stripe.com/api">API
2947
     * Reference.</a>
2948
     */
2949
    @Getter
2950
    @Setter
2951
    @EqualsAndHashCode(callSuper = false)
2952
    public static class Payto extends StripeObject {
×
2953
      @SerializedName("mandate_options")
2954
      MandateOptions mandateOptions;
2955

2956
      /**
2957
       * Indicates that you intend to make future payments with this PaymentIntent's payment method.
2958
       *
2959
       * <p>If you provide a Customer with the PaymentIntent, you can use this parameter to <a
2960
       * href="https://stripe.com/payments/save-during-payment">attach the payment method</a> to the
2961
       * Customer after the PaymentIntent is confirmed and the customer completes any required
2962
       * actions. If you don't provide a Customer, you can still <a
2963
       * href="https://stripe.com/api/payment_methods/attach">attach</a> the payment method to a
2964
       * Customer after the transaction completes.
2965
       *
2966
       * <p>If the payment method is {@code card_present} and isn't a digital wallet, Stripe creates
2967
       * and attaches a <a
2968
       * href="https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card">generated_card</a>
2969
       * payment method representing the card to the Customer instead.
2970
       *
2971
       * <p>When processing card payments, Stripe uses {@code setup_future_usage} to help you comply
2972
       * with regional legislation and network rules, such as <a
2973
       * href="https://stripe.com/strong-customer-authentication">SCA</a>.
2974
       *
2975
       * <p>One of {@code none}, or {@code off_session}.
2976
       */
2977
      @SerializedName("setup_future_usage")
2978
      String setupFutureUsage;
2979

2980
      /**
2981
       * For more details about MandateOptions, please refer to the <a
2982
       * href="https://docs.stripe.com/api">API Reference.</a>
2983
       */
2984
      @Getter
2985
      @Setter
2986
      @EqualsAndHashCode(callSuper = false)
2987
      public static class MandateOptions extends StripeObject {
×
2988
        /**
2989
         * Amount that will be collected. It is required when {@code amount_type} is {@code fixed}.
2990
         */
2991
        @SerializedName("amount")
2992
        Long amount;
2993

2994
        /**
2995
         * The type of amount that will be collected. The amount charged must be exact or up to the
2996
         * value of {@code amount} param for {@code fixed} or {@code maximum} type respectively.
2997
         *
2998
         * <p>One of {@code fixed}, or {@code maximum}.
2999
         */
3000
        @SerializedName("amount_type")
3001
        String amountType;
3002

3003
        /**
3004
         * Date, in YYYY-MM-DD format, after which payments will not be collected. Defaults to no
3005
         * end date.
3006
         */
3007
        @SerializedName("end_date")
3008
        String endDate;
3009

3010
        /**
3011
         * The periodicity at which payments will be collected.
3012
         *
3013
         * <p>One of {@code adhoc}, {@code annual}, {@code daily}, {@code fortnightly}, {@code
3014
         * monthly}, {@code quarterly}, {@code semi_annual}, or {@code weekly}.
3015
         */
3016
        @SerializedName("payment_schedule")
3017
        String paymentSchedule;
3018

3019
        /**
3020
         * The number of payments that will be made during a payment period. Defaults to 1 except
3021
         * for when {@code payment_schedule} is {@code adhoc}. In that case, it defaults to no
3022
         * limit.
3023
         */
3024
        @SerializedName("payments_per_period")
3025
        Long paymentsPerPeriod;
3026

3027
        /**
3028
         * The purpose for which payments are made. Defaults to retail.
3029
         *
3030
         * <p>One of {@code dependant_support}, {@code government}, {@code loan}, {@code mortgage},
3031
         * {@code other}, {@code pension}, {@code personal}, {@code retail}, {@code salary}, {@code
3032
         * tax}, or {@code utility}.
3033
         */
3034
        @SerializedName("purpose")
3035
        String purpose;
3036

3037
        /**
3038
         * Date, in YYYY-MM-DD format, from which payments will be collected. Defaults to
3039
         * confirmation time.
3040
         */
3041
        @SerializedName("start_date")
3042
        String startDate;
3043
      }
3044
    }
3045

3046
    /**
3047
     * For more details about Pix, please refer to the <a href="https://docs.stripe.com/api">API
3048
     * Reference.</a>
3049
     */
3050
    @Getter
3051
    @Setter
3052
    @EqualsAndHashCode(callSuper = false)
3053
    public static class Pix extends StripeObject {
×
3054
      /** The number of seconds after which Pix payment will expire. */
3055
      @SerializedName("expires_after_seconds")
3056
      Long expiresAfterSeconds;
3057
    }
3058

3059
    /**
3060
     * For more details about RevolutPay, please refer to the <a
3061
     * href="https://docs.stripe.com/api">API Reference.</a>
3062
     */
3063
    @Getter
3064
    @Setter
3065
    @EqualsAndHashCode(callSuper = false)
3066
    public static class RevolutPay extends StripeObject {
×
3067
      /**
3068
       * Indicates that you intend to make future payments with this PaymentIntent's payment method.
3069
       *
3070
       * <p>If you provide a Customer with the PaymentIntent, you can use this parameter to <a
3071
       * href="https://stripe.com/payments/save-during-payment">attach the payment method</a> to the
3072
       * Customer after the PaymentIntent is confirmed and the customer completes any required
3073
       * actions. If you don't provide a Customer, you can still <a
3074
       * href="https://stripe.com/api/payment_methods/attach">attach</a> the payment method to a
3075
       * Customer after the transaction completes.
3076
       *
3077
       * <p>If the payment method is {@code card_present} and isn't a digital wallet, Stripe creates
3078
       * and attaches a <a
3079
       * href="https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card">generated_card</a>
3080
       * payment method representing the card to the Customer instead.
3081
       *
3082
       * <p>When processing card payments, Stripe uses {@code setup_future_usage} to help you comply
3083
       * with regional legislation and network rules, such as <a
3084
       * href="https://stripe.com/strong-customer-authentication">SCA</a>.
3085
       *
3086
       * <p>One of {@code none}, or {@code off_session}.
3087
       */
3088
      @SerializedName("setup_future_usage")
3089
      String setupFutureUsage;
3090
    }
3091

3092
    /**
3093
     * For more details about SamsungPay, please refer to the <a
3094
     * href="https://docs.stripe.com/api">API Reference.</a>
3095
     */
3096
    @Getter
3097
    @Setter
3098
    @EqualsAndHashCode(callSuper = false)
NEW
3099
    public static class SamsungPay extends StripeObject {
×
3100
      /**
3101
       * Controls when the funds will be captured from the customer's account.
3102
       *
3103
       * <p>Equal to {@code manual}.
3104
       */
3105
      @SerializedName("capture_method")
3106
      String captureMethod;
3107
    }
3108

3109
    /**
3110
     * For more details about SepaDebit, please refer to the <a
3111
     * href="https://docs.stripe.com/api">API Reference.</a>
3112
     */
3113
    @Getter
3114
    @Setter
3115
    @EqualsAndHashCode(callSuper = false)
3116
    public static class SepaDebit extends StripeObject {
×
3117
      /**
3118
       * Indicates that you intend to make future payments with this PaymentIntent's payment method.
3119
       *
3120
       * <p>If you provide a Customer with the PaymentIntent, you can use this parameter to <a
3121
       * href="https://stripe.com/payments/save-during-payment">attach the payment method</a> to the
3122
       * Customer after the PaymentIntent is confirmed and the customer completes any required
3123
       * actions. If you don't provide a Customer, you can still <a
3124
       * href="https://stripe.com/api/payment_methods/attach">attach</a> the payment method to a
3125
       * Customer after the transaction completes.
3126
       *
3127
       * <p>If the payment method is {@code card_present} and isn't a digital wallet, Stripe creates
3128
       * and attaches a <a
3129
       * href="https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card">generated_card</a>
3130
       * payment method representing the card to the Customer instead.
3131
       *
3132
       * <p>When processing card payments, Stripe uses {@code setup_future_usage} to help you comply
3133
       * with regional legislation and network rules, such as <a
3134
       * href="https://stripe.com/strong-customer-authentication">SCA</a>.
3135
       *
3136
       * <p>One of {@code none}, {@code off_session}, or {@code on_session}.
3137
       */
3138
      @SerializedName("setup_future_usage")
3139
      String setupFutureUsage;
3140
    }
3141

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

3175
    /**
3176
     * For more details about Swish, please refer to the <a href="https://docs.stripe.com/api">API
3177
     * Reference.</a>
3178
     */
3179
    @Getter
3180
    @Setter
3181
    @EqualsAndHashCode(callSuper = false)
3182
    public static class Swish extends StripeObject {
×
3183
      /**
3184
       * The order reference that will be displayed to customers in the Swish application. Defaults
3185
       * to the {@code id} of the Payment Intent.
3186
       */
3187
      @SerializedName("reference")
3188
      String reference;
3189
    }
3190

3191
    /**
3192
     * For more details about UsBankAccount, please refer to the <a
3193
     * href="https://docs.stripe.com/api">API Reference.</a>
3194
     */
3195
    @Getter
3196
    @Setter
3197
    @EqualsAndHashCode(callSuper = false)
3198
    public static class UsBankAccount extends StripeObject {
×
3199
      @SerializedName("financial_connections")
3200
      FinancialConnections financialConnections;
3201

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

3226
      /**
3227
       * Bank account verification method.
3228
       *
3229
       * <p>One of {@code automatic}, or {@code instant}.
3230
       */
3231
      @SerializedName("verification_method")
3232
      String verificationMethod;
3233

3234
      /**
3235
       * For more details about FinancialConnections, please refer to the <a
3236
       * href="https://docs.stripe.com/api">API Reference.</a>
3237
       */
3238
      @Getter
3239
      @Setter
3240
      @EqualsAndHashCode(callSuper = false)
3241
      public static class FinancialConnections extends StripeObject {
×
3242
        @SerializedName("filters")
3243
        Filters filters;
3244

3245
        @SerializedName("manual_entry")
3246
        ManualEntry manualEntry;
3247

3248
        /**
3249
         * The list of permissions to request. The {@code payment_method} permission must be
3250
         * included.
3251
         */
3252
        @SerializedName("permissions")
3253
        List<String> permissions;
3254

3255
        /** Data features requested to be retrieved upon account creation. */
3256
        @SerializedName("prefetch")
3257
        List<String> prefetch;
3258

3259
        /**
3260
         * For webview integrations only. Upon completing OAuth login in the native browser, the
3261
         * user will be redirected to this URL to return to your app.
3262
         */
3263
        @SerializedName("return_url")
3264
        String returnUrl;
3265

3266
        /**
3267
         * For more details about Filters, please refer to the <a
3268
         * href="https://docs.stripe.com/api">API Reference.</a>
3269
         */
3270
        @Getter
3271
        @Setter
3272
        @EqualsAndHashCode(callSuper = false)
3273
        public static class Filters extends StripeObject {
×
3274
          /**
3275
           * The account subcategories to use to filter for possible accounts to link. Valid
3276
           * subcategories are {@code checking} and {@code savings}.
3277
           */
3278
          @SerializedName("account_subcategories")
3279
          List<String> accountSubcategories;
3280

3281
          /** The institution to use to filter for possible accounts to link. */
3282
          @SerializedName("institution")
3283
          String institution;
3284
        }
3285

3286
        /**
3287
         * For more details about ManualEntry, please refer to the <a
3288
         * href="https://docs.stripe.com/api">API Reference.</a>
3289
         */
3290
        @Getter
3291
        @Setter
3292
        @EqualsAndHashCode(callSuper = false)
3293
        public static class ManualEntry extends StripeObject {
×
3294
          /**
3295
           * Settings for configuring manual entry of account details.
3296
           *
3297
           * <p>One of {@code automatic}, or {@code custom}.
3298
           */
3299
          @SerializedName("mode")
3300
          String mode;
3301
        }
3302
      }
3303
    }
3304
  }
3305

3306
  /**
3307
   * For more details about Permissions, please refer to the <a
3308
   * href="https://docs.stripe.com/api">API Reference.</a>
3309
   */
3310
  @Getter
3311
  @Setter
3312
  @EqualsAndHashCode(callSuper = false)
3313
  public static class Permissions extends StripeObject {
×
3314
    /** Permissions for updating the Checkout Session. */
3315
    @SerializedName("update")
3316
    Update update;
3317

3318
    /**
3319
     * For more details about Update, please refer to the <a href="https://docs.stripe.com/api">API
3320
     * Reference.</a>
3321
     */
3322
    @Getter
3323
    @Setter
3324
    @EqualsAndHashCode(callSuper = false)
3325
    public static class Update extends StripeObject {
×
3326
      /**
3327
       * Determines which entity is allowed to update the shipping details.
3328
       *
3329
       * <p>Default is {@code client_only}. Stripe Checkout client will automatically update the
3330
       * shipping details. If set to {@code server_only}, only your server is allowed to update the
3331
       * shipping details.
3332
       *
3333
       * <p>When set to {@code server_only}, you must add the onShippingDetailsChange event handler
3334
       * when initializing the Stripe Checkout client and manually update the shipping details from
3335
       * your server using the Stripe API.
3336
       *
3337
       * <p>One of {@code client_only}, or {@code server_only}.
3338
       */
3339
      @SerializedName("shipping_details")
3340
      String shippingDetails;
3341
    }
3342
  }
3343

3344
  /**
3345
   * For more details about PhoneNumberCollection, please refer to the <a
3346
   * href="https://docs.stripe.com/api">API Reference.</a>
3347
   */
3348
  @Getter
3349
  @Setter
3350
  @EqualsAndHashCode(callSuper = false)
3351
  public static class PhoneNumberCollection extends StripeObject {
1✔
3352
    /** Indicates whether phone number collection is enabled for the session. */
3353
    @SerializedName("enabled")
3354
    Boolean enabled;
3355
  }
3356

3357
  /**
3358
   * For more details about SavedPaymentMethodOptions, please refer to the <a
3359
   * href="https://docs.stripe.com/api">API Reference.</a>
3360
   */
3361
  @Getter
3362
  @Setter
3363
  @EqualsAndHashCode(callSuper = false)
3364
  public static class SavedPaymentMethodOptions extends StripeObject {
×
3365
    /**
3366
     * Uses the {@code allow_redisplay} value of each saved payment method to filter the set
3367
     * presented to a returning customer. By default, only saved payment methods with
3368
     * ’allow_redisplay: ‘always’ are shown in Checkout.
3369
     */
3370
    @SerializedName("allow_redisplay_filters")
3371
    List<String> allowRedisplayFilters;
3372

3373
    /**
3374
     * Enable customers to choose if they wish to remove their saved payment methods. Disabled by
3375
     * default.
3376
     *
3377
     * <p>One of {@code disabled}, or {@code enabled}.
3378
     */
3379
    @SerializedName("payment_method_remove")
3380
    String paymentMethodRemove;
3381

3382
    /**
3383
     * Enable customers to choose if they wish to save their payment method for future use. Disabled
3384
     * by default.
3385
     *
3386
     * <p>One of {@code disabled}, or {@code enabled}.
3387
     */
3388
    @SerializedName("payment_method_save")
3389
    String paymentMethodSave;
3390
  }
3391

3392
  /**
3393
   * For more details about ShippingAddressCollection, please refer to the <a
3394
   * href="https://docs.stripe.com/api">API Reference.</a>
3395
   */
3396
  @Getter
3397
  @Setter
3398
  @EqualsAndHashCode(callSuper = false)
3399
  public static class ShippingAddressCollection extends StripeObject {
×
3400
    /**
3401
     * An array of two-letter ISO country codes representing which countries Checkout should provide
3402
     * as options for shipping locations. Unsupported country codes: {@code AS, CX, CC, CU, HM, IR,
3403
     * KP, MH, FM, NF, MP, PW, SD, SY, UM, VI}.
3404
     */
3405
    @SerializedName("allowed_countries")
3406
    List<String> allowedCountries;
3407
  }
3408

3409
  /**
3410
   * For more details about ShippingCost, please refer to the <a
3411
   * href="https://docs.stripe.com/api">API Reference.</a>
3412
   */
3413
  @Getter
3414
  @Setter
3415
  @EqualsAndHashCode(callSuper = false)
3416
  public static class ShippingCost extends StripeObject {
×
3417
    /** Total shipping cost before any discounts or taxes are applied. */
3418
    @SerializedName("amount_subtotal")
3419
    Long amountSubtotal;
3420

3421
    /** Total tax amount applied due to shipping costs. If no tax was applied, defaults to 0. */
3422
    @SerializedName("amount_tax")
3423
    Long amountTax;
3424

3425
    /** Total shipping cost after discounts and taxes are applied. */
3426
    @SerializedName("amount_total")
3427
    Long amountTotal;
3428

3429
    /** The ID of the ShippingRate for this order. */
3430
    @SerializedName("shipping_rate")
3431
    @Getter(lombok.AccessLevel.NONE)
3432
    @Setter(lombok.AccessLevel.NONE)
3433
    ExpandableField<ShippingRate> shippingRate;
3434

3435
    /** The taxes applied to the shipping rate. */
3436
    @SerializedName("taxes")
3437
    List<Session.ShippingCost.Tax> taxes;
3438

3439
    /** Get ID of expandable {@code shippingRate} object. */
3440
    public String getShippingRate() {
3441
      return (this.shippingRate != null) ? this.shippingRate.getId() : null;
×
3442
    }
3443

3444
    public void setShippingRate(String id) {
3445
      this.shippingRate = ApiResource.setExpandableFieldId(id, this.shippingRate);
×
3446
    }
×
3447

3448
    /** Get expanded {@code shippingRate}. */
3449
    public ShippingRate getShippingRateObject() {
3450
      return (this.shippingRate != null) ? this.shippingRate.getExpanded() : null;
×
3451
    }
3452

3453
    public void setShippingRateObject(ShippingRate expandableObject) {
3454
      this.shippingRate =
×
3455
          new ExpandableField<ShippingRate>(expandableObject.getId(), expandableObject);
×
3456
    }
×
3457

3458
    /**
3459
     * For more details about Tax, please refer to the <a href="https://docs.stripe.com/api">API
3460
     * Reference.</a>
3461
     */
3462
    @Getter
3463
    @Setter
3464
    @EqualsAndHashCode(callSuper = false)
3465
    public static class Tax extends StripeObject {
×
3466
      /** Amount of tax applied for this rate. */
3467
      @SerializedName("amount")
3468
      Long amount;
3469

3470
      /**
3471
       * Tax rates can be applied to <a
3472
       * href="https://stripe.com/docs/billing/invoices/tax-rates">invoices</a>, <a
3473
       * href="https://stripe.com/docs/billing/subscriptions/taxes">subscriptions</a> and <a
3474
       * href="https://stripe.com/docs/payments/checkout/set-up-a-subscription#tax-rates">Checkout
3475
       * Sessions</a> to collect tax.
3476
       *
3477
       * <p>Related guide: <a href="https://stripe.com/docs/billing/taxes/tax-rates">Tax rates</a>
3478
       */
3479
      @SerializedName("rate")
3480
      TaxRate rate;
3481

3482
      /**
3483
       * The reasoning behind this tax, for example, if the product is tax exempt. The possible
3484
       * values for this field may be extended as new tax rules are supported.
3485
       *
3486
       * <p>One of {@code customer_exempt}, {@code not_collecting}, {@code not_subject_to_tax},
3487
       * {@code not_supported}, {@code portion_product_exempt}, {@code portion_reduced_rated},
3488
       * {@code portion_standard_rated}, {@code product_exempt}, {@code product_exempt_holiday},
3489
       * {@code proportionally_rated}, {@code reduced_rated}, {@code reverse_charge}, {@code
3490
       * standard_rated}, {@code taxable_basis_reduced}, or {@code zero_rated}.
3491
       */
3492
      @SerializedName("taxability_reason")
3493
      String taxabilityReason;
3494

3495
      /** The amount on which tax is calculated, in cents (or local equivalent). */
3496
      @SerializedName("taxable_amount")
3497
      Long taxableAmount;
3498
    }
3499
  }
3500

3501
  /**
3502
   * For more details about ShippingOption, please refer to the <a
3503
   * href="https://docs.stripe.com/api">API Reference.</a>
3504
   */
3505
  @Getter
3506
  @Setter
3507
  @EqualsAndHashCode(callSuper = false)
3508
  public static class ShippingOption extends StripeObject {
×
3509
    /** A non-negative integer in cents representing how much to charge. */
3510
    @SerializedName("shipping_amount")
3511
    Long shippingAmount;
3512

3513
    /** The shipping rate. */
3514
    @SerializedName("shipping_rate")
3515
    @Getter(lombok.AccessLevel.NONE)
3516
    @Setter(lombok.AccessLevel.NONE)
3517
    ExpandableField<ShippingRate> shippingRate;
3518

3519
    /** Get ID of expandable {@code shippingRate} object. */
3520
    public String getShippingRate() {
3521
      return (this.shippingRate != null) ? this.shippingRate.getId() : null;
×
3522
    }
3523

3524
    public void setShippingRate(String id) {
3525
      this.shippingRate = ApiResource.setExpandableFieldId(id, this.shippingRate);
×
3526
    }
×
3527

3528
    /** Get expanded {@code shippingRate}. */
3529
    public ShippingRate getShippingRateObject() {
3530
      return (this.shippingRate != null) ? this.shippingRate.getExpanded() : null;
×
3531
    }
3532

3533
    public void setShippingRateObject(ShippingRate expandableObject) {
3534
      this.shippingRate =
×
3535
          new ExpandableField<ShippingRate>(expandableObject.getId(), expandableObject);
×
3536
    }
×
3537
  }
3538

3539
  /**
3540
   * For more details about TaxIdCollection, please refer to the <a
3541
   * href="https://docs.stripe.com/api">API Reference.</a>
3542
   */
3543
  @Getter
3544
  @Setter
3545
  @EqualsAndHashCode(callSuper = false)
3546
  public static class TaxIdCollection extends StripeObject {
×
3547
    /** Indicates whether tax ID collection is enabled for the session. */
3548
    @SerializedName("enabled")
3549
    Boolean enabled;
3550

3551
    /**
3552
     * Indicates whether a tax ID is required on the payment page
3553
     *
3554
     * <p>One of {@code if_supported}, or {@code never}.
3555
     */
3556
    @SerializedName("required")
3557
    String required;
3558
  }
3559

3560
  /**
3561
   * For more details about TotalDetails, please refer to the <a
3562
   * href="https://docs.stripe.com/api">API Reference.</a>
3563
   */
3564
  @Getter
3565
  @Setter
3566
  @EqualsAndHashCode(callSuper = false)
3567
  public static class TotalDetails extends StripeObject {
×
3568
    /** This is the sum of all the discounts. */
3569
    @SerializedName("amount_discount")
3570
    Long amountDiscount;
3571

3572
    /** This is the sum of all the shipping amounts. */
3573
    @SerializedName("amount_shipping")
3574
    Long amountShipping;
3575

3576
    /** This is the sum of all the tax amounts. */
3577
    @SerializedName("amount_tax")
3578
    Long amountTax;
3579

3580
    @SerializedName("breakdown")
3581
    Breakdown breakdown;
3582

3583
    /**
3584
     * For more details about Breakdown, please refer to the <a
3585
     * href="https://docs.stripe.com/api">API Reference.</a>
3586
     */
3587
    @Getter
3588
    @Setter
3589
    @EqualsAndHashCode(callSuper = false)
3590
    public static class Breakdown extends StripeObject {
×
3591
      /** The aggregated discounts. */
3592
      @SerializedName("discounts")
3593
      List<Session.TotalDetails.Breakdown.Discount> discounts;
3594

3595
      /** The aggregated tax amounts by rate. */
3596
      @SerializedName("taxes")
3597
      List<Session.TotalDetails.Breakdown.Tax> taxes;
3598

3599
      /**
3600
       * For more details about Discount, please refer to the <a
3601
       * href="https://docs.stripe.com/api">API Reference.</a>
3602
       */
3603
      @Getter
3604
      @Setter
3605
      @EqualsAndHashCode(callSuper = false)
3606
      public static class Discount extends StripeObject {
×
3607
        /** The amount discounted. */
3608
        @SerializedName("amount")
3609
        Long amount;
3610

3611
        /**
3612
         * A discount represents the actual application of a <a
3613
         * href="https://stripe.com/docs/api#coupons">coupon</a> or <a
3614
         * href="https://stripe.com/docs/api#promotion_codes">promotion code</a>. It contains
3615
         * information about when the discount began, when it will end, and what it is applied to.
3616
         *
3617
         * <p>Related guide: <a
3618
         * href="https://stripe.com/docs/billing/subscriptions/discounts">Applying discounts to
3619
         * subscriptions</a>
3620
         */
3621
        @SerializedName("discount")
3622
        com.stripe.model.Discount discount;
3623
      }
3624

3625
      /**
3626
       * For more details about Tax, please refer to the <a href="https://docs.stripe.com/api">API
3627
       * Reference.</a>
3628
       */
3629
      @Getter
3630
      @Setter
3631
      @EqualsAndHashCode(callSuper = false)
3632
      public static class Tax extends StripeObject {
×
3633
        /** Amount of tax applied for this rate. */
3634
        @SerializedName("amount")
3635
        Long amount;
3636

3637
        /**
3638
         * Tax rates can be applied to <a
3639
         * href="https://stripe.com/docs/billing/invoices/tax-rates">invoices</a>, <a
3640
         * href="https://stripe.com/docs/billing/subscriptions/taxes">subscriptions</a> and <a
3641
         * href="https://stripe.com/docs/payments/checkout/set-up-a-subscription#tax-rates">Checkout
3642
         * Sessions</a> to collect tax.
3643
         *
3644
         * <p>Related guide: <a href="https://stripe.com/docs/billing/taxes/tax-rates">Tax rates</a>
3645
         */
3646
        @SerializedName("rate")
3647
        TaxRate rate;
3648

3649
        /**
3650
         * The reasoning behind this tax, for example, if the product is tax exempt. The possible
3651
         * values for this field may be extended as new tax rules are supported.
3652
         *
3653
         * <p>One of {@code customer_exempt}, {@code not_collecting}, {@code not_subject_to_tax},
3654
         * {@code not_supported}, {@code portion_product_exempt}, {@code portion_reduced_rated},
3655
         * {@code portion_standard_rated}, {@code product_exempt}, {@code product_exempt_holiday},
3656
         * {@code proportionally_rated}, {@code reduced_rated}, {@code reverse_charge}, {@code
3657
         * standard_rated}, {@code taxable_basis_reduced}, or {@code zero_rated}.
3658
         */
3659
        @SerializedName("taxability_reason")
3660
        String taxabilityReason;
3661

3662
        /** The amount on which tax is calculated, in cents (or local equivalent). */
3663
        @SerializedName("taxable_amount")
3664
        Long taxableAmount;
3665
      }
3666
    }
3667
  }
3668

3669
  @Override
3670
  public void setResponseGetter(StripeResponseGetter responseGetter) {
3671
    super.setResponseGetter(responseGetter);
1✔
3672
    trySetResponseGetter(afterExpiration, responseGetter);
1✔
3673
    trySetResponseGetter(automaticTax, responseGetter);
1✔
3674
    trySetResponseGetter(collectedInformation, responseGetter);
1✔
3675
    trySetResponseGetter(consent, responseGetter);
1✔
3676
    trySetResponseGetter(consentCollection, responseGetter);
1✔
3677
    trySetResponseGetter(currencyConversion, responseGetter);
1✔
3678
    trySetResponseGetter(customText, responseGetter);
1✔
3679
    trySetResponseGetter(customer, responseGetter);
1✔
3680
    trySetResponseGetter(customerDetails, responseGetter);
1✔
3681
    trySetResponseGetter(invoice, responseGetter);
1✔
3682
    trySetResponseGetter(invoiceCreation, responseGetter);
1✔
3683
    trySetResponseGetter(lineItems, responseGetter);
1✔
3684
    trySetResponseGetter(paymentIntent, responseGetter);
1✔
3685
    trySetResponseGetter(paymentLink, responseGetter);
1✔
3686
    trySetResponseGetter(paymentMethodConfigurationDetails, responseGetter);
1✔
3687
    trySetResponseGetter(paymentMethodOptions, responseGetter);
1✔
3688
    trySetResponseGetter(permissions, responseGetter);
1✔
3689
    trySetResponseGetter(phoneNumberCollection, responseGetter);
1✔
3690
    trySetResponseGetter(savedPaymentMethodOptions, responseGetter);
1✔
3691
    trySetResponseGetter(setupIntent, responseGetter);
1✔
3692
    trySetResponseGetter(shippingAddressCollection, responseGetter);
1✔
3693
    trySetResponseGetter(shippingCost, responseGetter);
1✔
3694
    trySetResponseGetter(shippingDetails, responseGetter);
1✔
3695
    trySetResponseGetter(subscription, responseGetter);
1✔
3696
    trySetResponseGetter(taxIdCollection, responseGetter);
1✔
3697
    trySetResponseGetter(totalDetails, responseGetter);
1✔
3698
  }
1✔
3699
}
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