diff --git a/CHANGELOG.md b/CHANGELOG.md index 93b2d0cc68..ef2a8f57f9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,9 +1,25 @@ # Changelog +## 14.21.0 - 2024-03-14 +* [#2035](https://github.com/stripe/stripe-node/pull/2035) Update generated code + * Add support for new resources `Issuing.PersonalizationDesign` and `Issuing.PhysicalBundle` + * Add support for `create`, `list`, `retrieve`, and `update` methods on resource `PersonalizationDesign` + * Add support for `list` and `retrieve` methods on resource `PhysicalBundle` + * Add support for `personalization_design` on `Issuing.CardCreateParams`, `Issuing.CardListParams`, `Issuing.CardUpdateParams`, and `Issuing.Card` + * Change type of `SubscriptionCreateParams.application_fee_percent` and `SubscriptionUpdateParams.application_fee_percent` from `number` to `emptyStringable(number)` + * Add support for `sepa_debit` on `Subscription.payment_settings.payment_method_options`, `SubscriptionCreateParams.payment_settings.payment_method_options`, and `SubscriptionUpdateParams.payment_settings.payment_method_options` + ## 14.21.0-beta.1 - 2024-03-07 * [#2032](https://github.com/stripe/stripe-node/pull/2032) Update generated code for beta * Add support for new value `billing_period_end` on enums `QuoteCreateParams.lines[].ends_at.type`, `QuoteLine.ends_at.type`, and `QuoteUpdateParams.lines[].ends_at.type` +## 14.20.0 - 2024-03-07 +* [#2033](https://github.com/stripe/stripe-node/pull/2033) Update generated code + * Add support for `documents` on `AccountSession.components` and `AccountSessionCreateParams.components` + * Add support for `request_three_d_secure` on `Checkout.Session.payment_method_options.card` and `Checkout.SessionCreateParams.payment_method_options.card` + * Add support for `created` on `CreditNoteListParams` + * Add support for `sepa_debit` on `Invoice.payment_settings.payment_method_options`, `InvoiceCreateParams.payment_settings.payment_method_options`, and `InvoiceUpdateParams.payment_settings.payment_method_options` + ## 14.20.0-beta.1 - 2024-02-29 * [#2026](https://github.com/stripe/stripe-node/pull/2026) Update generated code for beta * Remove support for resource `Entitlements.Event` diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 6ccc2b12f6..32951953e6 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v869 \ No newline at end of file +v879 \ No newline at end of file diff --git a/src/resources.ts b/src/resources.ts index 4f56b2b294..f4aa9febbe 100644 --- a/src/resources.ts +++ b/src/resources.ts @@ -11,6 +11,7 @@ import {Cards as GiftCardsCards} from './resources/GiftCards/Cards.js'; import {Cards as IssuingCards} from './resources/Issuing/Cards.js'; import {Configurations as BillingPortalConfigurations} from './resources/BillingPortal/Configurations.js'; import {Configurations as TerminalConfigurations} from './resources/Terminal/Configurations.js'; +import {ConfirmationTokens as TestHelpersConfirmationTokens} from './resources/TestHelpers/ConfirmationTokens.js'; import {ConnectionTokens as TerminalConnectionTokens} from './resources/Terminal/ConnectionTokens.js'; import {CreditReversals as TreasuryCreditReversals} from './resources/Treasury/CreditReversals.js'; import {CreditUnderwritingRecords as IssuingCreditUnderwritingRecords} from './resources/Issuing/CreditUnderwritingRecords.js'; @@ -27,6 +28,9 @@ import {Forms as TaxForms} from './resources/Tax/Forms.js'; import {InboundTransfers as TestHelpersTreasuryInboundTransfers} from './resources/TestHelpers/Treasury/InboundTransfers.js'; import {InboundTransfers as TreasuryInboundTransfers} from './resources/Treasury/InboundTransfers.js'; import {Locations as TerminalLocations} from './resources/Terminal/Locations.js'; +import {MeterEventAdjustments as BillingMeterEventAdjustments} from './resources/Billing/MeterEventAdjustments.js'; +import {MeterEvents as BillingMeterEvents} from './resources/Billing/MeterEvents.js'; +import {Meters as BillingMeters} from './resources/Billing/Meters.js'; import {Orders as ClimateOrders} from './resources/Climate/Orders.js'; import {OutboundPayments as TestHelpersTreasuryOutboundPayments} from './resources/TestHelpers/Treasury/OutboundPayments.js'; import {OutboundPayments as TreasuryOutboundPayments} from './resources/Treasury/OutboundPayments.js'; @@ -123,6 +127,11 @@ export {Topups} from './resources/Topups.js'; export {Transfers} from './resources/Transfers.js'; export {WebhookEndpoints} from './resources/WebhookEndpoints.js'; export const Apps = resourceNamespace('apps', {Secrets: AppsSecrets}); +export const Billing = resourceNamespace('billing', { + MeterEventAdjustments: BillingMeterEventAdjustments, + MeterEvents: BillingMeterEvents, + Meters: BillingMeters, +}); export const BillingPortal = resourceNamespace('billingPortal', { Configurations: BillingPortalConfigurations, Sessions: BillingPortalSessions, @@ -193,6 +202,7 @@ export const Terminal = resourceNamespace('terminal', { Readers: TerminalReaders, }); export const TestHelpers = resourceNamespace('testHelpers', { + ConfirmationTokens: TestHelpersConfirmationTokens, Customers: TestHelpersCustomers, Refunds: TestHelpersRefunds, TestClocks: TestHelpersTestClocks, diff --git a/src/resources/Billing/MeterEventAdjustments.ts b/src/resources/Billing/MeterEventAdjustments.ts new file mode 100644 index 0000000000..09084cb7ba --- /dev/null +++ b/src/resources/Billing/MeterEventAdjustments.ts @@ -0,0 +1,10 @@ +// File generated from our OpenAPI spec + +import {StripeResource} from '../../StripeResource.js'; +const stripeMethod = StripeResource.method; +export const MeterEventAdjustments = StripeResource.extend({ + create: stripeMethod({ + method: 'POST', + fullPath: '/v1/billing/meter_event_adjustments', + }), +}); diff --git a/src/resources/Billing/MeterEvents.ts b/src/resources/Billing/MeterEvents.ts new file mode 100644 index 0000000000..302b515ea3 --- /dev/null +++ b/src/resources/Billing/MeterEvents.ts @@ -0,0 +1,7 @@ +// File generated from our OpenAPI spec + +import {StripeResource} from '../../StripeResource.js'; +const stripeMethod = StripeResource.method; +export const MeterEvents = StripeResource.extend({ + create: stripeMethod({method: 'POST', fullPath: '/v1/billing/meter_events'}), +}); diff --git a/src/resources/Billing/Meters.ts b/src/resources/Billing/Meters.ts new file mode 100644 index 0000000000..382291bacf --- /dev/null +++ b/src/resources/Billing/Meters.ts @@ -0,0 +1,27 @@ +// File generated from our OpenAPI spec + +import {StripeResource} from '../../StripeResource.js'; +const stripeMethod = StripeResource.method; +export const Meters = StripeResource.extend({ + create: stripeMethod({method: 'POST', fullPath: '/v1/billing/meters'}), + retrieve: stripeMethod({method: 'GET', fullPath: '/v1/billing/meters/{id}'}), + update: stripeMethod({method: 'POST', fullPath: '/v1/billing/meters/{id}'}), + list: stripeMethod({ + method: 'GET', + fullPath: '/v1/billing/meters', + methodType: 'list', + }), + deactivate: stripeMethod({ + method: 'POST', + fullPath: '/v1/billing/meters/{id}/deactivate', + }), + listEventSummaries: stripeMethod({ + method: 'GET', + fullPath: '/v1/billing/meters/{id}/event_summaries', + methodType: 'list', + }), + reactivate: stripeMethod({ + method: 'POST', + fullPath: '/v1/billing/meters/{id}/reactivate', + }), +}); diff --git a/src/resources/Invoices.ts b/src/resources/Invoices.ts index 371ae7f219..4149c72a59 100644 --- a/src/resources/Invoices.ts +++ b/src/resources/Invoices.ts @@ -12,6 +12,10 @@ export const Invoices = StripeResource.extend({ methodType: 'list', }), del: stripeMethod({method: 'DELETE', fullPath: '/v1/invoices/{invoice}'}), + addLines: stripeMethod({ + method: 'POST', + fullPath: '/v1/invoices/{invoice}/add_lines', + }), attachPaymentIntent: stripeMethod({ method: 'POST', fullPath: '/v1/invoices/{invoice}/attach_payment_intent', @@ -44,6 +48,10 @@ export const Invoices = StripeResource.extend({ fullPath: '/v1/invoices/{invoice}/mark_uncollectible', }), pay: stripeMethod({method: 'POST', fullPath: '/v1/invoices/{invoice}/pay'}), + removeLines: stripeMethod({ + method: 'POST', + fullPath: '/v1/invoices/{invoice}/remove_lines', + }), retrievePayment: stripeMethod({ method: 'GET', fullPath: '/v1/invoices/{invoice}/payments/{invoice_payment}', @@ -61,6 +69,10 @@ export const Invoices = StripeResource.extend({ method: 'POST', fullPath: '/v1/invoices/{invoice}/send', }), + updateLines: stripeMethod({ + method: 'POST', + fullPath: '/v1/invoices/{invoice}/update_lines', + }), updateLineItem: stripeMethod({ method: 'POST', fullPath: '/v1/invoices/{invoice}/lines/{line_item_id}', diff --git a/src/resources/TestHelpers/ConfirmationTokens.ts b/src/resources/TestHelpers/ConfirmationTokens.ts new file mode 100644 index 0000000000..4fe539aaaa --- /dev/null +++ b/src/resources/TestHelpers/ConfirmationTokens.ts @@ -0,0 +1,10 @@ +// File generated from our OpenAPI spec + +import {StripeResource} from '../../StripeResource.js'; +const stripeMethod = StripeResource.method; +export const ConfirmationTokens = StripeResource.extend({ + create: stripeMethod({ + method: 'POST', + fullPath: '/v1/test_helpers/confirmation_tokens', + }), +}); diff --git a/test/resources/generated_examples_test.spec.js b/test/resources/generated_examples_test.spec.js index 9a7ff2dcf3..16da3d1a49 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","au_becs_debit_payments":"active","bacs_debit_payments":"active","bancontact_payments":"inactive","bank_transfer_payments":"pending","blik_payments":"inactive","boleto_payments":"inactive","card_issuing":"active","card_payments":"active","cartes_bancaires_payments":"active","cashapp_payments":"active","eps_payments":"inactive","fpx_payments":"active","giropay_payments":"active","grabpay_payments":"pending","ideal_payments":"inactive","india_international_payments":"inactive","jcb_payments":"inactive","klarna_payments":"active","konbini_payments":"active","legacy_payments":"active","link_payments":"inactive","oxxo_payments":"pending","p24_payments":"inactive","paynow_payments":"active","paypal_payments":"inactive","payto_payments":"pending","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","twint_payments":"inactive","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":{"application":{"loss_liable":true,"onboarding_owner":true,"pricing_controls":true},"dashboard":{"type":"express"},"is_controller":true,"type":"account"},"country":"country","created":"1028554472","default_currency":"default_currency","details_submitted":true,"email":"email","external_accounts":null,"future_requirements":{"alternatives":[{"alternative_fields_due":["alternative_fields_due"],"original_fields_due":["original_fields_due"]}],"current_deadline":"270965154","currently_due":["currently_due"],"disabled_reason":"disabled_reason","errors":[{"code":"invalid_address_city_state_postal_code","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_address_city_state_postal_code","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_address_city_state_postal_code","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_address_city_state_postal_code","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"},"object":"payment_method","oxxo":{},"p24":{"bank":"noble_pay"},"paynow":{},"paypal":{"fingerprint":"fingerprint","payer_email":"payer_email","payer_id":"payer_id","verified_email":"verified_email"},"payto":{"bsb_number":"bsb_number","last4":"last4","pay_id":"pay_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":{},"twint":{},"type":"au_becs_debit","us_bank_account":{"account_holder_type":"individual","account_number":"account_number","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","au_becs_debit_payments":"active","bacs_debit_payments":"active","bancontact_payments":"inactive","bank_transfer_payments":"pending","blik_payments":"inactive","boleto_payments":"inactive","card_issuing":"active","card_payments":"active","cartes_bancaires_payments":"active","cashapp_payments":"active","eps_payments":"inactive","fpx_payments":"active","giropay_payments":"active","grabpay_payments":"pending","ideal_payments":"inactive","india_international_payments":"inactive","jcb_payments":"inactive","klarna_payments":"active","konbini_payments":"active","legacy_payments":"active","link_payments":"inactive","oxxo_payments":"pending","p24_payments":"inactive","paynow_payments":"active","paypal_payments":"inactive","payto_payments":"pending","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","twint_payments":"inactive","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":{"application":{"loss_liable":true,"onboarding_owner":true,"pricing_controls":true},"dashboard":{"type":"express"},"is_controller":true,"type":"account"},"country":"country","created":"1028554472","default_currency":"default_currency","details_submitted":true,"email":"email","external_accounts":null,"future_requirements":{"alternatives":[{"alternative_fields_due":["alternative_fields_due"],"original_fields_due":["original_fields_due"]}],"current_deadline":"270965154","currently_due":["currently_due"],"disabled_reason":"disabled_reason","errors":[{"code":"invalid_address_city_state_postal_code","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_address_city_state_postal_code","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_address_city_state_postal_code","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_address_city_state_postal_code","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"},"tax_forms":{"consented_to_paperless_delivery":true},"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"},"object":"payment_method","oxxo":{},"p24":{"bank":"noble_pay"},"paynow":{},"paypal":{"fingerprint":"fingerprint","payer_email":"payer_email","payer_id":"payer_id","verified_email":"verified_email"},"payto":{"bsb_number":"bsb_number","last4":"last4","pay_id":"pay_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":{},"twint":{},"type":"au_becs_debit","us_bank_account":{"account_holder_type":"individual","account_number":"account_number","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"},"tax_forms":{"consented_to_paperless_delivery":true},"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","au_becs_debit_payments":"active","bacs_debit_payments":"active","bancontact_payments":"inactive","bank_transfer_payments":"pending","blik_payments":"inactive","boleto_payments":"inactive","card_issuing":"active","card_payments":"active","cartes_bancaires_payments":"active","cashapp_payments":"active","eps_payments":"inactive","fpx_payments":"active","giropay_payments":"active","grabpay_payments":"pending","ideal_payments":"inactive","india_international_payments":"inactive","jcb_payments":"inactive","klarna_payments":"active","konbini_payments":"active","legacy_payments":"active","link_payments":"inactive","oxxo_payments":"pending","p24_payments":"inactive","paynow_payments":"active","paypal_payments":"inactive","payto_payments":"pending","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","twint_payments":"inactive","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":{"application":{"loss_liable":true,"onboarding_owner":true,"pricing_controls":true},"dashboard":{"type":"express"},"is_controller":true,"type":"account"},"country":"country","created":"1028554472","default_currency":"default_currency","details_submitted":true,"email":"email","external_accounts":null,"future_requirements":{"alternatives":[{"alternative_fields_due":["alternative_fields_due"],"original_fields_due":["original_fields_due"]}],"current_deadline":"270965154","currently_due":["currently_due"],"disabled_reason":"disabled_reason","errors":[{"code":"invalid_address_city_state_postal_code","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_address_city_state_postal_code","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_address_city_state_postal_code","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_address_city_state_postal_code","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"},"multibanco":{},"object":"payment_method","oxxo":{},"p24":{"bank":"noble_pay"},"paynow":{},"paypal":{"fingerprint":"fingerprint","payer_email":"payer_email","payer_id":"payer_id","verified_email":"verified_email"},"payto":{"bsb_number":"bsb_number","last4":"last4","pay_id":"pay_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":{},"twint":{},"type":"acss_debit","us_bank_account":{"account_holder_type":"individual","account_number":"account_number","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","au_becs_debit_payments":"active","bacs_debit_payments":"active","bancontact_payments":"inactive","bank_transfer_payments":"pending","blik_payments":"inactive","boleto_payments":"inactive","card_issuing":"active","card_payments":"active","cartes_bancaires_payments":"active","cashapp_payments":"active","eps_payments":"inactive","fpx_payments":"active","giropay_payments":"active","grabpay_payments":"pending","ideal_payments":"inactive","india_international_payments":"inactive","jcb_payments":"inactive","klarna_payments":"active","konbini_payments":"active","legacy_payments":"active","link_payments":"inactive","oxxo_payments":"pending","p24_payments":"inactive","paynow_payments":"active","paypal_payments":"inactive","payto_payments":"pending","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","twint_payments":"inactive","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":{"application":{"loss_liable":true,"onboarding_owner":true,"pricing_controls":true},"dashboard":{"type":"express"},"is_controller":true,"type":"account"},"country":"country","created":"1028554472","default_currency":"default_currency","details_submitted":true,"email":"email","external_accounts":null,"future_requirements":{"alternatives":[{"alternative_fields_due":["alternative_fields_due"],"original_fields_due":["original_fields_due"]}],"current_deadline":"270965154","currently_due":["currently_due"],"disabled_reason":"disabled_reason","errors":[{"code":"invalid_address_city_state_postal_code","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_address_city_state_postal_code","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_address_city_state_postal_code","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_address_city_state_postal_code","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"},"tax_forms":{"consented_to_paperless_delivery":true},"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"},"multibanco":{},"object":"payment_method","oxxo":{},"p24":{"bank":"noble_pay"},"paynow":{},"paypal":{"fingerprint":"fingerprint","payer_email":"payer_email","payer_id":"payer_id","verified_email":"verified_email"},"payto":{"bsb_number":"bsb_number","last4":"last4","pay_id":"pay_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":{},"twint":{},"type":"acss_debit","us_bank_account":{"account_holder_type":"individual","account_number":"account_number","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"},"tax_forms":{"consented_to_paperless_delivery":true},"treasury":{"tos_acceptance":{"date":3076014,"ip":"ip","user_agent":"user_agent"}}},"tos_acceptance":{"date":"3076014","ip":"ip","service_agreement":"service_agreement","user_agent":"user_agent"},"type":"custom"}', }, ]); const account = await stripe.accounts.retrieve('acc_123'); @@ -742,6 +742,16 @@ describe('Generated tests', function() { expect(cashBalance).not.to.be.null; }); + it('test_customers_cash_balance_transactions_get', async function() { + const customerCashBalanceTransactions = await stripe.customers.listCashBalanceTransactions( + 'cus_123', + { + limit: 3, + } + ); + expect(customerCashBalanceTransactions).not.to.be.null; + }); + it('test_customers_delete', async function() { const deleted = await stripe.customers.del('cus_xxxxxxxxxxxxx'); expect(deleted).not.to.be.null; @@ -1516,6 +1526,46 @@ describe('Generated tests', function() { expect(dispute).not.to.be.null; }); + it('test_issuing_personalization_designs_get', async function() { + const personalizationDesigns = await stripe.issuing.personalizationDesigns.list(); + expect(personalizationDesigns).not.to.be.null; + }); + + it('test_issuing_personalization_designs_get_2', async function() { + const personalizationDesign = await stripe.issuing.personalizationDesigns.retrieve( + 'pd_xyz' + ); + expect(personalizationDesign).not.to.be.null; + }); + + it('test_issuing_personalization_designs_post', async function() { + const personalizationDesign = await stripe.issuing.personalizationDesigns.create( + { + physical_bundle: 'pb_xyz', + } + ); + expect(personalizationDesign).not.to.be.null; + }); + + it('test_issuing_personalization_designs_post_2', async function() { + const personalizationDesign = await stripe.issuing.personalizationDesigns.update( + 'pd_xyz' + ); + expect(personalizationDesign).not.to.be.null; + }); + + it('test_issuing_physical_bundles_get', async function() { + const physicalBundles = await stripe.issuing.physicalBundles.list(); + expect(physicalBundles).not.to.be.null; + }); + + it('test_issuing_physical_bundles_get_2', async function() { + const physicalBundle = await stripe.issuing.physicalBundles.retrieve( + 'pb_xyz' + ); + expect(physicalBundle).not.to.be.null; + }); + it('test_issuing_transactions_get', async function() { const transactions = await stripe.issuing.transactions.list({ limit: 3, @@ -3106,6 +3156,32 @@ describe('Generated tests', function() { expect(card).not.to.be.null; }); + it('test_test_helpers_issuing_personalization_designs_activate_post', async function() { + const personalizationDesign = await stripe.testHelpers.issuing.personalizationDesigns.activate( + 'pd_xyz' + ); + expect(personalizationDesign).not.to.be.null; + }); + + it('test_test_helpers_issuing_personalization_designs_deactivate_post', async function() { + const personalizationDesign = await stripe.testHelpers.issuing.personalizationDesigns.deactivate( + 'pd_xyz' + ); + expect(personalizationDesign).not.to.be.null; + }); + + it('test_test_helpers_issuing_personalization_designs_reject_post', async function() { + const personalizationDesign = await stripe.testHelpers.issuing.personalizationDesigns.reject( + 'pd_xyz', + { + rejection_reasons: { + card_logo: ['geographic_location'], + }, + } + ); + expect(personalizationDesign).not.to.be.null; + }); + it('test_test_helpers_issuing_transactions_create_force_capture_post', async function() { const transaction = await stripe.testHelpers.issuing.transactions.createForceCapture( { diff --git a/types/AccountSessionsResource.d.ts b/types/AccountSessionsResource.d.ts index 2663f3709e..5b13fa7767 100644 --- a/types/AccountSessionsResource.d.ts +++ b/types/AccountSessionsResource.d.ts @@ -28,6 +28,9 @@ declare module 'stripe' { capital_financing_promotion?: Components.CapitalFinancingPromotion; + /** + * Configuration for the documents embedded component. + */ documents?: Components.Documents; /** diff --git a/types/AccountsResource.d.ts b/types/AccountsResource.d.ts index 86a33eb905..0412f0634d 100644 --- a/types/AccountsResource.d.ts +++ b/types/AccountsResource.d.ts @@ -876,7 +876,7 @@ declare module 'stripe' { interface Dashboard { /** - * Whether this account should have access to the full Stripe dashboard (`full`) or no dashboard (`none`). + * Whether this account should have access to the full Stripe Dashboard (`full`), to the Express Dashboard (`express`), or to no dashboard (`none`). Defaults to `full`. */ type?: Dashboard.Type; } diff --git a/types/Billing/MeterEventAdjustments.d.ts b/types/Billing/MeterEventAdjustments.d.ts new file mode 100644 index 0000000000..663d1899bf --- /dev/null +++ b/types/Billing/MeterEventAdjustments.d.ts @@ -0,0 +1,31 @@ +// File generated from our OpenAPI spec + +declare module 'stripe' { + namespace Stripe { + namespace Billing { + /** + * A billing meter event adjustment represents the status of a meter event adjustment. + */ + interface MeterEventAdjustment { + /** + * String representing the object's type. Objects of the same type share the same value. + */ + object: 'billing.meter_event_adjustment'; + + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ + livemode: boolean; + + /** + * The meter event adjustment's status. + */ + status: MeterEventAdjustment.Status; + } + + namespace MeterEventAdjustment { + type Status = 'complete' | 'pending'; + } + } + } +} diff --git a/types/Billing/MeterEventAdjustmentsResource.d.ts b/types/Billing/MeterEventAdjustmentsResource.d.ts new file mode 100644 index 0000000000..73bec6a0ee --- /dev/null +++ b/types/Billing/MeterEventAdjustmentsResource.d.ts @@ -0,0 +1,43 @@ +// File generated from our OpenAPI spec + +declare module 'stripe' { + namespace Stripe { + namespace Billing { + interface MeterEventAdjustmentCreateParams { + /** + * Specifies which event to cancel. + */ + cancel: MeterEventAdjustmentCreateParams.Cancel; + + /** + * Specifies which fields in the response should be expanded. + */ + expand?: Array; + + /** + * Specifies whether to cancel a single event or a range of events for a time period. + */ + type?: 'cancel'; + } + + namespace MeterEventAdjustmentCreateParams { + interface Cancel { + /** + * Unique identifier for the event. + */ + identifier: string; + } + } + + class MeterEventAdjustmentsResource { + /** + * Creates a billing meter event adjustment + */ + create( + params: MeterEventAdjustmentCreateParams, + options?: RequestOptions + ): Promise>; + } + } + } +} diff --git a/types/Billing/MeterEventSummaries.d.ts b/types/Billing/MeterEventSummaries.d.ts new file mode 100644 index 0000000000..409470f52c --- /dev/null +++ b/types/Billing/MeterEventSummaries.d.ts @@ -0,0 +1,48 @@ +// File generated from our OpenAPI spec + +declare module 'stripe' { + namespace Stripe { + namespace Billing { + /** + * A billing meter event summary represents an aggregated view of a customer's billing meter events within a specified timeframe. It indicates how much + * usage was accrued by a customer for that period. + */ + interface MeterEventSummary { + /** + * Unique identifier for the object. + */ + id: string; + + /** + * String representing the object's type. Objects of the same type share the same value. + */ + object: 'billing.meter_event_summary'; + + /** + * Aggregated value of all the events within start_time (inclusive) and end_time (inclusive). The aggregation strategy is defined on meter via `default_aggregation``. + */ + aggregated_value: number; + + /** + * End timestamp for this usage summary (inclusive). + */ + end_time: number; + + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ + livemode: boolean; + + /** + * The meter associated with this usage summary. + */ + meter: string; + + /** + * Start timestamp for this usage summary (inclusive). + */ + start_time: number; + } + } + } +} diff --git a/types/Billing/MeterEvents.d.ts b/types/Billing/MeterEvents.d.ts new file mode 100644 index 0000000000..40e4471a95 --- /dev/null +++ b/types/Billing/MeterEvents.d.ts @@ -0,0 +1,50 @@ +// File generated from our OpenAPI spec + +declare module 'stripe' { + namespace Stripe { + namespace Billing { + /** + * A billing meter event represents a customer's usage of a product. Meter events are used to bill a customer based on their usage. + * Meter events are associated with billing meters, which define the shape of the event's payload and how those events are aggregated for billing. + */ + interface MeterEvent { + /** + * String representing the object's type. Objects of the same type share the same value. + */ + object: 'billing.meter_event'; + + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ + created: number; + + /** + * The name of the meter event. Corresponds with the `event_name` field on a meter. + */ + event_name: string; + + /** + * A unique identifier for the event. + */ + identifier: 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; + + /** + * The payload of the event. + */ + payload: { + [key: string]: string; + }; + + /** + * The timestamp passed in when creating the event. Measured in seconds since the Unix epoch. + */ + timestamp: number; + } + } + } +} diff --git a/types/Billing/MeterEventsResource.d.ts b/types/Billing/MeterEventsResource.d.ts new file mode 100644 index 0000000000..b55122c132 --- /dev/null +++ b/types/Billing/MeterEventsResource.d.ts @@ -0,0 +1,46 @@ +// File generated from our OpenAPI spec + +declare module 'stripe' { + namespace Stripe { + namespace Billing { + interface MeterEventCreateParams { + /** + * The name of the meter event. Corresponds with the `event_name` field on a meter. + */ + event_name: string; + + /** + * The payload of the event. This must contain a field with the event's numerical value and a field to map the event to a customer. + */ + payload: { + [key: string]: string; + }; + + /** + * The time of the event. Measured in seconds since the Unix epoch. + */ + timestamp: number; + + /** + * Specifies which fields in the response should be expanded. + */ + expand?: Array; + + /** + * A unique identifier for the event. If not provided, one will be generated. + */ + identifier?: string; + } + + class MeterEventsResource { + /** + * Creates a billing meter event + */ + create( + params: MeterEventCreateParams, + options?: RequestOptions + ): Promise>; + } + } + } +} diff --git a/types/Billing/Meters.d.ts b/types/Billing/Meters.d.ts new file mode 100644 index 0000000000..f56b310639 --- /dev/null +++ b/types/Billing/Meters.d.ts @@ -0,0 +1,108 @@ +// File generated from our OpenAPI spec + +declare module 'stripe' { + namespace Stripe { + namespace Billing { + /** + * A billing meter is a resource that allows you to track usage of a particular event. For example, you might create a billing meter to track the number of API calls made by a particular user. You can then use the billing meter to charge the user for the number of API calls they make. + */ + interface Meter { + /** + * Unique identifier for the object. + */ + id: string; + + /** + * String representing the object's type. Objects of the same type share the same value. + */ + object: 'billing.meter'; + + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ + created: number; + + customer_mapping: Meter.CustomerMapping; + + default_aggregation: Meter.DefaultAggregation; + + /** + * The meter's name. + */ + display_name: string; + + /** + * The name of the usage event to record usage for. Corresponds with the `event_name` field on usage events. + */ + event_name: string; + + /** + * The time window to pre-aggregate usage events for, if any. + */ + event_time_window: Meter.EventTimeWindow | null; + + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ + livemode: boolean; + + /** + * The meter's status. + */ + status: Meter.Status; + + status_transitions: Meter.StatusTransitions; + + /** + * Time at which the object was last updated. Measured in seconds since the Unix epoch. + */ + updated: number; + + value_settings: Meter.ValueSettings; + } + + namespace Meter { + interface CustomerMapping { + /** + * The key in the usage event payload to use for mapping the event to a customer. + */ + event_payload_key: string; + + /** + * The method for mapping a meter event to a customer. + */ + type: 'by_id'; + } + + interface DefaultAggregation { + /** + * Specifies how events are aggregated. + */ + formula: DefaultAggregation.Formula; + } + + namespace DefaultAggregation { + type Formula = 'count' | 'sum'; + } + + type EventTimeWindow = 'day' | 'hour'; + + type Status = 'active' | 'inactive'; + + interface StatusTransitions { + /** + * The time the meter was deactivated, if any. Measured in seconds since Unix epoch. + */ + deactivated_at: number | null; + } + + interface ValueSettings { + /** + * The key in the usage event payload to use as the value for this meter. + */ + event_payload_key: string; + } + } + } + } +} diff --git a/types/Billing/MetersResource.d.ts b/types/Billing/MetersResource.d.ts new file mode 100644 index 0000000000..d1f3c7dd51 --- /dev/null +++ b/types/Billing/MetersResource.d.ts @@ -0,0 +1,230 @@ +// File generated from our OpenAPI spec + +declare module 'stripe' { + namespace Stripe { + namespace Billing { + interface MeterCreateParams { + /** + * The default settings to aggregate a meter's events with. + */ + default_aggregation: MeterCreateParams.DefaultAggregation; + + /** + * The meter's name. + */ + display_name: string; + + /** + * The name of the usage event to record usage for. Corresponds with the `event_name` field on usage events. + */ + event_name: string; + + /** + * Fields that specify how to map a meter event to a customer. + */ + customer_mapping?: MeterCreateParams.CustomerMapping; + + /** + * The time window to pre-aggregate usage events for, if any. + */ + event_time_window?: MeterCreateParams.EventTimeWindow; + + /** + * Specifies which fields in the response should be expanded. + */ + expand?: Array; + + /** + * Fields that specify how to calculate a usage event's value. + */ + value_settings?: MeterCreateParams.ValueSettings; + } + + namespace MeterCreateParams { + interface CustomerMapping { + /** + * The key in the usage event payload to use for mapping the event to a customer. + */ + event_payload_key: string; + + /** + * The method for mapping a meter event to a customer. Must be `by_id`. + */ + type: 'by_id'; + } + + interface DefaultAggregation { + /** + * Specifies how events are aggregated. Allowed values are `count` to count the number of events, `sum` to sum each event's value, or `last` to use the last event's value. + */ + formula: DefaultAggregation.Formula; + } + + namespace DefaultAggregation { + type Formula = 'count' | 'sum'; + } + + type EventTimeWindow = 'day' | 'hour'; + + interface ValueSettings { + /** + * The key in the usage event payload to use as the value for this meter. For example, if the event payload contains usage on a `bytes_used` field, then set the event_payload_key to "bytes_used". + */ + event_payload_key: string; + } + } + + interface MeterRetrieveParams { + /** + * Specifies which fields in the response should be expanded. + */ + expand?: Array; + } + + interface MeterUpdateParams { + /** + * The meter's name. + */ + display_name?: string; + + /** + * Specifies which fields in the response should be expanded. + */ + expand?: Array; + } + + interface MeterListParams extends PaginationParams { + /** + * Specifies which fields in the response should be expanded. + */ + expand?: Array; + + /** + * Filter results to only include meters with the given status. + */ + status?: MeterListParams.Status; + } + + namespace MeterListParams { + type Status = 'active' | 'inactive'; + } + + interface MeterDeactivateParams { + /** + * Specifies which fields in the response should be expanded. + */ + expand?: Array; + } + + interface MeterListEventSummariesParams extends PaginationParams { + /** + * The customer for which to fetch event summaries. + */ + customer: string; + + /** + * The timestamp from when to stop aggregating usage events (exclusive). + */ + end_time: number; + + /** + * The timestamp from when to start aggregating usage events (inclusive). + */ + start_time: number; + + /** + * Specifies which fields in the response should be expanded. + */ + expand?: Array; + + /** + * Specifies what granularity to use when generating event summaries. If not specified, a single event summary would be returned for the specified time range. + */ + value_grouping_window?: 'hour'; + } + + interface MeterReactivateParams { + /** + * Specifies which fields in the response should be expanded. + */ + expand?: Array; + } + + class MetersResource { + /** + * Creates a billing meter + */ + create( + params: MeterCreateParams, + options?: RequestOptions + ): Promise>; + + /** + * Retrieves a billing meter given an ID + */ + retrieve( + id: string, + params?: MeterRetrieveParams, + options?: RequestOptions + ): Promise>; + retrieve( + id: string, + options?: RequestOptions + ): Promise>; + + /** + * Updates a billing meter + */ + update( + id: string, + params?: MeterUpdateParams, + options?: RequestOptions + ): Promise>; + + /** + * Retrieve a list of billing meters. + */ + list( + params?: MeterListParams, + options?: RequestOptions + ): ApiListPromise; + list(options?: RequestOptions): ApiListPromise; + + /** + * Deactivates a billing meter + */ + deactivate( + id: string, + params?: MeterDeactivateParams, + options?: RequestOptions + ): Promise>; + deactivate( + id: string, + options?: RequestOptions + ): Promise>; + + /** + * Retrieve a list of billing meter event summaries. + */ + listEventSummaries( + id: string, + params: MeterListEventSummariesParams, + options?: RequestOptions + ): ApiListPromise; + + /** + * Reactivates a billing meter + */ + reactivate( + id: string, + params?: MeterReactivateParams, + options?: RequestOptions + ): Promise>; + reactivate( + id: string, + options?: RequestOptions + ): Promise>; + } + } + } +} diff --git a/types/ConfirmationTokens.d.ts b/types/ConfirmationTokens.d.ts index 33c9befd2f..58baea8382 100644 --- a/types/ConfirmationTokens.d.ts +++ b/types/ConfirmationTokens.d.ts @@ -182,6 +182,8 @@ declare module 'stripe' { link?: PaymentMethodPreview.Link; + multibanco?: PaymentMethodPreview.Multibanco; + oxxo?: PaymentMethodPreview.Oxxo; p24?: PaymentMethodPreview.P24; @@ -900,6 +902,8 @@ declare module 'stripe' { persistent_token?: string; } + interface Multibanco {} + interface Oxxo {} interface P24 { @@ -1068,6 +1072,7 @@ declare module 'stripe' { | 'klarna' | 'konbini' | 'link' + | 'multibanco' | 'oxxo' | 'p24' | 'paynow' diff --git a/types/CustomersResource.d.ts b/types/CustomersResource.d.ts index 55bb3c19ea..e6c0155c6a 100644 --- a/types/CustomersResource.d.ts +++ b/types/CustomersResource.d.ts @@ -799,6 +799,7 @@ declare module 'stripe' { | 'klarna' | 'konbini' | 'link' + | 'multibanco' | 'oxxo' | 'p24' | 'paynow' diff --git a/types/InvoicesResource.d.ts b/types/InvoicesResource.d.ts index 5cdf7a5d21..b7d328bc1a 100644 --- a/types/InvoicesResource.d.ts +++ b/types/InvoicesResource.d.ts @@ -1613,6 +1613,306 @@ declare module 'stripe' { interface InvoiceDeleteParams {} + interface InvoiceAddLinesParams { + /** + * The line items to add. + */ + lines: Array; + + /** + * Specifies which fields in the response should be expanded. + */ + expand?: Array; + + /** + * Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + */ + invoice_metadata?: Stripe.Emptyable<{ + [key: string]: string; + }>; + } + + namespace InvoiceAddLinesParams { + interface Line { + /** + * The integer amount in cents (or local equivalent) of the charge to be applied to the upcoming invoice. If you want to apply a credit to the customer's account, pass a negative amount. + */ + amount?: number; + + /** + * An arbitrary string which you can attach to the invoice item. The description is displayed in the invoice for easy tracking. + */ + description?: string; + + /** + * Controls whether discounts apply to this line item. Defaults to false for prorations or negative line items, and true for all other line items. Cannot be set to true for prorations. + */ + discountable?: boolean; + + /** + * The coupons & existing discounts which apply to the line item. Item discounts are applied before invoice discounts. Pass an empty string to remove previously-defined discounts. + */ + discounts?: Stripe.Emptyable>; + + /** + * ID of an unassigned invoice item to assign to this invoice. If not provided, a new item will be created. + */ + invoice_item?: string; + + /** + * The IDs of the margins to apply to the line item. When set, the `default_margins` on the invoice do not apply to this line item. + */ + margins?: Stripe.Emptyable>; + + /** + * Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + */ + metadata?: Stripe.Emptyable; + + /** + * The period associated with this invoice item. When set to different values, the period will be rendered on the invoice. If you have [Stripe Revenue Recognition](https://stripe.com/docs/revenue-recognition) enabled, the period will be used to recognize and defer revenue. See the [Revenue Recognition documentation](https://stripe.com/docs/revenue-recognition/methodology/subscriptions-and-invoicing) for details. + */ + period?: Line.Period; + + /** + * The ID of the price object. + */ + price?: string; + + /** + * Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. + */ + price_data?: Line.PriceData; + + /** + * Non-negative integer. The quantity of units for the line item. + */ + quantity?: number; + + /** + * A list of up to 10 tax amounts for this line item. This can be useful if you calculate taxes on your own or use a third-party to calculate them. You cannot set tax amounts if any line item has [tax_rates](https://stripe.com/docs/api/invoices/line_item#invoice_line_item_object-tax_rates) or if the invoice has [default_tax_rates](https://stripe.com/docs/api/invoices/object#invoice_object-default_tax_rates) or uses [automatic tax](https://stripe.com/docs/tax/invoicing). Pass an empty string to remove previously defined tax amounts. + */ + tax_amounts?: Stripe.Emptyable>; + + /** + * The tax rates which apply to the line item. When set, the `default_tax_rates` on the invoice do not apply to this line item. Pass an empty string to remove previously-defined tax rates. + */ + tax_rates?: Stripe.Emptyable>; + } + + namespace Line { + interface Discount { + /** + * ID of the coupon to create a new discount for. + */ + coupon?: string; + + /** + * ID of an existing discount on the object (or one of its ancestors) to reuse. + */ + discount?: string; + + /** + * Details to determine how long the discount should be applied for. + */ + discount_end?: Discount.DiscountEnd; + } + + namespace Discount { + interface DiscountEnd { + /** + * Time span for the redeemed discount. + */ + duration?: DiscountEnd.Duration; + + /** + * A precise Unix timestamp for the discount to end. Must be in the future. + */ + timestamp?: number; + + /** + * The type of calculation made to determine when the discount ends. + */ + type: DiscountEnd.Type; + } + + namespace DiscountEnd { + interface Duration { + /** + * Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + */ + interval: Duration.Interval; + + /** + * The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + */ + interval_count: number; + } + + namespace Duration { + type Interval = 'day' | 'month' | 'week' | 'year'; + } + + type Type = 'duration' | 'timestamp'; + } + } + + interface Period { + /** + * The end of the period, which must be greater than or equal to the start. This value is inclusive. + */ + end: number; + + /** + * The start of the period. This value is inclusive. + */ + start: number; + } + + interface PriceData { + /** + * Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + */ + currency: string; + + /** + * The ID of the product that this price will belong to. One of `product` or `product_data` is required. + */ + product?: string; + + /** + * Data used to generate a new product object inline. One of `product` or `product_data` is required. + */ + product_data?: PriceData.ProductData; + + /** + * Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + */ + tax_behavior?: PriceData.TaxBehavior; + + /** + * A non-negative integer in cents (or local equivalent) representing how much to charge. One of `unit_amount` or `unit_amount_decimal` is required. + */ + unit_amount?: number; + + /** + * Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + */ + unit_amount_decimal?: string; + } + + namespace PriceData { + interface ProductData { + /** + * The product's description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes. + */ + description?: string; + + /** + * A list of up to 8 URLs of images for this product, meant to be displayable to the customer. + */ + images?: Array; + + /** + * Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + */ + metadata?: Stripe.MetadataParam; + + /** + * The product's name, meant to be displayable to the customer. + */ + name: string; + + /** + * A [tax code](https://stripe.com/docs/tax/tax-categories) ID. + */ + tax_code?: string; + } + + type TaxBehavior = 'exclusive' | 'inclusive' | 'unspecified'; + } + + interface TaxAmount { + /** + * The amount, in cents (or local equivalent), of the tax. + */ + amount: number; + + /** + * Data to find or create a TaxRate object. + * + * Stripe automatically creates or reuses a TaxRate object for each tax amount. If the `tax_rate_data` exactly matches a previous value, Stripe will reuse the TaxRate object. TaxRate objects created automatically by Stripe are immediately archived, do not appear in the line item's `tax_rates`, and cannot be directly added to invoices, payments, or line items. + */ + tax_rate_data: TaxAmount.TaxRateData; + + /** + * The amount on which tax is calculated, in cents (or local equivalent). + */ + taxable_amount: number; + } + + namespace TaxAmount { + interface TaxRateData { + /** + * Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + */ + country?: string; + + /** + * An arbitrary string attached to the tax rate for your internal use only. It will not be visible to your customers. + */ + description?: string; + + /** + * The display name of the tax rate, which will be shown to users. + */ + display_name: string; + + /** + * This specifies if the tax rate is inclusive or exclusive. + */ + inclusive: boolean; + + /** + * The jurisdiction for the tax rate. You can use this label field for tax reporting purposes. It also appears on your customer's invoice. + */ + jurisdiction?: string; + + /** + * The statutory tax rate percent. This field accepts decimal values between 0 and 100 inclusive with at most 4 decimal places. To accommodate fixed-amount taxes, set the percentage to zero. Stripe will not display zero percentages on the invoice unless the `amount` of the tax is also zero. + */ + percentage: number; + + /** + * [ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2:US), without country prefix. For example, "NY" for New York, United States. + */ + state?: string; + + /** + * The high-level tax type, such as `vat` or `sales_tax`. + */ + tax_type?: TaxRateData.TaxType; + } + + namespace TaxRateData { + type TaxType = + | 'amusement_tax' + | 'communications_tax' + | 'gst' + | 'hst' + | 'igst' + | 'jct' + | 'lease_tax' + | 'pst' + | 'qst' + | 'rst' + | 'sales_tax' + | 'vat'; + } + } + } + } + interface InvoiceAttachPaymentIntentParams { /** * The ID of the PaymentIntent to attach to the invoice. @@ -6440,6 +6740,43 @@ declare module 'stripe' { source?: string; } + interface InvoiceRemoveLinesParams { + /** + * The line items to remove. + */ + lines: Array; + + /** + * Specifies which fields in the response should be expanded. + */ + expand?: Array; + + /** + * Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + */ + invoice_metadata?: Stripe.Emptyable<{ + [key: string]: string; + }>; + } + + namespace InvoiceRemoveLinesParams { + interface Line { + /** + * Either `delete` or `unassign`. Deleted line items are permanently deleted. Unassigned line items can be reassigned to an invoice. + */ + behavior: Line.Behavior; + + /** + * ID of an existing line item to remove from this invoice. + */ + id: string; + } + + namespace Line { + type Behavior = 'delete' | 'unassign'; + } + } + interface InvoiceRetrievePaymentParams { /** * Specifies which fields in the response should be expanded. @@ -8847,6 +9184,306 @@ declare module 'stripe' { expand?: Array; } + interface InvoiceUpdateLinesParams { + /** + * The line items to update. + */ + lines: Array; + + /** + * Specifies which fields in the response should be expanded. + */ + expand?: Array; + + /** + * Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + */ + invoice_metadata?: Stripe.Emptyable<{ + [key: string]: string; + }>; + } + + namespace InvoiceUpdateLinesParams { + interface Line { + /** + * The integer amount in cents (or local equivalent) of the charge to be applied to the upcoming invoice. If you want to apply a credit to the customer's account, pass a negative amount. + */ + amount?: number; + + /** + * An arbitrary string which you can attach to the invoice item. The description is displayed in the invoice for easy tracking. + */ + description?: string; + + /** + * Controls whether discounts apply to this line item. Defaults to false for prorations or negative line items, and true for all other line items. Cannot be set to true for prorations. + */ + discountable?: boolean; + + /** + * The coupons & existing discounts which apply to the line item. Item discounts are applied before invoice discounts. Pass an empty string to remove previously-defined discounts. + */ + discounts?: Stripe.Emptyable>; + + /** + * ID of an existing line item on the invoice. + */ + id: string; + + /** + * The IDs of the margins to apply to the line item. When set, the `default_margins` on the invoice do not apply to this line item. + */ + margins?: Stripe.Emptyable>; + + /** + * Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + */ + metadata?: Stripe.Emptyable; + + /** + * The period associated with this invoice item. When set to different values, the period will be rendered on the invoice. If you have [Stripe Revenue Recognition](https://stripe.com/docs/revenue-recognition) enabled, the period will be used to recognize and defer revenue. See the [Revenue Recognition documentation](https://stripe.com/docs/revenue-recognition/methodology/subscriptions-and-invoicing) for details. + */ + period?: Line.Period; + + /** + * The ID of the price object. + */ + price?: string; + + /** + * Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. + */ + price_data?: Line.PriceData; + + /** + * Non-negative integer. The quantity of units for the line item. + */ + quantity?: number; + + /** + * A list of up to 10 tax amounts for this line item. This can be useful if you calculate taxes on your own or use a third-party to calculate them. You cannot set tax amounts if any line item has [tax_rates](https://stripe.com/docs/api/invoices/line_item#invoice_line_item_object-tax_rates) or if the invoice has [default_tax_rates](https://stripe.com/docs/api/invoices/object#invoice_object-default_tax_rates) or uses [automatic tax](https://stripe.com/docs/tax/invoicing). Pass an empty string to remove previously defined tax amounts. + */ + tax_amounts?: Stripe.Emptyable>; + + /** + * The tax rates which apply to the line item. When set, the `default_tax_rates` on the invoice do not apply to this line item. Pass an empty string to remove previously-defined tax rates. + */ + tax_rates?: Stripe.Emptyable>; + } + + namespace Line { + interface Discount { + /** + * ID of the coupon to create a new discount for. + */ + coupon?: string; + + /** + * ID of an existing discount on the object (or one of its ancestors) to reuse. + */ + discount?: string; + + /** + * Details to determine how long the discount should be applied for. + */ + discount_end?: Discount.DiscountEnd; + } + + namespace Discount { + interface DiscountEnd { + /** + * Time span for the redeemed discount. + */ + duration?: DiscountEnd.Duration; + + /** + * A precise Unix timestamp for the discount to end. Must be in the future. + */ + timestamp?: number; + + /** + * The type of calculation made to determine when the discount ends. + */ + type: DiscountEnd.Type; + } + + namespace DiscountEnd { + interface Duration { + /** + * Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + */ + interval: Duration.Interval; + + /** + * The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + */ + interval_count: number; + } + + namespace Duration { + type Interval = 'day' | 'month' | 'week' | 'year'; + } + + type Type = 'duration' | 'timestamp'; + } + } + + interface Period { + /** + * The end of the period, which must be greater than or equal to the start. This value is inclusive. + */ + end: number; + + /** + * The start of the period. This value is inclusive. + */ + start: number; + } + + interface PriceData { + /** + * Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + */ + currency: string; + + /** + * The ID of the product that this price will belong to. One of `product` or `product_data` is required. + */ + product?: string; + + /** + * Data used to generate a new product object inline. One of `product` or `product_data` is required. + */ + product_data?: PriceData.ProductData; + + /** + * Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + */ + tax_behavior?: PriceData.TaxBehavior; + + /** + * A non-negative integer in cents (or local equivalent) representing how much to charge. One of `unit_amount` or `unit_amount_decimal` is required. + */ + unit_amount?: number; + + /** + * Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + */ + unit_amount_decimal?: string; + } + + namespace PriceData { + interface ProductData { + /** + * The product's description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes. + */ + description?: string; + + /** + * A list of up to 8 URLs of images for this product, meant to be displayable to the customer. + */ + images?: Array; + + /** + * Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + */ + metadata?: Stripe.MetadataParam; + + /** + * The product's name, meant to be displayable to the customer. + */ + name: string; + + /** + * A [tax code](https://stripe.com/docs/tax/tax-categories) ID. + */ + tax_code?: string; + } + + type TaxBehavior = 'exclusive' | 'inclusive' | 'unspecified'; + } + + interface TaxAmount { + /** + * The amount, in cents (or local equivalent), of the tax. + */ + amount: number; + + /** + * Data to find or create a TaxRate object. + * + * Stripe automatically creates or reuses a TaxRate object for each tax amount. If the `tax_rate_data` exactly matches a previous value, Stripe will reuse the TaxRate object. TaxRate objects created automatically by Stripe are immediately archived, do not appear in the line item's `tax_rates`, and cannot be directly added to invoices, payments, or line items. + */ + tax_rate_data: TaxAmount.TaxRateData; + + /** + * The amount on which tax is calculated, in cents (or local equivalent). + */ + taxable_amount: number; + } + + namespace TaxAmount { + interface TaxRateData { + /** + * Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + */ + country?: string; + + /** + * An arbitrary string attached to the tax rate for your internal use only. It will not be visible to your customers. + */ + description?: string; + + /** + * The display name of the tax rate, which will be shown to users. + */ + display_name: string; + + /** + * This specifies if the tax rate is inclusive or exclusive. + */ + inclusive: boolean; + + /** + * The jurisdiction for the tax rate. You can use this label field for tax reporting purposes. It also appears on your customer's invoice. + */ + jurisdiction?: string; + + /** + * The statutory tax rate percent. This field accepts decimal values between 0 and 100 inclusive with at most 4 decimal places. To accommodate fixed-amount taxes, set the percentage to zero. Stripe will not display zero percentages on the invoice unless the `amount` of the tax is also zero. + */ + percentage: number; + + /** + * [ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2:US), without country prefix. For example, "NY" for New York, United States. + */ + state?: string; + + /** + * The high-level tax type, such as `vat` or `sales_tax`. + */ + tax_type?: TaxRateData.TaxType; + } + + namespace TaxRateData { + type TaxType = + | 'amusement_tax' + | 'communications_tax' + | 'gst' + | 'hst' + | 'igst' + | 'jct' + | 'lease_tax' + | 'pst' + | 'qst' + | 'rst' + | 'sales_tax' + | 'vat'; + } + } + } + } + interface InvoiceUpdateLineItemParams { /** * The integer amount in cents (or local equivalent) of the charge to be applied to the upcoming invoice. If you want to apply a credit to the customer's account, pass a negative amount. @@ -9197,6 +9834,15 @@ declare module 'stripe' { options?: RequestOptions ): Promise>; + /** + * Adds multiple line items to an invoice. This is only possible when an invoice is still a draft. + */ + addLines( + id: string, + params: InvoiceAddLinesParams, + options?: RequestOptions + ): Promise>; + /** * Attaches a PaymentIntent to the invoice, adding it to the list of payments. * When the PaymentIntent's status changes to succeeded, the payment is credited @@ -9305,6 +9951,15 @@ declare module 'stripe' { options?: RequestOptions ): Promise>; + /** + * Removes multiple line items from an invoice. This is only possible when an invoice is still a draft. + */ + removeLines( + id: string, + params: InvoiceRemoveLinesParams, + options?: RequestOptions + ): Promise>; + /** * Retrieves the invoice payment with the given ID. */ @@ -9361,6 +10016,15 @@ declare module 'stripe' { options?: RequestOptions ): Promise>; + /** + * Updates multiple line items on an invoice. This is only possible when an invoice is still a draft. + */ + updateLines( + id: string, + params: InvoiceUpdateLinesParams, + options?: RequestOptions + ): Promise>; + /** * Updates an invoice's line item. Some fields, such as tax_amounts, only live on the invoice line item, * so they can only be updated through this endpoint. Other fields, such as amount, live on both the invoice diff --git a/types/Issuing/PhysicalBundles.d.ts b/types/Issuing/PhysicalBundles.d.ts index 2612ef0547..8fef28c8ea 100644 --- a/types/Issuing/PhysicalBundles.d.ts +++ b/types/Issuing/PhysicalBundles.d.ts @@ -51,12 +51,19 @@ declare module 'stripe' { * The policy for how to use carrier letter text in a card design with this physical bundle. */ carrier_text: Features.CarrierText; + + /** + * The policy for how to use a second line on a card with this physical bundle. + */ + second_line: Features.SecondLine; } namespace Features { type CardLogo = 'optional' | 'required' | 'unsupported'; type CarrierText = 'optional' | 'required' | 'unsupported'; + + type SecondLine = 'optional' | 'required' | 'unsupported'; } type Status = 'active' | 'inactive' | 'review'; diff --git a/types/PaymentIntents.d.ts b/types/PaymentIntents.d.ts index 9bf2424929..7205780861 100644 --- a/types/PaymentIntents.d.ts +++ b/types/PaymentIntents.d.ts @@ -571,6 +571,8 @@ declare module 'stripe' { konbini_display_details?: NextAction.KonbiniDisplayDetails; + multibanco_display_details?: NextAction.MultibancoDisplayDetails; + oxxo_display_details?: NextAction.OxxoDisplayDetails; paynow_display_qr_code?: NextAction.PaynowDisplayQrCode; @@ -1012,6 +1014,23 @@ declare module 'stripe' { } } + interface MultibancoDisplayDetails { + /** + * Entity number associated with this Multibanco payment. + */ + entity: string | null; + + /** + * The timestamp at which the Multibanco voucher expires. + */ + expires_at: number | null; + + /** + * Reference number associated with this Multibanco payment. + */ + reference: string | null; + } + interface OxxoDisplayDetails { /** * The timestamp after which the OXXO voucher expires. @@ -1580,6 +1599,8 @@ declare module 'stripe' { link?: PaymentMethodOptions.Link; + multibanco?: PaymentMethodOptions.Multibanco; + oxxo?: PaymentMethodOptions.Oxxo; p24?: PaymentMethodOptions.P24; @@ -2298,6 +2319,17 @@ declare module 'stripe' { type SetupFutureUsage = 'none' | 'off_session'; } + interface Multibanco { + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + */ + setup_future_usage?: 'none'; + } + interface Oxxo { /** * The number of calendar days before an OXXO invoice expires. For example, if you create an OXXO invoice on Monday and you set expires_after_days to 2, the OXXO invoice will expire on Wednesday at 23:59 America/Mexico_City time. diff --git a/types/PaymentIntentsResource.d.ts b/types/PaymentIntentsResource.d.ts index ca16bafbd4..77341fdc2b 100644 --- a/types/PaymentIntentsResource.d.ts +++ b/types/PaymentIntentsResource.d.ts @@ -1016,6 +1016,11 @@ declare module 'stripe' { */ metadata?: Stripe.MetadataParam; + /** + * If this is a `multibanco` PaymentMethod, this hash contains details about the Multibanco payment method. + */ + multibanco?: PaymentMethodData.Multibanco; + /** * If this is an `oxxo` PaymentMethod, this hash contains details about the OXXO payment method. */ @@ -1329,6 +1334,8 @@ declare module 'stripe' { interface Link {} + interface Multibanco {} + interface Oxxo {} interface P24 { @@ -1444,6 +1451,7 @@ declare module 'stripe' { | 'klarna' | 'konbini' | 'link' + | 'multibanco' | 'oxxo' | 'p24' | 'paynow' @@ -1613,6 +1621,11 @@ declare module 'stripe' { */ link?: Stripe.Emptyable; + /** + * If this is a `multibanco` PaymentMethod, this sub-hash contains details about the Multibanco payment method options. + */ + multibanco?: Stripe.Emptyable; + /** * If this is a `oxxo` PaymentMethod, this sub-hash contains details about the OXXO payment method options. */ @@ -2572,6 +2585,19 @@ declare module 'stripe' { type SetupFutureUsage = 'none' | 'off_session'; } + interface Multibanco { + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * + * If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`. + */ + setup_future_usage?: 'none'; + } + interface Oxxo { /** * The number of calendar days before an OXXO voucher expires. For example, if you create an OXXO voucher on Monday and you set expires_after_days to 2, the OXXO invoice will expire on Wednesday at 23:59 America/Mexico_City time. @@ -4041,6 +4067,11 @@ declare module 'stripe' { */ metadata?: Stripe.MetadataParam; + /** + * If this is a `multibanco` PaymentMethod, this hash contains details about the Multibanco payment method. + */ + multibanco?: PaymentMethodData.Multibanco; + /** * If this is an `oxxo` PaymentMethod, this hash contains details about the OXXO payment method. */ @@ -4354,6 +4385,8 @@ declare module 'stripe' { interface Link {} + interface Multibanco {} + interface Oxxo {} interface P24 { @@ -4469,6 +4502,7 @@ declare module 'stripe' { | 'klarna' | 'konbini' | 'link' + | 'multibanco' | 'oxxo' | 'p24' | 'paynow' @@ -4638,6 +4672,11 @@ declare module 'stripe' { */ link?: Stripe.Emptyable; + /** + * If this is a `multibanco` PaymentMethod, this sub-hash contains details about the Multibanco payment method options. + */ + multibanco?: Stripe.Emptyable; + /** * If this is a `oxxo` PaymentMethod, this sub-hash contains details about the OXXO payment method options. */ @@ -5597,6 +5636,19 @@ declare module 'stripe' { type SetupFutureUsage = 'none' | 'off_session'; } + interface Multibanco { + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * + * If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`. + */ + setup_future_usage?: 'none'; + } + interface Oxxo { /** * The number of calendar days before an OXXO voucher expires. For example, if you create an OXXO voucher on Monday and you set expires_after_days to 2, the OXXO invoice will expire on Wednesday at 23:59 America/Mexico_City time. @@ -7823,6 +7875,11 @@ declare module 'stripe' { */ metadata?: Stripe.MetadataParam; + /** + * If this is a `multibanco` PaymentMethod, this hash contains details about the Multibanco payment method. + */ + multibanco?: PaymentMethodData.Multibanco; + /** * If this is an `oxxo` PaymentMethod, this hash contains details about the OXXO payment method. */ @@ -8136,6 +8193,8 @@ declare module 'stripe' { interface Link {} + interface Multibanco {} + interface Oxxo {} interface P24 { @@ -8251,6 +8310,7 @@ declare module 'stripe' { | 'klarna' | 'konbini' | 'link' + | 'multibanco' | 'oxxo' | 'p24' | 'paynow' @@ -8420,6 +8480,11 @@ declare module 'stripe' { */ link?: Stripe.Emptyable; + /** + * If this is a `multibanco` PaymentMethod, this sub-hash contains details about the Multibanco payment method options. + */ + multibanco?: Stripe.Emptyable; + /** * If this is a `oxxo` PaymentMethod, this sub-hash contains details about the OXXO payment method options. */ @@ -9379,6 +9444,19 @@ declare module 'stripe' { type SetupFutureUsage = 'none' | 'off_session'; } + interface Multibanco { + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * + * If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`. + */ + setup_future_usage?: 'none'; + } + interface Oxxo { /** * The number of calendar days before an OXXO voucher expires. For example, if you create an OXXO voucher on Monday and you set expires_after_days to 2, the OXXO invoice will expire on Wednesday at 23:59 America/Mexico_City time. diff --git a/types/PaymentMethodConfigurationsResource.d.ts b/types/PaymentMethodConfigurationsResource.d.ts index fd715c2d0a..9a24d9a708 100644 --- a/types/PaymentMethodConfigurationsResource.d.ts +++ b/types/PaymentMethodConfigurationsResource.d.ts @@ -133,6 +133,11 @@ declare module 'stripe' { */ link?: PaymentMethodConfigurationCreateParams.Link; + /** + * Stripe users in Europe and the United States can accept Multibanco payments from customers in Portugal using [Sources](https://stripe.com/docs/sources)—a single integration path for creating payments using any supported method. + */ + multibanco?: PaymentMethodConfigurationCreateParams.Multibanco; + /** * Configuration name. */ @@ -695,6 +700,26 @@ declare module 'stripe' { } } + interface Multibanco { + /** + * Whether or not the payment method should be displayed. + */ + display_preference?: Multibanco.DisplayPreference; + } + + namespace Multibanco { + interface DisplayPreference { + /** + * The account's preference for whether or not to display this payment method. + */ + preference?: DisplayPreference.Preference; + } + + namespace DisplayPreference { + type Preference = 'none' | 'off' | 'on'; + } + } + interface Oxxo { /** * Whether or not the payment method should be displayed. @@ -1039,6 +1064,11 @@ declare module 'stripe' { */ link?: PaymentMethodConfigurationUpdateParams.Link; + /** + * Stripe users in Europe and the United States can accept Multibanco payments from customers in Portugal using [Sources](https://stripe.com/docs/sources)—a single integration path for creating payments using any supported method. + */ + multibanco?: PaymentMethodConfigurationUpdateParams.Multibanco; + /** * Configuration name. */ @@ -1596,6 +1626,26 @@ declare module 'stripe' { } } + interface Multibanco { + /** + * Whether or not the payment method should be displayed. + */ + display_preference?: Multibanco.DisplayPreference; + } + + namespace Multibanco { + interface DisplayPreference { + /** + * The account's preference for whether or not to display this payment method. + */ + preference?: DisplayPreference.Preference; + } + + namespace DisplayPreference { + type Preference = 'none' | 'off' | 'on'; + } + } + interface Oxxo { /** * Whether or not the payment method should be displayed. diff --git a/types/PaymentMethods.d.ts b/types/PaymentMethods.d.ts index 5cfb83d7dd..50483b515f 100644 --- a/types/PaymentMethods.d.ts +++ b/types/PaymentMethods.d.ts @@ -86,6 +86,8 @@ declare module 'stripe' { */ metadata: Stripe.Metadata | null; + multibanco?: PaymentMethod.Multibanco; + oxxo?: PaymentMethod.Oxxo; p24?: PaymentMethod.P24; @@ -809,6 +811,8 @@ declare module 'stripe' { persistent_token?: string; } + interface Multibanco {} + interface Oxxo {} interface P24 { @@ -984,6 +988,7 @@ declare module 'stripe' { | 'klarna' | 'konbini' | 'link' + | 'multibanco' | 'oxxo' | 'p24' | 'paynow' diff --git a/types/PaymentMethodsResource.d.ts b/types/PaymentMethodsResource.d.ts index 0b3c8a4748..60533b453f 100644 --- a/types/PaymentMethodsResource.d.ts +++ b/types/PaymentMethodsResource.d.ts @@ -128,6 +128,11 @@ declare module 'stripe' { */ metadata?: Stripe.MetadataParam; + /** + * If this is a `multibanco` PaymentMethod, this hash contains details about the Multibanco payment method. + */ + multibanco?: PaymentMethodCreateParams.Multibanco; + /** * If this is an `oxxo` PaymentMethod, this hash contains details about the OXXO payment method. */ @@ -493,6 +498,8 @@ declare module 'stripe' { interface Link {} + interface Multibanco {} + interface Oxxo {} interface P24 { @@ -609,6 +616,7 @@ declare module 'stripe' { | 'klarna' | 'konbini' | 'link' + | 'multibanco' | 'oxxo' | 'p24' | 'paynow' @@ -837,6 +845,7 @@ declare module 'stripe' { | 'klarna' | 'konbini' | 'link' + | 'multibanco' | 'oxxo' | 'p24' | 'paynow' diff --git a/types/Plans.d.ts b/types/Plans.d.ts index fd4040f863..12edd52f03 100644 --- a/types/Plans.d.ts +++ b/types/Plans.d.ts @@ -103,6 +103,11 @@ declare module 'stripe' { */ metadata: Stripe.Metadata | null; + /** + * The meter tracking the usage of a metered price + */ + meter?: string | null; + /** * A brief description of the plan, hidden from customers. */ diff --git a/types/PlansResource.d.ts b/types/PlansResource.d.ts index 37b9a307f6..fd6e09eb5d 100644 --- a/types/PlansResource.d.ts +++ b/types/PlansResource.d.ts @@ -58,6 +58,11 @@ declare module 'stripe' { */ metadata?: Stripe.Emptyable; + /** + * The meter tracking the usage of a metered price + */ + meter?: string; + /** * A brief description of the plan, hidden from customers. */ diff --git a/types/Prices.d.ts b/types/Prices.d.ts index 4b6a5c1932..c54f125b1c 100644 --- a/types/Prices.d.ts +++ b/types/Prices.d.ts @@ -277,6 +277,11 @@ declare module 'stripe' { */ interval_count: number; + /** + * The meter tracking the usage of a metered price + */ + meter?: string | null; + /** * Default number of trial days when subscribing a customer to this price using [`trial_from_plan=true`](https://stripe.com/docs/api#create_subscription-trial_from_plan). */ diff --git a/types/PricesResource.d.ts b/types/PricesResource.d.ts index 673e9b5ffe..038af1f7b1 100644 --- a/types/PricesResource.d.ts +++ b/types/PricesResource.d.ts @@ -261,6 +261,11 @@ declare module 'stripe' { */ interval_count?: number; + /** + * The meter tracking the usage of a metered price + */ + meter?: string; + /** * Default number of trial days when subscribing a customer to this price using [`trial_from_plan=true`](https://stripe.com/docs/api#create_subscription-trial_from_plan). */ @@ -538,6 +543,11 @@ declare module 'stripe' { */ interval?: Recurring.Interval; + /** + * Filter by the price's meter. + */ + meter?: string; + /** * Filter by the usage type for this price. Can be either `metered` or `licensed`. */ diff --git a/types/Refunds.d.ts b/types/Refunds.d.ts index e4f17e426d..79329802e0 100644 --- a/types/Refunds.d.ts +++ b/types/Refunds.d.ts @@ -139,6 +139,8 @@ declare module 'stripe' { klarna?: DestinationDetails.Klarna; + multibanco?: DestinationDetails.Multibanco; + mx_bank_transfer?: DestinationDetails.MxBankTransfer; p24?: DestinationDetails.P24; @@ -276,6 +278,18 @@ declare module 'stripe' { interface Klarna {} + interface Multibanco { + /** + * The reference assigned to the refund. + */ + reference: string | null; + + /** + * Status of the reference on the refund. This can be `pending`, `available` or `unavailable`. + */ + reference_status: string | null; + } + interface MxBankTransfer { /** * The reference assigned to the refund. diff --git a/types/SetupIntentsResource.d.ts b/types/SetupIntentsResource.d.ts index 632ebe5dca..c2e739a855 100644 --- a/types/SetupIntentsResource.d.ts +++ b/types/SetupIntentsResource.d.ts @@ -294,6 +294,11 @@ declare module 'stripe' { */ metadata?: Stripe.MetadataParam; + /** + * If this is a `multibanco` PaymentMethod, this hash contains details about the Multibanco payment method. + */ + multibanco?: PaymentMethodData.Multibanco; + /** * If this is an `oxxo` PaymentMethod, this hash contains details about the OXXO payment method. */ @@ -607,6 +612,8 @@ declare module 'stripe' { interface Link {} + interface Multibanco {} + interface Oxxo {} interface P24 { @@ -722,6 +729,7 @@ declare module 'stripe' { | 'klarna' | 'konbini' | 'link' + | 'multibanco' | 'oxxo' | 'p24' | 'paynow' @@ -1470,6 +1478,11 @@ declare module 'stripe' { */ metadata?: Stripe.MetadataParam; + /** + * If this is a `multibanco` PaymentMethod, this hash contains details about the Multibanco payment method. + */ + multibanco?: PaymentMethodData.Multibanco; + /** * If this is an `oxxo` PaymentMethod, this hash contains details about the OXXO payment method. */ @@ -1783,6 +1796,8 @@ declare module 'stripe' { interface Link {} + interface Multibanco {} + interface Oxxo {} interface P24 { @@ -1898,6 +1913,7 @@ declare module 'stripe' { | 'klarna' | 'konbini' | 'link' + | 'multibanco' | 'oxxo' | 'p24' | 'paynow' @@ -2733,6 +2749,11 @@ declare module 'stripe' { */ metadata?: Stripe.MetadataParam; + /** + * If this is a `multibanco` PaymentMethod, this hash contains details about the Multibanco payment method. + */ + multibanco?: PaymentMethodData.Multibanco; + /** * If this is an `oxxo` PaymentMethod, this hash contains details about the OXXO payment method. */ @@ -3046,6 +3067,8 @@ declare module 'stripe' { interface Link {} + interface Multibanco {} + interface Oxxo {} interface P24 { @@ -3161,6 +3184,7 @@ declare module 'stripe' { | 'klarna' | 'konbini' | 'link' + | 'multibanco' | 'oxxo' | 'p24' | 'paynow' diff --git a/types/Subscriptions.d.ts b/types/Subscriptions.d.ts index 6f5a9d90a9..0d684bd16c 100644 --- a/types/Subscriptions.d.ts +++ b/types/Subscriptions.d.ts @@ -414,6 +414,11 @@ declare module 'stripe' { */ konbini: PaymentMethodOptions.Konbini | null; + /** + * This sub-hash contains details about the SEPA Direct Debit payment method options to pass to invoices created by the subscription. + */ + sepa_debit: PaymentMethodOptions.SepaDebit | null; + /** * This sub-hash contains details about the ACH direct debit payment method options to pass to invoices created by the subscription. */ @@ -543,6 +548,8 @@ declare module 'stripe' { interface Konbini {} + interface SepaDebit {} + interface UsBankAccount { financial_connections?: UsBankAccount.FinancialConnections; diff --git a/types/SubscriptionsResource.d.ts b/types/SubscriptionsResource.d.ts index 443bcc0c23..7ddced4135 100644 --- a/types/SubscriptionsResource.d.ts +++ b/types/SubscriptionsResource.d.ts @@ -16,7 +16,7 @@ declare module 'stripe' { /** * A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. The request must be made by a platform account on a connected account in order to set an application fee percentage. For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions). */ - application_fee_percent?: number; + application_fee_percent?: Stripe.Emptyable; /** * Automatic tax settings for this subscription. We recommend you only include this parameter when the existing value is being changed. @@ -721,6 +721,11 @@ declare module 'stripe' { */ konbini?: Stripe.Emptyable; + /** + * This sub-hash contains details about the SEPA Direct Debit payment method options to pass to the invoice's PaymentIntent. + */ + sepa_debit?: Stripe.Emptyable; + /** * This sub-hash contains details about the ACH direct debit payment method options to pass to the invoice's PaymentIntent. */ @@ -860,6 +865,8 @@ declare module 'stripe' { interface Konbini {} + interface SepaDebit {} + interface UsBankAccount { /** * Additional fields for Financial Connections Session creation @@ -1017,7 +1024,7 @@ declare module 'stripe' { /** * A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. The request must be made by a platform account on a connected account in order to set an application fee percentage. For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions). */ - application_fee_percent?: number; + application_fee_percent?: Stripe.Emptyable; /** * Automatic tax settings for this subscription. We recommend you only include this parameter when the existing value is being changed. @@ -1724,6 +1731,11 @@ declare module 'stripe' { */ konbini?: Stripe.Emptyable; + /** + * This sub-hash contains details about the SEPA Direct Debit payment method options to pass to the invoice's PaymentIntent. + */ + sepa_debit?: Stripe.Emptyable; + /** * This sub-hash contains details about the ACH direct debit payment method options to pass to the invoice's PaymentIntent. */ @@ -1863,6 +1875,8 @@ declare module 'stripe' { interface Konbini {} + interface SepaDebit {} + interface UsBankAccount { /** * Additional fields for Financial Connections Session creation diff --git a/types/TestHelpers/ConfirmationTokensResource.d.ts b/types/TestHelpers/ConfirmationTokensResource.d.ts new file mode 100644 index 0000000000..3991909a55 --- /dev/null +++ b/types/TestHelpers/ConfirmationTokensResource.d.ts @@ -0,0 +1,676 @@ +// File generated from our OpenAPI spec + +declare module 'stripe' { + namespace Stripe { + namespace TestHelpers { + interface ConfirmationTokenCreateParams { + /** + * Specifies which fields in the response should be expanded. + */ + expand?: Array; + + /** + * ID of an existing PaymentMethod. + */ + payment_method?: string; + + /** + * If provided, this hash will be used to create a PaymentMethod. + */ + payment_method_data?: ConfirmationTokenCreateParams.PaymentMethodData; + + /** + * Return URL used to confirm the Intent. + */ + return_url?: string; + + /** + * Indicates that you intend to make future payments with this ConfirmationToken's payment method. + * + * The presence of this property will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. + */ + setup_future_usage?: ConfirmationTokenCreateParams.SetupFutureUsage; + + /** + * Shipping information for this ConfirmationToken. + */ + shipping?: ConfirmationTokenCreateParams.Shipping; + } + + namespace ConfirmationTokenCreateParams { + interface PaymentMethodData { + /** + * If this is an `acss_debit` PaymentMethod, this hash contains details about the ACSS Debit payment method. + */ + acss_debit?: PaymentMethodData.AcssDebit; + + /** + * If this is an `affirm` PaymentMethod, this hash contains details about the Affirm payment method. + */ + affirm?: PaymentMethodData.Affirm; + + /** + * If this is an `AfterpayClearpay` PaymentMethod, this hash contains details about the AfterpayClearpay payment method. + */ + afterpay_clearpay?: PaymentMethodData.AfterpayClearpay; + + /** + * If this is an `Alipay` PaymentMethod, this hash contains details about the Alipay payment method. + */ + alipay?: PaymentMethodData.Alipay; + + /** + * If this is an `au_becs_debit` PaymentMethod, this hash contains details about the bank account. + */ + au_becs_debit?: PaymentMethodData.AuBecsDebit; + + /** + * If this is a `bacs_debit` PaymentMethod, this hash contains details about the Bacs Direct Debit bank account. + */ + bacs_debit?: PaymentMethodData.BacsDebit; + + /** + * If this is a `bancontact` PaymentMethod, this hash contains details about the Bancontact payment method. + */ + bancontact?: PaymentMethodData.Bancontact; + + /** + * Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods. + */ + billing_details?: PaymentMethodData.BillingDetails; + + /** + * If this is a `blik` PaymentMethod, this hash contains details about the BLIK payment method. + */ + blik?: PaymentMethodData.Blik; + + /** + * If this is a `boleto` PaymentMethod, this hash contains details about the Boleto payment method. + */ + boleto?: PaymentMethodData.Boleto; + + /** + * If this is a `cashapp` PaymentMethod, this hash contains details about the Cash App Pay payment method. + */ + cashapp?: PaymentMethodData.Cashapp; + + /** + * If this is a `customer_balance` PaymentMethod, this hash contains details about the CustomerBalance payment method. + */ + customer_balance?: PaymentMethodData.CustomerBalance; + + /** + * If this is an `eps` PaymentMethod, this hash contains details about the EPS payment method. + */ + eps?: PaymentMethodData.Eps; + + /** + * If this is an `fpx` PaymentMethod, this hash contains details about the FPX payment method. + */ + fpx?: PaymentMethodData.Fpx; + + /** + * If this is a `giropay` PaymentMethod, this hash contains details about the Giropay payment method. + */ + giropay?: PaymentMethodData.Giropay; + + /** + * If this is a `grabpay` PaymentMethod, this hash contains details about the GrabPay payment method. + */ + grabpay?: PaymentMethodData.Grabpay; + + /** + * If this is an `ideal` PaymentMethod, this hash contains details about the iDEAL payment method. + */ + ideal?: PaymentMethodData.Ideal; + + /** + * If this is an `interac_present` PaymentMethod, this hash contains details about the Interac Present payment method. + */ + interac_present?: PaymentMethodData.InteracPresent; + + /** + * If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method. + */ + klarna?: PaymentMethodData.Klarna; + + /** + * If this is a `konbini` PaymentMethod, this hash contains details about the Konbini payment method. + */ + konbini?: PaymentMethodData.Konbini; + + /** + * If this is an `Link` PaymentMethod, this hash contains details about the Link payment method. + */ + link?: PaymentMethodData.Link; + + /** + * Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + */ + metadata?: Stripe.MetadataParam; + + /** + * If this is a `multibanco` PaymentMethod, this hash contains details about the Multibanco payment method. + */ + multibanco?: PaymentMethodData.Multibanco; + + /** + * If this is an `oxxo` PaymentMethod, this hash contains details about the OXXO payment method. + */ + oxxo?: PaymentMethodData.Oxxo; + + /** + * If this is a `p24` PaymentMethod, this hash contains details about the P24 payment method. + */ + p24?: PaymentMethodData.P24; + + /** + * If this is a `paynow` PaymentMethod, this hash contains details about the PayNow payment method. + */ + paynow?: PaymentMethodData.Paynow; + + /** + * If this is a `paypal` PaymentMethod, this hash contains details about the PayPal payment method. + */ + paypal?: PaymentMethodData.Paypal; + + /** + * If this is a `payto` PaymentMethod, this hash contains details about the PayTo payment method. + */ + payto?: PaymentMethodData.Payto; + + /** + * If this is a `pix` PaymentMethod, this hash contains details about the Pix payment method. + */ + pix?: PaymentMethodData.Pix; + + /** + * If this is a `promptpay` PaymentMethod, this hash contains details about the PromptPay payment method. + */ + promptpay?: PaymentMethodData.Promptpay; + + /** + * Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information. + */ + radar_options?: PaymentMethodData.RadarOptions; + + /** + * If this is a `Revolut Pay` PaymentMethod, this hash contains details about the Revolut Pay payment method. + */ + revolut_pay?: PaymentMethodData.RevolutPay; + + /** + * If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account. + */ + sepa_debit?: PaymentMethodData.SepaDebit; + + /** + * If this is a `sofort` PaymentMethod, this hash contains details about the SOFORT payment method. + */ + sofort?: PaymentMethodData.Sofort; + + /** + * If this is a `swish` PaymentMethod, this hash contains details about the Swish payment method. + */ + swish?: PaymentMethodData.Swish; + + /** + * If this is a Twint PaymentMethod, this hash contains details about the Twint payment method. + */ + twint?: PaymentMethodData.Twint; + + /** + * The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type. + */ + type: PaymentMethodData.Type; + + /** + * If this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method. + */ + us_bank_account?: PaymentMethodData.UsBankAccount; + + /** + * If this is an `wechat_pay` PaymentMethod, this hash contains details about the wechat_pay payment method. + */ + wechat_pay?: PaymentMethodData.WechatPay; + + /** + * If this is a `zip` PaymentMethod, this hash contains details about the Zip payment method. + */ + zip?: PaymentMethodData.Zip; + } + + namespace PaymentMethodData { + interface AcssDebit { + /** + * Customer's bank account number. + */ + account_number: string; + + /** + * Institution number of the customer's bank. + */ + institution_number: string; + + /** + * Transit number of the customer's bank. + */ + transit_number: string; + } + + interface Affirm {} + + interface AfterpayClearpay {} + + interface Alipay {} + + interface AuBecsDebit { + /** + * The account number for the bank account. + */ + account_number: string; + + /** + * Bank-State-Branch number of the bank account. + */ + bsb_number: string; + } + + interface BacsDebit { + /** + * Account number of the bank account that the funds will be debited from. + */ + account_number?: string; + + /** + * Sort code of the bank account. (e.g., `10-20-30`) + */ + sort_code?: string; + } + + interface Bancontact {} + + interface BillingDetails { + /** + * Billing address. + */ + address?: Stripe.Emptyable; + + /** + * Email address. + */ + email?: Stripe.Emptyable; + + /** + * Full name. + */ + name?: Stripe.Emptyable; + + /** + * Billing phone number (including extension). + */ + phone?: Stripe.Emptyable; + } + + interface Blik {} + + interface Boleto { + /** + * The tax ID of the customer (CPF for individual consumers or CNPJ for businesses consumers) + */ + tax_id: string; + } + + interface Cashapp {} + + interface CustomerBalance {} + + interface Eps { + /** + * The customer's bank. + */ + bank?: Eps.Bank; + } + + namespace Eps { + type Bank = + | 'arzte_und_apotheker_bank' + | 'austrian_anadi_bank_ag' + | 'bank_austria' + | 'bankhaus_carl_spangler' + | 'bankhaus_schelhammer_und_schattera_ag' + | 'bawag_psk_ag' + | 'bks_bank_ag' + | 'brull_kallmus_bank_ag' + | 'btv_vier_lander_bank' + | 'capital_bank_grawe_gruppe_ag' + | 'deutsche_bank_ag' + | 'dolomitenbank' + | 'easybank_ag' + | 'erste_bank_und_sparkassen' + | 'hypo_alpeadriabank_international_ag' + | 'hypo_bank_burgenland_aktiengesellschaft' + | 'hypo_noe_lb_fur_niederosterreich_u_wien' + | 'hypo_oberosterreich_salzburg_steiermark' + | 'hypo_tirol_bank_ag' + | 'hypo_vorarlberg_bank_ag' + | 'marchfelder_bank' + | 'oberbank_ag' + | 'raiffeisen_bankengruppe_osterreich' + | 'schoellerbank_ag' + | 'sparda_bank_wien' + | 'volksbank_gruppe' + | 'volkskreditbank_ag' + | 'vr_bank_braunau'; + } + + interface Fpx { + /** + * Account holder type for FPX transaction + */ + account_holder_type?: Fpx.AccountHolderType; + + /** + * The customer's bank. + */ + bank: Fpx.Bank; + } + + namespace Fpx { + type AccountHolderType = 'company' | 'individual'; + + type Bank = + | 'affin_bank' + | 'agrobank' + | 'alliance_bank' + | 'ambank' + | 'bank_islam' + | 'bank_muamalat' + | 'bank_of_china' + | 'bank_rakyat' + | 'bsn' + | 'cimb' + | 'deutsche_bank' + | 'hong_leong_bank' + | 'hsbc' + | 'kfh' + | 'maybank2e' + | 'maybank2u' + | 'ocbc' + | 'pb_enterprise' + | 'public_bank' + | 'rhb' + | 'standard_chartered' + | 'uob'; + } + + interface Giropay {} + + interface Grabpay {} + + interface Ideal { + /** + * The customer's bank. + */ + bank?: Ideal.Bank; + } + + namespace Ideal { + type Bank = + | 'abn_amro' + | 'asn_bank' + | 'bunq' + | 'handelsbanken' + | 'ing' + | 'knab' + | 'moneyou' + | 'n26' + | 'nn' + | 'rabobank' + | 'regiobank' + | 'revolut' + | 'sns_bank' + | 'triodos_bank' + | 'van_lanschot' + | 'yoursafe'; + } + + interface InteracPresent {} + + interface Klarna { + /** + * Customer's date of birth + */ + dob?: Klarna.Dob; + } + + namespace Klarna { + interface Dob { + /** + * The day of birth, between 1 and 31. + */ + day: number; + + /** + * The month of birth, between 1 and 12. + */ + month: number; + + /** + * The four-digit year of birth. + */ + year: number; + } + } + + interface Konbini {} + + interface Link {} + + interface Multibanco {} + + interface Oxxo {} + + interface P24 { + /** + * The customer's bank. + */ + bank?: P24.Bank; + } + + namespace P24 { + type Bank = + | 'alior_bank' + | 'bank_millennium' + | 'bank_nowy_bfg_sa' + | 'bank_pekao_sa' + | 'banki_spbdzielcze' + | 'blik' + | 'bnp_paribas' + | 'boz' + | 'citi_handlowy' + | 'credit_agricole' + | 'envelobank' + | 'etransfer_pocztowy24' + | 'getin_bank' + | 'ideabank' + | 'ing' + | 'inteligo' + | 'mbank_mtransfer' + | 'nest_przelew' + | 'noble_pay' + | 'pbac_z_ipko' + | 'plus_bank' + | 'santander_przelew24' + | 'tmobile_usbugi_bankowe' + | 'toyota_bank' + | 'velobank' + | 'volkswagen_bank'; + } + + interface Paynow {} + + interface Paypal {} + + interface Payto { + /** + * The account number for the bank account. + */ + account_number?: string; + + /** + * Bank-State-Branch number of the bank account. + */ + bsb_number?: string; + + /** + * The PayID alias for the bank account. + */ + pay_id?: string; + } + + interface Pix {} + + interface Promptpay {} + + interface RadarOptions { + /** + * A [Radar Session](https://stripe.com/docs/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments. + */ + session?: string; + } + + interface RevolutPay {} + + interface SepaDebit { + /** + * IBAN of the bank account. + */ + iban: string; + } + + interface Sofort { + /** + * Two-letter ISO code representing the country the bank account is located in. + */ + country: Sofort.Country; + } + + namespace Sofort { + type Country = 'AT' | 'BE' | 'DE' | 'ES' | 'IT' | 'NL'; + } + + interface Swish {} + + interface Twint {} + + type Type = + | 'acss_debit' + | 'affirm' + | 'afterpay_clearpay' + | 'alipay' + | 'au_becs_debit' + | 'bacs_debit' + | 'bancontact' + | 'blik' + | 'boleto' + | 'cashapp' + | 'customer_balance' + | 'eps' + | 'fpx' + | 'giropay' + | 'grabpay' + | 'ideal' + | 'klarna' + | 'konbini' + | 'link' + | 'multibanco' + | 'oxxo' + | 'p24' + | 'paynow' + | 'paypal' + | 'payto' + | 'pix' + | 'promptpay' + | 'revolut_pay' + | 'sepa_debit' + | 'sofort' + | 'swish' + | 'twint' + | 'us_bank_account' + | 'wechat_pay' + | 'zip'; + + interface UsBankAccount { + /** + * Account holder type: individual or company. + */ + account_holder_type?: UsBankAccount.AccountHolderType; + + /** + * Account number of the bank account. + */ + account_number?: string; + + /** + * Account type: checkings or savings. Defaults to checking if omitted. + */ + account_type?: UsBankAccount.AccountType; + + /** + * The ID of a Financial Connections Account to use as a payment method. + */ + financial_connections_account?: string; + + /** + * Routing number of the bank account. + */ + routing_number?: string; + } + + namespace UsBankAccount { + type AccountHolderType = 'company' | 'individual'; + + type AccountType = 'checking' | 'savings'; + } + + interface WechatPay {} + + interface Zip {} + } + + type SetupFutureUsage = 'off_session' | 'on_session'; + + interface Shipping { + /** + * Shipping address + */ + address: Stripe.AddressParam; + + /** + * Recipient name. + */ + name: string; + + /** + * Recipient phone (including extension) + */ + phone?: Stripe.Emptyable; + } + } + + class ConfirmationTokensResource { + /** + * Creates a test mode Confirmation Token server side for your integration tests. + */ + create( + params?: ConfirmationTokenCreateParams, + options?: RequestOptions + ): Promise>; + create( + options?: RequestOptions + ): Promise>; + } + } + } +} diff --git a/types/index.d.ts b/types/index.d.ts index 31a08e2052..30f7766fdb 100644 --- a/types/index.d.ts +++ b/types/index.d.ts @@ -18,6 +18,9 @@ /// /// /// +/// +/// +/// /// /// /// @@ -101,6 +104,7 @@ /// /// /// +/// /// /// /// @@ -140,6 +144,10 @@ /// /// /// +/// +/// +/// +/// /// /// /// @@ -351,6 +359,11 @@ declare module 'stripe' { apps: { secrets: Stripe.Apps.SecretsResource; }; + billing: { + meters: Stripe.Billing.MetersResource; + meterEvents: Stripe.Billing.MeterEventsResource; + meterEventAdjustments: Stripe.Billing.MeterEventAdjustmentsResource; + }; billingPortal: { configurations: Stripe.BillingPortal.ConfigurationsResource; sessions: Stripe.BillingPortal.SessionsResource; @@ -421,6 +434,7 @@ declare module 'stripe' { readers: Stripe.Terminal.ReadersResource; }; testHelpers: { + confirmationTokens: Stripe.TestHelpers.ConfirmationTokensResource; customers: Stripe.TestHelpers.CustomersResource; refunds: Stripe.TestHelpers.RefundsResource; testClocks: Stripe.TestHelpers.TestClocksResource;