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

stripe / stripe-java / #16493

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

push

github

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

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

31 existing lines in 7 files now uncovered.

18773 of 145050 relevant lines covered (12.94%)

0.13 hits per line

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

0.0
/src/main/java/com/stripe/model/QuotePreviewInvoice.java
1
// File generated from our OpenAPI spec
2
package com.stripe.model;
3

4
import com.google.gson.annotations.SerializedName;
5
import com.stripe.exception.StripeException;
6
import com.stripe.model.billing.CreditBalanceTransaction;
7
import com.stripe.model.testhelpers.TestClock;
8
import com.stripe.net.ApiRequest;
9
import com.stripe.net.ApiRequestParams;
10
import com.stripe.net.ApiResource;
11
import com.stripe.net.BaseAddress;
12
import com.stripe.net.RequestOptions;
13
import com.stripe.net.StripeResponseGetter;
14
import com.stripe.param.QuotePreviewInvoiceListParams;
15
import java.util.List;
16
import java.util.Map;
17
import java.util.stream.Collectors;
18
import lombok.EqualsAndHashCode;
19
import lombok.Getter;
20
import lombok.Setter;
21

22
/**
23
 * Invoices are statements of amounts owed by a customer, and are either generated one-off, or
24
 * generated periodically from a subscription.
25
 *
26
 * <p>They contain <a href="https://stripe.com/docs/api#invoiceitems">invoice items</a>, and
27
 * proration adjustments that may be caused by subscription upgrades/downgrades (if necessary).
28
 *
29
 * <p>If your invoice is configured to be billed through automatic charges, Stripe automatically
30
 * finalizes your invoice and attempts payment. Note that finalizing the invoice, <a
31
 * href="https://stripe.com/docs/invoicing/integration/automatic-advancement-collection">when
32
 * automatic</a>, does not happen immediately as the invoice is created. Stripe waits until one hour
33
 * after the last webhook was successfully sent (or the last webhook timed out after failing). If
34
 * you (and the platforms you may have connected to) have no webhooks configured, Stripe waits one
35
 * hour after creation to finalize the invoice.
36
 *
37
 * <p>If your invoice is configured to be billed by sending an email, then based on your <a
38
 * href="https://dashboard.stripe.com/account/billing/automatic">email settings</a>, Stripe will
39
 * email the invoice to your customer and await payment. These emails can contain a link to a hosted
40
 * page to pay the invoice.
41
 *
42
 * <p>Stripe applies any customer credit on the account before determining the amount due for the
43
 * invoice (i.e., the amount that will be actually charged). If the amount due for the invoice is
44
 * less than Stripe's <a
45
 * href="https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts">minimum allowed
46
 * charge per currency</a>, the invoice is automatically marked paid, and we add the amount due to
47
 * the customer's credit balance which is applied to the next invoice.
48
 *
49
 * <p>More details on the customer's credit balance are <a
50
 * href="https://stripe.com/docs/billing/customer/balance">here</a>.
51
 *
52
 * <p>Related guide: <a href="https://stripe.com/docs/billing/invoices/sending">Send invoices to
53
 * customers</a>
54
 */
55
@Getter
56
@Setter
57
@EqualsAndHashCode(callSuper = false)
58
public class QuotePreviewInvoice extends ApiResource implements HasId {
×
59
  /**
60
   * The country of the business associated with this invoice, most often the business creating the
61
   * invoice.
62
   */
63
  @SerializedName("account_country")
64
  String accountCountry;
65

66
  /**
67
   * The public name of the business associated with this invoice, most often the business creating
68
   * the invoice.
69
   */
70
  @SerializedName("account_name")
71
  String accountName;
72

73
  /** The account tax IDs associated with the invoice. Only editable when the invoice is a draft. */
74
  @SerializedName("account_tax_ids")
75
  List<ExpandableField<TaxId>> accountTaxIds;
76

77
  /**
78
   * Final amount due at this time for this invoice. If the invoice's total is smaller than the
79
   * minimum charge amount, for example, or if there is account credit that can be applied to the
80
   * invoice, the {@code amount_due} may be 0. If there is a positive {@code starting_balance} for
81
   * the invoice (the customer owes money), the {@code amount_due} will also take that into account.
82
   * The charge that gets generated for the invoice will be for the amount specified in {@code
83
   * amount_due}.
84
   */
85
  @SerializedName("amount_due")
86
  Long amountDue;
87

88
  /** The amount, in cents (or local equivalent), that was paid. */
89
  @SerializedName("amount_paid")
90
  Long amountPaid;
91

92
  /** The difference between amount_due and amount_paid, in cents (or local equivalent). */
93
  @SerializedName("amount_remaining")
94
  Long amountRemaining;
95

96
  /** This is the sum of all the shipping amounts. */
97
  @SerializedName("amount_shipping")
98
  Long amountShipping;
99

100
  /**
101
   * List of expected payments and corresponding due dates. This value will be null for invoices
102
   * where collection_method=charge_automatically.
103
   */
104
  @SerializedName("amounts_due")
105
  List<QuotePreviewInvoice.AmountsDue> amountsDue;
106

107
  /** ID of the Connect Application that created the invoice. */
108
  @SerializedName("application")
109
  @Getter(lombok.AccessLevel.NONE)
110
  @Setter(lombok.AccessLevel.NONE)
111
  ExpandableField<Application> application;
112

113
  /**
114
   * The fee in cents (or local equivalent) that will be applied to the invoice and transferred to
115
   * the application owner's Stripe account when the invoice is paid.
116
   */
117
  @SerializedName("application_fee_amount")
118
  Long applicationFeeAmount;
119

120
  @SerializedName("applies_to")
121
  AppliesTo appliesTo;
122

123
  /**
124
   * Number of payment attempts made for this invoice, from the perspective of the payment retry
125
   * schedule. Any payment attempt counts as the first attempt, and subsequently only automatic
126
   * retries increment the attempt count. In other words, manual payment attempts after the first
127
   * attempt do not affect the retry schedule. If a failure is returned with a non-retryable return
128
   * code, the invoice can no longer be retried unless a new payment method is obtained. Retries
129
   * will continue to be scheduled, and attempt_count will continue to increment, but retries will
130
   * only be executed if a new payment method is obtained.
131
   */
132
  @SerializedName("attempt_count")
133
  Long attemptCount;
134

135
  /**
136
   * Whether an attempt has been made to pay the invoice. An invoice is not attempted until 1 hour
137
   * after the {@code invoice.created} webhook, for example, so you might not want to display that
138
   * invoice as unpaid to your users.
139
   */
140
  @SerializedName("attempted")
141
  Boolean attempted;
142

143
  @SerializedName("automatic_tax")
144
  AutomaticTax automaticTax;
145

146
  /**
147
   * The time when this invoice is currently scheduled to be automatically finalized. The field will
148
   * be {@code null} if the invoice is not scheduled to finalize in the future. If the invoice is
149
   * not in the draft state, this field will always be {@code null} - see {@code finalized_at} for
150
   * the time when an already-finalized invoice was finalized.
151
   */
152
  @SerializedName("automatically_finalizes_at")
153
  Long automaticallyFinalizesAt;
154

155
  /**
156
   * Indicates the reason why the invoice was created.
157
   *
158
   * <p>* {@code manual}: Unrelated to a subscription, for example, created via the invoice editor.
159
   * * {@code subscription}: No longer in use. Applies to subscriptions from before May 2018 where
160
   * no distinction was made between updates, cycles, and thresholds. * {@code subscription_create}:
161
   * A new subscription was created. * {@code subscription_cycle}: A subscription advanced into a
162
   * new period. * {@code subscription_threshold}: A subscription reached a billing threshold. *
163
   * {@code subscription_update}: A subscription was updated. * {@code upcoming}: Reserved for
164
   * simulated invoices, per the upcoming invoice endpoint.
165
   *
166
   * <p>One of {@code automatic_pending_invoice_item_invoice}, {@code manual}, {@code quote_accept},
167
   * {@code subscription}, {@code subscription_create}, {@code subscription_cycle}, {@code
168
   * subscription_threshold}, {@code subscription_update}, or {@code upcoming}.
169
   */
170
  @SerializedName("billing_reason")
171
  String billingReason;
172

173
  /**
174
   * Either {@code charge_automatically}, or {@code send_invoice}. When charging automatically,
175
   * Stripe will attempt to pay this invoice using the default source attached to the customer. When
176
   * sending an invoice, Stripe will email this invoice to the customer with payment instructions.
177
   *
178
   * <p>One of {@code charge_automatically}, or {@code send_invoice}.
179
   */
180
  @SerializedName("collection_method")
181
  String collectionMethod;
182

183
  /** Time at which the object was created. Measured in seconds since the Unix epoch. */
184
  @SerializedName("created")
185
  Long created;
186

187
  /**
188
   * Three-letter <a href="https://www.iso.org/iso-4217-currency-codes.html">ISO currency code</a>,
189
   * in lowercase. Must be a <a href="https://stripe.com/docs/currencies">supported currency</a>.
190
   */
191
  @SerializedName("currency")
192
  String currency;
193

194
  /** Custom fields displayed on the invoice. */
195
  @SerializedName("custom_fields")
196
  List<QuotePreviewInvoice.CustomField> customFields;
197

198
  /**
199
   * The customer's address. Until the invoice is finalized, this field will equal {@code
200
   * customer.address}. Once the invoice is finalized, this field will no longer be updated.
201
   */
202
  @SerializedName("customer_address")
203
  Address customerAddress;
204

205
  /**
206
   * The customer's email. Until the invoice is finalized, this field will equal {@code
207
   * customer.email}. Once the invoice is finalized, this field will no longer be updated.
208
   */
209
  @SerializedName("customer_email")
210
  String customerEmail;
211

212
  /**
213
   * The customer's name. Until the invoice is finalized, this field will equal {@code
214
   * customer.name}. Once the invoice is finalized, this field will no longer be updated.
215
   */
216
  @SerializedName("customer_name")
217
  String customerName;
218

219
  /**
220
   * The customer's phone number. Until the invoice is finalized, this field will equal {@code
221
   * customer.phone}. Once the invoice is finalized, this field will no longer be updated.
222
   */
223
  @SerializedName("customer_phone")
224
  String customerPhone;
225

226
  /**
227
   * The customer's shipping information. Until the invoice is finalized, this field will equal
228
   * {@code customer.shipping}. Once the invoice is finalized, this field will no longer be updated.
229
   */
230
  @SerializedName("customer_shipping")
231
  ShippingDetails customerShipping;
232

233
  /**
234
   * The customer's tax exempt status. Until the invoice is finalized, this field will equal {@code
235
   * customer.tax_exempt}. Once the invoice is finalized, this field will no longer be updated.
236
   *
237
   * <p>One of {@code exempt}, {@code none}, or {@code reverse}.
238
   */
239
  @SerializedName("customer_tax_exempt")
240
  String customerTaxExempt;
241

242
  /**
243
   * The customer's tax IDs. Until the invoice is finalized, this field will contain the same tax
244
   * IDs as {@code customer.tax_ids}. Once the invoice is finalized, this field will no longer be
245
   * updated.
246
   */
247
  @SerializedName("customer_tax_ids")
248
  List<QuotePreviewInvoice.CustomerTaxId> customerTaxIds;
249

250
  /**
251
   * The margins applied to the invoice. Can be overridden by line item {@code margins}. Use {@code
252
   * expand[]=default_margins} to expand each margin.
253
   */
254
  @SerializedName("default_margins")
255
  List<ExpandableField<Margin>> defaultMargins;
256

257
  /**
258
   * ID of the default payment method for the invoice. It must belong to the customer associated
259
   * with the invoice. If not set, defaults to the subscription's default payment method, if any, or
260
   * to the default payment method in the customer's invoice settings.
261
   */
262
  @SerializedName("default_payment_method")
263
  @Getter(lombok.AccessLevel.NONE)
264
  @Setter(lombok.AccessLevel.NONE)
265
  ExpandableField<PaymentMethod> defaultPaymentMethod;
266

267
  /**
268
   * ID of the default payment source for the invoice. It must belong to the customer associated
269
   * with the invoice and be in a chargeable state. If not set, defaults to the subscription's
270
   * default source, if any, or to the customer's default source.
271
   */
272
  @SerializedName("default_source")
273
  @Getter(lombok.AccessLevel.NONE)
274
  @Setter(lombok.AccessLevel.NONE)
275
  ExpandableField<PaymentSource> defaultSource;
276

277
  /** The tax rates applied to this invoice, if any. */
278
  @SerializedName("default_tax_rates")
279
  List<TaxRate> defaultTaxRates;
280

281
  /**
282
   * An arbitrary string attached to the object. Often useful for displaying to users. Referenced as
283
   * 'memo' in the Dashboard.
284
   */
285
  @SerializedName("description")
286
  String description;
287

288
  /**
289
   * Describes the current discount applied to this invoice, if there is one. Not populated if there
290
   * are multiple discounts.
291
   */
292
  @SerializedName("discount")
293
  Discount discount;
294

295
  /**
296
   * The discounts applied to the invoice. Line item discounts are applied before invoice discounts.
297
   * Use {@code expand[]=discounts} to expand each discount.
298
   */
299
  @SerializedName("discounts")
300
  List<ExpandableField<Discount>> discounts;
301

302
  /**
303
   * The date on which payment for this invoice is due. This value will be {@code null} for invoices
304
   * where {@code collection_method=charge_automatically}.
305
   */
306
  @SerializedName("due_date")
307
  Long dueDate;
308

309
  /**
310
   * The date when this invoice is in effect. Same as {@code finalized_at} unless overwritten. When
311
   * defined, this value replaces the system-generated 'Date of issue' printed on the invoice PDF
312
   * and receipt.
313
   */
314
  @SerializedName("effective_at")
315
  Long effectiveAt;
316

317
  /**
318
   * Ending customer balance after the invoice is finalized. Invoices are finalized approximately an
319
   * hour after successful webhook delivery or when payment collection is attempted for the invoice.
320
   * If the invoice has not been finalized yet, this will be null.
321
   */
322
  @SerializedName("ending_balance")
323
  Long endingBalance;
324

325
  /** Footer displayed on the invoice. */
326
  @SerializedName("footer")
327
  String footer;
328

329
  /**
330
   * Details of the invoice that was cloned. See the <a
331
   * href="https://stripe.com/docs/invoicing/invoice-revisions">revision documentation</a> for more
332
   * details.
333
   */
334
  @SerializedName("from_invoice")
335
  FromInvoice fromInvoice;
336

337
  /**
338
   * Unique identifier for the object. This property is always present unless the invoice is an
339
   * upcoming invoice. See <a href="https://stripe.com/docs/api/invoices/upcoming">Retrieve an
340
   * upcoming invoice</a> for more details.
341
   */
342
  @Getter(onMethod_ = {@Override})
343
  @SerializedName("id")
344
  String id;
345

346
  @SerializedName("issuer")
347
  Issuer issuer;
348

349
  /**
350
   * The error encountered during the previous attempt to finalize the invoice. This field is
351
   * cleared when the invoice is successfully finalized.
352
   */
353
  @SerializedName("last_finalization_error")
354
  StripeError lastFinalizationError;
355

356
  /** The ID of the most recent non-draft revision of this invoice. */
357
  @SerializedName("latest_revision")
358
  @Getter(lombok.AccessLevel.NONE)
359
  @Setter(lombok.AccessLevel.NONE)
360
  ExpandableField<Invoice> latestRevision;
361

362
  /**
363
   * The individual line items that make up the invoice. {@code lines} is sorted as follows: (1)
364
   * pending invoice items (including prorations) in reverse chronological order, (2) subscription
365
   * items in reverse chronological order, and (3) invoice items added after invoice creation in
366
   * chronological order.
367
   */
368
  @SerializedName("lines")
369
  InvoiceLineItemCollection lines;
370

371
  /**
372
   * Has the value {@code true} if the object exists in live mode or the value {@code false} if the
373
   * object exists in test mode.
374
   */
375
  @SerializedName("livemode")
376
  Boolean livemode;
377

378
  /**
379
   * Set of <a href="https://stripe.com/docs/api/metadata">key-value pairs</a> that you can attach
380
   * to an object. This can be useful for storing additional information about the object in a
381
   * structured format.
382
   */
383
  @SerializedName("metadata")
384
  Map<String, String> metadata;
385

386
  /**
387
   * The time at which payment will next be attempted. This value will be {@code null} for invoices
388
   * where {@code collection_method=send_invoice}.
389
   */
390
  @SerializedName("next_payment_attempt")
391
  Long nextPaymentAttempt;
392

393
  /**
394
   * A unique, identifying string that appears on emails sent to the customer for this invoice. This
395
   * starts with the customer's unique invoice_prefix if it is specified.
396
   */
397
  @SerializedName("number")
398
  String number;
399

400
  /**
401
   * String representing the object's type. Objects of the same type share the same value.
402
   *
403
   * <p>Equal to {@code quote_preview_invoice}.
404
   */
405
  @SerializedName("object")
406
  String object;
407

408
  /**
409
   * The account (if any) for which the funds of the invoice payment are intended. If set, the
410
   * invoice will be presented with the branding and support information of the specified account.
411
   * See the <a href="https://stripe.com/docs/billing/invoices/connect">Invoices with Connect</a>
412
   * documentation for details.
413
   */
414
  @SerializedName("on_behalf_of")
415
  @Getter(lombok.AccessLevel.NONE)
416
  @Setter(lombok.AccessLevel.NONE)
417
  ExpandableField<Account> onBehalfOf;
418

419
  /**
420
   * Whether payment was successfully collected for this invoice. An invoice can be paid (most
421
   * commonly) with a charge or with credit from the customer's account balance.
422
   */
423
  @SerializedName("paid")
424
  Boolean paid;
425

426
  /**
427
   * Returns true if the invoice was manually marked paid, returns false if the invoice hasn't been
428
   * paid yet or was paid on Stripe.
429
   */
430
  @SerializedName("paid_out_of_band")
431
  Boolean paidOutOfBand;
432

433
  /**
434
   * The PaymentIntent associated with this invoice. The PaymentIntent is generated when the invoice
435
   * is finalized, and can then be used to pay the invoice. Note that voiding an invoice will cancel
436
   * the PaymentIntent.
437
   */
438
  @SerializedName("payment_intent")
439
  @Getter(lombok.AccessLevel.NONE)
440
  @Setter(lombok.AccessLevel.NONE)
441
  ExpandableField<PaymentIntent> paymentIntent;
442

443
  @SerializedName("payment_settings")
444
  PaymentSettings paymentSettings;
445

446
  /** Payments for this invoice. */
447
  @SerializedName("payments")
448
  InvoicePaymentCollection payments;
449

450
  /**
451
   * End of the usage period during which invoice items were added to this invoice. This looks back
452
   * one period for a subscription invoice. Use the <a
453
   * href="https://stripe.com/api/invoices/line_item#invoice_line_item_object-period">line item
454
   * period</a> to get the service period for each price.
455
   */
456
  @SerializedName("period_end")
457
  Long periodEnd;
458

459
  /**
460
   * Start of the usage period during which invoice items were added to this invoice. This looks
461
   * back one period for a subscription invoice. Use the <a
462
   * href="https://stripe.com/api/invoices/line_item#invoice_line_item_object-period">line item
463
   * period</a> to get the service period for each price.
464
   */
465
  @SerializedName("period_start")
466
  Long periodStart;
467

468
  /** Total amount of all post-payment credit notes issued for this invoice. */
469
  @SerializedName("post_payment_credit_notes_amount")
470
  Long postPaymentCreditNotesAmount;
471

472
  /** Total amount of all pre-payment credit notes issued for this invoice. */
473
  @SerializedName("pre_payment_credit_notes_amount")
474
  Long prePaymentCreditNotesAmount;
475

476
  /** The quote this invoice was generated from. */
477
  @SerializedName("quote")
478
  @Getter(lombok.AccessLevel.NONE)
479
  @Setter(lombok.AccessLevel.NONE)
480
  ExpandableField<Quote> quote;
481

482
  /** This is the transaction number that appears on email receipts sent for this invoice. */
483
  @SerializedName("receipt_number")
484
  String receiptNumber;
485

486
  /**
487
   * The rendering-related settings that control how the invoice is displayed on customer-facing
488
   * surfaces such as PDF and Hosted Invoice Page.
489
   */
490
  @SerializedName("rendering")
491
  Rendering rendering;
492

493
  /** The details of the cost of shipping, including the ShippingRate applied on the invoice. */
494
  @SerializedName("shipping_cost")
495
  ShippingCost shippingCost;
496

497
  /**
498
   * Shipping details for the invoice. The Invoice PDF will use the {@code shipping_details} value
499
   * if it is set, otherwise the PDF will render the shipping address from the customer.
500
   */
501
  @SerializedName("shipping_details")
502
  ShippingDetails shippingDetails;
503

504
  /**
505
   * Starting customer balance before the invoice is finalized. If the invoice has not been
506
   * finalized yet, this will be the current customer balance. For revision invoices, this also
507
   * includes any customer balance that was applied to the original invoice.
508
   */
509
  @SerializedName("starting_balance")
510
  Long startingBalance;
511

512
  /** Extra information about an invoice for the customer's credit card statement. */
513
  @SerializedName("statement_descriptor")
514
  String statementDescriptor;
515

516
  /**
517
   * The status of the invoice, one of {@code draft}, {@code open}, {@code paid}, {@code
518
   * uncollectible}, or {@code void}. <a
519
   * href="https://stripe.com/docs/billing/invoices/workflow#workflow-overview">Learn more</a>
520
   */
521
  @SerializedName("status")
522
  String status;
523

524
  @SerializedName("status_transitions")
525
  StatusTransitions statusTransitions;
526

527
  @SerializedName("subscription")
528
  @Getter(lombok.AccessLevel.NONE)
529
  @Setter(lombok.AccessLevel.NONE)
530
  ExpandableField<Subscription> subscription;
531

532
  /** Details about the subscription that created this invoice. */
533
  @SerializedName("subscription_details")
534
  SubscriptionDetails subscriptionDetails;
535

536
  /**
537
   * Only set for upcoming invoices that preview prorations. The time used to calculate prorations.
538
   */
539
  @SerializedName("subscription_proration_date")
540
  Long subscriptionProrationDate;
541

542
  /**
543
   * Total of all subscriptions, invoice items, and prorations on the invoice before any invoice
544
   * level discount or exclusive tax is applied. Item discounts are already incorporated
545
   */
546
  @SerializedName("subtotal")
547
  Long subtotal;
548

549
  /**
550
   * The integer amount in cents (or local equivalent) representing the subtotal of the invoice
551
   * before any invoice level discount or tax is applied. Item discounts are already incorporated
552
   */
553
  @SerializedName("subtotal_excluding_tax")
554
  Long subtotalExcludingTax;
555

556
  /** The amount of tax on this invoice. This is the sum of all the tax amounts on this invoice. */
557
  @SerializedName("tax")
558
  Long tax;
559

560
  /** ID of the test clock this invoice belongs to. */
561
  @SerializedName("test_clock")
562
  @Getter(lombok.AccessLevel.NONE)
563
  @Setter(lombok.AccessLevel.NONE)
564
  ExpandableField<TestClock> testClock;
565

566
  @SerializedName("threshold_reason")
567
  ThresholdReason thresholdReason;
568

569
  /** Total after discounts and taxes. */
570
  @SerializedName("total")
571
  Long total;
572

573
  /** The aggregate amounts calculated per discount across all line items. */
574
  @SerializedName("total_discount_amounts")
575
  List<QuotePreviewInvoice.TotalDiscountAmount> totalDiscountAmounts;
576

577
  /**
578
   * The integer amount in cents (or local equivalent) representing the total amount of the invoice
579
   * including all discounts but excluding all tax.
580
   */
581
  @SerializedName("total_excluding_tax")
582
  Long totalExcludingTax;
583

584
  /** The aggregate amounts calculated per margin across all line items. */
585
  @SerializedName("total_margin_amounts")
586
  List<QuotePreviewInvoice.TotalMarginAmount> totalMarginAmounts;
587

588
  @SerializedName("total_pretax_credit_amounts")
589
  List<QuotePreviewInvoice.TotalPretaxCreditAmount> totalPretaxCreditAmounts;
590

591
  /** The aggregate amounts calculated per tax rate for all line items. */
592
  @SerializedName("total_tax_amounts")
593
  List<QuotePreviewInvoice.TotalTaxAmount> totalTaxAmounts;
594

595
  /**
596
   * The account (if any) the payment will be attributed to for tax reporting, and where funds from
597
   * the payment will be transferred to for the invoice.
598
   */
599
  @SerializedName("transfer_data")
600
  TransferData transferData;
601

602
  /**
603
   * Invoices are automatically paid or sent 1 hour after webhooks are delivered, or until all
604
   * webhook delivery attempts have <a
605
   * href="https://stripe.com/docs/billing/webhooks#understand">been exhausted</a>. This field
606
   * tracks the time when webhooks for this invoice were successfully delivered. If the invoice had
607
   * no webhooks to deliver, this will be set while the invoice is being created.
608
   */
609
  @SerializedName("webhooks_delivered_at")
610
  Long webhooksDeliveredAt;
611

612
  /** Get ID of expandable {@code application} object. */
613
  public String getApplication() {
614
    return (this.application != null) ? this.application.getId() : null;
×
615
  }
616

617
  public void setApplication(String id) {
618
    this.application = ApiResource.setExpandableFieldId(id, this.application);
×
619
  }
×
620

621
  /** Get expanded {@code application}. */
622
  public Application getApplicationObject() {
623
    return (this.application != null) ? this.application.getExpanded() : null;
×
624
  }
625

626
  public void setApplicationObject(Application expandableObject) {
627
    this.application = new ExpandableField<Application>(expandableObject.getId(), expandableObject);
×
628
  }
×
629

630
  /** Get ID of expandable {@code defaultPaymentMethod} object. */
631
  public String getDefaultPaymentMethod() {
632
    return (this.defaultPaymentMethod != null) ? this.defaultPaymentMethod.getId() : null;
×
633
  }
634

635
  public void setDefaultPaymentMethod(String id) {
636
    this.defaultPaymentMethod = ApiResource.setExpandableFieldId(id, this.defaultPaymentMethod);
×
637
  }
×
638

639
  /** Get expanded {@code defaultPaymentMethod}. */
640
  public PaymentMethod getDefaultPaymentMethodObject() {
641
    return (this.defaultPaymentMethod != null) ? this.defaultPaymentMethod.getExpanded() : null;
×
642
  }
643

644
  public void setDefaultPaymentMethodObject(PaymentMethod expandableObject) {
645
    this.defaultPaymentMethod =
×
646
        new ExpandableField<PaymentMethod>(expandableObject.getId(), expandableObject);
×
647
  }
×
648

649
  /** Get ID of expandable {@code defaultSource} object. */
650
  public String getDefaultSource() {
651
    return (this.defaultSource != null) ? this.defaultSource.getId() : null;
×
652
  }
653

654
  public void setDefaultSource(String id) {
655
    this.defaultSource = ApiResource.setExpandableFieldId(id, this.defaultSource);
×
656
  }
×
657

658
  /** Get expanded {@code defaultSource}. */
659
  public PaymentSource getDefaultSourceObject() {
660
    return (this.defaultSource != null) ? this.defaultSource.getExpanded() : null;
×
661
  }
662

663
  public void setDefaultSourceObject(PaymentSource expandableObject) {
664
    this.defaultSource =
×
665
        new ExpandableField<PaymentSource>(expandableObject.getId(), expandableObject);
×
666
  }
×
667

668
  /** Get ID of expandable {@code latestRevision} object. */
669
  public String getLatestRevision() {
670
    return (this.latestRevision != null) ? this.latestRevision.getId() : null;
×
671
  }
672

673
  public void setLatestRevision(String id) {
674
    this.latestRevision = ApiResource.setExpandableFieldId(id, this.latestRevision);
×
675
  }
×
676

677
  /** Get expanded {@code latestRevision}. */
678
  public Invoice getLatestRevisionObject() {
679
    return (this.latestRevision != null) ? this.latestRevision.getExpanded() : null;
×
680
  }
681

682
  public void setLatestRevisionObject(Invoice expandableObject) {
683
    this.latestRevision = new ExpandableField<Invoice>(expandableObject.getId(), expandableObject);
×
684
  }
×
685

686
  /** Get ID of expandable {@code onBehalfOf} object. */
687
  public String getOnBehalfOf() {
688
    return (this.onBehalfOf != null) ? this.onBehalfOf.getId() : null;
×
689
  }
690

691
  public void setOnBehalfOf(String id) {
692
    this.onBehalfOf = ApiResource.setExpandableFieldId(id, this.onBehalfOf);
×
693
  }
×
694

695
  /** Get expanded {@code onBehalfOf}. */
696
  public Account getOnBehalfOfObject() {
697
    return (this.onBehalfOf != null) ? this.onBehalfOf.getExpanded() : null;
×
698
  }
699

700
  public void setOnBehalfOfObject(Account expandableObject) {
701
    this.onBehalfOf = new ExpandableField<Account>(expandableObject.getId(), expandableObject);
×
702
  }
×
703

704
  /** Get ID of expandable {@code paymentIntent} object. */
705
  public String getPaymentIntent() {
706
    return (this.paymentIntent != null) ? this.paymentIntent.getId() : null;
×
707
  }
708

709
  public void setPaymentIntent(String id) {
710
    this.paymentIntent = ApiResource.setExpandableFieldId(id, this.paymentIntent);
×
711
  }
×
712

713
  /** Get expanded {@code paymentIntent}. */
714
  public PaymentIntent getPaymentIntentObject() {
715
    return (this.paymentIntent != null) ? this.paymentIntent.getExpanded() : null;
×
716
  }
717

718
  public void setPaymentIntentObject(PaymentIntent expandableObject) {
719
    this.paymentIntent =
×
720
        new ExpandableField<PaymentIntent>(expandableObject.getId(), expandableObject);
×
721
  }
×
722

723
  /** Get ID of expandable {@code quote} object. */
724
  public String getQuote() {
725
    return (this.quote != null) ? this.quote.getId() : null;
×
726
  }
727

728
  public void setQuote(String id) {
729
    this.quote = ApiResource.setExpandableFieldId(id, this.quote);
×
730
  }
×
731

732
  /** Get expanded {@code quote}. */
733
  public Quote getQuoteObject() {
734
    return (this.quote != null) ? this.quote.getExpanded() : null;
×
735
  }
736

737
  public void setQuoteObject(Quote expandableObject) {
738
    this.quote = new ExpandableField<Quote>(expandableObject.getId(), expandableObject);
×
739
  }
×
740

741
  /** Get ID of expandable {@code subscription} object. */
742
  public String getSubscription() {
743
    return (this.subscription != null) ? this.subscription.getId() : null;
×
744
  }
745

746
  public void setSubscription(String id) {
747
    this.subscription = ApiResource.setExpandableFieldId(id, this.subscription);
×
748
  }
×
749

750
  /** Get expanded {@code subscription}. */
751
  public Subscription getSubscriptionObject() {
752
    return (this.subscription != null) ? this.subscription.getExpanded() : null;
×
753
  }
754

755
  public void setSubscriptionObject(Subscription expandableObject) {
756
    this.subscription =
×
757
        new ExpandableField<Subscription>(expandableObject.getId(), expandableObject);
×
758
  }
×
759

760
  /** Get ID of expandable {@code testClock} object. */
761
  public String getTestClock() {
762
    return (this.testClock != null) ? this.testClock.getId() : null;
×
763
  }
764

765
  public void setTestClock(String id) {
766
    this.testClock = ApiResource.setExpandableFieldId(id, this.testClock);
×
767
  }
×
768

769
  /** Get expanded {@code testClock}. */
770
  public TestClock getTestClockObject() {
771
    return (this.testClock != null) ? this.testClock.getExpanded() : null;
×
772
  }
773

774
  public void setTestClockObject(TestClock expandableObject) {
775
    this.testClock = new ExpandableField<TestClock>(expandableObject.getId(), expandableObject);
×
776
  }
×
777

778
  /** Get IDs of expandable {@code accountTaxIds} object list. */
779
  public List<String> getAccountTaxIds() {
780
    return (this.accountTaxIds != null)
×
781
        ? this.accountTaxIds.stream().map(x -> x.getId()).collect(Collectors.toList())
×
782
        : null;
×
783
  }
784

785
  public void setAccountTaxIds(List<String> ids) {
786
    if (ids == null) {
×
787
      this.accountTaxIds = null;
×
788
      return;
×
789
    }
790
    if (this.accountTaxIds != null
×
791
        && this.accountTaxIds.stream()
×
792
            .map(x -> x.getId())
×
793
            .collect(Collectors.toList())
×
794
            .equals(ids)) {
×
795
      // noop if the ids are equal to what are already present
796
      return;
×
797
    }
798
    this.accountTaxIds =
×
799
        (ids != null)
×
800
            ? ids.stream()
×
801
                .map(id -> new ExpandableField<TaxId>(id, null))
×
802
                .collect(Collectors.toList())
×
803
            : null;
×
804
  }
×
805

806
  /** Get expanded {@code accountTaxIds}. */
807
  public List<TaxId> getAccountTaxIdObjects() {
808
    return (this.accountTaxIds != null)
×
809
        ? this.accountTaxIds.stream().map(x -> x.getExpanded()).collect(Collectors.toList())
×
810
        : null;
×
811
  }
812

813
  public void setAccountTaxIdObjects(List<TaxId> objs) {
814
    this.accountTaxIds =
×
815
        objs != null
×
816
            ? objs.stream()
×
817
                .map(x -> new ExpandableField<TaxId>(x.getId(), x))
×
818
                .collect(Collectors.toList())
×
819
            : null;
×
820
  }
×
821

822
  /** Get IDs of expandable {@code defaultMargins} object list. */
823
  public List<String> getDefaultMargins() {
824
    return (this.defaultMargins != null)
×
825
        ? this.defaultMargins.stream().map(x -> x.getId()).collect(Collectors.toList())
×
826
        : null;
×
827
  }
828

829
  public void setDefaultMargins(List<String> ids) {
830
    if (ids == null) {
×
831
      this.defaultMargins = null;
×
832
      return;
×
833
    }
834
    if (this.defaultMargins != null
×
835
        && this.defaultMargins.stream()
×
836
            .map(x -> x.getId())
×
837
            .collect(Collectors.toList())
×
838
            .equals(ids)) {
×
839
      // noop if the ids are equal to what are already present
840
      return;
×
841
    }
842
    this.defaultMargins =
×
843
        (ids != null)
×
844
            ? ids.stream()
×
845
                .map(id -> new ExpandableField<Margin>(id, null))
×
846
                .collect(Collectors.toList())
×
847
            : null;
×
848
  }
×
849

850
  /** Get expanded {@code defaultMargins}. */
851
  public List<Margin> getDefaultMarginObjects() {
852
    return (this.defaultMargins != null)
×
853
        ? this.defaultMargins.stream().map(x -> x.getExpanded()).collect(Collectors.toList())
×
854
        : null;
×
855
  }
856

857
  public void setDefaultMarginObjects(List<Margin> objs) {
858
    this.defaultMargins =
×
859
        objs != null
×
860
            ? objs.stream()
×
861
                .map(x -> new ExpandableField<Margin>(x.getId(), x))
×
862
                .collect(Collectors.toList())
×
863
            : null;
×
864
  }
×
865

866
  /** Get IDs of expandable {@code discounts} object list. */
867
  public List<String> getDiscounts() {
868
    return (this.discounts != null)
×
869
        ? this.discounts.stream().map(x -> x.getId()).collect(Collectors.toList())
×
870
        : null;
×
871
  }
872

873
  public void setDiscounts(List<String> ids) {
874
    if (ids == null) {
×
875
      this.discounts = null;
×
876
      return;
×
877
    }
878
    if (this.discounts != null
×
879
        && this.discounts.stream().map(x -> x.getId()).collect(Collectors.toList()).equals(ids)) {
×
880
      // noop if the ids are equal to what are already present
881
      return;
×
882
    }
883
    this.discounts =
×
884
        (ids != null)
×
885
            ? ids.stream()
×
886
                .map(id -> new ExpandableField<Discount>(id, null))
×
887
                .collect(Collectors.toList())
×
888
            : null;
×
889
  }
×
890

891
  /** Get expanded {@code discounts}. */
892
  public List<Discount> getDiscountObjects() {
893
    return (this.discounts != null)
×
894
        ? this.discounts.stream().map(x -> x.getExpanded()).collect(Collectors.toList())
×
895
        : null;
×
896
  }
897

898
  public void setDiscountObjects(List<Discount> objs) {
899
    this.discounts =
×
900
        objs != null
×
901
            ? objs.stream()
×
902
                .map(x -> new ExpandableField<Discount>(x.getId(), x))
×
903
                .collect(Collectors.toList())
×
904
            : null;
×
905
  }
×
906

907
  /** Preview the invoices that would be generated by accepting the quote. */
908
  public static QuotePreviewInvoiceCollection list(String quote, Map<String, Object> params)
909
      throws StripeException {
910
    return list(quote, params, (RequestOptions) null);
×
911
  }
912

913
  /** Preview the invoices that would be generated by accepting the quote. */
914
  public static QuotePreviewInvoiceCollection list(
915
      String quote, Map<String, Object> params, RequestOptions options) throws StripeException {
916
    String path = String.format("/v1/quotes/%s/preview_invoices", ApiResource.urlEncodeId(quote));
×
917
    ApiRequest request =
×
918
        new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.GET, path, params, options);
919
    return getGlobalResponseGetter().request(request, QuotePreviewInvoiceCollection.class);
×
920
  }
921

922
  /** Preview the invoices that would be generated by accepting the quote. */
923
  public static QuotePreviewInvoiceCollection list(
924
      String quote, QuotePreviewInvoiceListParams params) throws StripeException {
925
    return list(quote, params, (RequestOptions) null);
×
926
  }
927

928
  /** Preview the invoices that would be generated by accepting the quote. */
929
  public static QuotePreviewInvoiceCollection list(
930
      String quote, QuotePreviewInvoiceListParams params, RequestOptions options)
931
      throws StripeException {
932
    String path = String.format("/v1/quotes/%s/preview_invoices", ApiResource.urlEncodeId(quote));
×
933
    ApiResource.checkNullTypedParams(path, params);
×
934
    ApiRequest request =
×
935
        new ApiRequest(
936
            BaseAddress.API,
937
            ApiResource.RequestMethod.GET,
938
            path,
939
            ApiRequestParams.paramsToMap(params),
×
940
            options);
941
    return getGlobalResponseGetter().request(request, QuotePreviewInvoiceCollection.class);
×
942
  }
943

944
  @Getter
945
  @Setter
946
  @EqualsAndHashCode(callSuper = false)
947
  public static class AmountsDue extends StripeObject {
×
948
    /** Incremental amount due for this payment in cents (or local equivalent). */
949
    @SerializedName("amount")
950
    Long amount;
951

952
    /** The amount in cents (or local equivalent) that was paid for this payment. */
953
    @SerializedName("amount_paid")
954
    Long amountPaid;
955

956
    /**
957
     * The difference between the payment’s amount and amount_paid, in cents (or local equivalent).
958
     */
959
    @SerializedName("amount_remaining")
960
    Long amountRemaining;
961

962
    /** Number of days from when invoice is finalized until the payment is due. */
963
    @SerializedName("days_until_due")
964
    Long daysUntilDue;
965

966
    /** An arbitrary string attached to the object. Often useful for displaying to users. */
967
    @SerializedName("description")
968
    String description;
969

970
    /** Date on which a payment plan’s payment is due. */
971
    @SerializedName("due_date")
972
    Long dueDate;
973

974
    /** Timestamp when the payment was paid. */
975
    @SerializedName("paid_at")
976
    Long paidAt;
977

978
    /** The status of the payment, one of {@code open}, {@code paid}, or {@code past_due}. */
979
    @SerializedName("status")
980
    String status;
981
  }
982

983
  @Getter
984
  @Setter
985
  @EqualsAndHashCode(callSuper = false)
986
  public static class AppliesTo extends StripeObject {
×
987
    /**
988
     * A custom string that identifies a new subscription schedule being created upon quote
989
     * acceptance. All quote lines with the same {@code new_reference} field will be applied to the
990
     * creation of a new subscription schedule.
991
     */
992
    @SerializedName("new_reference")
993
    String newReference;
994

995
    /** The ID of the schedule the line applies to. */
996
    @SerializedName("subscription_schedule")
997
    String subscriptionSchedule;
998

999
    /**
1000
     * Describes whether the quote line is affecting a new schedule or an existing schedule.
1001
     *
1002
     * <p>One of {@code new_reference}, or {@code subscription_schedule}.
1003
     */
1004
    @SerializedName("type")
1005
    String type;
1006
  }
1007

1008
  @Getter
1009
  @Setter
1010
  @EqualsAndHashCode(callSuper = false)
1011
  public static class AutomaticTax extends StripeObject {
×
1012
    /**
1013
     * Whether Stripe automatically computes tax on this invoice. Note that incompatible invoice
1014
     * items (invoice items with manually specified <a
1015
     * href="https://stripe.com/docs/api/tax_rates">tax rates</a>, negative amounts, or {@code
1016
     * tax_behavior=unspecified}) cannot be added to automatic tax invoices.
1017
     */
1018
    @SerializedName("enabled")
1019
    Boolean enabled;
1020

1021
    /**
1022
     * The account that's liable for tax. If set, the business address and tax registrations
1023
     * required to perform the tax calculation are loaded from this account. The tax transaction is
1024
     * returned in the report of the connected account.
1025
     */
1026
    @SerializedName("liability")
1027
    Liability liability;
1028

1029
    /**
1030
     * The status of the most recent automated tax calculation for this invoice.
1031
     *
1032
     * <p>One of {@code complete}, {@code failed}, or {@code requires_location_inputs}.
1033
     */
1034
    @SerializedName("status")
1035
    String status;
1036

1037
    @Getter
1038
    @Setter
1039
    @EqualsAndHashCode(callSuper = false)
1040
    public static class Liability extends StripeObject {
×
1041
      /** The connected account being referenced when {@code type} is {@code account}. */
1042
      @SerializedName("account")
1043
      @Getter(lombok.AccessLevel.NONE)
1044
      @Setter(lombok.AccessLevel.NONE)
1045
      ExpandableField<Account> account;
1046

1047
      /**
1048
       * Type of the account referenced.
1049
       *
1050
       * <p>One of {@code account}, or {@code self}.
1051
       */
1052
      @SerializedName("type")
1053
      String type;
1054

1055
      /** Get ID of expandable {@code account} object. */
1056
      public String getAccount() {
1057
        return (this.account != null) ? this.account.getId() : null;
×
1058
      }
1059

1060
      public void setAccount(String id) {
1061
        this.account = ApiResource.setExpandableFieldId(id, this.account);
×
1062
      }
×
1063

1064
      /** Get expanded {@code account}. */
1065
      public Account getAccountObject() {
1066
        return (this.account != null) ? this.account.getExpanded() : null;
×
1067
      }
1068

1069
      public void setAccountObject(Account expandableObject) {
1070
        this.account = new ExpandableField<Account>(expandableObject.getId(), expandableObject);
×
1071
      }
×
1072
    }
1073
  }
1074

1075
  @Getter
1076
  @Setter
1077
  @EqualsAndHashCode(callSuper = false)
1078
  public static class CustomField extends StripeObject {
×
1079
    /** The name of the custom field. */
1080
    @SerializedName("name")
1081
    String name;
1082

1083
    /** The value of the custom field. */
1084
    @SerializedName("value")
1085
    String value;
1086
  }
1087

1088
  @Getter
1089
  @Setter
1090
  @EqualsAndHashCode(callSuper = false)
1091
  public static class CustomerTaxId extends StripeObject {
×
1092
    /**
1093
     * The type of the tax ID, one of {@code ad_nrt}, {@code ar_cuit}, {@code eu_vat}, {@code
1094
     * bo_tin}, {@code br_cnpj}, {@code br_cpf}, {@code cn_tin}, {@code co_nit}, {@code cr_tin},
1095
     * {@code do_rcn}, {@code ec_ruc}, {@code eu_oss_vat}, {@code hr_oib}, {@code pe_ruc}, {@code
1096
     * ro_tin}, {@code rs_pib}, {@code sv_nit}, {@code uy_ruc}, {@code ve_rif}, {@code vn_tin},
1097
     * {@code gb_vat}, {@code nz_gst}, {@code au_abn}, {@code au_arn}, {@code in_gst}, {@code
1098
     * no_vat}, {@code no_voec}, {@code za_vat}, {@code ch_vat}, {@code mx_rfc}, {@code sg_uen},
1099
     * {@code ru_inn}, {@code ru_kpp}, {@code ca_bn}, {@code hk_br}, {@code es_cif}, {@code tw_vat},
1100
     * {@code th_vat}, {@code jp_cn}, {@code jp_rn}, {@code jp_trn}, {@code li_uid}, {@code my_itn},
1101
     * {@code us_ein}, {@code kr_brn}, {@code ca_qst}, {@code ca_gst_hst}, {@code ca_pst_bc}, {@code
1102
     * ca_pst_mb}, {@code ca_pst_sk}, {@code my_sst}, {@code sg_gst}, {@code ae_trn}, {@code
1103
     * cl_tin}, {@code sa_vat}, {@code id_npwp}, {@code my_frp}, {@code il_vat}, {@code ge_vat},
1104
     * {@code ua_vat}, {@code is_vat}, {@code bg_uic}, {@code hu_tin}, {@code si_tin}, {@code
1105
     * ke_pin}, {@code tr_tin}, {@code eg_tin}, {@code ph_tin}, {@code bh_vat}, {@code kz_bin},
1106
     * {@code ng_tin}, {@code om_vat}, {@code de_stn}, {@code ch_uid}, or {@code unknown}.
1107
     */
1108
    @SerializedName("type")
1109
    String type;
1110

1111
    /** The value of the tax ID. */
1112
    @SerializedName("value")
1113
    String value;
1114
  }
1115

1116
  @Getter
1117
  @Setter
1118
  @EqualsAndHashCode(callSuper = false)
1119
  public static class FromInvoice extends StripeObject {
×
1120
    /** The relation between this invoice and the cloned invoice. */
1121
    @SerializedName("action")
1122
    String action;
1123

1124
    /** The invoice that was cloned. */
1125
    @SerializedName("invoice")
1126
    @Getter(lombok.AccessLevel.NONE)
1127
    @Setter(lombok.AccessLevel.NONE)
1128
    ExpandableField<Invoice> invoice;
1129

1130
    /** Get ID of expandable {@code invoice} object. */
1131
    public String getInvoice() {
1132
      return (this.invoice != null) ? this.invoice.getId() : null;
×
1133
    }
1134

1135
    public void setInvoice(String id) {
1136
      this.invoice = ApiResource.setExpandableFieldId(id, this.invoice);
×
1137
    }
×
1138

1139
    /** Get expanded {@code invoice}. */
1140
    public Invoice getInvoiceObject() {
1141
      return (this.invoice != null) ? this.invoice.getExpanded() : null;
×
1142
    }
1143

1144
    public void setInvoiceObject(Invoice expandableObject) {
1145
      this.invoice = new ExpandableField<Invoice>(expandableObject.getId(), expandableObject);
×
1146
    }
×
1147
  }
1148

1149
  @Getter
1150
  @Setter
1151
  @EqualsAndHashCode(callSuper = false)
1152
  public static class Issuer extends StripeObject {
×
1153
    /** The connected account being referenced when {@code type} is {@code account}. */
1154
    @SerializedName("account")
1155
    @Getter(lombok.AccessLevel.NONE)
1156
    @Setter(lombok.AccessLevel.NONE)
1157
    ExpandableField<Account> account;
1158

1159
    /**
1160
     * Type of the account referenced.
1161
     *
1162
     * <p>One of {@code account}, or {@code self}.
1163
     */
1164
    @SerializedName("type")
1165
    String type;
1166

1167
    /** Get ID of expandable {@code account} object. */
1168
    public String getAccount() {
1169
      return (this.account != null) ? this.account.getId() : null;
×
1170
    }
1171

1172
    public void setAccount(String id) {
1173
      this.account = ApiResource.setExpandableFieldId(id, this.account);
×
1174
    }
×
1175

1176
    /** Get expanded {@code account}. */
1177
    public Account getAccountObject() {
1178
      return (this.account != null) ? this.account.getExpanded() : null;
×
1179
    }
1180

1181
    public void setAccountObject(Account expandableObject) {
1182
      this.account = new ExpandableField<Account>(expandableObject.getId(), expandableObject);
×
1183
    }
×
1184
  }
1185

1186
  @Getter
1187
  @Setter
1188
  @EqualsAndHashCode(callSuper = false)
1189
  public static class PaymentSettings extends StripeObject {
×
1190
    /**
1191
     * ID of the mandate to be used for this invoice. It must correspond to the payment method used
1192
     * to pay the invoice, including the invoice's default_payment_method or default_source, if set.
1193
     */
1194
    @SerializedName("default_mandate")
1195
    String defaultMandate;
1196

1197
    /** Payment-method-specific configuration to provide to the invoice’s PaymentIntent. */
1198
    @SerializedName("payment_method_options")
1199
    PaymentMethodOptions paymentMethodOptions;
1200

1201
    /**
1202
     * The list of payment method types (e.g. card) to provide to the invoice’s PaymentIntent. If
1203
     * not set, Stripe attempts to automatically determine the types to use by looking at the
1204
     * invoice’s default payment method, the subscription’s default payment method, the customer’s
1205
     * default payment method, and your <a
1206
     * href="https://dashboard.stripe.com/settings/billing/invoice">invoice template settings</a>.
1207
     */
1208
    @SerializedName("payment_method_types")
1209
    List<String> paymentMethodTypes;
1210

1211
    @Getter
1212
    @Setter
1213
    @EqualsAndHashCode(callSuper = false)
1214
    public static class PaymentMethodOptions extends StripeObject {
×
1215
      /**
1216
       * If paying by {@code acss_debit}, this sub-hash contains details about the Canadian
1217
       * pre-authorized debit payment method options to pass to the invoice’s PaymentIntent.
1218
       */
1219
      @SerializedName("acss_debit")
1220
      AcssDebit acssDebit;
1221

1222
      /**
1223
       * If paying by {@code bancontact}, this sub-hash contains details about the Bancontact
1224
       * payment method options to pass to the invoice’s PaymentIntent.
1225
       */
1226
      @SerializedName("bancontact")
1227
      Bancontact bancontact;
1228

1229
      /**
1230
       * If paying by {@code card}, this sub-hash contains details about the Card payment method
1231
       * options to pass to the invoice’s PaymentIntent.
1232
       */
1233
      @SerializedName("card")
1234
      Card card;
1235

1236
      /**
1237
       * If paying by {@code customer_balance}, this sub-hash contains details about the Bank
1238
       * transfer payment method options to pass to the invoice’s PaymentIntent.
1239
       */
1240
      @SerializedName("customer_balance")
1241
      CustomerBalance customerBalance;
1242

1243
      /**
1244
       * If paying by {@code konbini}, this sub-hash contains details about the Konbini payment
1245
       * method options to pass to the invoice’s PaymentIntent.
1246
       */
1247
      @SerializedName("konbini")
1248
      Konbini konbini;
1249

1250
      /**
1251
       * If paying by {@code sepa_debit}, this sub-hash contains details about the SEPA Direct Debit
1252
       * payment method options to pass to the invoice’s PaymentIntent.
1253
       */
1254
      @SerializedName("sepa_debit")
1255
      SepaDebit sepaDebit;
1256

1257
      /**
1258
       * If paying by {@code us_bank_account}, this sub-hash contains details about the ACH direct
1259
       * debit payment method options to pass to the invoice’s PaymentIntent.
1260
       */
1261
      @SerializedName("us_bank_account")
1262
      UsBankAccount usBankAccount;
1263

1264
      @Getter
1265
      @Setter
1266
      @EqualsAndHashCode(callSuper = false)
1267
      public static class AcssDebit extends StripeObject {
×
1268
        @SerializedName("mandate_options")
1269
        MandateOptions mandateOptions;
1270

1271
        /**
1272
         * Bank account verification method.
1273
         *
1274
         * <p>One of {@code automatic}, {@code instant}, or {@code microdeposits}.
1275
         */
1276
        @SerializedName("verification_method")
1277
        String verificationMethod;
1278

1279
        @Getter
1280
        @Setter
1281
        @EqualsAndHashCode(callSuper = false)
1282
        public static class MandateOptions extends StripeObject {
×
1283
          /**
1284
           * Transaction type of the mandate.
1285
           *
1286
           * <p>One of {@code business}, or {@code personal}.
1287
           */
1288
          @SerializedName("transaction_type")
1289
          String transactionType;
1290
        }
1291
      }
1292

1293
      @Getter
1294
      @Setter
1295
      @EqualsAndHashCode(callSuper = false)
1296
      public static class Bancontact extends StripeObject {
×
1297
        /**
1298
         * Preferred language of the Bancontact authorization page that the customer is redirected
1299
         * to.
1300
         *
1301
         * <p>One of {@code de}, {@code en}, {@code fr}, or {@code nl}.
1302
         */
1303
        @SerializedName("preferred_language")
1304
        String preferredLanguage;
1305
      }
1306

1307
      @Getter
1308
      @Setter
1309
      @EqualsAndHashCode(callSuper = false)
1310
      public static class Card extends StripeObject {
×
1311
        @SerializedName("installments")
1312
        Installments installments;
1313

1314
        /**
1315
         * We strongly recommend that you rely on our SCA Engine to automatically prompt your
1316
         * customers for authentication based on risk level and <a
1317
         * href="https://stripe.com/docs/strong-customer-authentication">other requirements</a>.
1318
         * However, if you wish to request 3D Secure based on logic from your own fraud engine,
1319
         * provide this option. Read our guide on <a
1320
         * href="https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds">manually
1321
         * requesting 3D Secure</a> for more information on how this configuration interacts with
1322
         * Radar and our SCA Engine.
1323
         *
1324
         * <p>One of {@code any}, {@code automatic}, or {@code challenge}.
1325
         */
1326
        @SerializedName("request_three_d_secure")
1327
        String requestThreeDSecure;
1328

1329
        @Getter
1330
        @Setter
1331
        @EqualsAndHashCode(callSuper = false)
1332
        public static class Installments extends StripeObject {
×
1333
          /** Whether Installments are enabled for this Invoice. */
1334
          @SerializedName("enabled")
1335
          Boolean enabled;
1336
        }
1337
      }
1338

1339
      @Getter
1340
      @Setter
1341
      @EqualsAndHashCode(callSuper = false)
1342
      public static class CustomerBalance extends StripeObject {
×
1343
        @SerializedName("bank_transfer")
1344
        BankTransfer bankTransfer;
1345

1346
        /**
1347
         * The funding method type to be used when there are not enough funds in the customer
1348
         * balance. Permitted values include: {@code bank_transfer}.
1349
         *
1350
         * <p>Equal to {@code bank_transfer}.
1351
         */
1352
        @SerializedName("funding_type")
1353
        String fundingType;
1354

1355
        @Getter
1356
        @Setter
1357
        @EqualsAndHashCode(callSuper = false)
1358
        public static class BankTransfer extends StripeObject {
×
1359
          @SerializedName("eu_bank_transfer")
1360
          EuBankTransfer euBankTransfer;
1361

1362
          /**
1363
           * The bank transfer type that can be used for funding. Permitted values include: {@code
1364
           * eu_bank_transfer}, {@code gb_bank_transfer}, {@code jp_bank_transfer}, {@code
1365
           * mx_bank_transfer}, or {@code us_bank_transfer}.
1366
           */
1367
          @SerializedName("type")
1368
          String type;
1369

1370
          @Getter
1371
          @Setter
1372
          @EqualsAndHashCode(callSuper = false)
1373
          public static class EuBankTransfer extends StripeObject {
×
1374
            /**
1375
             * The desired country code of the bank account information. Permitted values include:
1376
             * {@code BE}, {@code DE}, {@code ES}, {@code FR}, {@code IE}, or {@code NL}.
1377
             *
1378
             * <p>One of {@code BE}, {@code DE}, {@code ES}, {@code FR}, {@code IE}, or {@code NL}.
1379
             */
1380
            @SerializedName("country")
1381
            String country;
1382
          }
1383
        }
1384
      }
1385

1386
      @Getter
1387
      @Setter
1388
      @EqualsAndHashCode(callSuper = false)
1389
      public static class Konbini extends StripeObject {}
×
1390

1391
      @Getter
1392
      @Setter
1393
      @EqualsAndHashCode(callSuper = false)
1394
      public static class SepaDebit extends StripeObject {}
×
1395

1396
      @Getter
1397
      @Setter
1398
      @EqualsAndHashCode(callSuper = false)
1399
      public static class UsBankAccount extends StripeObject {
×
1400
        @SerializedName("financial_connections")
1401
        FinancialConnections financialConnections;
1402

1403
        /**
1404
         * Bank account verification method.
1405
         *
1406
         * <p>One of {@code automatic}, {@code instant}, or {@code microdeposits}.
1407
         */
1408
        @SerializedName("verification_method")
1409
        String verificationMethod;
1410

1411
        @Getter
1412
        @Setter
1413
        @EqualsAndHashCode(callSuper = false)
1414
        public static class FinancialConnections extends StripeObject {
×
1415
          @SerializedName("filters")
1416
          Filters filters;
1417

1418
          /**
1419
           * The list of permissions to request. The {@code payment_method} permission must be
1420
           * included.
1421
           */
1422
          @SerializedName("permissions")
1423
          List<String> permissions;
1424

1425
          /** Data features requested to be retrieved upon account creation. */
1426
          @SerializedName("prefetch")
1427
          List<String> prefetch;
1428

1429
          @Getter
1430
          @Setter
1431
          @EqualsAndHashCode(callSuper = false)
1432
          public static class Filters extends StripeObject {
×
1433
            /**
1434
             * The account subcategories to use to filter for possible accounts to link. Valid
1435
             * subcategories are {@code checking} and {@code savings}.
1436
             */
1437
            @SerializedName("account_subcategories")
1438
            List<String> accountSubcategories;
1439

1440
            /** The institution to use to filter for possible accounts to link. */
1441
            @SerializedName("institution")
1442
            String institution;
1443
          }
1444
        }
1445
      }
1446
    }
1447
  }
1448

1449
  @Getter
1450
  @Setter
1451
  @EqualsAndHashCode(callSuper = false)
1452
  public static class Rendering extends StripeObject {
×
1453
    /** How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. */
1454
    @SerializedName("amount_tax_display")
1455
    String amountTaxDisplay;
1456

1457
    /** Invoice pdf rendering options. */
1458
    @SerializedName("pdf")
1459
    Pdf pdf;
1460

1461
    /** ID of the rendering template that the invoice is formatted by. */
1462
    @SerializedName("template")
1463
    String template;
1464

1465
    /** Version of the rendering template that the invoice is using. */
1466
    @SerializedName("template_version")
1467
    Long templateVersion;
1468

1469
    @Getter
1470
    @Setter
1471
    @EqualsAndHashCode(callSuper = false)
1472
    public static class Pdf extends StripeObject {
×
1473
      /**
1474
       * Page size of invoice pdf. Options include a4, letter, and auto. If set to auto, page size
1475
       * will be switched to a4 or letter based on customer locale.
1476
       *
1477
       * <p>One of {@code a4}, {@code auto}, or {@code letter}.
1478
       */
1479
      @SerializedName("page_size")
1480
      String pageSize;
1481
    }
1482
  }
1483

1484
  @Getter
1485
  @Setter
1486
  @EqualsAndHashCode(callSuper = false)
1487
  public static class ShippingCost extends StripeObject {
×
1488
    /** Total shipping cost before any taxes are applied. */
1489
    @SerializedName("amount_subtotal")
1490
    Long amountSubtotal;
1491

1492
    /** Total tax amount applied due to shipping costs. If no tax was applied, defaults to 0. */
1493
    @SerializedName("amount_tax")
1494
    Long amountTax;
1495

1496
    /** Total shipping cost after taxes are applied. */
1497
    @SerializedName("amount_total")
1498
    Long amountTotal;
1499

1500
    /** The ID of the ShippingRate for this invoice. */
1501
    @SerializedName("shipping_rate")
1502
    @Getter(lombok.AccessLevel.NONE)
1503
    @Setter(lombok.AccessLevel.NONE)
1504
    ExpandableField<ShippingRate> shippingRate;
1505

1506
    /** The taxes applied to the shipping rate. */
1507
    @SerializedName("taxes")
1508
    List<QuotePreviewInvoice.ShippingCost.Tax> taxes;
1509

1510
    /** Get ID of expandable {@code shippingRate} object. */
1511
    public String getShippingRate() {
1512
      return (this.shippingRate != null) ? this.shippingRate.getId() : null;
×
1513
    }
1514

1515
    public void setShippingRate(String id) {
1516
      this.shippingRate = ApiResource.setExpandableFieldId(id, this.shippingRate);
×
1517
    }
×
1518

1519
    /** Get expanded {@code shippingRate}. */
1520
    public ShippingRate getShippingRateObject() {
1521
      return (this.shippingRate != null) ? this.shippingRate.getExpanded() : null;
×
1522
    }
1523

1524
    public void setShippingRateObject(ShippingRate expandableObject) {
1525
      this.shippingRate =
×
1526
          new ExpandableField<ShippingRate>(expandableObject.getId(), expandableObject);
×
1527
    }
×
1528

1529
    @Getter
1530
    @Setter
1531
    @EqualsAndHashCode(callSuper = false)
1532
    public static class Tax extends StripeObject {
×
1533
      /** Amount of tax applied for this rate. */
1534
      @SerializedName("amount")
1535
      Long amount;
1536

1537
      /**
1538
       * Tax rates can be applied to <a
1539
       * href="https://stripe.com/docs/billing/invoices/tax-rates">invoices</a>, <a
1540
       * href="https://stripe.com/docs/billing/subscriptions/taxes">subscriptions</a> and <a
1541
       * href="https://stripe.com/docs/payments/checkout/set-up-a-subscription#tax-rates">Checkout
1542
       * Sessions</a> to collect tax.
1543
       *
1544
       * <p>Related guide: <a href="https://stripe.com/docs/billing/taxes/tax-rates">Tax rates</a>
1545
       */
1546
      @SerializedName("rate")
1547
      TaxRate rate;
1548

1549
      /**
1550
       * The reasoning behind this tax, for example, if the product is tax exempt. The possible
1551
       * values for this field may be extended as new tax rules are supported.
1552
       *
1553
       * <p>One of {@code customer_exempt}, {@code not_collecting}, {@code not_subject_to_tax},
1554
       * {@code not_supported}, {@code portion_product_exempt}, {@code portion_reduced_rated},
1555
       * {@code portion_standard_rated}, {@code product_exempt}, {@code product_exempt_holiday},
1556
       * {@code proportionally_rated}, {@code reduced_rated}, {@code reverse_charge}, {@code
1557
       * standard_rated}, {@code taxable_basis_reduced}, or {@code zero_rated}.
1558
       */
1559
      @SerializedName("taxability_reason")
1560
      String taxabilityReason;
1561

1562
      /** The amount on which tax is calculated, in cents (or local equivalent). */
1563
      @SerializedName("taxable_amount")
1564
      Long taxableAmount;
1565
    }
1566
  }
1567

1568
  @Getter
1569
  @Setter
1570
  @EqualsAndHashCode(callSuper = false)
1571
  public static class StatusTransitions extends StripeObject {
×
1572
    /** The time that the invoice draft was finalized. */
1573
    @SerializedName("finalized_at")
1574
    Long finalizedAt;
1575

1576
    /** The time that the invoice was marked uncollectible. */
1577
    @SerializedName("marked_uncollectible_at")
1578
    Long markedUncollectibleAt;
1579

1580
    /** The time that the invoice was paid. */
1581
    @SerializedName("paid_at")
1582
    Long paidAt;
1583

1584
    /** The time that the invoice was voided. */
1585
    @SerializedName("voided_at")
1586
    Long voidedAt;
1587
  }
1588

1589
  @Getter
1590
  @Setter
1591
  @EqualsAndHashCode(callSuper = false)
1592
  public static class SubscriptionDetails extends StripeObject {
×
1593
    /**
1594
     * Set of <a href="https://stripe.com/docs/api/metadata">key-value pairs</a> defined as
1595
     * subscription metadata when an invoice is created. Becomes an immutable snapshot of the
1596
     * subscription metadata at the time of invoice finalization. <em>Note: This attribute is
1597
     * populated only for invoices created on or after June 29, 2023.</em>
1598
     */
1599
    @SerializedName("metadata")
1600
    Map<String, String> metadata;
1601

1602
    /**
1603
     * If specified, payment collection for this subscription will be paused. Note that the
1604
     * subscription status will be unchanged and will not be updated to {@code paused}. Learn more
1605
     * about <a href="https://stripe.com/billing/subscriptions/pause-payment">pausing
1606
     * collection</a>.
1607
     */
1608
    @SerializedName("pause_collection")
1609
    PauseCollection pauseCollection;
1610

1611
    /**
1612
     * The Pause Collection settings determine how we will pause collection for this subscription
1613
     * and for how long the subscription should be paused.
1614
     */
1615
    @Getter
1616
    @Setter
1617
    @EqualsAndHashCode(callSuper = false)
1618
    public static class PauseCollection extends StripeObject {
×
1619
      /**
1620
       * The payment collection behavior for this subscription while paused. One of {@code
1621
       * keep_as_draft}, {@code mark_uncollectible}, or {@code void}.
1622
       */
1623
      @SerializedName("behavior")
1624
      String behavior;
1625

1626
      /** The time after which the subscription will resume collecting payments. */
1627
      @SerializedName("resumes_at")
1628
      Long resumesAt;
1629
    }
1630
  }
1631

1632
  @Getter
1633
  @Setter
1634
  @EqualsAndHashCode(callSuper = false)
1635
  public static class ThresholdReason extends StripeObject {
×
1636
    /** The total invoice amount threshold boundary if it triggered the threshold invoice. */
1637
    @SerializedName("amount_gte")
1638
    Long amountGte;
1639

1640
    /** Indicates which line items triggered a threshold invoice. */
1641
    @SerializedName("item_reasons")
1642
    List<QuotePreviewInvoice.ThresholdReason.ItemReason> itemReasons;
1643

1644
    @Getter
1645
    @Setter
1646
    @EqualsAndHashCode(callSuper = false)
1647
    public static class ItemReason extends StripeObject {
×
1648
      /** The IDs of the line items that triggered the threshold invoice. */
1649
      @SerializedName("line_item_ids")
1650
      List<String> lineItemIds;
1651

1652
      /** The quantity threshold boundary that applied to the given line item. */
1653
      @SerializedName("usage_gte")
1654
      Long usageGte;
1655
    }
1656
  }
1657

1658
  @Getter
1659
  @Setter
1660
  @EqualsAndHashCode(callSuper = false)
1661
  public static class TotalDiscountAmount extends StripeObject {
×
1662
    /** The amount, in cents (or local equivalent), of the discount. */
1663
    @SerializedName("amount")
1664
    Long amount;
1665

1666
    /** The discount that was applied to get this discount amount. */
1667
    @SerializedName("discount")
1668
    @Getter(lombok.AccessLevel.NONE)
1669
    @Setter(lombok.AccessLevel.NONE)
1670
    ExpandableField<Discount> discount;
1671

1672
    /** Get ID of expandable {@code discount} object. */
1673
    public String getDiscount() {
1674
      return (this.discount != null) ? this.discount.getId() : null;
×
1675
    }
1676

1677
    public void setDiscount(String id) {
1678
      this.discount = ApiResource.setExpandableFieldId(id, this.discount);
×
1679
    }
×
1680

1681
    /** Get expanded {@code discount}. */
1682
    public Discount getDiscountObject() {
1683
      return (this.discount != null) ? this.discount.getExpanded() : null;
×
1684
    }
1685

1686
    public void setDiscountObject(Discount expandableObject) {
1687
      this.discount = new ExpandableField<Discount>(expandableObject.getId(), expandableObject);
×
1688
    }
×
1689
  }
1690

1691
  @Getter
1692
  @Setter
1693
  @EqualsAndHashCode(callSuper = false)
1694
  public static class TotalMarginAmount extends StripeObject {
×
1695
    /** The amount, in cents (or local equivalent), of the reduction in line item amount. */
1696
    @SerializedName("amount")
1697
    Long amount;
1698

1699
    /** The margin that was applied to get this margin amount. */
1700
    @SerializedName("margin")
1701
    @Getter(lombok.AccessLevel.NONE)
1702
    @Setter(lombok.AccessLevel.NONE)
1703
    ExpandableField<Margin> margin;
1704

1705
    /** Get ID of expandable {@code margin} object. */
1706
    public String getMargin() {
1707
      return (this.margin != null) ? this.margin.getId() : null;
×
1708
    }
1709

1710
    public void setMargin(String id) {
1711
      this.margin = ApiResource.setExpandableFieldId(id, this.margin);
×
1712
    }
×
1713

1714
    /** Get expanded {@code margin}. */
1715
    public Margin getMarginObject() {
1716
      return (this.margin != null) ? this.margin.getExpanded() : null;
×
1717
    }
1718

1719
    public void setMarginObject(Margin expandableObject) {
1720
      this.margin = new ExpandableField<Margin>(expandableObject.getId(), expandableObject);
×
1721
    }
×
1722
  }
1723

1724
  @Getter
1725
  @Setter
1726
  @EqualsAndHashCode(callSuper = false)
NEW
1727
  public static class TotalPretaxCreditAmount extends StripeObject {
×
1728
    /** The amount, in cents (or local equivalent), of the pretax credit amount. */
1729
    @SerializedName("amount")
1730
    Long amount;
1731

1732
    /** The credit balance transaction that was applied to get this pretax credit amount. */
1733
    @SerializedName("credit_balance_transaction")
1734
    @Getter(lombok.AccessLevel.NONE)
1735
    @Setter(lombok.AccessLevel.NONE)
1736
    ExpandableField<CreditBalanceTransaction> creditBalanceTransaction;
1737

1738
    /** The discount that was applied to get this pretax credit amount. */
1739
    @SerializedName("discount")
1740
    @Getter(lombok.AccessLevel.NONE)
1741
    @Setter(lombok.AccessLevel.NONE)
1742
    ExpandableField<Discount> discount;
1743

1744
    /** The margin that was applied to get this pretax credit amount. */
1745
    @SerializedName("margin")
1746
    @Getter(lombok.AccessLevel.NONE)
1747
    @Setter(lombok.AccessLevel.NONE)
1748
    ExpandableField<Margin> margin;
1749

1750
    /**
1751
     * Type of the pretax credit amount referenced.
1752
     *
1753
     * <p>One of {@code credit_balance_transaction}, {@code discount}, or {@code margin}.
1754
     */
1755
    @SerializedName("type")
1756
    String type;
1757

1758
    /** Get ID of expandable {@code creditBalanceTransaction} object. */
1759
    public String getCreditBalanceTransaction() {
NEW
1760
      return (this.creditBalanceTransaction != null) ? this.creditBalanceTransaction.getId() : null;
×
1761
    }
1762

1763
    public void setCreditBalanceTransaction(String id) {
NEW
1764
      this.creditBalanceTransaction =
×
NEW
1765
          ApiResource.setExpandableFieldId(id, this.creditBalanceTransaction);
×
NEW
1766
    }
×
1767

1768
    /** Get expanded {@code creditBalanceTransaction}. */
1769
    public CreditBalanceTransaction getCreditBalanceTransactionObject() {
NEW
1770
      return (this.creditBalanceTransaction != null)
×
NEW
1771
          ? this.creditBalanceTransaction.getExpanded()
×
NEW
1772
          : null;
×
1773
    }
1774

1775
    public void setCreditBalanceTransactionObject(CreditBalanceTransaction expandableObject) {
NEW
1776
      this.creditBalanceTransaction =
×
NEW
1777
          new ExpandableField<CreditBalanceTransaction>(expandableObject.getId(), expandableObject);
×
NEW
1778
    }
×
1779

1780
    /** Get ID of expandable {@code discount} object. */
1781
    public String getDiscount() {
NEW
1782
      return (this.discount != null) ? this.discount.getId() : null;
×
1783
    }
1784

1785
    public void setDiscount(String id) {
NEW
1786
      this.discount = ApiResource.setExpandableFieldId(id, this.discount);
×
NEW
1787
    }
×
1788

1789
    /** Get expanded {@code discount}. */
1790
    public Discount getDiscountObject() {
NEW
1791
      return (this.discount != null) ? this.discount.getExpanded() : null;
×
1792
    }
1793

1794
    public void setDiscountObject(Discount expandableObject) {
NEW
1795
      this.discount = new ExpandableField<Discount>(expandableObject.getId(), expandableObject);
×
NEW
1796
    }
×
1797

1798
    /** Get ID of expandable {@code margin} object. */
1799
    public String getMargin() {
NEW
1800
      return (this.margin != null) ? this.margin.getId() : null;
×
1801
    }
1802

1803
    public void setMargin(String id) {
NEW
1804
      this.margin = ApiResource.setExpandableFieldId(id, this.margin);
×
NEW
1805
    }
×
1806

1807
    /** Get expanded {@code margin}. */
1808
    public Margin getMarginObject() {
NEW
1809
      return (this.margin != null) ? this.margin.getExpanded() : null;
×
1810
    }
1811

1812
    public void setMarginObject(Margin expandableObject) {
NEW
1813
      this.margin = new ExpandableField<Margin>(expandableObject.getId(), expandableObject);
×
NEW
1814
    }
×
1815
  }
1816

1817
  @Getter
1818
  @Setter
1819
  @EqualsAndHashCode(callSuper = false)
1820
  public static class TotalTaxAmount extends StripeObject {
×
1821
    /** The amount, in cents (or local equivalent), of the tax. */
1822
    @SerializedName("amount")
1823
    Long amount;
1824

1825
    /** Whether this tax amount is inclusive or exclusive. */
1826
    @SerializedName("inclusive")
1827
    Boolean inclusive;
1828

1829
    /** The tax rate that was applied to get this tax amount. */
1830
    @SerializedName("tax_rate")
1831
    @Getter(lombok.AccessLevel.NONE)
1832
    @Setter(lombok.AccessLevel.NONE)
1833
    ExpandableField<TaxRate> taxRate;
1834

1835
    /**
1836
     * The reasoning behind this tax, for example, if the product is tax exempt. The possible values
1837
     * for this field may be extended as new tax rules are supported.
1838
     *
1839
     * <p>One of {@code customer_exempt}, {@code not_collecting}, {@code not_subject_to_tax}, {@code
1840
     * not_supported}, {@code portion_product_exempt}, {@code portion_reduced_rated}, {@code
1841
     * portion_standard_rated}, {@code product_exempt}, {@code product_exempt_holiday}, {@code
1842
     * proportionally_rated}, {@code reduced_rated}, {@code reverse_charge}, {@code standard_rated},
1843
     * {@code taxable_basis_reduced}, or {@code zero_rated}.
1844
     */
1845
    @SerializedName("taxability_reason")
1846
    String taxabilityReason;
1847

1848
    /** The amount on which tax is calculated, in cents (or local equivalent). */
1849
    @SerializedName("taxable_amount")
1850
    Long taxableAmount;
1851

1852
    /** Get ID of expandable {@code taxRate} object. */
1853
    public String getTaxRate() {
1854
      return (this.taxRate != null) ? this.taxRate.getId() : null;
×
1855
    }
1856

1857
    public void setTaxRate(String id) {
1858
      this.taxRate = ApiResource.setExpandableFieldId(id, this.taxRate);
×
1859
    }
×
1860

1861
    /** Get expanded {@code taxRate}. */
1862
    public TaxRate getTaxRateObject() {
1863
      return (this.taxRate != null) ? this.taxRate.getExpanded() : null;
×
1864
    }
1865

1866
    public void setTaxRateObject(TaxRate expandableObject) {
1867
      this.taxRate = new ExpandableField<TaxRate>(expandableObject.getId(), expandableObject);
×
1868
    }
×
1869
  }
1870

1871
  @Getter
1872
  @Setter
1873
  @EqualsAndHashCode(callSuper = false)
1874
  public static class TransferData extends StripeObject {
×
1875
    /**
1876
     * The amount in cents (or local equivalent) that will be transferred to the destination account
1877
     * when the invoice is paid. By default, the entire amount is transferred to the destination.
1878
     */
1879
    @SerializedName("amount")
1880
    Long amount;
1881

1882
    /** The account where funds from the payment will be transferred to upon payment success. */
1883
    @SerializedName("destination")
1884
    @Getter(lombok.AccessLevel.NONE)
1885
    @Setter(lombok.AccessLevel.NONE)
1886
    ExpandableField<Account> destination;
1887

1888
    /** Get ID of expandable {@code destination} object. */
1889
    public String getDestination() {
1890
      return (this.destination != null) ? this.destination.getId() : null;
×
1891
    }
1892

1893
    public void setDestination(String id) {
1894
      this.destination = ApiResource.setExpandableFieldId(id, this.destination);
×
1895
    }
×
1896

1897
    /** Get expanded {@code destination}. */
1898
    public Account getDestinationObject() {
1899
      return (this.destination != null) ? this.destination.getExpanded() : null;
×
1900
    }
1901

1902
    public void setDestinationObject(Account expandableObject) {
1903
      this.destination = new ExpandableField<Account>(expandableObject.getId(), expandableObject);
×
1904
    }
×
1905
  }
1906

1907
  @Override
1908
  public void setResponseGetter(StripeResponseGetter responseGetter) {
1909
    super.setResponseGetter(responseGetter);
×
1910
    trySetResponseGetter(application, responseGetter);
×
1911
    trySetResponseGetter(appliesTo, responseGetter);
×
1912
    trySetResponseGetter(automaticTax, responseGetter);
×
1913
    trySetResponseGetter(customerAddress, responseGetter);
×
1914
    trySetResponseGetter(customerShipping, responseGetter);
×
1915
    trySetResponseGetter(defaultPaymentMethod, responseGetter);
×
1916
    trySetResponseGetter(defaultSource, responseGetter);
×
1917
    trySetResponseGetter(discount, responseGetter);
×
1918
    trySetResponseGetter(fromInvoice, responseGetter);
×
1919
    trySetResponseGetter(issuer, responseGetter);
×
1920
    trySetResponseGetter(lastFinalizationError, responseGetter);
×
1921
    trySetResponseGetter(latestRevision, responseGetter);
×
1922
    trySetResponseGetter(lines, responseGetter);
×
1923
    trySetResponseGetter(onBehalfOf, responseGetter);
×
1924
    trySetResponseGetter(paymentIntent, responseGetter);
×
1925
    trySetResponseGetter(paymentSettings, responseGetter);
×
1926
    trySetResponseGetter(payments, responseGetter);
×
1927
    trySetResponseGetter(quote, responseGetter);
×
1928
    trySetResponseGetter(rendering, responseGetter);
×
1929
    trySetResponseGetter(shippingCost, responseGetter);
×
1930
    trySetResponseGetter(shippingDetails, responseGetter);
×
1931
    trySetResponseGetter(statusTransitions, responseGetter);
×
1932
    trySetResponseGetter(subscription, responseGetter);
×
1933
    trySetResponseGetter(subscriptionDetails, responseGetter);
×
1934
    trySetResponseGetter(testClock, responseGetter);
×
1935
    trySetResponseGetter(thresholdReason, responseGetter);
×
1936
    trySetResponseGetter(transferData, responseGetter);
×
1937
  }
×
1938
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc