stripe 16.2.0 → 16.3.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +761 -114
- package/README.md +33 -0
- package/VERSION +1 -1
- package/cjs/RequestSender.js +66 -5
- package/cjs/StripeResource.js +1 -1
- package/cjs/apiVersion.js +2 -1
- package/cjs/multipart.js +1 -1
- package/cjs/resources/AccountNotices.js +21 -0
- package/cjs/resources/Capital/FinancingOffers.js +21 -0
- package/cjs/resources/Capital/FinancingSummary.js +12 -0
- package/cjs/resources/Capital/FinancingTransactions.js +17 -0
- package/cjs/resources/FinancialConnections/Accounts.js +5 -0
- package/cjs/resources/FinancialConnections/Institutions.js +17 -0
- package/cjs/resources/GiftCards/Cards.js +23 -0
- package/cjs/resources/GiftCards/Transactions.js +33 -0
- package/cjs/resources/Invoices.js +13 -0
- package/cjs/resources/Issuing/CreditUnderwritingRecords.js +33 -0
- package/cjs/resources/Margins.js +22 -0
- package/cjs/resources/OAuth.js +1 -1
- package/cjs/resources/Orders.js +24 -0
- package/cjs/resources/PaymentIntents.js +4 -0
- package/cjs/resources/QuotePhases.js +22 -0
- package/cjs/resources/Quotes.js +32 -0
- package/cjs/resources/SubscriptionSchedules.js +4 -0
- package/cjs/resources/Tax/Forms.js +20 -0
- package/cjs/resources/Terminal/Readers.js +12 -0
- package/cjs/resources.js +38 -10
- package/cjs/stripe.core.js +6 -3
- package/cjs/utils.js +30 -3
- package/esm/RequestSender.js +67 -6
- package/esm/StripeResource.js +2 -2
- package/esm/apiVersion.js +1 -0
- package/esm/multipart.js +2 -2
- package/esm/resources/AccountNotices.js +18 -0
- package/esm/resources/Capital/FinancingOffers.js +18 -0
- package/esm/resources/Capital/FinancingSummary.js +9 -0
- package/esm/resources/Capital/FinancingTransactions.js +14 -0
- package/esm/resources/FinancialConnections/Accounts.js +5 -0
- package/esm/resources/FinancialConnections/Institutions.js +14 -0
- package/esm/resources/GiftCards/Cards.js +20 -0
- package/esm/resources/GiftCards/Transactions.js +30 -0
- package/esm/resources/Invoices.js +13 -0
- package/esm/resources/Issuing/CreditUnderwritingRecords.js +30 -0
- package/esm/resources/Margins.js +19 -0
- package/esm/resources/OAuth.js +2 -2
- package/esm/resources/Orders.js +21 -0
- package/esm/resources/PaymentIntents.js +4 -0
- package/esm/resources/QuotePhases.js +19 -0
- package/esm/resources/Quotes.js +32 -0
- package/esm/resources/SubscriptionSchedules.js +4 -0
- package/esm/resources/Tax/Forms.js +17 -0
- package/esm/resources/Terminal/Readers.js +12 -0
- package/esm/resources.js +24 -0
- package/esm/stripe.core.js +6 -3
- package/esm/utils.js +27 -1
- package/package.json +1 -1
- package/types/AccountLinksResource.d.ts +5 -1
- package/types/AccountNotices.d.ts +110 -0
- package/types/AccountNoticesResource.d.ts +98 -0
- package/types/AccountSessions.d.ts +15 -0
- package/types/AccountSessionsResource.d.ts +205 -0
- package/types/Accounts.d.ts +88 -1
- package/types/AccountsResource.d.ts +204 -0
- package/types/Capital/FinancingOffers.d.ts +188 -0
- package/types/Capital/FinancingOffersResource.d.ts +97 -0
- package/types/Capital/FinancingSummary.d.ts +106 -0
- package/types/Capital/FinancingSummaryResource.d.ts +27 -0
- package/types/Capital/FinancingTransactions.d.ts +135 -0
- package/types/Capital/FinancingTransactionsResource.d.ts +68 -0
- package/types/Charges.d.ts +67 -0
- package/types/ChargesResource.d.ts +1294 -0
- package/types/Checkout/Sessions.d.ts +28 -1
- package/types/Checkout/SessionsResource.d.ts +15 -1
- package/types/ConfirmationTokens.d.ts +83 -0
- package/types/Coupons.d.ts +1 -1
- package/types/CouponsResource.d.ts +1 -1
- package/types/CreditNotes.d.ts +21 -0
- package/types/CreditNotesResource.d.ts +51 -0
- package/types/CustomerSessions.d.ts +76 -0
- package/types/CustomerSessionsResource.d.ts +76 -0
- package/types/CustomersResource.d.ts +2 -0
- package/types/Disputes.d.ts +167 -0
- package/types/DisputesResource.d.ts +120 -0
- package/types/EventTypes.d.ts +426 -0
- package/types/Events.d.ts +83 -0
- package/types/FinancialConnections/AccountInferredBalances.d.ts +38 -0
- package/types/FinancialConnections/Accounts.d.ts +29 -1
- package/types/FinancialConnections/AccountsResource.d.ts +35 -3
- package/types/FinancialConnections/Institutions.d.ts +93 -0
- package/types/FinancialConnections/InstitutionsResource.d.ts +47 -0
- package/types/FinancialConnections/Sessions.d.ts +49 -1
- package/types/FinancialConnections/SessionsResource.d.ts +38 -1
- package/types/GiftCards/Cards.d.ts +118 -0
- package/types/GiftCards/CardsResource.d.ts +159 -0
- package/types/GiftCards/Transactions.d.ts +129 -0
- package/types/GiftCards/TransactionsResource.d.ts +201 -0
- package/types/InvoiceItems.d.ts +5 -0
- package/types/InvoiceItemsResource.d.ts +98 -0
- package/types/InvoiceLineItems.d.ts +22 -0
- package/types/InvoicePayments.d.ts +91 -0
- package/types/Invoices.d.ts +116 -1
- package/types/InvoicesResource.d.ts +5395 -1818
- package/types/Issuing/CardholdersResource.d.ts +2 -1
- package/types/Issuing/Cards.d.ts +34 -0
- package/types/Issuing/CardsResource.d.ts +125 -0
- package/types/Issuing/CreditUnderwritingRecords.d.ts +446 -0
- package/types/Issuing/CreditUnderwritingRecordsResource.d.ts +1017 -0
- package/types/LineItems.d.ts +7 -0
- package/types/Mandates.d.ts +77 -0
- package/types/Margins.d.ts +56 -0
- package/types/MarginsResource.d.ts +114 -0
- package/types/Orders.d.ts +1057 -0
- package/types/OrdersResource.d.ts +2711 -0
- package/types/PaymentIntents.d.ts +469 -1
- package/types/PaymentIntentsResource.d.ts +6721 -3373
- package/types/PaymentMethods.d.ts +62 -0
- package/types/PaymentMethodsResource.d.ts +110 -0
- package/types/Prices.d.ts +22 -0
- package/types/PricesResource.d.ts +22 -0
- package/types/Products.d.ts +39 -0
- package/types/ProductsResource.d.ts +36 -0
- package/types/QuoteLines.d.ts +634 -0
- package/types/QuotePhases.d.ts +198 -0
- package/types/QuotePhasesResource.d.ts +67 -0
- package/types/QuotePreviewInvoices.d.ts +1535 -0
- package/types/QuotePreviewSubscriptionSchedules.d.ts +778 -0
- package/types/Quotes.d.ts +578 -1
- package/types/QuotesResource.d.ts +3174 -265
- package/types/SetupAttempts.d.ts +9 -0
- package/types/SetupIntents.d.ts +110 -1
- package/types/SetupIntentsResource.d.ts +498 -3
- package/types/Sources.d.ts +23 -0
- package/types/SubscriptionItems.d.ts +21 -0
- package/types/SubscriptionItemsResource.d.ts +109 -0
- package/types/SubscriptionSchedules.d.ts +164 -0
- package/types/SubscriptionSchedulesResource.d.ts +1234 -16
- package/types/Subscriptions.d.ts +46 -1
- package/types/SubscriptionsResource.d.ts +347 -2
- package/types/Tax/Forms.d.ts +133 -0
- package/types/Tax/FormsResource.d.ts +90 -0
- package/types/Terminal/Readers.d.ts +278 -0
- package/types/Terminal/ReadersResource.d.ts +208 -0
- package/types/TestHelpers/ConfirmationTokensResource.d.ts +55 -0
- package/types/TestHelpers/Treasury/ReceivedCreditsResource.d.ts +26 -0
- package/types/TestHelpers/Treasury/ReceivedDebitsResource.d.ts +26 -0
- package/types/Treasury/OutboundTransfers.d.ts +26 -0
- package/types/Treasury/OutboundTransfersResource.d.ts +26 -0
- package/types/Treasury/ReceivedCredits.d.ts +26 -0
- package/types/Treasury/ReceivedDebits.d.ts +31 -0
- package/types/WebhookEndpointsResource.d.ts +50 -0
- package/types/index.d.ts +64 -0
- package/types/lib.d.ts +12 -0
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec
|
|
2
|
+
|
|
3
|
+
declare module 'stripe' {
|
|
4
|
+
namespace Stripe {
|
|
5
|
+
/**
|
|
6
|
+
* A quote phase describes the line items, coupons, and trialing status of a subscription for a predefined time period.
|
|
7
|
+
*/
|
|
8
|
+
interface QuotePhase {
|
|
9
|
+
/**
|
|
10
|
+
* Unique identifier for the object.
|
|
11
|
+
*/
|
|
12
|
+
id: string;
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* String representing the object's type. Objects of the same type share the same value.
|
|
16
|
+
*/
|
|
17
|
+
object: 'quote_phase';
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Total before any discounts or taxes are applied.
|
|
21
|
+
*/
|
|
22
|
+
amount_subtotal: number;
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Total after discounts and taxes are applied.
|
|
26
|
+
*/
|
|
27
|
+
amount_total: number;
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* If set to `reset`, the billing_cycle_anchor of the subscription is set to the start of the phase when entering the phase. If unset, then the billing cycle anchor is automatically modified as needed when entering the phase. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle).
|
|
31
|
+
*/
|
|
32
|
+
billing_cycle_anchor: 'reset' | null;
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay the underlying subscription at the end of each billing cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`.
|
|
36
|
+
*/
|
|
37
|
+
collection_method: QuotePhase.CollectionMethod | null;
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* The default tax rates to apply to the subscription during this phase of the quote.
|
|
41
|
+
*/
|
|
42
|
+
default_tax_rates?: Array<string | Stripe.TaxRate>;
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* The stackable discounts that will be applied to the subscription on this phase. Subscription item discounts are applied before subscription discounts.
|
|
46
|
+
*/
|
|
47
|
+
discounts: Array<string | Stripe.Discount>;
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* The end of this phase of the quote
|
|
51
|
+
*/
|
|
52
|
+
end_date: number | null;
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* The invoice settings applicable during this phase.
|
|
56
|
+
*/
|
|
57
|
+
invoice_settings: QuotePhase.InvoiceSettings | null;
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* Integer representing the multiplier applied to the price interval. For example, `iterations=2` applied to a price with `interval=month` and `interval_count=3` results in a phase of duration `2 * 3 months = 6 months`.
|
|
61
|
+
*/
|
|
62
|
+
iterations: number | null;
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* A list of items the customer is being quoted for.
|
|
66
|
+
*/
|
|
67
|
+
line_items?: ApiList<Stripe.LineItem>;
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* Set of [key-value pairs](https://stripe.com/docs/api/metadata) that will declaratively set metadata on the subscription schedule's phases when the quote is accepted.
|
|
71
|
+
*/
|
|
72
|
+
metadata: Stripe.Metadata | null;
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* If the quote will prorate when transitioning to this phase. Possible values are `create_prorations` and `none`.
|
|
76
|
+
*/
|
|
77
|
+
proration_behavior: QuotePhase.ProrationBehavior;
|
|
78
|
+
|
|
79
|
+
total_details: QuotePhase.TotalDetails;
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* If set to true the entire phase is counted as a trial and the customer will not be charged for any recurring fees.
|
|
83
|
+
*/
|
|
84
|
+
trial: boolean | null;
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* When the trial ends within the phase.
|
|
88
|
+
*/
|
|
89
|
+
trial_end: number | null;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
namespace QuotePhase {
|
|
93
|
+
type CollectionMethod = 'charge_automatically' | 'send_invoice';
|
|
94
|
+
|
|
95
|
+
interface InvoiceSettings {
|
|
96
|
+
/**
|
|
97
|
+
* Number of days within which a customer must pay invoices generated by this subscription schedule. This value will be `null` for subscription schedules where `billing=charge_automatically`.
|
|
98
|
+
*/
|
|
99
|
+
days_until_due: number | null;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
type ProrationBehavior = 'always_invoice' | 'create_prorations' | 'none';
|
|
103
|
+
|
|
104
|
+
interface TotalDetails {
|
|
105
|
+
/**
|
|
106
|
+
* This is the sum of all the discounts.
|
|
107
|
+
*/
|
|
108
|
+
amount_discount: number;
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* This is the sum of all the shipping amounts.
|
|
112
|
+
*/
|
|
113
|
+
amount_shipping: number | null;
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* This is the sum of all the tax amounts.
|
|
117
|
+
*/
|
|
118
|
+
amount_tax: number;
|
|
119
|
+
|
|
120
|
+
breakdown?: TotalDetails.Breakdown;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
namespace TotalDetails {
|
|
124
|
+
interface Breakdown {
|
|
125
|
+
/**
|
|
126
|
+
* The aggregated discounts.
|
|
127
|
+
*/
|
|
128
|
+
discounts: Array<Breakdown.Discount>;
|
|
129
|
+
|
|
130
|
+
/**
|
|
131
|
+
* The aggregated tax amounts by rate.
|
|
132
|
+
*/
|
|
133
|
+
taxes: Array<Breakdown.Tax>;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
namespace Breakdown {
|
|
137
|
+
interface Discount {
|
|
138
|
+
/**
|
|
139
|
+
* The amount discounted.
|
|
140
|
+
*/
|
|
141
|
+
amount: number;
|
|
142
|
+
|
|
143
|
+
/**
|
|
144
|
+
* A discount represents the actual application of a [coupon](https://stripe.com/docs/api#coupons) or [promotion code](https://stripe.com/docs/api#promotion_codes).
|
|
145
|
+
* It contains information about when the discount began, when it will end, and what it is applied to.
|
|
146
|
+
*
|
|
147
|
+
* Related guide: [Applying discounts to subscriptions](https://stripe.com/docs/billing/subscriptions/discounts)
|
|
148
|
+
*/
|
|
149
|
+
discount: Stripe.Discount;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
interface Tax {
|
|
153
|
+
/**
|
|
154
|
+
* Amount of tax applied for this rate.
|
|
155
|
+
*/
|
|
156
|
+
amount: number;
|
|
157
|
+
|
|
158
|
+
/**
|
|
159
|
+
* Tax rates can be applied to [invoices](https://stripe.com/docs/billing/invoices/tax-rates), [subscriptions](https://stripe.com/docs/billing/subscriptions/taxes) and [Checkout Sessions](https://stripe.com/docs/payments/checkout/set-up-a-subscription#tax-rates) to collect tax.
|
|
160
|
+
*
|
|
161
|
+
* Related guide: [Tax rates](https://stripe.com/docs/billing/taxes/tax-rates)
|
|
162
|
+
*/
|
|
163
|
+
rate: Stripe.TaxRate;
|
|
164
|
+
|
|
165
|
+
/**
|
|
166
|
+
* The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported.
|
|
167
|
+
*/
|
|
168
|
+
taxability_reason: Tax.TaxabilityReason | null;
|
|
169
|
+
|
|
170
|
+
/**
|
|
171
|
+
* The amount on which tax is calculated, in cents (or local equivalent).
|
|
172
|
+
*/
|
|
173
|
+
taxable_amount: number | null;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
namespace Tax {
|
|
177
|
+
type TaxabilityReason =
|
|
178
|
+
| 'customer_exempt'
|
|
179
|
+
| 'not_collecting'
|
|
180
|
+
| 'not_subject_to_tax'
|
|
181
|
+
| 'not_supported'
|
|
182
|
+
| 'portion_product_exempt'
|
|
183
|
+
| 'portion_reduced_rated'
|
|
184
|
+
| 'portion_standard_rated'
|
|
185
|
+
| 'product_exempt'
|
|
186
|
+
| 'product_exempt_holiday'
|
|
187
|
+
| 'proportionally_rated'
|
|
188
|
+
| 'reduced_rated'
|
|
189
|
+
| 'reverse_charge'
|
|
190
|
+
| 'standard_rated'
|
|
191
|
+
| 'taxable_basis_reduced'
|
|
192
|
+
| 'zero_rated';
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec
|
|
2
|
+
|
|
3
|
+
declare module 'stripe' {
|
|
4
|
+
namespace Stripe {
|
|
5
|
+
interface QuotePhaseRetrieveParams {
|
|
6
|
+
/**
|
|
7
|
+
* Specifies which fields in the response should be expanded.
|
|
8
|
+
*/
|
|
9
|
+
expand?: Array<string>;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
interface QuotePhaseListParams extends PaginationParams {
|
|
13
|
+
/**
|
|
14
|
+
* The ID of the quote whose phases will be retrieved.
|
|
15
|
+
*/
|
|
16
|
+
quote: string;
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Specifies which fields in the response should be expanded.
|
|
20
|
+
*/
|
|
21
|
+
expand?: Array<string>;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
interface QuotePhaseListLineItemsParams extends PaginationParams {
|
|
25
|
+
/**
|
|
26
|
+
* Specifies which fields in the response should be expanded.
|
|
27
|
+
*/
|
|
28
|
+
expand?: Array<string>;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
class QuotePhasesResource {
|
|
32
|
+
/**
|
|
33
|
+
* Retrieves the quote phase with the given ID.
|
|
34
|
+
*/
|
|
35
|
+
retrieve(
|
|
36
|
+
id: string,
|
|
37
|
+
params?: QuotePhaseRetrieveParams,
|
|
38
|
+
options?: RequestOptions
|
|
39
|
+
): Promise<Stripe.Response<Stripe.QuotePhase>>;
|
|
40
|
+
retrieve(
|
|
41
|
+
id: string,
|
|
42
|
+
options?: RequestOptions
|
|
43
|
+
): Promise<Stripe.Response<Stripe.QuotePhase>>;
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* Returns a list of quote phases.
|
|
47
|
+
*/
|
|
48
|
+
list(
|
|
49
|
+
params: QuotePhaseListParams,
|
|
50
|
+
options?: RequestOptions
|
|
51
|
+
): ApiListPromise<Stripe.QuotePhase>;
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* When retrieving a quote phase, there is an includable line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items.
|
|
55
|
+
*/
|
|
56
|
+
listLineItems(
|
|
57
|
+
id: string,
|
|
58
|
+
params?: QuotePhaseListLineItemsParams,
|
|
59
|
+
options?: RequestOptions
|
|
60
|
+
): ApiListPromise<Stripe.LineItem>;
|
|
61
|
+
listLineItems(
|
|
62
|
+
id: string,
|
|
63
|
+
options?: RequestOptions
|
|
64
|
+
): ApiListPromise<Stripe.LineItem>;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}
|