Skip to content

Commit 7b2f6aa

Browse files
committed
Merge changes from stripe/stripe-node master
Committed-By-Agent: claude # Conflicts: # src/resources/Billing/Alerts.ts # src/resources/Billing/CreditBalanceSummary.ts # src/resources/Billing/CreditBalanceTransactions.ts # src/resources/Billing/CreditGrants.ts # src/resources/Checkout/Sessions.ts # src/resources/FinancialConnections/Accounts.ts # src/resources/FinancialConnections/Sessions.ts # src/resources/Identity/VerificationReports.ts # src/resources/Identity/VerificationSessions.ts # src/resources/Issuing/Authorizations.ts # src/resources/Issuing/Cardholders.ts # src/resources/Issuing/Cards.ts # src/resources/Issuing/Disputes.ts # src/resources/Issuing/Tokens.ts # src/resources/Issuing/Transactions.ts # src/resources/Radar/PaymentEvaluations.ts # src/resources/Radar/index.ts # src/resources/Tax/CalculationLineItems.ts # src/resources/Tax/Calculations.ts # src/resources/Tax/Registrations.ts # src/resources/Tax/TransactionLineItems.ts # src/resources/Tax/Transactions.ts # src/resources/Terminal/Configurations.ts # src/resources/Terminal/Readers.ts # src/resources/TestHelpers/index.ts # src/resources/Treasury/FinancialAccountFeatures.ts # src/resources/Treasury/OutboundTransfers.ts # src/resources/Treasury/ReceivedCredits.ts # src/resources/Treasury/ReceivedDebits.ts # src/resources/V2/Commerce/ProductCatalogImports.ts # src/resources/V2/Core/AccountLinks.ts # src/resources/V2/Core/AccountPersons.ts # src/resources/V2/Core/Accounts.ts # src/resources/V2/Core/Events.ts # src/stripe.cjs.node.ts
2 parents e1ba2f1 + 4e6309e commit 7b2f6aa

73 files changed

Lines changed: 25708 additions & 12719 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

justfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ prettier *args: install
6868
prettier "{src,examples,scripts,test,types}/**/*.{ts,js}" {{ args }}
6969

7070
# ⭐ format all files
71-
format: (prettier "--write --loglevel silent")
71+
format: (prettier "--write --loglevel error")
7272

7373
# verify formatting of files (without changes)
7474
format-check: (prettier "--check")

src/resources/Apps/Secrets.ts

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -100,25 +100,23 @@ export interface Secret {
100100
*/
101101
payload?: string | null;
102102

103-
scope: Apps.Secret.Scope;
103+
scope: Secret.Scope;
104104
}
105-
export namespace Apps {
106-
export namespace Secret {
107-
export interface Scope {
108-
/**
109-
* The secret scope type.
110-
*/
111-
type: Scope.Type;
105+
export namespace Secret {
106+
export interface Scope {
107+
/**
108+
* The secret scope type.
109+
*/
110+
type: Scope.Type;
112111

113-
/**
114-
* The user ID, if type is set to "user"
115-
*/
116-
user?: string;
117-
}
112+
/**
113+
* The user ID, if type is set to "user"
114+
*/
115+
user?: string;
116+
}
118117

119-
export namespace Scope {
120-
export type Type = 'account' | 'user';
121-
}
118+
export namespace Scope {
119+
export type Type = 'account' | 'user';
122120
}
123121
}
124122
export namespace Apps {

src/resources/Billing/Alerts.ts

Lines changed: 28 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -442,7 +442,7 @@ export interface Alert {
442442
/**
443443
* Status of the alert. This can be active, inactive or archived.
444444
*/
445-
status: Billing.Alert.Status | null;
445+
status: Alert.Status | null;
446446

447447
/**
448448
* Title of the alert.
@@ -452,7 +452,7 @@ export interface Alert {
452452
/**
453453
* Encapsulates configuration of the alert to monitor usage on a specific [Billing Meter](https://docs.stripe.com/api/billing/meter).
454454
*/
455-
usage_threshold: Billing.Alert.UsageThreshold | null;
455+
usage_threshold: Alert.UsageThreshold | null;
456456
}
457457
export namespace Billing {
458458
export namespace Alert {
@@ -494,11 +494,34 @@ export namespace Billing {
494494

495495
export type Status = 'active' | 'archived' | 'inactive';
496496

497-
export interface UsageThreshold {
497+
export interface UsageThreshold {
498+
/**
499+
* The filters allow limiting the scope of this usage alert. You can only specify up to one filter at this time.
500+
*/
501+
filters: Array<UsageThreshold.Filter> | null;
502+
503+
/**
504+
* The value at which this alert will trigger.
505+
*/
506+
gte: number;
507+
508+
/**
509+
* The [Billing Meter](https://docs.stripe.com/api/billing/meter) ID whose usage is monitored.
510+
*/
511+
meter: string | Meter;
512+
513+
/**
514+
* Defines how the alert will behave.
515+
*/
516+
recurrence: 'one_time';
517+
}
518+
519+
export namespace UsageThreshold {
520+
export interface Filter {
498521
/**
499-
* The filters allow limiting the scope of this usage alert. You can only specify up to one filter at this time.
522+
* Limit the scope of the alert to this customer ID
500523
*/
501-
filters: Array<UsageThreshold.Filter> | null;
524+
customer: string | Customer | null;
502525

503526
/**
504527
* The value at which this alert will trigger.

src/resources/Billing/CreditBalanceSummary.ts

Lines changed: 25 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ export interface CreditBalanceSummary {
6969
/**
7070
* The billing credit balances. One entry per credit grant currency. If a customer only has credit grants in a single currency, then this will have a single balance entry.
7171
*/
72-
balances: Array<Billing.CreditBalanceSummary.Balance>;
72+
balances: Array<CreditBalanceSummary.Balance>;
7373

7474
/**
7575
* The customer the balance is for.
@@ -86,18 +86,29 @@ export interface CreditBalanceSummary {
8686
*/
8787
livemode: boolean;
8888
}
89-
export namespace Billing {
90-
export namespace CreditBalanceSummary {
91-
export interface Balance {
92-
available_balance: Balance.AvailableBalance;
89+
export namespace CreditBalanceSummary {
90+
export interface Balance {
91+
available_balance: Balance.AvailableBalance;
9392

9493
balance_update_details?: Balance.BalanceUpdateDetails;
9594

9695
ledger_balance: Balance.LedgerBalance;
9796
}
9897

99-
export namespace Balance {
100-
export interface AvailableBalance {
98+
export interface LedgerBalance {
99+
/**
100+
* The monetary amount.
101+
*/
102+
monetary: LedgerBalance.Monetary | null;
103+
104+
/**
105+
* The type of this amount. We currently only support `monetary` billing credits.
106+
*/
107+
type: 'monetary';
108+
}
109+
110+
export namespace AvailableBalance {
111+
export interface Monetary {
101112
/**
102113
* The custom pricing unit amount.
103114
*/
@@ -106,10 +117,10 @@ export namespace Billing {
106117
/**
107118
* The monetary amount.
108119
*/
109-
monetary: AvailableBalance.Monetary | null;
120+
currency: string;
110121

111122
/**
112-
* The type of this amount. We currently only support `monetary` billing credits.
123+
* A positive integer representing the amount.
113124
*/
114125
type: AvailableBalance.Type;
115126
}
@@ -120,8 +131,10 @@ export namespace Billing {
120131
*/
121132
latest_meter_event: BalanceUpdateDetails.LatestMeterEvent | null;
122133
}
134+
}
123135

124-
export interface LedgerBalance {
136+
export namespace LedgerBalance {
137+
export interface Monetary {
125138
/**
126139
* The custom pricing unit amount.
127140
*/
@@ -130,10 +143,10 @@ export namespace Billing {
130143
/**
131144
* The monetary amount.
132145
*/
133-
monetary: LedgerBalance.Monetary | null;
146+
currency: string;
134147

135148
/**
136-
* The type of this amount. We currently only support `monetary` billing credits.
149+
* A positive integer representing the amount.
137150
*/
138151
type: LedgerBalance.Type;
139152
}

src/resources/Billing/CreditBalanceTransactions.ts

Lines changed: 84 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ export interface CreditBalanceTransaction {
160160
/**
161161
* Credit details for this credit balance transaction. Only present if type is `credit`.
162162
*/
163-
credit: Billing.CreditBalanceTransaction.Credit | null;
163+
credit: CreditBalanceTransaction.Credit | null;
164164

165165
/**
166166
* The credit grant associated with this credit balance transaction.
@@ -170,7 +170,7 @@ export interface CreditBalanceTransaction {
170170
/**
171171
* Debit details for this credit balance transaction. Only present if type is `debit`.
172172
*/
173-
debit: Billing.CreditBalanceTransaction.Debit | null;
173+
debit: CreditBalanceTransaction.Debit | null;
174174

175175
/**
176176
* The effective time of this credit balance transaction.
@@ -190,39 +190,99 @@ export interface CreditBalanceTransaction {
190190
/**
191191
* The type of credit balance transaction (credit or debit).
192192
*/
193-
type: Billing.CreditBalanceTransaction.Type | null;
193+
type: CreditBalanceTransaction.Type | null;
194194
}
195-
export namespace Billing {
196-
export namespace CreditBalanceTransaction {
197-
export interface Credit {
198-
amount: Credit.Amount;
195+
export namespace CreditBalanceTransaction {
196+
export interface Credit {
197+
amount: Credit.Amount;
198+
199+
/**
200+
* Details of the invoice to which the reinstated credits were originally applied. Only present if `type` is `credits_application_invoice_voided`.
201+
*/
202+
credits_application_invoice_voided: Credit.CreditsApplicationInvoiceVoided | null;
203+
204+
/**
205+
* The type of credit transaction.
206+
*/
207+
type: Credit.Type;
208+
}
209+
210+
export interface Debit {
211+
amount: Debit.Amount;
212+
213+
/**
214+
* Details of how the billing credits were applied to an invoice. Only present if `type` is `credits_applied`.
215+
*/
216+
credits_applied: Debit.CreditsApplied | null;
217+
218+
/**
219+
* The type of debit transaction.
220+
*/
221+
type: Debit.Type;
222+
}
223+
224+
export type Type = 'credit' | 'debit';
199225

226+
export namespace Credit {
227+
export interface Amount {
200228
/**
201-
* Details of the invoice to which the reinstated credits were originally applied. Only present if `type` is `credits_application_invoice_voided`.
229+
* The monetary amount.
202230
*/
203-
credits_application_invoice_voided: Credit.CreditsApplicationInvoiceVoided | null;
231+
monetary: Amount.Monetary | null;
204232

205233
/**
206-
* The type of credit transaction.
234+
* The type of this amount. We currently only support `monetary` billing credits.
207235
*/
208-
type: Credit.Type;
236+
type: 'monetary';
209237
}
210238

211-
export interface Debit {
212-
amount: Debit.Amount;
239+
export interface CreditsApplicationInvoiceVoided {
240+
/**
241+
* The invoice to which the reinstated billing credits were originally applied.
242+
*/
243+
invoice: string | Invoice;
213244

214245
/**
215-
* Details of how the billing credits were applied to an invoice. Only present if `type` is `credits_applied`.
246+
* The invoice line item to which the reinstated billing credits were originally applied.
216247
*/
217-
credits_applied: Debit.CreditsApplied | null;
248+
invoice_line_item: string;
249+
}
218250

251+
export type Type = 'credits_application_invoice_voided' | 'credits_granted';
252+
253+
export namespace Amount {
254+
export interface Monetary {
255+
/**
256+
* Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
257+
*/
258+
currency: string;
259+
260+
/**
261+
* A positive integer representing the amount.
262+
*/
263+
value: number;
264+
}
265+
}
266+
}
267+
268+
export namespace Debit {
269+
export interface Amount {
219270
/**
220-
* The type of debit transaction.
271+
* The monetary amount.
221272
*/
222-
type: Debit.Type;
273+
monetary: Amount.Monetary | null;
274+
275+
/**
276+
* The type of this amount. We currently only support `monetary` billing credits.
277+
*/
278+
type: 'monetary';
223279
}
224280

225-
export type Type = 'credit' | 'debit';
281+
export interface CreditsApplied {
282+
/**
283+
* The invoice to which the billing credits were applied.
284+
*/
285+
invoice: string | Invoice;
226286

227287
export namespace Credit {
228288
export interface Amount {
@@ -326,8 +386,10 @@ export namespace Billing {
326386
}
327387
}
328388

329-
export namespace Debit {
330-
export interface Amount {
389+
export type Type = 'credits_applied' | 'credits_expired' | 'credits_voided';
390+
391+
export namespace Amount {
392+
export interface Monetary {
331393
/**
332394
* The custom pricing unit amount.
333395
*/
@@ -336,10 +398,10 @@ export namespace Billing {
336398
/**
337399
* The monetary amount.
338400
*/
339-
monetary: Amount.Monetary | null;
401+
currency: string;
340402

341403
/**
342-
* The type of this amount. We currently only support `monetary` billing credits.
404+
* A positive integer representing the amount.
343405
*/
344406
type: Amount.Type;
345407
}

0 commit comments

Comments
 (0)