Skip to content

Commit 77b02bc

Browse files
Update generated code for v2164 and
1 parent 34524bb commit 77b02bc

31 files changed

+1559
-44
lines changed

CODEGEN_VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
39593379de91f260448ad3f51f983529c170e619
1+
74913070eb5bc81c058d07ad167346b6d68d8b0b

src/resources.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ import {CollectionSettings as V2BillingCollectionSettings} from './resources/V2/
2626
import {Configurations as BillingPortalConfigurations} from './resources/BillingPortal/Configurations.js';
2727
import {Configurations as TerminalConfigurations} from './resources/Terminal/Configurations.js';
2828
import {ConfirmationTokens as TestHelpersConfirmationTokens} from './resources/TestHelpers/ConfirmationTokens.js';
29+
import {ConnectionSessions as V2CoreConnectionSessions} from './resources/V2/Core/ConnectionSessions.js';
2930
import {ConnectionTokens as TerminalConnectionTokens} from './resources/Terminal/ConnectionTokens.js';
3031
import {CreditBalanceSummary as BillingCreditBalanceSummary} from './resources/Billing/CreditBalanceSummary.js';
3132
import {CreditBalanceTransactions as BillingCreditBalanceTransactions} from './resources/Billing/CreditBalanceTransactions.js';
@@ -389,6 +390,7 @@ export const V2 = resourceNamespace('v2', {
389390
AccountTokens: V2CoreAccountTokens,
390391
Accounts: V2CoreAccounts,
391392
ClaimableSandboxes: V2CoreClaimableSandboxes,
393+
ConnectionSessions: V2CoreConnectionSessions,
392394
EventDestinations: V2CoreEventDestinations,
393395
Events: V2CoreEvents,
394396
Vault: resourceNamespace('vault', {
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
// File generated from our OpenAPI spec
2+
3+
import {StripeResource} from '../../../StripeResource.js';
4+
const stripeMethod = StripeResource.method;
5+
export const ConnectionSessions = StripeResource.extend({
6+
create: stripeMethod({
7+
method: 'POST',
8+
fullPath: '/v2/core/connection_sessions',
9+
}),
10+
retrieve: stripeMethod({
11+
method: 'GET',
12+
fullPath: '/v2/core/connection_sessions/{id}',
13+
}),
14+
});

src/resources/V2/Payments/SettlementAllocationIntents.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,11 @@ export const SettlementAllocationIntents = StripeResource.extend({
2020
method: 'POST',
2121
fullPath: '/v2/payments/settlement_allocation_intents/{id}',
2222
}),
23+
list: stripeMethod({
24+
method: 'GET',
25+
fullPath: '/v2/payments/settlement_allocation_intents',
26+
methodType: 'list',
27+
}),
2328
cancel: stripeMethod({
2429
method: 'POST',
2530
fullPath: '/v2/payments/settlement_allocation_intents/{id}/cancel',

src/resources/V2/Payments/SettlementAllocationIntents/Splits.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,12 @@ export const Splits = StripeResource.extend({
1313
fullPath:
1414
'/v2/payments/settlement_allocation_intents/{settlement_allocation_intent_id}/splits/{id}',
1515
}),
16+
list: stripeMethod({
17+
method: 'GET',
18+
fullPath:
19+
'/v2/payments/settlement_allocation_intents/{settlement_allocation_intent_id}/splits',
20+
methodType: 'list',
21+
}),
1622
cancel: stripeMethod({
1723
method: 'POST',
1824
fullPath:

test/resources/generated_examples_test.spec.js

Lines changed: 86 additions & 20 deletions
Large diffs are not rendered by default.

types/V2/Billing/IntentActions.d.ts

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,11 @@ declare module 'stripe' {
120120
}
121121

122122
interface Deactivate {
123+
/**
124+
* Details about why the cancellation was requested by the user.
125+
*/
126+
cancellation_details?: Deactivate.CancellationDetails;
127+
123128
/**
124129
* Allows users to override the collect at behavior.
125130
*/
@@ -142,6 +147,30 @@ declare module 'stripe' {
142147
}
143148

144149
namespace Deactivate {
150+
interface CancellationDetails {
151+
/**
152+
* Additional comments about why the user canceled the subscription, if the subscription was canceled explicitly by the user.
153+
*/
154+
comment?: string;
155+
156+
/**
157+
* The customer submitted reason for why they canceled, if the subscription was canceled explicitly by the user.
158+
*/
159+
feedback?: CancellationDetails.Feedback;
160+
}
161+
162+
namespace CancellationDetails {
163+
type Feedback =
164+
| 'customer_service'
165+
| 'low_quality'
166+
| 'missing_features'
167+
| 'other'
168+
| 'switched_service'
169+
| 'too_complex'
170+
| 'too_expensive'
171+
| 'unused';
172+
}
173+
145174
type CollectAt = 'next_billing_date' | 'on_effective_at';
146175

147176
interface EffectiveAt {

types/V2/Billing/Intents.d.ts

Lines changed: 276 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,11 @@ declare module 'stripe' {
2828
*/
2929
cadence?: string;
3030

31+
/**
32+
* Data for creating a new Cadence.
33+
*/
34+
cadence_data?: Intent.CadenceData;
35+
3136
/**
3237
* Time at which the object was created.
3338
*/
@@ -87,6 +92,277 @@ declare module 'stripe' {
8792
total: string;
8893
}
8994

95+
interface CadenceData {
96+
/**
97+
* The billing cycle configuration for this Cadence.
98+
*/
99+
billing_cycle: CadenceData.BillingCycle;
100+
101+
/**
102+
* Information about the payer for this Cadence.
103+
*/
104+
payer: CadenceData.Payer;
105+
106+
/**
107+
* Settings for creating the Cadence.
108+
*/
109+
settings?: CadenceData.Settings;
110+
}
111+
112+
namespace CadenceData {
113+
interface BillingCycle {
114+
/**
115+
* The number of intervals (specified in the interval attribute) between cadence billings. For example, type=month and interval_count=3 bills every 3 months.
116+
*/
117+
interval_count: number;
118+
119+
/**
120+
* The frequency at which a cadence bills.
121+
*/
122+
type: BillingCycle.Type;
123+
124+
/**
125+
* Specific configuration for determining billing dates when type=day.
126+
*/
127+
day?: BillingCycle.Day;
128+
129+
/**
130+
* Specific configuration for determining billing dates when type=month.
131+
*/
132+
month?: BillingCycle.Month;
133+
134+
/**
135+
* Specific configuration for determining billing dates when type=week.
136+
*/
137+
week?: BillingCycle.Week;
138+
139+
/**
140+
* Specific configuration for determining billing dates when type=year.
141+
*/
142+
year?: BillingCycle.Year;
143+
}
144+
145+
namespace BillingCycle {
146+
interface Day {
147+
/**
148+
* The time at which the billing cycle ends.
149+
*/
150+
time: Day.Time;
151+
}
152+
153+
namespace Day {
154+
interface Time {
155+
/**
156+
* The hour at which the billing cycle ends.
157+
* This must be an integer between 0 and 23, inclusive.
158+
* 0 represents midnight, and 23 represents 11 PM.
159+
*/
160+
hour: number;
161+
162+
/**
163+
* The minute at which the billing cycle ends.
164+
* Must be an integer between 0 and 59, inclusive.
165+
*/
166+
minute: number;
167+
168+
/**
169+
* The second at which the billing cycle ends.
170+
* Must be an integer between 0 and 59, inclusive.
171+
*/
172+
second?: number;
173+
}
174+
}
175+
176+
interface Month {
177+
/**
178+
* The day to anchor the billing on for a type="month" billing cycle from 1-31.
179+
* If this number is greater than the number of days in the month being billed,
180+
* this will anchor to the last day of the month.
181+
*/
182+
day_of_month: number;
183+
184+
/**
185+
* The month to anchor the billing on for a type="month" billing cycle from
186+
* 1-12. Occurrences are calculated from the month anchor.
187+
*/
188+
month_of_year?: number;
189+
190+
/**
191+
* The time at which the billing cycle ends.
192+
*/
193+
time: Month.Time;
194+
}
195+
196+
namespace Month {
197+
interface Time {
198+
/**
199+
* The hour at which the billing cycle ends.
200+
* This must be an integer between 0 and 23, inclusive.
201+
* 0 represents midnight, and 23 represents 11 PM.
202+
*/
203+
hour: number;
204+
205+
/**
206+
* The minute at which the billing cycle ends.
207+
* Must be an integer between 0 and 59, inclusive.
208+
*/
209+
minute: number;
210+
211+
/**
212+
* The second at which the billing cycle ends.
213+
* Must be an integer between 0 and 59, inclusive.
214+
*/
215+
second?: number;
216+
}
217+
}
218+
219+
type Type = 'day' | 'month' | 'week' | 'year';
220+
221+
interface Week {
222+
/**
223+
* The day of the week to bill the type=week billing cycle on.
224+
* Numbered from 1-7 for Monday to Sunday respectively, based on the ISO-8601 week day numbering.
225+
*/
226+
day_of_week: number;
227+
228+
/**
229+
* The time at which the billing cycle ends.
230+
*/
231+
time: Week.Time;
232+
}
233+
234+
namespace Week {
235+
interface Time {
236+
/**
237+
* The hour at which the billing cycle ends.
238+
* This must be an integer between 0 and 23, inclusive.
239+
* 0 represents midnight, and 23 represents 11 PM.
240+
*/
241+
hour: number;
242+
243+
/**
244+
* The minute at which the billing cycle ends.
245+
* Must be an integer between 0 and 59, inclusive.
246+
*/
247+
minute: number;
248+
249+
/**
250+
* The second at which the billing cycle ends.
251+
* Must be an integer between 0 and 59, inclusive.
252+
*/
253+
second?: number;
254+
}
255+
}
256+
257+
interface Year {
258+
/**
259+
* The day to anchor the billing on for a type="month" billing cycle from 1-31.
260+
* If this number is greater than the number of days in the month being billed,
261+
* this will anchor to the last day of the month.
262+
*/
263+
day_of_month: number;
264+
265+
/**
266+
* The month to bill on from 1-12. If not provided, this will default to the month the cadence was created.
267+
*/
268+
month_of_year: number;
269+
270+
/**
271+
* The time at which the billing cycle ends.
272+
*/
273+
time: Year.Time;
274+
}
275+
276+
namespace Year {
277+
interface Time {
278+
/**
279+
* The hour at which the billing cycle ends.
280+
* This must be an integer between 0 and 23, inclusive.
281+
* 0 represents midnight, and 23 represents 11 PM.
282+
*/
283+
hour: number;
284+
285+
/**
286+
* The minute at which the billing cycle ends.
287+
* Must be an integer between 0 and 59, inclusive.
288+
*/
289+
minute: number;
290+
291+
/**
292+
* The second at which the billing cycle ends.
293+
* Must be an integer between 0 and 59, inclusive.
294+
*/
295+
second?: number;
296+
}
297+
}
298+
}
299+
300+
interface Payer {
301+
/**
302+
* The ID of the Billing Profile object which determines how a bill will be paid.
303+
*/
304+
billing_profile?: string;
305+
306+
/**
307+
* Data for creating a new profile.
308+
*/
309+
billing_profile_data?: Payer.BillingProfileData;
310+
}
311+
312+
namespace Payer {
313+
interface BillingProfileData {
314+
/**
315+
* The customer to associate with the profile.
316+
*/
317+
customer: string;
318+
319+
/**
320+
* The default payment method to use when billing this profile.
321+
* If none is provided, the customer `default_payment_method` will be used.
322+
*/
323+
default_payment_method?: string;
324+
}
325+
}
326+
327+
interface Settings {
328+
/**
329+
* Settings that configure bills generation, which includes calculating totals, tax, and presenting invoices.
330+
*/
331+
bill?: Settings.Bill;
332+
333+
/**
334+
* Settings that configure and manage the behavior of collecting payments.
335+
*/
336+
collection?: Settings.Collection;
337+
}
338+
339+
namespace Settings {
340+
interface Bill {
341+
/**
342+
* The ID of the referenced settings object.
343+
*/
344+
id: string;
345+
346+
/**
347+
* Returns the Settings Version when the cadence is pinned to a specific version.
348+
*/
349+
version?: string;
350+
}
351+
352+
interface Collection {
353+
/**
354+
* The ID of the referenced settings object.
355+
*/
356+
id: string;
357+
358+
/**
359+
* Returns the Settings Version when the cadence is pinned to a specific version.
360+
*/
361+
version?: string;
362+
}
363+
}
364+
}
365+
90366
type Status = 'canceled' | 'committed' | 'draft' | 'reserved';
91367

92368
interface StatusTransitions {

0 commit comments

Comments
 (0)