diff --git a/types/2020-08-27/BillingPortal/Sessions.d.ts b/types/2020-08-27/BillingPortal/Sessions.d.ts index d6ebca263d..8ab93c886f 100644 --- a/types/2020-08-27/BillingPortal/Sessions.d.ts +++ b/types/2020-08-27/BillingPortal/Sessions.d.ts @@ -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. */ @@ -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. @@ -69,6 +125,11 @@ declare module 'stripe' { */ expand?: Array; + /** + * 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. */ @@ -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. diff --git a/types/2020-08-27/Invoices.d.ts b/types/2020-08-27/Invoices.d.ts index c3a2f5c911..fdc89b0dac 100644 --- a/types/2020-08-27/Invoices.d.ts +++ b/types/2020-08-27/Invoices.d.ts @@ -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. diff --git a/types/2020-08-27/Subscriptions.d.ts b/types/2020-08-27/Subscriptions.d.ts index 88d1962b15..378438cd88 100644 --- a/types/2020-08-27/Subscriptions.d.ts +++ b/types/2020-08-27/Subscriptions.d.ts @@ -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.