Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API Updates #1215

Merged
merged 1 commit into from
Aug 11, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
112 changes: 112 additions & 0 deletions types/2020-08-27/BillingPortal/Sessions.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,11 @@ declare module 'stripe' {
*/
livemode: boolean;

/**
* 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.
*/
locale: Session.Locale | null;

/**
* The account for which the session was created on behalf of. When specified, only subscriptions and invoices with this `on_behalf_of` account appear in the portal. For more information, see the [docs](https://stripe.com/docs/connect/charges-transfers#on-behalf-of). Use the [Accounts API](https://stripe.com/docs/api/accounts/object#account_object-settings-branding) to modify the `on_behalf_of` account's branding settings, which the portal displays.
*/
Expand All @@ -53,6 +58,57 @@ declare module 'stripe' {
url: string;
}

namespace Session {
type Locale =
| 'auto'
| 'bg'
| 'cs'
| 'da'
| 'de'
| 'el'
| 'en'
| 'en-AU'
| 'en-CA'
| 'en-GB'
| 'en-IE'
| 'en-IN'
| 'en-NZ'
| 'en-SG'
| 'es'
| 'es-419'
| 'et'
| 'fi'
| 'fil'
| 'fr'
| 'fr-CA'
| 'hr'
| 'hu'
| 'id'
| 'it'
| 'ja'
| 'ko'
| 'lt'
| 'lv'
| 'ms'
| 'mt'
| 'nb'
| 'nl'
| 'pl'
| 'pt'
| 'pt-BR'
| 'ro'
| 'ru'
| 'sk'
| 'sl'
| 'sv'
| 'th'
| 'tr'
| 'vi'
| 'zh'
| 'zh-HK'
| 'zh-TW';
}

interface SessionCreateParams {
/**
* The ID of an existing customer.
Expand All @@ -69,6 +125,11 @@ declare module 'stripe' {
*/
expand?: Array<string>;

/**
* 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.
*/
locale?: SessionCreateParams.Locale;

/**
* The `on_behalf_of` account to use for this session. When specified, only subscriptions and invoices with this `on_behalf_of` account appear in the portal. For more information, see the [docs](https://stripe.com/docs/connect/charges-transfers#on-behalf-of). Use the [Accounts API](https://stripe.com/docs/api/accounts/object#account_object-settings-branding) to modify the `on_behalf_of` account's branding settings, which the portal displays.
*/
Expand All @@ -80,6 +141,57 @@ declare module 'stripe' {
return_url?: string;
}

namespace SessionCreateParams {
type Locale =
| 'auto'
| 'bg'
| 'cs'
| 'da'
| 'de'
| 'el'
| 'en'
| 'en-AU'
| 'en-CA'
| 'en-GB'
| 'en-IE'
| 'en-IN'
| 'en-NZ'
| 'en-SG'
| 'es'
| 'es-419'
| 'et'
| 'fi'
| 'fil'
| 'fr'
| 'fr-CA'
| 'hr'
| 'hu'
| 'id'
| 'it'
| 'ja'
| 'ko'
| 'lt'
| 'lv'
| 'ms'
| 'mt'
| 'nb'
| 'nl'
| 'pl'
| 'pt'
| 'pt-BR'
| 'ro'
| 'ru'
| 'sk'
| 'sl'
| 'sv'
| 'th'
| 'tr'
| 'vi'
| 'zh'
| 'zh-HK'
| 'zh-TW';
}

class SessionsResource {
/**
* Creates a session of the customer portal.
Expand Down
2 changes: 1 addition & 1 deletion types/2020-08-27/Invoices.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ declare module 'stripe' {
/**
* Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay this invoice using the default source attached to the customer. When sending an invoice, Stripe will email this invoice to the customer with payment instructions.
*/
collection_method: Invoice.CollectionMethod | null;
collection_method: Invoice.CollectionMethod;

/**
* Time at which the object was created. Measured in seconds since the Unix epoch.
Expand Down
2 changes: 1 addition & 1 deletion types/2020-08-27/Subscriptions.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ declare module 'stripe' {
/**
* Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay this subscription at the end of the cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions.
*/
collection_method: Subscription.CollectionMethod | null;
collection_method: Subscription.CollectionMethod;

/**
* Time at which the object was created. Measured in seconds since the Unix epoch.
Expand Down