diff --git a/CODEGEN_VERSION b/CODEGEN_VERSION index 8576feb6a9..8ef565c8e5 100644 --- a/CODEGEN_VERSION +++ b/CODEGEN_VERSION @@ -1 +1 @@ -9e950cbf7b5a814a98f27d1a94b72cd6f1df2078 \ No newline at end of file +6f80705d2d79a2be4fee472e1156515f7bbfe3e3 \ No newline at end of file diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 604997fea3..ad0b5d4510 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v2203 \ No newline at end of file +v2204 \ No newline at end of file diff --git a/test/resources/generated_examples_test.spec.js b/test/resources/generated_examples_test.spec.js index 5144ad873e..f439ee1e01 100644 --- a/test/resources/generated_examples_test.spec.js +++ b/test/resources/generated_examples_test.spec.js @@ -4303,7 +4303,7 @@ describe('Generated tests', function() { maximum_applications: { type: 'indefinite', }, - percent_off: 'percent_off', + percent_off: '991934883.3333334', }, }, spend_modifier_rule: { @@ -6250,7 +6250,7 @@ describe('Generated tests', function() { method: 'GET', path: '/v2/money_management/adjustments', response: - '{"data":[{"amount":{"value":111972721,"currency":"usd"},"created":"1970-01-12T21:42:34.472Z","financial_account":"financial_account","id":"obj_123","object":"v2.money_management.adjustment","livemode":true}],"next_page_url":null,"previous_page_url":null}', + '{"data":[{"amount":{"currency":"USD","value":96},"created":"1970-01-12T21:42:34.472Z","financial_account":"financial_account","id":"obj_123","object":"v2.money_management.adjustment","livemode":true}],"next_page_url":null,"previous_page_url":null}', }, ]); const adjustments = await stripe.v2.moneyManagement.adjustments.list(); @@ -6263,7 +6263,7 @@ describe('Generated tests', function() { method: 'GET', path: '/v2/money_management/adjustments/id_123', response: - '{"amount":{"value":111972721,"currency":"usd"},"created":"1970-01-12T21:42:34.472Z","financial_account":"financial_account","id":"obj_123","object":"v2.money_management.adjustment","livemode":true}', + '{"amount":{"currency":"USD","value":96},"created":"1970-01-12T21:42:34.472Z","financial_account":"financial_account","id":"obj_123","object":"v2.money_management.adjustment","livemode":true}', }, ]); const adjustment = await stripe.v2.moneyManagement.adjustments.retrieve( @@ -6278,7 +6278,7 @@ describe('Generated tests', function() { method: 'GET', path: '/v2/money_management/currency_conversions', response: - '{"data":[{"created":"1970-01-12T21:42:34.472Z","exchange_rate":"exchange_rate","financial_account":"financial_account","from":{"amount":{"value":111972721,"currency":"usd"}},"id":"obj_123","livemode":true,"object":"v2.money_management.currency_conversion","to":{"amount":{"value":111972721,"currency":"usd"}}}],"next_page_url":null,"previous_page_url":null}', + '{"data":[{"created":"1970-01-12T21:42:34.472Z","exchange_rate":"exchange_rate","financial_account":"financial_account","from":{"amount":{"currency":"USD","value":96}},"id":"obj_123","livemode":true,"object":"v2.money_management.currency_conversion","to":{"amount":{"currency":"USD","value":96}}}],"next_page_url":null,"previous_page_url":null}', }, ]); const currencyConversions = await stripe.v2.moneyManagement.currencyConversions.list(); @@ -6291,7 +6291,7 @@ describe('Generated tests', function() { method: 'POST', path: '/v2/money_management/currency_conversions', response: - '{"created":"1970-01-12T21:42:34.472Z","exchange_rate":"exchange_rate","financial_account":"financial_account","from":{"amount":{"value":111972721,"currency":"usd"}},"id":"obj_123","livemode":true,"object":"v2.money_management.currency_conversion","to":{"amount":{"value":111972721,"currency":"usd"}}}', + '{"created":"1970-01-12T21:42:34.472Z","exchange_rate":"exchange_rate","financial_account":"financial_account","from":{"amount":{"currency":"USD","value":96}},"id":"obj_123","livemode":true,"object":"v2.money_management.currency_conversion","to":{"amount":{"currency":"USD","value":96}}}', }, ]); const currencyConversion = await stripe.v2.moneyManagement.currencyConversions.create( @@ -6299,15 +6299,15 @@ describe('Generated tests', function() { financial_account: 'financial_account', from: { amount: { - value: 111972721, - currency: 'usd', + value: 96, + currency: 'USD', }, currency: 'usd', }, to: { amount: { - value: 111972721, - currency: 'usd', + value: 96, + currency: 'USD', }, currency: 'usd', }, @@ -6322,7 +6322,7 @@ describe('Generated tests', function() { method: 'GET', path: '/v2/money_management/currency_conversions/id_123', response: - '{"created":"1970-01-12T21:42:34.472Z","exchange_rate":"exchange_rate","financial_account":"financial_account","from":{"amount":{"value":111972721,"currency":"usd"}},"id":"obj_123","livemode":true,"object":"v2.money_management.currency_conversion","to":{"amount":{"value":111972721,"currency":"usd"}}}', + '{"created":"1970-01-12T21:42:34.472Z","exchange_rate":"exchange_rate","financial_account":"financial_account","from":{"amount":{"currency":"USD","value":96}},"id":"obj_123","livemode":true,"object":"v2.money_management.currency_conversion","to":{"amount":{"currency":"USD","value":96}}}', }, ]); const currencyConversion = await stripe.v2.moneyManagement.currencyConversions.retrieve( @@ -6337,7 +6337,7 @@ describe('Generated tests', function() { method: 'GET', path: '/v2/money_management/financial_accounts', response: - '{"data":[{"balance":{"available":{"key":{"value":111972721,"currency":"usd"}},"inbound_pending":{"key":{"value":111972721,"currency":"usd"}},"outbound_pending":{"key":{"value":111972721,"currency":"usd"}}},"country":"country","created":"1970-01-12T21:42:34.472Z","id":"obj_123","object":"v2.money_management.financial_account","status":"closed","type":"payments","livemode":true}],"next_page_url":null,"previous_page_url":null}', + '{"data":[{"balance":{"available":{"key":{"currency":"USD","value":35}},"inbound_pending":{"key":{"currency":"USD","value":11}},"outbound_pending":{"key":{"currency":"USD","value":60}}},"country":"country","created":"1970-01-12T21:42:34.472Z","id":"obj_123","object":"v2.money_management.financial_account","status":"closed","type":"payments","livemode":true}],"next_page_url":null,"previous_page_url":null}', }, ]); const financialAccounts = await stripe.v2.moneyManagement.financialAccounts.list(); @@ -6350,7 +6350,7 @@ describe('Generated tests', function() { method: 'POST', path: '/v2/money_management/financial_accounts', response: - '{"balance":{"available":{"key":{"value":111972721,"currency":"usd"}},"inbound_pending":{"key":{"value":111972721,"currency":"usd"}},"outbound_pending":{"key":{"value":111972721,"currency":"usd"}}},"country":"country","created":"1970-01-12T21:42:34.472Z","id":"obj_123","object":"v2.money_management.financial_account","status":"closed","type":"payments","livemode":true}', + '{"balance":{"available":{"key":{"currency":"USD","value":35}},"inbound_pending":{"key":{"currency":"USD","value":11}},"outbound_pending":{"key":{"currency":"USD","value":60}}},"country":"country","created":"1970-01-12T21:42:34.472Z","id":"obj_123","object":"v2.money_management.financial_account","status":"closed","type":"payments","livemode":true}', }, ]); const financialAccount = await stripe.v2.moneyManagement.financialAccounts.create( @@ -6367,7 +6367,7 @@ describe('Generated tests', function() { method: 'GET', path: '/v2/money_management/financial_accounts/id_123', response: - '{"balance":{"available":{"key":{"value":111972721,"currency":"usd"}},"inbound_pending":{"key":{"value":111972721,"currency":"usd"}},"outbound_pending":{"key":{"value":111972721,"currency":"usd"}}},"country":"country","created":"1970-01-12T21:42:34.472Z","id":"obj_123","object":"v2.money_management.financial_account","status":"closed","type":"payments","livemode":true}', + '{"balance":{"available":{"key":{"currency":"USD","value":35}},"inbound_pending":{"key":{"currency":"USD","value":11}},"outbound_pending":{"key":{"currency":"USD","value":60}}},"country":"country","created":"1970-01-12T21:42:34.472Z","id":"obj_123","object":"v2.money_management.financial_account","status":"closed","type":"payments","livemode":true}', }, ]); const financialAccount = await stripe.v2.moneyManagement.financialAccounts.retrieve( @@ -6382,7 +6382,7 @@ describe('Generated tests', function() { method: 'POST', path: '/v2/money_management/financial_accounts/id_123', response: - '{"balance":{"available":{"key":{"value":111972721,"currency":"usd"}},"inbound_pending":{"key":{"value":111972721,"currency":"usd"}},"outbound_pending":{"key":{"value":111972721,"currency":"usd"}}},"country":"country","created":"1970-01-12T21:42:34.472Z","id":"obj_123","object":"v2.money_management.financial_account","status":"closed","type":"payments","livemode":true}', + '{"balance":{"available":{"key":{"currency":"USD","value":35}},"inbound_pending":{"key":{"currency":"USD","value":11}},"outbound_pending":{"key":{"currency":"USD","value":60}}},"country":"country","created":"1970-01-12T21:42:34.472Z","id":"obj_123","object":"v2.money_management.financial_account","status":"closed","type":"payments","livemode":true}', }, ]); const financialAccount = await stripe.v2.moneyManagement.financialAccounts.update( @@ -6397,7 +6397,7 @@ describe('Generated tests', function() { method: 'POST', path: '/v2/money_management/financial_accounts/id_123/close', response: - '{"balance":{"available":{"key":{"value":111972721,"currency":"usd"}},"inbound_pending":{"key":{"value":111972721,"currency":"usd"}},"outbound_pending":{"key":{"value":111972721,"currency":"usd"}}},"country":"country","created":"1970-01-12T21:42:34.472Z","id":"obj_123","object":"v2.money_management.financial_account","status":"closed","type":"payments","livemode":true}', + '{"balance":{"available":{"key":{"currency":"USD","value":35}},"inbound_pending":{"key":{"currency":"USD","value":11}},"outbound_pending":{"key":{"currency":"USD","value":60}}},"country":"country","created":"1970-01-12T21:42:34.472Z","id":"obj_123","object":"v2.money_management.financial_account","status":"closed","type":"payments","livemode":true}', }, ]); const financialAccount = await stripe.v2.moneyManagement.financialAccounts.close( @@ -6458,7 +6458,7 @@ describe('Generated tests', function() { method: 'GET', path: '/v2/money_management/inbound_transfers', response: - '{"data":[{"amount":{"value":111972721,"currency":"usd"},"created":"1970-01-12T21:42:34.472Z","description":"description","from":{"debited":{"value":111972721,"currency":"usd"},"payment_method":{"type":"type"}},"id":"obj_123","object":"v2.money_management.inbound_transfer","to":{"credited":{"value":111972721,"currency":"usd"},"financial_account":"financial_account"},"transfer_history":[{"created":"1970-01-12T21:42:34.472Z","effective_at":"1970-01-03T20:38:28.043Z","id":"obj_123","level":"canonical","type":"bank_debit_failed"}],"livemode":true}],"next_page_url":null,"previous_page_url":null}', + '{"data":[{"amount":{"currency":"USD","value":96},"created":"1970-01-12T21:42:34.472Z","description":"description","from":{"debited":{"currency":"USD","value":55},"payment_method":{"type":"type"}},"id":"obj_123","object":"v2.money_management.inbound_transfer","to":{"credited":{"currency":"USD","value":68},"financial_account":"financial_account"},"transfer_history":[{"created":"1970-01-12T21:42:34.472Z","effective_at":"1970-01-03T20:38:28.043Z","id":"obj_123","level":"canonical","type":"bank_debit_failed"}],"livemode":true}],"next_page_url":null,"previous_page_url":null}', }, ]); const inboundTransfers = await stripe.v2.moneyManagement.inboundTransfers.list(); @@ -6471,14 +6471,14 @@ describe('Generated tests', function() { method: 'POST', path: '/v2/money_management/inbound_transfers', response: - '{"amount":{"value":111972721,"currency":"usd"},"created":"1970-01-12T21:42:34.472Z","description":"description","from":{"debited":{"value":111972721,"currency":"usd"},"payment_method":{"type":"type"}},"id":"obj_123","object":"v2.money_management.inbound_transfer","to":{"credited":{"value":111972721,"currency":"usd"},"financial_account":"financial_account"},"transfer_history":[{"created":"1970-01-12T21:42:34.472Z","effective_at":"1970-01-03T20:38:28.043Z","id":"obj_123","level":"canonical","type":"bank_debit_failed"}],"livemode":true}', + '{"amount":{"currency":"USD","value":96},"created":"1970-01-12T21:42:34.472Z","description":"description","from":{"debited":{"currency":"USD","value":55},"payment_method":{"type":"type"}},"id":"obj_123","object":"v2.money_management.inbound_transfer","to":{"credited":{"currency":"USD","value":68},"financial_account":"financial_account"},"transfer_history":[{"created":"1970-01-12T21:42:34.472Z","effective_at":"1970-01-03T20:38:28.043Z","id":"obj_123","level":"canonical","type":"bank_debit_failed"}],"livemode":true}', }, ]); const inboundTransfer = await stripe.v2.moneyManagement.inboundTransfers.create( { amount: { - value: 111972721, - currency: 'usd', + value: 96, + currency: 'USD', }, from: { currency: 'usd', @@ -6499,7 +6499,7 @@ describe('Generated tests', function() { method: 'GET', path: '/v2/money_management/inbound_transfers/id_123', response: - '{"amount":{"value":111972721,"currency":"usd"},"created":"1970-01-12T21:42:34.472Z","description":"description","from":{"debited":{"value":111972721,"currency":"usd"},"payment_method":{"type":"type"}},"id":"obj_123","object":"v2.money_management.inbound_transfer","to":{"credited":{"value":111972721,"currency":"usd"},"financial_account":"financial_account"},"transfer_history":[{"created":"1970-01-12T21:42:34.472Z","effective_at":"1970-01-03T20:38:28.043Z","id":"obj_123","level":"canonical","type":"bank_debit_failed"}],"livemode":true}', + '{"amount":{"currency":"USD","value":96},"created":"1970-01-12T21:42:34.472Z","description":"description","from":{"debited":{"currency":"USD","value":55},"payment_method":{"type":"type"}},"id":"obj_123","object":"v2.money_management.inbound_transfer","to":{"credited":{"currency":"USD","value":68},"financial_account":"financial_account"},"transfer_history":[{"created":"1970-01-12T21:42:34.472Z","effective_at":"1970-01-03T20:38:28.043Z","id":"obj_123","level":"canonical","type":"bank_debit_failed"}],"livemode":true}', }, ]); const inboundTransfer = await stripe.v2.moneyManagement.inboundTransfers.retrieve( @@ -6514,7 +6514,7 @@ describe('Generated tests', function() { method: 'GET', path: '/v2/money_management/outbound_payments', response: - '{"data":[{"amount":{"value":111972721,"currency":"usd"},"cancelable":true,"created":"1970-01-12T21:42:34.472Z","from":{"debited":{"value":111972721,"currency":"usd"},"financial_account":"financial_account"},"id":"obj_123","object":"v2.money_management.outbound_payment","recipient_notification":{"setting":"configured"},"statement_descriptor":"statement_descriptor","status":"canceled","to":{"credited":{"value":111972721,"currency":"usd"},"payout_method":"payout_method","recipient":"recipient"},"trace_id":{"status":"pending"},"livemode":true}],"next_page_url":null,"previous_page_url":null}', + '{"data":[{"amount":{"currency":"USD","value":96},"cancelable":true,"created":"1970-01-12T21:42:34.472Z","from":{"debited":{"currency":"USD","value":55},"financial_account":"financial_account"},"id":"obj_123","object":"v2.money_management.outbound_payment","recipient_notification":{"setting":"configured"},"statement_descriptor":"statement_descriptor","status":"canceled","to":{"credited":{"currency":"USD","value":68},"payout_method":"payout_method","recipient":"recipient"},"trace_id":{"status":"pending"},"livemode":true}],"next_page_url":null,"previous_page_url":null}', }, ]); const outboundPayments = await stripe.v2.moneyManagement.outboundPayments.list(); @@ -6527,14 +6527,14 @@ describe('Generated tests', function() { method: 'POST', path: '/v2/money_management/outbound_payments', response: - '{"amount":{"value":111972721,"currency":"usd"},"cancelable":true,"created":"1970-01-12T21:42:34.472Z","from":{"debited":{"value":111972721,"currency":"usd"},"financial_account":"financial_account"},"id":"obj_123","object":"v2.money_management.outbound_payment","recipient_notification":{"setting":"configured"},"statement_descriptor":"statement_descriptor","status":"canceled","to":{"credited":{"value":111972721,"currency":"usd"},"payout_method":"payout_method","recipient":"recipient"},"trace_id":{"status":"pending"},"livemode":true}', + '{"amount":{"currency":"USD","value":96},"cancelable":true,"created":"1970-01-12T21:42:34.472Z","from":{"debited":{"currency":"USD","value":55},"financial_account":"financial_account"},"id":"obj_123","object":"v2.money_management.outbound_payment","recipient_notification":{"setting":"configured"},"statement_descriptor":"statement_descriptor","status":"canceled","to":{"credited":{"currency":"USD","value":68},"payout_method":"payout_method","recipient":"recipient"},"trace_id":{"status":"pending"},"livemode":true}', }, ]); const outboundPayment = await stripe.v2.moneyManagement.outboundPayments.create( { amount: { - value: 111972721, - currency: 'usd', + value: 96, + currency: 'USD', }, from: { currency: 'usd', @@ -6556,7 +6556,7 @@ describe('Generated tests', function() { method: 'GET', path: '/v2/money_management/outbound_payments/id_123', response: - '{"amount":{"value":111972721,"currency":"usd"},"cancelable":true,"created":"1970-01-12T21:42:34.472Z","from":{"debited":{"value":111972721,"currency":"usd"},"financial_account":"financial_account"},"id":"obj_123","object":"v2.money_management.outbound_payment","recipient_notification":{"setting":"configured"},"statement_descriptor":"statement_descriptor","status":"canceled","to":{"credited":{"value":111972721,"currency":"usd"},"payout_method":"payout_method","recipient":"recipient"},"trace_id":{"status":"pending"},"livemode":true}', + '{"amount":{"currency":"USD","value":96},"cancelable":true,"created":"1970-01-12T21:42:34.472Z","from":{"debited":{"currency":"USD","value":55},"financial_account":"financial_account"},"id":"obj_123","object":"v2.money_management.outbound_payment","recipient_notification":{"setting":"configured"},"statement_descriptor":"statement_descriptor","status":"canceled","to":{"credited":{"currency":"USD","value":68},"payout_method":"payout_method","recipient":"recipient"},"trace_id":{"status":"pending"},"livemode":true}', }, ]); const outboundPayment = await stripe.v2.moneyManagement.outboundPayments.retrieve( @@ -6571,7 +6571,7 @@ describe('Generated tests', function() { method: 'POST', path: '/v2/money_management/outbound_payments/id_123/cancel', response: - '{"amount":{"value":111972721,"currency":"usd"},"cancelable":true,"created":"1970-01-12T21:42:34.472Z","from":{"debited":{"value":111972721,"currency":"usd"},"financial_account":"financial_account"},"id":"obj_123","object":"v2.money_management.outbound_payment","recipient_notification":{"setting":"configured"},"statement_descriptor":"statement_descriptor","status":"canceled","to":{"credited":{"value":111972721,"currency":"usd"},"payout_method":"payout_method","recipient":"recipient"},"trace_id":{"status":"pending"},"livemode":true}', + '{"amount":{"currency":"USD","value":96},"cancelable":true,"created":"1970-01-12T21:42:34.472Z","from":{"debited":{"currency":"USD","value":55},"financial_account":"financial_account"},"id":"obj_123","object":"v2.money_management.outbound_payment","recipient_notification":{"setting":"configured"},"statement_descriptor":"statement_descriptor","status":"canceled","to":{"credited":{"currency":"USD","value":68},"payout_method":"payout_method","recipient":"recipient"},"trace_id":{"status":"pending"},"livemode":true}', }, ]); const outboundPayment = await stripe.v2.moneyManagement.outboundPayments.cancel( @@ -6586,14 +6586,14 @@ describe('Generated tests', function() { method: 'POST', path: '/v2/money_management/outbound_payment_quotes', response: - '{"amount":{"value":111972721,"currency":"usd"},"created":"1970-01-12T21:42:34.472Z","estimated_fees":[{"amount":{"value":111972721,"currency":"usd"},"type":"cross_border_payout_fee"}],"from":{"debited":{"value":111972721,"currency":"usd"},"financial_account":"financial_account"},"fx_quote":{"lock_duration":"five_minutes","lock_status":"active","rates":{"key":{"exchange_rate":"exchange_rate"}},"to_currency":"usd"},"id":"obj_123","object":"v2.money_management.outbound_payment_quote","to":{"credited":{"value":111972721,"currency":"usd"},"payout_method":"payout_method","recipient":"recipient"},"livemode":true}', + '{"amount":{"currency":"USD","value":96},"created":"1970-01-12T21:42:34.472Z","estimated_fees":[{"amount":{"currency":"USD","value":96},"type":"cross_border_payout_fee"}],"from":{"debited":{"currency":"USD","value":55},"financial_account":"financial_account"},"fx_quote":{"lock_duration":"five_minutes","lock_status":"active","rates":{"key":{"exchange_rate":"exchange_rate"}},"to_currency":"usd"},"id":"obj_123","object":"v2.money_management.outbound_payment_quote","to":{"credited":{"currency":"USD","value":68},"payout_method":"payout_method","recipient":"recipient"},"livemode":true}', }, ]); const outboundPaymentQuote = await stripe.v2.moneyManagement.outboundPaymentQuotes.create( { amount: { - value: 111972721, - currency: 'usd', + value: 96, + currency: 'USD', }, from: { currency: 'usd', @@ -6615,7 +6615,7 @@ describe('Generated tests', function() { method: 'GET', path: '/v2/money_management/outbound_payment_quotes/id_123', response: - '{"amount":{"value":111972721,"currency":"usd"},"created":"1970-01-12T21:42:34.472Z","estimated_fees":[{"amount":{"value":111972721,"currency":"usd"},"type":"cross_border_payout_fee"}],"from":{"debited":{"value":111972721,"currency":"usd"},"financial_account":"financial_account"},"fx_quote":{"lock_duration":"five_minutes","lock_status":"active","rates":{"key":{"exchange_rate":"exchange_rate"}},"to_currency":"usd"},"id":"obj_123","object":"v2.money_management.outbound_payment_quote","to":{"credited":{"value":111972721,"currency":"usd"},"payout_method":"payout_method","recipient":"recipient"},"livemode":true}', + '{"amount":{"currency":"USD","value":96},"created":"1970-01-12T21:42:34.472Z","estimated_fees":[{"amount":{"currency":"USD","value":96},"type":"cross_border_payout_fee"}],"from":{"debited":{"currency":"USD","value":55},"financial_account":"financial_account"},"fx_quote":{"lock_duration":"five_minutes","lock_status":"active","rates":{"key":{"exchange_rate":"exchange_rate"}},"to_currency":"usd"},"id":"obj_123","object":"v2.money_management.outbound_payment_quote","to":{"credited":{"currency":"USD","value":68},"payout_method":"payout_method","recipient":"recipient"},"livemode":true}', }, ]); const outboundPaymentQuote = await stripe.v2.moneyManagement.outboundPaymentQuotes.retrieve( @@ -6701,7 +6701,7 @@ describe('Generated tests', function() { method: 'GET', path: '/v2/money_management/outbound_transfers', response: - '{"data":[{"amount":{"value":111972721,"currency":"usd"},"cancelable":true,"created":"1970-01-12T21:42:34.472Z","from":{"debited":{"value":111972721,"currency":"usd"},"financial_account":"financial_account"},"id":"obj_123","object":"v2.money_management.outbound_transfer","statement_descriptor":"statement_descriptor","status":"canceled","to":{"credited":{"value":111972721,"currency":"usd"},"payout_method":"payout_method"},"trace_id":{"status":"pending"},"livemode":true}],"next_page_url":null,"previous_page_url":null}', + '{"data":[{"amount":{"currency":"USD","value":96},"cancelable":true,"created":"1970-01-12T21:42:34.472Z","from":{"debited":{"currency":"USD","value":55},"financial_account":"financial_account"},"id":"obj_123","object":"v2.money_management.outbound_transfer","statement_descriptor":"statement_descriptor","status":"canceled","to":{"credited":{"currency":"USD","value":68},"payout_method":"payout_method"},"trace_id":{"status":"pending"},"livemode":true}],"next_page_url":null,"previous_page_url":null}', }, ]); const outboundTransfers = await stripe.v2.moneyManagement.outboundTransfers.list(); @@ -6714,14 +6714,14 @@ describe('Generated tests', function() { method: 'POST', path: '/v2/money_management/outbound_transfers', response: - '{"amount":{"value":111972721,"currency":"usd"},"cancelable":true,"created":"1970-01-12T21:42:34.472Z","from":{"debited":{"value":111972721,"currency":"usd"},"financial_account":"financial_account"},"id":"obj_123","object":"v2.money_management.outbound_transfer","statement_descriptor":"statement_descriptor","status":"canceled","to":{"credited":{"value":111972721,"currency":"usd"},"payout_method":"payout_method"},"trace_id":{"status":"pending"},"livemode":true}', + '{"amount":{"currency":"USD","value":96},"cancelable":true,"created":"1970-01-12T21:42:34.472Z","from":{"debited":{"currency":"USD","value":55},"financial_account":"financial_account"},"id":"obj_123","object":"v2.money_management.outbound_transfer","statement_descriptor":"statement_descriptor","status":"canceled","to":{"credited":{"currency":"USD","value":68},"payout_method":"payout_method"},"trace_id":{"status":"pending"},"livemode":true}', }, ]); const outboundTransfer = await stripe.v2.moneyManagement.outboundTransfers.create( { amount: { - value: 111972721, - currency: 'usd', + value: 96, + currency: 'USD', }, from: { currency: 'usd', @@ -6742,7 +6742,7 @@ describe('Generated tests', function() { method: 'GET', path: '/v2/money_management/outbound_transfers/id_123', response: - '{"amount":{"value":111972721,"currency":"usd"},"cancelable":true,"created":"1970-01-12T21:42:34.472Z","from":{"debited":{"value":111972721,"currency":"usd"},"financial_account":"financial_account"},"id":"obj_123","object":"v2.money_management.outbound_transfer","statement_descriptor":"statement_descriptor","status":"canceled","to":{"credited":{"value":111972721,"currency":"usd"},"payout_method":"payout_method"},"trace_id":{"status":"pending"},"livemode":true}', + '{"amount":{"currency":"USD","value":96},"cancelable":true,"created":"1970-01-12T21:42:34.472Z","from":{"debited":{"currency":"USD","value":55},"financial_account":"financial_account"},"id":"obj_123","object":"v2.money_management.outbound_transfer","statement_descriptor":"statement_descriptor","status":"canceled","to":{"credited":{"currency":"USD","value":68},"payout_method":"payout_method"},"trace_id":{"status":"pending"},"livemode":true}', }, ]); const outboundTransfer = await stripe.v2.moneyManagement.outboundTransfers.retrieve( @@ -6757,7 +6757,7 @@ describe('Generated tests', function() { method: 'POST', path: '/v2/money_management/outbound_transfers/id_123/cancel', response: - '{"amount":{"value":111972721,"currency":"usd"},"cancelable":true,"created":"1970-01-12T21:42:34.472Z","from":{"debited":{"value":111972721,"currency":"usd"},"financial_account":"financial_account"},"id":"obj_123","object":"v2.money_management.outbound_transfer","statement_descriptor":"statement_descriptor","status":"canceled","to":{"credited":{"value":111972721,"currency":"usd"},"payout_method":"payout_method"},"trace_id":{"status":"pending"},"livemode":true}', + '{"amount":{"currency":"USD","value":96},"cancelable":true,"created":"1970-01-12T21:42:34.472Z","from":{"debited":{"currency":"USD","value":55},"financial_account":"financial_account"},"id":"obj_123","object":"v2.money_management.outbound_transfer","statement_descriptor":"statement_descriptor","status":"canceled","to":{"credited":{"currency":"USD","value":68},"payout_method":"payout_method"},"trace_id":{"status":"pending"},"livemode":true}', }, ]); const outboundTransfer = await stripe.v2.moneyManagement.outboundTransfers.cancel( @@ -6843,7 +6843,7 @@ describe('Generated tests', function() { method: 'GET', path: '/v2/money_management/received_credits', response: - '{"data":[{"amount":{"value":111972721,"currency":"usd"},"created":"1970-01-12T21:42:34.472Z","financial_account":"financial_account","id":"obj_123","object":"v2.money_management.received_credit","status":"returned","type":"balance_transfer","livemode":true}],"next_page_url":null,"previous_page_url":null}', + '{"data":[{"amount":{"currency":"USD","value":96},"created":"1970-01-12T21:42:34.472Z","financial_account":"financial_account","id":"obj_123","object":"v2.money_management.received_credit","status":"returned","type":"balance_transfer","livemode":true}],"next_page_url":null,"previous_page_url":null}', }, ]); const receivedCredits = await stripe.v2.moneyManagement.receivedCredits.list(); @@ -6856,7 +6856,7 @@ describe('Generated tests', function() { method: 'GET', path: '/v2/money_management/received_credits/id_123', response: - '{"amount":{"value":111972721,"currency":"usd"},"created":"1970-01-12T21:42:34.472Z","financial_account":"financial_account","id":"obj_123","object":"v2.money_management.received_credit","status":"returned","type":"balance_transfer","livemode":true}', + '{"amount":{"currency":"USD","value":96},"created":"1970-01-12T21:42:34.472Z","financial_account":"financial_account","id":"obj_123","object":"v2.money_management.received_credit","status":"returned","type":"balance_transfer","livemode":true}', }, ]); const receivedCredit = await stripe.v2.moneyManagement.receivedCredits.retrieve( @@ -6871,7 +6871,7 @@ describe('Generated tests', function() { method: 'GET', path: '/v2/money_management/received_debits', response: - '{"data":[{"amount":{"value":111972721,"currency":"usd"},"created":"1970-01-12T21:42:34.472Z","financial_account":"financial_account","id":"obj_123","object":"v2.money_management.received_debit","status":"canceled","type":"balance_transfer","livemode":true}],"next_page_url":null,"previous_page_url":null}', + '{"data":[{"amount":{"currency":"USD","value":96},"created":"1970-01-12T21:42:34.472Z","financial_account":"financial_account","id":"obj_123","object":"v2.money_management.received_debit","status":"canceled","type":"balance_transfer","livemode":true}],"next_page_url":null,"previous_page_url":null}', }, ]); const receivedDebits = await stripe.v2.moneyManagement.receivedDebits.list(); @@ -6884,7 +6884,7 @@ describe('Generated tests', function() { method: 'GET', path: '/v2/money_management/received_debits/id_123', response: - '{"amount":{"value":111972721,"currency":"usd"},"created":"1970-01-12T21:42:34.472Z","financial_account":"financial_account","id":"obj_123","object":"v2.money_management.received_debit","status":"canceled","type":"balance_transfer","livemode":true}', + '{"amount":{"currency":"USD","value":96},"created":"1970-01-12T21:42:34.472Z","financial_account":"financial_account","id":"obj_123","object":"v2.money_management.received_debit","status":"canceled","type":"balance_transfer","livemode":true}', }, ]); const receivedDebit = await stripe.v2.moneyManagement.receivedDebits.retrieve( @@ -6946,7 +6946,7 @@ describe('Generated tests', function() { method: 'GET', path: '/v2/money_management/transactions', response: - '{"data":[{"amount":{"value":111972721,"currency":"usd"},"balance_impact":{"available":{"value":111972721,"currency":"usd"},"inbound_pending":{"value":111972721,"currency":"usd"},"outbound_pending":{"value":111972721,"currency":"usd"}},"category":"received_debit_reversal","created":"1970-01-12T21:42:34.472Z","financial_account":"financial_account","id":"obj_123","object":"v2.money_management.transaction","status":"pending","status_transitions":{},"livemode":true}],"next_page_url":null,"previous_page_url":null}', + '{"data":[{"amount":{"currency":"USD","value":96},"balance_impact":{"available":{"currency":"USD","value":35},"inbound_pending":{"currency":"USD","value":11},"outbound_pending":{"currency":"USD","value":60}},"category":"received_debit_reversal","created":"1970-01-12T21:42:34.472Z","financial_account":"financial_account","id":"obj_123","object":"v2.money_management.transaction","status":"pending","status_transitions":{},"livemode":true}],"next_page_url":null,"previous_page_url":null}', }, ]); const transactions = await stripe.v2.moneyManagement.transactions.list(); @@ -6959,7 +6959,7 @@ describe('Generated tests', function() { method: 'GET', path: '/v2/money_management/transactions/id_123', response: - '{"amount":{"value":111972721,"currency":"usd"},"balance_impact":{"available":{"value":111972721,"currency":"usd"},"inbound_pending":{"value":111972721,"currency":"usd"},"outbound_pending":{"value":111972721,"currency":"usd"}},"category":"received_debit_reversal","created":"1970-01-12T21:42:34.472Z","financial_account":"financial_account","id":"obj_123","object":"v2.money_management.transaction","status":"pending","status_transitions":{},"livemode":true}', + '{"amount":{"currency":"USD","value":96},"balance_impact":{"available":{"currency":"USD","value":35},"inbound_pending":{"currency":"USD","value":11},"outbound_pending":{"currency":"USD","value":60}},"category":"received_debit_reversal","created":"1970-01-12T21:42:34.472Z","financial_account":"financial_account","id":"obj_123","object":"v2.money_management.transaction","status":"pending","status_transitions":{},"livemode":true}', }, ]); const transaction = await stripe.v2.moneyManagement.transactions.retrieve( @@ -6974,7 +6974,7 @@ describe('Generated tests', function() { method: 'GET', path: '/v2/money_management/transaction_entries', response: - '{"data":[{"balance_impact":{"available":{"value":111972721,"currency":"usd"},"inbound_pending":{"value":111972721,"currency":"usd"},"outbound_pending":{"value":111972721,"currency":"usd"}},"created":"1970-01-12T21:42:34.472Z","effective_at":"1970-01-03T20:38:28.043Z","id":"obj_123","object":"v2.money_management.transaction_entry","transaction":"transaction","transaction_details":{"category":"received_debit_reversal","financial_account":"financial_account"},"livemode":true}],"next_page_url":null,"previous_page_url":null}', + '{"data":[{"balance_impact":{"available":{"currency":"USD","value":35},"inbound_pending":{"currency":"USD","value":11},"outbound_pending":{"currency":"USD","value":60}},"created":"1970-01-12T21:42:34.472Z","effective_at":"1970-01-03T20:38:28.043Z","id":"obj_123","object":"v2.money_management.transaction_entry","transaction":"transaction","transaction_details":{"category":"received_debit_reversal","financial_account":"financial_account"},"livemode":true}],"next_page_url":null,"previous_page_url":null}', }, ]); const transactionEntries = await stripe.v2.moneyManagement.transactionEntries.list(); @@ -6987,7 +6987,7 @@ describe('Generated tests', function() { method: 'GET', path: '/v2/money_management/transaction_entries/id_123', response: - '{"balance_impact":{"available":{"value":111972721,"currency":"usd"},"inbound_pending":{"value":111972721,"currency":"usd"},"outbound_pending":{"value":111972721,"currency":"usd"}},"created":"1970-01-12T21:42:34.472Z","effective_at":"1970-01-03T20:38:28.043Z","id":"obj_123","object":"v2.money_management.transaction_entry","transaction":"transaction","transaction_details":{"category":"received_debit_reversal","financial_account":"financial_account"},"livemode":true}', + '{"balance_impact":{"available":{"currency":"USD","value":35},"inbound_pending":{"currency":"USD","value":11},"outbound_pending":{"currency":"USD","value":60}},"created":"1970-01-12T21:42:34.472Z","effective_at":"1970-01-03T20:38:28.043Z","id":"obj_123","object":"v2.money_management.transaction_entry","transaction":"transaction","transaction_details":{"category":"received_debit_reversal","financial_account":"financial_account"},"livemode":true}', }, ]); const transactionEntry = await stripe.v2.moneyManagement.transactionEntries.retrieve( @@ -7002,7 +7002,7 @@ describe('Generated tests', function() { method: 'GET', path: '/v2/payments/off_session_payments', response: - '{"data":[{"amount_requested":{"value":111972721,"currency":"usd"},"cadence":"unscheduled","compartment_id":"compartment_id","created":"1970-01-12T21:42:34.472Z","customer":"customer","id":"obj_123","livemode":true,"metadata":{"key":"metadata"},"object":"v2.payments.off_session_payment","payment_method":"payment_method","payments_orchestration":{"enabled":true},"retry_details":{"attempts":542738246,"retry_strategy":"scheduled"},"status":"pending"}],"next_page_url":null,"previous_page_url":null}', + '{"data":[{"amount_requested":{"currency":"USD","value":47},"cadence":"unscheduled","compartment_id":"compartment_id","created":"1970-01-12T21:42:34.472Z","customer":"customer","id":"obj_123","livemode":true,"metadata":{"key":"metadata"},"object":"v2.payments.off_session_payment","payment_method":"payment_method","payments_orchestration":{"enabled":true},"retry_details":{"attempts":542738246,"retry_strategy":"scheduled"},"status":"pending"}],"next_page_url":null,"previous_page_url":null}', }, ]); const offSessionPayments = await stripe.v2.payment.offSessionPayments.list(); @@ -7015,14 +7015,14 @@ describe('Generated tests', function() { method: 'POST', path: '/v2/payments/off_session_payments', response: - '{"amount_requested":{"value":111972721,"currency":"usd"},"cadence":"unscheduled","compartment_id":"compartment_id","created":"1970-01-12T21:42:34.472Z","customer":"customer","id":"obj_123","livemode":true,"metadata":{"key":"metadata"},"object":"v2.payments.off_session_payment","payment_method":"payment_method","payments_orchestration":{"enabled":true},"retry_details":{"attempts":542738246,"retry_strategy":"scheduled"},"status":"pending"}', + '{"amount_requested":{"currency":"USD","value":47},"cadence":"unscheduled","compartment_id":"compartment_id","created":"1970-01-12T21:42:34.472Z","customer":"customer","id":"obj_123","livemode":true,"metadata":{"key":"metadata"},"object":"v2.payments.off_session_payment","payment_method":"payment_method","payments_orchestration":{"enabled":true},"retry_details":{"attempts":542738246,"retry_strategy":"scheduled"},"status":"pending"}', }, ]); const offSessionPayment = await stripe.v2.payment.offSessionPayments.create( { amount: { - value: 111972721, - currency: 'usd', + value: 96, + currency: 'USD', }, cadence: 'unscheduled', customer: 'customer', @@ -7040,7 +7040,7 @@ describe('Generated tests', function() { method: 'GET', path: '/v2/payments/off_session_payments/id_123', response: - '{"amount_requested":{"value":111972721,"currency":"usd"},"cadence":"unscheduled","compartment_id":"compartment_id","created":"1970-01-12T21:42:34.472Z","customer":"customer","id":"obj_123","livemode":true,"metadata":{"key":"metadata"},"object":"v2.payments.off_session_payment","payment_method":"payment_method","payments_orchestration":{"enabled":true},"retry_details":{"attempts":542738246,"retry_strategy":"scheduled"},"status":"pending"}', + '{"amount_requested":{"currency":"USD","value":47},"cadence":"unscheduled","compartment_id":"compartment_id","created":"1970-01-12T21:42:34.472Z","customer":"customer","id":"obj_123","livemode":true,"metadata":{"key":"metadata"},"object":"v2.payments.off_session_payment","payment_method":"payment_method","payments_orchestration":{"enabled":true},"retry_details":{"attempts":542738246,"retry_strategy":"scheduled"},"status":"pending"}', }, ]); const offSessionPayment = await stripe.v2.payment.offSessionPayments.retrieve( @@ -7055,7 +7055,7 @@ describe('Generated tests', function() { method: 'POST', path: '/v2/payments/off_session_payments/id_123/cancel', response: - '{"amount_requested":{"value":111972721,"currency":"usd"},"cadence":"unscheduled","compartment_id":"compartment_id","created":"1970-01-12T21:42:34.472Z","customer":"customer","id":"obj_123","livemode":true,"metadata":{"key":"metadata"},"object":"v2.payments.off_session_payment","payment_method":"payment_method","payments_orchestration":{"enabled":true},"retry_details":{"attempts":542738246,"retry_strategy":"scheduled"},"status":"pending"}', + '{"amount_requested":{"currency":"USD","value":47},"cadence":"unscheduled","compartment_id":"compartment_id","created":"1970-01-12T21:42:34.472Z","customer":"customer","id":"obj_123","livemode":true,"metadata":{"key":"metadata"},"object":"v2.payments.off_session_payment","payment_method":"payment_method","payments_orchestration":{"enabled":true},"retry_details":{"attempts":542738246,"retry_strategy":"scheduled"},"status":"pending"}', }, ]); const offSessionPayment = await stripe.v2.payment.offSessionPayments.cancel( @@ -7070,7 +7070,7 @@ describe('Generated tests', function() { method: 'POST', path: '/v2/payments/off_session_payments/id_123/capture', response: - '{"amount_requested":{"value":111972721,"currency":"usd"},"cadence":"unscheduled","compartment_id":"compartment_id","created":"1970-01-12T21:42:34.472Z","customer":"customer","id":"obj_123","livemode":true,"metadata":{"key":"metadata"},"object":"v2.payments.off_session_payment","payment_method":"payment_method","payments_orchestration":{"enabled":true},"retry_details":{"attempts":542738246,"retry_strategy":"scheduled"},"status":"pending"}', + '{"amount_requested":{"currency":"USD","value":47},"cadence":"unscheduled","compartment_id":"compartment_id","created":"1970-01-12T21:42:34.472Z","customer":"customer","id":"obj_123","livemode":true,"metadata":{"key":"metadata"},"object":"v2.payments.off_session_payment","payment_method":"payment_method","payments_orchestration":{"enabled":true},"retry_details":{"attempts":542738246,"retry_strategy":"scheduled"},"status":"pending"}', }, ]); const offSessionPayment = await stripe.v2.payment.offSessionPayments.capture( @@ -7090,7 +7090,7 @@ describe('Generated tests', function() { method: 'GET', path: '/v2/payments/settlement_allocation_intents', response: - '{"data":[{"amount":{"value":111972721,"currency":"usd"},"created":"1970-01-12T21:42:34.472Z","expected_settlement_date":"1970-01-22T14:14:13.629Z","financial_account":"financial_account","id":"obj_123","linked_credits":["linked_credits"],"object":"v2.payments.settlement_allocation_intent","reference":"reference","status":"canceled","livemode":true}],"next_page_url":null,"previous_page_url":null}', + '{"data":[{"amount":{"currency":"USD","value":96},"created":"1970-01-12T21:42:34.472Z","expected_settlement_date":"1970-01-22T14:14:13.629Z","financial_account":"financial_account","id":"obj_123","linked_credits":["linked_credits"],"object":"v2.payments.settlement_allocation_intent","reference":"reference","status":"canceled","livemode":true}],"next_page_url":null,"previous_page_url":null}', }, ]); const settlementAllocationIntents = await stripe.v2.payment.settlementAllocationIntents.list(); @@ -7103,14 +7103,14 @@ describe('Generated tests', function() { method: 'POST', path: '/v2/payments/settlement_allocation_intents', response: - '{"amount":{"value":111972721,"currency":"usd"},"created":"1970-01-12T21:42:34.472Z","expected_settlement_date":"1970-01-22T14:14:13.629Z","financial_account":"financial_account","id":"obj_123","linked_credits":["linked_credits"],"object":"v2.payments.settlement_allocation_intent","reference":"reference","status":"canceled","livemode":true}', + '{"amount":{"currency":"USD","value":96},"created":"1970-01-12T21:42:34.472Z","expected_settlement_date":"1970-01-22T14:14:13.629Z","financial_account":"financial_account","id":"obj_123","linked_credits":["linked_credits"],"object":"v2.payments.settlement_allocation_intent","reference":"reference","status":"canceled","livemode":true}', }, ]); const settlementAllocationIntent = await stripe.v2.payment.settlementAllocationIntents.create( { amount: { - value: 111972721, - currency: 'usd', + value: 96, + currency: 'USD', }, expected_settlement_date: '1970-01-22T14:14:13.629Z', financial_account: 'financial_account', @@ -7126,7 +7126,7 @@ describe('Generated tests', function() { method: 'GET', path: '/v2/payments/settlement_allocation_intents/id_123', response: - '{"amount":{"value":111972721,"currency":"usd"},"created":"1970-01-12T21:42:34.472Z","expected_settlement_date":"1970-01-22T14:14:13.629Z","financial_account":"financial_account","id":"obj_123","linked_credits":["linked_credits"],"object":"v2.payments.settlement_allocation_intent","reference":"reference","status":"canceled","livemode":true}', + '{"amount":{"currency":"USD","value":96},"created":"1970-01-12T21:42:34.472Z","expected_settlement_date":"1970-01-22T14:14:13.629Z","financial_account":"financial_account","id":"obj_123","linked_credits":["linked_credits"],"object":"v2.payments.settlement_allocation_intent","reference":"reference","status":"canceled","livemode":true}', }, ]); const settlementAllocationIntent = await stripe.v2.payment.settlementAllocationIntents.retrieve( @@ -7141,7 +7141,7 @@ describe('Generated tests', function() { method: 'POST', path: '/v2/payments/settlement_allocation_intents/id_123', response: - '{"amount":{"value":111972721,"currency":"usd"},"created":"1970-01-12T21:42:34.472Z","expected_settlement_date":"1970-01-22T14:14:13.629Z","financial_account":"financial_account","id":"obj_123","linked_credits":["linked_credits"],"object":"v2.payments.settlement_allocation_intent","reference":"reference","status":"canceled","livemode":true}', + '{"amount":{"currency":"USD","value":96},"created":"1970-01-12T21:42:34.472Z","expected_settlement_date":"1970-01-22T14:14:13.629Z","financial_account":"financial_account","id":"obj_123","linked_credits":["linked_credits"],"object":"v2.payments.settlement_allocation_intent","reference":"reference","status":"canceled","livemode":true}', }, ]); const settlementAllocationIntent = await stripe.v2.payment.settlementAllocationIntents.update( @@ -7156,7 +7156,7 @@ describe('Generated tests', function() { method: 'POST', path: '/v2/payments/settlement_allocation_intents/id_123/cancel', response: - '{"amount":{"value":111972721,"currency":"usd"},"created":"1970-01-12T21:42:34.472Z","expected_settlement_date":"1970-01-22T14:14:13.629Z","financial_account":"financial_account","id":"obj_123","linked_credits":["linked_credits"],"object":"v2.payments.settlement_allocation_intent","reference":"reference","status":"canceled","livemode":true}', + '{"amount":{"currency":"USD","value":96},"created":"1970-01-12T21:42:34.472Z","expected_settlement_date":"1970-01-22T14:14:13.629Z","financial_account":"financial_account","id":"obj_123","linked_credits":["linked_credits"],"object":"v2.payments.settlement_allocation_intent","reference":"reference","status":"canceled","livemode":true}', }, ]); const settlementAllocationIntent = await stripe.v2.payment.settlementAllocationIntents.cancel( @@ -7171,7 +7171,7 @@ describe('Generated tests', function() { method: 'POST', path: '/v2/payments/settlement_allocation_intents/id_123/submit', response: - '{"amount":{"value":111972721,"currency":"usd"},"created":"1970-01-12T21:42:34.472Z","expected_settlement_date":"1970-01-22T14:14:13.629Z","financial_account":"financial_account","id":"obj_123","linked_credits":["linked_credits"],"object":"v2.payments.settlement_allocation_intent","reference":"reference","status":"canceled","livemode":true}', + '{"amount":{"currency":"USD","value":96},"created":"1970-01-12T21:42:34.472Z","expected_settlement_date":"1970-01-22T14:14:13.629Z","financial_account":"financial_account","id":"obj_123","linked_credits":["linked_credits"],"object":"v2.payments.settlement_allocation_intent","reference":"reference","status":"canceled","livemode":true}', }, ]); const settlementAllocationIntent = await stripe.v2.payment.settlementAllocationIntents.submit( @@ -7187,7 +7187,7 @@ describe('Generated tests', function() { path: '/v2/payments/settlement_allocation_intents/settlement_allocation_intent_id_123/splits', response: - '{"data":[{"account":"account","amount":{"value":111972721,"currency":"usd"},"created":"1970-01-12T21:42:34.472Z","id":"obj_123","object":"v2.payments.settlement_allocation_intent_split","settlement_allocation_intent":"settlement_allocation_intent","status":"canceled","type":"credit","livemode":true}],"next_page_url":null,"previous_page_url":null}', + '{"data":[{"account":"account","amount":{"currency":"USD","value":96},"created":"1970-01-12T21:42:34.472Z","id":"obj_123","object":"v2.payments.settlement_allocation_intent_split","settlement_allocation_intent":"settlement_allocation_intent","status":"canceled","type":"credit","livemode":true}],"next_page_url":null,"previous_page_url":null}', }, ]); const settlementAllocationIntentSplits = await stripe.v2.payment.settlementAllocationIntents.splits.list( @@ -7203,7 +7203,7 @@ describe('Generated tests', function() { path: '/v2/payments/settlement_allocation_intents/settlement_allocation_intent_id_123/splits', response: - '{"account":"account","amount":{"value":111972721,"currency":"usd"},"created":"1970-01-12T21:42:34.472Z","id":"obj_123","object":"v2.payments.settlement_allocation_intent_split","settlement_allocation_intent":"settlement_allocation_intent","status":"canceled","type":"credit","livemode":true}', + '{"account":"account","amount":{"currency":"USD","value":96},"created":"1970-01-12T21:42:34.472Z","id":"obj_123","object":"v2.payments.settlement_allocation_intent_split","settlement_allocation_intent":"settlement_allocation_intent","status":"canceled","type":"credit","livemode":true}', }, ]); const settlementAllocationIntentSplit = await stripe.v2.payment.settlementAllocationIntents.splits.create( @@ -7211,8 +7211,8 @@ describe('Generated tests', function() { { account: 'account', amount: { - value: 111972721, - currency: 'usd', + value: 96, + currency: 'USD', }, type: 'credit', } @@ -7227,7 +7227,7 @@ describe('Generated tests', function() { path: '/v2/payments/settlement_allocation_intents/settlement_allocation_intent_id_123/splits/id_123', response: - '{"account":"account","amount":{"value":111972721,"currency":"usd"},"created":"1970-01-12T21:42:34.472Z","id":"obj_123","object":"v2.payments.settlement_allocation_intent_split","settlement_allocation_intent":"settlement_allocation_intent","status":"canceled","type":"credit","livemode":true}', + '{"account":"account","amount":{"currency":"USD","value":96},"created":"1970-01-12T21:42:34.472Z","id":"obj_123","object":"v2.payments.settlement_allocation_intent_split","settlement_allocation_intent":"settlement_allocation_intent","status":"canceled","type":"credit","livemode":true}', }, ]); const settlementAllocationIntentSplit = await stripe.v2.payment.settlementAllocationIntents.splits.retrieve( @@ -7244,7 +7244,7 @@ describe('Generated tests', function() { path: '/v2/payments/settlement_allocation_intents/settlement_allocation_intent_id_123/splits/id_123/cancel', response: - '{"account":"account","amount":{"value":111972721,"currency":"usd"},"created":"1970-01-12T21:42:34.472Z","id":"obj_123","object":"v2.payments.settlement_allocation_intent_split","settlement_allocation_intent":"settlement_allocation_intent","status":"canceled","type":"credit","livemode":true}', + '{"account":"account","amount":{"currency":"USD","value":96},"created":"1970-01-12T21:42:34.472Z","id":"obj_123","object":"v2.payments.settlement_allocation_intent_split","settlement_allocation_intent":"settlement_allocation_intent","status":"canceled","type":"credit","livemode":true}', }, ]); const settlementAllocationIntentSplit = await stripe.v2.payment.settlementAllocationIntents.splits.cancel( @@ -7312,7 +7312,7 @@ describe('Generated tests', function() { method: 'GET', path: '/v2/tax/manual_rules', response: - '{"data":[{"created":"1970-01-12T21:42:34.472Z","id":"obj_123","object":"v2.tax.manual_rule","products":[{"type":"licensed_item"}],"scheduled_tax_rates":[{"rates":[{"display_name":"display_name","percentage":"percentage"}]}],"status":"active","livemode":true}],"next_page_url":null,"previous_page_url":null}', + '{"data":[{"created":"1970-01-12T21:42:34.472Z","id":"obj_123","object":"v2.tax.manual_rule","products":[{"type":"licensed_item"}],"scheduled_tax_rates":[{"rates":[{"display_name":"display_name","percentage":"614555204"}]}],"status":"active","livemode":true}],"next_page_url":null,"previous_page_url":null}', }, ]); const manualRules = await stripe.v2.tax.manualRules.list(); @@ -7325,7 +7325,7 @@ describe('Generated tests', function() { method: 'POST', path: '/v2/tax/manual_rules', response: - '{"created":"1970-01-12T21:42:34.472Z","id":"obj_123","object":"v2.tax.manual_rule","products":[{"type":"licensed_item"}],"scheduled_tax_rates":[{"rates":[{"display_name":"display_name","percentage":"percentage"}]}],"status":"active","livemode":true}', + '{"created":"1970-01-12T21:42:34.472Z","id":"obj_123","object":"v2.tax.manual_rule","products":[{"type":"licensed_item"}],"scheduled_tax_rates":[{"rates":[{"display_name":"display_name","percentage":"614555204"}]}],"status":"active","livemode":true}', }, ]); const manualRule = await stripe.v2.tax.manualRules.create({ @@ -7337,7 +7337,7 @@ describe('Generated tests', function() { description: 'description', display_name: 'display_name', jurisdiction: 'jurisdiction', - percentage: 'percentage', + percentage: '614555204', state: 'state', }, ], @@ -7354,7 +7354,7 @@ describe('Generated tests', function() { method: 'GET', path: '/v2/tax/manual_rules/id_123', response: - '{"created":"1970-01-12T21:42:34.472Z","id":"obj_123","object":"v2.tax.manual_rule","products":[{"type":"licensed_item"}],"scheduled_tax_rates":[{"rates":[{"display_name":"display_name","percentage":"percentage"}]}],"status":"active","livemode":true}', + '{"created":"1970-01-12T21:42:34.472Z","id":"obj_123","object":"v2.tax.manual_rule","products":[{"type":"licensed_item"}],"scheduled_tax_rates":[{"rates":[{"display_name":"display_name","percentage":"614555204"}]}],"status":"active","livemode":true}', }, ]); const manualRule = await stripe.v2.tax.manualRules.retrieve('id_123'); @@ -7367,7 +7367,7 @@ describe('Generated tests', function() { method: 'POST', path: '/v2/tax/manual_rules/id_123', response: - '{"created":"1970-01-12T21:42:34.472Z","id":"obj_123","object":"v2.tax.manual_rule","products":[{"type":"licensed_item"}],"scheduled_tax_rates":[{"rates":[{"display_name":"display_name","percentage":"percentage"}]}],"status":"active","livemode":true}', + '{"created":"1970-01-12T21:42:34.472Z","id":"obj_123","object":"v2.tax.manual_rule","products":[{"type":"licensed_item"}],"scheduled_tax_rates":[{"rates":[{"display_name":"display_name","percentage":"614555204"}]}],"status":"active","livemode":true}', }, ]); const manualRule = await stripe.v2.tax.manualRules.update('id_123', { @@ -7379,7 +7379,7 @@ describe('Generated tests', function() { description: 'description', display_name: 'display_name', jurisdiction: 'jurisdiction', - percentage: 'percentage', + percentage: '614555204', state: 'state', }, ], @@ -7396,7 +7396,7 @@ describe('Generated tests', function() { method: 'POST', path: '/v2/tax/manual_rules/id_123/deactivate', response: - '{"created":"1970-01-12T21:42:34.472Z","id":"obj_123","object":"v2.tax.manual_rule","products":[{"type":"licensed_item"}],"scheduled_tax_rates":[{"rates":[{"display_name":"display_name","percentage":"percentage"}]}],"status":"active","livemode":true}', + '{"created":"1970-01-12T21:42:34.472Z","id":"obj_123","object":"v2.tax.manual_rule","products":[{"type":"licensed_item"}],"scheduled_tax_rates":[{"rates":[{"display_name":"display_name","percentage":"614555204"}]}],"status":"active","livemode":true}', }, ]); const manualRule = await stripe.v2.tax.manualRules.deactivate('id_123'); @@ -7416,8 +7416,8 @@ describe('Generated tests', function() { 'id_123', { amount: { - value: 111972721, - currency: 'usd', + value: 96, + currency: 'USD', }, network: 'ach', } @@ -7432,7 +7432,7 @@ describe('Generated tests', function() { path: '/v2/test_helpers/financial_addresses/id_123/generate_microdeposits', response: - '{"amounts":[{"value":111972721,"currency":"usd"}],"object":"financial_address_generated_microdeposits","status":"accepted","livemode":true}', + '{"amounts":[{"currency":"USD","value":1}],"object":"financial_address_generated_microdeposits","status":"accepted","livemode":true}', }, ]); const financialAddressGeneratedMicrodeposits = await stripe.v2.testHelper.financialAddresses.generateMicrodeposits( @@ -7628,8 +7628,8 @@ describe('Generated tests', function() { await realStripe.v2.moneyManagement.outboundPayments.create( { amount: { - value: 111972721, - currency: 'usd', + value: 96, + currency: 'USD', }, from: { currency: 'usd', @@ -7783,8 +7783,8 @@ describe('Generated tests', function() { await realStripe.v2.moneyManagement.outboundPayments.create( { amount: { - value: 111972721, - currency: 'usd', + value: 96, + currency: 'USD', }, from: { currency: 'usd', diff --git a/types/PaymentIntents.d.ts b/types/PaymentIntents.d.ts index ad586f0ab0..ac2a149bca 100644 --- a/types/PaymentIntents.d.ts +++ b/types/PaymentIntents.d.ts @@ -4747,11 +4747,6 @@ declare module 'stripe' { * Bank account verification method. */ verification_method?: UsBankAccount.VerificationMethod; - - /** - * Preferred transaction settlement speed - */ - preferred_settlement_speed?: UsBankAccount.PreferredSettlementSpeed; } namespace UsBankAccount { @@ -4824,8 +4819,6 @@ declare module 'stripe' { collection_method?: 'paper'; } - type PreferredSettlementSpeed = 'fastest' | 'standard'; - type SetupFutureUsage = 'none' | 'off_session' | 'on_session'; type TransactionPurpose = diff --git a/types/PaymentIntentsResource.d.ts b/types/PaymentIntentsResource.d.ts index c91c905e8a..9a71d8c151 100644 --- a/types/PaymentIntentsResource.d.ts +++ b/types/PaymentIntentsResource.d.ts @@ -6903,13 +6903,6 @@ declare module 'stripe' { * Bank account verification method. */ verification_method?: UsBankAccount.VerificationMethod; - - /** - * Preferred transaction settlement speed - */ - preferred_settlement_speed?: Stripe.Emptyable< - UsBankAccount.PreferredSettlementSpeed - >; } namespace UsBankAccount { @@ -6999,8 +6992,6 @@ declare module 'stripe' { type Requested = 'ach' | 'us_domestic_wire'; } - type PreferredSettlementSpeed = 'fastest' | 'standard'; - type SetupFutureUsage = 'none' | 'off_session' | 'on_session'; type TransactionPurpose = @@ -13929,13 +13920,6 @@ declare module 'stripe' { * Bank account verification method. */ verification_method?: UsBankAccount.VerificationMethod; - - /** - * Preferred transaction settlement speed - */ - preferred_settlement_speed?: Stripe.Emptyable< - UsBankAccount.PreferredSettlementSpeed - >; } namespace UsBankAccount { @@ -14025,8 +14009,6 @@ declare module 'stripe' { type Requested = 'ach' | 'us_domestic_wire'; } - type PreferredSettlementSpeed = 'fastest' | 'standard'; - type SetupFutureUsage = 'none' | 'off_session' | 'on_session'; type TransactionPurpose = @@ -23152,13 +23134,6 @@ declare module 'stripe' { * Bank account verification method. */ verification_method?: UsBankAccount.VerificationMethod; - - /** - * Preferred transaction settlement speed - */ - preferred_settlement_speed?: Stripe.Emptyable< - UsBankAccount.PreferredSettlementSpeed - >; } namespace UsBankAccount { @@ -23248,8 +23223,6 @@ declare module 'stripe' { type Requested = 'ach' | 'us_domestic_wire'; } - type PreferredSettlementSpeed = 'fastest' | 'standard'; - type SetupFutureUsage = 'none' | 'off_session' | 'on_session'; type TransactionPurpose = diff --git a/types/SetupIntents.d.ts b/types/SetupIntents.d.ts index ce46fa9328..a290835b65 100644 --- a/types/SetupIntents.d.ts +++ b/types/SetupIntents.d.ts @@ -101,7 +101,7 @@ declare module 'stripe' { * * Include `inbound` if you intend to use the payment method as the origin to pull funds from. Include `outbound` if you intend to use the payment method as the destination to send funds to. You can include both if you intend to use the payment method for both purposes. */ - flow_directions: Array | null; + flow_directions?: Array | null; /** * The error encountered in the previous SetupIntent confirmation. diff --git a/types/V2/Billing/ServiceActions.d.ts b/types/V2/Billing/ServiceActions.d.ts index 8773bdfdf7..c2d02e5b27 100644 --- a/types/V2/Billing/ServiceActions.d.ts +++ b/types/V2/Billing/ServiceActions.d.ts @@ -107,7 +107,7 @@ declare module 'stripe' { /** * The monetary amount of the credit grant. Required if `type` is `monetary`. */ - monetary?: Amount.Monetary; + monetary?: V2.Amount; } namespace Amount { @@ -128,18 +128,6 @@ declare module 'stripe' { value: string; } - interface Monetary { - /** - * A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - */ - value: number; - - /** - * 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; - } - type Type = 'custom_pricing_unit' | 'monetary'; } @@ -221,7 +209,7 @@ declare module 'stripe' { /** * The monetary amount of the credit grant. Required if `type` is `monetary`. */ - monetary?: Amount.Monetary; + monetary?: V2.Amount; } namespace Amount { @@ -242,18 +230,6 @@ declare module 'stripe' { value: string; } - interface Monetary { - /** - * A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - */ - value: number; - - /** - * 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; - } - type Type = 'custom_pricing_unit' | 'monetary'; } diff --git a/types/V2/Billing/ServiceActionsResource.d.ts b/types/V2/Billing/ServiceActionsResource.d.ts index 13ed4e6e78..9797fde75c 100644 --- a/types/V2/Billing/ServiceActionsResource.d.ts +++ b/types/V2/Billing/ServiceActionsResource.d.ts @@ -84,7 +84,7 @@ declare module 'stripe' { /** * The monetary amount of the credit grant. Required if `type` is `monetary`. */ - monetary?: Amount.Monetary; + monetary?: V2.Amount; } namespace Amount { @@ -100,18 +100,6 @@ declare module 'stripe' { value: string; } - interface Monetary { - /** - * A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - */ - value: number; - - /** - * 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; - } - type Type = 'custom_pricing_unit' | 'monetary'; } @@ -198,7 +186,7 @@ declare module 'stripe' { /** * The monetary amount of the credit grant. Required if `type` is `monetary`. */ - monetary?: Amount.Monetary; + monetary?: V2.Amount; } namespace Amount { @@ -214,18 +202,6 @@ declare module 'stripe' { value: string; } - interface Monetary { - /** - * A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - */ - value: number; - - /** - * 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; - } - type Type = 'custom_pricing_unit' | 'monetary'; } diff --git a/types/V2/Core/AccountTokensResource.d.ts b/types/V2/Core/AccountTokensResource.d.ts index bd47f8d2a9..63a6df5a15 100644 --- a/types/V2/Core/AccountTokensResource.d.ts +++ b/types/V2/Core/AccountTokensResource.d.ts @@ -468,7 +468,7 @@ declare module 'stripe' { /** * A non-negative integer representing the amount in the smallest currency unit. */ - amount?: AnnualRevenue.Amount; + amount?: Amount; /** * The close-out date of the preceding fiscal year in ISO 8601 format. E.g. 2023-12-31 for the 31st of December, 2023. @@ -476,20 +476,6 @@ declare module 'stripe' { fiscal_year_end?: string; } - namespace AnnualRevenue { - interface Amount { - /** - * A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - */ - value: number; - - /** - * 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; - } - } - interface Documents { /** * One or more documents that support the bank account ownership verification requirement. Must be a document associated with the account's primary active bank account that displays the last 4 digits of the account number, either a statement or a check. @@ -818,21 +804,7 @@ declare module 'stripe' { /** * A non-negative integer representing the amount in the smallest currency unit. */ - amount?: MonthlyEstimatedRevenue.Amount; - } - - namespace MonthlyEstimatedRevenue { - interface Amount { - /** - * A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - */ - value: number; - - /** - * 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; - } + amount?: Amount; } interface RegistrationDate { diff --git a/types/V2/Core/Accounts.d.ts b/types/V2/Core/Accounts.d.ts index 57367818ef..d60c3c971c 100644 --- a/types/V2/Core/Accounts.d.ts +++ b/types/V2/Core/Accounts.d.ts @@ -7287,7 +7287,7 @@ declare module 'stripe' { /** * Annual revenue amount in minor currency units (for example, '123' for 1.23 USD). */ - amount?: AnnualRevenue.Amount; + amount?: Amount; /** * The close-out date of the preceding fiscal year in ISO 8601 format. E.g. 2023-12-31 for the 31st of December, 2023. @@ -7295,20 +7295,6 @@ declare module 'stripe' { fiscal_year_end?: string; } - namespace AnnualRevenue { - interface Amount { - /** - * A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - */ - value: number; - - /** - * 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; - } - } - interface Documents { /** * One or more documents that support the Bank account ownership verification requirement. Must be a document associated with the account's primary active bank account that displays the last 4 digits of the account number, either a statement or a check. @@ -7632,21 +7618,7 @@ declare module 'stripe' { /** * Estimated monthly revenue amount in minor currency units (for example, '123' for 1.23 USD). */ - amount?: MonthlyEstimatedRevenue.Amount; - } - - namespace MonthlyEstimatedRevenue { - interface Amount { - /** - * A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - */ - value: number; - - /** - * 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; - } + amount?: Amount; } interface RegistrationDate { diff --git a/types/V2/Core/AccountsResource.d.ts b/types/V2/Core/AccountsResource.d.ts index 236d1da19d..af9f4ed1c4 100644 --- a/types/V2/Core/AccountsResource.d.ts +++ b/types/V2/Core/AccountsResource.d.ts @@ -3190,7 +3190,7 @@ declare module 'stripe' { /** * A non-negative integer representing the amount in the smallest currency unit. */ - amount?: AnnualRevenue.Amount; + amount?: Amount; /** * The close-out date of the preceding fiscal year in ISO 8601 format. E.g. 2023-12-31 for the 31st of December, 2023. @@ -3198,20 +3198,6 @@ declare module 'stripe' { fiscal_year_end?: string; } - namespace AnnualRevenue { - interface Amount { - /** - * A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - */ - value: number; - - /** - * 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; - } - } - interface Documents { /** * One or more documents that support the bank account ownership verification requirement. Must be a document associated with the account's primary active bank account that displays the last 4 digits of the account number, either a statement or a check. @@ -3540,21 +3526,7 @@ declare module 'stripe' { /** * A non-negative integer representing the amount in the smallest currency unit. */ - amount?: MonthlyEstimatedRevenue.Amount; - } - - namespace MonthlyEstimatedRevenue { - interface Amount { - /** - * A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - */ - value: number; - - /** - * 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; - } + amount?: Amount; } interface RegistrationDate { @@ -7493,7 +7465,7 @@ declare module 'stripe' { /** * A non-negative integer representing the amount in the smallest currency unit. */ - amount?: AnnualRevenue.Amount; + amount?: Amount; /** * The close-out date of the preceding fiscal year in ISO 8601 format. E.g. 2023-12-31 for the 31st of December, 2023. @@ -7501,20 +7473,6 @@ declare module 'stripe' { fiscal_year_end?: string; } - namespace AnnualRevenue { - interface Amount { - /** - * A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - */ - value: number; - - /** - * 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; - } - } - interface Documents { /** * One or more documents that support the bank account ownership verification requirement. Must be a document associated with the account's primary active bank account that displays the last 4 digits of the account number, either a statement or a check. @@ -7843,21 +7801,7 @@ declare module 'stripe' { /** * A non-negative integer representing the amount in the smallest currency unit. */ - amount?: MonthlyEstimatedRevenue.Amount; - } - - namespace MonthlyEstimatedRevenue { - interface Amount { - /** - * A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - */ - value: number; - - /** - * 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; - } + amount?: Amount; } interface RegistrationDate { diff --git a/types/V2/Core/EventTypes.d.ts b/types/V2/Core/EventTypes.d.ts index 7628d48b08..4a9898847b 100644 --- a/types/V2/Core/EventTypes.d.ts +++ b/types/V2/Core/EventTypes.d.ts @@ -3172,23 +3172,11 @@ declare module 'stripe' { /** * Estimated aggregated amount for the impacted requests. */ - realized_fraud_amount: Impact.RealizedFraudAmount; + realized_fraud_amount: V2.Amount; } namespace Impact { export type AttackType = 'spike' | 'sustained_attack'; - - export interface RealizedFraudAmount { - /** - * A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - */ - value: number; - - /** - * 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; - } } } } @@ -3238,7 +3226,7 @@ declare module 'stripe' { /** * Estimated aggregated amount for the approved requests. */ - approved_amount?: Impact.ApprovedAmount; + approved_amount?: V2.Amount; /** * The number of approved requests which are impacted. @@ -3248,39 +3236,13 @@ declare module 'stripe' { /** * Estimated aggregated amount for the declined requests. */ - declined_amount?: Impact.DeclinedAmount; + declined_amount?: V2.Amount; /** * The number of declined requests which are impacted. */ declined_impacted_requests?: number; } - - namespace Impact { - export interface ApprovedAmount { - /** - * A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - */ - value: number; - - /** - * 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; - } - - export interface DeclinedAmount { - /** - * A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - */ - value: number; - - /** - * 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; - } - } } } @@ -3334,7 +3296,7 @@ declare module 'stripe' { /** * Estimated aggregated amount for the approved requests. */ - approved_amount?: Impact.ApprovedAmount; + approved_amount?: V2.Amount; /** * The number of approved requests which are impacted. @@ -3344,39 +3306,13 @@ declare module 'stripe' { /** * Estimated aggregated amount for the declined requests. */ - declined_amount?: Impact.DeclinedAmount; + declined_amount?: V2.Amount; /** * The number of declined requests which are impacted. */ declined_impacted_requests?: number; } - - namespace Impact { - export interface ApprovedAmount { - /** - * A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - */ - value: number; - - /** - * 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; - } - - export interface DeclinedAmount { - /** - * A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - */ - value: number; - - /** - * 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; - } - } } } @@ -3430,7 +3366,7 @@ declare module 'stripe' { /** * Estimated aggregated amount for the approved requests. */ - approved_amount?: Impact.ApprovedAmount; + approved_amount?: V2.Amount; /** * The number of approved requests which are impacted. @@ -3440,39 +3376,13 @@ declare module 'stripe' { /** * Estimated aggregated amount for the declined requests. */ - declined_amount?: Impact.DeclinedAmount; + declined_amount?: V2.Amount; /** * The number of declined requests which are impacted. */ declined_impacted_requests?: number; } - - namespace Impact { - export interface ApprovedAmount { - /** - * A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - */ - value: number; - - /** - * 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; - } - - export interface DeclinedAmount { - /** - * A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - */ - value: number; - - /** - * 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; - } - } } } @@ -3526,7 +3436,7 @@ declare module 'stripe' { /** * Estimated aggregated amount for the approved requests. */ - approved_amount?: Impact.ApprovedAmount; + approved_amount?: V2.Amount; /** * The number of approved requests which are impacted. @@ -3536,39 +3446,13 @@ declare module 'stripe' { /** * Estimated aggregated amount for the declined requests. */ - declined_amount?: Impact.DeclinedAmount; + declined_amount?: V2.Amount; /** * The number of declined requests which are impacted. */ declined_impacted_requests?: number; } - - namespace Impact { - export interface ApprovedAmount { - /** - * A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - */ - value: number; - - /** - * 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; - } - - export interface DeclinedAmount { - /** - * A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - */ - value: number; - - /** - * 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; - } - } } } diff --git a/types/V2/FinancialAddressGeneratedMicrodeposits.d.ts b/types/V2/FinancialAddressGeneratedMicrodeposits.d.ts index 6d054753fb..a9f20359cf 100644 --- a/types/V2/FinancialAddressGeneratedMicrodeposits.d.ts +++ b/types/V2/FinancialAddressGeneratedMicrodeposits.d.ts @@ -15,7 +15,7 @@ declare module 'stripe' { /** * The amounts of the microdeposits that were generated. */ - amounts: Array; + amounts: Array; /** * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. @@ -27,20 +27,6 @@ declare module 'stripe' { */ status: 'accepted'; } - - namespace FinancialAddressGeneratedMicrodeposits { - interface Amount { - /** - * A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - */ - value: number; - - /** - * 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; - } - } } } } diff --git a/types/V2/MoneyManagement/Adjustments.d.ts b/types/V2/MoneyManagement/Adjustments.d.ts index 99c140e53d..57a88c556c 100644 --- a/types/V2/MoneyManagement/Adjustments.d.ts +++ b/types/V2/MoneyManagement/Adjustments.d.ts @@ -26,7 +26,7 @@ declare module 'stripe' { /** * The amount of the Adjustment. */ - amount: Adjustment.Amount; + amount: Amount; /** * Time at which the object was created. Represented as a RFC 3339 date & time UTC value in millisecond precision, for example: 2022-09-18T13:22:18.123Z. @@ -108,18 +108,6 @@ declare module 'stripe' { | 'received_credit' | 'received_debit'; } - - interface Amount { - /** - * A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - */ - value: number; - - /** - * 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; - } } } } diff --git a/types/V2/MoneyManagement/CurrencyConversions.d.ts b/types/V2/MoneyManagement/CurrencyConversions.d.ts index 2a3f9ed31e..2a08527aff 100644 --- a/types/V2/MoneyManagement/CurrencyConversions.d.ts +++ b/types/V2/MoneyManagement/CurrencyConversions.d.ts @@ -54,42 +54,14 @@ declare module 'stripe' { /** * Amount object. */ - amount: From.Amount; - } - - namespace From { - interface Amount { - /** - * A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - */ - value: number; - - /** - * 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; - } + amount: Amount; } interface To { /** * Amount object. */ - amount: To.Amount; - } - - namespace To { - interface Amount { - /** - * A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - */ - value: number; - - /** - * 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; - } + amount: Amount; } } } diff --git a/types/V2/MoneyManagement/CurrencyConversionsResource.d.ts b/types/V2/MoneyManagement/CurrencyConversionsResource.d.ts index ccbab9d7b1..d43159561f 100644 --- a/types/V2/MoneyManagement/CurrencyConversionsResource.d.ts +++ b/types/V2/MoneyManagement/CurrencyConversionsResource.d.ts @@ -26,7 +26,7 @@ declare module 'stripe' { /** * Amount object. */ - amount?: From.Amount; + amount?: Amount; /** * A lowercase alpha3 currency code like "usd". @@ -34,45 +34,17 @@ declare module 'stripe' { currency?: string; } - namespace From { - interface Amount { - /** - * A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - */ - value: number; - - /** - * 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; - } - } - interface To { /** * Amount object. */ - amount?: To.Amount; + amount?: Amount; /** * A lowercase alpha3 currency code like "usd". */ currency?: string; } - - namespace To { - interface Amount { - /** - * A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - */ - value: number; - - /** - * 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; - } - } } } diff --git a/types/V2/MoneyManagement/FinancialAccounts.d.ts b/types/V2/MoneyManagement/FinancialAccounts.d.ts index 8235cde28d..42aed2db79 100644 --- a/types/V2/MoneyManagement/FinancialAccounts.d.ts +++ b/types/V2/MoneyManagement/FinancialAccounts.d.ts @@ -110,62 +110,24 @@ declare module 'stripe' { * Balance that can be used for money movement. */ available: { - [key: string]: Balance.Available; + [key: string]: Amount; }; /** * Balance of inbound funds that will later transition to the `available` balance. */ inbound_pending: { - [key: string]: Balance.InboundPending; + [key: string]: Amount; }; /** * Balance of funds that are being used for a pending outbound money movement. */ outbound_pending: { - [key: string]: Balance.OutboundPending; + [key: string]: Amount; }; } - namespace Balance { - interface Available { - /** - * A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - */ - value: number; - - /** - * 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; - } - - interface InboundPending { - /** - * A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - */ - value: number; - - /** - * 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; - } - - interface OutboundPending { - /** - * A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - */ - value: number; - - /** - * 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; - } - } - interface ManagedBy { /** * Enum describing the Stripe product that is managing this FinancialAccount. @@ -208,23 +170,9 @@ declare module 'stripe' { * The available balance at the time when the balance was projected. */ available: { - [key: string]: StartingBalance.Available; + [key: string]: Amount; }; } - - namespace StartingBalance { - interface Available { - /** - * A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - */ - value: number; - - /** - * 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; - } - } } type Status = 'closed' | 'open' | 'pending'; diff --git a/types/V2/MoneyManagement/InboundTransfers.d.ts b/types/V2/MoneyManagement/InboundTransfers.d.ts index ffbfb75178..997b9b5ae1 100644 --- a/types/V2/MoneyManagement/InboundTransfers.d.ts +++ b/types/V2/MoneyManagement/InboundTransfers.d.ts @@ -22,7 +22,7 @@ declare module 'stripe' { /** * The amount in specified currency that will land in the FinancialAccount balance. */ - amount: InboundTransfer.Amount; + amount: Amount; /** * Creation time of the InboundTransfer. Represented as a RFC 3339 date & time UTC value in millisecond precision, for example: 2022-09-18T13:22:18.123Z. @@ -61,23 +61,11 @@ declare module 'stripe' { } namespace InboundTransfer { - interface Amount { - /** - * A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - */ - value: number; - - /** - * 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; - } - interface From { /** * The amount in specified currency that was debited from the Payment Method. */ - debited: From.Debited; + debited: Amount; /** * The Payment Method object used to create the InboundTransfer. @@ -86,18 +74,6 @@ declare module 'stripe' { } namespace From { - interface Debited { - /** - * A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - */ - value: number; - - /** - * 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; - } - interface PaymentMethod { /** * The type of object this destination represents. For a us bank account, we expect us_bank_account. @@ -115,7 +91,7 @@ declare module 'stripe' { /** * The amount by which the FinancialAccount balance is credited. */ - credited: To.Credited; + credited: Amount; /** * The FinancialAccount that funds will land in. @@ -123,20 +99,6 @@ declare module 'stripe' { financial_account: string; } - namespace To { - interface Credited { - /** - * A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - */ - value: number; - - /** - * 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; - } - } - interface TransferHistory { /** * Creation time of the HistoryEntry in RFC 3339 format and UTC. diff --git a/types/V2/MoneyManagement/InboundTransfersResource.d.ts b/types/V2/MoneyManagement/InboundTransfersResource.d.ts index 9bd4493e6d..e9d8a7daae 100644 --- a/types/V2/MoneyManagement/InboundTransfersResource.d.ts +++ b/types/V2/MoneyManagement/InboundTransfersResource.d.ts @@ -8,7 +8,7 @@ declare module 'stripe' { /** * The amount, in specified currency, by which the FinancialAccount balance will increase due to the InboundTransfer. */ - amount: InboundTransferCreateParams.Amount; + amount: Amount; /** * Object containing details about where the funds will originate from. @@ -27,18 +27,6 @@ declare module 'stripe' { } namespace InboundTransferCreateParams { - interface Amount { - /** - * A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - */ - value: number; - - /** - * 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; - } - interface From { /** * An optional currency field used to specify which currency is debited from the Payment Method. diff --git a/types/V2/MoneyManagement/OutboundPaymentQuotes.d.ts b/types/V2/MoneyManagement/OutboundPaymentQuotes.d.ts index 8ab42972ab..a2507fd7e7 100644 --- a/types/V2/MoneyManagement/OutboundPaymentQuotes.d.ts +++ b/types/V2/MoneyManagement/OutboundPaymentQuotes.d.ts @@ -21,7 +21,7 @@ declare module 'stripe' { /** * The "presentment amount" for the OutboundPaymentQuote. */ - amount: OutboundPaymentQuote.Amount; + amount: Amount; /** * Time at which the OutboundPaymentQuote was created. @@ -61,18 +61,6 @@ declare module 'stripe' { } namespace OutboundPaymentQuote { - interface Amount { - /** - * A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - */ - value: number; - - /** - * 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; - } - interface DeliveryOptions { /** * Open Enum. Speed of the payout. @@ -95,7 +83,7 @@ declare module 'stripe' { /** * The fee amount for corresponding fee type. */ - amount: EstimatedFee.Amount; + amount: Amount; /** * The fee type. @@ -104,18 +92,6 @@ declare module 'stripe' { } namespace EstimatedFee { - interface Amount { - /** - * A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - */ - value: number; - - /** - * 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; - } - type Type = | 'cross_border_payout_fee' | 'foreign_exchange_fee' @@ -129,7 +105,7 @@ declare module 'stripe' { /** * The monetary amount debited from the sender, only set on responses. */ - debited: From.Debited; + debited: Amount; /** * The FinancialAccount that funds were pulled from. @@ -137,20 +113,6 @@ declare module 'stripe' { financial_account: string; } - namespace From { - interface Debited { - /** - * A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - */ - value: number; - - /** - * 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; - } - } - interface FxQuote { /** * The duration the exchange rate lock remains valid from creation time. Allowed value is five_minutes or none. @@ -197,7 +159,7 @@ declare module 'stripe' { /** * The monetary amount being credited to the destination. */ - credited: To.Credited; + credited: Amount; /** * The payout method which the OutboundPayment uses to send payout. @@ -209,20 +171,6 @@ declare module 'stripe' { */ recipient: string; } - - namespace To { - interface Credited { - /** - * A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - */ - value: number; - - /** - * 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; - } - } } } } diff --git a/types/V2/MoneyManagement/OutboundPaymentQuotesResource.d.ts b/types/V2/MoneyManagement/OutboundPaymentQuotesResource.d.ts index bc6e7d0c0b..1c516ea267 100644 --- a/types/V2/MoneyManagement/OutboundPaymentQuotesResource.d.ts +++ b/types/V2/MoneyManagement/OutboundPaymentQuotesResource.d.ts @@ -8,7 +8,7 @@ declare module 'stripe' { /** * The "presentment amount" to be sent to the recipient. */ - amount: OutboundPaymentQuoteCreateParams.Amount; + amount: Amount; /** * Request details about the sender of an OutboundPaymentQuote. @@ -27,18 +27,6 @@ declare module 'stripe' { } namespace OutboundPaymentQuoteCreateParams { - interface Amount { - /** - * A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - */ - value: number; - - /** - * 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; - } - interface DeliveryOptions { /** * Open Enum. Speed of the payout. diff --git a/types/V2/MoneyManagement/OutboundPayments.d.ts b/types/V2/MoneyManagement/OutboundPayments.d.ts index a15921f954..32165188dc 100644 --- a/types/V2/MoneyManagement/OutboundPayments.d.ts +++ b/types/V2/MoneyManagement/OutboundPayments.d.ts @@ -21,7 +21,7 @@ declare module 'stripe' { /** * The "presentment amount" for the OutboundPayment. */ - amount: OutboundPayment.Amount; + amount: Amount; /** * Returns true if the OutboundPayment can be canceled, and false otherwise. @@ -130,18 +130,6 @@ declare module 'stripe' { } namespace OutboundPayment { - interface Amount { - /** - * A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - */ - value: number; - - /** - * 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; - } - interface DeliveryOptions { /** * Open Enum. Speed of the payout. @@ -190,7 +178,7 @@ declare module 'stripe' { /** * The monetary amount debited from the sender, only set on responses. */ - debited: From.Debited; + debited: Amount; /** * The FinancialAccount that funds were pulled from. @@ -198,20 +186,6 @@ declare module 'stripe' { financial_account: string; } - namespace From { - interface Debited { - /** - * A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - */ - value: number; - - /** - * 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; - } - } - interface RecipientNotification { /** * Closed Enum. Configuration option to enable or disable notifications to recipients. @@ -314,7 +288,7 @@ declare module 'stripe' { /** * The monetary amount being credited to the destination. */ - credited: To.Credited; + credited: Amount; /** * The payout method which the OutboundPayment uses to send payout. @@ -327,20 +301,6 @@ declare module 'stripe' { recipient: string; } - namespace To { - interface Credited { - /** - * A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - */ - value: number; - - /** - * 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; - } - } - interface TraceId { /** * Possible values are `pending`, `supported`, and `unsupported`. Initially set to `pending`, it changes to diff --git a/types/V2/MoneyManagement/OutboundPaymentsResource.d.ts b/types/V2/MoneyManagement/OutboundPaymentsResource.d.ts index 70afa54fe6..7e11b50368 100644 --- a/types/V2/MoneyManagement/OutboundPaymentsResource.d.ts +++ b/types/V2/MoneyManagement/OutboundPaymentsResource.d.ts @@ -8,7 +8,7 @@ declare module 'stripe' { /** * The "presentment amount" to be sent to the recipient. */ - amount: OutboundPaymentCreateParams.Amount; + amount: Amount; /** * From which FinancialAccount and BalanceType to pull funds from. @@ -57,18 +57,6 @@ declare module 'stripe' { } namespace OutboundPaymentCreateParams { - interface Amount { - /** - * A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - */ - value: number; - - /** - * 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; - } - interface DeliveryOptions { /** * Open Enum. Speed of the payout. diff --git a/types/V2/MoneyManagement/OutboundTransfers.d.ts b/types/V2/MoneyManagement/OutboundTransfers.d.ts index aa518ad6f3..e0c79ee1ac 100644 --- a/types/V2/MoneyManagement/OutboundTransfers.d.ts +++ b/types/V2/MoneyManagement/OutboundTransfers.d.ts @@ -21,7 +21,7 @@ declare module 'stripe' { /** * The "presentment amount" for the OutboundTransfer. */ - amount: OutboundTransfer.Amount; + amount: Amount; /** * Returns true if the OutboundTransfer can be canceled, and false otherwise. @@ -110,18 +110,6 @@ declare module 'stripe' { } namespace OutboundTransfer { - interface Amount { - /** - * A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - */ - value: number; - - /** - * 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; - } - interface DeliveryOptions { /** * Open Enum. Method for bank account. @@ -137,7 +125,7 @@ declare module 'stripe' { /** * The monetary amount debited from the sender, only set on responses. */ - debited: From.Debited; + debited: Amount; /** * The FinancialAccount that funds were pulled from. @@ -145,20 +133,6 @@ declare module 'stripe' { financial_account: string; } - namespace From { - interface Debited { - /** - * A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - */ - value: number; - - /** - * 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; - } - } - type Status = | 'canceled' | 'failed' @@ -249,7 +223,7 @@ declare module 'stripe' { /** * The monetary amount being credited to the destination. */ - credited: To.Credited; + credited: Amount; /** * The payout method which the OutboundTransfer uses to send payout. @@ -257,20 +231,6 @@ declare module 'stripe' { payout_method: string; } - namespace To { - interface Credited { - /** - * A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - */ - value: number; - - /** - * 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; - } - } - interface TraceId { /** * Possible values are `pending`, `supported`, and `unsupported`. Initially set to `pending`, it changes to diff --git a/types/V2/MoneyManagement/OutboundTransfersResource.d.ts b/types/V2/MoneyManagement/OutboundTransfersResource.d.ts index 6183c3419c..2239d960e1 100644 --- a/types/V2/MoneyManagement/OutboundTransfersResource.d.ts +++ b/types/V2/MoneyManagement/OutboundTransfersResource.d.ts @@ -8,7 +8,7 @@ declare module 'stripe' { /** * The "presentment amount" for the OutboundPayment. */ - amount: OutboundTransferCreateParams.Amount; + amount: Amount; /** * The FinancialAccount to pull funds from. @@ -42,18 +42,6 @@ declare module 'stripe' { } namespace OutboundTransferCreateParams { - interface Amount { - /** - * A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - */ - value: number; - - /** - * 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; - } - interface DeliveryOptions { /** * Open Enum. Method for bank account. diff --git a/types/V2/MoneyManagement/ReceivedCredits.d.ts b/types/V2/MoneyManagement/ReceivedCredits.d.ts index 5f90a9e8cc..1b3b8c5ed8 100644 --- a/types/V2/MoneyManagement/ReceivedCredits.d.ts +++ b/types/V2/MoneyManagement/ReceivedCredits.d.ts @@ -21,7 +21,7 @@ declare module 'stripe' { /** * The amount and currency of the ReceivedCredit. */ - amount: ReceivedCredit.Amount; + amount: Amount; /** * This object stores details about the originating Stripe transaction that resulted in the ReceivedCredit. Present if `type` field value is `balance_transfer`. @@ -52,7 +52,7 @@ declare module 'stripe' { /** * The amount and currency of the original/external credit request. */ - external_amount?: ReceivedCredit.ExternalAmount; + external_amount?: Amount; /** * Financial Account ID on which funds for ReceivedCredit were received. @@ -96,18 +96,6 @@ declare module 'stripe' { } namespace ReceivedCredit { - interface Amount { - /** - * A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - */ - value: number; - - /** - * 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; - } - interface BalanceTransfer { /** * The ID of the account that owns the source object originated the ReceivedCredit. @@ -305,18 +293,6 @@ declare module 'stripe' { } } - interface ExternalAmount { - /** - * A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - */ - value: number; - - /** - * 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; - } - type Status = 'failed' | 'pending' | 'returned' | 'succeeded'; interface StatusDetails { diff --git a/types/V2/MoneyManagement/ReceivedDebits.d.ts b/types/V2/MoneyManagement/ReceivedDebits.d.ts index 1c9df05001..603bc823ec 100644 --- a/types/V2/MoneyManagement/ReceivedDebits.d.ts +++ b/types/V2/MoneyManagement/ReceivedDebits.d.ts @@ -21,7 +21,7 @@ declare module 'stripe' { /** * Amount and currency of the ReceivedDebit. */ - amount: ReceivedDebit.Amount; + amount: Amount; /** * This object stores details about the balance transfer object that resulted in the ReceivedDebit. @@ -52,7 +52,7 @@ declare module 'stripe' { /** * The amount and currency of the original/external debit request. */ - external_amount?: ReceivedDebit.ExternalAmount; + external_amount?: Amount; /** * Financial Account on which funds for ReceivedDebit were debited. @@ -96,18 +96,6 @@ declare module 'stripe' { } namespace ReceivedDebit { - interface Amount { - /** - * A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - */ - value: number; - - /** - * 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; - } - interface BalanceTransfer { /** * Open Enum. The type of balance transfer that originated the ReceivedDebit. @@ -188,7 +176,7 @@ declare module 'stripe' { /** * Amount associated with this issuing authorization. */ - amount: Authorization.Amount; + amount: Amount; /** * The reference to the v1 issuing authorization ID. @@ -196,57 +184,17 @@ declare module 'stripe' { issuing_authorization_v1: string; } - namespace Authorization { - interface Amount { - /** - * A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - */ - value: number; - - /** - * 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; - } - } - interface CardTransaction { /** * Amount associated with this issuing transaction. */ - amount: CardTransaction.Amount; + amount: Amount; /** * The reference to the v1 issuing transaction ID. */ issuing_transaction_v1: string; } - - namespace CardTransaction { - interface Amount { - /** - * A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - */ - value: number; - - /** - * 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; - } - } - } - - interface ExternalAmount { - /** - * A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - */ - value: number; - - /** - * 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; } type Status = diff --git a/types/V2/MoneyManagement/TransactionEntries.d.ts b/types/V2/MoneyManagement/TransactionEntries.d.ts index 572a217b94..2110420e18 100644 --- a/types/V2/MoneyManagement/TransactionEntries.d.ts +++ b/types/V2/MoneyManagement/TransactionEntries.d.ts @@ -54,55 +54,17 @@ declare module 'stripe' { /** * Impact to the available balance. */ - available: BalanceImpact.Available; + available: Amount; /** * Impact to the inbound_pending balance. */ - inbound_pending: BalanceImpact.InboundPending; + inbound_pending: Amount; /** * Impact to the outbound_pending balance. */ - outbound_pending: BalanceImpact.OutboundPending; - } - - namespace BalanceImpact { - interface Available { - /** - * A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - */ - value: number; - - /** - * 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; - } - - interface InboundPending { - /** - * A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - */ - value: number; - - /** - * 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; - } - - interface OutboundPending { - /** - * A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - */ - value: number; - - /** - * 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; - } + outbound_pending: Amount; } interface TransactionDetails { diff --git a/types/V2/MoneyManagement/Transactions.d.ts b/types/V2/MoneyManagement/Transactions.d.ts index 8d8eddf3dd..2378b39ef6 100644 --- a/types/V2/MoneyManagement/Transactions.d.ts +++ b/types/V2/MoneyManagement/Transactions.d.ts @@ -21,7 +21,7 @@ declare module 'stripe' { /** * The amount of the Transaction. */ - amount: Transaction.Amount; + amount: Amount; /** * The delta to the FinancialAccount's balance. The balance_impact for the Transaction is equal to sum of its @@ -70,71 +70,21 @@ declare module 'stripe' { } namespace Transaction { - interface Amount { - /** - * A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - */ - value: number; - - /** - * 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; - } - interface BalanceImpact { /** * Impact to the available balance. */ - available: BalanceImpact.Available; + available: Amount; /** * Impact to the inbound_pending balance. */ - inbound_pending: BalanceImpact.InboundPending; + inbound_pending: Amount; /** * Impact to the outbound_pending balance. */ - outbound_pending: BalanceImpact.OutboundPending; - } - - namespace BalanceImpact { - interface Available { - /** - * A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - */ - value: number; - - /** - * 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; - } - - interface InboundPending { - /** - * A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - */ - value: number; - - /** - * 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; - } - - interface OutboundPending { - /** - * A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - */ - value: number; - - /** - * 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; - } + outbound_pending: Amount; } type Category = diff --git a/types/V2/Payments/OffSessionPayments.d.ts b/types/V2/Payments/OffSessionPayments.d.ts index 3964adf8eb..f82ba95cff 100644 --- a/types/V2/Payments/OffSessionPayments.d.ts +++ b/types/V2/Payments/OffSessionPayments.d.ts @@ -26,12 +26,12 @@ declare module 'stripe' { /** * The amount available to be captured. */ - amount_capturable?: OffSessionPayment.AmountCapturable; + amount_capturable?: Amount; /** * The “presentment amount” to be collected from the customer. */ - amount_requested: OffSessionPayment.AmountRequested; + amount_requested: Amount; /** * The frequency of the underlying payment. @@ -145,30 +145,6 @@ declare module 'stripe' { } namespace OffSessionPayment { - interface AmountCapturable { - /** - * A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - */ - value: number; - - /** - * 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; - } - - interface AmountRequested { - /** - * A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - */ - value: number; - - /** - * 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; - } - type Cadence = 'recurring' | 'unscheduled'; interface Capture { diff --git a/types/V2/Payments/OffSessionPaymentsResource.d.ts b/types/V2/Payments/OffSessionPaymentsResource.d.ts index 8f094ac8dd..7028c04a5e 100644 --- a/types/V2/Payments/OffSessionPaymentsResource.d.ts +++ b/types/V2/Payments/OffSessionPaymentsResource.d.ts @@ -8,7 +8,7 @@ declare module 'stripe' { /** * The “presentment amount” to be collected from the customer. */ - amount: OffSessionPaymentCreateParams.Amount; + amount: Amount; /** * The frequency of the underlying payment. @@ -90,18 +90,6 @@ declare module 'stripe' { } namespace OffSessionPaymentCreateParams { - interface Amount { - /** - * A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - */ - value: number; - - /** - * 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; - } - type Cadence = 'recurring' | 'unscheduled'; interface Capture { diff --git a/types/V2/Payments/SettlementAllocationIntentSplits.d.ts b/types/V2/Payments/SettlementAllocationIntentSplits.d.ts index 4a48870efd..f645d74857 100644 --- a/types/V2/Payments/SettlementAllocationIntentSplits.d.ts +++ b/types/V2/Payments/SettlementAllocationIntentSplits.d.ts @@ -26,7 +26,7 @@ declare module 'stripe' { /** * The amount and currency of the SettlementAllocationIntentSplit. */ - amount: SettlementAllocationIntentSplit.Amount; + amount: Amount; /** * Timestamp at which SettlementAllocationIntentSplit was created. @@ -60,18 +60,6 @@ declare module 'stripe' { } namespace SettlementAllocationIntentSplit { - interface Amount { - /** - * A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - */ - value: number; - - /** - * 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; - } - interface Flow { /** * Type of the flow linked to the transaction which settled the SettlementAllocationIntentSplit. The field matching this value will contain the ID of the flow. diff --git a/types/V2/Payments/SettlementAllocationIntents.d.ts b/types/V2/Payments/SettlementAllocationIntents.d.ts index a9b41b194d..1bfdee8a27 100644 --- a/types/V2/Payments/SettlementAllocationIntents.d.ts +++ b/types/V2/Payments/SettlementAllocationIntents.d.ts @@ -21,7 +21,7 @@ declare module 'stripe' { /** * The amount and currency of the SettlementAllocationIntent. */ - amount: SettlementAllocationIntent.Amount; + amount: Amount; /** * Timestamp at which SettlementAllocationIntent was created . @@ -70,18 +70,6 @@ declare module 'stripe' { } namespace SettlementAllocationIntent { - interface Amount { - /** - * A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - */ - value: number; - - /** - * 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; - } - type Status = | 'canceled' | 'errored' diff --git a/types/V2/Payments/SettlementAllocationIntents/SplitsResource.d.ts b/types/V2/Payments/SettlementAllocationIntents/SplitsResource.d.ts index 7d0e0fe9e9..ecb4ae0d3b 100644 --- a/types/V2/Payments/SettlementAllocationIntents/SplitsResource.d.ts +++ b/types/V2/Payments/SettlementAllocationIntents/SplitsResource.d.ts @@ -14,7 +14,7 @@ declare module 'stripe' { /** * The amount and currency of the SettlementAllocationIntentSplit. */ - amount: SplitCreateParams.Amount; + amount: Amount; /** * The type of the fund transfer. @@ -28,18 +28,6 @@ declare module 'stripe' { } namespace SplitCreateParams { - interface Amount { - /** - * A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - */ - value: number; - - /** - * 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; - } - type Type = 'credit' | 'debit'; } } diff --git a/types/V2/Payments/SettlementAllocationIntentsResource.d.ts b/types/V2/Payments/SettlementAllocationIntentsResource.d.ts index 8315cab81e..9737fd144f 100644 --- a/types/V2/Payments/SettlementAllocationIntentsResource.d.ts +++ b/types/V2/Payments/SettlementAllocationIntentsResource.d.ts @@ -8,7 +8,7 @@ declare module 'stripe' { /** * The amount and currency of the SettlementAllocationIntent. Allowed Currencies are `gbp` | `eur`. */ - amount: SettlementAllocationIntentCreateParams.Amount; + amount: Amount; /** * Date when we expect to receive the funds. Must be in future . @@ -30,20 +30,6 @@ declare module 'stripe' { */ metadata?: Stripe.MetadataParam; } - - namespace SettlementAllocationIntentCreateParams { - interface Amount { - /** - * A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - */ - value: number; - - /** - * 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; - } - } } namespace Payments { @@ -55,27 +41,13 @@ declare module 'stripe' { /** * The new amount for the SettlementAllocationIntent. Only amount.value can be updated and currency must remain same. */ - amount?: SettlementAllocationIntentUpdateParams.Amount; + amount?: Amount; /** * The new reference for the SettlementAllocationIntent. */ reference?: string; } - - namespace SettlementAllocationIntentUpdateParams { - interface Amount { - /** - * A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - */ - value: number; - - /** - * 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; - } - } } namespace Payments { diff --git a/types/V2/TestHelpers/FinancialAddressesResource.d.ts b/types/V2/TestHelpers/FinancialAddressesResource.d.ts index 2cfd057cc7..c533c9206c 100644 --- a/types/V2/TestHelpers/FinancialAddressesResource.d.ts +++ b/types/V2/TestHelpers/FinancialAddressesResource.d.ts @@ -8,7 +8,7 @@ declare module 'stripe' { /** * Object containing the amount value and currency to credit. */ - amount: FinancialAddressCreditParams.Amount; + amount: Amount; /** * Open Enum. The network to use in simulating the funds flow. This will be the reflected in the resulting ReceivedCredit. @@ -22,18 +22,6 @@ declare module 'stripe' { } namespace FinancialAddressCreditParams { - interface Amount { - /** - * A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - */ - value: number; - - /** - * 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; - } - type Network = | 'ach' | 'fps'