diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 6c06b023d9..123c71b530 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v224 \ No newline at end of file +v225 \ No newline at end of file diff --git a/test/resources/generated_examples_test.spec.js b/test/resources/generated_examples_test.spec.js index 4709c6270d..938631f2ae 100644 --- a/test/resources/generated_examples_test.spec.js +++ b/test/resources/generated_examples_test.spec.js @@ -2,7 +2,8 @@ 'use strict'; -const stripe = require('../../testUtils').getStripeMockClient(); +const testUtils = require('../../testUtils'); +const stripe = testUtils.getStripeMockClient(); const expect = require('chai').expect; describe('Accounts', function() { @@ -192,6 +193,19 @@ describe('Accounts', function() { ); expect(person).not.to.be.null; }); + + it('retrieve method', async function() { + const stripe = testUtils.createMockClient([ + { + method: 'GET', + path: '/v1/accounts/acc_123', + response: + '{"business_profile":{"mcc":"mcc","name":"name","product_description":"product_description","support_address":{"city":"city","country":"country","line1":"line1","line2":"line2","postal_code":"postal_code","state":"state"},"support_email":"support_email","support_phone":"support_phone","support_url":"support_url","url":"url"},"business_type":"government_entity","capabilities":{"acss_debit_payments":"inactive","affirm_payments":"pending","afterpay_clearpay_payments":"inactive","au_becs_debit_payments":"active","bacs_debit_payments":"active","bancontact_payments":"inactive","bank_transfer_payments":"pending","blik_payments":"inactive","boleto_payments":"inactive","card_issuing":"active","card_payments":"active","cartes_bancaires_payments":"active","cashapp_payments":"active","eps_payments":"inactive","fpx_payments":"active","giropay_payments":"active","grabpay_payments":"pending","ideal_payments":"inactive","india_international_payments":"inactive","jcb_payments":"inactive","klarna_payments":"active","konbini_payments":"active","legacy_payments":"active","link_payments":"inactive","oxxo_payments":"pending","p24_payments":"inactive","paynow_payments":"active","promptpay_payments":"active","sepa_debit_payments":"inactive","sofort_payments":"active","tax_reporting_us_1099_k":"inactive","tax_reporting_us_1099_misc":"pending","transfers":"inactive","treasury":"pending","us_bank_account_ach_payments":"pending","zip_payments":"pending"},"charges_enabled":true,"company":{"address":{"city":"city","country":"country","line1":"line1","line2":"line2","postal_code":"postal_code","state":"state"},"address_kana":{"city":"city","country":"country","line1":"line1","line2":"line2","postal_code":"postal_code","state":"state","town":"town"},"address_kanji":{"city":"city","country":"country","line1":"line1","line2":"line2","postal_code":"postal_code","state":"state","town":"town"},"directors_provided":true,"executives_provided":true,"name":"name","name_kana":"name_kana","name_kanji":"name_kanji","owners_provided":true,"ownership_declaration":{"date":"3076014","ip":"ip","user_agent":"user_agent"},"phone":"phone","structure":"sole_establishment","tax_id_provided":true,"tax_id_registrar":"tax_id_registrar","vat_id_provided":true,"verification":{"document":{"back":{"created":"1028554472","expires_at":"833811170","filename":"filename","id":"obj_123","links":null,"object":"file","purpose":"finance_report_run","size":3530753,"title":"title","type":"type","url":"url"},"details":"details","details_code":"details_code","front":{"created":"1028554472","expires_at":"833811170","filename":"filename","id":"obj_123","links":null,"object":"file","purpose":"finance_report_run","size":3530753,"title":"title","type":"type","url":"url"}}}},"controller":{"application":{"loss_liable":true,"onboarding_owner":true,"pricing_controls":true},"dashboard":{"type":"express"},"is_controller":true,"type":"account"},"country":"country","created":"1028554472","default_currency":"default_currency","details_submitted":true,"email":"email","external_accounts":null,"future_requirements":{"alternatives":[{"alternative_fields_due":["alternative_fields_due"],"original_fields_due":["original_fields_due"]}],"current_deadline":"270965154","currently_due":["currently_due"],"disabled_reason":"disabled_reason","errors":[{"code":"verification_document_failed_copy","reason":"reason","requirement":"requirement"}],"eventually_due":["eventually_due"],"past_due":["past_due"],"pending_verification":["pending_verification"]},"id":"obj_123","individual":{"account":"account","address":{"city":"city","country":"country","line1":"line1","line2":"line2","postal_code":"postal_code","state":"state"},"address_kana":{"city":"city","country":"country","line1":"line1","line2":"line2","postal_code":"postal_code","state":"state","town":"town"},"address_kanji":{"city":"city","country":"country","line1":"line1","line2":"line2","postal_code":"postal_code","state":"state","town":"town"},"created":"1028554472","dob":{"day":99228,"month":104080000,"year":3704893},"email":"email","first_name":"first_name","first_name_kana":"first_name_kana","first_name_kanji":"first_name_kanji","full_name_aliases":["full_name_aliases"],"future_requirements":{"alternatives":[{"alternative_fields_due":["alternative_fields_due"],"original_fields_due":["original_fields_due"]}],"currently_due":["currently_due"],"errors":[{"code":"verification_document_failed_copy","reason":"reason","requirement":"requirement"}],"eventually_due":["eventually_due"],"past_due":["past_due"],"pending_verification":["pending_verification"]},"gender":"gender","id":"obj_123","id_number_provided":true,"id_number_secondary_provided":true,"last_name":"last_name","last_name_kana":"last_name_kana","last_name_kanji":"last_name_kanji","maiden_name":"maiden_name","metadata":{"undefined":"metadata"},"nationality":"nationality","object":"person","phone":"phone","political_exposure":"none","registered_address":{"city":"city","country":"country","line1":"line1","line2":"line2","postal_code":"postal_code","state":"state"},"relationship":{"director":true,"executive":true,"owner":true,"percent_ownership":760989685,"representative":true,"title":"title"},"requirements":{"alternatives":[{"alternative_fields_due":["alternative_fields_due"],"original_fields_due":["original_fields_due"]}],"currently_due":["currently_due"],"errors":[{"code":"verification_document_failed_copy","reason":"reason","requirement":"requirement"}],"eventually_due":["eventually_due"],"past_due":["past_due"],"pending_verification":["pending_verification"]},"ssn_last_4_provided":true,"verification":{"additional_document":{"back":{"created":"1028554472","expires_at":"833811170","filename":"filename","id":"obj_123","links":null,"object":"file","purpose":"finance_report_run","size":3530753,"title":"title","type":"type","url":"url"},"details":"details","details_code":"details_code","front":{"created":"1028554472","expires_at":"833811170","filename":"filename","id":"obj_123","links":null,"object":"file","purpose":"finance_report_run","size":3530753,"title":"title","type":"type","url":"url"}},"details":"details","details_code":"details_code","document":{"back":{"created":"1028554472","expires_at":"833811170","filename":"filename","id":"obj_123","links":null,"object":"file","purpose":"finance_report_run","size":3530753,"title":"title","type":"type","url":"url"},"details":"details","details_code":"details_code","front":{"created":"1028554472","expires_at":"833811170","filename":"filename","id":"obj_123","links":null,"object":"file","purpose":"finance_report_run","size":3530753,"title":"title","type":"type","url":"url"}},"status":"status"}},"metadata":{"undefined":"metadata"},"object":"account","payouts_enabled":true,"requirements":{"alternatives":[{"alternative_fields_due":["alternative_fields_due"],"original_fields_due":["original_fields_due"]}],"current_deadline":"270965154","currently_due":["currently_due"],"disabled_reason":"disabled_reason","errors":[{"code":"verification_document_failed_copy","reason":"reason","requirement":"requirement"}],"eventually_due":["eventually_due"],"past_due":["past_due"],"pending_verification":["pending_verification"]},"settings":{"bacs_debit_payments":{"display_name":"display_name"},"branding":{"icon":{"created":"1028554472","expires_at":"833811170","filename":"filename","id":"obj_123","links":null,"object":"file","purpose":"finance_report_run","size":3530753,"title":"title","type":"type","url":"url"},"logo":{"created":"1028554472","expires_at":"833811170","filename":"filename","id":"obj_123","links":null,"object":"file","purpose":"finance_report_run","size":3530753,"title":"title","type":"type","url":"url"},"primary_color":"primary_color","secondary_color":"secondary_color"},"card_issuing":{"tos_acceptance":{"date":3076014,"ip":"ip","user_agent":"user_agent"}},"card_payments":{"decline_on":{"avs_failure":true,"cvc_failure":true},"statement_descriptor_prefix":"statement_descriptor_prefix","statement_descriptor_prefix_kana":"statement_descriptor_prefix_kana","statement_descriptor_prefix_kanji":"statement_descriptor_prefix_kanji"},"dashboard":{"display_name":"display_name","timezone":"timezone"},"payments":{"statement_descriptor":"statement_descriptor","statement_descriptor_kana":"statement_descriptor_kana","statement_descriptor_kanji":"statement_descriptor_kanji","statement_descriptor_prefix_kana":"statement_descriptor_prefix_kana","statement_descriptor_prefix_kanji":"statement_descriptor_prefix_kanji"},"payouts":{"debit_negative_balances":true,"schedule":{"delay_days":1647351405,"interval":"interval","monthly_anchor":1920305369,"weekly_anchor":"weekly_anchor"},"statement_descriptor":"statement_descriptor"},"sepa_debit_payments":{"creditor_id":"creditor_id"},"treasury":{"tos_acceptance":{"date":3076014,"ip":"ip","user_agent":"user_agent"}}},"tos_acceptance":{"date":"3076014","ip":"ip","service_agreement":"service_agreement","user_agent":"user_agent"},"type":"custom"}', + }, + ]); + const account = await stripe.accounts.retrieve('acc_123'); + expect(account).not.to.be.null; + }); }); describe('Apps.Secrets', function() { diff --git a/types/Checkout/Sessions.d.ts b/types/Checkout/Sessions.d.ts index acf6ca8c8e..b910c844cd 100644 --- a/types/Checkout/Sessions.d.ts +++ b/types/Checkout/Sessions.d.ts @@ -94,6 +94,11 @@ declare module 'stripe' { */ currency_conversion?: Session.CurrencyConversion | null; + /** + * Collect additional information from your customer using custom fields. Up to 2 fields are supported. + */ + custom_fields: Array; + custom_text: Session.CustomText; /** @@ -479,6 +484,96 @@ declare module 'stripe' { } } + interface CustomField { + /** + * Configuration for `type=dropdown` fields. + */ + dropdown: CustomField.Dropdown | null; + + /** + * String of your choice that your integration can use to reconcile this field. Must be unique to this field, alphanumeric, and up to 200 characters. + */ + key: string; + + label: CustomField.Label; + + /** + * Configuration for `type=numeric` fields. + */ + numeric: CustomField.Numeric | null; + + /** + * Whether the customer is required to complete the field before completing the Checkout Session. Defaults to `false`. + */ + optional: boolean; + + /** + * Configuration for `type=text` fields. + */ + text: CustomField.Text | null; + + /** + * The type of the field. + */ + type: CustomField.Type; + } + + namespace CustomField { + interface Dropdown { + /** + * The options available for the customer to select. Up to 200 options allowed. + */ + options: Array; + + /** + * The option selected by the customer. This will be the `value` for the option. + */ + value: string | null; + } + + namespace Dropdown { + interface Option { + /** + * The label for the option, displayed to the customer. Up to 100 characters. + */ + label: string; + + /** + * The value for this option, not displayed to the customer, used by your integration to reconcile the option selected by the customer. Must be unique to this option, alphanumeric, and up to 100 characters. + */ + value: string; + } + } + + interface Label { + /** + * Custom text for the label, displayed to the customer. Up to 50 characters. + */ + custom: string | null; + + /** + * The type of the label. + */ + type: 'custom'; + } + + interface Numeric { + /** + * The value entered by the customer, containing only digits. + */ + value: string | null; + } + + interface Text { + /** + * The value entered by the customer. + */ + value: string | null; + } + + type Type = 'dropdown' | 'numeric' | 'text'; + } + interface CustomText { /** * Custom text that should be displayed alongside shipping address collection. diff --git a/types/Checkout/SessionsResource.d.ts b/types/Checkout/SessionsResource.d.ts index 9510a99c05..58070a9e11 100644 --- a/types/Checkout/SessionsResource.d.ts +++ b/types/Checkout/SessionsResource.d.ts @@ -54,6 +54,11 @@ declare module 'stripe' { */ currency?: string; + /** + * Collect additional information from your customer using custom fields. Up to 2 fields are supported. + */ + custom_fields?: Array; + /** * Display additional text for your customers using custom text. */ @@ -310,6 +315,70 @@ declare module 'stripe' { type Shipping = 'auto' | 'never'; } + interface CustomField { + /** + * Configuration for `type=dropdown` fields. + */ + dropdown?: CustomField.Dropdown; + + /** + * String of your choice that your integration can use to reconcile this field. Must be unique to this field, alphanumeric, and up to 200 characters. + */ + key: string; + + /** + * The label for the field, displayed to the customer. + */ + label: CustomField.Label; + + /** + * Whether the customer is required to complete the field before completing the Checkout Session. Defaults to `false`. + */ + optional?: boolean; + + /** + * The type of the field. + */ + type: CustomField.Type; + } + + namespace CustomField { + interface Dropdown { + /** + * The options available for the customer to select. Up to 200 options allowed. + */ + options: Array; + } + + namespace Dropdown { + interface Option { + /** + * The label for the option, displayed to the customer. Up to 100 characters. + */ + label: string; + + /** + * The value for this option, not displayed to the customer, used by your integration to reconcile the option selected by the customer. Must be unique to this option, alphanumeric, and up to 100 characters. + */ + value: string; + } + } + + interface Label { + /** + * Custom text for the label, displayed to the customer. Up to 50 characters. + */ + custom: string; + + /** + * The type of the label. + */ + type: 'custom'; + } + + type Type = 'dropdown' | 'numeric' | 'text'; + } + interface CustomText { /** * Custom text that should be displayed alongside shipping address collection. diff --git a/types/InvoicesResource.d.ts b/types/InvoicesResource.d.ts index 1415784735..da2e14ddb2 100644 --- a/types/InvoicesResource.d.ts +++ b/types/InvoicesResource.d.ts @@ -1925,7 +1925,7 @@ declare module 'stripe' { namespace SubscriptionItem { interface BillingThresholds { /** - * Usage threshold that triggers the subscription to advance to a new billing period + * Number of units that meets the billing threshold to advance the subscription to a new billing period (e.g., it takes 10 $5 units to meet a $50 [monetary threshold](https://stripe.com/docs/api/subscriptions/update#update_subscription-billing_thresholds-amount_gte)) */ usage_gte: number; } @@ -2656,7 +2656,7 @@ declare module 'stripe' { namespace SubscriptionItem { interface BillingThresholds { /** - * Usage threshold that triggers the subscription to advance to a new billing period + * Number of units that meets the billing threshold to advance the subscription to a new billing period (e.g., it takes 10 $5 units to meet a $50 [monetary threshold](https://stripe.com/docs/api/subscriptions/update#update_subscription-billing_thresholds-amount_gte)) */ usage_gte: number; } diff --git a/types/PaymentLinks.d.ts b/types/PaymentLinks.d.ts index 9e7ec259f1..fb82257f4b 100644 --- a/types/PaymentLinks.d.ts +++ b/types/PaymentLinks.d.ts @@ -59,6 +59,11 @@ declare module 'stripe' { */ currency: string; + /** + * Collect additional information from your customer using custom fields. Up to 2 fields are supported. + */ + custom_fields: Array; + custom_text: PaymentLink.CustomText; /** @@ -200,6 +205,67 @@ declare module 'stripe' { type CustomerCreation = 'always' | 'if_required'; + interface CustomField { + /** + * Configuration for `type=dropdown` fields. + */ + dropdown: CustomField.Dropdown | null; + + /** + * String of your choice that your integration can use to reconcile this field. Must be unique to this field, alphanumeric, and up to 200 characters. + */ + key: string; + + label: CustomField.Label; + + /** + * Whether the customer is required to complete the field before completing the Checkout Session. Defaults to `false`. + */ + optional: boolean; + + /** + * The type of the field. + */ + type: CustomField.Type; + } + + namespace CustomField { + interface Dropdown { + /** + * The options available for the customer to select. Up to 200 options allowed. + */ + options: Array; + } + + namespace Dropdown { + interface Option { + /** + * The label for the option, displayed to the customer. Up to 100 characters. + */ + label: string; + + /** + * The value for this option, not displayed to the customer, used by your integration to reconcile the option selected by the customer. Must be unique to this option, alphanumeric, and up to 100 characters. + */ + value: string; + } + } + + interface Label { + /** + * Custom text for the label, displayed to the customer. Up to 50 characters. + */ + custom: string | null; + + /** + * The type of the label. + */ + type: 'custom'; + } + + type Type = 'dropdown' | 'numeric' | 'text'; + } + interface CustomText { /** * Custom text that should be displayed alongside shipping address collection. diff --git a/types/PaymentLinksResource.d.ts b/types/PaymentLinksResource.d.ts index 1646fa3eaf..1de8106963 100644 --- a/types/PaymentLinksResource.d.ts +++ b/types/PaymentLinksResource.d.ts @@ -48,6 +48,11 @@ declare module 'stripe' { */ currency?: string; + /** + * Collect additional information from your customer using custom fields. Up to 2 fields are supported. + */ + custom_fields?: Array; + /** * Display additional text for your customers using custom text. */ @@ -203,6 +208,70 @@ declare module 'stripe' { type CustomerCreation = 'always' | 'if_required'; + interface CustomField { + /** + * Configuration for `type=dropdown` fields. + */ + dropdown?: CustomField.Dropdown; + + /** + * String of your choice that your integration can use to reconcile this field. Must be unique to this field, alphanumeric, and up to 200 characters. + */ + key: string; + + /** + * The label for the field, displayed to the customer. + */ + label: CustomField.Label; + + /** + * Whether the customer is required to complete the field before completing the Checkout Session. Defaults to `false`. + */ + optional?: boolean; + + /** + * The type of the field. + */ + type: CustomField.Type; + } + + namespace CustomField { + interface Dropdown { + /** + * The options available for the customer to select. Up to 200 options allowed. + */ + options: Array; + } + + namespace Dropdown { + interface Option { + /** + * The label for the option, displayed to the customer. Up to 100 characters. + */ + label: string; + + /** + * The value for this option, not displayed to the customer, used by your integration to reconcile the option selected by the customer. Must be unique to this option, alphanumeric, and up to 100 characters. + */ + value: string; + } + } + + interface Label { + /** + * Custom text for the label, displayed to the customer. Up to 50 characters. + */ + custom: string; + + /** + * The type of the label. + */ + type: 'custom'; + } + + type Type = 'dropdown' | 'numeric' | 'text'; + } + interface CustomText { /** * Custom text that should be displayed alongside shipping address collection. @@ -731,6 +800,13 @@ declare module 'stripe' { */ billing_address_collection?: PaymentLinkUpdateParams.BillingAddressCollection; + /** + * Collect additional information from your customer using custom fields. Up to 2 fields are supported. + */ + custom_fields?: Stripe.Emptyable< + Array + >; + /** * Display additional text for your customers using custom text. */ @@ -832,6 +908,70 @@ declare module 'stripe' { type CustomerCreation = 'always' | 'if_required'; + interface CustomField { + /** + * Configuration for `type=dropdown` fields. + */ + dropdown?: CustomField.Dropdown; + + /** + * String of your choice that your integration can use to reconcile this field. Must be unique to this field, alphanumeric, and up to 200 characters. + */ + key: string; + + /** + * The label for the field, displayed to the customer. + */ + label: CustomField.Label; + + /** + * Whether the customer is required to complete the field before completing the Checkout Session. Defaults to `false`. + */ + optional?: boolean; + + /** + * The type of the field. + */ + type: CustomField.Type; + } + + namespace CustomField { + interface Dropdown { + /** + * The options available for the customer to select. Up to 200 options allowed. + */ + options: Array; + } + + namespace Dropdown { + interface Option { + /** + * The label for the option, displayed to the customer. Up to 100 characters. + */ + label: string; + + /** + * The value for this option, not displayed to the customer, used by your integration to reconcile the option selected by the customer. Must be unique to this option, alphanumeric, and up to 100 characters. + */ + value: string; + } + } + + interface Label { + /** + * Custom text for the label, displayed to the customer. Up to 50 characters. + */ + custom: string; + + /** + * The type of the label. + */ + type: 'custom'; + } + + type Type = 'dropdown' | 'numeric' | 'text'; + } + interface CustomText { /** * Custom text that should be displayed alongside shipping address collection. diff --git a/types/Quotes.d.ts b/types/Quotes.d.ts index 4866dac908..17bf1860a7 100644 --- a/types/Quotes.d.ts +++ b/types/Quotes.d.ts @@ -431,15 +431,9 @@ declare module 'stripe' { | 'stale'; interface StatusDetails { - /** - * Details on when and why a quote has been marked as canceled. - */ - canceled: StatusDetails.Canceled | null; + canceled?: StatusDetails.Canceled; - /** - * Details on when and why a quote has been marked as stale. - */ - stale: StatusDetails.Stale | null; + stale?: StatusDetails.Stale; } namespace StatusDetails { diff --git a/types/QuotesResource.d.ts b/types/QuotesResource.d.ts index c286944730..fbf0035f2e 100644 --- a/types/QuotesResource.d.ts +++ b/types/QuotesResource.d.ts @@ -3361,7 +3361,7 @@ declare module 'stripe' { ): ApiListPromise; /** - * When retrieving a quote, there is an includable lines property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of lines. + * Retrieves a paginated list of lines for a quote. These lines describe changes that will be used to create new subscription schedules or update existing subscription schedules when the quote is accepted. */ listLines( id: string, diff --git a/types/SubscriptionItemsResource.d.ts b/types/SubscriptionItemsResource.d.ts index f00bdeb098..3311117a64 100644 --- a/types/SubscriptionItemsResource.d.ts +++ b/types/SubscriptionItemsResource.d.ts @@ -87,7 +87,7 @@ declare module 'stripe' { namespace SubscriptionItemCreateParams { interface BillingThresholds { /** - * Usage threshold that triggers the subscription to advance to a new billing period + * Number of units that meets the billing threshold to advance the subscription to a new billing period (e.g., it takes 10 $5 units to meet a $50 [monetary threshold](https://stripe.com/docs/api/subscriptions/update#update_subscription-billing_thresholds-amount_gte)) */ usage_gte: number; } @@ -312,7 +312,7 @@ declare module 'stripe' { namespace SubscriptionItemUpdateParams { interface BillingThresholds { /** - * Usage threshold that triggers the subscription to advance to a new billing period + * Number of units that meets the billing threshold to advance the subscription to a new billing period (e.g., it takes 10 $5 units to meet a $50 [monetary threshold](https://stripe.com/docs/api/subscriptions/update#update_subscription-billing_thresholds-amount_gte)) */ usage_gte: number; } diff --git a/types/SubscriptionSchedulesResource.d.ts b/types/SubscriptionSchedulesResource.d.ts index 066c103105..0b76e712c1 100644 --- a/types/SubscriptionSchedulesResource.d.ts +++ b/types/SubscriptionSchedulesResource.d.ts @@ -532,7 +532,7 @@ declare module 'stripe' { namespace Item { interface BillingThresholds { /** - * Usage threshold that triggers the subscription to advance to a new billing period + * Number of units that meets the billing threshold to advance the subscription to a new billing period (e.g., it takes 10 $5 units to meet a $50 [monetary threshold](https://stripe.com/docs/api/subscriptions/update#update_subscription-billing_thresholds-amount_gte)) */ usage_gte: number; } @@ -1242,7 +1242,7 @@ declare module 'stripe' { namespace Item { interface BillingThresholds { /** - * Usage threshold that triggers the subscription to advance to a new billing period + * Number of units that meets the billing threshold to advance the subscription to a new billing period (e.g., it takes 10 $5 units to meet a $50 [monetary threshold](https://stripe.com/docs/api/subscriptions/update#update_subscription-billing_thresholds-amount_gte)) */ usage_gte: number; } diff --git a/types/SubscriptionsResource.d.ts b/types/SubscriptionsResource.d.ts index f2e4ea8aae..c42fdfe3ab 100644 --- a/types/SubscriptionsResource.d.ts +++ b/types/SubscriptionsResource.d.ts @@ -432,7 +432,7 @@ declare module 'stripe' { namespace Item { interface BillingThresholds { /** - * Usage threshold that triggers the subscription to advance to a new billing period + * Number of units that meets the billing threshold to advance the subscription to a new billing period (e.g., it takes 10 $5 units to meet a $50 [monetary threshold](https://stripe.com/docs/api/subscriptions/update#update_subscription-billing_thresholds-amount_gte)) */ usage_gte: number; } @@ -1319,7 +1319,7 @@ declare module 'stripe' { namespace Item { interface BillingThresholds { /** - * Usage threshold that triggers the subscription to advance to a new billing period + * Number of units that meets the billing threshold to advance the subscription to a new billing period (e.g., it takes 10 $5 units to meet a $50 [monetary threshold](https://stripe.com/docs/api/subscriptions/update#update_subscription-billing_thresholds-amount_gte)) */ usage_gte: number; } diff --git a/types/Tax/Calculations.d.ts b/types/Tax/Calculations.d.ts index 518957758c..16cfeaf92b 100644 --- a/types/Tax/Calculations.d.ts +++ b/types/Tax/Calculations.d.ts @@ -49,11 +49,6 @@ declare module 'stripe' { */ livemode: boolean; - /** - * A custom unique identifier, such as 'myOrder_123'. - */ - reference: string | null; - /** * The amount of tax to be collected on top of the line item prices. */ diff --git a/types/Tax/CalculationsResource.d.ts b/types/Tax/CalculationsResource.d.ts index 46ad42278b..1e0908cd22 100644 --- a/types/Tax/CalculationsResource.d.ts +++ b/types/Tax/CalculationsResource.d.ts @@ -34,11 +34,6 @@ declare module 'stripe' { */ preview?: boolean; - /** - * A custom order or sale identifier, such as 'myOrder_123'. - */ - reference?: string; - /** * Timestamp of date at which the tax rules and rates in effect applies for the calculation. Measured in seconds since the Unix epoch. */ diff --git a/types/Tax/TransactionsResource.d.ts b/types/Tax/TransactionsResource.d.ts index 7d8c80ab61..fb8c016ce1 100644 --- a/types/Tax/TransactionsResource.d.ts +++ b/types/Tax/TransactionsResource.d.ts @@ -18,6 +18,11 @@ declare module 'stripe' { * 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?: Stripe.MetadataParam; + + /** + * A custom order or sale identifier, such as 'myOrder_123'. + */ + reference?: string; } interface TransactionRetrieveParams {