diff --git a/CHANGELOG.md b/CHANGELOG.md index d8950fcf68..05586a9bb8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,8 +1,14 @@ # Changelog +## 12.18.0 - 2023-08-10 +* [#1867](https://github.com/stripe/stripe-node/pull/1867) Update generated code + * Add support for new values `incorporated_partnership` and `unincorporated_partnership` on enums `Account.company.structure`, `AccountCreateParams.company.structure`, `AccountUpdateParams.company.structure`, and `TokenCreateParams.account.company.structure` + * Add support for new value `payment_reversal` on enum `BalanceTransaction.type` + * Change `Invoice.subscription_details.metadata` and `Invoice.subscription_details` to be required + ## 12.17.0 - 2023-08-03 * [#1863](https://github.com/stripe/stripe-node/pull/1863) Update generated code - * Change type of `AccountCreateParams.settings.card_issuing.tos_acceptance.user_agent`, `AccountCreateParams.settings.treasury.tos_acceptance.user_agent`, `AccountUpdateParams.settings.card_issuing.tos_acceptance.user_agent`, `AccountUpdateParams.settings.treasury.tos_acceptance.user_agent`, `BillingPortal.ConfigurationCreateParams.business_profile.headline`, `BillingPortal.ConfigurationUpdateParams.business_profile.headline`, `InvoiceCreateParams.payment_settings.default_mandate`, `InvoiceCreateParams.shipping_details.phone`, `InvoicePayParams.mandate`, `InvoiceUpdateParams.default_source`, `InvoiceUpdateParams.payment_settings.default_mandate`, `InvoiceUpdateParams.shipping_details.phone`, `Issuing.CardholderCreateParams.individual.card_issuing.user_terms_acceptance.user_agent`, `Issuing.CardholderUpdateParams.individual.card_issuing.user_terms_acceptance.user_agent`, `Issuing.DisputeCreateParams.evidence.canceled.cancellation_reason`, `Issuing.DisputeCreateParams.evidence.canceled.explanation`, `Issuing.DisputeCreateParams.evidence.canceled.product_description`, `Issuing.DisputeCreateParams.evidence.duplicate.explanation`, `Issuing.DisputeCreateParams.evidence.fraudulent.explanation`, `Issuing.DisputeCreateParams.evidence.merchandise_not_as_described.explanation`, `Issuing.DisputeCreateParams.evidence.merchandise_not_as_described.return_description`, `Issuing.DisputeCreateParams.evidence.not_received.explanation`, `Issuing.DisputeCreateParams.evidence.not_received.product_description`, `Issuing.DisputeCreateParams.evidence.other.explanation`, `Issuing.DisputeCreateParams.evidence.other.product_description`, `Issuing.DisputeCreateParams.evidence.service_not_as_described.cancellation_reason`, `Issuing.DisputeCreateParams.evidence.service_not_as_described.explanation`, `Issuing.DisputeUpdateParams.evidence.canceled.cancellation_reason`, `Issuing.DisputeUpdateParams.evidence.canceled.explanation`, `Issuing.DisputeUpdateParams.evidence.canceled.product_description`, `Issuing.DisputeUpdateParams.evidence.duplicate.explanation`, `Issuing.DisputeUpdateParams.evidence.fraudulent.explanation`, `Issuing.DisputeUpdateParams.evidence.merchandise_not_as_described.explanation`, `Issuing.DisputeUpdateParams.evidence.merchandise_not_as_described.return_description`, `Issuing.DisputeUpdateParams.evidence.not_received.explanation`, `Issuing.DisputeUpdateParams.evidence.not_received.product_description`, `Issuing.DisputeUpdateParams.evidence.other.explanation`, `Issuing.DisputeUpdateParams.evidence.other.product_description`, `Issuing.DisputeUpdateParams.evidence.service_not_as_described.cancellation_reason`, `Issuing.DisputeUpdateParams.evidence.service_not_as_described.explanation`, `PaymentIntentConfirmParams.payment_method_data.billing_details.name`, `PaymentIntentConfirmParams.payment_method_data.billing_details.phone`, `PaymentIntentConfirmParams.payment_method_options.konbini.confirmation_number`, `PaymentIntentConfirmParams.payment_method_options.konbini.product_description`, `PaymentIntentCreateParams.payment_method_data.billing_details.name`, `PaymentIntentCreateParams.payment_method_data.billing_details.phone`, `PaymentIntentCreateParams.payment_method_options.konbini.confirmation_number`, `PaymentIntentCreateParams.payment_method_options.konbini.product_description`, `PaymentIntentUpdateParams.payment_method_data.billing_details.name`, `PaymentIntentUpdateParams.payment_method_data.billing_details.phone`, `PaymentIntentUpdateParams.payment_method_options.konbini.confirmation_number`, `PaymentIntentUpdateParams.payment_method_options.konbini.product_description`, `PaymentMethodCreateParams.billing_details.name`, `PaymentMethodCreateParams.billing_details.phone`, `PaymentMethodUpdateParams.billing_details.name`, `PaymentMethodUpdateParams.billing_details.phone`, `ProductUpdateParams.caption`, `ProductUpdateParams.description`, `ProductUpdateParams.unit_label`, `QuoteCreateParams.description`, `QuoteCreateParams.footer`, `QuoteCreateParams.header`, `QuoteUpdateParams.description`, `QuoteUpdateParams.footer`, `QuoteUpdateParams.header`, `QuoteUpdateParams.subscription_data.description`, `SetupIntentConfirmParams.payment_method_data.billing_details.name`, `SetupIntentConfirmParams.payment_method_data.billing_details.phone`, `SetupIntentCreateParams.payment_method_data.billing_details.name`, `SetupIntentCreateParams.payment_method_data.billing_details.phone`, `SetupIntentUpdateParams.payment_method_data.billing_details.name`, `SetupIntentUpdateParams.payment_method_data.billing_details.phone`, `SubscriptionCancelParams.cancellation_details.comment`, `SubscriptionScheduleCreateParams.default_settings.description`, `SubscriptionScheduleCreateParams.phases[].description`, `SubscriptionScheduleUpdateParams.default_settings.description`, `SubscriptionScheduleUpdateParams.phases[].description`, `SubscriptionUpdateParams.cancellation_details.comment`, `SubscriptionUpdateParams.default_source`, `SubscriptionUpdateParams.description`, `Tax.CalculationCreateParams.customer_details.address.city`, `Tax.CalculationCreateParams.customer_details.address.line1`, `Tax.CalculationCreateParams.customer_details.address.line2`, `Tax.CalculationCreateParams.customer_details.address.postal_code`, `Tax.CalculationCreateParams.customer_details.address.state`, `Terminal.LocationUpdateParams.configuration_overrides`, `Terminal.ReaderUpdateParams.label`, `TokenCreateParams.person.documents.company_authorization.files[]`, `TokenCreateParams.person.documents.passport.files[]`, `TokenCreateParams.person.documents.visa.files[]`, `Treasury.OutboundPaymentCreateParams.destination_payment_method_data.billing_details.name`, `Treasury.OutboundPaymentCreateParams.destination_payment_method_data.billing_details.phone`, `WebhookEndpointCreateParams.description`, and `WebhookEndpointUpdateParams.description` from `string` to `emptyStringable(string)` + * Change many types from `string` to `emptyStringable(string)` * Add support for `subscription_details` on `Invoice` * Add support for `preferred_settlement_speed` on `PaymentIntent.payment_method_options.us_bank_account`, `PaymentIntentConfirmParams.payment_method_options.us_bank_account`, `PaymentIntentCreateParams.payment_method_options.us_bank_account`, and `PaymentIntentUpdateParams.payment_method_options.us_bank_account` * Add support for new values `sepa_debit_fingerprint` and `us_bank_account_fingerprint` on enums `Radar.ValueList.item_type` and `Radar.ValueListCreateParams.item_type` diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index dae9a81fbb..a21df3b6df 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v446 \ No newline at end of file +v458 \ No newline at end of file diff --git a/VERSION b/VERSION index dfd39f4bf7..b06cd07c44 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -12.17.0 +12.18.0 diff --git a/package.json b/package.json index 7e244d1d06..a867853e3f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "stripe", - "version": "12.17.0", + "version": "12.18.0", "description": "Stripe API wrapper", "keywords": [ "stripe", diff --git a/src/stripe.core.ts b/src/stripe.core.ts index 3db07604b7..976bb1268d 100644 --- a/src/stripe.core.ts +++ b/src/stripe.core.ts @@ -49,7 +49,7 @@ export function createStripe( platformFunctions: PlatformFunctions, requestSender: RequestSenderFactory = defaultRequestSenderFactory ): typeof Stripe { - Stripe.PACKAGE_VERSION = '12.17.0'; + Stripe.PACKAGE_VERSION = '12.18.0'; Stripe.USER_AGENT = { bindings_version: Stripe.PACKAGE_VERSION, lang: 'node', diff --git a/test/resources/generated_examples_test.spec.js b/test/resources/generated_examples_test.spec.js index 0e96b1fdde..f379385157 100644 --- a/test/resources/generated_examples_test.spec.js +++ b/test/resources/generated_examples_test.spec.js @@ -228,7 +228,7 @@ describe('Accounts', function() { method: 'GET', path: '/v1/accounts/acc_123', response: - '{"business_profile":{"mcc":"mcc","monthly_estimated_revenue":{"amount":1413853096,"currency":"currency"},"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,"export_license_id":"export_license_id","export_purpose_code":"export_purpose_code","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":{"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"}', + '{"business_profile":{"mcc":"mcc","monthly_estimated_revenue":{"amount":1413853096,"currency":"currency"},"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,"export_license_id":"export_license_id","export_purpose_code":"export_purpose_code","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":"private_company","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":{"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'); diff --git a/types/Accounts.d.ts b/types/Accounts.d.ts index 6cf9147612..e9105cae06 100644 --- a/types/Accounts.d.ts +++ b/types/Accounts.d.ts @@ -621,6 +621,7 @@ declare module 'stripe' { | 'government_instrumentality' | 'governmental_unit' | 'incorporated_non_profit' + | 'incorporated_partnership' | 'limited_liability_partnership' | 'llc' | 'multi_member_llc' @@ -635,7 +636,8 @@ declare module 'stripe' { | 'sole_proprietorship' | 'tax_exempt_government_instrumentality' | 'unincorporated_association' - | 'unincorporated_non_profit'; + | 'unincorporated_non_profit' + | 'unincorporated_partnership'; interface Verification { document: Verification.Document; diff --git a/types/AccountsResource.d.ts b/types/AccountsResource.d.ts index 0b50c6fbf8..06cac0a2b2 100644 --- a/types/AccountsResource.d.ts +++ b/types/AccountsResource.d.ts @@ -711,6 +711,7 @@ declare module 'stripe' { | 'government_instrumentality' | 'governmental_unit' | 'incorporated_non_profit' + | 'incorporated_partnership' | 'limited_liability_partnership' | 'llc' | 'multi_member_llc' @@ -725,7 +726,8 @@ declare module 'stripe' { | 'sole_proprietorship' | 'tax_exempt_government_instrumentality' | 'unincorporated_association' - | 'unincorporated_non_profit'; + | 'unincorporated_non_profit' + | 'unincorporated_partnership'; interface Verification { /** @@ -1991,6 +1993,7 @@ declare module 'stripe' { | 'government_instrumentality' | 'governmental_unit' | 'incorporated_non_profit' + | 'incorporated_partnership' | 'limited_liability_partnership' | 'llc' | 'multi_member_llc' @@ -2005,7 +2008,8 @@ declare module 'stripe' { | 'sole_proprietorship' | 'tax_exempt_government_instrumentality' | 'unincorporated_association' - | 'unincorporated_non_profit'; + | 'unincorporated_non_profit' + | 'unincorporated_partnership'; interface Verification { /** @@ -3359,7 +3363,7 @@ declare module 'stripe' { * for a Standard or Express account, some parameters can no longer be changed. These are marked as Custom Only or Custom and Express * below. * - * To update your own account, use the [Dashboard](https://dashboard.stripe.com/account). Refer to our + * To update your own account, use the [Dashboard](https://dashboard.stripe.com/settings/account). Refer to our * [Connect](https://stripe.com/docs/connect/updating-accounts) documentation to learn more about updating accounts. */ update( @@ -3382,7 +3386,7 @@ declare module 'stripe' { * * 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. + * If you want to delete your own account, use the [account information tab in your account settings](https://dashboard.stripe.com/settings/account) instead. */ del( id: string, diff --git a/types/BalanceTransactions.d.ts b/types/BalanceTransactions.d.ts index bd0088f1a6..88987aa923 100644 --- a/types/BalanceTransactions.d.ts +++ b/types/BalanceTransactions.d.ts @@ -98,7 +98,7 @@ declare module 'stripe' { status: string; /** - * Transaction type: `adjustment`, `advance`, `advance_funding`, `anticipation_repayment`, `application_fee`, `application_fee_refund`, `charge`, `connect_collection_transfer`, `contribution`, `issuing_authorization_hold`, `issuing_authorization_release`, `issuing_dispute`, `issuing_transaction`, `payment`, `payment_failure_refund`, `payment_refund`, `payout`, `payout_cancel`, `payout_failure`, `refund`, `refund_failure`, `reserve_transaction`, `reserved_funds`, `stripe_fee`, `stripe_fx_fee`, `tax_fee`, `topup`, `topup_reversal`, `transfer`, `transfer_cancel`, `transfer_failure`, or `transfer_refund`. [Learn more](https://stripe.com/docs/reports/balance-transaction-types) about balance transaction types and what they represent. If you are looking to classify transactions for accounting purposes, you might want to consider `reporting_category` instead. + * Transaction type: `adjustment`, `advance`, `advance_funding`, `anticipation_repayment`, `application_fee`, `application_fee_refund`, `charge`, `connect_collection_transfer`, `contribution`, `issuing_authorization_hold`, `issuing_authorization_release`, `issuing_dispute`, `issuing_transaction`, `payment`, `payment_failure_refund`, `payment_refund`, `payment_reversal`, `payout`, `payout_cancel`, `payout_failure`, `refund`, `refund_failure`, `reserve_transaction`, `reserved_funds`, `stripe_fee`, `stripe_fx_fee`, `tax_fee`, `topup`, `topup_reversal`, `transfer`, `transfer_cancel`, `transfer_failure`, or `transfer_refund`. [Learn more](https://stripe.com/docs/reports/balance-transaction-types) about balance transaction types and what they represent. If you are looking to classify transactions for accounting purposes, you might want to consider `reporting_category` instead. */ type: BalanceTransaction.Type; } @@ -148,6 +148,7 @@ declare module 'stripe' { | 'payment' | 'payment_failure_refund' | 'payment_refund' + | 'payment_reversal' | 'payout' | 'payout_cancel' | 'payout_failure' diff --git a/types/BalanceTransactionsResource.d.ts b/types/BalanceTransactionsResource.d.ts index ddbeb8a6eb..07dc31cab7 100644 --- a/types/BalanceTransactionsResource.d.ts +++ b/types/BalanceTransactionsResource.d.ts @@ -38,7 +38,7 @@ declare module 'stripe' { source?: string; /** - * Only returns transactions of the given type. One of: `adjustment`, `advance`, `advance_funding`, `anticipation_repayment`, `application_fee`, `application_fee_refund`, `charge`, `connect_collection_transfer`, `contribution`, `issuing_authorization_hold`, `issuing_authorization_release`, `issuing_dispute`, `issuing_transaction`, `payment`, `payment_failure_refund`, `payment_refund`, `payout`, `payout_cancel`, `payout_failure`, `refund`, `refund_failure`, `reserve_transaction`, `reserved_funds`, `stripe_fee`, `stripe_fx_fee`, `tax_fee`, `topup`, `topup_reversal`, `transfer`, `transfer_cancel`, `transfer_failure`, or `transfer_refund`. + * Only returns transactions of the given type. One of: `adjustment`, `advance`, `advance_funding`, `anticipation_repayment`, `application_fee`, `application_fee_refund`, `charge`, `connect_collection_transfer`, `contribution`, `issuing_authorization_hold`, `issuing_authorization_release`, `issuing_dispute`, `issuing_transaction`, `payment`, `payment_failure_refund`, `payment_refund`, `payment_reversal`, `payout`, `payout_cancel`, `payout_failure`, `refund`, `refund_failure`, `reserve_transaction`, `reserved_funds`, `stripe_fee`, `stripe_fx_fee`, `tax_fee`, `topup`, `topup_reversal`, `transfer`, `transfer_cancel`, `transfer_failure`, or `transfer_refund`. */ type?: string; } diff --git a/types/BillingPortal/SessionsResource.d.ts b/types/BillingPortal/SessionsResource.d.ts index 4a89b857f5..d1fe558039 100644 --- a/types/BillingPortal/SessionsResource.d.ts +++ b/types/BillingPortal/SessionsResource.d.ts @@ -25,7 +25,7 @@ declare module 'stripe' { 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. + * 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; diff --git a/types/CreditNoteLineItems.d.ts b/types/CreditNoteLineItems.d.ts index 293f7a4921..e56b6079dc 100644 --- a/types/CreditNoteLineItems.d.ts +++ b/types/CreditNoteLineItems.d.ts @@ -3,7 +3,7 @@ declare module 'stripe' { namespace Stripe { /** - * The CreditNoteLineItem object. + * The credit note line item object */ interface CreditNoteLineItem { /** diff --git a/types/CustomerCashBalanceTransactions.d.ts b/types/CustomerCashBalanceTransactions.d.ts index a095b2bea1..f29c1c5096 100644 --- a/types/CustomerCashBalanceTransactions.d.ts +++ b/types/CustomerCashBalanceTransactions.d.ts @@ -19,6 +19,8 @@ declare module 'stripe' { */ object: 'customer_cash_balance_transaction'; + adjusted_for_overdraft?: CustomerCashBalanceTransaction.AdjustedForOverdraft; + applied_to_payment?: CustomerCashBalanceTransaction.AppliedToPayment; /** @@ -64,6 +66,13 @@ declare module 'stripe' { } namespace CustomerCashBalanceTransaction { + interface AdjustedForOverdraft { + /** + * The [Cash Balance Transaction](https://stripe.com/docs/api/cash_balance_transactions/object) that brought the customer balance negative, triggering the clawback of funds. + */ + linked_transaction: string | Stripe.CustomerCashBalanceTransaction; + } + interface AppliedToPayment { /** * The [Payment Intent](https://stripe.com/docs/api/payment_intents/object) that funds were applied to. @@ -181,6 +190,7 @@ declare module 'stripe' { } type Type = + | 'adjusted_for_overdraft' | 'applied_to_payment' | 'funded' | 'funding_reversed' diff --git a/types/Invoices.d.ts b/types/Invoices.d.ts index ab445c31ba..1ab1ca1f56 100644 --- a/types/Invoices.d.ts +++ b/types/Invoices.d.ts @@ -381,7 +381,7 @@ declare module 'stripe' { /** * Details about the subscription that created this invoice. */ - subscription_details?: Invoice.SubscriptionDetails | null; + subscription_details: Invoice.SubscriptionDetails | null; /** * Only set for upcoming invoices that preview prorations. The time used to calculate prorations. @@ -1196,7 +1196,7 @@ declare module 'stripe' { /** * Set of [key-value pairs](https://stripe.com/docs/api/metadata) that will reflect the metadata of the subscription at the time of invoice creation. *Note: This attribute is populated only for invoices created on or after June 29, 2023.* */ - metadata?: Stripe.Metadata | null; + metadata: Stripe.Metadata | null; } interface ThresholdReason { diff --git a/types/TaxRates.d.ts b/types/TaxRates.d.ts index 8b977fbdc6..528e70a4dd 100644 --- a/types/TaxRates.d.ts +++ b/types/TaxRates.d.ts @@ -44,7 +44,9 @@ declare module 'stripe' { display_name: string; /** - * Actual/effective tax rate percentage out of 100. For tax calculations with automatic_tax[enabled]=true, this percentage does not include the statutory tax rate of non-taxable jurisdictions. + * Actual/effective tax rate percentage out of 100. For tax calculations with automatic_tax[enabled]=true, + * this percentage reflects the rate actually used to calculate tax based on the product's taxability + * and whether the user is registered to collect taxes in the corresponding jurisdiction. */ effective_percentage: number | null; diff --git a/types/TokensResource.d.ts b/types/TokensResource.d.ts index db1b22c4bb..41d4005b75 100644 --- a/types/TokensResource.d.ts +++ b/types/TokensResource.d.ts @@ -197,6 +197,7 @@ declare module 'stripe' { | 'government_instrumentality' | 'governmental_unit' | 'incorporated_non_profit' + | 'incorporated_partnership' | 'limited_liability_partnership' | 'llc' | 'multi_member_llc' @@ -211,7 +212,8 @@ declare module 'stripe' { | 'sole_proprietorship' | 'tax_exempt_government_instrumentality' | 'unincorporated_association' - | 'unincorporated_non_profit'; + | 'unincorporated_non_profit' + | 'unincorporated_partnership'; interface Verification { /** diff --git a/yarn.lock b/yarn.lock index 35d5035cce..1d7ef0ccf3 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3154,9 +3154,9 @@ wide-align@1.1.3: string-width "^1.0.2 || 2" word-wrap@^1.2.3: - version "1.2.3" - resolved "https://registry.yarnpkg.com/word-wrap/-/word-wrap-1.2.3.tgz#610636f6b1f703891bd34771ccb17fb93b47079c" - integrity sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ== + version "1.2.5" + resolved "https://registry.yarnpkg.com/word-wrap/-/word-wrap-1.2.5.tgz#d2c45c6dd4fbce621a66f136cbe328afd0410b34" + integrity sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA== workerpool@6.1.0: version "6.1.0"