From dd6c84eee4a84c2ee6ae272dcace527b4b93919e Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Fri, 5 Apr 2024 13:49:59 +0000 Subject: [PATCH 1/7] Update generated code for v934 --- OPENAPI_VERSION | 2 +- types/Billing/MeterEventAdjustments.d.ts | 19 +++++++++++++++++++ .../MeterEventAdjustmentsResource.d.ts | 5 +++++ 3 files changed, 25 insertions(+), 1 deletion(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 3dfb688b80..1290fddf66 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v932 \ No newline at end of file +v934 \ No newline at end of file diff --git a/types/Billing/MeterEventAdjustments.d.ts b/types/Billing/MeterEventAdjustments.d.ts index 663d1899bf..8b4b27554f 100644 --- a/types/Billing/MeterEventAdjustments.d.ts +++ b/types/Billing/MeterEventAdjustments.d.ts @@ -12,6 +12,13 @@ declare module 'stripe' { */ object: 'billing.meter_event_adjustment'; + cancel: MeterEventAdjustment.Cancel; + + /** + * The name of the meter event. Corresponds with the `event_name` field on a meter. + */ + event_name: string; + /** * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ @@ -21,9 +28,21 @@ declare module 'stripe' { * The meter event adjustment's status. */ status: MeterEventAdjustment.Status; + + /** + * Specifies whether to cancel a single event or a range of events for a time period. + */ + type: 'cancel'; } namespace MeterEventAdjustment { + interface Cancel { + /** + * Unique identifier for the event. + */ + identifier: string; + } + type Status = 'complete' | 'pending'; } } diff --git a/types/Billing/MeterEventAdjustmentsResource.d.ts b/types/Billing/MeterEventAdjustmentsResource.d.ts index 73bec6a0ee..2c14ab6f57 100644 --- a/types/Billing/MeterEventAdjustmentsResource.d.ts +++ b/types/Billing/MeterEventAdjustmentsResource.d.ts @@ -9,6 +9,11 @@ declare module 'stripe' { */ cancel: MeterEventAdjustmentCreateParams.Cancel; + /** + * The name of the meter event. Corresponds with the `event_name` field on a meter. + */ + event_name: string; + /** * Specifies which fields in the response should be expanded. */ From 5052f90050ba69d046dc7d23edd87d5c26b9e77d Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Fri, 5 Apr 2024 19:51:39 +0000 Subject: [PATCH 2/7] Update generated code for v935 --- OPENAPI_VERSION | 2 +- src/apiVersion.ts | 2 +- types/WebhookEndpointsResource.d.ts | 3 ++- types/lib.d.ts | 2 +- types/test/typescriptTest.ts | 6 +++--- 5 files changed, 8 insertions(+), 7 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 1290fddf66..24a4d06f0e 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v934 \ No newline at end of file +v935 \ No newline at end of file diff --git a/src/apiVersion.ts b/src/apiVersion.ts index 1d49f138a2..8924ae6757 100644 --- a/src/apiVersion.ts +++ b/src/apiVersion.ts @@ -1,3 +1,3 @@ // File generated from our OpenAPI spec -export const ApiVersion = '2023-10-16'; +export const ApiVersion = '2024-04-10'; diff --git a/types/WebhookEndpointsResource.d.ts b/types/WebhookEndpointsResource.d.ts index 68c3940157..207cac5e93 100644 --- a/types/WebhookEndpointsResource.d.ts +++ b/types/WebhookEndpointsResource.d.ts @@ -140,7 +140,8 @@ declare module 'stripe' { | '2022-08-01' | '2022-11-15' | '2023-08-16' - | '2023-10-16'; + | '2023-10-16' + | '2024-04-10'; type EnabledEvent = | '*' diff --git a/types/lib.d.ts b/types/lib.d.ts index 96a9849f2a..063f76b267 100644 --- a/types/lib.d.ts +++ b/types/lib.d.ts @@ -27,7 +27,7 @@ declare module 'stripe' { }): (...args: any[]) => Response; //eslint-disable-line @typescript-eslint/no-explicit-any static MAX_BUFFERED_REQUEST_METRICS: number; } - export type LatestApiVersion = '2023-10-16'; + export type LatestApiVersion = '2024-04-10'; export type HttpAgent = Agent; export type HttpProtocol = 'http' | 'https'; diff --git a/types/test/typescriptTest.ts b/types/test/typescriptTest.ts index 3b4a3e8d28..d80bde5d3a 100644 --- a/types/test/typescriptTest.ts +++ b/types/test/typescriptTest.ts @@ -9,7 +9,7 @@ import Stripe from 'stripe'; let stripe = new Stripe('sk_test_123', { - apiVersion: '2023-10-16', + apiVersion: '2024-04-10', }); stripe = new Stripe('sk_test_123'); @@ -26,7 +26,7 @@ stripe = new Stripe('sk_test_123', { // Check config object. stripe = new Stripe('sk_test_123', { - apiVersion: '2023-10-16', + apiVersion: '2024-04-10', typescript: true, maxNetworkRetries: 1, timeout: 1000, @@ -44,7 +44,7 @@ stripe = new Stripe('sk_test_123', { description: 'test', }; const opts: Stripe.RequestOptions = { - apiVersion: '2023-10-16', + apiVersion: '2024-04-10', }; const customer: Stripe.Customer = await stripe.customers.create(params, opts); From 322c513e2d8a4430b075a39b343719b9d536417d Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Mon, 8 Apr 2024 14:35:02 +0000 Subject: [PATCH 3/7] Update generated code for v936 --- OPENAPI_VERSION | 2 +- .../resources/generated_examples_test.spec.js | 2 +- types/Accounts.d.ts | 52 ++++++++++++++- types/AccountsResource.d.ts | 64 +++++++++++++++++++ 4 files changed, 117 insertions(+), 3 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 24a4d06f0e..b5dadb32d8 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v935 \ No newline at end of file +v936 \ 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 c95afc1a2b..d60375ec43 100644 --- a/test/resources/generated_examples_test.spec.js +++ b/test/resources/generated_examples_test.spec.js @@ -176,7 +176,7 @@ describe('Generated tests', function() { method: 'GET', path: '/v1/accounts/acc_123', response: - '{"business_profile":{"annual_revenue":{"amount":1413853096,"currency":"currency","fiscal_year_end":"fiscal_year_end"},"estimated_worker_count":884794319,"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","amazon_pay_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","mobilepay_payments":"pending","oxxo_payments":"pending","p24_payments":"inactive","paynow_payments":"active","promptpay_payments":"active","revolut_pay_payments":"inactive","sepa_debit_payments":"inactive","sofort_payments":"active","swish_payments":"inactive","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":"single_member_llc","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":"invalid_url_website_incomplete_under_construction","reason":"reason","requirement":"requirement"}],"eventually_due":["eventually_due"],"past_due":["past_due"],"pending_verification":["pending_verification"]},"id":"obj_123","individual":{"account":"account","additional_tos_acceptances":{"account":{"date":"3076014","ip":"ip","user_agent":"user_agent"}},"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":"invalid_url_website_incomplete_under_construction","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,"legal_guardian":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":"invalid_url_website_incomplete_under_construction","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":"invalid_url_website_incomplete_under_construction","reason":"reason","requirement":"requirement"}],"eventually_due":["eventually_due"],"past_due":["past_due"],"pending_verification":["pending_verification"]},"settings":{"bacs_debit_payments":{"display_name":"display_name","service_user_number":"service_user_number"},"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"},"invoices":{"default_account_tax_ids":[{"country":"country","created":"1028554472","customer":{"address":{"city":"city","country":"country","line1":"line1","line2":"line2","postal_code":"postal_code","state":"state"},"balance":339185956,"cash_balance":{"available":{"undefined":733902135},"customer":"customer","livemode":true,"object":"cash_balance","settings":{"reconciliation_mode":"manual","using_merchant_default":true}},"created":"1028554472","currency":"currency","default_source":null,"delinquent":true,"description":"description","discount":{"checkout_session":"checkout_session","coupon":null,"customer":null,"end":"100571","id":"obj_123","invoice":"invoice","invoice_item":"invoice_item","object":"discount","promotion_code":null,"start":"109757538","subscription":"subscription","subscription_item":"subscription_item"},"email":"email","id":"obj_123","invoice_credit_balance":{"undefined":1267696360},"invoice_prefix":"invoice_prefix","invoice_settings":{"custom_fields":[{"name":"name","value":"value"}],"default_payment_method":{"acss_debit":{"bank_name":"bank_name","fingerprint":"fingerprint","institution_number":"institution_number","last4":"last4","transit_number":"transit_number"},"affirm":{},"afterpay_clearpay":{},"alipay":{},"au_becs_debit":{"bsb_number":"bsb_number","fingerprint":"fingerprint","last4":"last4"},"bacs_debit":{"fingerprint":"fingerprint","last4":"last4","sort_code":"sort_code"},"bancontact":{},"billing_details":{"address":{"city":"city","country":"country","line1":"line1","line2":"line2","postal_code":"postal_code","state":"state"},"email":"email","name":"name","phone":"phone"},"blik":{},"boleto":{"tax_id":"tax_id"},"card":{"brand":"brand","checks":{"address_line1_check":"address_line1_check","address_postal_code_check":"address_postal_code_check","cvc_check":"cvc_check"},"country":"country","description":"description","display_brand":"display_brand","exp_month":40417826,"exp_year":1940618977,"fingerprint":"fingerprint","funding":"funding","iin":"iin","issuer":"issuer","last4":"last4","networks":{"available":["available"],"preferred":"preferred"},"three_d_secure_usage":{"supported":true},"wallet":{"amex_express_checkout":{},"apple_pay":{},"dynamic_last4":"dynamic_last4","google_pay":{},"link":{},"masterpass":{"billing_address":{"city":"city","country":"country","line1":"line1","line2":"line2","postal_code":"postal_code","state":"state"},"email":"email","name":"name","shipping_address":{"city":"city","country":"country","line1":"line1","line2":"line2","postal_code":"postal_code","state":"state"}},"samsung_pay":{},"type":"link","visa_checkout":{"billing_address":{"city":"city","country":"country","line1":"line1","line2":"line2","postal_code":"postal_code","state":"state"},"email":"email","name":"name","shipping_address":{"city":"city","country":"country","line1":"line1","line2":"line2","postal_code":"postal_code","state":"state"}}}},"card_present":{"brand":"brand","cardholder_name":"cardholder_name","country":"country","description":"description","exp_month":40417826,"exp_year":1940618977,"fingerprint":"fingerprint","funding":"funding","iin":"iin","issuer":"issuer","last4":"last4","networks":{"available":["available"],"preferred":"preferred"},"read_method":"magnetic_stripe_track2"},"cashapp":{"buyer_id":"buyer_id","cashtag":"cashtag"},"created":"1028554472","customer":null,"customer_balance":{},"eps":{"bank":"btv_vier_lander_bank"},"fpx":{"account_holder_type":"individual","bank":"bsn"},"giropay":{},"grabpay":{},"id":"obj_123","ideal":{"bank":"sns_bank","bic":"BUNQNL2A"},"interac_present":{"brand":"brand","cardholder_name":"cardholder_name","country":"country","description":"description","exp_month":40417826,"exp_year":1940618977,"fingerprint":"fingerprint","funding":"funding","iin":"iin","issuer":"issuer","last4":"last4","networks":{"available":["available"],"preferred":"preferred"},"preferred_locales":["preferred_locales"],"read_method":"magnetic_stripe_track2"},"klarna":{"dob":{"day":99228,"month":104080000,"year":3704893}},"konbini":{},"link":{"email":"email","persistent_token":"persistent_token"},"livemode":true,"metadata":{"undefined":"metadata"},"mobilepay":{},"object":"payment_method","oxxo":{},"p24":{"bank":"noble_pay"},"paynow":{},"paypal":{"payer_email":"payer_email","payer_id":"payer_id"},"pix":{},"promptpay":{},"radar_options":{"session":"session"},"revolut_pay":{},"sepa_debit":{"bank_code":"bank_code","branch_code":"branch_code","country":"country","fingerprint":"fingerprint","generated_from":{"charge":null,"setup_attempt":null},"last4":"last4"},"sofort":{"country":"country"},"swish":{},"type":"interac_present","us_bank_account":{"account_holder_type":"individual","account_type":"checking","bank_name":"bank_name","financial_connections_account":"financial_connections_account","fingerprint":"fingerprint","last4":"last4","networks":{"preferred":"preferred","supported":["ach"]},"routing_number":"routing_number","status_details":{"blocked":{"network_code":"R29","reason":"bank_account_unusable"}}},"wechat_pay":{},"zip":{}},"footer":"footer","rendering_options":{"amount_tax_display":"amount_tax_display"}},"livemode":true,"metadata":{"undefined":"metadata"},"name":"name","next_invoice_sequence":1356358751,"object":"customer","phone":"phone","preferred_locales":["preferred_locales"],"shipping":{"address":{"city":"city","country":"country","line1":"line1","line2":"line2","postal_code":"postal_code","state":"state"},"carrier":"carrier","name":"name","phone":"phone","tracking_number":"tracking_number"},"sources":null,"subscriptions":null,"tax":{"automatic_tax":"unrecognized_location","ip_address":"ip_address","location":{"country":"country","source":"ip_address","state":"state"}},"tax_exempt":"reverse","tax_ids":null,"test_clock":{"created":"1028554472","deletes_after":"73213179","frozen_time":"2033541876","id":"obj_123","livemode":true,"name":"name","object":"test_helpers.test_clock","status":"advancing"}},"id":"obj_123","livemode":true,"object":"tax_id","owner":{"account":{"business_profile":{"annual_revenue":{"amount":1413853096,"currency":"currency","fiscal_year_end":"fiscal_year_end"},"estimated_worker_count":884794319,"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","amazon_pay_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","mobilepay_payments":"pending","oxxo_payments":"pending","p24_payments":"inactive","paynow_payments":"active","promptpay_payments":"active","revolut_pay_payments":"inactive","sepa_debit_payments":"inactive","sofort_payments":"active","swish_payments":"inactive","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":"single_member_llc","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":"invalid_url_website_incomplete_under_construction","reason":"reason","requirement":"requirement"}],"eventually_due":["eventually_due"],"past_due":["past_due"],"pending_verification":["pending_verification"]},"id":"obj_123","individual":{"account":"account","additional_tos_acceptances":{"account":{"date":"3076014","ip":"ip","user_agent":"user_agent"}},"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":"invalid_url_website_incomplete_under_construction","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,"legal_guardian":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":"invalid_url_website_incomplete_under_construction","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":null,"details":"details","details_code":"details_code","front":null},"details":"details","details_code":"details_code","document":{"back":null,"details":"details","details_code":"details_code","front":null},"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":"invalid_url_website_incomplete_under_construction","reason":"reason","requirement":"requirement"}],"eventually_due":["eventually_due"],"past_due":["past_due"],"pending_verification":["pending_verification"]},"settings":{"bacs_debit_payments":{"display_name":"display_name","service_user_number":"service_user_number"},"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"},"invoices":{"default_account_tax_ids":[{"country":"country","created":"1028554472","customer":null,"id":"obj_123","livemode":true,"object":"tax_id","owner":{"account":null,"application":null,"customer":null,"type":"customer"},"type":"jp_cn","value":"value","verification":{"status":"unverified","verified_address":"verified_address","verified_name":"verified_name"}}]},"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"},"application":{"id":"obj_123","name":"name","object":"application"},"customer":{"address":{"city":"city","country":"country","line1":"line1","line2":"line2","postal_code":"postal_code","state":"state"},"balance":339185956,"cash_balance":{"available":{"undefined":733902135},"customer":"customer","livemode":true,"object":"cash_balance","settings":{"reconciliation_mode":"manual","using_merchant_default":true}},"created":"1028554472","currency":"currency","default_source":null,"delinquent":true,"description":"description","discount":{"checkout_session":"checkout_session","coupon":null,"customer":null,"end":"100571","id":"obj_123","invoice":"invoice","invoice_item":"invoice_item","object":"discount","promotion_code":null,"start":"109757538","subscription":"subscription","subscription_item":"subscription_item"},"email":"email","id":"obj_123","invoice_credit_balance":{"undefined":1267696360},"invoice_prefix":"invoice_prefix","invoice_settings":{"custom_fields":[{"name":"name","value":"value"}],"default_payment_method":{"acss_debit":{"bank_name":"bank_name","fingerprint":"fingerprint","institution_number":"institution_number","last4":"last4","transit_number":"transit_number"},"affirm":{},"afterpay_clearpay":{},"alipay":{},"au_becs_debit":{"bsb_number":"bsb_number","fingerprint":"fingerprint","last4":"last4"},"bacs_debit":{"fingerprint":"fingerprint","last4":"last4","sort_code":"sort_code"},"bancontact":{},"billing_details":{"address":{"city":"city","country":"country","line1":"line1","line2":"line2","postal_code":"postal_code","state":"state"},"email":"email","name":"name","phone":"phone"},"blik":{},"boleto":{"tax_id":"tax_id"},"card":{"brand":"brand","checks":{"address_line1_check":"address_line1_check","address_postal_code_check":"address_postal_code_check","cvc_check":"cvc_check"},"country":"country","description":"description","display_brand":"display_brand","exp_month":40417826,"exp_year":1940618977,"fingerprint":"fingerprint","funding":"funding","iin":"iin","issuer":"issuer","last4":"last4","networks":{"available":["available"],"preferred":"preferred"},"three_d_secure_usage":{"supported":true},"wallet":{"amex_express_checkout":{},"apple_pay":{},"dynamic_last4":"dynamic_last4","google_pay":{},"link":{},"masterpass":{"billing_address":{"city":"city","country":"country","line1":"line1","line2":"line2","postal_code":"postal_code","state":"state"},"email":"email","name":"name","shipping_address":{"city":"city","country":"country","line1":"line1","line2":"line2","postal_code":"postal_code","state":"state"}},"samsung_pay":{},"type":"link","visa_checkout":{"billing_address":{"city":"city","country":"country","line1":"line1","line2":"line2","postal_code":"postal_code","state":"state"},"email":"email","name":"name","shipping_address":{"city":"city","country":"country","line1":"line1","line2":"line2","postal_code":"postal_code","state":"state"}}}},"card_present":{"brand":"brand","cardholder_name":"cardholder_name","country":"country","description":"description","exp_month":40417826,"exp_year":1940618977,"fingerprint":"fingerprint","funding":"funding","iin":"iin","issuer":"issuer","last4":"last4","networks":{"available":["available"],"preferred":"preferred"},"read_method":"magnetic_stripe_track2"},"cashapp":{"buyer_id":"buyer_id","cashtag":"cashtag"},"created":"1028554472","customer":null,"customer_balance":{},"eps":{"bank":"btv_vier_lander_bank"},"fpx":{"account_holder_type":"individual","bank":"bsn"},"giropay":{},"grabpay":{},"id":"obj_123","ideal":{"bank":"sns_bank","bic":"BUNQNL2A"},"interac_present":{"brand":"brand","cardholder_name":"cardholder_name","country":"country","description":"description","exp_month":40417826,"exp_year":1940618977,"fingerprint":"fingerprint","funding":"funding","iin":"iin","issuer":"issuer","last4":"last4","networks":{"available":["available"],"preferred":"preferred"},"preferred_locales":["preferred_locales"],"read_method":"magnetic_stripe_track2"},"klarna":{"dob":{"day":99228,"month":104080000,"year":3704893}},"konbini":{},"link":{"email":"email","persistent_token":"persistent_token"},"livemode":true,"metadata":{"undefined":"metadata"},"mobilepay":{},"object":"payment_method","oxxo":{},"p24":{"bank":"noble_pay"},"paynow":{},"paypal":{"payer_email":"payer_email","payer_id":"payer_id"},"pix":{},"promptpay":{},"radar_options":{"session":"session"},"revolut_pay":{},"sepa_debit":{"bank_code":"bank_code","branch_code":"branch_code","country":"country","fingerprint":"fingerprint","generated_from":{"charge":null,"setup_attempt":null},"last4":"last4"},"sofort":{"country":"country"},"swish":{},"type":"interac_present","us_bank_account":{"account_holder_type":"individual","account_type":"checking","bank_name":"bank_name","financial_connections_account":"financial_connections_account","fingerprint":"fingerprint","last4":"last4","networks":{"preferred":"preferred","supported":["ach"]},"routing_number":"routing_number","status_details":{"blocked":{"network_code":"R29","reason":"bank_account_unusable"}}},"wechat_pay":{},"zip":{}},"footer":"footer","rendering_options":{"amount_tax_display":"amount_tax_display"}},"livemode":true,"metadata":{"undefined":"metadata"},"name":"name","next_invoice_sequence":1356358751,"object":"customer","phone":"phone","preferred_locales":["preferred_locales"],"shipping":{"address":{"city":"city","country":"country","line1":"line1","line2":"line2","postal_code":"postal_code","state":"state"},"carrier":"carrier","name":"name","phone":"phone","tracking_number":"tracking_number"},"sources":null,"subscriptions":null,"tax":{"automatic_tax":"unrecognized_location","ip_address":"ip_address","location":{"country":"country","source":"ip_address","state":"state"}},"tax_exempt":"reverse","tax_ids":null,"test_clock":{"created":"1028554472","deletes_after":"73213179","frozen_time":"2033541876","id":"obj_123","livemode":true,"name":"name","object":"test_helpers.test_clock","status":"advancing"}},"type":"customer"},"type":"jp_cn","value":"value","verification":{"status":"unverified","verified_address":"verified_address","verified_name":"verified_name"}}]},"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":{"annual_revenue":{"amount":1413853096,"currency":"currency","fiscal_year_end":"fiscal_year_end"},"estimated_worker_count":884794319,"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","amazon_pay_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","mobilepay_payments":"pending","oxxo_payments":"pending","p24_payments":"inactive","paynow_payments":"active","promptpay_payments":"active","revolut_pay_payments":"inactive","sepa_debit_payments":"inactive","sofort_payments":"active","swish_payments":"inactive","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":"single_member_llc","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":{"fees":{"payer":"application"},"is_controller":true,"losses":{"payments":"stripe"},"requirement_collection":"application","stripe_dashboard":{"type":"express"},"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":"invalid_url_website_incomplete_under_construction","reason":"reason","requirement":"requirement"}],"eventually_due":["eventually_due"],"past_due":["past_due"],"pending_verification":["pending_verification"]},"id":"obj_123","individual":{"account":"account","additional_tos_acceptances":{"account":{"date":"3076014","ip":"ip","user_agent":"user_agent"}},"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":"invalid_url_website_incomplete_under_construction","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,"legal_guardian":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":"invalid_url_website_incomplete_under_construction","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":"invalid_url_website_incomplete_under_construction","reason":"reason","requirement":"requirement"}],"eventually_due":["eventually_due"],"past_due":["past_due"],"pending_verification":["pending_verification"]},"settings":{"bacs_debit_payments":{"display_name":"display_name","service_user_number":"service_user_number"},"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"},"invoices":{"default_account_tax_ids":[{"country":"country","created":"1028554472","customer":{"address":{"city":"city","country":"country","line1":"line1","line2":"line2","postal_code":"postal_code","state":"state"},"balance":339185956,"cash_balance":{"available":{"undefined":733902135},"customer":"customer","livemode":true,"object":"cash_balance","settings":{"reconciliation_mode":"manual","using_merchant_default":true}},"created":"1028554472","currency":"currency","default_source":null,"delinquent":true,"description":"description","discount":{"checkout_session":"checkout_session","coupon":null,"customer":null,"end":"100571","id":"obj_123","invoice":"invoice","invoice_item":"invoice_item","object":"discount","promotion_code":null,"start":"109757538","subscription":"subscription","subscription_item":"subscription_item"},"email":"email","id":"obj_123","invoice_credit_balance":{"undefined":1267696360},"invoice_prefix":"invoice_prefix","invoice_settings":{"custom_fields":[{"name":"name","value":"value"}],"default_payment_method":{"acss_debit":{"bank_name":"bank_name","fingerprint":"fingerprint","institution_number":"institution_number","last4":"last4","transit_number":"transit_number"},"affirm":{},"afterpay_clearpay":{},"alipay":{},"au_becs_debit":{"bsb_number":"bsb_number","fingerprint":"fingerprint","last4":"last4"},"bacs_debit":{"fingerprint":"fingerprint","last4":"last4","sort_code":"sort_code"},"bancontact":{},"billing_details":{"address":{"city":"city","country":"country","line1":"line1","line2":"line2","postal_code":"postal_code","state":"state"},"email":"email","name":"name","phone":"phone"},"blik":{},"boleto":{"tax_id":"tax_id"},"card":{"brand":"brand","checks":{"address_line1_check":"address_line1_check","address_postal_code_check":"address_postal_code_check","cvc_check":"cvc_check"},"country":"country","description":"description","display_brand":"display_brand","exp_month":40417826,"exp_year":1940618977,"fingerprint":"fingerprint","funding":"funding","iin":"iin","issuer":"issuer","last4":"last4","networks":{"available":["available"],"preferred":"preferred"},"three_d_secure_usage":{"supported":true},"wallet":{"amex_express_checkout":{},"apple_pay":{},"dynamic_last4":"dynamic_last4","google_pay":{},"link":{},"masterpass":{"billing_address":{"city":"city","country":"country","line1":"line1","line2":"line2","postal_code":"postal_code","state":"state"},"email":"email","name":"name","shipping_address":{"city":"city","country":"country","line1":"line1","line2":"line2","postal_code":"postal_code","state":"state"}},"samsung_pay":{},"type":"link","visa_checkout":{"billing_address":{"city":"city","country":"country","line1":"line1","line2":"line2","postal_code":"postal_code","state":"state"},"email":"email","name":"name","shipping_address":{"city":"city","country":"country","line1":"line1","line2":"line2","postal_code":"postal_code","state":"state"}}}},"card_present":{"brand":"brand","cardholder_name":"cardholder_name","country":"country","description":"description","exp_month":40417826,"exp_year":1940618977,"fingerprint":"fingerprint","funding":"funding","iin":"iin","issuer":"issuer","last4":"last4","networks":{"available":["available"],"preferred":"preferred"},"read_method":"magnetic_stripe_track2"},"cashapp":{"buyer_id":"buyer_id","cashtag":"cashtag"},"created":"1028554472","customer":null,"customer_balance":{},"eps":{"bank":"btv_vier_lander_bank"},"fpx":{"account_holder_type":"individual","bank":"bsn"},"giropay":{},"grabpay":{},"id":"obj_123","ideal":{"bank":"sns_bank","bic":"BUNQNL2A"},"interac_present":{"brand":"brand","cardholder_name":"cardholder_name","country":"country","description":"description","exp_month":40417826,"exp_year":1940618977,"fingerprint":"fingerprint","funding":"funding","iin":"iin","issuer":"issuer","last4":"last4","networks":{"available":["available"],"preferred":"preferred"},"preferred_locales":["preferred_locales"],"read_method":"magnetic_stripe_track2"},"klarna":{"dob":{"day":99228,"month":104080000,"year":3704893}},"konbini":{},"link":{"email":"email","persistent_token":"persistent_token"},"livemode":true,"metadata":{"undefined":"metadata"},"mobilepay":{},"object":"payment_method","oxxo":{},"p24":{"bank":"noble_pay"},"paynow":{},"paypal":{"payer_email":"payer_email","payer_id":"payer_id"},"pix":{},"promptpay":{},"radar_options":{"session":"session"},"revolut_pay":{},"sepa_debit":{"bank_code":"bank_code","branch_code":"branch_code","country":"country","fingerprint":"fingerprint","generated_from":{"charge":null,"setup_attempt":null},"last4":"last4"},"sofort":{"country":"country"},"swish":{},"type":"interac_present","us_bank_account":{"account_holder_type":"individual","account_type":"checking","bank_name":"bank_name","financial_connections_account":"financial_connections_account","fingerprint":"fingerprint","last4":"last4","networks":{"preferred":"preferred","supported":["ach"]},"routing_number":"routing_number","status_details":{"blocked":{"network_code":"R29","reason":"bank_account_unusable"}}},"wechat_pay":{},"zip":{}},"footer":"footer","rendering_options":{"amount_tax_display":"amount_tax_display"}},"livemode":true,"metadata":{"undefined":"metadata"},"name":"name","next_invoice_sequence":1356358751,"object":"customer","phone":"phone","preferred_locales":["preferred_locales"],"shipping":{"address":{"city":"city","country":"country","line1":"line1","line2":"line2","postal_code":"postal_code","state":"state"},"carrier":"carrier","name":"name","phone":"phone","tracking_number":"tracking_number"},"sources":null,"subscriptions":null,"tax":{"automatic_tax":"unrecognized_location","ip_address":"ip_address","location":{"country":"country","source":"ip_address","state":"state"}},"tax_exempt":"reverse","tax_ids":null,"test_clock":{"created":"1028554472","deletes_after":"73213179","frozen_time":"2033541876","id":"obj_123","livemode":true,"name":"name","object":"test_helpers.test_clock","status":"advancing"}},"id":"obj_123","livemode":true,"object":"tax_id","owner":{"account":{"business_profile":{"annual_revenue":{"amount":1413853096,"currency":"currency","fiscal_year_end":"fiscal_year_end"},"estimated_worker_count":884794319,"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","amazon_pay_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","mobilepay_payments":"pending","oxxo_payments":"pending","p24_payments":"inactive","paynow_payments":"active","promptpay_payments":"active","revolut_pay_payments":"inactive","sepa_debit_payments":"inactive","sofort_payments":"active","swish_payments":"inactive","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":"single_member_llc","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":{"fees":{"payer":"application"},"is_controller":true,"losses":{"payments":"stripe"},"requirement_collection":"application","stripe_dashboard":{"type":"express"},"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":"invalid_url_website_incomplete_under_construction","reason":"reason","requirement":"requirement"}],"eventually_due":["eventually_due"],"past_due":["past_due"],"pending_verification":["pending_verification"]},"id":"obj_123","individual":{"account":"account","additional_tos_acceptances":{"account":{"date":"3076014","ip":"ip","user_agent":"user_agent"}},"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":"invalid_url_website_incomplete_under_construction","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,"legal_guardian":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":"invalid_url_website_incomplete_under_construction","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":null,"details":"details","details_code":"details_code","front":null},"details":"details","details_code":"details_code","document":{"back":null,"details":"details","details_code":"details_code","front":null},"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":"invalid_url_website_incomplete_under_construction","reason":"reason","requirement":"requirement"}],"eventually_due":["eventually_due"],"past_due":["past_due"],"pending_verification":["pending_verification"]},"settings":{"bacs_debit_payments":{"display_name":"display_name","service_user_number":"service_user_number"},"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"},"invoices":{"default_account_tax_ids":[{"country":"country","created":"1028554472","customer":null,"id":"obj_123","livemode":true,"object":"tax_id","owner":{"account":null,"application":null,"customer":null,"type":"customer"},"type":"jp_cn","value":"value","verification":{"status":"unverified","verified_address":"verified_address","verified_name":"verified_name"}}]},"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":"none"},"application":{"id":"obj_123","name":"name","object":"application"},"customer":{"address":{"city":"city","country":"country","line1":"line1","line2":"line2","postal_code":"postal_code","state":"state"},"balance":339185956,"cash_balance":{"available":{"undefined":733902135},"customer":"customer","livemode":true,"object":"cash_balance","settings":{"reconciliation_mode":"manual","using_merchant_default":true}},"created":"1028554472","currency":"currency","default_source":null,"delinquent":true,"description":"description","discount":{"checkout_session":"checkout_session","coupon":null,"customer":null,"end":"100571","id":"obj_123","invoice":"invoice","invoice_item":"invoice_item","object":"discount","promotion_code":null,"start":"109757538","subscription":"subscription","subscription_item":"subscription_item"},"email":"email","id":"obj_123","invoice_credit_balance":{"undefined":1267696360},"invoice_prefix":"invoice_prefix","invoice_settings":{"custom_fields":[{"name":"name","value":"value"}],"default_payment_method":{"acss_debit":{"bank_name":"bank_name","fingerprint":"fingerprint","institution_number":"institution_number","last4":"last4","transit_number":"transit_number"},"affirm":{},"afterpay_clearpay":{},"alipay":{},"au_becs_debit":{"bsb_number":"bsb_number","fingerprint":"fingerprint","last4":"last4"},"bacs_debit":{"fingerprint":"fingerprint","last4":"last4","sort_code":"sort_code"},"bancontact":{},"billing_details":{"address":{"city":"city","country":"country","line1":"line1","line2":"line2","postal_code":"postal_code","state":"state"},"email":"email","name":"name","phone":"phone"},"blik":{},"boleto":{"tax_id":"tax_id"},"card":{"brand":"brand","checks":{"address_line1_check":"address_line1_check","address_postal_code_check":"address_postal_code_check","cvc_check":"cvc_check"},"country":"country","description":"description","display_brand":"display_brand","exp_month":40417826,"exp_year":1940618977,"fingerprint":"fingerprint","funding":"funding","iin":"iin","issuer":"issuer","last4":"last4","networks":{"available":["available"],"preferred":"preferred"},"three_d_secure_usage":{"supported":true},"wallet":{"amex_express_checkout":{},"apple_pay":{},"dynamic_last4":"dynamic_last4","google_pay":{},"link":{},"masterpass":{"billing_address":{"city":"city","country":"country","line1":"line1","line2":"line2","postal_code":"postal_code","state":"state"},"email":"email","name":"name","shipping_address":{"city":"city","country":"country","line1":"line1","line2":"line2","postal_code":"postal_code","state":"state"}},"samsung_pay":{},"type":"link","visa_checkout":{"billing_address":{"city":"city","country":"country","line1":"line1","line2":"line2","postal_code":"postal_code","state":"state"},"email":"email","name":"name","shipping_address":{"city":"city","country":"country","line1":"line1","line2":"line2","postal_code":"postal_code","state":"state"}}}},"card_present":{"brand":"brand","cardholder_name":"cardholder_name","country":"country","description":"description","exp_month":40417826,"exp_year":1940618977,"fingerprint":"fingerprint","funding":"funding","iin":"iin","issuer":"issuer","last4":"last4","networks":{"available":["available"],"preferred":"preferred"},"read_method":"magnetic_stripe_track2"},"cashapp":{"buyer_id":"buyer_id","cashtag":"cashtag"},"created":"1028554472","customer":null,"customer_balance":{},"eps":{"bank":"btv_vier_lander_bank"},"fpx":{"account_holder_type":"individual","bank":"bsn"},"giropay":{},"grabpay":{},"id":"obj_123","ideal":{"bank":"sns_bank","bic":"BUNQNL2A"},"interac_present":{"brand":"brand","cardholder_name":"cardholder_name","country":"country","description":"description","exp_month":40417826,"exp_year":1940618977,"fingerprint":"fingerprint","funding":"funding","iin":"iin","issuer":"issuer","last4":"last4","networks":{"available":["available"],"preferred":"preferred"},"preferred_locales":["preferred_locales"],"read_method":"magnetic_stripe_track2"},"klarna":{"dob":{"day":99228,"month":104080000,"year":3704893}},"konbini":{},"link":{"email":"email","persistent_token":"persistent_token"},"livemode":true,"metadata":{"undefined":"metadata"},"mobilepay":{},"object":"payment_method","oxxo":{},"p24":{"bank":"noble_pay"},"paynow":{},"paypal":{"payer_email":"payer_email","payer_id":"payer_id"},"pix":{},"promptpay":{},"radar_options":{"session":"session"},"revolut_pay":{},"sepa_debit":{"bank_code":"bank_code","branch_code":"branch_code","country":"country","fingerprint":"fingerprint","generated_from":{"charge":null,"setup_attempt":null},"last4":"last4"},"sofort":{"country":"country"},"swish":{},"type":"interac_present","us_bank_account":{"account_holder_type":"individual","account_type":"checking","bank_name":"bank_name","financial_connections_account":"financial_connections_account","fingerprint":"fingerprint","last4":"last4","networks":{"preferred":"preferred","supported":["ach"]},"routing_number":"routing_number","status_details":{"blocked":{"network_code":"R29","reason":"bank_account_unusable"}}},"wechat_pay":{},"zip":{}},"footer":"footer","rendering_options":{"amount_tax_display":"amount_tax_display"}},"livemode":true,"metadata":{"undefined":"metadata"},"name":"name","next_invoice_sequence":1356358751,"object":"customer","phone":"phone","preferred_locales":["preferred_locales"],"shipping":{"address":{"city":"city","country":"country","line1":"line1","line2":"line2","postal_code":"postal_code","state":"state"},"carrier":"carrier","name":"name","phone":"phone","tracking_number":"tracking_number"},"sources":null,"subscriptions":null,"tax":{"automatic_tax":"unrecognized_location","ip_address":"ip_address","location":{"country":"country","source":"ip_address","state":"state"}},"tax_exempt":"reverse","tax_ids":null,"test_clock":{"created":"1028554472","deletes_after":"73213179","frozen_time":"2033541876","id":"obj_123","livemode":true,"name":"name","object":"test_helpers.test_clock","status":"advancing"}},"type":"customer"},"type":"jp_cn","value":"value","verification":{"status":"unverified","verified_address":"verified_address","verified_name":"verified_name"}}]},"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":"none"}', }, ]); const account = await stripe.accounts.retrieve('acc_123'); diff --git a/types/Accounts.d.ts b/types/Accounts.d.ts index d18fffca25..316cf995f5 100644 --- a/types/Accounts.d.ts +++ b/types/Accounts.d.ts @@ -727,11 +727,22 @@ declare module 'stripe' { } interface Controller { + fees?: Controller.Fees; + /** * `true` if the Connect application retrieving the resource controls the account and can therefore exercise [platform controls](https://stripe.com/docs/connect/platform-controls-for-standard-accounts). Otherwise, this field is null. */ is_controller?: boolean; + losses?: Controller.Losses; + + /** + * A value indicating responsibility for collecting requirements on this account. Only returned when the Connect application retrieving the resource controls the account. + */ + requirement_collection?: Controller.RequirementCollection; + + stripe_dashboard?: Controller.StripeDashboard; + /** * The controller type. Can be `application`, if a Connect application controls the account, or `account`, if the account controls itself. */ @@ -739,6 +750,45 @@ declare module 'stripe' { } namespace Controller { + interface Fees { + /** + * A value indicating the responsible payer of a bundle of Stripe fees for pricing-control eligible products on this account. + */ + payer: Fees.Payer; + } + + namespace Fees { + type Payer = + | 'account' + | 'application' + | 'application_custom' + | 'application_express'; + } + + interface Losses { + /** + * A value indicating who is liable when this account can't pay back negative balances from payments. + */ + payments: Losses.Payments; + } + + namespace Losses { + type Payments = 'application' | 'stripe'; + } + + type RequirementCollection = 'application' | 'stripe'; + + interface StripeDashboard { + /** + * A value indicating the Stripe dashboard this account has access to independent of the Connect application. + */ + type: StripeDashboard.Type; + } + + namespace StripeDashboard { + type Type = 'express' | 'full' | 'none'; + } + type Type = 'account' | 'application'; } @@ -1322,7 +1372,7 @@ declare module 'stripe' { user_agent?: string | null; } - type Type = 'custom' | 'express' | 'standard'; + type Type = 'custom' | 'express' | 'none' | 'standard'; } /** diff --git a/types/AccountsResource.d.ts b/types/AccountsResource.d.ts index f60865cca5..6e9f453090 100644 --- a/types/AccountsResource.d.ts +++ b/types/AccountsResource.d.ts @@ -28,6 +28,11 @@ declare module 'stripe' { */ company?: AccountCreateParams.Company; + /** + * A hash of configuration describing the account controller's attributes. + */ + controller?: AccountCreateParams.Controller; + /** * The country in which the account holder resides, or in which the business is legally established. This should be an ISO 3166-1 alpha-2 country code. For example, if you are in the United States and the business for which you're creating an account is legally represented in Canada, you would use `CA` as the country for the account being created. Available countries include [Stripe's global markets](https://stripe.com/global) as well as countries where [cross-border payouts](https://stripe.com/docs/connect/cross-border-payouts) are supported. */ @@ -827,6 +832,65 @@ declare module 'stripe' { } } + interface Controller { + /** + * A hash of configuration for who pays Stripe fees for product usage on this account. + */ + fees?: Controller.Fees; + + /** + * A hash of configuration for products that have negative balance liability, and whether Stripe or a Connect application is responsible for them. + */ + losses?: Controller.Losses; + + /** + * A value indicating responsibility for collecting updated information when requirements on the account are due or change. Defaults to `stripe`. + */ + requirement_collection?: Controller.RequirementCollection; + + /** + * A hash of configuration for Stripe-hosted dashboards. + */ + stripe_dashboard?: Controller.StripeDashboard; + } + + namespace Controller { + interface Fees { + /** + * A value indicating the responsible payer of Stripe fees on this account. Defaults to `account`. + */ + payer?: Fees.Payer; + } + + namespace Fees { + type Payer = 'account' | 'application'; + } + + interface Losses { + /** + * A value indicating who is liable when this account can't pay back negative balances resulting from payments. Defaults to `stripe`. + */ + payments?: Losses.Payments; + } + + namespace Losses { + type Payments = 'application' | 'stripe'; + } + + type RequirementCollection = 'application' | 'stripe'; + + interface StripeDashboard { + /** + * Whether this account should have access to the full Stripe Dashboard (`full`), to the Express Dashboard (`express`), or to no Stripe-hosted dashboard (`none`). Defaults to `full`. + */ + type?: StripeDashboard.Type; + } + + namespace StripeDashboard { + type Type = 'express' | 'full' | 'none'; + } + } + interface Documents { /** * One or more documents that support the [Bank account ownership verification](https://support.stripe.com/questions/bank-account-ownership-verification) requirement. Must be a document associated with the account's primary active bank account that displays the last 4 digits of the account number, either a statement or a voided check. From 8db992d6e05381a9cd7fe146fef5a2149af2e972 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Mon, 8 Apr 2024 22:20:30 +0000 Subject: [PATCH 4/7] Update generated code for v937 --- OPENAPI_VERSION | 2 +- types/Invoices.d.ts | 12 ----------- types/InvoicesResource.d.ts | 40 ------------------------------------- 3 files changed, 1 insertion(+), 53 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index b5dadb32d8..56064147e7 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v936 \ No newline at end of file +v937 \ No newline at end of file diff --git a/types/Invoices.d.ts b/types/Invoices.d.ts index cddbc56943..d769fe2d3d 100644 --- a/types/Invoices.d.ts +++ b/types/Invoices.d.ts @@ -377,11 +377,6 @@ declare module 'stripe' { */ rendering: Invoice.Rendering | null; - /** - * This is a legacy field that will be removed soon. For details about `rendering_options`, refer to `rendering` instead. Options for invoice PDF rendering. - */ - rendering_options: Invoice.RenderingOptions | null; - /** * The details of the cost of shipping, including the ShippingRate applied on the invoice. */ @@ -1187,13 +1182,6 @@ declare module 'stripe' { } } - interface RenderingOptions { - /** - * How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. - */ - amount_tax_display: string | null; - } - interface ShippingCost { /** * Total shipping cost before any taxes are applied. diff --git a/types/InvoicesResource.d.ts b/types/InvoicesResource.d.ts index 6f3b789d22..1a554538ff 100644 --- a/types/InvoicesResource.d.ts +++ b/types/InvoicesResource.d.ts @@ -133,13 +133,6 @@ declare module 'stripe' { */ rendering?: InvoiceCreateParams.Rendering; - /** - * This is a legacy field that will be removed soon. For details about `rendering_options`, refer to `rendering` instead. Options for invoice PDF rendering. - */ - rendering_options?: Stripe.Emptyable< - InvoiceCreateParams.RenderingOptions - >; - /** * Settings for the cost of shipping for this invoice. */ @@ -548,19 +541,6 @@ declare module 'stripe' { } } - interface RenderingOptions { - /** - * How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. One of `exclude_tax` or `include_inclusive_tax`. `include_inclusive_tax` will include inclusive tax (and exclude exclusive tax) in invoice PDF amounts. `exclude_tax` will exclude all tax (inclusive and exclusive alike) from invoice PDF amounts. - */ - amount_tax_display?: Stripe.Emptyable< - RenderingOptions.AmountTaxDisplay - >; - } - - namespace RenderingOptions { - type AmountTaxDisplay = 'exclude_tax' | 'include_inclusive_tax'; - } - interface ShippingCost { /** * The ID of the shipping rate to use for this order. @@ -847,13 +827,6 @@ declare module 'stripe' { */ rendering?: InvoiceUpdateParams.Rendering; - /** - * This is a legacy field that will be removed soon. For details about `rendering_options`, refer to `rendering` instead. Options for invoice PDF rendering. - */ - rendering_options?: Stripe.Emptyable< - InvoiceUpdateParams.RenderingOptions - >; - /** * Settings for the cost of shipping for this invoice. */ @@ -1240,19 +1213,6 @@ declare module 'stripe' { } } - interface RenderingOptions { - /** - * How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. One of `exclude_tax` or `include_inclusive_tax`. `include_inclusive_tax` will include inclusive tax (and exclude exclusive tax) in invoice PDF amounts. `exclude_tax` will exclude all tax (inclusive and exclusive alike) from invoice PDF amounts. - */ - amount_tax_display?: Stripe.Emptyable< - RenderingOptions.AmountTaxDisplay - >; - } - - namespace RenderingOptions { - type AmountTaxDisplay = 'exclude_tax' | 'include_inclusive_tax'; - } - interface ShippingCost { /** * The ID of the shipping rate to use for this order. From 97391a61bd6f0606b4ae4cf6244cf5360234093c Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Tue, 9 Apr 2024 17:27:46 +0000 Subject: [PATCH 5/7] Update generated code for v938 --- OPENAPI_VERSION | 2 +- src/resources.ts | 6 + .../Entitlements/ActiveEntitlements.ts | 15 +++ src/resources/Entitlements/Features.ts | 20 ++++ src/resources/Products.ts | 17 +++ .../MeterEventAdjustmentsResource.d.ts | 2 +- types/Entitlements/ActiveEntitlements.d.ts | 37 ++++++ .../ActiveEntitlementsResource.d.ts | 49 ++++++++ types/Entitlements/Features.d.ts | 48 ++++++++ types/Entitlements/FeaturesResource.d.ts | 108 ++++++++++++++++++ types/ProductFeatures.d.ts | 57 +++++++++ types/ProductsResource.d.ts | 80 +++++++++++++ types/Tax/CalculationsResource.d.ts | 5 +- types/index.d.ts | 9 ++ 14 files changed, 452 insertions(+), 3 deletions(-) create mode 100644 src/resources/Entitlements/ActiveEntitlements.ts create mode 100644 src/resources/Entitlements/Features.ts create mode 100644 types/Entitlements/ActiveEntitlements.d.ts create mode 100644 types/Entitlements/ActiveEntitlementsResource.d.ts create mode 100644 types/Entitlements/Features.d.ts create mode 100644 types/Entitlements/FeaturesResource.d.ts create mode 100644 types/ProductFeatures.d.ts diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 56064147e7..0374192988 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v937 \ No newline at end of file +v938 \ No newline at end of file diff --git a/src/resources.ts b/src/resources.ts index 40169097e5..2efed2525e 100644 --- a/src/resources.ts +++ b/src/resources.ts @@ -2,6 +2,7 @@ import {resourceNamespace} from './ResourceNamespace.js'; import {Accounts as FinancialConnectionsAccounts} from './resources/FinancialConnections/Accounts.js'; +import {ActiveEntitlements as EntitlementsActiveEntitlements} from './resources/Entitlements/ActiveEntitlements.js'; import {Authorizations as TestHelpersIssuingAuthorizations} from './resources/TestHelpers/Issuing/Authorizations.js'; import {Authorizations as IssuingAuthorizations} from './resources/Issuing/Authorizations.js'; import {Calculations as TaxCalculations} from './resources/Tax/Calculations.js'; @@ -17,6 +18,7 @@ import {Customers as TestHelpersCustomers} from './resources/TestHelpers/Custome import {DebitReversals as TreasuryDebitReversals} from './resources/Treasury/DebitReversals.js'; import {Disputes as IssuingDisputes} from './resources/Issuing/Disputes.js'; import {EarlyFraudWarnings as RadarEarlyFraudWarnings} from './resources/Radar/EarlyFraudWarnings.js'; +import {Features as EntitlementsFeatures} from './resources/Entitlements/Features.js'; import {FinancialAccounts as TreasuryFinancialAccounts} from './resources/Treasury/FinancialAccounts.js'; import {InboundTransfers as TestHelpersTreasuryInboundTransfers} from './resources/TestHelpers/Treasury/InboundTransfers.js'; import {InboundTransfers as TreasuryInboundTransfers} from './resources/Treasury/InboundTransfers.js'; @@ -133,6 +135,10 @@ export const Climate = resourceNamespace('climate', { Products: ClimateProducts, Suppliers: ClimateSuppliers, }); +export const Entitlements = resourceNamespace('entitlements', { + ActiveEntitlements: EntitlementsActiveEntitlements, + Features: EntitlementsFeatures, +}); export const FinancialConnections = resourceNamespace('financialConnections', { Accounts: FinancialConnectionsAccounts, Sessions: FinancialConnectionsSessions, diff --git a/src/resources/Entitlements/ActiveEntitlements.ts b/src/resources/Entitlements/ActiveEntitlements.ts new file mode 100644 index 0000000000..23ffa5dae6 --- /dev/null +++ b/src/resources/Entitlements/ActiveEntitlements.ts @@ -0,0 +1,15 @@ +// File generated from our OpenAPI spec + +import {StripeResource} from '../../StripeResource.js'; +const stripeMethod = StripeResource.method; +export const ActiveEntitlements = StripeResource.extend({ + retrieve: stripeMethod({ + method: 'GET', + fullPath: '/v1/entitlements/active_entitlements/{id}', + }), + list: stripeMethod({ + method: 'GET', + fullPath: '/v1/entitlements/active_entitlements', + methodType: 'list', + }), +}); diff --git a/src/resources/Entitlements/Features.ts b/src/resources/Entitlements/Features.ts new file mode 100644 index 0000000000..12c3ea28e7 --- /dev/null +++ b/src/resources/Entitlements/Features.ts @@ -0,0 +1,20 @@ +// File generated from our OpenAPI spec + +import {StripeResource} from '../../StripeResource.js'; +const stripeMethod = StripeResource.method; +export const Features = StripeResource.extend({ + create: stripeMethod({method: 'POST', fullPath: '/v1/entitlements/features'}), + retrieve: stripeMethod({ + method: 'GET', + fullPath: '/v1/entitlements/features/{id}', + }), + update: stripeMethod({ + method: 'POST', + fullPath: '/v1/entitlements/features/{id}', + }), + list: stripeMethod({ + method: 'GET', + fullPath: '/v1/entitlements/features', + methodType: 'list', + }), +}); diff --git a/src/resources/Products.ts b/src/resources/Products.ts index 9c79d46632..29551add76 100644 --- a/src/resources/Products.ts +++ b/src/resources/Products.ts @@ -12,6 +12,23 @@ export const Products = StripeResource.extend({ methodType: 'list', }), del: stripeMethod({method: 'DELETE', fullPath: '/v1/products/{id}'}), + createFeature: stripeMethod({ + method: 'POST', + fullPath: '/v1/products/{product}/features', + }), + deleteFeature: stripeMethod({ + method: 'DELETE', + fullPath: '/v1/products/{product}/features/{id}', + }), + listFeatures: stripeMethod({ + method: 'GET', + fullPath: '/v1/products/{product}/features', + methodType: 'list', + }), + retrieveFeature: stripeMethod({ + method: 'GET', + fullPath: '/v1/products/{product}/features/{id}', + }), search: stripeMethod({ method: 'GET', fullPath: '/v1/products/search', diff --git a/types/Billing/MeterEventAdjustmentsResource.d.ts b/types/Billing/MeterEventAdjustmentsResource.d.ts index 2c14ab6f57..159c34fdd2 100644 --- a/types/Billing/MeterEventAdjustmentsResource.d.ts +++ b/types/Billing/MeterEventAdjustmentsResource.d.ts @@ -28,7 +28,7 @@ declare module 'stripe' { namespace MeterEventAdjustmentCreateParams { interface Cancel { /** - * Unique identifier for the event. + * Unique identifier for the event. You can only cancel events within 24 hours of Stripe receiving them. */ identifier: string; } diff --git a/types/Entitlements/ActiveEntitlements.d.ts b/types/Entitlements/ActiveEntitlements.d.ts new file mode 100644 index 0000000000..2a2e651e04 --- /dev/null +++ b/types/Entitlements/ActiveEntitlements.d.ts @@ -0,0 +1,37 @@ +// File generated from our OpenAPI spec + +declare module 'stripe' { + namespace Stripe { + namespace Entitlements { + /** + * An active entitlement describes access to a feature for a customer. + */ + interface ActiveEntitlement { + /** + * Unique identifier for the object. + */ + id: string; + + /** + * String representing the object's type. Objects of the same type share the same value. + */ + object: 'entitlements.active_entitlement'; + + /** + * The feature that the customer is entitled to. + */ + feature: string; + + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ + livemode: boolean; + + /** + * A unique key you provide as your own system identifier. This may be up to 80 characters. + */ + lookup_key: string; + } + } + } +} diff --git a/types/Entitlements/ActiveEntitlementsResource.d.ts b/types/Entitlements/ActiveEntitlementsResource.d.ts new file mode 100644 index 0000000000..0cb83af44a --- /dev/null +++ b/types/Entitlements/ActiveEntitlementsResource.d.ts @@ -0,0 +1,49 @@ +// File generated from our OpenAPI spec + +declare module 'stripe' { + namespace Stripe { + namespace Entitlements { + interface ActiveEntitlementRetrieveParams { + /** + * Specifies which fields in the response should be expanded. + */ + expand?: Array; + } + + interface ActiveEntitlementListParams extends PaginationParams { + /** + * The ID of the customer. + */ + customer: string; + + /** + * Specifies which fields in the response should be expanded. + */ + expand?: Array; + } + + class ActiveEntitlementsResource { + /** + * Retrieve an active entitlement + */ + retrieve( + id: string, + params?: ActiveEntitlementRetrieveParams, + options?: RequestOptions + ): Promise>; + retrieve( + id: string, + options?: RequestOptions + ): Promise>; + + /** + * Retrieve a list of active entitlements for a customer + */ + list( + params: ActiveEntitlementListParams, + options?: RequestOptions + ): ApiListPromise; + } + } + } +} diff --git a/types/Entitlements/Features.d.ts b/types/Entitlements/Features.d.ts new file mode 100644 index 0000000000..c5fbd7e2e0 --- /dev/null +++ b/types/Entitlements/Features.d.ts @@ -0,0 +1,48 @@ +// File generated from our OpenAPI spec + +declare module 'stripe' { + namespace Stripe { + namespace Entitlements { + /** + * A feature represents a monetizable ability or functionality in your system. + * Features can be assigned to products, and when those products are purchased, Stripe will create an entitlement to the feature for the purchasing customer. + */ + interface Feature { + /** + * Unique identifier for the object. + */ + id: string; + + /** + * String representing the object's type. Objects of the same type share the same value. + */ + object: 'entitlements.feature'; + + /** + * Inactive features cannot be attached to new products and will not be returned from the features list endpoint. + */ + active: boolean; + + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ + livemode: boolean; + + /** + * A unique key you provide as your own system identifier. This may be up to 80 characters. + */ + lookup_key: string; + + /** + * Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + */ + metadata: Stripe.Metadata; + + /** + * The feature's name, for your own purpose, not meant to be displayable to the customer. + */ + name: string; + } + } + } +} diff --git a/types/Entitlements/FeaturesResource.d.ts b/types/Entitlements/FeaturesResource.d.ts new file mode 100644 index 0000000000..1f74c5b3f8 --- /dev/null +++ b/types/Entitlements/FeaturesResource.d.ts @@ -0,0 +1,108 @@ +// File generated from our OpenAPI spec + +declare module 'stripe' { + namespace Stripe { + namespace Entitlements { + interface FeatureCreateParams { + /** + * A unique key you provide as your own system identifier. This may be up to 80 characters. + */ + lookup_key: string; + + /** + * The feature's name, for your own purpose, not meant to be displayable to the customer. + */ + name: string; + + /** + * Specifies which fields in the response should be expanded. + */ + expand?: Array; + + /** + * Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + */ + metadata?: Stripe.MetadataParam; + } + + interface FeatureRetrieveParams { + /** + * Specifies which fields in the response should be expanded. + */ + expand?: Array; + } + + interface FeatureUpdateParams { + /** + * Inactive features cannot be attached to new products and will not be returned from the features list endpoint. + */ + active?: boolean; + + /** + * Specifies which fields in the response should be expanded. + */ + expand?: Array; + + /** + * Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + */ + metadata?: Stripe.MetadataParam; + + /** + * The feature's name, for your own purpose, not meant to be displayable to the customer. + */ + name?: string; + } + + interface FeatureListParams extends PaginationParams { + /** + * Specifies which fields in the response should be expanded. + */ + expand?: Array; + } + + class FeaturesResource { + /** + * Creates a feature + */ + create( + params: FeatureCreateParams, + options?: RequestOptions + ): Promise>; + + /** + * Retrieves a feature + */ + retrieve( + id: string, + params?: FeatureRetrieveParams, + options?: RequestOptions + ): Promise>; + retrieve( + id: string, + options?: RequestOptions + ): Promise>; + + /** + * Update a feature's metadata or permanently deactivate it. + */ + update( + id: string, + params?: FeatureUpdateParams, + options?: RequestOptions + ): Promise>; + + /** + * Retrieve a list of features + */ + list( + params?: FeatureListParams, + options?: RequestOptions + ): ApiListPromise; + list( + options?: RequestOptions + ): ApiListPromise; + } + } + } +} diff --git a/types/ProductFeatures.d.ts b/types/ProductFeatures.d.ts new file mode 100644 index 0000000000..de74ce6b70 --- /dev/null +++ b/types/ProductFeatures.d.ts @@ -0,0 +1,57 @@ +// File generated from our OpenAPI spec + +declare module 'stripe' { + namespace Stripe { + /** + * The DeletedProductFeature object. + */ + interface DeletedProductFeature { + /** + * Unique identifier for the object. + */ + id: string; + + /** + * String representing the object's type. Objects of the same type share the same value. + */ + object: 'product_feature'; + + /** + * Always true for a deleted object + */ + deleted: true; + } + + /** + * A product_feature represents an attachment between a feature and a product. + * When a product is purchased that has a feature attached, Stripe will create an entitlement to the feature for the purchasing customer. + */ + interface ProductFeature { + /** + * Unique identifier for the object. + */ + id: string; + + /** + * String representing the object's type. Objects of the same type share the same value. + */ + object: 'product_feature'; + + /** + * Always true for a deleted object + */ + deleted?: void; + + /** + * A feature represents a monetizable ability or functionality in your system. + * Features can be assigned to products, and when those products are purchased, Stripe will create an entitlement to the feature for the purchasing customer. + */ + entitlement_feature: Stripe.Entitlements.Feature; + + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ + livemode: boolean; + } + } +} diff --git a/types/ProductsResource.d.ts b/types/ProductsResource.d.ts index 9f4c8e95ae..ad1078609f 100644 --- a/types/ProductsResource.d.ts +++ b/types/ProductsResource.d.ts @@ -412,6 +412,34 @@ declare module 'stripe' { interface ProductDeleteParams {} + interface ProductCreateFeatureParams { + /** + * The ID of the [Feature](docs/api/entitlements/feature) object attached to this product. + */ + entitlement_feature: string; + + /** + * Specifies which fields in the response should be expanded. + */ + expand?: Array; + } + + interface ProductDeleteFeatureParams {} + + interface ProductListFeaturesParams extends PaginationParams { + /** + * Specifies which fields in the response should be expanded. + */ + expand?: Array; + } + + interface ProductRetrieveFeatureParams { + /** + * Specifies which fields in the response should be expanded. + */ + expand?: Array; + } + interface ProductSearchParams { /** * The search query string. See [search query language](https://stripe.com/docs/search#search-query-language) and the list of supported [query fields for products](https://stripe.com/docs/search#query-fields-for-products). @@ -487,6 +515,58 @@ declare module 'stripe' { options?: RequestOptions ): Promise>; + /** + * Creates a product_feature, which represents a feature attachment to a product + */ + createFeature( + id: string, + params: ProductCreateFeatureParams, + options?: RequestOptions + ): Promise>; + + /** + * Deletes the feature attachment to a product + */ + deleteFeature( + productId: string, + id: string, + params?: ProductDeleteFeatureParams, + options?: RequestOptions + ): Promise>; + deleteFeature( + productId: string, + id: string, + options?: RequestOptions + ): Promise>; + + /** + * Retrieve a list of features for a product + */ + listFeatures( + id: string, + params?: ProductListFeaturesParams, + options?: RequestOptions + ): ApiListPromise; + listFeatures( + id: string, + options?: RequestOptions + ): ApiListPromise; + + /** + * Retrieves a product_feature, which represents a feature attachment to a product + */ + retrieveFeature( + productId: string, + id: string, + params?: ProductRetrieveFeatureParams, + options?: RequestOptions + ): Promise>; + retrieveFeature( + productId: string, + id: string, + options?: RequestOptions + ): Promise>; + /** * Search for products you've previously created using Stripe's [Search Query Language](https://stripe.com/docs/search#search-query-language). * Don't use search in read-after-write flows where strict consistency is necessary. Under normal operating diff --git a/types/Tax/CalculationsResource.d.ts b/types/Tax/CalculationsResource.d.ts index 43f0f6cd05..cf94584020 100644 --- a/types/Tax/CalculationsResource.d.ts +++ b/types/Tax/CalculationsResource.d.ts @@ -194,7 +194,10 @@ declare module 'stripe' { interface LineItem { /** - * A positive integer in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) representing the line item's total price. If `tax_behavior=inclusive`, then this amount includes taxes. Otherwise, taxes are calculated on top of this amount. + * A positive integer representing the line item's total price in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). + * The minimum amount is $0.0 US or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). + * The amount value supports up to twelve digits (e.g., a value of 999999999999 for a USD charge of $9,999,999,999.99). + * If `tax_behavior=inclusive`, then this amount includes taxes. Otherwise, taxes are calculated on top of this amount. */ amount: number; diff --git a/types/index.d.ts b/types/index.d.ts index 4e1fc5f7e7..051a8e6b12 100644 --- a/types/index.d.ts +++ b/types/index.d.ts @@ -34,6 +34,8 @@ /// /// /// +/// +/// /// /// /// @@ -159,6 +161,8 @@ /// /// /// +/// +/// /// /// /// @@ -199,6 +203,7 @@ /// /// /// +/// /// /// /// @@ -343,6 +348,10 @@ declare module 'stripe' { products: Stripe.Climate.ProductsResource; suppliers: Stripe.Climate.SuppliersResource; }; + entitlements: { + activeEntitlements: Stripe.Entitlements.ActiveEntitlementsResource; + features: Stripe.Entitlements.FeaturesResource; + }; financialConnections: { accounts: Stripe.FinancialConnections.AccountsResource; sessions: Stripe.FinancialConnections.SessionsResource; From d7479400a665a824a7b9cac780ff28321f8cbd96 Mon Sep 17 00:00:00 2001 From: Ramya Rao Date: Tue, 9 Apr 2024 13:56:44 -0700 Subject: [PATCH 6/7] Revert "Update generated code for v937" This reverts commit 8db992d6e05381a9cd7fe146fef5a2149af2e972. --- OPENAPI_VERSION | 2 +- types/Invoices.d.ts | 12 +++++++++++ types/InvoicesResource.d.ts | 40 +++++++++++++++++++++++++++++++++++++ 3 files changed, 53 insertions(+), 1 deletion(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 0374192988..d91517e107 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v938 \ No newline at end of file +v938 diff --git a/types/Invoices.d.ts b/types/Invoices.d.ts index d769fe2d3d..cddbc56943 100644 --- a/types/Invoices.d.ts +++ b/types/Invoices.d.ts @@ -377,6 +377,11 @@ declare module 'stripe' { */ rendering: Invoice.Rendering | null; + /** + * This is a legacy field that will be removed soon. For details about `rendering_options`, refer to `rendering` instead. Options for invoice PDF rendering. + */ + rendering_options: Invoice.RenderingOptions | null; + /** * The details of the cost of shipping, including the ShippingRate applied on the invoice. */ @@ -1182,6 +1187,13 @@ declare module 'stripe' { } } + interface RenderingOptions { + /** + * How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. + */ + amount_tax_display: string | null; + } + interface ShippingCost { /** * Total shipping cost before any taxes are applied. diff --git a/types/InvoicesResource.d.ts b/types/InvoicesResource.d.ts index 1a554538ff..6f3b789d22 100644 --- a/types/InvoicesResource.d.ts +++ b/types/InvoicesResource.d.ts @@ -133,6 +133,13 @@ declare module 'stripe' { */ rendering?: InvoiceCreateParams.Rendering; + /** + * This is a legacy field that will be removed soon. For details about `rendering_options`, refer to `rendering` instead. Options for invoice PDF rendering. + */ + rendering_options?: Stripe.Emptyable< + InvoiceCreateParams.RenderingOptions + >; + /** * Settings for the cost of shipping for this invoice. */ @@ -541,6 +548,19 @@ declare module 'stripe' { } } + interface RenderingOptions { + /** + * How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. One of `exclude_tax` or `include_inclusive_tax`. `include_inclusive_tax` will include inclusive tax (and exclude exclusive tax) in invoice PDF amounts. `exclude_tax` will exclude all tax (inclusive and exclusive alike) from invoice PDF amounts. + */ + amount_tax_display?: Stripe.Emptyable< + RenderingOptions.AmountTaxDisplay + >; + } + + namespace RenderingOptions { + type AmountTaxDisplay = 'exclude_tax' | 'include_inclusive_tax'; + } + interface ShippingCost { /** * The ID of the shipping rate to use for this order. @@ -827,6 +847,13 @@ declare module 'stripe' { */ rendering?: InvoiceUpdateParams.Rendering; + /** + * This is a legacy field that will be removed soon. For details about `rendering_options`, refer to `rendering` instead. Options for invoice PDF rendering. + */ + rendering_options?: Stripe.Emptyable< + InvoiceUpdateParams.RenderingOptions + >; + /** * Settings for the cost of shipping for this invoice. */ @@ -1213,6 +1240,19 @@ declare module 'stripe' { } } + interface RenderingOptions { + /** + * How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. One of `exclude_tax` or `include_inclusive_tax`. `include_inclusive_tax` will include inclusive tax (and exclude exclusive tax) in invoice PDF amounts. `exclude_tax` will exclude all tax (inclusive and exclusive alike) from invoice PDF amounts. + */ + amount_tax_display?: Stripe.Emptyable< + RenderingOptions.AmountTaxDisplay + >; + } + + namespace RenderingOptions { + type AmountTaxDisplay = 'exclude_tax' | 'include_inclusive_tax'; + } + interface ShippingCost { /** * The ID of the shipping rate to use for this order. From 2a0403eb3cc9e1807d37fd27d7a70ead09086618 Mon Sep 17 00:00:00 2001 From: Ramya Rao Date: Tue, 9 Apr 2024 13:57:02 -0700 Subject: [PATCH 7/7] Revert "Update generated code for v935" This reverts commit 5052f90050ba69d046dc7d23edd87d5c26b9e77d. --- src/apiVersion.ts | 2 +- types/WebhookEndpointsResource.d.ts | 3 +-- types/lib.d.ts | 2 +- types/test/typescriptTest.ts | 6 +++--- 4 files changed, 6 insertions(+), 7 deletions(-) diff --git a/src/apiVersion.ts b/src/apiVersion.ts index 8924ae6757..1d49f138a2 100644 --- a/src/apiVersion.ts +++ b/src/apiVersion.ts @@ -1,3 +1,3 @@ // File generated from our OpenAPI spec -export const ApiVersion = '2024-04-10'; +export const ApiVersion = '2023-10-16'; diff --git a/types/WebhookEndpointsResource.d.ts b/types/WebhookEndpointsResource.d.ts index 207cac5e93..68c3940157 100644 --- a/types/WebhookEndpointsResource.d.ts +++ b/types/WebhookEndpointsResource.d.ts @@ -140,8 +140,7 @@ declare module 'stripe' { | '2022-08-01' | '2022-11-15' | '2023-08-16' - | '2023-10-16' - | '2024-04-10'; + | '2023-10-16'; type EnabledEvent = | '*' diff --git a/types/lib.d.ts b/types/lib.d.ts index 063f76b267..96a9849f2a 100644 --- a/types/lib.d.ts +++ b/types/lib.d.ts @@ -27,7 +27,7 @@ declare module 'stripe' { }): (...args: any[]) => Response; //eslint-disable-line @typescript-eslint/no-explicit-any static MAX_BUFFERED_REQUEST_METRICS: number; } - export type LatestApiVersion = '2024-04-10'; + export type LatestApiVersion = '2023-10-16'; export type HttpAgent = Agent; export type HttpProtocol = 'http' | 'https'; diff --git a/types/test/typescriptTest.ts b/types/test/typescriptTest.ts index d80bde5d3a..3b4a3e8d28 100644 --- a/types/test/typescriptTest.ts +++ b/types/test/typescriptTest.ts @@ -9,7 +9,7 @@ import Stripe from 'stripe'; let stripe = new Stripe('sk_test_123', { - apiVersion: '2024-04-10', + apiVersion: '2023-10-16', }); stripe = new Stripe('sk_test_123'); @@ -26,7 +26,7 @@ stripe = new Stripe('sk_test_123', { // Check config object. stripe = new Stripe('sk_test_123', { - apiVersion: '2024-04-10', + apiVersion: '2023-10-16', typescript: true, maxNetworkRetries: 1, timeout: 1000, @@ -44,7 +44,7 @@ stripe = new Stripe('sk_test_123', { description: 'test', }; const opts: Stripe.RequestOptions = { - apiVersion: '2024-04-10', + apiVersion: '2023-10-16', }; const customer: Stripe.Customer = await stripe.customers.create(params, opts);