Skip to content

Commit 1267069

Browse files
Merge pull request #1632 from stripe/latest-codegen-master
API Updates
2 parents 0f6fa9e + 1309e79 commit 1267069

3 files changed

Lines changed: 134 additions & 1 deletion

File tree

OPENAPI_VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v211
1+
v212

types/BillingPortal/Sessions.d.ts

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,11 @@ declare module 'stripe' {
4545
*/
4646
customer: string;
4747

48+
/**
49+
* Information about a specific flow for the customer to go through.
50+
*/
51+
flow: Session.Flow | null;
52+
4853
/**
4954
* Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
5055
*/
@@ -72,6 +77,66 @@ declare module 'stripe' {
7277
}
7378

7479
namespace Session {
80+
interface Flow {
81+
after_completion: Flow.AfterCompletion;
82+
83+
/**
84+
* Configuration when `flow.type=subscription_cancel`.
85+
*/
86+
subscription_cancel: Flow.SubscriptionCancel | null;
87+
88+
/**
89+
* Type of flow that the customer will go through.
90+
*/
91+
type: Flow.Type;
92+
}
93+
94+
namespace Flow {
95+
interface AfterCompletion {
96+
/**
97+
* Configuration when `after_completion.type=hosted_confirmation`.
98+
*/
99+
hosted_confirmation: AfterCompletion.HostedConfirmation | null;
100+
101+
/**
102+
* Configuration when `after_completion.type=redirect`.
103+
*/
104+
redirect: AfterCompletion.Redirect | null;
105+
106+
/**
107+
* The specified type of behavior after the flow is completed.
108+
*/
109+
type: AfterCompletion.Type;
110+
}
111+
112+
namespace AfterCompletion {
113+
interface HostedConfirmation {
114+
/**
115+
* A custom message to display to the customer after the flow is completed.
116+
*/
117+
custom_message: string | null;
118+
}
119+
120+
interface Redirect {
121+
/**
122+
* The URL the customer will be redirected to after the flow is completed.
123+
*/
124+
return_url: string;
125+
}
126+
127+
type Type = 'hosted_confirmation' | 'portal_homepage' | 'redirect';
128+
}
129+
130+
interface SubscriptionCancel {
131+
/**
132+
* The ID of the subscription to be canceled.
133+
*/
134+
subscription: string;
135+
}
136+
137+
type Type = 'payment_method_update' | 'subscription_cancel';
138+
}
139+
75140
type Locale =
76141
| 'auto'
77142
| 'bg'

types/BillingPortal/SessionsResource.d.ts

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,11 @@ declare module 'stripe' {
1919
*/
2020
expand?: Array<string>;
2121

22+
/**
23+
* Information about a specific flow for the customer to go through.
24+
*/
25+
flow_data?: SessionCreateParams.FlowData;
26+
2227
/**
2328
* The IETF language tag of the locale Customer Portal is displayed in. If blank or auto, the customer's `preferred_locales` or browser's locale is used.
2429
*/
@@ -36,6 +41,69 @@ declare module 'stripe' {
3641
}
3742

3843
namespace SessionCreateParams {
44+
interface FlowData {
45+
/**
46+
* Behavior after the flow is completed.
47+
*/
48+
after_completion?: FlowData.AfterCompletion;
49+
50+
/**
51+
* Configuration when `flow_data.type=subscription_cancel`.
52+
*/
53+
subscription_cancel?: FlowData.SubscriptionCancel;
54+
55+
/**
56+
* Type of flow that the customer will go through.
57+
*/
58+
type: FlowData.Type;
59+
}
60+
61+
namespace FlowData {
62+
interface AfterCompletion {
63+
/**
64+
* Configuration when `after_completion.type=hosted_confirmation`.
65+
*/
66+
hosted_confirmation?: AfterCompletion.HostedConfirmation;
67+
68+
/**
69+
* Configuration when `after_completion.type=redirect`.
70+
*/
71+
redirect?: AfterCompletion.Redirect;
72+
73+
/**
74+
* The specified behavior after the flow is completed.
75+
*/
76+
type: AfterCompletion.Type;
77+
}
78+
79+
namespace AfterCompletion {
80+
interface HostedConfirmation {
81+
/**
82+
* A custom message to display to the customer after the flow is completed.
83+
*/
84+
custom_message?: string;
85+
}
86+
87+
interface Redirect {
88+
/**
89+
* The URL the customer will be redirected to after the flow is completed.
90+
*/
91+
return_url: string;
92+
}
93+
94+
type Type = 'hosted_confirmation' | 'portal_homepage' | 'redirect';
95+
}
96+
97+
interface SubscriptionCancel {
98+
/**
99+
* The ID of the subscription to be canceled.
100+
*/
101+
subscription: string;
102+
}
103+
104+
type Type = 'payment_method_update' | 'subscription_cancel';
105+
}
106+
39107
type Locale =
40108
| 'auto'
41109
| 'bg'

0 commit comments

Comments
 (0)