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

stripe / stripe-java / #16673

05 Dec 2024 09:19PM UTC coverage: 12.391% (-0.009%) from 12.4%
#16673

push

github

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

Update generated code for beta

1 of 148 new or added lines in 16 files covered. (0.68%)

16 existing lines in 9 files now uncovered.

18861 of 152217 relevant lines covered (12.39%)

0.12 hits per line

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

2054
      /**
2055
       * For more details about MandateOptions, please refer to the <a
2056
       * href="https://docs.stripe.com/api">API Reference.</a>
2057
       */
2058
      @Getter
2059
      @Setter
2060
      @EqualsAndHashCode(callSuper = false)
NEW
2061
      public static class MandateOptions extends StripeObject {
×
2062
        /**
2063
         * Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must
2064
         * consist of only uppercase letters, numbers, spaces, or the following special characters:
2065
         * '/', '_', '-', '&amp;', '.'. Cannot begin with 'DDIC' or 'STRIPE'.
2066
         */
2067
        @SerializedName("reference_prefix")
2068
        String referencePrefix;
2069
      }
2070
    }
2071

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

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

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

2146
    /**
2147
     * For more details about Card, please refer to the <a href="https://docs.stripe.com/api">API
2148
     * Reference.</a>
2149
     */
2150
    @Getter
2151
    @Setter
2152
    @EqualsAndHashCode(callSuper = false)
2153
    public static class Card extends StripeObject {
×
2154
      @SerializedName("installments")
2155
      Installments installments;
2156

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

2166
      /**
2167
       * Request ability to <a href="https://stripe.com/payments/extended-authorization">capture
2168
       * beyond the standard authorization validity window</a> for this CheckoutSession.
2169
       *
2170
       * <p>One of {@code if_available}, or {@code never}.
2171
       */
2172
      @SerializedName("request_extended_authorization")
2173
      String requestExtendedAuthorization;
2174

2175
      /**
2176
       * Request ability to <a
2177
       * href="https://stripe.com/payments/incremental-authorization">increment the
2178
       * authorization</a> for this CheckoutSession.
2179
       *
2180
       * <p>One of {@code if_available}, or {@code never}.
2181
       */
2182
      @SerializedName("request_incremental_authorization")
2183
      String requestIncrementalAuthorization;
2184

2185
      /**
2186
       * Request ability to make <a href="https://stripe.com/payments/multicapture">multiple
2187
       * captures</a> for this CheckoutSession.
2188
       *
2189
       * <p>One of {@code if_available}, or {@code never}.
2190
       */
2191
      @SerializedName("request_multicapture")
2192
      String requestMulticapture;
2193

2194
      /**
2195
       * Request ability to <a href="https://stripe.com/payments/overcapture">overcapture</a> for
2196
       * this CheckoutSession.
2197
       *
2198
       * <p>One of {@code if_available}, or {@code never}.
2199
       */
2200
      @SerializedName("request_overcapture")
2201
      String requestOvercapture;
2202

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

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

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

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

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

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

2310
    /**
2311
     * For more details about CustomerBalance, please refer to the <a
2312
     * href="https://docs.stripe.com/api">API Reference.</a>
2313
     */
2314
    @Getter
2315
    @Setter
2316
    @EqualsAndHashCode(callSuper = false)
2317
    public static class CustomerBalance extends StripeObject {
×
2318
      @SerializedName("bank_transfer")
2319
      BankTransfer bankTransfer;
2320

2321
      /**
2322
       * The funding method type to be used when there are not enough funds in the customer balance.
2323
       * Permitted values include: {@code bank_transfer}.
2324
       *
2325
       * <p>Equal to {@code bank_transfer}.
2326
       */
2327
      @SerializedName("funding_type")
2328
      String fundingType;
2329

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

2354
      /**
2355
       * For more details about BankTransfer, please refer to the <a
2356
       * href="https://docs.stripe.com/api">API Reference.</a>
2357
       */
2358
      @Getter
2359
      @Setter
2360
      @EqualsAndHashCode(callSuper = false)
2361
      public static class BankTransfer extends StripeObject {
×
2362
        @SerializedName("eu_bank_transfer")
2363
        EuBankTransfer euBankTransfer;
2364

2365
        /**
2366
         * List of address types that should be returned in the financial_addresses response. If not
2367
         * specified, all valid types will be returned.
2368
         *
2369
         * <p>Permitted values include: {@code sort_code}, {@code zengin}, {@code iban}, or {@code
2370
         * spei}.
2371
         */
2372
        @SerializedName("requested_address_types")
2373
        List<String> requestedAddressTypes;
2374

2375
        /**
2376
         * The bank transfer type that this PaymentIntent is allowed to use for funding Permitted
2377
         * values include: {@code eu_bank_transfer}, {@code gb_bank_transfer}, {@code
2378
         * jp_bank_transfer}, {@code mx_bank_transfer}, or {@code us_bank_transfer}.
2379
         *
2380
         * <p>One of {@code eu_bank_transfer}, {@code gb_bank_transfer}, {@code jp_bank_transfer},
2381
         * {@code mx_bank_transfer}, or {@code us_bank_transfer}.
2382
         */
2383
        @SerializedName("type")
2384
        String type;
2385

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

2984
      /** Preferred locale of the PayPal checkout page that the customer is redirected to. */
2985
      @SerializedName("preferred_locale")
2986
      String preferredLocale;
2987

2988
      /**
2989
       * A reference of the PayPal transaction visible to customer which is mapped to PayPal's
2990
       * invoice ID. This must be a globally unique ID if you have configured in your PayPal
2991
       * settings to block multiple payments per invoice ID.
2992
       */
2993
      @SerializedName("reference")
2994
      String reference;
2995

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

3020
      /**
3021
       * The Stripe connected account IDs of the sellers on the platform for this transaction
3022
       * (optional). Only allowed when <a
3023
       * href="https://stripe.com/docs/connect/separate-charges-and-transfers">separate charges and
3024
       * transfers</a> are used.
3025
       */
3026
      @SerializedName("subsellers")
3027
      List<String> subsellers;
3028
    }
3029

3030
    /**
3031
     * For more details about Payto, please refer to the <a href="https://docs.stripe.com/api">API
3032
     * Reference.</a>
3033
     */
3034
    @Getter
3035
    @Setter
3036
    @EqualsAndHashCode(callSuper = false)
3037
    public static class Payto extends StripeObject {
×
3038
      @SerializedName("mandate_options")
3039
      MandateOptions mandateOptions;
3040

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

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

3079
        /**
3080
         * The type of amount that will be collected. The amount charged must be exact or up to the
3081
         * value of {@code amount} param for {@code fixed} or {@code maximum} type respectively.
3082
         *
3083
         * <p>One of {@code fixed}, or {@code maximum}.
3084
         */
3085
        @SerializedName("amount_type")
3086
        String amountType;
3087

3088
        /**
3089
         * Date, in YYYY-MM-DD format, after which payments will not be collected. Defaults to no
3090
         * end date.
3091
         */
3092
        @SerializedName("end_date")
3093
        String endDate;
3094

3095
        /**
3096
         * The periodicity at which payments will be collected.
3097
         *
3098
         * <p>One of {@code adhoc}, {@code annual}, {@code daily}, {@code fortnightly}, {@code
3099
         * monthly}, {@code quarterly}, {@code semi_annual}, or {@code weekly}.
3100
         */
3101
        @SerializedName("payment_schedule")
3102
        String paymentSchedule;
3103

3104
        /**
3105
         * The number of payments that will be made during a payment period. Defaults to 1 except
3106
         * for when {@code payment_schedule} is {@code adhoc}. In that case, it defaults to no
3107
         * limit.
3108
         */
3109
        @SerializedName("payments_per_period")
3110
        Long paymentsPerPeriod;
3111

3112
        /**
3113
         * The purpose for which payments are made. Defaults to retail.
3114
         *
3115
         * <p>One of {@code dependant_support}, {@code government}, {@code loan}, {@code mortgage},
3116
         * {@code other}, {@code pension}, {@code personal}, {@code retail}, {@code salary}, {@code
3117
         * tax}, or {@code utility}.
3118
         */
3119
        @SerializedName("purpose")
3120
        String purpose;
3121

3122
        /**
3123
         * Date, in YYYY-MM-DD format, from which payments will be collected. Defaults to
3124
         * confirmation time.
3125
         */
3126
        @SerializedName("start_date")
3127
        String startDate;
3128
      }
3129
    }
3130

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

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

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

3194
    /**
3195
     * For more details about SepaDebit, please refer to the <a
3196
     * href="https://docs.stripe.com/api">API Reference.</a>
3197
     */
3198
    @Getter
3199
    @Setter
3200
    @EqualsAndHashCode(callSuper = false)
3201
    public static class SepaDebit extends StripeObject {
×
3202
      @SerializedName("mandate_options")
3203
      MandateOptions mandateOptions;
3204

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

3229
      /**
3230
       * For more details about MandateOptions, please refer to the <a
3231
       * href="https://docs.stripe.com/api">API Reference.</a>
3232
       */
3233
      @Getter
3234
      @Setter
3235
      @EqualsAndHashCode(callSuper = false)
NEW
3236
      public static class MandateOptions extends StripeObject {
×
3237
        /**
3238
         * Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must
3239
         * consist of only uppercase letters, numbers, spaces, or the following special characters:
3240
         * '/', '_', '-', '&amp;', '.'. Cannot begin with 'STRIPE'.
3241
         */
3242
        @SerializedName("reference_prefix")
3243
        String referencePrefix;
3244
      }
3245
    }
3246

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

3280
    /**
3281
     * For more details about Swish, please refer to the <a href="https://docs.stripe.com/api">API
3282
     * Reference.</a>
3283
     */
3284
    @Getter
3285
    @Setter
3286
    @EqualsAndHashCode(callSuper = false)
3287
    public static class Swish extends StripeObject {
×
3288
      /**
3289
       * The order reference that will be displayed to customers in the Swish application. Defaults
3290
       * to the {@code id} of the Payment Intent.
3291
       */
3292
      @SerializedName("reference")
3293
      String reference;
3294
    }
3295

3296
    /**
3297
     * For more details about UsBankAccount, please refer to the <a
3298
     * href="https://docs.stripe.com/api">API Reference.</a>
3299
     */
3300
    @Getter
3301
    @Setter
3302
    @EqualsAndHashCode(callSuper = false)
3303
    public static class UsBankAccount extends StripeObject {
×
3304
      @SerializedName("financial_connections")
3305
      FinancialConnections financialConnections;
3306

3307
      /**
3308
       * Indicates that you intend to make future payments with this PaymentIntent's payment method.
3309
       *
3310
       * <p>If you provide a Customer with the PaymentIntent, you can use this parameter to <a
3311
       * href="https://stripe.com/payments/save-during-payment">attach the payment method</a> to the
3312
       * Customer after the PaymentIntent is confirmed and the customer completes any required
3313
       * actions. If you don't provide a Customer, you can still <a
3314
       * href="https://stripe.com/api/payment_methods/attach">attach</a> the payment method to a
3315
       * Customer after the transaction completes.
3316
       *
3317
       * <p>If the payment method is {@code card_present} and isn't a digital wallet, Stripe creates
3318
       * and attaches a <a
3319
       * href="https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card">generated_card</a>
3320
       * payment method representing the card to the Customer instead.
3321
       *
3322
       * <p>When processing card payments, Stripe uses {@code setup_future_usage} to help you comply
3323
       * with regional legislation and network rules, such as <a
3324
       * href="https://stripe.com/strong-customer-authentication">SCA</a>.
3325
       *
3326
       * <p>One of {@code none}, {@code off_session}, or {@code on_session}.
3327
       */
3328
      @SerializedName("setup_future_usage")
3329
      String setupFutureUsage;
3330

3331
      /**
3332
       * Bank account verification method.
3333
       *
3334
       * <p>One of {@code automatic}, or {@code instant}.
3335
       */
3336
      @SerializedName("verification_method")
3337
      String verificationMethod;
3338

3339
      /**
3340
       * For more details about FinancialConnections, please refer to the <a
3341
       * href="https://docs.stripe.com/api">API Reference.</a>
3342
       */
3343
      @Getter
3344
      @Setter
3345
      @EqualsAndHashCode(callSuper = false)
3346
      public static class FinancialConnections extends StripeObject {
×
3347
        @SerializedName("filters")
3348
        Filters filters;
3349

3350
        @SerializedName("manual_entry")
3351
        ManualEntry manualEntry;
3352

3353
        /**
3354
         * The list of permissions to request. The {@code payment_method} permission must be
3355
         * included.
3356
         */
3357
        @SerializedName("permissions")
3358
        List<String> permissions;
3359

3360
        /** Data features requested to be retrieved upon account creation. */
3361
        @SerializedName("prefetch")
3362
        List<String> prefetch;
3363

3364
        /**
3365
         * For webview integrations only. Upon completing OAuth login in the native browser, the
3366
         * user will be redirected to this URL to return to your app.
3367
         */
3368
        @SerializedName("return_url")
3369
        String returnUrl;
3370

3371
        /**
3372
         * For more details about Filters, please refer to the <a
3373
         * href="https://docs.stripe.com/api">API Reference.</a>
3374
         */
3375
        @Getter
3376
        @Setter
3377
        @EqualsAndHashCode(callSuper = false)
3378
        public static class Filters extends StripeObject {
×
3379
          /**
3380
           * The account subcategories to use to filter for possible accounts to link. Valid
3381
           * subcategories are {@code checking} and {@code savings}.
3382
           */
3383
          @SerializedName("account_subcategories")
3384
          List<String> accountSubcategories;
3385

3386
          /** The institution to use to filter for possible accounts to link. */
3387
          @SerializedName("institution")
3388
          String institution;
3389
        }
3390

3391
        /**
3392
         * For more details about ManualEntry, please refer to the <a
3393
         * href="https://docs.stripe.com/api">API Reference.</a>
3394
         */
3395
        @Getter
3396
        @Setter
3397
        @EqualsAndHashCode(callSuper = false)
3398
        public static class ManualEntry extends StripeObject {
×
3399
          /**
3400
           * Settings for configuring manual entry of account details.
3401
           *
3402
           * <p>One of {@code automatic}, or {@code custom}.
3403
           */
3404
          @SerializedName("mode")
3405
          String mode;
3406
        }
3407
      }
3408
    }
3409
  }
3410

3411
  /**
3412
   * For more details about Permissions, please refer to the <a
3413
   * href="https://docs.stripe.com/api">API Reference.</a>
3414
   */
3415
  @Getter
3416
  @Setter
3417
  @EqualsAndHashCode(callSuper = false)
3418
  public static class Permissions extends StripeObject {
×
3419
    /** Permissions for updating the Checkout Session. */
3420
    @SerializedName("update")
3421
    Update update;
3422

3423
    /**
3424
     * For more details about Update, please refer to the <a href="https://docs.stripe.com/api">API
3425
     * Reference.</a>
3426
     */
3427
    @Getter
3428
    @Setter
3429
    @EqualsAndHashCode(callSuper = false)
3430
    public static class Update extends StripeObject {
×
3431
      /**
3432
       * Determines which entity is allowed to update the line items.
3433
       *
3434
       * <p>Default is {@code client_only}. Stripe Checkout client will automatically update the
3435
       * line items. If set to {@code server_only}, only your server is allowed to update the line
3436
       * items.
3437
       *
3438
       * <p>When set to {@code server_only}, you must add the onLineItemsChange event handler when
3439
       * initializing the Stripe Checkout client and manually update the line items from your server
3440
       * using the Stripe API.
3441
       *
3442
       * <p>One of {@code client_only}, or {@code server_only}.
3443
       */
3444
      @SerializedName("line_items")
3445
      String lineItems;
3446

3447
      /**
3448
       * Determines which entity is allowed to update the shipping details.
3449
       *
3450
       * <p>Default is {@code client_only}. Stripe Checkout client will automatically update the
3451
       * shipping details. If set to {@code server_only}, only your server is allowed to update the
3452
       * shipping details.
3453
       *
3454
       * <p>When set to {@code server_only}, you must add the onShippingDetailsChange event handler
3455
       * when initializing the Stripe Checkout client and manually update the shipping details from
3456
       * your server using the Stripe API.
3457
       *
3458
       * <p>One of {@code client_only}, or {@code server_only}.
3459
       */
3460
      @SerializedName("shipping_details")
3461
      String shippingDetails;
3462
    }
3463
  }
3464

3465
  /**
3466
   * For more details about PhoneNumberCollection, please refer to the <a
3467
   * href="https://docs.stripe.com/api">API Reference.</a>
3468
   */
3469
  @Getter
3470
  @Setter
3471
  @EqualsAndHashCode(callSuper = false)
3472
  public static class PhoneNumberCollection extends StripeObject {
1✔
3473
    /** Indicates whether phone number collection is enabled for the session. */
3474
    @SerializedName("enabled")
3475
    Boolean enabled;
3476
  }
3477

3478
  /**
3479
   * For more details about SavedPaymentMethodOptions, please refer to the <a
3480
   * href="https://docs.stripe.com/api">API Reference.</a>
3481
   */
3482
  @Getter
3483
  @Setter
3484
  @EqualsAndHashCode(callSuper = false)
3485
  public static class SavedPaymentMethodOptions extends StripeObject {
×
3486
    /**
3487
     * Uses the {@code allow_redisplay} value of each saved payment method to filter the set
3488
     * presented to a returning customer. By default, only saved payment methods with
3489
     * ’allow_redisplay: ‘always’ are shown in Checkout.
3490
     */
3491
    @SerializedName("allow_redisplay_filters")
3492
    List<String> allowRedisplayFilters;
3493

3494
    /**
3495
     * Enable customers to choose if they wish to remove their saved payment methods. Disabled by
3496
     * default.
3497
     *
3498
     * <p>One of {@code disabled}, or {@code enabled}.
3499
     */
3500
    @SerializedName("payment_method_remove")
3501
    String paymentMethodRemove;
3502

3503
    /**
3504
     * Enable customers to choose if they wish to save their payment method for future use. Disabled
3505
     * by default.
3506
     *
3507
     * <p>One of {@code disabled}, or {@code enabled}.
3508
     */
3509
    @SerializedName("payment_method_save")
3510
    String paymentMethodSave;
3511
  }
3512

3513
  /**
3514
   * For more details about ShippingAddressCollection, please refer to the <a
3515
   * href="https://docs.stripe.com/api">API Reference.</a>
3516
   */
3517
  @Getter
3518
  @Setter
3519
  @EqualsAndHashCode(callSuper = false)
3520
  public static class ShippingAddressCollection extends StripeObject {
×
3521
    /**
3522
     * An array of two-letter ISO country codes representing which countries Checkout should provide
3523
     * as options for shipping locations. Unsupported country codes: {@code AS, CX, CC, CU, HM, IR,
3524
     * KP, MH, FM, NF, MP, PW, SD, SY, UM, VI}.
3525
     */
3526
    @SerializedName("allowed_countries")
3527
    List<String> allowedCountries;
3528
  }
3529

3530
  /**
3531
   * For more details about ShippingCost, please refer to the <a
3532
   * href="https://docs.stripe.com/api">API Reference.</a>
3533
   */
3534
  @Getter
3535
  @Setter
3536
  @EqualsAndHashCode(callSuper = false)
3537
  public static class ShippingCost extends StripeObject {
×
3538
    /** Total shipping cost before any discounts or taxes are applied. */
3539
    @SerializedName("amount_subtotal")
3540
    Long amountSubtotal;
3541

3542
    /** Total tax amount applied due to shipping costs. If no tax was applied, defaults to 0. */
3543
    @SerializedName("amount_tax")
3544
    Long amountTax;
3545

3546
    /** Total shipping cost after discounts and taxes are applied. */
3547
    @SerializedName("amount_total")
3548
    Long amountTotal;
3549

3550
    /** The ID of the ShippingRate for this order. */
3551
    @SerializedName("shipping_rate")
3552
    @Getter(lombok.AccessLevel.NONE)
3553
    @Setter(lombok.AccessLevel.NONE)
3554
    ExpandableField<ShippingRate> shippingRate;
3555

3556
    /** The taxes applied to the shipping rate. */
3557
    @SerializedName("taxes")
3558
    List<Session.ShippingCost.Tax> taxes;
3559

3560
    /** Get ID of expandable {@code shippingRate} object. */
3561
    public String getShippingRate() {
3562
      return (this.shippingRate != null) ? this.shippingRate.getId() : null;
×
3563
    }
3564

3565
    public void setShippingRate(String id) {
3566
      this.shippingRate = ApiResource.setExpandableFieldId(id, this.shippingRate);
×
3567
    }
×
3568

3569
    /** Get expanded {@code shippingRate}. */
3570
    public ShippingRate getShippingRateObject() {
3571
      return (this.shippingRate != null) ? this.shippingRate.getExpanded() : null;
×
3572
    }
3573

3574
    public void setShippingRateObject(ShippingRate expandableObject) {
3575
      this.shippingRate =
×
3576
          new ExpandableField<ShippingRate>(expandableObject.getId(), expandableObject);
×
3577
    }
×
3578

3579
    /**
3580
     * For more details about Tax, please refer to the <a href="https://docs.stripe.com/api">API
3581
     * Reference.</a>
3582
     */
3583
    @Getter
3584
    @Setter
3585
    @EqualsAndHashCode(callSuper = false)
3586
    public static class Tax extends StripeObject {
×
3587
      /** Amount of tax applied for this rate. */
3588
      @SerializedName("amount")
3589
      Long amount;
3590

3591
      /**
3592
       * Tax rates can be applied to <a
3593
       * href="https://stripe.com/docs/billing/invoices/tax-rates">invoices</a>, <a
3594
       * href="https://stripe.com/docs/billing/subscriptions/taxes">subscriptions</a> and <a
3595
       * href="https://stripe.com/docs/payments/checkout/set-up-a-subscription#tax-rates">Checkout
3596
       * Sessions</a> to collect tax.
3597
       *
3598
       * <p>Related guide: <a href="https://stripe.com/docs/billing/taxes/tax-rates">Tax rates</a>
3599
       */
3600
      @SerializedName("rate")
3601
      TaxRate rate;
3602

3603
      /**
3604
       * The reasoning behind this tax, for example, if the product is tax exempt. The possible
3605
       * values for this field may be extended as new tax rules are supported.
3606
       *
3607
       * <p>One of {@code customer_exempt}, {@code not_collecting}, {@code not_subject_to_tax},
3608
       * {@code not_supported}, {@code portion_product_exempt}, {@code portion_reduced_rated},
3609
       * {@code portion_standard_rated}, {@code product_exempt}, {@code product_exempt_holiday},
3610
       * {@code proportionally_rated}, {@code reduced_rated}, {@code reverse_charge}, {@code
3611
       * standard_rated}, {@code taxable_basis_reduced}, or {@code zero_rated}.
3612
       */
3613
      @SerializedName("taxability_reason")
3614
      String taxabilityReason;
3615

3616
      /** The amount on which tax is calculated, in cents (or local equivalent). */
3617
      @SerializedName("taxable_amount")
3618
      Long taxableAmount;
3619
    }
3620
  }
3621

3622
  /**
3623
   * For more details about ShippingOption, please refer to the <a
3624
   * href="https://docs.stripe.com/api">API Reference.</a>
3625
   */
3626
  @Getter
3627
  @Setter
3628
  @EqualsAndHashCode(callSuper = false)
3629
  public static class ShippingOption extends StripeObject {
×
3630
    /** A non-negative integer in cents representing how much to charge. */
3631
    @SerializedName("shipping_amount")
3632
    Long shippingAmount;
3633

3634
    /** The shipping rate. */
3635
    @SerializedName("shipping_rate")
3636
    @Getter(lombok.AccessLevel.NONE)
3637
    @Setter(lombok.AccessLevel.NONE)
3638
    ExpandableField<ShippingRate> shippingRate;
3639

3640
    /** Get ID of expandable {@code shippingRate} object. */
3641
    public String getShippingRate() {
3642
      return (this.shippingRate != null) ? this.shippingRate.getId() : null;
×
3643
    }
3644

3645
    public void setShippingRate(String id) {
3646
      this.shippingRate = ApiResource.setExpandableFieldId(id, this.shippingRate);
×
3647
    }
×
3648

3649
    /** Get expanded {@code shippingRate}. */
3650
    public ShippingRate getShippingRateObject() {
3651
      return (this.shippingRate != null) ? this.shippingRate.getExpanded() : null;
×
3652
    }
3653

3654
    public void setShippingRateObject(ShippingRate expandableObject) {
3655
      this.shippingRate =
×
3656
          new ExpandableField<ShippingRate>(expandableObject.getId(), expandableObject);
×
3657
    }
×
3658
  }
3659

3660
  /**
3661
   * For more details about TaxIdCollection, please refer to the <a
3662
   * href="https://docs.stripe.com/api">API Reference.</a>
3663
   */
3664
  @Getter
3665
  @Setter
3666
  @EqualsAndHashCode(callSuper = false)
3667
  public static class TaxIdCollection extends StripeObject {
×
3668
    /** Indicates whether tax ID collection is enabled for the session. */
3669
    @SerializedName("enabled")
3670
    Boolean enabled;
3671

3672
    /**
3673
     * Indicates whether a tax ID is required on the payment page
3674
     *
3675
     * <p>One of {@code if_supported}, or {@code never}.
3676
     */
3677
    @SerializedName("required")
3678
    String required;
3679
  }
3680

3681
  /**
3682
   * For more details about TotalDetails, please refer to the <a
3683
   * href="https://docs.stripe.com/api">API Reference.</a>
3684
   */
3685
  @Getter
3686
  @Setter
3687
  @EqualsAndHashCode(callSuper = false)
3688
  public static class TotalDetails extends StripeObject {
×
3689
    /** This is the sum of all the discounts. */
3690
    @SerializedName("amount_discount")
3691
    Long amountDiscount;
3692

3693
    /** This is the sum of all the shipping amounts. */
3694
    @SerializedName("amount_shipping")
3695
    Long amountShipping;
3696

3697
    /** This is the sum of all the tax amounts. */
3698
    @SerializedName("amount_tax")
3699
    Long amountTax;
3700

3701
    @SerializedName("breakdown")
3702
    Breakdown breakdown;
3703

3704
    /**
3705
     * For more details about Breakdown, please refer to the <a
3706
     * href="https://docs.stripe.com/api">API Reference.</a>
3707
     */
3708
    @Getter
3709
    @Setter
3710
    @EqualsAndHashCode(callSuper = false)
3711
    public static class Breakdown extends StripeObject {
×
3712
      /** The aggregated discounts. */
3713
      @SerializedName("discounts")
3714
      List<Session.TotalDetails.Breakdown.Discount> discounts;
3715

3716
      /** The aggregated tax amounts by rate. */
3717
      @SerializedName("taxes")
3718
      List<Session.TotalDetails.Breakdown.Tax> taxes;
3719

3720
      /**
3721
       * For more details about Discount, please refer to the <a
3722
       * href="https://docs.stripe.com/api">API Reference.</a>
3723
       */
3724
      @Getter
3725
      @Setter
3726
      @EqualsAndHashCode(callSuper = false)
3727
      public static class Discount extends StripeObject {
×
3728
        /** The amount discounted. */
3729
        @SerializedName("amount")
3730
        Long amount;
3731

3732
        /**
3733
         * A discount represents the actual application of a <a
3734
         * href="https://stripe.com/docs/api#coupons">coupon</a> or <a
3735
         * href="https://stripe.com/docs/api#promotion_codes">promotion code</a>. It contains
3736
         * information about when the discount began, when it will end, and what it is applied to.
3737
         *
3738
         * <p>Related guide: <a
3739
         * href="https://stripe.com/docs/billing/subscriptions/discounts">Applying discounts to
3740
         * subscriptions</a>
3741
         */
3742
        @SerializedName("discount")
3743
        com.stripe.model.Discount discount;
3744
      }
3745

3746
      /**
3747
       * For more details about Tax, please refer to the <a href="https://docs.stripe.com/api">API
3748
       * Reference.</a>
3749
       */
3750
      @Getter
3751
      @Setter
3752
      @EqualsAndHashCode(callSuper = false)
3753
      public static class Tax extends StripeObject {
×
3754
        /** Amount of tax applied for this rate. */
3755
        @SerializedName("amount")
3756
        Long amount;
3757

3758
        /**
3759
         * Tax rates can be applied to <a
3760
         * href="https://stripe.com/docs/billing/invoices/tax-rates">invoices</a>, <a
3761
         * href="https://stripe.com/docs/billing/subscriptions/taxes">subscriptions</a> and <a
3762
         * href="https://stripe.com/docs/payments/checkout/set-up-a-subscription#tax-rates">Checkout
3763
         * Sessions</a> to collect tax.
3764
         *
3765
         * <p>Related guide: <a href="https://stripe.com/docs/billing/taxes/tax-rates">Tax rates</a>
3766
         */
3767
        @SerializedName("rate")
3768
        TaxRate rate;
3769

3770
        /**
3771
         * The reasoning behind this tax, for example, if the product is tax exempt. The possible
3772
         * values for this field may be extended as new tax rules are supported.
3773
         *
3774
         * <p>One of {@code customer_exempt}, {@code not_collecting}, {@code not_subject_to_tax},
3775
         * {@code not_supported}, {@code portion_product_exempt}, {@code portion_reduced_rated},
3776
         * {@code portion_standard_rated}, {@code product_exempt}, {@code product_exempt_holiday},
3777
         * {@code proportionally_rated}, {@code reduced_rated}, {@code reverse_charge}, {@code
3778
         * standard_rated}, {@code taxable_basis_reduced}, or {@code zero_rated}.
3779
         */
3780
        @SerializedName("taxability_reason")
3781
        String taxabilityReason;
3782

3783
        /** The amount on which tax is calculated, in cents (or local equivalent). */
3784
        @SerializedName("taxable_amount")
3785
        Long taxableAmount;
3786
      }
3787
    }
3788
  }
3789

3790
  @Override
3791
  public void setResponseGetter(StripeResponseGetter responseGetter) {
3792
    super.setResponseGetter(responseGetter);
1✔
3793
    trySetResponseGetter(adaptivePricing, responseGetter);
1✔
3794
    trySetResponseGetter(afterExpiration, responseGetter);
1✔
3795
    trySetResponseGetter(automaticTax, responseGetter);
1✔
3796
    trySetResponseGetter(collectedInformation, responseGetter);
1✔
3797
    trySetResponseGetter(consent, responseGetter);
1✔
3798
    trySetResponseGetter(consentCollection, responseGetter);
1✔
3799
    trySetResponseGetter(currencyConversion, responseGetter);
1✔
3800
    trySetResponseGetter(customText, responseGetter);
1✔
3801
    trySetResponseGetter(customer, responseGetter);
1✔
3802
    trySetResponseGetter(customerDetails, responseGetter);
1✔
3803
    trySetResponseGetter(invoice, responseGetter);
1✔
3804
    trySetResponseGetter(invoiceCreation, responseGetter);
1✔
3805
    trySetResponseGetter(lineItems, responseGetter);
1✔
3806
    trySetResponseGetter(paymentIntent, responseGetter);
1✔
3807
    trySetResponseGetter(paymentLink, responseGetter);
1✔
3808
    trySetResponseGetter(paymentMethodConfigurationDetails, responseGetter);
1✔
3809
    trySetResponseGetter(paymentMethodOptions, responseGetter);
1✔
3810
    trySetResponseGetter(permissions, responseGetter);
1✔
3811
    trySetResponseGetter(phoneNumberCollection, responseGetter);
1✔
3812
    trySetResponseGetter(savedPaymentMethodOptions, responseGetter);
1✔
3813
    trySetResponseGetter(setupIntent, responseGetter);
1✔
3814
    trySetResponseGetter(shippingAddressCollection, responseGetter);
1✔
3815
    trySetResponseGetter(shippingCost, responseGetter);
1✔
3816
    trySetResponseGetter(shippingDetails, responseGetter);
1✔
3817
    trySetResponseGetter(subscription, responseGetter);
1✔
3818
    trySetResponseGetter(taxIdCollection, responseGetter);
1✔
3819
    trySetResponseGetter(totalDetails, responseGetter);
1✔
3820
  }
1✔
3821
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc