Skip to content

Commit

Permalink
Merge pull request #1338 from stripe/latest-codegen
Browse files Browse the repository at this point in the history
API Updates
  • Loading branch information
yejia-stripe committed Jan 25, 2022
2 parents 3172800 + d7be277 commit 8b1d176
Show file tree
Hide file tree
Showing 9 changed files with 59 additions and 25 deletions.
2 changes: 1 addition & 1 deletion types/2020-08-27/Accounts.d.ts
Expand Up @@ -3210,7 +3210,7 @@ declare module 'stripe' {
/**
* With [Connect](https://stripe.com/docs/connect), you can delete accounts you manage.
*
* Accounts created using test-mode keys can be deleted at any time. Custom or Express accounts created using live-mode keys can only be deleted once all balances are zero.
* Accounts created using test-mode keys can be deleted at any time. Standard accounts created using live-mode keys cannot be deleted. Custom or Express accounts created using live-mode keys can only be deleted once all balances are zero.
*
* If you want to delete your own account, use the [account information tab in your account settings](https://dashboard.stripe.com/account) instead.
*/
Expand Down
5 changes: 3 additions & 2 deletions types/2020-08-27/Checkout/Sessions.d.ts
Expand Up @@ -138,7 +138,7 @@ declare module 'stripe' {
/**
* The ID of the Payment Link that created this Session.
*/
payment_link?: string | Stripe.PaymentLink | null;
payment_link: string | Stripe.PaymentLink | null;

/**
* Payment-method-specific configuration for the PaymentIntent or SetupIntent of this CheckoutSession.
Expand Down Expand Up @@ -329,7 +329,7 @@ declare module 'stripe' {

interface TaxId {
/**
* The type of the tax ID, one of `eu_vat`, `br_cnpj`, `br_cpf`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `li_uid`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, or `unknown`
* The type of the tax ID, one of `eu_vat`, `br_cnpj`, `br_cpf`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `li_uid`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, or `unknown`
*/
type: TaxId.Type;

Expand Down Expand Up @@ -362,6 +362,7 @@ declare module 'stripe' {
| 'id_npwp'
| 'il_vat'
| 'in_gst'
| 'is_vat'
| 'jp_cn'
| 'jp_rn'
| 'kr_brn'
Expand Down
3 changes: 2 additions & 1 deletion types/2020-08-27/Customers.d.ts
Expand Up @@ -420,7 +420,7 @@ declare module 'stripe' {

interface TaxIdDatum {
/**
* Type of the tax ID, one of `ae_trn`, `au_abn`, `au_arn`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_vat`, `cl_tin`, `es_cif`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `id_npwp`, `il_vat`, `in_gst`, `jp_cn`, `jp_rn`, `kr_brn`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `no_vat`, `nz_gst`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `th_vat`, `tw_vat`, `ua_vat`, `us_ein`, or `za_vat`
* Type of the tax ID, one of `ae_trn`, `au_abn`, `au_arn`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_vat`, `cl_tin`, `es_cif`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `kr_brn`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `no_vat`, `nz_gst`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `th_vat`, `tw_vat`, `ua_vat`, `us_ein`, or `za_vat`
*/
type: TaxIdDatum.Type;

Expand Down Expand Up @@ -453,6 +453,7 @@ declare module 'stripe' {
| 'id_npwp'
| 'il_vat'
| 'in_gst'
| 'is_vat'
| 'jp_cn'
| 'jp_rn'
| 'kr_brn'
Expand Down
3 changes: 2 additions & 1 deletion types/2020-08-27/InvoiceLineItems.d.ts
Expand Up @@ -347,7 +347,7 @@ declare module 'stripe' {

interface TaxId {
/**
* Type of the tax ID, one of `ae_trn`, `au_abn`, `au_arn`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_vat`, `cl_tin`, `es_cif`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `id_npwp`, `il_vat`, `in_gst`, `jp_cn`, `jp_rn`, `kr_brn`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `no_vat`, `nz_gst`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `th_vat`, `tw_vat`, `ua_vat`, `us_ein`, or `za_vat`
* Type of the tax ID, one of `ae_trn`, `au_abn`, `au_arn`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_vat`, `cl_tin`, `es_cif`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `kr_brn`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `no_vat`, `nz_gst`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `th_vat`, `tw_vat`, `ua_vat`, `us_ein`, or `za_vat`
*/
type: TaxId.Type;

Expand Down Expand Up @@ -380,6 +380,7 @@ declare module 'stripe' {
| 'id_npwp'
| 'il_vat'
| 'in_gst'
| 'is_vat'
| 'jp_cn'
| 'jp_rn'
| 'kr_brn'
Expand Down
6 changes: 4 additions & 2 deletions types/2020-08-27/Invoices.d.ts
Expand Up @@ -404,7 +404,7 @@ declare module 'stripe' {

interface CustomerTaxId {
/**
* The type of the tax ID, one of `eu_vat`, `br_cnpj`, `br_cpf`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `li_uid`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, or `unknown`
* The type of the tax ID, one of `eu_vat`, `br_cnpj`, `br_cpf`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `li_uid`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, or `unknown`
*/
type: CustomerTaxId.Type;

Expand Down Expand Up @@ -437,6 +437,7 @@ declare module 'stripe' {
| 'id_npwp'
| 'il_vat'
| 'in_gst'
| 'is_vat'
| 'jp_cn'
| 'jp_rn'
| 'kr_brn'
Expand Down Expand Up @@ -1583,7 +1584,7 @@ declare module 'stripe' {

interface TaxId {
/**
* Type of the tax ID, one of `ae_trn`, `au_abn`, `au_arn`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_vat`, `cl_tin`, `es_cif`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `id_npwp`, `il_vat`, `in_gst`, `jp_cn`, `jp_rn`, `kr_brn`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `no_vat`, `nz_gst`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `th_vat`, `tw_vat`, `ua_vat`, `us_ein`, or `za_vat`
* Type of the tax ID, one of `ae_trn`, `au_abn`, `au_arn`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_vat`, `cl_tin`, `es_cif`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `kr_brn`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `no_vat`, `nz_gst`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `th_vat`, `tw_vat`, `ua_vat`, `us_ein`, or `za_vat`
*/
type: TaxId.Type;

Expand Down Expand Up @@ -1616,6 +1617,7 @@ declare module 'stripe' {
| 'id_npwp'
| 'il_vat'
| 'in_gst'
| 'is_vat'
| 'jp_cn'
| 'jp_rn'
| 'kr_brn'
Expand Down
4 changes: 2 additions & 2 deletions types/2020-08-27/PaymentIntents.d.ts
Expand Up @@ -464,12 +464,12 @@ declare module 'stripe' {
image_data_url: string;

/**
* The image_url_png string used to render QR code, can be used as <img src="…" />
* The image_url_png string used to render QR code
*/
image_url_png: string;

/**
* The image_url_svg string used to render QR code, can be used as <img src="…" />
* The image_url_svg string used to render QR code
*/
image_url_svg: string;
}
Expand Down
51 changes: 37 additions & 14 deletions types/2020-08-27/PaymentLinks.d.ts
Expand Up @@ -17,7 +17,7 @@ declare module 'stripe' {
object: 'payment_link';

/**
* Whether the payment link's `url` is active. If `false`, customers visiting the url will be redirected.
* Whether the payment link's `url` is active. If `false`, customers visiting the URL will be shown a page saying that the link has been deactivated.
*/
active: boolean;

Expand Down Expand Up @@ -66,10 +66,12 @@ declare module 'stripe' {
on_behalf_of: string | Stripe.Account | null;

/**
* The list of payment method types that customers can use. When `null`, your [payment methods settings](https://dashboard.stripe.com/settings/payment_methods) will be used.
* The list of payment method types that customers can use. When `null`, Stripe will dynamically show relevant payment methods you've enabled in your [payment method settings](https://dashboard.stripe.com/settings/payment_methods).
*/
payment_method_types: Array<'card'> | null;

phone_number_collection: PaymentLink.PhoneNumberCollection;

/**
* Configuration for collecting the customer's shipping address.
*/
Expand All @@ -86,7 +88,7 @@ declare module 'stripe' {
transfer_data: PaymentLink.TransferData | null;

/**
* The public url that can be shared with customers.
* The public URL that can be shared with customers.
*/
url: string;
}
Expand All @@ -113,7 +115,7 @@ declare module 'stripe' {

interface Redirect {
/**
* The `url` the customer will be redirected to after the purchase is complete.
* The URL the customer will be redirected to after the purchase is complete.
*/
url: string;
}
Expand All @@ -130,6 +132,13 @@ declare module 'stripe' {

type BillingAddressCollection = 'auto' | 'required';

interface PhoneNumberCollection {
/**
* If `true`, a phone number will be collected during checkout.
*/
enabled: boolean;
}

interface ShippingAddressCollection {
/**
* An array of two-letter ISO country codes representing which countries Checkout should provide as options for shipping locations. Unsupported country codes: `AS, CX, CC, CU, HM, IR, KP, MH, FM, NF, MP, PW, SD, SY, UM, VI`.
Expand Down Expand Up @@ -380,7 +389,7 @@ declare module 'stripe' {

interface SubscriptionData {
/**
* When creating a subscription, the specified configuration data will be used. There must be at least one line item with a recurring price to use `subscription_data`.
* Integer representing the number of trial period days before the customer is charged for the first time.
*/
trial_period_days: number | null;
}
Expand Down Expand Up @@ -440,7 +449,7 @@ declare module 'stripe' {
line_items?: Array<PaymentLinkCreateParams.LineItem>;

/**
* Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. Metadata associated with this Payment Link will automatically be copied to Checkout Sessions created by this Payment Link.
* Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. Metadata associated with this Payment Link will automatically be copied to [checkout sessions](https://stripe.com/docs/api/checkout/sessions) created by this payment link.
*/
metadata?: Stripe.MetadataParam;

Expand All @@ -450,10 +459,17 @@ declare module 'stripe' {
on_behalf_of?: string;

/**
* The list of payment method types (e.g., card) that customers can use. Only `card` is supported. If no value is passed, your [payment methods settings](https://dashboard.stripe.com/settings/payment_methods) will be used.
* The list of payment method types that customers can use. Only `card` is supported. If no value is passed, Stripe will dynamically show relevant payment methods from your [payment method settings](https://dashboard.stripe.com/settings/payment_methods) (20+ payment methods [supported](https://stripe.com/docs/payments/payment-methods/integration-options#payment-method-product-support)).
*/
payment_method_types?: Array<'card'>;

/**
* Controls phone number collection settings during checkout.
*
* We recommend that you review your privacy policy and check with your legal contacts.
*/
phone_number_collection?: PaymentLinkCreateParams.PhoneNumberCollection;

/**
* Configuration for collecting the customer's shipping address.
*/
Expand Down Expand Up @@ -527,7 +543,7 @@ declare module 'stripe' {
price: string;

/**
* The quantity of the line item being purchased. Only `1` is supported.
* The quantity of the line item being purchased.
*/
quantity: number;
}
Expand All @@ -545,12 +561,19 @@ declare module 'stripe' {
maximum?: number;

/**
* The minimum quantity the customer can purchase. By default this value is 0. You can specify a value up to 98.
* The minimum quantity the customer can purchase. By default this value is 0. You can specify a value up to 98. If there is only one item in the cart then that item's quantity cannot go down to 0.
*/
minimum?: number;
}
}

interface PhoneNumberCollection {
/**
* Set to `true` to enable phone number collection.
*/
enabled: boolean;
}

interface ShippingAddressCollection {
/**
* An array of two-letter ISO country codes representing which countries Checkout should provide as options for
Expand Down Expand Up @@ -832,7 +855,7 @@ declare module 'stripe' {

interface PaymentLinkUpdateParams {
/**
* Whether the payment link's `url` is active. If `false`, customers visiting the url will be redirected.
* Whether the payment link's `url` is active. If `false`, customers visiting the URL will be shown a page saying that the link has been deactivated.
*/
active?: boolean;

Expand Down Expand Up @@ -867,12 +890,12 @@ declare module 'stripe' {
line_items?: Array<PaymentLinkUpdateParams.LineItem>;

/**
* Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. Metadata associated with this Payment Link will automatically be copied to Checkout Sessions created by this Payment Link.
* Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. Metadata associated with this Payment Link will automatically be copied to [checkout sessions](https://stripe.com/docs/api/checkout/sessions) created by this payment link.
*/
metadata?: Stripe.MetadataParam;

/**
* The list of payment method types (e.g., card) that customers can use. Only `card` is supported. Pass an empty string to enable automatic payment methods that use your [payment methods settings](https://dashboard.stripe.com/settings/payment_methods).
* The list of payment method types that customers can use. Only `card` is supported. Pass an empty string to enable automatic payment methods that use your [payment method settings](https://dashboard.stripe.com/settings/payment_methods).
*/
payment_method_types?: Stripe.Emptyable<Array<'card'>>;

Expand Down Expand Up @@ -941,7 +964,7 @@ declare module 'stripe' {
id: string;

/**
* The quantity of the line item being purchased. Only `1` is supported.
* The quantity of the line item being purchased.
*/
quantity?: number;
}
Expand All @@ -959,7 +982,7 @@ declare module 'stripe' {
maximum?: number;

/**
* The minimum quantity the customer can purchase. By default this value is 0. You can specify a value up to 98.
* The minimum quantity the customer can purchase. By default this value is 0. You can specify a value up to 98. If there is only one item in the cart then that item's quantity cannot go down to 0.
*/
minimum?: number;
}
Expand Down
6 changes: 4 additions & 2 deletions types/2020-08-27/TaxIds.d.ts
Expand Up @@ -39,7 +39,7 @@ declare module 'stripe' {
livemode: boolean;

/**
* Type of the tax ID, one of `ae_trn`, `au_abn`, `au_arn`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_vat`, `cl_tin`, `es_cif`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `id_npwp`, `il_vat`, `in_gst`, `jp_cn`, `jp_rn`, `kr_brn`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `no_vat`, `nz_gst`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `th_vat`, `tw_vat`, `ua_vat`, `us_ein`, or `za_vat`. Note that some legacy tax IDs have type `unknown`
* Type of the tax ID, one of `ae_trn`, `au_abn`, `au_arn`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_vat`, `cl_tin`, `es_cif`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `kr_brn`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `no_vat`, `nz_gst`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `th_vat`, `tw_vat`, `ua_vat`, `us_ein`, or `za_vat`. Note that some legacy tax IDs have type `unknown`
*/
type: TaxId.Type;

Expand Down Expand Up @@ -77,6 +77,7 @@ declare module 'stripe' {
| 'id_npwp'
| 'il_vat'
| 'in_gst'
| 'is_vat'
| 'jp_cn'
| 'jp_rn'
| 'kr_brn'
Expand Down Expand Up @@ -143,7 +144,7 @@ declare module 'stripe' {

interface TaxIdCreateParams {
/**
* Type of the tax ID, one of `ae_trn`, `au_abn`, `au_arn`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_vat`, `cl_tin`, `es_cif`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `id_npwp`, `il_vat`, `in_gst`, `jp_cn`, `jp_rn`, `kr_brn`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `no_vat`, `nz_gst`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `th_vat`, `tw_vat`, `ua_vat`, `us_ein`, or `za_vat`
* Type of the tax ID, one of `ae_trn`, `au_abn`, `au_arn`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_vat`, `cl_tin`, `es_cif`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `kr_brn`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `no_vat`, `nz_gst`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `th_vat`, `tw_vat`, `ua_vat`, `us_ein`, or `za_vat`
*/
type: TaxIdCreateParams.Type;

Expand Down Expand Up @@ -181,6 +182,7 @@ declare module 'stripe' {
| 'id_npwp'
| 'il_vat'
| 'in_gst'
| 'is_vat'
| 'jp_cn'
| 'jp_rn'
| 'kr_brn'
Expand Down

0 comments on commit 8b1d176

Please sign in to comment.