Skip to content

Commit

Permalink
Merge pull request #1632 from stripe/latest-codegen-master
Browse files Browse the repository at this point in the history
API Updates
  • Loading branch information
richardm-stripe committed Dec 6, 2022
2 parents 0f6fa9e + 1309e79 commit 1267069
Show file tree
Hide file tree
Showing 3 changed files with 134 additions and 1 deletion.
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
@@ -1 +1 @@
v211
v212
65 changes: 65 additions & 0 deletions types/BillingPortal/Sessions.d.ts
Expand Up @@ -45,6 +45,11 @@ declare module 'stripe' {
*/
customer: string;

/**
* Information about a specific flow for the customer to go through.
*/
flow: Session.Flow | null;

/**
* Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
*/
Expand Down Expand Up @@ -72,6 +77,66 @@ declare module 'stripe' {
}

namespace Session {
interface Flow {
after_completion: Flow.AfterCompletion;

/**
* Configuration when `flow.type=subscription_cancel`.
*/
subscription_cancel: Flow.SubscriptionCancel | null;

/**
* Type of flow that the customer will go through.
*/
type: Flow.Type;
}

namespace Flow {
interface AfterCompletion {
/**
* Configuration when `after_completion.type=hosted_confirmation`.
*/
hosted_confirmation: AfterCompletion.HostedConfirmation | null;

/**
* Configuration when `after_completion.type=redirect`.
*/
redirect: AfterCompletion.Redirect | null;

/**
* The specified type of behavior after the flow is completed.
*/
type: AfterCompletion.Type;
}

namespace AfterCompletion {
interface HostedConfirmation {
/**
* A custom message to display to the customer after the flow is completed.
*/
custom_message: string | null;
}

interface Redirect {
/**
* The URL the customer will be redirected to after the flow is completed.
*/
return_url: string;
}

type Type = 'hosted_confirmation' | 'portal_homepage' | 'redirect';
}

interface SubscriptionCancel {
/**
* The ID of the subscription to be canceled.
*/
subscription: string;
}

type Type = 'payment_method_update' | 'subscription_cancel';
}

type Locale =
| 'auto'
| 'bg'
Expand Down
68 changes: 68 additions & 0 deletions types/BillingPortal/SessionsResource.d.ts
Expand Up @@ -19,6 +19,11 @@ declare module 'stripe' {
*/
expand?: Array<string>;

/**
* Information about a specific flow for the customer to go through.
*/
flow_data?: SessionCreateParams.FlowData;

/**
* 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.
*/
Expand All @@ -36,6 +41,69 @@ declare module 'stripe' {
}

namespace SessionCreateParams {
interface FlowData {
/**
* Behavior after the flow is completed.
*/
after_completion?: FlowData.AfterCompletion;

/**
* Configuration when `flow_data.type=subscription_cancel`.
*/
subscription_cancel?: FlowData.SubscriptionCancel;

/**
* Type of flow that the customer will go through.
*/
type: FlowData.Type;
}

namespace FlowData {
interface AfterCompletion {
/**
* Configuration when `after_completion.type=hosted_confirmation`.
*/
hosted_confirmation?: AfterCompletion.HostedConfirmation;

/**
* Configuration when `after_completion.type=redirect`.
*/
redirect?: AfterCompletion.Redirect;

/**
* The specified behavior after the flow is completed.
*/
type: AfterCompletion.Type;
}

namespace AfterCompletion {
interface HostedConfirmation {
/**
* A custom message to display to the customer after the flow is completed.
*/
custom_message?: string;
}

interface Redirect {
/**
* The URL the customer will be redirected to after the flow is completed.
*/
return_url: string;
}

type Type = 'hosted_confirmation' | 'portal_homepage' | 'redirect';
}

interface SubscriptionCancel {
/**
* The ID of the subscription to be canceled.
*/
subscription: string;
}

type Type = 'payment_method_update' | 'subscription_cancel';
}

type Locale =
| 'auto'
| 'bg'
Expand Down

0 comments on commit 1267069

Please sign in to comment.