From b1abc5f9ab345e225cf86b2b3d8a35c1159b05db Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Thu, 26 Jun 2025 13:30:00 +0000 Subject: [PATCH] Update generated code for v1819 and 2025-06-30.preview --- lib/stripe/services/v2/billing_service.rb | 4 +- .../services/v2/core/account_service.rb | 30 +- .../v2/core/accounts/person_service.rb | 19 +- .../v2/core/event_destination_service.rb | 32 +- .../v2/core/vault/gb_bank_account_service.rb | 9 +- .../v2/core/vault/us_bank_account_service.rb | 4 +- lib/stripe/services/v2/core_service.rb | 4 +- .../financial_address_service.rb | 24 +- .../inbound_transfer_service.rb | 72 +- .../outbound_payment_service.rb | 89 +- .../outbound_setup_intent_service.rb | 20 +- .../outbound_transfer_service.rb | 81 +- .../money_management/payout_method_service.rb | 3 +- .../services/v2/money_management_service.rb | 8 +- .../payments/off_session_payment_service.rb | 19 +- lib/stripe/services/v2_services.rb | 6 +- rbi/stripe.rbi | 1384 ++++++++--------- rbi/stripe/services/v2/billing_service.rbi | 2 +- .../services/v2/core/account_service.rbi | 32 +- .../v2/core/accounts/person_service.rbi | 14 +- .../v2/core/event_destination_service.rbi | 26 +- .../v2/core/vault/gb_bank_account_service.rbi | 6 +- .../v2/core/vault/us_bank_account_service.rbi | 2 +- rbi/stripe/services/v2/core_service.rbi | 2 +- .../financial_address_service.rbi | 20 +- .../inbound_transfer_service.rbi | 72 +- .../outbound_payment_service.rbi | 90 +- .../outbound_setup_intent_service.rbi | 16 +- .../outbound_transfer_service.rbi | 82 +- .../payout_method_service.rbi | 2 +- .../services/v2/money_management_service.rbi | 6 +- .../payments/off_session_payment_service.rbi | 16 +- rbi/stripe/services/v2_services.rbi | 4 +- test/stripe/generated_examples_test.rb | 850 +++++----- 34 files changed, 1522 insertions(+), 1528 deletions(-) diff --git a/lib/stripe/services/v2/billing_service.rb b/lib/stripe/services/v2/billing_service.rb index b4cffb6b..54dea6b8 100644 --- a/lib/stripe/services/v2/billing_service.rb +++ b/lib/stripe/services/v2/billing_service.rb @@ -4,12 +4,12 @@ module Stripe module V2 class BillingService < StripeService - attr_reader :meter_event_session, :meter_event_adjustments, :meter_event_stream, :meter_events + attr_reader :meter_event_adjustments, :meter_event_session, :meter_event_stream, :meter_events def initialize(requestor) super - @meter_event_session = Stripe::V2::Billing::MeterEventSessionService.new(@requestor) @meter_event_adjustments = Stripe::V2::Billing::MeterEventAdjustmentService.new(@requestor) + @meter_event_session = Stripe::V2::Billing::MeterEventSessionService.new(@requestor) @meter_event_stream = Stripe::V2::Billing::MeterEventStreamService.new(@requestor) @meter_events = Stripe::V2::Billing::MeterEventService.new(@requestor) end diff --git a/lib/stripe/services/v2/core/account_service.rb b/lib/stripe/services/v2/core/account_service.rb index 8b7f7ce0..d515ef4b 100644 --- a/lib/stripe/services/v2/core/account_service.rb +++ b/lib/stripe/services/v2/core/account_service.rb @@ -12,12 +12,15 @@ module Stripe @persons = Stripe::V2::Core::Accounts::PersonService.new(@requestor) end - class CloseParams < Stripe::RequestParams - # Configurations on the Account to be closed. All configurations on the Account must be passed in for this request to succeed. + class ListParams < Stripe::RequestParams + # Filter only accounts that have all of the configurations specified. If omitted, returns all accounts regardless of which configurations they have. attr_accessor :applied_configurations + # The upper limit on the number of accounts returned by the List Account request. + attr_accessor :limit - def initialize(applied_configurations: nil) + def initialize(applied_configurations: nil, limit: nil) @applied_configurations = applied_configurations + @limit = limit end end @@ -2048,18 +2051,6 @@ module Stripe end end - class ListParams < Stripe::RequestParams - # Filter only accounts that have all of the configurations specified. If omitted, returns all accounts regardless of which configurations they have. - attr_accessor :applied_configurations - # The upper limit on the number of accounts returned by the List Account request. - attr_accessor :limit - - def initialize(applied_configurations: nil, limit: nil) - @applied_configurations = applied_configurations - @limit = limit - end - end - class RetrieveParams < Stripe::RequestParams # Additional fields to include in the response. attr_accessor :include @@ -4110,6 +4101,15 @@ module Stripe end end + class CloseParams < Stripe::RequestParams + # Configurations on the Account to be closed. All configurations on the Account must be passed in for this request to succeed. + attr_accessor :applied_configurations + + def initialize(applied_configurations: nil) + @applied_configurations = applied_configurations + end + end + # Removes access to the Account and its associated resources. def close(id, params = {}, opts = {}) request( diff --git a/lib/stripe/services/v2/core/accounts/person_service.rb b/lib/stripe/services/v2/core/accounts/person_service.rb index 93727c32..5eb48bf1 100644 --- a/lib/stripe/services/v2/core/accounts/person_service.rb +++ b/lib/stripe/services/v2/core/accounts/person_service.rb @@ -6,6 +6,15 @@ module Stripe module Core module Accounts class PersonService < StripeService + class ListParams < Stripe::RequestParams + # The upper limit on the number of accounts returned by the List Account request. + attr_accessor :limit + + def initialize(limit: nil) + @limit = limit + end + end + class CreateParams < Stripe::RequestParams class AdditionalAddress < Stripe::RequestParams # City, district, suburb, town, or village. @@ -490,16 +499,6 @@ module Stripe end class DeleteParams < Stripe::RequestParams; end - - class ListParams < Stripe::RequestParams - # The upper limit on the number of accounts returned by the List Account request. - attr_accessor :limit - - def initialize(limit: nil) - @limit = limit - end - end - class RetrieveParams < Stripe::RequestParams; end class UpdateParams < Stripe::RequestParams diff --git a/lib/stripe/services/v2/core/event_destination_service.rb b/lib/stripe/services/v2/core/event_destination_service.rb index bd86351d..eeb08238 100644 --- a/lib/stripe/services/v2/core/event_destination_service.rb +++ b/lib/stripe/services/v2/core/event_destination_service.rb @@ -5,6 +5,18 @@ module Stripe module V2 module Core class EventDestinationService < StripeService + class ListParams < Stripe::RequestParams + # Additional fields to include in the response. Currently supports `webhook_endpoint.url`. + attr_accessor :include + # The page size. + attr_accessor :limit + + def initialize(include: nil, limit: nil) + @include = include + @limit = limit + end + end + class CreateParams < Stripe::RequestParams class AmazonEventbridge < Stripe::RequestParams # The AWS account ID. @@ -77,22 +89,6 @@ module Stripe end class DeleteParams < Stripe::RequestParams; end - class DisableParams < Stripe::RequestParams; end - class EnableParams < Stripe::RequestParams; end - - class ListParams < Stripe::RequestParams - # Additional fields to include in the response. Currently supports `webhook_endpoint.url`. - attr_accessor :include - # The page size. - attr_accessor :limit - - def initialize(include: nil, limit: nil) - @include = include - @limit = limit - end - end - - class PingParams < Stripe::RequestParams; end class RetrieveParams < Stripe::RequestParams # Additional fields to include in the response. @@ -142,6 +138,10 @@ module Stripe end end + class DisableParams < Stripe::RequestParams; end + class EnableParams < Stripe::RequestParams; end + class PingParams < Stripe::RequestParams; end + # Create a new event destination. def create(params = {}, opts = {}) request( diff --git a/lib/stripe/services/v2/core/vault/gb_bank_account_service.rb b/lib/stripe/services/v2/core/vault/gb_bank_account_service.rb index f19f6722..7ad4fee9 100644 --- a/lib/stripe/services/v2/core/vault/gb_bank_account_service.rb +++ b/lib/stripe/services/v2/core/vault/gb_bank_account_service.rb @@ -6,9 +6,6 @@ module Stripe module Core module Vault class GbBankAccountService < StripeService - class AcknowledgeConfirmationOfPayeeParams < Stripe::RequestParams; end - class ArchiveParams < Stripe::RequestParams; end - class CreateParams < Stripe::RequestParams class ConfirmationOfPayee < Stripe::RequestParams # The business type to be checked against. Legal entity information will be used if unspecified. @@ -49,6 +46,10 @@ module Stripe end end + class RetrieveParams < Stripe::RequestParams; end + class AcknowledgeConfirmationOfPayeeParams < Stripe::RequestParams; end + class ArchiveParams < Stripe::RequestParams; end + class InitiateConfirmationOfPayeeParams < Stripe::RequestParams # The business type to be checked against. Legal entity information will be used if unspecified. attr_accessor :business_type @@ -61,8 +62,6 @@ module Stripe end end - class RetrieveParams < Stripe::RequestParams; end - # Confirm that you have received the result of the Confirmation of Payee request, and that you are okay with # proceeding to pay out to this bank account despite the account not matching, partially matching, or the service # being unavailable. Once you confirm this, you will be able to send OutboundPayments, but this may lead to diff --git a/lib/stripe/services/v2/core/vault/us_bank_account_service.rb b/lib/stripe/services/v2/core/vault/us_bank_account_service.rb index 2851f26e..e895aadc 100644 --- a/lib/stripe/services/v2/core/vault/us_bank_account_service.rb +++ b/lib/stripe/services/v2/core/vault/us_bank_account_service.rb @@ -6,8 +6,6 @@ module Stripe module Core module Vault class UsBankAccountService < StripeService - class ArchiveParams < Stripe::RequestParams; end - class CreateParams < Stripe::RequestParams # The account number of the bank account. attr_accessor :account_number @@ -45,6 +43,8 @@ module Stripe end end + class ArchiveParams < Stripe::RequestParams; end + # Archive a USBankAccount object. USBankAccount objects will not be automatically archived by Stripe. # Archived USBankAccount objects cannot be used as outbound destinations # and will not appear in the outbound destination list. diff --git a/lib/stripe/services/v2/core_service.rb b/lib/stripe/services/v2/core_service.rb index fee10481..82966673 100644 --- a/lib/stripe/services/v2/core_service.rb +++ b/lib/stripe/services/v2/core_service.rb @@ -4,12 +4,12 @@ module Stripe module V2 class CoreService < StripeService - attr_reader :accounts, :account_links, :event_destinations, :events, :vault + attr_reader :account_links, :accounts, :event_destinations, :events, :vault def initialize(requestor) super - @accounts = Stripe::V2::Core::AccountService.new(@requestor) @account_links = Stripe::V2::Core::AccountLinkService.new(@requestor) + @accounts = Stripe::V2::Core::AccountService.new(@requestor) @event_destinations = Stripe::V2::Core::EventDestinationService.new(@requestor) @events = Stripe::V2::Core::EventService.new(@requestor) @vault = Stripe::V2::Core::VaultService.new(@requestor) diff --git a/lib/stripe/services/v2/money_management/financial_address_service.rb b/lib/stripe/services/v2/money_management/financial_address_service.rb index c320724b..c98a0bf7 100644 --- a/lib/stripe/services/v2/money_management/financial_address_service.rb +++ b/lib/stripe/services/v2/money_management/financial_address_service.rb @@ -5,18 +5,6 @@ module Stripe module V2 module MoneyManagement class FinancialAddressService < StripeService - class CreateParams < Stripe::RequestParams - # Open Enum. The currency the FinancialAddress should support. Currently, only the `usd` and `gbp` values are supported. - attr_accessor :currency - # The ID of the FinancialAccount the new FinancialAddress should be associated with. - attr_accessor :financial_account - - def initialize(currency: nil, financial_account: nil) - @currency = currency - @financial_account = financial_account - end - end - class ListParams < Stripe::RequestParams # The ID of the FinancialAccount for which FinancialAddresses are to be returned. attr_accessor :financial_account @@ -32,6 +20,18 @@ module Stripe end end + class CreateParams < Stripe::RequestParams + # Open Enum. The currency the FinancialAddress should support. Currently, only the `usd` and `gbp` values are supported. + attr_accessor :currency + # The ID of the FinancialAccount the new FinancialAddress should be associated with. + attr_accessor :financial_account + + def initialize(currency: nil, financial_account: nil) + @currency = currency + @financial_account = financial_account + end + end + class RetrieveParams < Stripe::RequestParams # Open Enum. A list of fields to reveal in the FinancialAddresses returned. attr_accessor :include diff --git a/lib/stripe/services/v2/money_management/inbound_transfer_service.rb b/lib/stripe/services/v2/money_management/inbound_transfer_service.rb index 2bac8cab..654ecd55 100644 --- a/lib/stripe/services/v2/money_management/inbound_transfer_service.rb +++ b/lib/stripe/services/v2/money_management/inbound_transfer_service.rb @@ -5,6 +5,42 @@ module Stripe module V2 module MoneyManagement class InboundTransferService < StripeService + class ListParams < Stripe::RequestParams + # Filter for objects created at the specified timestamp. + # Must be an RFC 3339 date & time value, for example: 2022-09-18T13:22:00Z. + attr_accessor :created + # Filter for objects created after the specified timestamp. + # Must be an RFC 3339 date & time value, for example: 2022-09-18T13:22:00Z. + attr_accessor :created_gt + # Filter for objects created on or after the specified timestamp. + # Must be an RFC 3339 date & time value, for example: 2022-09-18T13:22:00Z. + attr_accessor :created_gte + # Filter for objects created before the specified timestamp. + # Must be an RFC 3339 date & time value, for example: 2022-09-18T13:22:00Z. + attr_accessor :created_lt + # Filter for objects created on or before the specified timestamp. + # Must be an RFC 3339 date & time value, for example: 2022-09-18T13:22:00Z. + attr_accessor :created_lte + # The page limit. + attr_accessor :limit + + def initialize( + created: nil, + created_gt: nil, + created_gte: nil, + created_lt: nil, + created_lte: nil, + limit: nil + ) + @created = created + @created_gt = created_gt + @created_gte = created_gte + @created_lt = created_lt + @created_lte = created_lte + @limit = limit + end + end + class CreateParams < Stripe::RequestParams class From < Stripe::RequestParams # An optional currency field used to specify which currency is debited from the Payment Method. @@ -47,42 +83,6 @@ module Stripe end end - class ListParams < Stripe::RequestParams - # Filter for objects created at the specified timestamp. - # Must be an RFC 3339 date & time value, for example: 2022-09-18T13:22:00Z. - attr_accessor :created - # Filter for objects created after the specified timestamp. - # Must be an RFC 3339 date & time value, for example: 2022-09-18T13:22:00Z. - attr_accessor :created_gt - # Filter for objects created on or after the specified timestamp. - # Must be an RFC 3339 date & time value, for example: 2022-09-18T13:22:00Z. - attr_accessor :created_gte - # Filter for objects created before the specified timestamp. - # Must be an RFC 3339 date & time value, for example: 2022-09-18T13:22:00Z. - attr_accessor :created_lt - # Filter for objects created on or before the specified timestamp. - # Must be an RFC 3339 date & time value, for example: 2022-09-18T13:22:00Z. - attr_accessor :created_lte - # The page limit. - attr_accessor :limit - - def initialize( - created: nil, - created_gt: nil, - created_gte: nil, - created_lt: nil, - created_lte: nil, - limit: nil - ) - @created = created - @created_gt = created_gt - @created_gte = created_gte - @created_lt = created_lt - @created_lte = created_lte - @limit = limit - end - end - class RetrieveParams < Stripe::RequestParams; end # InboundTransfers APIs are used to create, retrieve or list InboundTransfers. diff --git a/lib/stripe/services/v2/money_management/outbound_payment_service.rb b/lib/stripe/services/v2/money_management/outbound_payment_service.rb index d3bd3590..40794109 100644 --- a/lib/stripe/services/v2/money_management/outbound_payment_service.rb +++ b/lib/stripe/services/v2/money_management/outbound_payment_service.rb @@ -5,7 +5,49 @@ module Stripe module V2 module MoneyManagement class OutboundPaymentService < StripeService - class CancelParams < Stripe::RequestParams; end + class ListParams < Stripe::RequestParams + # Filter for objects created at the specified timestamp. + # Must be an RFC 3339 date & time value, for example: 2022-09-18T13:22:00Z. + attr_accessor :created + # Filter for objects created after the specified timestamp. + # Must be an RFC 3339 date & time value, for example: 2022-09-18T13:22:00Z. + attr_accessor :created_gt + # Filter for objects created on or after the specified timestamp. + # Must be an RFC 3339 date & time value, for example: 2022-09-18T13:22:00Z. + attr_accessor :created_gte + # Filter for objects created before the specified timestamp. + # Must be an RFC 3339 date & time value, for example: 2022-09-18T13:22:00Z. + attr_accessor :created_lt + # Filter for objects created on or before the specified timestamp. + # Must be an RFC 3339 date & time value, for example: 2022-09-18T13:22:00Z. + attr_accessor :created_lte + # The maximum number of results to return. + attr_accessor :limit + # Only return OutboundPayments sent to this recipient. + attr_accessor :recipient + # Closed Enum. Only return OutboundPayments with this status. + attr_accessor :status + + def initialize( + created: nil, + created_gt: nil, + created_gte: nil, + created_lt: nil, + created_lte: nil, + limit: nil, + recipient: nil, + status: nil + ) + @created = created + @created_gt = created_gt + @created_gte = created_gte + @created_lt = created_lt + @created_lte = created_lte + @limit = limit + @recipient = recipient + @status = status + end + end class CreateParams < Stripe::RequestParams class DeliveryOptions < Stripe::RequestParams @@ -97,51 +139,8 @@ module Stripe end end - class ListParams < Stripe::RequestParams - # Filter for objects created at the specified timestamp. - # Must be an RFC 3339 date & time value, for example: 2022-09-18T13:22:00Z. - attr_accessor :created - # Filter for objects created after the specified timestamp. - # Must be an RFC 3339 date & time value, for example: 2022-09-18T13:22:00Z. - attr_accessor :created_gt - # Filter for objects created on or after the specified timestamp. - # Must be an RFC 3339 date & time value, for example: 2022-09-18T13:22:00Z. - attr_accessor :created_gte - # Filter for objects created before the specified timestamp. - # Must be an RFC 3339 date & time value, for example: 2022-09-18T13:22:00Z. - attr_accessor :created_lt - # Filter for objects created on or before the specified timestamp. - # Must be an RFC 3339 date & time value, for example: 2022-09-18T13:22:00Z. - attr_accessor :created_lte - # The maximum number of results to return. - attr_accessor :limit - # Only return OutboundPayments sent to this recipient. - attr_accessor :recipient - # Closed Enum. Only return OutboundPayments with this status. - attr_accessor :status - - def initialize( - created: nil, - created_gt: nil, - created_gte: nil, - created_lt: nil, - created_lte: nil, - limit: nil, - recipient: nil, - status: nil - ) - @created = created - @created_gt = created_gt - @created_gte = created_gte - @created_lt = created_lt - @created_lte = created_lte - @limit = limit - @recipient = recipient - @status = status - end - end - class RetrieveParams < Stripe::RequestParams; end + class CancelParams < Stripe::RequestParams; end # Cancels an OutboundPayment. Only processing OutboundPayments can be canceled. # diff --git a/lib/stripe/services/v2/money_management/outbound_setup_intent_service.rb b/lib/stripe/services/v2/money_management/outbound_setup_intent_service.rb index ad887e09..3f344a33 100644 --- a/lib/stripe/services/v2/money_management/outbound_setup_intent_service.rb +++ b/lib/stripe/services/v2/money_management/outbound_setup_intent_service.rb @@ -5,7 +5,14 @@ module Stripe module V2 module MoneyManagement class OutboundSetupIntentService < StripeService - class CancelParams < Stripe::RequestParams; end + class ListParams < Stripe::RequestParams + # The page size. + attr_accessor :limit + + def initialize(limit: nil) + @limit = limit + end + end class CreateParams < Stripe::RequestParams class PayoutMethodData < Stripe::RequestParams @@ -84,15 +91,6 @@ module Stripe end end - class ListParams < Stripe::RequestParams - # The page size. - attr_accessor :limit - - def initialize(limit: nil) - @limit = limit - end - end - class RetrieveParams < Stripe::RequestParams; end class UpdateParams < Stripe::RequestParams @@ -167,6 +165,8 @@ module Stripe end end + class CancelParams < Stripe::RequestParams; end + # Cancel an OutboundSetupIntent object. def cancel(id, params = {}, opts = {}) request( diff --git a/lib/stripe/services/v2/money_management/outbound_transfer_service.rb b/lib/stripe/services/v2/money_management/outbound_transfer_service.rb index 2dc186e1..21b32ea3 100644 --- a/lib/stripe/services/v2/money_management/outbound_transfer_service.rb +++ b/lib/stripe/services/v2/money_management/outbound_transfer_service.rb @@ -5,7 +5,45 @@ module Stripe module V2 module MoneyManagement class OutboundTransferService < StripeService - class CancelParams < Stripe::RequestParams; end + class ListParams < Stripe::RequestParams + # Filter for objects created at the specified timestamp. + # Must be an RFC 3339 date & time value, for example: 2022-09-18T13:22:00Z. + attr_accessor :created + # Filter for objects created after the specified timestamp. + # Must be an RFC 3339 date & time value, for example: 2022-09-18T13:22:00Z. + attr_accessor :created_gt + # Filter for objects created on or after the specified timestamp. + # Must be an RFC 3339 date & time value, for example: 2022-09-18T13:22:00Z. + attr_accessor :created_gte + # Filter for objects created before the specified timestamp. + # Must be an RFC 3339 date & time value, for example: 2022-09-18T13:22:00Z. + attr_accessor :created_lt + # Filter for objects created on or before the specified timestamp. + # Must be an RFC 3339 date & time value, for example: 2022-09-18T13:22:00Z. + attr_accessor :created_lte + # The maximum number of results to return. + attr_accessor :limit + # Closed Enum. Only return OutboundTransfers with this status. + attr_accessor :status + + def initialize( + created: nil, + created_gt: nil, + created_gte: nil, + created_lt: nil, + created_lte: nil, + limit: nil, + status: nil + ) + @created = created + @created_gt = created_gt + @created_gte = created_gte + @created_lt = created_lt + @created_lte = created_lte + @limit = limit + @status = status + end + end class CreateParams < Stripe::RequestParams class DeliveryOptions < Stripe::RequestParams @@ -76,47 +114,8 @@ module Stripe end end - class ListParams < Stripe::RequestParams - # Filter for objects created at the specified timestamp. - # Must be an RFC 3339 date & time value, for example: 2022-09-18T13:22:00Z. - attr_accessor :created - # Filter for objects created after the specified timestamp. - # Must be an RFC 3339 date & time value, for example: 2022-09-18T13:22:00Z. - attr_accessor :created_gt - # Filter for objects created on or after the specified timestamp. - # Must be an RFC 3339 date & time value, for example: 2022-09-18T13:22:00Z. - attr_accessor :created_gte - # Filter for objects created before the specified timestamp. - # Must be an RFC 3339 date & time value, for example: 2022-09-18T13:22:00Z. - attr_accessor :created_lt - # Filter for objects created on or before the specified timestamp. - # Must be an RFC 3339 date & time value, for example: 2022-09-18T13:22:00Z. - attr_accessor :created_lte - # The maximum number of results to return. - attr_accessor :limit - # Closed Enum. Only return OutboundTransfers with this status. - attr_accessor :status - - def initialize( - created: nil, - created_gt: nil, - created_gte: nil, - created_lt: nil, - created_lte: nil, - limit: nil, - status: nil - ) - @created = created - @created_gt = created_gt - @created_gte = created_gte - @created_lt = created_lt - @created_lte = created_lte - @limit = limit - @status = status - end - end - class RetrieveParams < Stripe::RequestParams; end + class CancelParams < Stripe::RequestParams; end # Cancels an OutboundTransfer. Only processing OutboundTransfers can be canceled. # diff --git a/lib/stripe/services/v2/money_management/payout_method_service.rb b/lib/stripe/services/v2/money_management/payout_method_service.rb index 1d2322ad..9cfd1fc7 100644 --- a/lib/stripe/services/v2/money_management/payout_method_service.rb +++ b/lib/stripe/services/v2/money_management/payout_method_service.rb @@ -5,8 +5,6 @@ module Stripe module V2 module MoneyManagement class PayoutMethodService < StripeService - class ArchiveParams < Stripe::RequestParams; end - class ListParams < Stripe::RequestParams class UsageStatus < Stripe::RequestParams # List of payments status to filter by. @@ -31,6 +29,7 @@ module Stripe end class RetrieveParams < Stripe::RequestParams; end + class ArchiveParams < Stripe::RequestParams; end class UnarchiveParams < Stripe::RequestParams; end # Archive a PayoutMethod object. Archived objects cannot be used as payout methods diff --git a/lib/stripe/services/v2/money_management_service.rb b/lib/stripe/services/v2/money_management_service.rb index 095b5654..a84a87c6 100644 --- a/lib/stripe/services/v2/money_management_service.rb +++ b/lib/stripe/services/v2/money_management_service.rb @@ -4,7 +4,7 @@ module Stripe module V2 class MoneyManagementService < StripeService - attr_reader :adjustments, :financial_accounts, :financial_addresses, :inbound_transfers, :outbound_payments, :outbound_payment_quotes, :outbound_transfers, :outbound_setup_intents, :payout_methods, :payout_methods_bank_account_spec, :received_credits, :received_debits, :transactions, :transaction_entries + attr_reader :adjustments, :financial_accounts, :financial_addresses, :inbound_transfers, :outbound_payment_quotes, :outbound_payments, :outbound_setup_intents, :outbound_transfers, :payout_methods, :payout_methods_bank_account_spec, :received_credits, :received_debits, :transaction_entries, :transactions def initialize(requestor) super @@ -12,19 +12,19 @@ module Stripe @financial_accounts = Stripe::V2::MoneyManagement::FinancialAccountService.new(@requestor) @financial_addresses = Stripe::V2::MoneyManagement::FinancialAddressService.new(@requestor) @inbound_transfers = Stripe::V2::MoneyManagement::InboundTransferService.new(@requestor) - @outbound_payments = Stripe::V2::MoneyManagement::OutboundPaymentService.new(@requestor) @outbound_payment_quotes = Stripe::V2::MoneyManagement::OutboundPaymentQuoteService .new(@requestor) - @outbound_transfers = Stripe::V2::MoneyManagement::OutboundTransferService.new(@requestor) + @outbound_payments = Stripe::V2::MoneyManagement::OutboundPaymentService.new(@requestor) @outbound_setup_intents = Stripe::V2::MoneyManagement::OutboundSetupIntentService .new(@requestor) + @outbound_transfers = Stripe::V2::MoneyManagement::OutboundTransferService.new(@requestor) @payout_methods = Stripe::V2::MoneyManagement::PayoutMethodService.new(@requestor) @payout_methods_bank_account_spec = Stripe::V2::MoneyManagement::PayoutMethodsBankAccountSpecService .new(@requestor) @received_credits = Stripe::V2::MoneyManagement::ReceivedCreditService.new(@requestor) @received_debits = Stripe::V2::MoneyManagement::ReceivedDebitService.new(@requestor) - @transactions = Stripe::V2::MoneyManagement::TransactionService.new(@requestor) @transaction_entries = Stripe::V2::MoneyManagement::TransactionEntryService.new(@requestor) + @transactions = Stripe::V2::MoneyManagement::TransactionService.new(@requestor) end end end diff --git a/lib/stripe/services/v2/payments/off_session_payment_service.rb b/lib/stripe/services/v2/payments/off_session_payment_service.rb index 0b8ffb6d..91b8aa0b 100644 --- a/lib/stripe/services/v2/payments/off_session_payment_service.rb +++ b/lib/stripe/services/v2/payments/off_session_payment_service.rb @@ -5,7 +5,14 @@ module Stripe module V2 module Payments class OffSessionPaymentService < StripeService - class CancelParams < Stripe::RequestParams; end + class ListParams < Stripe::RequestParams + # The page size limit, if not provided the default is 20. + attr_accessor :limit + + def initialize(limit: nil) + @limit = limit + end + end class CreateParams < Stripe::RequestParams class RetryDetails < Stripe::RequestParams @@ -78,16 +85,8 @@ module Stripe end end - class ListParams < Stripe::RequestParams - # The page size limit, if not provided the default is 20. - attr_accessor :limit - - def initialize(limit: nil) - @limit = limit - end - end - class RetrieveParams < Stripe::RequestParams; end + class CancelParams < Stripe::RequestParams; end # Cancel OSP. def cancel(id, params = {}, opts = {}) diff --git a/lib/stripe/services/v2_services.rb b/lib/stripe/services/v2_services.rb index 2fc47c76..9951a030 100644 --- a/lib/stripe/services/v2_services.rb +++ b/lib/stripe/services/v2_services.rb @@ -3,15 +3,15 @@ module Stripe class V2Services < StripeService - attr_reader :core, :money_management, :billing, :test_helpers, :payments + attr_reader :billing, :core, :money_management, :payments, :test_helpers def initialize(requestor) super + @billing = Stripe::V2::BillingService.new(@requestor) @core = Stripe::V2::CoreService.new(@requestor) @money_management = Stripe::V2::MoneyManagementService.new(@requestor) - @billing = Stripe::V2::BillingService.new(@requestor) - @test_helpers = Stripe::V2::TestHelperService.new(@requestor) @payments = Stripe::V2::PaymentService.new(@requestor) + @test_helpers = Stripe::V2::TestHelperService.new(@requestor) end end end diff --git a/rbi/stripe.rbi b/rbi/stripe.rbi index 443b2885..628a0648 100644 --- a/rbi/stripe.rbi +++ b/rbi/stripe.rbi @@ -186355,19 +186355,172 @@ end # typed: true module Stripe class V2Services < StripeService + attr_reader :billing attr_reader :core attr_reader :money_management - attr_reader :billing - attr_reader :test_helpers attr_reader :payments + attr_reader :test_helpers + end +end +# typed: true +module Stripe + module V2 + class BillingService < StripeService + attr_reader :meter_event_adjustments + attr_reader :meter_event_session + attr_reader :meter_event_stream + attr_reader :meter_events + end + end +end +# typed: true +module Stripe + module V2 + module Billing + class MeterEventAdjustmentService < StripeService + class CreateParams < Stripe::RequestParams + class Cancel < Stripe::RequestParams + # Unique identifier for the event. You can only cancel events within 24 hours of Stripe receiving them. + sig { returns(String) } + attr_accessor :identifier + sig { params(identifier: String).void } + def initialize(identifier: nil); end + end + # Specifies which event to cancel. + sig { returns(::Stripe::V2::Billing::MeterEventAdjustmentService::CreateParams::Cancel) } + attr_accessor :cancel + # The name of the meter event. Corresponds with the `event_name` field on a meter. + sig { returns(String) } + attr_accessor :event_name + # Specifies whether to cancel a single event or a range of events for a time period. Time period cancellation is not supported yet. + sig { returns(String) } + attr_accessor :type + sig { + params(cancel: ::Stripe::V2::Billing::MeterEventAdjustmentService::CreateParams::Cancel, event_name: String, type: String).void + } + def initialize(cancel: nil, event_name: nil, type: nil); end + end + # Creates a meter event adjustment to cancel a previously sent meter event. + sig { + params(params: T.any(::Stripe::V2::Billing::MeterEventAdjustmentService::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::V2::Billing::MeterEventAdjustment) + } + def create(params = {}, opts = {}); end + end + end + end +end +# typed: true +module Stripe + module V2 + module Billing + class MeterEventSessionService < StripeService + class CreateParams < Stripe::RequestParams; end + # Creates a meter event session to send usage on the high-throughput meter event stream. Authentication tokens are only valid for 15 minutes, so you will need to create a new meter event session when your token expires. + sig { + params(params: T.any(::Stripe::V2::Billing::MeterEventSessionService::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::V2::Billing::MeterEventSession) + } + def create(params = {}, opts = {}); end + end + end + end +end +# typed: true +module Stripe + module V2 + module Billing + class MeterEventStreamService < StripeService + class CreateParams < Stripe::RequestParams + class Event < Stripe::RequestParams + # The name of the meter event. Corresponds with the `event_name` field on a meter. + sig { returns(String) } + attr_accessor :event_name + # A unique identifier for the event. If not provided, one will be generated. + # We recommend using a globally unique identifier for this. We’ll enforce + # uniqueness within a rolling 24 hour period. + sig { returns(T.nilable(String)) } + attr_accessor :identifier + # The payload of the event. This must contain the fields corresponding to a meter’s + # `customer_mapping.event_payload_key` (default is `stripe_customer_id`) and + # `value_settings.event_payload_key` (default is `value`). Read more about + # the + # [payload](https://docs.stripe.com/billing/subscriptions/usage-based/recording-usage#payload-key-overrides). + sig { returns(T::Hash[String, String]) } + attr_accessor :payload + # The time of the event. Must be within the past 35 calendar days or up to + # 5 minutes in the future. Defaults to current timestamp if not specified. + sig { returns(T.nilable(String)) } + attr_accessor :timestamp + sig { + params(event_name: String, identifier: T.nilable(String), payload: T::Hash[String, String], timestamp: T.nilable(String)).void + } + def initialize(event_name: nil, identifier: nil, payload: nil, timestamp: nil); end + end + # List of meter events to include in the request. + sig { + returns(T::Array[::Stripe::V2::Billing::MeterEventStreamService::CreateParams::Event]) + } + attr_accessor :events + sig { + params(events: T::Array[::Stripe::V2::Billing::MeterEventStreamService::CreateParams::Event]).void + } + def initialize(events: nil); end + end + # Creates meter events. Events are processed asynchronously, including validation. Requires a meter event session for authentication. Supports up to 10,000 requests per second in livemode. For even higher rate-limits, contact sales. + # + # ** raises TemporarySessionExpiredError + sig { + params(params: T.any(::Stripe::V2::Billing::MeterEventStreamService::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).void + } + def create(params = {}, opts = {}); end + end + end + end +end +# typed: true +module Stripe + module V2 + module Billing + class MeterEventService < StripeService + class CreateParams < Stripe::RequestParams + # The name of the meter event. Corresponds with the `event_name` field on a meter. + sig { returns(String) } + attr_accessor :event_name + # A unique identifier for the event. If not provided, one will be generated. + # We recommend using a globally unique identifier for this. We’ll enforce + # uniqueness within a rolling 24 hour period. + sig { returns(T.nilable(String)) } + attr_accessor :identifier + # The payload of the event. This must contain the fields corresponding to a meter’s + # `customer_mapping.event_payload_key` (default is `stripe_customer_id`) and + # `value_settings.event_payload_key` (default is `value`). Read more about + # the + # [payload](https://docs.stripe.com/billing/subscriptions/usage-based/recording-usage#payload-key-overrides). + sig { returns(T::Hash[String, String]) } + attr_accessor :payload + # The time of the event. Must be within the past 35 calendar days or up to + # 5 minutes in the future. Defaults to current timestamp if not specified. + sig { returns(T.nilable(String)) } + attr_accessor :timestamp + sig { + params(event_name: String, identifier: T.nilable(String), payload: T::Hash[String, String], timestamp: T.nilable(String)).void + } + def initialize(event_name: nil, identifier: nil, payload: nil, timestamp: nil); end + end + # Creates a meter event. Events are validated synchronously, but are processed asynchronously. Supports up to 1,000 events per second in livemode. For higher rate-limits, please use meter event streams instead. + sig { + params(params: T.any(::Stripe::V2::Billing::MeterEventService::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::V2::Billing::MeterEvent) + } + def create(params = {}, opts = {}); end + end + end end end # typed: true module Stripe module V2 class CoreService < StripeService - attr_reader :accounts attr_reader :account_links + attr_reader :accounts attr_reader :event_destinations attr_reader :events attr_reader :vault @@ -186375,17 +186528,97 @@ module Stripe end end # typed: true +module Stripe + module V2 + module Core + class AccountLinkService < StripeService + class CreateParams < Stripe::RequestParams + class UseCase < Stripe::RequestParams + class AccountOnboarding < Stripe::RequestParams + # Open Enum. A v2/account can be configured to enable certain functionality. The configuration param targets the v2/account_link to collect information for the specified v2/account configuration/s. + sig { returns(T::Array[String]) } + attr_accessor :configurations + # The URL the user will be redirected to if the AccountLink is expired, has been used, or is otherwise invalid. The URL you specify should attempt to generate a new AccountLink with the same parameters used to create the original AccountLink, then redirect the user to the new AccountLink’s URL so they can continue the flow. If a new AccountLink cannot be generated or the redirect fails you should display a useful error to the user. Please make sure to implement authentication before redirecting the user in case this URL is leaked to a third party. + sig { returns(String) } + attr_accessor :refresh_url + # The URL that the user will be redirected to upon completing the linked flow. + sig { returns(T.nilable(String)) } + attr_accessor :return_url + sig { + params(configurations: T::Array[String], refresh_url: String, return_url: T.nilable(String)).void + } + def initialize(configurations: nil, refresh_url: nil, return_url: nil); end + end + class AccountUpdate < Stripe::RequestParams + # Open Enum. A v2/account can be configured to enable certain functionality. The configuration param targets the v2/account_link to collect information for the specified v2/account configuration/s. + sig { returns(T::Array[String]) } + attr_accessor :configurations + # The URL the user will be redirected to if the AccountLink is expired, has been used, or is otherwise invalid. The URL you specify should attempt to generate a new AccountLink with the same parameters used to create the original AccountLink, then redirect the user to the new AccountLink’s URL so they can continue the flow. If a new AccountLink cannot be generated or the redirect fails you should display a useful error to the user. Please make sure to implement authentication before redirecting the user in case this URL is leaked to a third party. + sig { returns(String) } + attr_accessor :refresh_url + # The URL that the user will be redirected to upon completing the linked flow. + sig { returns(T.nilable(String)) } + attr_accessor :return_url + sig { + params(configurations: T::Array[String], refresh_url: String, return_url: T.nilable(String)).void + } + def initialize(configurations: nil, refresh_url: nil, return_url: nil); end + end + # Open Enum. The type of AccountLink the user is requesting. + sig { returns(String) } + attr_accessor :type + # Indicates that the AccountLink provided should onboard an account. + sig { + returns(T.nilable(::Stripe::V2::Core::AccountLinkService::CreateParams::UseCase::AccountOnboarding)) + } + attr_accessor :account_onboarding + # Indicates that the AccountLink provided should update a previously onboarded account. + sig { + returns(T.nilable(::Stripe::V2::Core::AccountLinkService::CreateParams::UseCase::AccountUpdate)) + } + attr_accessor :account_update + sig { + params(type: String, account_onboarding: T.nilable(::Stripe::V2::Core::AccountLinkService::CreateParams::UseCase::AccountOnboarding), account_update: T.nilable(::Stripe::V2::Core::AccountLinkService::CreateParams::UseCase::AccountUpdate)).void + } + def initialize(type: nil, account_onboarding: nil, account_update: nil); end + end + # The ID of the Account to create link for. + sig { returns(String) } + attr_accessor :account + # The use case of the AccountLink. + sig { returns(::Stripe::V2::Core::AccountLinkService::CreateParams::UseCase) } + attr_accessor :use_case + sig { + params(account: String, use_case: ::Stripe::V2::Core::AccountLinkService::CreateParams::UseCase).void + } + def initialize(account: nil, use_case: nil); end + end + # Creates an AccountLink object that includes a single-use Stripe URL that the merchant can redirect their user to in order to take them to a Stripe-hosted application such as Recipient Onboarding. + sig { + params(params: T.any(::Stripe::V2::Core::AccountLinkService::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::V2::Core::AccountLink) + } + def create(params = {}, opts = {}); end + end + end + end +end +# typed: true module Stripe module V2 module Core class AccountService < StripeService attr_reader :persons - class CloseParams < Stripe::RequestParams - # Configurations on the Account to be closed. All configurations on the Account must be passed in for this request to succeed. + class ListParams < Stripe::RequestParams + # Filter only accounts that have all of the configurations specified. If omitted, returns all accounts regardless of which configurations they have. sig { returns(T.nilable(T::Array[String])) } attr_accessor :applied_configurations - sig { params(applied_configurations: T.nilable(T::Array[String])).void } - def initialize(applied_configurations: nil); end + # The upper limit on the number of accounts returned by the List Account request. + sig { returns(T.nilable(Integer)) } + attr_accessor :limit + sig { + params(applied_configurations: T.nilable(T::Array[String]), limit: T.nilable(Integer)).void + } + def initialize(applied_configurations: nil, limit: nil); end end class CreateParams < Stripe::RequestParams class Configuration < Stripe::RequestParams @@ -188536,18 +188769,6 @@ module Stripe metadata: nil ); end end - class ListParams < Stripe::RequestParams - # Filter only accounts that have all of the configurations specified. If omitted, returns all accounts regardless of which configurations they have. - sig { returns(T.nilable(T::Array[String])) } - attr_accessor :applied_configurations - # The upper limit on the number of accounts returned by the List Account request. - sig { returns(T.nilable(Integer)) } - attr_accessor :limit - sig { - params(applied_configurations: T.nilable(T::Array[String]), limit: T.nilable(Integer)).void - } - def initialize(applied_configurations: nil, limit: nil); end - end class RetrieveParams < Stripe::RequestParams # Additional fields to include in the response. sig { returns(T.nilable(T::Array[String])) } @@ -190730,6 +190951,13 @@ module Stripe metadata: nil ); end end + class CloseParams < Stripe::RequestParams + # Configurations on the Account to be closed. All configurations on the Account must be passed in for this request to succeed. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :applied_configurations + sig { params(applied_configurations: T.nilable(T::Array[String])).void } + def initialize(applied_configurations: nil); end + end # Removes access to the Account and its associated resources. sig { params(id: String, params: T.any(::Stripe::V2::Core::AccountService::CloseParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::V2::Core::Account) @@ -190769,6 +190997,13 @@ module Stripe module Core module Accounts class PersonService < StripeService + class ListParams < Stripe::RequestParams + # The upper limit on the number of accounts returned by the List Account request. + sig { returns(T.nilable(Integer)) } + attr_accessor :limit + sig { params(limit: T.nilable(Integer)).void } + def initialize(limit: nil); end + end class CreateParams < Stripe::RequestParams class AdditionalAddress < Stripe::RequestParams # City, district, suburb, town, or village. @@ -191284,13 +191519,6 @@ module Stripe ); end end class DeleteParams < Stripe::RequestParams; end - class ListParams < Stripe::RequestParams - # The upper limit on the number of accounts returned by the List Account request. - sig { returns(T.nilable(Integer)) } - attr_accessor :limit - sig { params(limit: T.nilable(Integer)).void } - def initialize(limit: nil); end - end class RetrieveParams < Stripe::RequestParams; end class UpdateParams < Stripe::RequestParams class AdditionalAddress < Stripe::RequestParams @@ -191847,85 +192075,20 @@ module Stripe end end # typed: true -module Stripe - module V2 - module Core - class AccountLinkService < StripeService - class CreateParams < Stripe::RequestParams - class UseCase < Stripe::RequestParams - class AccountOnboarding < Stripe::RequestParams - # Open Enum. A v2/account can be configured to enable certain functionality. The configuration param targets the v2/account_link to collect information for the specified v2/account configuration/s. - sig { returns(T::Array[String]) } - attr_accessor :configurations - # The URL the user will be redirected to if the AccountLink is expired, has been used, or is otherwise invalid. The URL you specify should attempt to generate a new AccountLink with the same parameters used to create the original AccountLink, then redirect the user to the new AccountLink’s URL so they can continue the flow. If a new AccountLink cannot be generated or the redirect fails you should display a useful error to the user. Please make sure to implement authentication before redirecting the user in case this URL is leaked to a third party. - sig { returns(String) } - attr_accessor :refresh_url - # The URL that the user will be redirected to upon completing the linked flow. - sig { returns(T.nilable(String)) } - attr_accessor :return_url - sig { - params(configurations: T::Array[String], refresh_url: String, return_url: T.nilable(String)).void - } - def initialize(configurations: nil, refresh_url: nil, return_url: nil); end - end - class AccountUpdate < Stripe::RequestParams - # Open Enum. A v2/account can be configured to enable certain functionality. The configuration param targets the v2/account_link to collect information for the specified v2/account configuration/s. - sig { returns(T::Array[String]) } - attr_accessor :configurations - # The URL the user will be redirected to if the AccountLink is expired, has been used, or is otherwise invalid. The URL you specify should attempt to generate a new AccountLink with the same parameters used to create the original AccountLink, then redirect the user to the new AccountLink’s URL so they can continue the flow. If a new AccountLink cannot be generated or the redirect fails you should display a useful error to the user. Please make sure to implement authentication before redirecting the user in case this URL is leaked to a third party. - sig { returns(String) } - attr_accessor :refresh_url - # The URL that the user will be redirected to upon completing the linked flow. - sig { returns(T.nilable(String)) } - attr_accessor :return_url - sig { - params(configurations: T::Array[String], refresh_url: String, return_url: T.nilable(String)).void - } - def initialize(configurations: nil, refresh_url: nil, return_url: nil); end - end - # Open Enum. The type of AccountLink the user is requesting. - sig { returns(String) } - attr_accessor :type - # Indicates that the AccountLink provided should onboard an account. - sig { - returns(T.nilable(::Stripe::V2::Core::AccountLinkService::CreateParams::UseCase::AccountOnboarding)) - } - attr_accessor :account_onboarding - # Indicates that the AccountLink provided should update a previously onboarded account. - sig { - returns(T.nilable(::Stripe::V2::Core::AccountLinkService::CreateParams::UseCase::AccountUpdate)) - } - attr_accessor :account_update - sig { - params(type: String, account_onboarding: T.nilable(::Stripe::V2::Core::AccountLinkService::CreateParams::UseCase::AccountOnboarding), account_update: T.nilable(::Stripe::V2::Core::AccountLinkService::CreateParams::UseCase::AccountUpdate)).void - } - def initialize(type: nil, account_onboarding: nil, account_update: nil); end - end - # The ID of the Account to create link for. - sig { returns(String) } - attr_accessor :account - # The use case of the AccountLink. - sig { returns(::Stripe::V2::Core::AccountLinkService::CreateParams::UseCase) } - attr_accessor :use_case - sig { - params(account: String, use_case: ::Stripe::V2::Core::AccountLinkService::CreateParams::UseCase).void - } - def initialize(account: nil, use_case: nil); end - end - # Creates an AccountLink object that includes a single-use Stripe URL that the merchant can redirect their user to in order to take them to a Stripe-hosted application such as Recipient Onboarding. - sig { - params(params: T.any(::Stripe::V2::Core::AccountLinkService::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::V2::Core::AccountLink) - } - def create(params = {}, opts = {}); end - end - end - end -end -# typed: true module Stripe module V2 module Core class EventDestinationService < StripeService + class ListParams < Stripe::RequestParams + # Additional fields to include in the response. Currently supports `webhook_endpoint.url`. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :include + # The page size. + sig { returns(T.nilable(Integer)) } + attr_accessor :limit + sig { params(include: T.nilable(T::Array[String]), limit: T.nilable(Integer)).void } + def initialize(include: nil, limit: nil); end + end class CreateParams < Stripe::RequestParams class AmazonEventbridge < Stripe::RequestParams # The AWS account ID. @@ -191999,19 +192162,6 @@ module Stripe ); end end class DeleteParams < Stripe::RequestParams; end - class DisableParams < Stripe::RequestParams; end - class EnableParams < Stripe::RequestParams; end - class ListParams < Stripe::RequestParams - # Additional fields to include in the response. Currently supports `webhook_endpoint.url`. - sig { returns(T.nilable(T::Array[String])) } - attr_accessor :include - # The page size. - sig { returns(T.nilable(Integer)) } - attr_accessor :limit - sig { params(include: T.nilable(T::Array[String]), limit: T.nilable(Integer)).void } - def initialize(include: nil, limit: nil); end - end - class PingParams < Stripe::RequestParams; end class RetrieveParams < Stripe::RequestParams # Additional fields to include in the response. sig { returns(T.nilable(T::Array[String])) } @@ -192059,6 +192209,9 @@ module Stripe webhook_endpoint: nil ); end end + class DisableParams < Stripe::RequestParams; end + class EnableParams < Stripe::RequestParams; end + class PingParams < Stripe::RequestParams; end # Create a new event destination. sig { params(params: T.any(::Stripe::V2::Core::EventDestinationService::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::V2::EventDestination) @@ -192160,8 +192313,6 @@ module Stripe module Core module Vault class GbBankAccountService < StripeService - class AcknowledgeConfirmationOfPayeeParams < Stripe::RequestParams; end - class ArchiveParams < Stripe::RequestParams; end class CreateParams < Stripe::RequestParams class ConfirmationOfPayee < Stripe::RequestParams # The business type to be checked against. Legal entity information will be used if unspecified. @@ -192205,6 +192356,9 @@ module Stripe sort_code: nil ); end end + class RetrieveParams < Stripe::RequestParams; end + class AcknowledgeConfirmationOfPayeeParams < Stripe::RequestParams; end + class ArchiveParams < Stripe::RequestParams; end class InitiateConfirmationOfPayeeParams < Stripe::RequestParams # The business type to be checked against. Legal entity information will be used if unspecified. sig { returns(T.nilable(String)) } @@ -192215,7 +192369,6 @@ module Stripe sig { params(business_type: T.nilable(String), name: T.nilable(String)).void } def initialize(business_type: nil, name: nil); end end - class RetrieveParams < Stripe::RequestParams; end # Confirm that you have received the result of the Confirmation of Payee request, and that you are okay with # proceeding to pay out to this bank account despite the account not matching, partially matching, or the service # being unavailable. Once you confirm this, you will be able to send OutboundPayments, but this may lead to @@ -192263,7 +192416,6 @@ module Stripe module Core module Vault class UsBankAccountService < StripeService - class ArchiveParams < Stripe::RequestParams; end class CreateParams < Stripe::RequestParams # The account number of the bank account. sig { returns(String) } @@ -192300,6 +192452,7 @@ module Stripe } def initialize(fedwire_routing_number: nil, routing_number: nil); end end + class ArchiveParams < Stripe::RequestParams; end # Archive a USBankAccount object. USBankAccount objects will not be automatically archived by Stripe. # Archived USBankAccount objects cannot be used as outbound destinations # and will not appear in the outbound destination list. @@ -192348,16 +192501,16 @@ module Stripe attr_reader :financial_accounts attr_reader :financial_addresses attr_reader :inbound_transfers - attr_reader :outbound_payments attr_reader :outbound_payment_quotes - attr_reader :outbound_transfers + attr_reader :outbound_payments attr_reader :outbound_setup_intents + attr_reader :outbound_transfers attr_reader :payout_methods attr_reader :payout_methods_bank_account_spec attr_reader :received_credits attr_reader :received_debits - attr_reader :transactions attr_reader :transaction_entries + attr_reader :transactions end end end @@ -192455,16 +192608,6 @@ module Stripe module V2 module MoneyManagement class FinancialAddressService < StripeService - class CreateParams < Stripe::RequestParams - # Open Enum. The currency the FinancialAddress should support. Currently, only the `usd` and `gbp` values are supported. - sig { returns(String) } - attr_accessor :currency - # The ID of the FinancialAccount the new FinancialAddress should be associated with. - sig { returns(String) } - attr_accessor :financial_account - sig { params(currency: String, financial_account: String).void } - def initialize(currency: nil, financial_account: nil); end - end class ListParams < Stripe::RequestParams # The ID of the FinancialAccount for which FinancialAddresses are to be returned. sig { returns(T.nilable(String)) } @@ -192480,6 +192623,16 @@ module Stripe } def initialize(financial_account: nil, include: nil, limit: nil); end end + class CreateParams < Stripe::RequestParams + # Open Enum. The currency the FinancialAddress should support. Currently, only the `usd` and `gbp` values are supported. + sig { returns(String) } + attr_accessor :currency + # The ID of the FinancialAccount the new FinancialAddress should be associated with. + sig { returns(String) } + attr_accessor :financial_account + sig { params(currency: String, financial_account: String).void } + def initialize(currency: nil, financial_account: nil); end + end class RetrieveParams < Stripe::RequestParams # Open Enum. A list of fields to reveal in the FinancialAddresses returned. sig { returns(T.nilable(T::Array[String])) } @@ -192516,6 +192669,42 @@ module Stripe module V2 module MoneyManagement class InboundTransferService < StripeService + class ListParams < Stripe::RequestParams + # Filter for objects created at the specified timestamp. + # Must be an RFC 3339 date & time value, for example: 2022-09-18T13:22:00Z. + sig { returns(T.nilable(String)) } + attr_accessor :created + # Filter for objects created after the specified timestamp. + # Must be an RFC 3339 date & time value, for example: 2022-09-18T13:22:00Z. + sig { returns(T.nilable(String)) } + attr_accessor :created_gt + # Filter for objects created on or after the specified timestamp. + # Must be an RFC 3339 date & time value, for example: 2022-09-18T13:22:00Z. + sig { returns(T.nilable(String)) } + attr_accessor :created_gte + # Filter for objects created before the specified timestamp. + # Must be an RFC 3339 date & time value, for example: 2022-09-18T13:22:00Z. + sig { returns(T.nilable(String)) } + attr_accessor :created_lt + # Filter for objects created on or before the specified timestamp. + # Must be an RFC 3339 date & time value, for example: 2022-09-18T13:22:00Z. + sig { returns(T.nilable(String)) } + attr_accessor :created_lte + # The page limit. + sig { returns(T.nilable(Integer)) } + attr_accessor :limit + sig { + params(created: T.nilable(String), created_gt: T.nilable(String), created_gte: T.nilable(String), created_lt: T.nilable(String), created_lte: T.nilable(String), limit: T.nilable(Integer)).void + } + def initialize( + created: nil, + created_gt: nil, + created_gte: nil, + created_lt: nil, + created_lte: nil, + limit: nil + ); end + end class CreateParams < Stripe::RequestParams class From < Stripe::RequestParams # An optional currency field used to specify which currency is debited from the Payment Method. @@ -192555,42 +192744,6 @@ module Stripe } def initialize(amount: nil, description: nil, from: nil, to: nil); end end - class ListParams < Stripe::RequestParams - # Filter for objects created at the specified timestamp. - # Must be an RFC 3339 date & time value, for example: 2022-09-18T13:22:00Z. - sig { returns(T.nilable(String)) } - attr_accessor :created - # Filter for objects created after the specified timestamp. - # Must be an RFC 3339 date & time value, for example: 2022-09-18T13:22:00Z. - sig { returns(T.nilable(String)) } - attr_accessor :created_gt - # Filter for objects created on or after the specified timestamp. - # Must be an RFC 3339 date & time value, for example: 2022-09-18T13:22:00Z. - sig { returns(T.nilable(String)) } - attr_accessor :created_gte - # Filter for objects created before the specified timestamp. - # Must be an RFC 3339 date & time value, for example: 2022-09-18T13:22:00Z. - sig { returns(T.nilable(String)) } - attr_accessor :created_lt - # Filter for objects created on or before the specified timestamp. - # Must be an RFC 3339 date & time value, for example: 2022-09-18T13:22:00Z. - sig { returns(T.nilable(String)) } - attr_accessor :created_lte - # The page limit. - sig { returns(T.nilable(Integer)) } - attr_accessor :limit - sig { - params(created: T.nilable(String), created_gt: T.nilable(String), created_gte: T.nilable(String), created_lt: T.nilable(String), created_lte: T.nilable(String), limit: T.nilable(Integer)).void - } - def initialize( - created: nil, - created_gt: nil, - created_gte: nil, - created_lt: nil, - created_lte: nil, - limit: nil - ); end - end class RetrieveParams < Stripe::RequestParams; end # InboundTransfers APIs are used to create, retrieve or list InboundTransfers. # @@ -192616,181 +192769,6 @@ module Stripe end end # typed: true -module Stripe - module V2 - module MoneyManagement - class OutboundPaymentService < StripeService - class CancelParams < Stripe::RequestParams; end - class CreateParams < Stripe::RequestParams - class DeliveryOptions < Stripe::RequestParams - # Open Enum. Method for bank account. - sig { returns(T.nilable(String)) } - attr_accessor :bank_account - sig { params(bank_account: T.nilable(String)).void } - def initialize(bank_account: nil); end - end - class From < Stripe::RequestParams - # Describes the FinancialAmount's currency drawn from. - sig { returns(String) } - attr_accessor :currency - # The FinancialAccount that funds were pulled from. - sig { returns(String) } - attr_accessor :financial_account - sig { params(currency: String, financial_account: String).void } - def initialize(currency: nil, financial_account: nil); end - end - class RecipientNotification < Stripe::RequestParams - # Closed Enum. Configuration option to enable or disable notifications to recipients. - # Do not send notifications when setting is NONE. Default to account setting when setting is CONFIGURED or not set. - sig { returns(String) } - attr_accessor :setting - sig { params(setting: String).void } - def initialize(setting: nil); end - end - class To < Stripe::RequestParams - # Describes the currency to send to the recipient. - # If included, this currency must match a currency supported by the destination. - # Can be omitted in the following cases: - # - destination only supports one currency - # - destination supports multiple currencies and one of the currencies matches the FA currency - # - destination supports multiple currencies and one of the currencies matches the presentment currency - # Note - when both FA currency and presentment currency are supported, we pick the FA currency to minimize FX. - sig { returns(T.nilable(String)) } - attr_accessor :currency - # The payout method which the OutboundPayment uses to send payout. - sig { returns(T.nilable(String)) } - attr_accessor :payout_method - # To which account the OutboundPayment is sent. - sig { returns(String) } - attr_accessor :recipient - sig { - params(currency: T.nilable(String), payout_method: T.nilable(String), recipient: String).void - } - def initialize(currency: nil, payout_method: nil, recipient: nil); end - end - # The "presentment amount" to be sent to the recipient. - sig { returns(Stripe::V2::Amount) } - attr_accessor :amount - # Delivery options to be used to send the OutboundPayment. - sig { - returns(T.nilable(::Stripe::V2::MoneyManagement::OutboundPaymentService::CreateParams::DeliveryOptions)) - } - attr_accessor :delivery_options - # An arbitrary string attached to the OutboundPayment. Often useful for displaying to users. - sig { returns(T.nilable(String)) } - attr_accessor :description - # From which FinancialAccount and BalanceType to pull funds from. - sig { returns(::Stripe::V2::MoneyManagement::OutboundPaymentService::CreateParams::From) } - attr_accessor :from - # Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. - sig { returns(T.nilable(T::Hash[String, String])) } - attr_accessor :metadata - # The quote for this OutboundPayment. Only required for countries with regulatory mandates to display fee estimates before OutboundPayment creation. - sig { returns(T.nilable(String)) } - attr_accessor :outbound_payment_quote - # Details about the notification settings for the OutboundPayment recipient. - sig { - returns(T.nilable(::Stripe::V2::MoneyManagement::OutboundPaymentService::CreateParams::RecipientNotification)) - } - attr_accessor :recipient_notification - # To which payout method to send the OutboundPayment. - sig { returns(::Stripe::V2::MoneyManagement::OutboundPaymentService::CreateParams::To) } - attr_accessor :to - sig { - params(amount: Stripe::V2::Amount, delivery_options: T.nilable(::Stripe::V2::MoneyManagement::OutboundPaymentService::CreateParams::DeliveryOptions), description: T.nilable(String), from: ::Stripe::V2::MoneyManagement::OutboundPaymentService::CreateParams::From, metadata: T.nilable(T::Hash[String, String]), outbound_payment_quote: T.nilable(String), recipient_notification: T.nilable(::Stripe::V2::MoneyManagement::OutboundPaymentService::CreateParams::RecipientNotification), to: ::Stripe::V2::MoneyManagement::OutboundPaymentService::CreateParams::To).void - } - def initialize( - amount: nil, - delivery_options: nil, - description: nil, - from: nil, - metadata: nil, - outbound_payment_quote: nil, - recipient_notification: nil, - to: nil - ); end - end - class ListParams < Stripe::RequestParams - # Filter for objects created at the specified timestamp. - # Must be an RFC 3339 date & time value, for example: 2022-09-18T13:22:00Z. - sig { returns(T.nilable(String)) } - attr_accessor :created - # Filter for objects created after the specified timestamp. - # Must be an RFC 3339 date & time value, for example: 2022-09-18T13:22:00Z. - sig { returns(T.nilable(String)) } - attr_accessor :created_gt - # Filter for objects created on or after the specified timestamp. - # Must be an RFC 3339 date & time value, for example: 2022-09-18T13:22:00Z. - sig { returns(T.nilable(String)) } - attr_accessor :created_gte - # Filter for objects created before the specified timestamp. - # Must be an RFC 3339 date & time value, for example: 2022-09-18T13:22:00Z. - sig { returns(T.nilable(String)) } - attr_accessor :created_lt - # Filter for objects created on or before the specified timestamp. - # Must be an RFC 3339 date & time value, for example: 2022-09-18T13:22:00Z. - sig { returns(T.nilable(String)) } - attr_accessor :created_lte - # The maximum number of results to return. - sig { returns(T.nilable(Integer)) } - attr_accessor :limit - # Only return OutboundPayments sent to this recipient. - sig { returns(T.nilable(String)) } - attr_accessor :recipient - # Closed Enum. Only return OutboundPayments with this status. - sig { returns(T.nilable(T::Array[String])) } - attr_accessor :status - sig { - params(created: T.nilable(String), created_gt: T.nilable(String), created_gte: T.nilable(String), created_lt: T.nilable(String), created_lte: T.nilable(String), limit: T.nilable(Integer), recipient: T.nilable(String), status: T.nilable(T::Array[String])).void - } - def initialize( - created: nil, - created_gt: nil, - created_gte: nil, - created_lt: nil, - created_lte: nil, - limit: nil, - recipient: nil, - status: nil - ); end - end - class RetrieveParams < Stripe::RequestParams; end - # Cancels an OutboundPayment. Only processing OutboundPayments can be canceled. - # - # ** raises AlreadyCanceledError - # ** raises NotCancelableError - sig { - params(id: String, params: T.any(::Stripe::V2::MoneyManagement::OutboundPaymentService::CancelParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::V2::MoneyManagement::OutboundPayment) - } - def cancel(id, params = {}, opts = {}); end - - # Creates an OutboundPayment. - # - # ** raises InsufficientFundsError - # ** raises QuotaExceededError - # ** raises RecipientNotNotifiableError - # ** raises FeatureNotEnabledError - sig { - params(params: T.any(::Stripe::V2::MoneyManagement::OutboundPaymentService::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::V2::MoneyManagement::OutboundPayment) - } - def create(params = {}, opts = {}); end - - # Returns a list of OutboundPayments that match the provided filters. - sig { - params(params: T.any(::Stripe::V2::MoneyManagement::OutboundPaymentService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::V2::ListObject) - } - def list(params = {}, opts = {}); end - - # Retrieves the details of an existing OutboundPayment by passing the unique OutboundPayment ID from either the OutboundPayment create or list response. - sig { - params(id: String, params: T.any(::Stripe::V2::MoneyManagement::OutboundPaymentService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::V2::MoneyManagement::OutboundPayment) - } - def retrieve(id, params = {}, opts = {}); end - end - end - end -end -# typed: true module Stripe module V2 module MoneyManagement @@ -192879,76 +192857,7 @@ end module Stripe module V2 module MoneyManagement - class OutboundTransferService < StripeService - class CancelParams < Stripe::RequestParams; end - class CreateParams < Stripe::RequestParams - class DeliveryOptions < Stripe::RequestParams - # Open Enum. Method for bank account. - sig { returns(T.nilable(String)) } - attr_accessor :bank_account - sig { params(bank_account: T.nilable(String)).void } - def initialize(bank_account: nil); end - end - class From < Stripe::RequestParams - # Describes the FinancialAmount's currency drawn from. - sig { returns(String) } - attr_accessor :currency - # The FinancialAccount that funds were pulled from. - sig { returns(String) } - attr_accessor :financial_account - sig { params(currency: String, financial_account: String).void } - def initialize(currency: nil, financial_account: nil); end - end - class To < Stripe::RequestParams - # Describes the currency to send to the recipient. - # If included, this currency must match a currency supported by the destination. - # Can be omitted in the following cases: - # - destination only supports one currency - # - destination supports multiple currencies and one of the currencies matches the FA currency - # - destination supports multiple currencies and one of the currencies matches the presentment currency - # Note - when both FA currency and presentment currency are supported, we pick the FA currency to minimize FX. - sig { returns(T.nilable(String)) } - attr_accessor :currency - # The payout method which the OutboundTransfer uses to send payout. - sig { returns(String) } - attr_accessor :payout_method - sig { params(currency: T.nilable(String), payout_method: String).void } - def initialize(currency: nil, payout_method: nil); end - end - # The "presentment amount" for the OutboundPayment. - sig { returns(Stripe::V2::Amount) } - attr_accessor :amount - # Delivery options to be used to send the OutboundTransfer. - sig { - returns(T.nilable(::Stripe::V2::MoneyManagement::OutboundTransferService::CreateParams::DeliveryOptions)) - } - attr_accessor :delivery_options - # An arbitrary string attached to the OutboundTransfer. Often useful for displaying to users. - sig { returns(T.nilable(String)) } - attr_accessor :description - # The FinancialAccount to pull funds from. - sig { - returns(::Stripe::V2::MoneyManagement::OutboundTransferService::CreateParams::From) - } - attr_accessor :from - # Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. - sig { returns(T.nilable(T::Hash[String, String])) } - attr_accessor :metadata - # To which payout method to send the OutboundTransfer. - sig { returns(::Stripe::V2::MoneyManagement::OutboundTransferService::CreateParams::To) } - attr_accessor :to - sig { - params(amount: Stripe::V2::Amount, delivery_options: T.nilable(::Stripe::V2::MoneyManagement::OutboundTransferService::CreateParams::DeliveryOptions), description: T.nilable(String), from: ::Stripe::V2::MoneyManagement::OutboundTransferService::CreateParams::From, metadata: T.nilable(T::Hash[String, String]), to: ::Stripe::V2::MoneyManagement::OutboundTransferService::CreateParams::To).void - } - def initialize( - amount: nil, - delivery_options: nil, - description: nil, - from: nil, - metadata: nil, - to: nil - ); end - end + class OutboundPaymentService < StripeService class ListParams < Stripe::RequestParams # Filter for objects created at the specified timestamp. # Must be an RFC 3339 date & time value, for example: 2022-09-18T13:22:00Z. @@ -192973,11 +192882,14 @@ module Stripe # The maximum number of results to return. sig { returns(T.nilable(Integer)) } attr_accessor :limit - # Closed Enum. Only return OutboundTransfers with this status. + # Only return OutboundPayments sent to this recipient. + sig { returns(T.nilable(String)) } + attr_accessor :recipient + # Closed Enum. Only return OutboundPayments with this status. sig { returns(T.nilable(T::Array[String])) } attr_accessor :status sig { - params(created: T.nilable(String), created_gt: T.nilable(String), created_gte: T.nilable(String), created_lt: T.nilable(String), created_lte: T.nilable(String), limit: T.nilable(Integer), status: T.nilable(T::Array[String])).void + params(created: T.nilable(String), created_gt: T.nilable(String), created_gte: T.nilable(String), created_lt: T.nilable(String), created_lte: T.nilable(String), limit: T.nilable(Integer), recipient: T.nilable(String), status: T.nilable(T::Array[String])).void } def initialize( created: nil, @@ -192986,37 +192898,130 @@ module Stripe created_lt: nil, created_lte: nil, limit: nil, + recipient: nil, status: nil ); end end + class CreateParams < Stripe::RequestParams + class DeliveryOptions < Stripe::RequestParams + # Open Enum. Method for bank account. + sig { returns(T.nilable(String)) } + attr_accessor :bank_account + sig { params(bank_account: T.nilable(String)).void } + def initialize(bank_account: nil); end + end + class From < Stripe::RequestParams + # Describes the FinancialAmount's currency drawn from. + sig { returns(String) } + attr_accessor :currency + # The FinancialAccount that funds were pulled from. + sig { returns(String) } + attr_accessor :financial_account + sig { params(currency: String, financial_account: String).void } + def initialize(currency: nil, financial_account: nil); end + end + class RecipientNotification < Stripe::RequestParams + # Closed Enum. Configuration option to enable or disable notifications to recipients. + # Do not send notifications when setting is NONE. Default to account setting when setting is CONFIGURED or not set. + sig { returns(String) } + attr_accessor :setting + sig { params(setting: String).void } + def initialize(setting: nil); end + end + class To < Stripe::RequestParams + # Describes the currency to send to the recipient. + # If included, this currency must match a currency supported by the destination. + # Can be omitted in the following cases: + # - destination only supports one currency + # - destination supports multiple currencies and one of the currencies matches the FA currency + # - destination supports multiple currencies and one of the currencies matches the presentment currency + # Note - when both FA currency and presentment currency are supported, we pick the FA currency to minimize FX. + sig { returns(T.nilable(String)) } + attr_accessor :currency + # The payout method which the OutboundPayment uses to send payout. + sig { returns(T.nilable(String)) } + attr_accessor :payout_method + # To which account the OutboundPayment is sent. + sig { returns(String) } + attr_accessor :recipient + sig { + params(currency: T.nilable(String), payout_method: T.nilable(String), recipient: String).void + } + def initialize(currency: nil, payout_method: nil, recipient: nil); end + end + # The "presentment amount" to be sent to the recipient. + sig { returns(Stripe::V2::Amount) } + attr_accessor :amount + # Delivery options to be used to send the OutboundPayment. + sig { + returns(T.nilable(::Stripe::V2::MoneyManagement::OutboundPaymentService::CreateParams::DeliveryOptions)) + } + attr_accessor :delivery_options + # An arbitrary string attached to the OutboundPayment. Often useful for displaying to users. + sig { returns(T.nilable(String)) } + attr_accessor :description + # From which FinancialAccount and BalanceType to pull funds from. + sig { returns(::Stripe::V2::MoneyManagement::OutboundPaymentService::CreateParams::From) } + attr_accessor :from + # Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + sig { returns(T.nilable(T::Hash[String, String])) } + attr_accessor :metadata + # The quote for this OutboundPayment. Only required for countries with regulatory mandates to display fee estimates before OutboundPayment creation. + sig { returns(T.nilable(String)) } + attr_accessor :outbound_payment_quote + # Details about the notification settings for the OutboundPayment recipient. + sig { + returns(T.nilable(::Stripe::V2::MoneyManagement::OutboundPaymentService::CreateParams::RecipientNotification)) + } + attr_accessor :recipient_notification + # To which payout method to send the OutboundPayment. + sig { returns(::Stripe::V2::MoneyManagement::OutboundPaymentService::CreateParams::To) } + attr_accessor :to + sig { + params(amount: Stripe::V2::Amount, delivery_options: T.nilable(::Stripe::V2::MoneyManagement::OutboundPaymentService::CreateParams::DeliveryOptions), description: T.nilable(String), from: ::Stripe::V2::MoneyManagement::OutboundPaymentService::CreateParams::From, metadata: T.nilable(T::Hash[String, String]), outbound_payment_quote: T.nilable(String), recipient_notification: T.nilable(::Stripe::V2::MoneyManagement::OutboundPaymentService::CreateParams::RecipientNotification), to: ::Stripe::V2::MoneyManagement::OutboundPaymentService::CreateParams::To).void + } + def initialize( + amount: nil, + delivery_options: nil, + description: nil, + from: nil, + metadata: nil, + outbound_payment_quote: nil, + recipient_notification: nil, + to: nil + ); end + end class RetrieveParams < Stripe::RequestParams; end - # Cancels an OutboundTransfer. Only processing OutboundTransfers can be canceled. + class CancelParams < Stripe::RequestParams; end + # Cancels an OutboundPayment. Only processing OutboundPayments can be canceled. # # ** raises AlreadyCanceledError # ** raises NotCancelableError sig { - params(id: String, params: T.any(::Stripe::V2::MoneyManagement::OutboundTransferService::CancelParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::V2::MoneyManagement::OutboundTransfer) + params(id: String, params: T.any(::Stripe::V2::MoneyManagement::OutboundPaymentService::CancelParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::V2::MoneyManagement::OutboundPayment) } def cancel(id, params = {}, opts = {}); end - # Creates an OutboundTransfer. + # Creates an OutboundPayment. # # ** raises InsufficientFundsError + # ** raises QuotaExceededError + # ** raises RecipientNotNotifiableError # ** raises FeatureNotEnabledError sig { - params(params: T.any(::Stripe::V2::MoneyManagement::OutboundTransferService::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::V2::MoneyManagement::OutboundTransfer) + params(params: T.any(::Stripe::V2::MoneyManagement::OutboundPaymentService::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::V2::MoneyManagement::OutboundPayment) } def create(params = {}, opts = {}); end - # Returns a list of OutboundTransfers that match the provided filters. + # Returns a list of OutboundPayments that match the provided filters. sig { - params(params: T.any(::Stripe::V2::MoneyManagement::OutboundTransferService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::V2::ListObject) + params(params: T.any(::Stripe::V2::MoneyManagement::OutboundPaymentService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::V2::ListObject) } def list(params = {}, opts = {}); end - # Retrieves the details of an existing OutboundTransfer by passing the unique OutboundTransfer ID from either the OutboundPayment create or list response. + # Retrieves the details of an existing OutboundPayment by passing the unique OutboundPayment ID from either the OutboundPayment create or list response. sig { - params(id: String, params: T.any(::Stripe::V2::MoneyManagement::OutboundTransferService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::V2::MoneyManagement::OutboundTransfer) + params(id: String, params: T.any(::Stripe::V2::MoneyManagement::OutboundPaymentService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::V2::MoneyManagement::OutboundPayment) } def retrieve(id, params = {}, opts = {}); end end @@ -193028,7 +193033,13 @@ module Stripe module V2 module MoneyManagement class OutboundSetupIntentService < StripeService - class CancelParams < Stripe::RequestParams; end + class ListParams < Stripe::RequestParams + # The page size. + sig { returns(T.nilable(Integer)) } + attr_accessor :limit + sig { params(limit: T.nilable(Integer)).void } + def initialize(limit: nil); end + end class CreateParams < Stripe::RequestParams class PayoutMethodData < Stripe::RequestParams class BankAccount < Stripe::RequestParams @@ -193112,13 +193123,6 @@ module Stripe } def initialize(payout_method: nil, payout_method_data: nil, usage_intent: nil); end end - class ListParams < Stripe::RequestParams - # The page size. - sig { returns(T.nilable(Integer)) } - attr_accessor :limit - sig { params(limit: T.nilable(Integer)).void } - def initialize(limit: nil); end - end class RetrieveParams < Stripe::RequestParams; end class UpdateParams < Stripe::RequestParams class PayoutMethodData < Stripe::RequestParams @@ -193200,6 +193204,7 @@ module Stripe } def initialize(payout_method: nil, payout_method_data: nil); end end + class CancelParams < Stripe::RequestParams; end # Cancel an OutboundSetupIntent object. sig { params(id: String, params: T.any(::Stripe::V2::MoneyManagement::OutboundSetupIntentService::CancelParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::V2::MoneyManagement::OutboundSetupIntent) @@ -193242,11 +193247,158 @@ module Stripe end end # typed: true +module Stripe + module V2 + module MoneyManagement + class OutboundTransferService < StripeService + class ListParams < Stripe::RequestParams + # Filter for objects created at the specified timestamp. + # Must be an RFC 3339 date & time value, for example: 2022-09-18T13:22:00Z. + sig { returns(T.nilable(String)) } + attr_accessor :created + # Filter for objects created after the specified timestamp. + # Must be an RFC 3339 date & time value, for example: 2022-09-18T13:22:00Z. + sig { returns(T.nilable(String)) } + attr_accessor :created_gt + # Filter for objects created on or after the specified timestamp. + # Must be an RFC 3339 date & time value, for example: 2022-09-18T13:22:00Z. + sig { returns(T.nilable(String)) } + attr_accessor :created_gte + # Filter for objects created before the specified timestamp. + # Must be an RFC 3339 date & time value, for example: 2022-09-18T13:22:00Z. + sig { returns(T.nilable(String)) } + attr_accessor :created_lt + # Filter for objects created on or before the specified timestamp. + # Must be an RFC 3339 date & time value, for example: 2022-09-18T13:22:00Z. + sig { returns(T.nilable(String)) } + attr_accessor :created_lte + # The maximum number of results to return. + sig { returns(T.nilable(Integer)) } + attr_accessor :limit + # Closed Enum. Only return OutboundTransfers with this status. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :status + sig { + params(created: T.nilable(String), created_gt: T.nilable(String), created_gte: T.nilable(String), created_lt: T.nilable(String), created_lte: T.nilable(String), limit: T.nilable(Integer), status: T.nilable(T::Array[String])).void + } + def initialize( + created: nil, + created_gt: nil, + created_gte: nil, + created_lt: nil, + created_lte: nil, + limit: nil, + status: nil + ); end + end + class CreateParams < Stripe::RequestParams + class DeliveryOptions < Stripe::RequestParams + # Open Enum. Method for bank account. + sig { returns(T.nilable(String)) } + attr_accessor :bank_account + sig { params(bank_account: T.nilable(String)).void } + def initialize(bank_account: nil); end + end + class From < Stripe::RequestParams + # Describes the FinancialAmount's currency drawn from. + sig { returns(String) } + attr_accessor :currency + # The FinancialAccount that funds were pulled from. + sig { returns(String) } + attr_accessor :financial_account + sig { params(currency: String, financial_account: String).void } + def initialize(currency: nil, financial_account: nil); end + end + class To < Stripe::RequestParams + # Describes the currency to send to the recipient. + # If included, this currency must match a currency supported by the destination. + # Can be omitted in the following cases: + # - destination only supports one currency + # - destination supports multiple currencies and one of the currencies matches the FA currency + # - destination supports multiple currencies and one of the currencies matches the presentment currency + # Note - when both FA currency and presentment currency are supported, we pick the FA currency to minimize FX. + sig { returns(T.nilable(String)) } + attr_accessor :currency + # The payout method which the OutboundTransfer uses to send payout. + sig { returns(String) } + attr_accessor :payout_method + sig { params(currency: T.nilable(String), payout_method: String).void } + def initialize(currency: nil, payout_method: nil); end + end + # The "presentment amount" for the OutboundPayment. + sig { returns(Stripe::V2::Amount) } + attr_accessor :amount + # Delivery options to be used to send the OutboundTransfer. + sig { + returns(T.nilable(::Stripe::V2::MoneyManagement::OutboundTransferService::CreateParams::DeliveryOptions)) + } + attr_accessor :delivery_options + # An arbitrary string attached to the OutboundTransfer. Often useful for displaying to users. + sig { returns(T.nilable(String)) } + attr_accessor :description + # The FinancialAccount to pull funds from. + sig { + returns(::Stripe::V2::MoneyManagement::OutboundTransferService::CreateParams::From) + } + attr_accessor :from + # Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + sig { returns(T.nilable(T::Hash[String, String])) } + attr_accessor :metadata + # To which payout method to send the OutboundTransfer. + sig { returns(::Stripe::V2::MoneyManagement::OutboundTransferService::CreateParams::To) } + attr_accessor :to + sig { + params(amount: Stripe::V2::Amount, delivery_options: T.nilable(::Stripe::V2::MoneyManagement::OutboundTransferService::CreateParams::DeliveryOptions), description: T.nilable(String), from: ::Stripe::V2::MoneyManagement::OutboundTransferService::CreateParams::From, metadata: T.nilable(T::Hash[String, String]), to: ::Stripe::V2::MoneyManagement::OutboundTransferService::CreateParams::To).void + } + def initialize( + amount: nil, + delivery_options: nil, + description: nil, + from: nil, + metadata: nil, + to: nil + ); end + end + class RetrieveParams < Stripe::RequestParams; end + class CancelParams < Stripe::RequestParams; end + # Cancels an OutboundTransfer. Only processing OutboundTransfers can be canceled. + # + # ** raises AlreadyCanceledError + # ** raises NotCancelableError + sig { + params(id: String, params: T.any(::Stripe::V2::MoneyManagement::OutboundTransferService::CancelParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::V2::MoneyManagement::OutboundTransfer) + } + def cancel(id, params = {}, opts = {}); end + + # Creates an OutboundTransfer. + # + # ** raises InsufficientFundsError + # ** raises FeatureNotEnabledError + sig { + params(params: T.any(::Stripe::V2::MoneyManagement::OutboundTransferService::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::V2::MoneyManagement::OutboundTransfer) + } + def create(params = {}, opts = {}); end + + # Returns a list of OutboundTransfers that match the provided filters. + sig { + params(params: T.any(::Stripe::V2::MoneyManagement::OutboundTransferService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::V2::ListObject) + } + def list(params = {}, opts = {}); end + + # Retrieves the details of an existing OutboundTransfer by passing the unique OutboundTransfer ID from either the OutboundPayment create or list response. + sig { + params(id: String, params: T.any(::Stripe::V2::MoneyManagement::OutboundTransferService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::V2::MoneyManagement::OutboundTransfer) + } + def retrieve(id, params = {}, opts = {}); end + end + end + end +end +# typed: true module Stripe module V2 module MoneyManagement class PayoutMethodService < StripeService - class ArchiveParams < Stripe::RequestParams; end class ListParams < Stripe::RequestParams class UsageStatus < Stripe::RequestParams # List of payments status to filter by. @@ -193274,6 +193426,7 @@ module Stripe def initialize(limit: nil, usage_status: nil); end end class RetrieveParams < Stripe::RequestParams; end + class ArchiveParams < Stripe::RequestParams; end class UnarchiveParams < Stripe::RequestParams; end # Archive a PayoutMethod object. Archived objects cannot be used as payout methods # and will not appear in the payout method list. @@ -193420,6 +193573,62 @@ module Stripe end end # typed: true +module Stripe + module V2 + module MoneyManagement + class TransactionEntryService < StripeService + class ListParams < Stripe::RequestParams + # Filter for Transactions created at an exact time. + sig { returns(T.nilable(String)) } + attr_accessor :created + # Filter for Transactions created after the specified timestamp. + sig { returns(T.nilable(String)) } + attr_accessor :created_gt + # Filter for Transactions created at or after the specified timestamp. + sig { returns(T.nilable(String)) } + attr_accessor :created_gte + # Filter for Transactions created before the specified timestamp. + sig { returns(T.nilable(String)) } + attr_accessor :created_lt + # Filter for Transactions created at or before the specified timestamp. + sig { returns(T.nilable(String)) } + attr_accessor :created_lte + # The page limit. + sig { returns(T.nilable(Integer)) } + attr_accessor :limit + # Filter for TransactionEntries belonging to a Transaction. + sig { returns(T.nilable(String)) } + attr_accessor :transaction + sig { + params(created: T.nilable(String), created_gt: T.nilable(String), created_gte: T.nilable(String), created_lt: T.nilable(String), created_lte: T.nilable(String), limit: T.nilable(Integer), transaction: T.nilable(String)).void + } + def initialize( + created: nil, + created_gt: nil, + created_gte: nil, + created_lt: nil, + created_lte: nil, + limit: nil, + transaction: nil + ); end + end + class RetrieveParams < Stripe::RequestParams; end + # Returns a list of TransactionEntries that match the provided filters. + sig { + params(params: T.any(::Stripe::V2::MoneyManagement::TransactionEntryService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::V2::ListObject) + } + def list(params = {}, opts = {}); end + + # Retrieves the details of a TransactionEntry by ID. + sig { + params(id: String, params: T.any(::Stripe::V2::MoneyManagement::TransactionEntryService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::V2::MoneyManagement::TransactionEntry) + } + def retrieve(id, params = {}, opts = {}); end + end + end + end +end +# typed: true module Stripe module V2 module MoneyManagement @@ -193480,259 +193689,6 @@ module Stripe end end # typed: true -module Stripe - module V2 - module MoneyManagement - class TransactionEntryService < StripeService - class ListParams < Stripe::RequestParams - # Filter for Transactions created at an exact time. - sig { returns(T.nilable(String)) } - attr_accessor :created - # Filter for Transactions created after the specified timestamp. - sig { returns(T.nilable(String)) } - attr_accessor :created_gt - # Filter for Transactions created at or after the specified timestamp. - sig { returns(T.nilable(String)) } - attr_accessor :created_gte - # Filter for Transactions created before the specified timestamp. - sig { returns(T.nilable(String)) } - attr_accessor :created_lt - # Filter for Transactions created at or before the specified timestamp. - sig { returns(T.nilable(String)) } - attr_accessor :created_lte - # The page limit. - sig { returns(T.nilable(Integer)) } - attr_accessor :limit - # Filter for TransactionEntries belonging to a Transaction. - sig { returns(T.nilable(String)) } - attr_accessor :transaction - sig { - params(created: T.nilable(String), created_gt: T.nilable(String), created_gte: T.nilable(String), created_lt: T.nilable(String), created_lte: T.nilable(String), limit: T.nilable(Integer), transaction: T.nilable(String)).void - } - def initialize( - created: nil, - created_gt: nil, - created_gte: nil, - created_lt: nil, - created_lte: nil, - limit: nil, - transaction: nil - ); end - end - class RetrieveParams < Stripe::RequestParams; end - # Returns a list of TransactionEntries that match the provided filters. - sig { - params(params: T.any(::Stripe::V2::MoneyManagement::TransactionEntryService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::V2::ListObject) - } - def list(params = {}, opts = {}); end - - # Retrieves the details of a TransactionEntry by ID. - sig { - params(id: String, params: T.any(::Stripe::V2::MoneyManagement::TransactionEntryService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::V2::MoneyManagement::TransactionEntry) - } - def retrieve(id, params = {}, opts = {}); end - end - end - end -end -# typed: true -module Stripe - module V2 - class BillingService < StripeService - attr_reader :meter_event_session - attr_reader :meter_event_adjustments - attr_reader :meter_event_stream - attr_reader :meter_events - end - end -end -# typed: true -module Stripe - module V2 - module Billing - class MeterEventSessionService < StripeService - class CreateParams < Stripe::RequestParams; end - # Creates a meter event session to send usage on the high-throughput meter event stream. Authentication tokens are only valid for 15 minutes, so you will need to create a new meter event session when your token expires. - sig { - params(params: T.any(::Stripe::V2::Billing::MeterEventSessionService::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::V2::Billing::MeterEventSession) - } - def create(params = {}, opts = {}); end - end - end - end -end -# typed: true -module Stripe - module V2 - module Billing - class MeterEventAdjustmentService < StripeService - class CreateParams < Stripe::RequestParams - class Cancel < Stripe::RequestParams - # Unique identifier for the event. You can only cancel events within 24 hours of Stripe receiving them. - sig { returns(String) } - attr_accessor :identifier - sig { params(identifier: String).void } - def initialize(identifier: nil); end - end - # Specifies which event to cancel. - sig { returns(::Stripe::V2::Billing::MeterEventAdjustmentService::CreateParams::Cancel) } - attr_accessor :cancel - # The name of the meter event. Corresponds with the `event_name` field on a meter. - sig { returns(String) } - attr_accessor :event_name - # Specifies whether to cancel a single event or a range of events for a time period. Time period cancellation is not supported yet. - sig { returns(String) } - attr_accessor :type - sig { - params(cancel: ::Stripe::V2::Billing::MeterEventAdjustmentService::CreateParams::Cancel, event_name: String, type: String).void - } - def initialize(cancel: nil, event_name: nil, type: nil); end - end - # Creates a meter event adjustment to cancel a previously sent meter event. - sig { - params(params: T.any(::Stripe::V2::Billing::MeterEventAdjustmentService::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::V2::Billing::MeterEventAdjustment) - } - def create(params = {}, opts = {}); end - end - end - end -end -# typed: true -module Stripe - module V2 - module Billing - class MeterEventStreamService < StripeService - class CreateParams < Stripe::RequestParams - class Event < Stripe::RequestParams - # The name of the meter event. Corresponds with the `event_name` field on a meter. - sig { returns(String) } - attr_accessor :event_name - # A unique identifier for the event. If not provided, one will be generated. - # We recommend using a globally unique identifier for this. We’ll enforce - # uniqueness within a rolling 24 hour period. - sig { returns(T.nilable(String)) } - attr_accessor :identifier - # The payload of the event. This must contain the fields corresponding to a meter’s - # `customer_mapping.event_payload_key` (default is `stripe_customer_id`) and - # `value_settings.event_payload_key` (default is `value`). Read more about - # the - # [payload](https://docs.stripe.com/billing/subscriptions/usage-based/recording-usage#payload-key-overrides). - sig { returns(T::Hash[String, String]) } - attr_accessor :payload - # The time of the event. Must be within the past 35 calendar days or up to - # 5 minutes in the future. Defaults to current timestamp if not specified. - sig { returns(T.nilable(String)) } - attr_accessor :timestamp - sig { - params(event_name: String, identifier: T.nilable(String), payload: T::Hash[String, String], timestamp: T.nilable(String)).void - } - def initialize(event_name: nil, identifier: nil, payload: nil, timestamp: nil); end - end - # List of meter events to include in the request. - sig { - returns(T::Array[::Stripe::V2::Billing::MeterEventStreamService::CreateParams::Event]) - } - attr_accessor :events - sig { - params(events: T::Array[::Stripe::V2::Billing::MeterEventStreamService::CreateParams::Event]).void - } - def initialize(events: nil); end - end - # Creates meter events. Events are processed asynchronously, including validation. Requires a meter event session for authentication. Supports up to 10,000 requests per second in livemode. For even higher rate-limits, contact sales. - # - # ** raises TemporarySessionExpiredError - sig { - params(params: T.any(::Stripe::V2::Billing::MeterEventStreamService::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).void - } - def create(params = {}, opts = {}); end - end - end - end -end -# typed: true -module Stripe - module V2 - module Billing - class MeterEventService < StripeService - class CreateParams < Stripe::RequestParams - # The name of the meter event. Corresponds with the `event_name` field on a meter. - sig { returns(String) } - attr_accessor :event_name - # A unique identifier for the event. If not provided, one will be generated. - # We recommend using a globally unique identifier for this. We’ll enforce - # uniqueness within a rolling 24 hour period. - sig { returns(T.nilable(String)) } - attr_accessor :identifier - # The payload of the event. This must contain the fields corresponding to a meter’s - # `customer_mapping.event_payload_key` (default is `stripe_customer_id`) and - # `value_settings.event_payload_key` (default is `value`). Read more about - # the - # [payload](https://docs.stripe.com/billing/subscriptions/usage-based/recording-usage#payload-key-overrides). - sig { returns(T::Hash[String, String]) } - attr_accessor :payload - # The time of the event. Must be within the past 35 calendar days or up to - # 5 minutes in the future. Defaults to current timestamp if not specified. - sig { returns(T.nilable(String)) } - attr_accessor :timestamp - sig { - params(event_name: String, identifier: T.nilable(String), payload: T::Hash[String, String], timestamp: T.nilable(String)).void - } - def initialize(event_name: nil, identifier: nil, payload: nil, timestamp: nil); end - end - # Creates a meter event. Events are validated synchronously, but are processed asynchronously. Supports up to 1,000 events per second in livemode. For higher rate-limits, please use meter event streams instead. - sig { - params(params: T.any(::Stripe::V2::Billing::MeterEventService::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::V2::Billing::MeterEvent) - } - def create(params = {}, opts = {}); end - end - end - end -end -# typed: true -module Stripe - module V2 - class TestHelperService < StripeService - attr_reader :financial_addresses - end - end -end -# typed: true -module Stripe - module V2 - module TestHelpers - class FinancialAddressService < StripeService - class CreditParams < Stripe::RequestParams - # Object containing the amount value and currency to credit. - sig { returns(Stripe::V2::Amount) } - attr_accessor :amount - # Open Enum. The network to use in simulating the funds flow. This will be the reflected in the resulting ReceivedCredit. - sig { returns(String) } - attr_accessor :network - # String explaining funds flow. Use this field to populate the statement descriptor of the ReceivedCredit created as an eventual result of this simulation. - sig { returns(T.nilable(String)) } - attr_accessor :statement_descriptor - sig { - params(amount: Stripe::V2::Amount, network: String, statement_descriptor: T.nilable(String)).void - } - def initialize(amount: nil, network: nil, statement_descriptor: nil); end - end - class GenerateMicrodepositsParams < Stripe::RequestParams; end - # Simulate crediting a FinancialAddress in a Sandbox environment. This can be used to add virtual funds and increase your balance for testing. - sig { - params(id: String, params: T.any(::Stripe::V2::TestHelpers::FinancialAddressService::CreditParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::V2::FinancialAddressCreditSimulation) - } - def credit(id, params = {}, opts = {}); end - - # Generates microdeposits for a FinancialAddress in a Sandbox environment. - sig { - params(id: String, params: T.any(::Stripe::V2::TestHelpers::FinancialAddressService::GenerateMicrodepositsParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::V2::FinancialAddressGeneratedMicrodeposits) - } - def generate_microdeposits(id, params = {}, opts = {}); end - end - end - end -end -# typed: true module Stripe module V2 class PaymentService < StripeService @@ -193745,7 +193701,13 @@ module Stripe module V2 module Payments class OffSessionPaymentService < StripeService - class CancelParams < Stripe::RequestParams; end + class ListParams < Stripe::RequestParams + # The page size limit, if not provided the default is 20. + sig { returns(T.nilable(Integer)) } + attr_accessor :limit + sig { params(limit: T.nilable(Integer)).void } + def initialize(limit: nil); end + end class CreateParams < Stripe::RequestParams class RetryDetails < Stripe::RequestParams # How you want Stripe to retry the payment. @@ -193818,14 +193780,8 @@ module Stripe transfer_data: nil ); end end - class ListParams < Stripe::RequestParams - # The page size limit, if not provided the default is 20. - sig { returns(T.nilable(Integer)) } - attr_accessor :limit - sig { params(limit: T.nilable(Integer)).void } - def initialize(limit: nil); end - end class RetrieveParams < Stripe::RequestParams; end + class CancelParams < Stripe::RequestParams; end # Cancel OSP. sig { params(id: String, params: T.any(::Stripe::V2::Payments::OffSessionPaymentService::CancelParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::V2::Payments::OffSessionPayment) @@ -193852,4 +193808,48 @@ module Stripe end end end +end +# typed: true +module Stripe + module V2 + class TestHelperService < StripeService + attr_reader :financial_addresses + end + end +end +# typed: true +module Stripe + module V2 + module TestHelpers + class FinancialAddressService < StripeService + class CreditParams < Stripe::RequestParams + # Object containing the amount value and currency to credit. + sig { returns(Stripe::V2::Amount) } + attr_accessor :amount + # Open Enum. The network to use in simulating the funds flow. This will be the reflected in the resulting ReceivedCredit. + sig { returns(String) } + attr_accessor :network + # String explaining funds flow. Use this field to populate the statement descriptor of the ReceivedCredit created as an eventual result of this simulation. + sig { returns(T.nilable(String)) } + attr_accessor :statement_descriptor + sig { + params(amount: Stripe::V2::Amount, network: String, statement_descriptor: T.nilable(String)).void + } + def initialize(amount: nil, network: nil, statement_descriptor: nil); end + end + class GenerateMicrodepositsParams < Stripe::RequestParams; end + # Simulate crediting a FinancialAddress in a Sandbox environment. This can be used to add virtual funds and increase your balance for testing. + sig { + params(id: String, params: T.any(::Stripe::V2::TestHelpers::FinancialAddressService::CreditParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::V2::FinancialAddressCreditSimulation) + } + def credit(id, params = {}, opts = {}); end + + # Generates microdeposits for a FinancialAddress in a Sandbox environment. + sig { + params(id: String, params: T.any(::Stripe::V2::TestHelpers::FinancialAddressService::GenerateMicrodepositsParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::V2::FinancialAddressGeneratedMicrodeposits) + } + def generate_microdeposits(id, params = {}, opts = {}); end + end + end + end end \ No newline at end of file diff --git a/rbi/stripe/services/v2/billing_service.rbi b/rbi/stripe/services/v2/billing_service.rbi index a9240381..502f6e6e 100644 --- a/rbi/stripe/services/v2/billing_service.rbi +++ b/rbi/stripe/services/v2/billing_service.rbi @@ -5,8 +5,8 @@ module Stripe module V2 class BillingService < StripeService - attr_reader :meter_event_session attr_reader :meter_event_adjustments + attr_reader :meter_event_session attr_reader :meter_event_stream attr_reader :meter_events end diff --git a/rbi/stripe/services/v2/core/account_service.rbi b/rbi/stripe/services/v2/core/account_service.rbi index 3ccc13de..dcc70555 100644 --- a/rbi/stripe/services/v2/core/account_service.rbi +++ b/rbi/stripe/services/v2/core/account_service.rbi @@ -7,12 +7,17 @@ module Stripe module Core class AccountService < StripeService attr_reader :persons - class CloseParams < Stripe::RequestParams - # Configurations on the Account to be closed. All configurations on the Account must be passed in for this request to succeed. + class ListParams < Stripe::RequestParams + # Filter only accounts that have all of the configurations specified. If omitted, returns all accounts regardless of which configurations they have. sig { returns(T.nilable(T::Array[String])) } attr_accessor :applied_configurations - sig { params(applied_configurations: T.nilable(T::Array[String])).void } - def initialize(applied_configurations: nil); end + # The upper limit on the number of accounts returned by the List Account request. + sig { returns(T.nilable(Integer)) } + attr_accessor :limit + sig { + params(applied_configurations: T.nilable(T::Array[String]), limit: T.nilable(Integer)).void + } + def initialize(applied_configurations: nil, limit: nil); end end class CreateParams < Stripe::RequestParams class Configuration < Stripe::RequestParams @@ -2163,18 +2168,6 @@ module Stripe metadata: nil ); end end - class ListParams < Stripe::RequestParams - # Filter only accounts that have all of the configurations specified. If omitted, returns all accounts regardless of which configurations they have. - sig { returns(T.nilable(T::Array[String])) } - attr_accessor :applied_configurations - # The upper limit on the number of accounts returned by the List Account request. - sig { returns(T.nilable(Integer)) } - attr_accessor :limit - sig { - params(applied_configurations: T.nilable(T::Array[String]), limit: T.nilable(Integer)).void - } - def initialize(applied_configurations: nil, limit: nil); end - end class RetrieveParams < Stripe::RequestParams # Additional fields to include in the response. sig { returns(T.nilable(T::Array[String])) } @@ -4357,6 +4350,13 @@ module Stripe metadata: nil ); end end + class CloseParams < Stripe::RequestParams + # Configurations on the Account to be closed. All configurations on the Account must be passed in for this request to succeed. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :applied_configurations + sig { params(applied_configurations: T.nilable(T::Array[String])).void } + def initialize(applied_configurations: nil); end + end # Removes access to the Account and its associated resources. sig { params(id: String, params: T.any(::Stripe::V2::Core::AccountService::CloseParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::V2::Core::Account) diff --git a/rbi/stripe/services/v2/core/accounts/person_service.rbi b/rbi/stripe/services/v2/core/accounts/person_service.rbi index 887ccd5a..3542e953 100644 --- a/rbi/stripe/services/v2/core/accounts/person_service.rbi +++ b/rbi/stripe/services/v2/core/accounts/person_service.rbi @@ -7,6 +7,13 @@ module Stripe module Core module Accounts class PersonService < StripeService + class ListParams < Stripe::RequestParams + # The upper limit on the number of accounts returned by the List Account request. + sig { returns(T.nilable(Integer)) } + attr_accessor :limit + sig { params(limit: T.nilable(Integer)).void } + def initialize(limit: nil); end + end class CreateParams < Stripe::RequestParams class AdditionalAddress < Stripe::RequestParams # City, district, suburb, town, or village. @@ -522,13 +529,6 @@ module Stripe ); end end class DeleteParams < Stripe::RequestParams; end - class ListParams < Stripe::RequestParams - # The upper limit on the number of accounts returned by the List Account request. - sig { returns(T.nilable(Integer)) } - attr_accessor :limit - sig { params(limit: T.nilable(Integer)).void } - def initialize(limit: nil); end - end class RetrieveParams < Stripe::RequestParams; end class UpdateParams < Stripe::RequestParams class AdditionalAddress < Stripe::RequestParams diff --git a/rbi/stripe/services/v2/core/event_destination_service.rbi b/rbi/stripe/services/v2/core/event_destination_service.rbi index e5ccfe94..5477802f 100644 --- a/rbi/stripe/services/v2/core/event_destination_service.rbi +++ b/rbi/stripe/services/v2/core/event_destination_service.rbi @@ -6,6 +6,16 @@ module Stripe module V2 module Core class EventDestinationService < StripeService + class ListParams < Stripe::RequestParams + # Additional fields to include in the response. Currently supports `webhook_endpoint.url`. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :include + # The page size. + sig { returns(T.nilable(Integer)) } + attr_accessor :limit + sig { params(include: T.nilable(T::Array[String]), limit: T.nilable(Integer)).void } + def initialize(include: nil, limit: nil); end + end class CreateParams < Stripe::RequestParams class AmazonEventbridge < Stripe::RequestParams # The AWS account ID. @@ -79,19 +89,6 @@ module Stripe ); end end class DeleteParams < Stripe::RequestParams; end - class DisableParams < Stripe::RequestParams; end - class EnableParams < Stripe::RequestParams; end - class ListParams < Stripe::RequestParams - # Additional fields to include in the response. Currently supports `webhook_endpoint.url`. - sig { returns(T.nilable(T::Array[String])) } - attr_accessor :include - # The page size. - sig { returns(T.nilable(Integer)) } - attr_accessor :limit - sig { params(include: T.nilable(T::Array[String]), limit: T.nilable(Integer)).void } - def initialize(include: nil, limit: nil); end - end - class PingParams < Stripe::RequestParams; end class RetrieveParams < Stripe::RequestParams # Additional fields to include in the response. sig { returns(T.nilable(T::Array[String])) } @@ -139,6 +136,9 @@ module Stripe webhook_endpoint: nil ); end end + class DisableParams < Stripe::RequestParams; end + class EnableParams < Stripe::RequestParams; end + class PingParams < Stripe::RequestParams; end # Create a new event destination. sig { params(params: T.any(::Stripe::V2::Core::EventDestinationService::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::V2::EventDestination) diff --git a/rbi/stripe/services/v2/core/vault/gb_bank_account_service.rbi b/rbi/stripe/services/v2/core/vault/gb_bank_account_service.rbi index ab1cdfd9..4b92b5af 100644 --- a/rbi/stripe/services/v2/core/vault/gb_bank_account_service.rbi +++ b/rbi/stripe/services/v2/core/vault/gb_bank_account_service.rbi @@ -7,8 +7,6 @@ module Stripe module Core module Vault class GbBankAccountService < StripeService - class AcknowledgeConfirmationOfPayeeParams < Stripe::RequestParams; end - class ArchiveParams < Stripe::RequestParams; end class CreateParams < Stripe::RequestParams class ConfirmationOfPayee < Stripe::RequestParams # The business type to be checked against. Legal entity information will be used if unspecified. @@ -52,6 +50,9 @@ module Stripe sort_code: nil ); end end + class RetrieveParams < Stripe::RequestParams; end + class AcknowledgeConfirmationOfPayeeParams < Stripe::RequestParams; end + class ArchiveParams < Stripe::RequestParams; end class InitiateConfirmationOfPayeeParams < Stripe::RequestParams # The business type to be checked against. Legal entity information will be used if unspecified. sig { returns(T.nilable(String)) } @@ -62,7 +63,6 @@ module Stripe sig { params(business_type: T.nilable(String), name: T.nilable(String)).void } def initialize(business_type: nil, name: nil); end end - class RetrieveParams < Stripe::RequestParams; end # Confirm that you have received the result of the Confirmation of Payee request, and that you are okay with # proceeding to pay out to this bank account despite the account not matching, partially matching, or the service # being unavailable. Once you confirm this, you will be able to send OutboundPayments, but this may lead to diff --git a/rbi/stripe/services/v2/core/vault/us_bank_account_service.rbi b/rbi/stripe/services/v2/core/vault/us_bank_account_service.rbi index 9e3ea01b..02cd883b 100644 --- a/rbi/stripe/services/v2/core/vault/us_bank_account_service.rbi +++ b/rbi/stripe/services/v2/core/vault/us_bank_account_service.rbi @@ -7,7 +7,6 @@ module Stripe module Core module Vault class UsBankAccountService < StripeService - class ArchiveParams < Stripe::RequestParams; end class CreateParams < Stripe::RequestParams # The account number of the bank account. sig { returns(String) } @@ -44,6 +43,7 @@ module Stripe } def initialize(fedwire_routing_number: nil, routing_number: nil); end end + class ArchiveParams < Stripe::RequestParams; end # Archive a USBankAccount object. USBankAccount objects will not be automatically archived by Stripe. # Archived USBankAccount objects cannot be used as outbound destinations # and will not appear in the outbound destination list. diff --git a/rbi/stripe/services/v2/core_service.rbi b/rbi/stripe/services/v2/core_service.rbi index a4ede7da..40058bec 100644 --- a/rbi/stripe/services/v2/core_service.rbi +++ b/rbi/stripe/services/v2/core_service.rbi @@ -5,8 +5,8 @@ module Stripe module V2 class CoreService < StripeService - attr_reader :accounts attr_reader :account_links + attr_reader :accounts attr_reader :event_destinations attr_reader :events attr_reader :vault diff --git a/rbi/stripe/services/v2/money_management/financial_address_service.rbi b/rbi/stripe/services/v2/money_management/financial_address_service.rbi index edca0259..f43d7c2b 100644 --- a/rbi/stripe/services/v2/money_management/financial_address_service.rbi +++ b/rbi/stripe/services/v2/money_management/financial_address_service.rbi @@ -6,16 +6,6 @@ module Stripe module V2 module MoneyManagement class FinancialAddressService < StripeService - class CreateParams < Stripe::RequestParams - # Open Enum. The currency the FinancialAddress should support. Currently, only the `usd` and `gbp` values are supported. - sig { returns(String) } - attr_accessor :currency - # The ID of the FinancialAccount the new FinancialAddress should be associated with. - sig { returns(String) } - attr_accessor :financial_account - sig { params(currency: String, financial_account: String).void } - def initialize(currency: nil, financial_account: nil); end - end class ListParams < Stripe::RequestParams # The ID of the FinancialAccount for which FinancialAddresses are to be returned. sig { returns(T.nilable(String)) } @@ -31,6 +21,16 @@ module Stripe } def initialize(financial_account: nil, include: nil, limit: nil); end end + class CreateParams < Stripe::RequestParams + # Open Enum. The currency the FinancialAddress should support. Currently, only the `usd` and `gbp` values are supported. + sig { returns(String) } + attr_accessor :currency + # The ID of the FinancialAccount the new FinancialAddress should be associated with. + sig { returns(String) } + attr_accessor :financial_account + sig { params(currency: String, financial_account: String).void } + def initialize(currency: nil, financial_account: nil); end + end class RetrieveParams < Stripe::RequestParams # Open Enum. A list of fields to reveal in the FinancialAddresses returned. sig { returns(T.nilable(T::Array[String])) } diff --git a/rbi/stripe/services/v2/money_management/inbound_transfer_service.rbi b/rbi/stripe/services/v2/money_management/inbound_transfer_service.rbi index 404584bf..4cf5e55c 100644 --- a/rbi/stripe/services/v2/money_management/inbound_transfer_service.rbi +++ b/rbi/stripe/services/v2/money_management/inbound_transfer_service.rbi @@ -6,6 +6,42 @@ module Stripe module V2 module MoneyManagement class InboundTransferService < StripeService + class ListParams < Stripe::RequestParams + # Filter for objects created at the specified timestamp. + # Must be an RFC 3339 date & time value, for example: 2022-09-18T13:22:00Z. + sig { returns(T.nilable(String)) } + attr_accessor :created + # Filter for objects created after the specified timestamp. + # Must be an RFC 3339 date & time value, for example: 2022-09-18T13:22:00Z. + sig { returns(T.nilable(String)) } + attr_accessor :created_gt + # Filter for objects created on or after the specified timestamp. + # Must be an RFC 3339 date & time value, for example: 2022-09-18T13:22:00Z. + sig { returns(T.nilable(String)) } + attr_accessor :created_gte + # Filter for objects created before the specified timestamp. + # Must be an RFC 3339 date & time value, for example: 2022-09-18T13:22:00Z. + sig { returns(T.nilable(String)) } + attr_accessor :created_lt + # Filter for objects created on or before the specified timestamp. + # Must be an RFC 3339 date & time value, for example: 2022-09-18T13:22:00Z. + sig { returns(T.nilable(String)) } + attr_accessor :created_lte + # The page limit. + sig { returns(T.nilable(Integer)) } + attr_accessor :limit + sig { + params(created: T.nilable(String), created_gt: T.nilable(String), created_gte: T.nilable(String), created_lt: T.nilable(String), created_lte: T.nilable(String), limit: T.nilable(Integer)).void + } + def initialize( + created: nil, + created_gt: nil, + created_gte: nil, + created_lt: nil, + created_lte: nil, + limit: nil + ); end + end class CreateParams < Stripe::RequestParams class From < Stripe::RequestParams # An optional currency field used to specify which currency is debited from the Payment Method. @@ -45,42 +81,6 @@ module Stripe } def initialize(amount: nil, description: nil, from: nil, to: nil); end end - class ListParams < Stripe::RequestParams - # Filter for objects created at the specified timestamp. - # Must be an RFC 3339 date & time value, for example: 2022-09-18T13:22:00Z. - sig { returns(T.nilable(String)) } - attr_accessor :created - # Filter for objects created after the specified timestamp. - # Must be an RFC 3339 date & time value, for example: 2022-09-18T13:22:00Z. - sig { returns(T.nilable(String)) } - attr_accessor :created_gt - # Filter for objects created on or after the specified timestamp. - # Must be an RFC 3339 date & time value, for example: 2022-09-18T13:22:00Z. - sig { returns(T.nilable(String)) } - attr_accessor :created_gte - # Filter for objects created before the specified timestamp. - # Must be an RFC 3339 date & time value, for example: 2022-09-18T13:22:00Z. - sig { returns(T.nilable(String)) } - attr_accessor :created_lt - # Filter for objects created on or before the specified timestamp. - # Must be an RFC 3339 date & time value, for example: 2022-09-18T13:22:00Z. - sig { returns(T.nilable(String)) } - attr_accessor :created_lte - # The page limit. - sig { returns(T.nilable(Integer)) } - attr_accessor :limit - sig { - params(created: T.nilable(String), created_gt: T.nilable(String), created_gte: T.nilable(String), created_lt: T.nilable(String), created_lte: T.nilable(String), limit: T.nilable(Integer)).void - } - def initialize( - created: nil, - created_gt: nil, - created_gte: nil, - created_lt: nil, - created_lte: nil, - limit: nil - ); end - end class RetrieveParams < Stripe::RequestParams; end # InboundTransfers APIs are used to create, retrieve or list InboundTransfers. # diff --git a/rbi/stripe/services/v2/money_management/outbound_payment_service.rbi b/rbi/stripe/services/v2/money_management/outbound_payment_service.rbi index dcdbc42f..205f26c8 100644 --- a/rbi/stripe/services/v2/money_management/outbound_payment_service.rbi +++ b/rbi/stripe/services/v2/money_management/outbound_payment_service.rbi @@ -6,7 +6,50 @@ module Stripe module V2 module MoneyManagement class OutboundPaymentService < StripeService - class CancelParams < Stripe::RequestParams; end + class ListParams < Stripe::RequestParams + # Filter for objects created at the specified timestamp. + # Must be an RFC 3339 date & time value, for example: 2022-09-18T13:22:00Z. + sig { returns(T.nilable(String)) } + attr_accessor :created + # Filter for objects created after the specified timestamp. + # Must be an RFC 3339 date & time value, for example: 2022-09-18T13:22:00Z. + sig { returns(T.nilable(String)) } + attr_accessor :created_gt + # Filter for objects created on or after the specified timestamp. + # Must be an RFC 3339 date & time value, for example: 2022-09-18T13:22:00Z. + sig { returns(T.nilable(String)) } + attr_accessor :created_gte + # Filter for objects created before the specified timestamp. + # Must be an RFC 3339 date & time value, for example: 2022-09-18T13:22:00Z. + sig { returns(T.nilable(String)) } + attr_accessor :created_lt + # Filter for objects created on or before the specified timestamp. + # Must be an RFC 3339 date & time value, for example: 2022-09-18T13:22:00Z. + sig { returns(T.nilable(String)) } + attr_accessor :created_lte + # The maximum number of results to return. + sig { returns(T.nilable(Integer)) } + attr_accessor :limit + # Only return OutboundPayments sent to this recipient. + sig { returns(T.nilable(String)) } + attr_accessor :recipient + # Closed Enum. Only return OutboundPayments with this status. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :status + sig { + params(created: T.nilable(String), created_gt: T.nilable(String), created_gte: T.nilable(String), created_lt: T.nilable(String), created_lte: T.nilable(String), limit: T.nilable(Integer), recipient: T.nilable(String), status: T.nilable(T::Array[String])).void + } + def initialize( + created: nil, + created_gt: nil, + created_gte: nil, + created_lt: nil, + created_lte: nil, + limit: nil, + recipient: nil, + status: nil + ); end + end class CreateParams < Stripe::RequestParams class DeliveryOptions < Stripe::RequestParams # Open Enum. Method for bank account. @@ -96,51 +139,8 @@ module Stripe to: nil ); end end - class ListParams < Stripe::RequestParams - # Filter for objects created at the specified timestamp. - # Must be an RFC 3339 date & time value, for example: 2022-09-18T13:22:00Z. - sig { returns(T.nilable(String)) } - attr_accessor :created - # Filter for objects created after the specified timestamp. - # Must be an RFC 3339 date & time value, for example: 2022-09-18T13:22:00Z. - sig { returns(T.nilable(String)) } - attr_accessor :created_gt - # Filter for objects created on or after the specified timestamp. - # Must be an RFC 3339 date & time value, for example: 2022-09-18T13:22:00Z. - sig { returns(T.nilable(String)) } - attr_accessor :created_gte - # Filter for objects created before the specified timestamp. - # Must be an RFC 3339 date & time value, for example: 2022-09-18T13:22:00Z. - sig { returns(T.nilable(String)) } - attr_accessor :created_lt - # Filter for objects created on or before the specified timestamp. - # Must be an RFC 3339 date & time value, for example: 2022-09-18T13:22:00Z. - sig { returns(T.nilable(String)) } - attr_accessor :created_lte - # The maximum number of results to return. - sig { returns(T.nilable(Integer)) } - attr_accessor :limit - # Only return OutboundPayments sent to this recipient. - sig { returns(T.nilable(String)) } - attr_accessor :recipient - # Closed Enum. Only return OutboundPayments with this status. - sig { returns(T.nilable(T::Array[String])) } - attr_accessor :status - sig { - params(created: T.nilable(String), created_gt: T.nilable(String), created_gte: T.nilable(String), created_lt: T.nilable(String), created_lte: T.nilable(String), limit: T.nilable(Integer), recipient: T.nilable(String), status: T.nilable(T::Array[String])).void - } - def initialize( - created: nil, - created_gt: nil, - created_gte: nil, - created_lt: nil, - created_lte: nil, - limit: nil, - recipient: nil, - status: nil - ); end - end class RetrieveParams < Stripe::RequestParams; end + class CancelParams < Stripe::RequestParams; end # Cancels an OutboundPayment. Only processing OutboundPayments can be canceled. # # ** raises AlreadyCanceledError diff --git a/rbi/stripe/services/v2/money_management/outbound_setup_intent_service.rbi b/rbi/stripe/services/v2/money_management/outbound_setup_intent_service.rbi index 8d3935ac..d4dedd3b 100644 --- a/rbi/stripe/services/v2/money_management/outbound_setup_intent_service.rbi +++ b/rbi/stripe/services/v2/money_management/outbound_setup_intent_service.rbi @@ -6,7 +6,13 @@ module Stripe module V2 module MoneyManagement class OutboundSetupIntentService < StripeService - class CancelParams < Stripe::RequestParams; end + class ListParams < Stripe::RequestParams + # The page size. + sig { returns(T.nilable(Integer)) } + attr_accessor :limit + sig { params(limit: T.nilable(Integer)).void } + def initialize(limit: nil); end + end class CreateParams < Stripe::RequestParams class PayoutMethodData < Stripe::RequestParams class BankAccount < Stripe::RequestParams @@ -90,13 +96,6 @@ module Stripe } def initialize(payout_method: nil, payout_method_data: nil, usage_intent: nil); end end - class ListParams < Stripe::RequestParams - # The page size. - sig { returns(T.nilable(Integer)) } - attr_accessor :limit - sig { params(limit: T.nilable(Integer)).void } - def initialize(limit: nil); end - end class RetrieveParams < Stripe::RequestParams; end class UpdateParams < Stripe::RequestParams class PayoutMethodData < Stripe::RequestParams @@ -178,6 +177,7 @@ module Stripe } def initialize(payout_method: nil, payout_method_data: nil); end end + class CancelParams < Stripe::RequestParams; end # Cancel an OutboundSetupIntent object. sig { params(id: String, params: T.any(::Stripe::V2::MoneyManagement::OutboundSetupIntentService::CancelParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::V2::MoneyManagement::OutboundSetupIntent) diff --git a/rbi/stripe/services/v2/money_management/outbound_transfer_service.rbi b/rbi/stripe/services/v2/money_management/outbound_transfer_service.rbi index eaf42dbb..7228a599 100644 --- a/rbi/stripe/services/v2/money_management/outbound_transfer_service.rbi +++ b/rbi/stripe/services/v2/money_management/outbound_transfer_service.rbi @@ -6,7 +6,46 @@ module Stripe module V2 module MoneyManagement class OutboundTransferService < StripeService - class CancelParams < Stripe::RequestParams; end + class ListParams < Stripe::RequestParams + # Filter for objects created at the specified timestamp. + # Must be an RFC 3339 date & time value, for example: 2022-09-18T13:22:00Z. + sig { returns(T.nilable(String)) } + attr_accessor :created + # Filter for objects created after the specified timestamp. + # Must be an RFC 3339 date & time value, for example: 2022-09-18T13:22:00Z. + sig { returns(T.nilable(String)) } + attr_accessor :created_gt + # Filter for objects created on or after the specified timestamp. + # Must be an RFC 3339 date & time value, for example: 2022-09-18T13:22:00Z. + sig { returns(T.nilable(String)) } + attr_accessor :created_gte + # Filter for objects created before the specified timestamp. + # Must be an RFC 3339 date & time value, for example: 2022-09-18T13:22:00Z. + sig { returns(T.nilable(String)) } + attr_accessor :created_lt + # Filter for objects created on or before the specified timestamp. + # Must be an RFC 3339 date & time value, for example: 2022-09-18T13:22:00Z. + sig { returns(T.nilable(String)) } + attr_accessor :created_lte + # The maximum number of results to return. + sig { returns(T.nilable(Integer)) } + attr_accessor :limit + # Closed Enum. Only return OutboundTransfers with this status. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :status + sig { + params(created: T.nilable(String), created_gt: T.nilable(String), created_gte: T.nilable(String), created_lt: T.nilable(String), created_lte: T.nilable(String), limit: T.nilable(Integer), status: T.nilable(T::Array[String])).void + } + def initialize( + created: nil, + created_gt: nil, + created_gte: nil, + created_lt: nil, + created_lte: nil, + limit: nil, + status: nil + ); end + end class CreateParams < Stripe::RequestParams class DeliveryOptions < Stripe::RequestParams # Open Enum. Method for bank account. @@ -75,47 +114,8 @@ module Stripe to: nil ); end end - class ListParams < Stripe::RequestParams - # Filter for objects created at the specified timestamp. - # Must be an RFC 3339 date & time value, for example: 2022-09-18T13:22:00Z. - sig { returns(T.nilable(String)) } - attr_accessor :created - # Filter for objects created after the specified timestamp. - # Must be an RFC 3339 date & time value, for example: 2022-09-18T13:22:00Z. - sig { returns(T.nilable(String)) } - attr_accessor :created_gt - # Filter for objects created on or after the specified timestamp. - # Must be an RFC 3339 date & time value, for example: 2022-09-18T13:22:00Z. - sig { returns(T.nilable(String)) } - attr_accessor :created_gte - # Filter for objects created before the specified timestamp. - # Must be an RFC 3339 date & time value, for example: 2022-09-18T13:22:00Z. - sig { returns(T.nilable(String)) } - attr_accessor :created_lt - # Filter for objects created on or before the specified timestamp. - # Must be an RFC 3339 date & time value, for example: 2022-09-18T13:22:00Z. - sig { returns(T.nilable(String)) } - attr_accessor :created_lte - # The maximum number of results to return. - sig { returns(T.nilable(Integer)) } - attr_accessor :limit - # Closed Enum. Only return OutboundTransfers with this status. - sig { returns(T.nilable(T::Array[String])) } - attr_accessor :status - sig { - params(created: T.nilable(String), created_gt: T.nilable(String), created_gte: T.nilable(String), created_lt: T.nilable(String), created_lte: T.nilable(String), limit: T.nilable(Integer), status: T.nilable(T::Array[String])).void - } - def initialize( - created: nil, - created_gt: nil, - created_gte: nil, - created_lt: nil, - created_lte: nil, - limit: nil, - status: nil - ); end - end class RetrieveParams < Stripe::RequestParams; end + class CancelParams < Stripe::RequestParams; end # Cancels an OutboundTransfer. Only processing OutboundTransfers can be canceled. # # ** raises AlreadyCanceledError diff --git a/rbi/stripe/services/v2/money_management/payout_method_service.rbi b/rbi/stripe/services/v2/money_management/payout_method_service.rbi index 961d13c7..41bb0481 100644 --- a/rbi/stripe/services/v2/money_management/payout_method_service.rbi +++ b/rbi/stripe/services/v2/money_management/payout_method_service.rbi @@ -6,7 +6,6 @@ module Stripe module V2 module MoneyManagement class PayoutMethodService < StripeService - class ArchiveParams < Stripe::RequestParams; end class ListParams < Stripe::RequestParams class UsageStatus < Stripe::RequestParams # List of payments status to filter by. @@ -34,6 +33,7 @@ module Stripe def initialize(limit: nil, usage_status: nil); end end class RetrieveParams < Stripe::RequestParams; end + class ArchiveParams < Stripe::RequestParams; end class UnarchiveParams < Stripe::RequestParams; end # Archive a PayoutMethod object. Archived objects cannot be used as payout methods # and will not appear in the payout method list. diff --git a/rbi/stripe/services/v2/money_management_service.rbi b/rbi/stripe/services/v2/money_management_service.rbi index 8d64a843..f0ae0104 100644 --- a/rbi/stripe/services/v2/money_management_service.rbi +++ b/rbi/stripe/services/v2/money_management_service.rbi @@ -9,16 +9,16 @@ module Stripe attr_reader :financial_accounts attr_reader :financial_addresses attr_reader :inbound_transfers - attr_reader :outbound_payments attr_reader :outbound_payment_quotes - attr_reader :outbound_transfers + attr_reader :outbound_payments attr_reader :outbound_setup_intents + attr_reader :outbound_transfers attr_reader :payout_methods attr_reader :payout_methods_bank_account_spec attr_reader :received_credits attr_reader :received_debits - attr_reader :transactions attr_reader :transaction_entries + attr_reader :transactions end end end \ No newline at end of file diff --git a/rbi/stripe/services/v2/payments/off_session_payment_service.rbi b/rbi/stripe/services/v2/payments/off_session_payment_service.rbi index 75ceb22e..8a30acca 100644 --- a/rbi/stripe/services/v2/payments/off_session_payment_service.rbi +++ b/rbi/stripe/services/v2/payments/off_session_payment_service.rbi @@ -6,7 +6,13 @@ module Stripe module V2 module Payments class OffSessionPaymentService < StripeService - class CancelParams < Stripe::RequestParams; end + class ListParams < Stripe::RequestParams + # The page size limit, if not provided the default is 20. + sig { returns(T.nilable(Integer)) } + attr_accessor :limit + sig { params(limit: T.nilable(Integer)).void } + def initialize(limit: nil); end + end class CreateParams < Stripe::RequestParams class RetryDetails < Stripe::RequestParams # How you want Stripe to retry the payment. @@ -79,14 +85,8 @@ module Stripe transfer_data: nil ); end end - class ListParams < Stripe::RequestParams - # The page size limit, if not provided the default is 20. - sig { returns(T.nilable(Integer)) } - attr_accessor :limit - sig { params(limit: T.nilable(Integer)).void } - def initialize(limit: nil); end - end class RetrieveParams < Stripe::RequestParams; end + class CancelParams < Stripe::RequestParams; end # Cancel OSP. sig { params(id: String, params: T.any(::Stripe::V2::Payments::OffSessionPaymentService::CancelParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::V2::Payments::OffSessionPayment) diff --git a/rbi/stripe/services/v2_services.rbi b/rbi/stripe/services/v2_services.rbi index 7077faa8..28134424 100644 --- a/rbi/stripe/services/v2_services.rbi +++ b/rbi/stripe/services/v2_services.rbi @@ -4,10 +4,10 @@ # typed: true module Stripe class V2Services < StripeService + attr_reader :billing attr_reader :core attr_reader :money_management - attr_reader :billing - attr_reader :test_helpers attr_reader :payments + attr_reader :test_helpers end end \ No newline at end of file diff --git a/test/stripe/generated_examples_test.rb b/test/stripe/generated_examples_test.rb index bf7219f9..9a1d507f 100644 --- a/test/stripe/generated_examples_test.rb +++ b/test/stripe/generated_examples_test.rb @@ -7542,25 +7542,89 @@ module Stripe ) assert_requested :post, "#{Stripe::DEFAULT_API_BASE}/v1/webhook_endpoints/we_xxxxxxxxxxxxx" end - should "Test v2 core account post (service)" do - stub_request(:post, "#{Stripe::DEFAULT_API_BASE}/v2/core/accounts/id_123/close").to_return( - body: '{"applied_configurations":["recipient"],"configuration":null,"contact_email":null,"created":"1970-01-12T21:42:34.472Z","dashboard":null,"defaults":null,"display_name":null,"id":"obj_123","identity":null,"metadata":null,"object":"v2.core.account","requirements":null,"livemode":true}', + should "Test v2 billing meter event adjustment post (service)" do + stub_request( + :post, + "#{Stripe::DEFAULT_API_BASE}/v2/billing/meter_event_adjustments" + ).to_return( + body: '{"cancel":{"identifier":"identifier"},"created":"1970-01-12T21:42:34.472Z","event_name":"event_name","id":"obj_123","object":"v2.billing.meter_event_adjustment","status":"complete","type":"cancel","livemode":true}', status: 200 ) client = Stripe::StripeClient.new("sk_test_123") - account = client.v2.core.accounts.close("id_123") - assert_requested :post, "#{Stripe::DEFAULT_API_BASE}/v2/core/accounts/id_123/close" + meter_event_adjustment = client.v2.billing.meter_event_adjustments.create({ + cancel: { identifier: "identifier" }, + event_name: "event_name", + type: "cancel", + }) + assert_requested :post, "#{Stripe::DEFAULT_API_BASE}/v2/billing/meter_event_adjustments" end - should "Test v2 core account post 2 (service)" do - stub_request(:post, "#{Stripe::DEFAULT_API_BASE}/v2/core/accounts").to_return( - body: '{"applied_configurations":["recipient"],"configuration":null,"contact_email":null,"created":"1970-01-12T21:42:34.472Z","dashboard":null,"defaults":null,"display_name":null,"id":"obj_123","identity":null,"metadata":null,"object":"v2.core.account","requirements":null,"livemode":true}', + should "Test v2 billing meter event session post (service)" do + stub_request(:post, "#{Stripe::DEFAULT_API_BASE}/v2/billing/meter_event_session").to_return( + body: '{"authentication_token":"authentication_token","created":"1970-01-12T21:42:34.472Z","expires_at":"1970-01-10T15:36:51.170Z","id":"obj_123","object":"v2.billing.meter_event_session","livemode":true}', status: 200 ) client = Stripe::StripeClient.new("sk_test_123") - account = client.v2.core.accounts.create - assert_requested :post, "#{Stripe::DEFAULT_API_BASE}/v2/core/accounts" + meter_event_session = client.v2.billing.meter_event_session.create + assert_requested :post, "#{Stripe::DEFAULT_API_BASE}/v2/billing/meter_event_session" + end + should "Test v2 billing meter event stream post (service)" do + stub_request( + :post, + "#{Stripe::DEFAULT_METER_EVENTS_BASE}/v2/billing/meter_event_stream" + ).to_return(body: "{}", status: 200) + client = Stripe::StripeClient.new("sk_test_123") + + empty_object = client.v2.billing.meter_event_stream.create({ + events: [ + { + event_name: "event_name", + identifier: "identifier", + payload: { undefined: "payload" }, + timestamp: "1970-01-01T15:18:46.294Z", + }, + ], + }) + assert_requested :post, "#{Stripe::DEFAULT_METER_EVENTS_BASE}/v2/billing/meter_event_stream" + end + should "Test v2 billing meter event post (service)" do + stub_request(:post, "#{Stripe::DEFAULT_API_BASE}/v2/billing/meter_events").to_return( + body: '{"created":"1970-01-12T21:42:34.472Z","event_name":"event_name","identifier":"identifier","object":"v2.billing.meter_event","payload":{"undefined":"payload"},"timestamp":"1970-01-01T15:18:46.294Z","livemode":true}', + status: 200 + ) + client = Stripe::StripeClient.new("sk_test_123") + + meter_event = client.v2.billing.meter_events.create({ + event_name: "event_name", + payload: { undefined: "payload" }, + }) + assert_requested :post, "#{Stripe::DEFAULT_API_BASE}/v2/billing/meter_events" + end + should "Test v2 core account link post (service)" do + stub_request(:post, "#{Stripe::DEFAULT_API_BASE}/v2/core/account_links").to_return( + body: '{"account":"account","created":"1970-01-12T21:42:34.472Z","expires_at":"1970-01-10T15:36:51.170Z","object":"v2.core.account_link","url":"url","use_case":{"type":"account_onboarding","account_onboarding":null,"account_update":null},"livemode":true}', + status: 200 + ) + client = Stripe::StripeClient.new("sk_test_123") + + account_link = client.v2.core.account_links.create({ + account: "account", + use_case: { + type: "account_onboarding", + account_onboarding: { + configurations: ["recipient"], + refresh_url: "refresh_url", + return_url: "return_url", + }, + account_update: { + configurations: ["recipient"], + refresh_url: "refresh_url", + return_url: "return_url", + }, + }, + }) + assert_requested :post, "#{Stripe::DEFAULT_API_BASE}/v2/core/account_links" end should "Test v2 core account get (service)" do stub_request(:get, "#{Stripe::DEFAULT_API_BASE}/v2/core/accounts").to_return( @@ -7572,6 +7636,16 @@ module Stripe accounts = client.v2.core.accounts.list assert_requested :get, "#{Stripe::DEFAULT_API_BASE}/v2/core/accounts" end + should "Test v2 core account post (service)" do + stub_request(:post, "#{Stripe::DEFAULT_API_BASE}/v2/core/accounts").to_return( + body: '{"applied_configurations":["recipient"],"configuration":null,"contact_email":null,"created":"1970-01-12T21:42:34.472Z","dashboard":null,"defaults":null,"display_name":null,"id":"obj_123","identity":null,"metadata":null,"object":"v2.core.account","requirements":null,"livemode":true}', + status: 200 + ) + client = Stripe::StripeClient.new("sk_test_123") + + account = client.v2.core.accounts.create + assert_requested :post, "#{Stripe::DEFAULT_API_BASE}/v2/core/accounts" + end should "Test v2 core account get 2 (service)" do stub_request(:get, "#{Stripe::DEFAULT_API_BASE}/v2/core/accounts/id_123").to_return( body: '{"applied_configurations":["recipient"],"configuration":null,"contact_email":null,"created":"1970-01-12T21:42:34.472Z","dashboard":null,"defaults":null,"display_name":null,"id":"obj_123","identity":null,"metadata":null,"object":"v2.core.account","requirements":null,"livemode":true}', @@ -7582,7 +7656,7 @@ module Stripe account = client.v2.core.accounts.retrieve("id_123") assert_requested :get, "#{Stripe::DEFAULT_API_BASE}/v2/core/accounts/id_123" end - should "Test v2 core account post 3 (service)" do + should "Test v2 core account post 2 (service)" do stub_request(:post, "#{Stripe::DEFAULT_API_BASE}/v2/core/accounts/id_123").to_return( body: '{"applied_configurations":["recipient"],"configuration":null,"contact_email":null,"created":"1970-01-12T21:42:34.472Z","dashboard":null,"defaults":null,"display_name":null,"id":"obj_123","identity":null,"metadata":null,"object":"v2.core.account","requirements":null,"livemode":true}', status: 200 @@ -7592,6 +7666,29 @@ module Stripe account = client.v2.core.accounts.update("id_123") assert_requested :post, "#{Stripe::DEFAULT_API_BASE}/v2/core/accounts/id_123" end + should "Test v2 core account post 3 (service)" do + stub_request(:post, "#{Stripe::DEFAULT_API_BASE}/v2/core/accounts/id_123/close").to_return( + body: '{"applied_configurations":["recipient"],"configuration":null,"contact_email":null,"created":"1970-01-12T21:42:34.472Z","dashboard":null,"defaults":null,"display_name":null,"id":"obj_123","identity":null,"metadata":null,"object":"v2.core.account","requirements":null,"livemode":true}', + status: 200 + ) + client = Stripe::StripeClient.new("sk_test_123") + + account = client.v2.core.accounts.close("id_123") + assert_requested :post, "#{Stripe::DEFAULT_API_BASE}/v2/core/accounts/id_123/close" + end + should "Test v2 core accounts person get (service)" do + stub_request( + :get, + "#{Stripe::DEFAULT_API_BASE}/v2/core/accounts/account_id_123/persons" + ).to_return( + body: '{"data":[{"account":"account","additional_addresses":null,"additional_names":null,"additional_terms_of_service":null,"address":null,"created":"1970-01-12T21:42:34.472Z","date_of_birth":null,"documents":null,"email":null,"given_name":null,"id":"obj_123","id_numbers":null,"legal_gender":null,"metadata":null,"nationalities":null,"object":"v2.core.account_person","phone":null,"political_exposure":null,"relationship":null,"script_addresses":null,"script_names":null,"surname":null,"updated":"1970-01-03T17:07:10.277Z","livemode":true}],"next_page_url":null,"previous_page_url":null}', + status: 200 + ) + client = Stripe::StripeClient.new("sk_test_123") + + persons = client.v2.core.accounts.persons.list("account_id_123") + assert_requested :get, "#{Stripe::DEFAULT_API_BASE}/v2/core/accounts/account_id_123/persons" + end should "Test v2 core accounts person post (service)" do stub_request( :post, @@ -7618,19 +7715,6 @@ module Stripe deleted = client.v2.core.accounts.persons.delete("account_id_123", "id_123") assert_requested :delete, "#{Stripe::DEFAULT_API_BASE}/v2/core/accounts/account_id_123/persons/id_123" end - should "Test v2 core accounts person get (service)" do - stub_request( - :get, - "#{Stripe::DEFAULT_API_BASE}/v2/core/accounts/account_id_123/persons" - ).to_return( - body: '{"data":[{"account":"account","additional_addresses":null,"additional_names":null,"additional_terms_of_service":null,"address":null,"created":"1970-01-12T21:42:34.472Z","date_of_birth":null,"documents":null,"email":null,"given_name":null,"id":"obj_123","id_numbers":null,"legal_gender":null,"metadata":null,"nationalities":null,"object":"v2.core.account_person","phone":null,"political_exposure":null,"relationship":null,"script_addresses":null,"script_names":null,"surname":null,"updated":"1970-01-03T17:07:10.277Z","livemode":true}],"next_page_url":null,"previous_page_url":null}', - status: 200 - ) - client = Stripe::StripeClient.new("sk_test_123") - - persons = client.v2.core.accounts.persons.list("account_id_123") - assert_requested :get, "#{Stripe::DEFAULT_API_BASE}/v2/core/accounts/account_id_123/persons" - end should "Test v2 core accounts person get 2 (service)" do stub_request( :get, @@ -7657,30 +7741,15 @@ module Stripe person = client.v2.core.accounts.persons.update("account_id_123", "id_123") assert_requested :post, "#{Stripe::DEFAULT_API_BASE}/v2/core/accounts/account_id_123/persons/id_123" end - should "Test v2 core account link post (service)" do - stub_request(:post, "#{Stripe::DEFAULT_API_BASE}/v2/core/account_links").to_return( - body: '{"account":"account","created":"1970-01-12T21:42:34.472Z","expires_at":"1970-01-10T15:36:51.170Z","object":"v2.core.account_link","url":"url","use_case":{"type":"account_onboarding","account_onboarding":null,"account_update":null},"livemode":true}', + should "Test v2 core event destination get (service)" do + stub_request(:get, "#{Stripe::DEFAULT_API_BASE}/v2/core/event_destinations").to_return( + body: '{"data":[{"created":"1970-01-12T21:42:34.472Z","description":"description","enabled_events":["enabled_events"],"event_payload":"thin","events_from":null,"id":"obj_123","metadata":null,"name":"name","object":"v2.core.event_destination","snapshot_api_version":null,"status":"disabled","status_details":null,"type":"amazon_eventbridge","updated":"1970-01-03T17:07:10.277Z","livemode":true,"amazon_eventbridge":null,"webhook_endpoint":null}],"next_page_url":null,"previous_page_url":null}', status: 200 ) client = Stripe::StripeClient.new("sk_test_123") - account_link = client.v2.core.account_links.create({ - account: "account", - use_case: { - type: "account_onboarding", - account_onboarding: { - configurations: ["recipient"], - refresh_url: "refresh_url", - return_url: "return_url", - }, - account_update: { - configurations: ["recipient"], - refresh_url: "refresh_url", - return_url: "return_url", - }, - }, - }) - assert_requested :post, "#{Stripe::DEFAULT_API_BASE}/v2/core/account_links" + event_destinations = client.v2.core.event_destinations.list + assert_requested :get, "#{Stripe::DEFAULT_API_BASE}/v2/core/event_destinations" end should "Test v2 core event destination post (service)" do stub_request(:post, "#{Stripe::DEFAULT_API_BASE}/v2/core/event_destinations").to_return( @@ -7710,7 +7779,30 @@ module Stripe deleted = client.v2.core.event_destinations.delete("id_123") assert_requested :delete, "#{Stripe::DEFAULT_API_BASE}/v2/core/event_destinations/id_123" end + should "Test v2 core event destination get 2 (service)" do + stub_request(:get, "#{Stripe::DEFAULT_API_BASE}/v2/core/event_destinations/id_123").to_return( + body: '{"created":"1970-01-12T21:42:34.472Z","description":"description","enabled_events":["enabled_events"],"event_payload":"thin","events_from":null,"id":"obj_123","metadata":null,"name":"name","object":"v2.core.event_destination","snapshot_api_version":null,"status":"disabled","status_details":null,"type":"amazon_eventbridge","updated":"1970-01-03T17:07:10.277Z","livemode":true,"amazon_eventbridge":null,"webhook_endpoint":null}', + status: 200 + ) + client = Stripe::StripeClient.new("sk_test_123") + + event_destination = client.v2.core.event_destinations.retrieve("id_123") + assert_requested :get, "#{Stripe::DEFAULT_API_BASE}/v2/core/event_destinations/id_123" + end should "Test v2 core event destination post 2 (service)" do + stub_request( + :post, + "#{Stripe::DEFAULT_API_BASE}/v2/core/event_destinations/id_123" + ).to_return( + body: '{"created":"1970-01-12T21:42:34.472Z","description":"description","enabled_events":["enabled_events"],"event_payload":"thin","events_from":null,"id":"obj_123","metadata":null,"name":"name","object":"v2.core.event_destination","snapshot_api_version":null,"status":"disabled","status_details":null,"type":"amazon_eventbridge","updated":"1970-01-03T17:07:10.277Z","livemode":true,"amazon_eventbridge":null,"webhook_endpoint":null}', + status: 200 + ) + client = Stripe::StripeClient.new("sk_test_123") + + event_destination = client.v2.core.event_destinations.update("id_123") + assert_requested :post, "#{Stripe::DEFAULT_API_BASE}/v2/core/event_destinations/id_123" + end + should "Test v2 core event destination post 3 (service)" do stub_request( :post, "#{Stripe::DEFAULT_API_BASE}/v2/core/event_destinations/id_123/disable" @@ -7723,7 +7815,7 @@ module Stripe event_destination = client.v2.core.event_destinations.disable("id_123") assert_requested :post, "#{Stripe::DEFAULT_API_BASE}/v2/core/event_destinations/id_123/disable" end - should "Test v2 core event destination post 3 (service)" do + should "Test v2 core event destination post 4 (service)" do stub_request( :post, "#{Stripe::DEFAULT_API_BASE}/v2/core/event_destinations/id_123/enable" @@ -7736,17 +7828,7 @@ module Stripe event_destination = client.v2.core.event_destinations.enable("id_123") assert_requested :post, "#{Stripe::DEFAULT_API_BASE}/v2/core/event_destinations/id_123/enable" end - should "Test v2 core event destination get (service)" do - stub_request(:get, "#{Stripe::DEFAULT_API_BASE}/v2/core/event_destinations").to_return( - body: '{"data":[{"created":"1970-01-12T21:42:34.472Z","description":"description","enabled_events":["enabled_events"],"event_payload":"thin","events_from":null,"id":"obj_123","metadata":null,"name":"name","object":"v2.core.event_destination","snapshot_api_version":null,"status":"disabled","status_details":null,"type":"amazon_eventbridge","updated":"1970-01-03T17:07:10.277Z","livemode":true,"amazon_eventbridge":null,"webhook_endpoint":null}],"next_page_url":null,"previous_page_url":null}', - status: 200 - ) - client = Stripe::StripeClient.new("sk_test_123") - - event_destinations = client.v2.core.event_destinations.list - assert_requested :get, "#{Stripe::DEFAULT_API_BASE}/v2/core/event_destinations" - end - should "Test v2 core event destination post 4 (service)" do + should "Test v2 core event destination post 5 (service)" do stub_request( :post, "#{Stripe::DEFAULT_API_BASE}/v2/core/event_destinations/id_123/ping" @@ -7759,29 +7841,6 @@ module Stripe event = client.v2.core.event_destinations.ping("id_123") assert_requested :post, "#{Stripe::DEFAULT_API_BASE}/v2/core/event_destinations/id_123/ping" end - should "Test v2 core event destination get 2 (service)" do - stub_request(:get, "#{Stripe::DEFAULT_API_BASE}/v2/core/event_destinations/id_123").to_return( - body: '{"created":"1970-01-12T21:42:34.472Z","description":"description","enabled_events":["enabled_events"],"event_payload":"thin","events_from":null,"id":"obj_123","metadata":null,"name":"name","object":"v2.core.event_destination","snapshot_api_version":null,"status":"disabled","status_details":null,"type":"amazon_eventbridge","updated":"1970-01-03T17:07:10.277Z","livemode":true,"amazon_eventbridge":null,"webhook_endpoint":null}', - status: 200 - ) - client = Stripe::StripeClient.new("sk_test_123") - - event_destination = client.v2.core.event_destinations.retrieve("id_123") - assert_requested :get, "#{Stripe::DEFAULT_API_BASE}/v2/core/event_destinations/id_123" - end - should "Test v2 core event destination post 5 (service)" do - stub_request( - :post, - "#{Stripe::DEFAULT_API_BASE}/v2/core/event_destinations/id_123" - ).to_return( - body: '{"created":"1970-01-12T21:42:34.472Z","description":"description","enabled_events":["enabled_events"],"event_payload":"thin","events_from":null,"id":"obj_123","metadata":null,"name":"name","object":"v2.core.event_destination","snapshot_api_version":null,"status":"disabled","status_details":null,"type":"amazon_eventbridge","updated":"1970-01-03T17:07:10.277Z","livemode":true,"amazon_eventbridge":null,"webhook_endpoint":null}', - status: 200 - ) - client = Stripe::StripeClient.new("sk_test_123") - - event_destination = client.v2.core.event_destinations.update("id_123") - assert_requested :post, "#{Stripe::DEFAULT_API_BASE}/v2/core/event_destinations/id_123" - end should "Test v2 core event get (service)" do stub_request( :get, @@ -7806,32 +7865,6 @@ module Stripe assert_requested :get, "#{Stripe::DEFAULT_API_BASE}/v2/core/events/id_123" end should "Test v2 core vault gb bank account post (service)" do - stub_request( - :post, - "#{Stripe::DEFAULT_API_BASE}/v2/core/vault/gb_bank_accounts/id_123/acknowledge_confirmation_of_payee" - ).to_return( - body: '{"archived":true,"bank_account_type":"savings","bank_name":"bank_name","confirmation_of_payee":{"result":{"created":"1970-01-12T21:42:34.472Z","match_result":"unavailable","matched":{"business_type":null,"name":null},"message":"message","provided":{"business_type":"personal","name":"name"}},"status":"awaiting_acknowledgement"},"created":"1970-01-12T21:42:34.472Z","id":"obj_123","last4":"last4","object":"v2.core.vault.gb_bank_account","sort_code":"sort_code","livemode":true}', - status: 200 - ) - client = Stripe::StripeClient.new("sk_test_123") - - gb_bank_account = client.v2.core.vault.gb_bank_accounts.acknowledge_confirmation_of_payee("id_123") - assert_requested :post, "#{Stripe::DEFAULT_API_BASE}/v2/core/vault/gb_bank_accounts/id_123/acknowledge_confirmation_of_payee" - end - should "Test v2 core vault gb bank account post 2 (service)" do - stub_request( - :post, - "#{Stripe::DEFAULT_API_BASE}/v2/core/vault/gb_bank_accounts/id_123/archive" - ).to_return( - body: '{"archived":true,"bank_account_type":"savings","bank_name":"bank_name","confirmation_of_payee":{"result":{"created":"1970-01-12T21:42:34.472Z","match_result":"unavailable","matched":{"business_type":null,"name":null},"message":"message","provided":{"business_type":"personal","name":"name"}},"status":"awaiting_acknowledgement"},"created":"1970-01-12T21:42:34.472Z","id":"obj_123","last4":"last4","object":"v2.core.vault.gb_bank_account","sort_code":"sort_code","livemode":true}', - status: 200 - ) - client = Stripe::StripeClient.new("sk_test_123") - - gb_bank_account = client.v2.core.vault.gb_bank_accounts.archive("id_123") - assert_requested :post, "#{Stripe::DEFAULT_API_BASE}/v2/core/vault/gb_bank_accounts/id_123/archive" - end - should "Test v2 core vault gb bank account post 3 (service)" do stub_request(:post, "#{Stripe::DEFAULT_API_BASE}/v2/core/vault/gb_bank_accounts").to_return( body: '{"archived":true,"bank_account_type":"savings","bank_name":"bank_name","confirmation_of_payee":{"result":{"created":"1970-01-12T21:42:34.472Z","match_result":"unavailable","matched":{"business_type":null,"name":null},"message":"message","provided":{"business_type":"personal","name":"name"}},"status":"awaiting_acknowledgement"},"created":"1970-01-12T21:42:34.472Z","id":"obj_123","last4":"last4","object":"v2.core.vault.gb_bank_account","sort_code":"sort_code","livemode":true}', status: 200 @@ -7844,19 +7877,6 @@ module Stripe }) assert_requested :post, "#{Stripe::DEFAULT_API_BASE}/v2/core/vault/gb_bank_accounts" end - should "Test v2 core vault gb bank account post 4 (service)" do - stub_request( - :post, - "#{Stripe::DEFAULT_API_BASE}/v2/core/vault/gb_bank_accounts/id_123/initiate_confirmation_of_payee" - ).to_return( - body: '{"archived":true,"bank_account_type":"savings","bank_name":"bank_name","confirmation_of_payee":{"result":{"created":"1970-01-12T21:42:34.472Z","match_result":"unavailable","matched":{"business_type":null,"name":null},"message":"message","provided":{"business_type":"personal","name":"name"}},"status":"awaiting_acknowledgement"},"created":"1970-01-12T21:42:34.472Z","id":"obj_123","last4":"last4","object":"v2.core.vault.gb_bank_account","sort_code":"sort_code","livemode":true}', - status: 200 - ) - client = Stripe::StripeClient.new("sk_test_123") - - gb_bank_account = client.v2.core.vault.gb_bank_accounts.initiate_confirmation_of_payee("id_123") - assert_requested :post, "#{Stripe::DEFAULT_API_BASE}/v2/core/vault/gb_bank_accounts/id_123/initiate_confirmation_of_payee" - end should "Test v2 core vault gb bank account get (service)" do stub_request( :get, @@ -7870,20 +7890,46 @@ module Stripe gb_bank_account = client.v2.core.vault.gb_bank_accounts.retrieve("id_123") assert_requested :get, "#{Stripe::DEFAULT_API_BASE}/v2/core/vault/gb_bank_accounts/id_123" end - should "Test v2 core vault us bank account post (service)" do + should "Test v2 core vault gb bank account post 2 (service)" do stub_request( :post, - "#{Stripe::DEFAULT_API_BASE}/v2/core/vault/us_bank_accounts/id_123/archive" + "#{Stripe::DEFAULT_API_BASE}/v2/core/vault/gb_bank_accounts/id_123/acknowledge_confirmation_of_payee" ).to_return( - body: '{"archived":true,"bank_account_type":"savings","bank_name":"bank_name","created":"1970-01-12T21:42:34.472Z","fedwire_routing_number":null,"id":"obj_123","last4":"last4","object":"v2.core.vault.us_bank_account","routing_number":null,"livemode":true}', + body: '{"archived":true,"bank_account_type":"savings","bank_name":"bank_name","confirmation_of_payee":{"result":{"created":"1970-01-12T21:42:34.472Z","match_result":"unavailable","matched":{"business_type":null,"name":null},"message":"message","provided":{"business_type":"personal","name":"name"}},"status":"awaiting_acknowledgement"},"created":"1970-01-12T21:42:34.472Z","id":"obj_123","last4":"last4","object":"v2.core.vault.gb_bank_account","sort_code":"sort_code","livemode":true}', status: 200 ) client = Stripe::StripeClient.new("sk_test_123") - us_bank_account = client.v2.core.vault.us_bank_accounts.archive("id_123") - assert_requested :post, "#{Stripe::DEFAULT_API_BASE}/v2/core/vault/us_bank_accounts/id_123/archive" + gb_bank_account = client.v2.core.vault.gb_bank_accounts.acknowledge_confirmation_of_payee("id_123") + assert_requested :post, "#{Stripe::DEFAULT_API_BASE}/v2/core/vault/gb_bank_accounts/id_123/acknowledge_confirmation_of_payee" end - should "Test v2 core vault us bank account post 2 (service)" do + should "Test v2 core vault gb bank account post 3 (service)" do + stub_request( + :post, + "#{Stripe::DEFAULT_API_BASE}/v2/core/vault/gb_bank_accounts/id_123/archive" + ).to_return( + body: '{"archived":true,"bank_account_type":"savings","bank_name":"bank_name","confirmation_of_payee":{"result":{"created":"1970-01-12T21:42:34.472Z","match_result":"unavailable","matched":{"business_type":null,"name":null},"message":"message","provided":{"business_type":"personal","name":"name"}},"status":"awaiting_acknowledgement"},"created":"1970-01-12T21:42:34.472Z","id":"obj_123","last4":"last4","object":"v2.core.vault.gb_bank_account","sort_code":"sort_code","livemode":true}', + status: 200 + ) + client = Stripe::StripeClient.new("sk_test_123") + + gb_bank_account = client.v2.core.vault.gb_bank_accounts.archive("id_123") + assert_requested :post, "#{Stripe::DEFAULT_API_BASE}/v2/core/vault/gb_bank_accounts/id_123/archive" + end + should "Test v2 core vault gb bank account post 4 (service)" do + stub_request( + :post, + "#{Stripe::DEFAULT_API_BASE}/v2/core/vault/gb_bank_accounts/id_123/initiate_confirmation_of_payee" + ).to_return( + body: '{"archived":true,"bank_account_type":"savings","bank_name":"bank_name","confirmation_of_payee":{"result":{"created":"1970-01-12T21:42:34.472Z","match_result":"unavailable","matched":{"business_type":null,"name":null},"message":"message","provided":{"business_type":"personal","name":"name"}},"status":"awaiting_acknowledgement"},"created":"1970-01-12T21:42:34.472Z","id":"obj_123","last4":"last4","object":"v2.core.vault.gb_bank_account","sort_code":"sort_code","livemode":true}', + status: 200 + ) + client = Stripe::StripeClient.new("sk_test_123") + + gb_bank_account = client.v2.core.vault.gb_bank_accounts.initiate_confirmation_of_payee("id_123") + assert_requested :post, "#{Stripe::DEFAULT_API_BASE}/v2/core/vault/gb_bank_accounts/id_123/initiate_confirmation_of_payee" + end + should "Test v2 core vault us bank account post (service)" do stub_request(:post, "#{Stripe::DEFAULT_API_BASE}/v2/core/vault/us_bank_accounts").to_return( body: '{"archived":true,"bank_account_type":"savings","bank_name":"bank_name","created":"1970-01-12T21:42:34.472Z","fedwire_routing_number":null,"id":"obj_123","last4":"last4","object":"v2.core.vault.us_bank_account","routing_number":null,"livemode":true}', status: 200 @@ -7908,7 +7954,7 @@ module Stripe us_bank_account = client.v2.core.vault.us_bank_accounts.retrieve("id_123") assert_requested :get, "#{Stripe::DEFAULT_API_BASE}/v2/core/vault/us_bank_accounts/id_123" end - should "Test v2 core vault us bank account post 3 (service)" do + should "Test v2 core vault us bank account post 2 (service)" do stub_request( :post, "#{Stripe::DEFAULT_API_BASE}/v2/core/vault/us_bank_accounts/id_123" @@ -7921,6 +7967,19 @@ module Stripe us_bank_account = client.v2.core.vault.us_bank_accounts.update("id_123") assert_requested :post, "#{Stripe::DEFAULT_API_BASE}/v2/core/vault/us_bank_accounts/id_123" end + should "Test v2 core vault us bank account post 3 (service)" do + stub_request( + :post, + "#{Stripe::DEFAULT_API_BASE}/v2/core/vault/us_bank_accounts/id_123/archive" + ).to_return( + body: '{"archived":true,"bank_account_type":"savings","bank_name":"bank_name","created":"1970-01-12T21:42:34.472Z","fedwire_routing_number":null,"id":"obj_123","last4":"last4","object":"v2.core.vault.us_bank_account","routing_number":null,"livemode":true}', + status: 200 + ) + client = Stripe::StripeClient.new("sk_test_123") + + us_bank_account = client.v2.core.vault.us_bank_accounts.archive("id_123") + assert_requested :post, "#{Stripe::DEFAULT_API_BASE}/v2/core/vault/us_bank_accounts/id_123/archive" + end should "Test v2 money management adjustment get (service)" do stub_request(:get, "#{Stripe::DEFAULT_API_BASE}/v2/money_management/adjustments").to_return( body: '{"data":[{"adjusted_flow":null,"amount":{"currency":"USD","value":96},"created":"1970-01-12T21:42:34.472Z","description":null,"financial_account":"financial_account","id":"obj_123","object":"v2.money_management.adjustment","receipt_url":null,"livemode":true}],"next_page_url":null,"previous_page_url":null}', @@ -7970,6 +8029,19 @@ module Stripe financial_account = client.v2.money_management.financial_accounts.retrieve("id_123") assert_requested :get, "#{Stripe::DEFAULT_API_BASE}/v2/money_management/financial_accounts/id_123" end + should "Test v2 money management financial address get (service)" do + stub_request( + :get, + "#{Stripe::DEFAULT_API_BASE}/v2/money_management/financial_addresses" + ).to_return( + body: '{"data":[{"created":"1970-01-12T21:42:34.472Z","credentials":null,"currency":"stn","financial_account":"financial_account","id":"obj_123","object":"v2.money_management.financial_address","status":"failed","livemode":true}],"next_page_url":null,"previous_page_url":null}', + status: 200 + ) + client = Stripe::StripeClient.new("sk_test_123") + + financial_addresses = client.v2.money_management.financial_addresses.list + assert_requested :get, "#{Stripe::DEFAULT_API_BASE}/v2/money_management/financial_addresses" + end should "Test v2 money management financial address post (service)" do stub_request( :post, @@ -7986,19 +8058,6 @@ module Stripe }) assert_requested :post, "#{Stripe::DEFAULT_API_BASE}/v2/money_management/financial_addresses" end - should "Test v2 money management financial address get (service)" do - stub_request( - :get, - "#{Stripe::DEFAULT_API_BASE}/v2/money_management/financial_addresses" - ).to_return( - body: '{"data":[{"created":"1970-01-12T21:42:34.472Z","credentials":null,"currency":"stn","financial_account":"financial_account","id":"obj_123","object":"v2.money_management.financial_address","status":"failed","livemode":true}],"next_page_url":null,"previous_page_url":null}', - status: 200 - ) - client = Stripe::StripeClient.new("sk_test_123") - - financial_addresses = client.v2.money_management.financial_addresses.list - assert_requested :get, "#{Stripe::DEFAULT_API_BASE}/v2/money_management/financial_addresses" - end should "Test v2 money management financial address get 2 (service)" do stub_request( :get, @@ -8012,6 +8071,19 @@ module Stripe financial_address = client.v2.money_management.financial_addresses.retrieve("id_123") assert_requested :get, "#{Stripe::DEFAULT_API_BASE}/v2/money_management/financial_addresses/id_123" end + should "Test v2 money management inbound transfer get (service)" do + stub_request( + :get, + "#{Stripe::DEFAULT_API_BASE}/v2/money_management/inbound_transfers" + ).to_return( + body: '{"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","us_bank_account":null}},"id":"obj_123","object":"v2.money_management.inbound_transfer","receipt_url":null,"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","bank_debit_failed":null,"bank_debit_processing":null,"bank_debit_queued":null,"bank_debit_returned":null,"bank_debit_succeeded":null}],"livemode":true}],"next_page_url":null,"previous_page_url":null}', + status: 200 + ) + client = Stripe::StripeClient.new("sk_test_123") + + inbound_transfers = client.v2.money_management.inbound_transfers.list + assert_requested :get, "#{Stripe::DEFAULT_API_BASE}/v2/money_management/inbound_transfers" + end should "Test v2 money management inbound transfer post (service)" do stub_request( :post, @@ -8038,19 +8110,6 @@ module Stripe }) assert_requested :post, "#{Stripe::DEFAULT_API_BASE}/v2/money_management/inbound_transfers" end - should "Test v2 money management inbound transfer get (service)" do - stub_request( - :get, - "#{Stripe::DEFAULT_API_BASE}/v2/money_management/inbound_transfers" - ).to_return( - body: '{"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","us_bank_account":null}},"id":"obj_123","object":"v2.money_management.inbound_transfer","receipt_url":null,"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","bank_debit_failed":null,"bank_debit_processing":null,"bank_debit_queued":null,"bank_debit_returned":null,"bank_debit_succeeded":null}],"livemode":true}],"next_page_url":null,"previous_page_url":null}', - status: 200 - ) - client = Stripe::StripeClient.new("sk_test_123") - - inbound_transfers = client.v2.money_management.inbound_transfers.list - assert_requested :get, "#{Stripe::DEFAULT_API_BASE}/v2/money_management/inbound_transfers" - end should "Test v2 money management inbound transfer get 2 (service)" do stub_request( :get, @@ -8064,72 +8123,6 @@ module Stripe inbound_transfer = client.v2.money_management.inbound_transfers.retrieve("id_123") assert_requested :get, "#{Stripe::DEFAULT_API_BASE}/v2/money_management/inbound_transfers/id_123" end - should "Test v2 money management outbound payment post (service)" do - stub_request( - :post, - "#{Stripe::DEFAULT_API_BASE}/v2/money_management/outbound_payments/id_123/cancel" - ).to_return( - body: '{"amount":{"currency":"USD","value":96},"cancelable":true,"created":"1970-01-12T21:42:34.472Z","delivery_options":null,"description":null,"expected_arrival_date":null,"from":{"debited":{"currency":"USD","value":55},"financial_account":"financial_account"},"id":"obj_123","metadata":null,"object":"v2.money_management.outbound_payment","outbound_payment_quote":null,"receipt_url":null,"recipient_notification":{"setting":"configured"},"statement_descriptor":"statement_descriptor","status":"canceled","status_details":null,"status_transitions":null,"to":{"credited":{"currency":"USD","value":68},"payout_method":"payout_method","recipient":"recipient"},"trace_id":{"status":"pending","value":null},"livemode":true}', - status: 200 - ) - client = Stripe::StripeClient.new("sk_test_123") - - outbound_payment = client.v2.money_management.outbound_payments.cancel("id_123") - assert_requested :post, "#{Stripe::DEFAULT_API_BASE}/v2/money_management/outbound_payments/id_123/cancel" - end - should "Test v2 money management outbound payment post 2 (service)" do - stub_request( - :post, - "#{Stripe::DEFAULT_API_BASE}/v2/money_management/outbound_payments" - ).to_return( - body: '{"amount":{"currency":"USD","value":96},"cancelable":true,"created":"1970-01-12T21:42:34.472Z","delivery_options":null,"description":null,"expected_arrival_date":null,"from":{"debited":{"currency":"USD","value":55},"financial_account":"financial_account"},"id":"obj_123","metadata":null,"object":"v2.money_management.outbound_payment","outbound_payment_quote":null,"receipt_url":null,"recipient_notification":{"setting":"configured"},"statement_descriptor":"statement_descriptor","status":"canceled","status_details":null,"status_transitions":null,"to":{"credited":{"currency":"USD","value":68},"payout_method":"payout_method","recipient":"recipient"},"trace_id":{"status":"pending","value":null},"livemode":true}', - status: 200 - ) - client = Stripe::StripeClient.new("sk_test_123") - - outbound_payment = client.v2.money_management.outbound_payments.create({ - amount: { - currency: "USD", - value: 96, - }, - from: { - currency: "currency", - financial_account: "financial_account", - }, - to: { - currency: "currency", - payout_method: "payout_method", - recipient: "recipient", - }, - }) - assert_requested :post, "#{Stripe::DEFAULT_API_BASE}/v2/money_management/outbound_payments" - end - should "Test v2 money management outbound payment get (service)" do - stub_request( - :get, - "#{Stripe::DEFAULT_API_BASE}/v2/money_management/outbound_payments" - ).to_return( - body: '{"data":[{"amount":{"currency":"USD","value":96},"cancelable":true,"created":"1970-01-12T21:42:34.472Z","delivery_options":null,"description":null,"expected_arrival_date":null,"from":{"debited":{"currency":"USD","value":55},"financial_account":"financial_account"},"id":"obj_123","metadata":null,"object":"v2.money_management.outbound_payment","outbound_payment_quote":null,"receipt_url":null,"recipient_notification":{"setting":"configured"},"statement_descriptor":"statement_descriptor","status":"canceled","status_details":null,"status_transitions":null,"to":{"credited":{"currency":"USD","value":68},"payout_method":"payout_method","recipient":"recipient"},"trace_id":{"status":"pending","value":null},"livemode":true}],"next_page_url":null,"previous_page_url":null}', - status: 200 - ) - client = Stripe::StripeClient.new("sk_test_123") - - outbound_payments = client.v2.money_management.outbound_payments.list - assert_requested :get, "#{Stripe::DEFAULT_API_BASE}/v2/money_management/outbound_payments" - end - should "Test v2 money management outbound payment get 2 (service)" do - stub_request( - :get, - "#{Stripe::DEFAULT_API_BASE}/v2/money_management/outbound_payments/id_123" - ).to_return( - body: '{"amount":{"currency":"USD","value":96},"cancelable":true,"created":"1970-01-12T21:42:34.472Z","delivery_options":null,"description":null,"expected_arrival_date":null,"from":{"debited":{"currency":"USD","value":55},"financial_account":"financial_account"},"id":"obj_123","metadata":null,"object":"v2.money_management.outbound_payment","outbound_payment_quote":null,"receipt_url":null,"recipient_notification":{"setting":"configured"},"statement_descriptor":"statement_descriptor","status":"canceled","status_details":null,"status_transitions":null,"to":{"credited":{"currency":"USD","value":68},"payout_method":"payout_method","recipient":"recipient"},"trace_id":{"status":"pending","value":null},"livemode":true}', - status: 200 - ) - client = Stripe::StripeClient.new("sk_test_123") - - outbound_payment = client.v2.money_management.outbound_payments.retrieve("id_123") - assert_requested :get, "#{Stripe::DEFAULT_API_BASE}/v2/money_management/outbound_payments/id_123" - end should "Test v2 money management outbound payment quote post (service)" do stub_request( :post, @@ -8170,20 +8163,151 @@ module Stripe outbound_payment_quote = client.v2.money_management.outbound_payment_quotes.retrieve("id_123") assert_requested :get, "#{Stripe::DEFAULT_API_BASE}/v2/money_management/outbound_payment_quotes/id_123" end - should "Test v2 money management outbound transfer post (service)" do + should "Test v2 money management outbound payment get (service)" do stub_request( - :post, - "#{Stripe::DEFAULT_API_BASE}/v2/money_management/outbound_transfers/id_123/cancel" + :get, + "#{Stripe::DEFAULT_API_BASE}/v2/money_management/outbound_payments" ).to_return( - body: '{"amount":{"currency":"USD","value":96},"cancelable":true,"created":"1970-01-12T21:42:34.472Z","delivery_options":null,"description":null,"expected_arrival_date":null,"from":{"debited":{"currency":"USD","value":55},"financial_account":"financial_account"},"id":"obj_123","metadata":null,"object":"v2.money_management.outbound_transfer","receipt_url":null,"statement_descriptor":"statement_descriptor","status":"canceled","status_details":null,"status_transitions":null,"to":{"credited":{"currency":"USD","value":68},"payout_method":"payout_method"},"trace_id":{"status":"pending","value":null},"livemode":true}', + body: '{"data":[{"amount":{"currency":"USD","value":96},"cancelable":true,"created":"1970-01-12T21:42:34.472Z","delivery_options":null,"description":null,"expected_arrival_date":null,"from":{"debited":{"currency":"USD","value":55},"financial_account":"financial_account"},"id":"obj_123","metadata":null,"object":"v2.money_management.outbound_payment","outbound_payment_quote":null,"receipt_url":null,"recipient_notification":{"setting":"configured"},"statement_descriptor":"statement_descriptor","status":"canceled","status_details":null,"status_transitions":null,"to":{"credited":{"currency":"USD","value":68},"payout_method":"payout_method","recipient":"recipient"},"trace_id":{"status":"pending","value":null},"livemode":true}],"next_page_url":null,"previous_page_url":null}', status: 200 ) client = Stripe::StripeClient.new("sk_test_123") - outbound_transfer = client.v2.money_management.outbound_transfers.cancel("id_123") - assert_requested :post, "#{Stripe::DEFAULT_API_BASE}/v2/money_management/outbound_transfers/id_123/cancel" + outbound_payments = client.v2.money_management.outbound_payments.list + assert_requested :get, "#{Stripe::DEFAULT_API_BASE}/v2/money_management/outbound_payments" end - should "Test v2 money management outbound transfer post 2 (service)" do + should "Test v2 money management outbound payment post (service)" do + stub_request( + :post, + "#{Stripe::DEFAULT_API_BASE}/v2/money_management/outbound_payments" + ).to_return( + body: '{"amount":{"currency":"USD","value":96},"cancelable":true,"created":"1970-01-12T21:42:34.472Z","delivery_options":null,"description":null,"expected_arrival_date":null,"from":{"debited":{"currency":"USD","value":55},"financial_account":"financial_account"},"id":"obj_123","metadata":null,"object":"v2.money_management.outbound_payment","outbound_payment_quote":null,"receipt_url":null,"recipient_notification":{"setting":"configured"},"statement_descriptor":"statement_descriptor","status":"canceled","status_details":null,"status_transitions":null,"to":{"credited":{"currency":"USD","value":68},"payout_method":"payout_method","recipient":"recipient"},"trace_id":{"status":"pending","value":null},"livemode":true}', + status: 200 + ) + client = Stripe::StripeClient.new("sk_test_123") + + outbound_payment = client.v2.money_management.outbound_payments.create({ + amount: { + currency: "USD", + value: 96, + }, + from: { + currency: "currency", + financial_account: "financial_account", + }, + to: { + currency: "currency", + payout_method: "payout_method", + recipient: "recipient", + }, + }) + assert_requested :post, "#{Stripe::DEFAULT_API_BASE}/v2/money_management/outbound_payments" + end + should "Test v2 money management outbound payment get 2 (service)" do + stub_request( + :get, + "#{Stripe::DEFAULT_API_BASE}/v2/money_management/outbound_payments/id_123" + ).to_return( + body: '{"amount":{"currency":"USD","value":96},"cancelable":true,"created":"1970-01-12T21:42:34.472Z","delivery_options":null,"description":null,"expected_arrival_date":null,"from":{"debited":{"currency":"USD","value":55},"financial_account":"financial_account"},"id":"obj_123","metadata":null,"object":"v2.money_management.outbound_payment","outbound_payment_quote":null,"receipt_url":null,"recipient_notification":{"setting":"configured"},"statement_descriptor":"statement_descriptor","status":"canceled","status_details":null,"status_transitions":null,"to":{"credited":{"currency":"USD","value":68},"payout_method":"payout_method","recipient":"recipient"},"trace_id":{"status":"pending","value":null},"livemode":true}', + status: 200 + ) + client = Stripe::StripeClient.new("sk_test_123") + + outbound_payment = client.v2.money_management.outbound_payments.retrieve("id_123") + assert_requested :get, "#{Stripe::DEFAULT_API_BASE}/v2/money_management/outbound_payments/id_123" + end + should "Test v2 money management outbound payment post 2 (service)" do + stub_request( + :post, + "#{Stripe::DEFAULT_API_BASE}/v2/money_management/outbound_payments/id_123/cancel" + ).to_return( + body: '{"amount":{"currency":"USD","value":96},"cancelable":true,"created":"1970-01-12T21:42:34.472Z","delivery_options":null,"description":null,"expected_arrival_date":null,"from":{"debited":{"currency":"USD","value":55},"financial_account":"financial_account"},"id":"obj_123","metadata":null,"object":"v2.money_management.outbound_payment","outbound_payment_quote":null,"receipt_url":null,"recipient_notification":{"setting":"configured"},"statement_descriptor":"statement_descriptor","status":"canceled","status_details":null,"status_transitions":null,"to":{"credited":{"currency":"USD","value":68},"payout_method":"payout_method","recipient":"recipient"},"trace_id":{"status":"pending","value":null},"livemode":true}', + status: 200 + ) + client = Stripe::StripeClient.new("sk_test_123") + + outbound_payment = client.v2.money_management.outbound_payments.cancel("id_123") + assert_requested :post, "#{Stripe::DEFAULT_API_BASE}/v2/money_management/outbound_payments/id_123/cancel" + end + should "Test v2 money management outbound setup intent get (service)" do + stub_request( + :get, + "#{Stripe::DEFAULT_API_BASE}/v2/money_management/outbound_setup_intents" + ).to_return( + body: '{"data":[{"created":"1970-01-12T21:42:34.472Z","id":"obj_123","next_action":null,"object":"v2.money_management.outbound_setup_intent","payout_method":{"available_payout_speeds":["standard"],"created":"1970-01-12T21:42:34.472Z","id":"obj_123","latest_outbound_setup_intent":null,"object":"v2.money_management.payout_method","type":"bank_account","usage_status":{"payments":"requires_action","transfers":"invalid"},"livemode":true,"bank_account":null,"card":null},"status":"requires_payout_method","usage_intent":"payment","livemode":true}],"next_page_url":null,"previous_page_url":null}', + status: 200 + ) + client = Stripe::StripeClient.new("sk_test_123") + + outbound_setup_intents = client.v2.money_management.outbound_setup_intents.list + assert_requested :get, "#{Stripe::DEFAULT_API_BASE}/v2/money_management/outbound_setup_intents" + end + should "Test v2 money management outbound setup intent post (service)" do + stub_request( + :post, + "#{Stripe::DEFAULT_API_BASE}/v2/money_management/outbound_setup_intents" + ).to_return( + body: '{"created":"1970-01-12T21:42:34.472Z","id":"obj_123","next_action":null,"object":"v2.money_management.outbound_setup_intent","payout_method":{"available_payout_speeds":["standard"],"created":"1970-01-12T21:42:34.472Z","id":"obj_123","latest_outbound_setup_intent":null,"object":"v2.money_management.payout_method","type":"bank_account","usage_status":{"payments":"requires_action","transfers":"invalid"},"livemode":true,"bank_account":null,"card":null},"status":"requires_payout_method","usage_intent":"payment","livemode":true}', + status: 200 + ) + client = Stripe::StripeClient.new("sk_test_123") + + outbound_setup_intent = client.v2.money_management.outbound_setup_intents.create + assert_requested :post, "#{Stripe::DEFAULT_API_BASE}/v2/money_management/outbound_setup_intents" + end + should "Test v2 money management outbound setup intent get 2 (service)" do + stub_request( + :get, + "#{Stripe::DEFAULT_API_BASE}/v2/money_management/outbound_setup_intents/id_123" + ).to_return( + body: '{"created":"1970-01-12T21:42:34.472Z","id":"obj_123","next_action":null,"object":"v2.money_management.outbound_setup_intent","payout_method":{"available_payout_speeds":["standard"],"created":"1970-01-12T21:42:34.472Z","id":"obj_123","latest_outbound_setup_intent":null,"object":"v2.money_management.payout_method","type":"bank_account","usage_status":{"payments":"requires_action","transfers":"invalid"},"livemode":true,"bank_account":null,"card":null},"status":"requires_payout_method","usage_intent":"payment","livemode":true}', + status: 200 + ) + client = Stripe::StripeClient.new("sk_test_123") + + outbound_setup_intent = client.v2.money_management.outbound_setup_intents.retrieve("id_123") + assert_requested :get, "#{Stripe::DEFAULT_API_BASE}/v2/money_management/outbound_setup_intents/id_123" + end + should "Test v2 money management outbound setup intent post 2 (service)" do + stub_request( + :post, + "#{Stripe::DEFAULT_API_BASE}/v2/money_management/outbound_setup_intents/id_123" + ).to_return( + body: '{"created":"1970-01-12T21:42:34.472Z","id":"obj_123","next_action":null,"object":"v2.money_management.outbound_setup_intent","payout_method":{"available_payout_speeds":["standard"],"created":"1970-01-12T21:42:34.472Z","id":"obj_123","latest_outbound_setup_intent":null,"object":"v2.money_management.payout_method","type":"bank_account","usage_status":{"payments":"requires_action","transfers":"invalid"},"livemode":true,"bank_account":null,"card":null},"status":"requires_payout_method","usage_intent":"payment","livemode":true}', + status: 200 + ) + client = Stripe::StripeClient.new("sk_test_123") + + outbound_setup_intent = client.v2.money_management.outbound_setup_intents.update("id_123") + assert_requested :post, "#{Stripe::DEFAULT_API_BASE}/v2/money_management/outbound_setup_intents/id_123" + end + should "Test v2 money management outbound setup intent post 3 (service)" do + stub_request( + :post, + "#{Stripe::DEFAULT_API_BASE}/v2/money_management/outbound_setup_intents/id_123/cancel" + ).to_return( + body: '{"created":"1970-01-12T21:42:34.472Z","id":"obj_123","next_action":null,"object":"v2.money_management.outbound_setup_intent","payout_method":{"available_payout_speeds":["standard"],"created":"1970-01-12T21:42:34.472Z","id":"obj_123","latest_outbound_setup_intent":null,"object":"v2.money_management.payout_method","type":"bank_account","usage_status":{"payments":"requires_action","transfers":"invalid"},"livemode":true,"bank_account":null,"card":null},"status":"requires_payout_method","usage_intent":"payment","livemode":true}', + status: 200 + ) + client = Stripe::StripeClient.new("sk_test_123") + + outbound_setup_intent = client.v2.money_management.outbound_setup_intents.cancel("id_123") + assert_requested :post, "#{Stripe::DEFAULT_API_BASE}/v2/money_management/outbound_setup_intents/id_123/cancel" + end + should "Test v2 money management outbound transfer get (service)" do + stub_request( + :get, + "#{Stripe::DEFAULT_API_BASE}/v2/money_management/outbound_transfers" + ).to_return( + body: '{"data":[{"amount":{"currency":"USD","value":96},"cancelable":true,"created":"1970-01-12T21:42:34.472Z","delivery_options":null,"description":null,"expected_arrival_date":null,"from":{"debited":{"currency":"USD","value":55},"financial_account":"financial_account"},"id":"obj_123","metadata":null,"object":"v2.money_management.outbound_transfer","receipt_url":null,"statement_descriptor":"statement_descriptor","status":"canceled","status_details":null,"status_transitions":null,"to":{"credited":{"currency":"USD","value":68},"payout_method":"payout_method"},"trace_id":{"status":"pending","value":null},"livemode":true}],"next_page_url":null,"previous_page_url":null}', + status: 200 + ) + client = Stripe::StripeClient.new("sk_test_123") + + outbound_transfers = client.v2.money_management.outbound_transfers.list + assert_requested :get, "#{Stripe::DEFAULT_API_BASE}/v2/money_management/outbound_transfers" + end + should "Test v2 money management outbound transfer post (service)" do stub_request( :post, "#{Stripe::DEFAULT_API_BASE}/v2/money_management/outbound_transfers" @@ -8209,19 +8333,6 @@ module Stripe }) assert_requested :post, "#{Stripe::DEFAULT_API_BASE}/v2/money_management/outbound_transfers" end - should "Test v2 money management outbound transfer get (service)" do - stub_request( - :get, - "#{Stripe::DEFAULT_API_BASE}/v2/money_management/outbound_transfers" - ).to_return( - body: '{"data":[{"amount":{"currency":"USD","value":96},"cancelable":true,"created":"1970-01-12T21:42:34.472Z","delivery_options":null,"description":null,"expected_arrival_date":null,"from":{"debited":{"currency":"USD","value":55},"financial_account":"financial_account"},"id":"obj_123","metadata":null,"object":"v2.money_management.outbound_transfer","receipt_url":null,"statement_descriptor":"statement_descriptor","status":"canceled","status_details":null,"status_transitions":null,"to":{"credited":{"currency":"USD","value":68},"payout_method":"payout_method"},"trace_id":{"status":"pending","value":null},"livemode":true}],"next_page_url":null,"previous_page_url":null}', - status: 200 - ) - client = Stripe::StripeClient.new("sk_test_123") - - outbound_transfers = client.v2.money_management.outbound_transfers.list - assert_requested :get, "#{Stripe::DEFAULT_API_BASE}/v2/money_management/outbound_transfers" - end should "Test v2 money management outbound transfer get 2 (service)" do stub_request( :get, @@ -8235,83 +8346,18 @@ module Stripe outbound_transfer = client.v2.money_management.outbound_transfers.retrieve("id_123") assert_requested :get, "#{Stripe::DEFAULT_API_BASE}/v2/money_management/outbound_transfers/id_123" end - should "Test v2 money management outbound setup intent post (service)" do + should "Test v2 money management outbound transfer post 2 (service)" do stub_request( :post, - "#{Stripe::DEFAULT_API_BASE}/v2/money_management/outbound_setup_intents/id_123/cancel" + "#{Stripe::DEFAULT_API_BASE}/v2/money_management/outbound_transfers/id_123/cancel" ).to_return( - body: '{"created":"1970-01-12T21:42:34.472Z","id":"obj_123","next_action":null,"object":"v2.money_management.outbound_setup_intent","payout_method":{"available_payout_speeds":["standard"],"created":"1970-01-12T21:42:34.472Z","id":"obj_123","latest_outbound_setup_intent":null,"object":"v2.money_management.payout_method","type":"bank_account","usage_status":{"payments":"requires_action","transfers":"invalid"},"livemode":true,"bank_account":null,"card":null},"status":"requires_payout_method","usage_intent":"payment","livemode":true}', + body: '{"amount":{"currency":"USD","value":96},"cancelable":true,"created":"1970-01-12T21:42:34.472Z","delivery_options":null,"description":null,"expected_arrival_date":null,"from":{"debited":{"currency":"USD","value":55},"financial_account":"financial_account"},"id":"obj_123","metadata":null,"object":"v2.money_management.outbound_transfer","receipt_url":null,"statement_descriptor":"statement_descriptor","status":"canceled","status_details":null,"status_transitions":null,"to":{"credited":{"currency":"USD","value":68},"payout_method":"payout_method"},"trace_id":{"status":"pending","value":null},"livemode":true}', status: 200 ) client = Stripe::StripeClient.new("sk_test_123") - outbound_setup_intent = client.v2.money_management.outbound_setup_intents.cancel("id_123") - assert_requested :post, "#{Stripe::DEFAULT_API_BASE}/v2/money_management/outbound_setup_intents/id_123/cancel" - end - should "Test v2 money management outbound setup intent post 2 (service)" do - stub_request( - :post, - "#{Stripe::DEFAULT_API_BASE}/v2/money_management/outbound_setup_intents" - ).to_return( - body: '{"created":"1970-01-12T21:42:34.472Z","id":"obj_123","next_action":null,"object":"v2.money_management.outbound_setup_intent","payout_method":{"available_payout_speeds":["standard"],"created":"1970-01-12T21:42:34.472Z","id":"obj_123","latest_outbound_setup_intent":null,"object":"v2.money_management.payout_method","type":"bank_account","usage_status":{"payments":"requires_action","transfers":"invalid"},"livemode":true,"bank_account":null,"card":null},"status":"requires_payout_method","usage_intent":"payment","livemode":true}', - status: 200 - ) - client = Stripe::StripeClient.new("sk_test_123") - - outbound_setup_intent = client.v2.money_management.outbound_setup_intents.create - assert_requested :post, "#{Stripe::DEFAULT_API_BASE}/v2/money_management/outbound_setup_intents" - end - should "Test v2 money management outbound setup intent get (service)" do - stub_request( - :get, - "#{Stripe::DEFAULT_API_BASE}/v2/money_management/outbound_setup_intents" - ).to_return( - body: '{"data":[{"created":"1970-01-12T21:42:34.472Z","id":"obj_123","next_action":null,"object":"v2.money_management.outbound_setup_intent","payout_method":{"available_payout_speeds":["standard"],"created":"1970-01-12T21:42:34.472Z","id":"obj_123","latest_outbound_setup_intent":null,"object":"v2.money_management.payout_method","type":"bank_account","usage_status":{"payments":"requires_action","transfers":"invalid"},"livemode":true,"bank_account":null,"card":null},"status":"requires_payout_method","usage_intent":"payment","livemode":true}],"next_page_url":null,"previous_page_url":null}', - status: 200 - ) - client = Stripe::StripeClient.new("sk_test_123") - - outbound_setup_intents = client.v2.money_management.outbound_setup_intents.list - assert_requested :get, "#{Stripe::DEFAULT_API_BASE}/v2/money_management/outbound_setup_intents" - end - should "Test v2 money management outbound setup intent get 2 (service)" do - stub_request( - :get, - "#{Stripe::DEFAULT_API_BASE}/v2/money_management/outbound_setup_intents/id_123" - ).to_return( - body: '{"created":"1970-01-12T21:42:34.472Z","id":"obj_123","next_action":null,"object":"v2.money_management.outbound_setup_intent","payout_method":{"available_payout_speeds":["standard"],"created":"1970-01-12T21:42:34.472Z","id":"obj_123","latest_outbound_setup_intent":null,"object":"v2.money_management.payout_method","type":"bank_account","usage_status":{"payments":"requires_action","transfers":"invalid"},"livemode":true,"bank_account":null,"card":null},"status":"requires_payout_method","usage_intent":"payment","livemode":true}', - status: 200 - ) - client = Stripe::StripeClient.new("sk_test_123") - - outbound_setup_intent = client.v2.money_management.outbound_setup_intents.retrieve("id_123") - assert_requested :get, "#{Stripe::DEFAULT_API_BASE}/v2/money_management/outbound_setup_intents/id_123" - end - should "Test v2 money management outbound setup intent post 3 (service)" do - stub_request( - :post, - "#{Stripe::DEFAULT_API_BASE}/v2/money_management/outbound_setup_intents/id_123" - ).to_return( - body: '{"created":"1970-01-12T21:42:34.472Z","id":"obj_123","next_action":null,"object":"v2.money_management.outbound_setup_intent","payout_method":{"available_payout_speeds":["standard"],"created":"1970-01-12T21:42:34.472Z","id":"obj_123","latest_outbound_setup_intent":null,"object":"v2.money_management.payout_method","type":"bank_account","usage_status":{"payments":"requires_action","transfers":"invalid"},"livemode":true,"bank_account":null,"card":null},"status":"requires_payout_method","usage_intent":"payment","livemode":true}', - status: 200 - ) - client = Stripe::StripeClient.new("sk_test_123") - - outbound_setup_intent = client.v2.money_management.outbound_setup_intents.update("id_123") - assert_requested :post, "#{Stripe::DEFAULT_API_BASE}/v2/money_management/outbound_setup_intents/id_123" - end - should "Test v2 money management payout method post (service)" do - stub_request( - :post, - "#{Stripe::DEFAULT_API_BASE}/v2/money_management/payout_methods/id_123/archive" - ).to_return( - body: '{"available_payout_speeds":["standard"],"created":"1970-01-12T21:42:34.472Z","id":"obj_123","latest_outbound_setup_intent":null,"object":"v2.money_management.payout_method","type":"bank_account","usage_status":{"payments":"requires_action","transfers":"invalid"},"livemode":true,"bank_account":null,"card":null}', - status: 200 - ) - client = Stripe::StripeClient.new("sk_test_123") - - payout_method = client.v2.money_management.payout_methods.archive("id_123") - assert_requested :post, "#{Stripe::DEFAULT_API_BASE}/v2/money_management/payout_methods/id_123/archive" + outbound_transfer = client.v2.money_management.outbound_transfers.cancel("id_123") + assert_requested :post, "#{Stripe::DEFAULT_API_BASE}/v2/money_management/outbound_transfers/id_123/cancel" end should "Test v2 money management payout method get (service)" do stub_request( @@ -8339,6 +8385,19 @@ module Stripe payout_method = client.v2.money_management.payout_methods.retrieve("id_123") assert_requested :get, "#{Stripe::DEFAULT_API_BASE}/v2/money_management/payout_methods/id_123" end + should "Test v2 money management payout method post (service)" do + stub_request( + :post, + "#{Stripe::DEFAULT_API_BASE}/v2/money_management/payout_methods/id_123/archive" + ).to_return( + body: '{"available_payout_speeds":["standard"],"created":"1970-01-12T21:42:34.472Z","id":"obj_123","latest_outbound_setup_intent":null,"object":"v2.money_management.payout_method","type":"bank_account","usage_status":{"payments":"requires_action","transfers":"invalid"},"livemode":true,"bank_account":null,"card":null}', + status: 200 + ) + client = Stripe::StripeClient.new("sk_test_123") + + payout_method = client.v2.money_management.payout_methods.archive("id_123") + assert_requested :post, "#{Stripe::DEFAULT_API_BASE}/v2/money_management/payout_methods/id_123/archive" + end should "Test v2 money management payout method post 2 (service)" do stub_request( :post, @@ -8417,29 +8476,6 @@ module Stripe received_debit = client.v2.money_management.received_debits.retrieve("id_123") assert_requested :get, "#{Stripe::DEFAULT_API_BASE}/v2/money_management/received_debits/id_123" end - should "Test v2 money management transaction get (service)" do - stub_request(:get, "#{Stripe::DEFAULT_API_BASE}/v2/money_management/transactions").to_return( - body: '{"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":"return","created":"1970-01-12T21:42:34.472Z","financial_account":"financial_account","flow":{"type":"outbound_payment","adjustment":null,"fee_transaction":null,"inbound_transfer":null,"outbound_payment":null,"outbound_transfer":null,"received_credit":null,"received_debit":null},"id":"obj_123","object":"v2.money_management.transaction","status":"pending","status_transitions":{"posted_at":null,"void_at":null},"livemode":true}],"next_page_url":null,"previous_page_url":null}', - status: 200 - ) - client = Stripe::StripeClient.new("sk_test_123") - - transactions = client.v2.money_management.transactions.list - assert_requested :get, "#{Stripe::DEFAULT_API_BASE}/v2/money_management/transactions" - end - should "Test v2 money management transaction get 2 (service)" do - stub_request( - :get, - "#{Stripe::DEFAULT_API_BASE}/v2/money_management/transactions/id_123" - ).to_return( - body: '{"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":"return","created":"1970-01-12T21:42:34.472Z","financial_account":"financial_account","flow":{"type":"outbound_payment","adjustment":null,"fee_transaction":null,"inbound_transfer":null,"outbound_payment":null,"outbound_transfer":null,"received_credit":null,"received_debit":null},"id":"obj_123","object":"v2.money_management.transaction","status":"pending","status_transitions":{"posted_at":null,"void_at":null},"livemode":true}', - status: 200 - ) - client = Stripe::StripeClient.new("sk_test_123") - - transaction = client.v2.money_management.transactions.retrieve("id_123") - assert_requested :get, "#{Stripe::DEFAULT_API_BASE}/v2/money_management/transactions/id_123" - end should "Test v2 money management transaction entry get (service)" do stub_request( :get, @@ -8466,64 +8502,83 @@ module Stripe transaction_entry = client.v2.money_management.transaction_entries.retrieve("id_123") assert_requested :get, "#{Stripe::DEFAULT_API_BASE}/v2/money_management/transaction_entries/id_123" end - should "Test v2 billing meter event session post (service)" do - stub_request(:post, "#{Stripe::DEFAULT_API_BASE}/v2/billing/meter_event_session").to_return( - body: '{"authentication_token":"authentication_token","created":"1970-01-12T21:42:34.472Z","expires_at":"1970-01-10T15:36:51.170Z","id":"obj_123","object":"v2.billing.meter_event_session","livemode":true}', + should "Test v2 money management transaction get (service)" do + stub_request(:get, "#{Stripe::DEFAULT_API_BASE}/v2/money_management/transactions").to_return( + body: '{"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":"return","created":"1970-01-12T21:42:34.472Z","financial_account":"financial_account","flow":{"type":"outbound_payment","adjustment":null,"fee_transaction":null,"inbound_transfer":null,"outbound_payment":null,"outbound_transfer":null,"received_credit":null,"received_debit":null},"id":"obj_123","object":"v2.money_management.transaction","status":"pending","status_transitions":{"posted_at":null,"void_at":null},"livemode":true}],"next_page_url":null,"previous_page_url":null}', status: 200 ) client = Stripe::StripeClient.new("sk_test_123") - meter_event_session = client.v2.billing.meter_event_session.create - assert_requested :post, "#{Stripe::DEFAULT_API_BASE}/v2/billing/meter_event_session" + transactions = client.v2.money_management.transactions.list + assert_requested :get, "#{Stripe::DEFAULT_API_BASE}/v2/money_management/transactions" end - should "Test v2 billing meter event adjustment post (service)" do + should "Test v2 money management transaction get 2 (service)" do stub_request( - :post, - "#{Stripe::DEFAULT_API_BASE}/v2/billing/meter_event_adjustments" + :get, + "#{Stripe::DEFAULT_API_BASE}/v2/money_management/transactions/id_123" ).to_return( - body: '{"cancel":{"identifier":"identifier"},"created":"1970-01-12T21:42:34.472Z","event_name":"event_name","id":"obj_123","object":"v2.billing.meter_event_adjustment","status":"complete","type":"cancel","livemode":true}', + body: '{"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":"return","created":"1970-01-12T21:42:34.472Z","financial_account":"financial_account","flow":{"type":"outbound_payment","adjustment":null,"fee_transaction":null,"inbound_transfer":null,"outbound_payment":null,"outbound_transfer":null,"received_credit":null,"received_debit":null},"id":"obj_123","object":"v2.money_management.transaction","status":"pending","status_transitions":{"posted_at":null,"void_at":null},"livemode":true}', status: 200 ) client = Stripe::StripeClient.new("sk_test_123") - meter_event_adjustment = client.v2.billing.meter_event_adjustments.create({ - cancel: { identifier: "identifier" }, - event_name: "event_name", - type: "cancel", - }) - assert_requested :post, "#{Stripe::DEFAULT_API_BASE}/v2/billing/meter_event_adjustments" + transaction = client.v2.money_management.transactions.retrieve("id_123") + assert_requested :get, "#{Stripe::DEFAULT_API_BASE}/v2/money_management/transactions/id_123" end - should "Test v2 billing meter event stream post (service)" do + should "Test v2 payments off session payment get (service)" do + stub_request(:get, "#{Stripe::DEFAULT_API_BASE}/v2/payments/off_session_payments").to_return( + body: '{"data":[{"amount_requested":{"currency":"USD","value":47},"cadence":"unscheduled","compartment_id":"compartment_id","created":"1970-01-12T21:42:34.472Z","customer":"customer","failure_reason":null,"id":"obj_123","last_authorization_attempt_error":null,"latest_payment_attempt_record":null,"livemode":true,"metadata":{"undefined":"metadata"},"object":"v2.payments.off_session_payment","on_behalf_of":null,"payment_method":"payment_method","payment_record":null,"retry_details":{"attempts":542738246,"retry_strategy":"none"},"statement_descriptor":null,"statement_descriptor_suffix":null,"status":"pending","test_clock":null,"transfer_data":null}],"next_page_url":null,"previous_page_url":null}', + status: 200 + ) + client = Stripe::StripeClient.new("sk_test_123") + + off_session_payments = client.v2.payments.off_session_payments.list + assert_requested :get, "#{Stripe::DEFAULT_API_BASE}/v2/payments/off_session_payments" + end + should "Test v2 payments off session payment post (service)" do + stub_request(:post, "#{Stripe::DEFAULT_API_BASE}/v2/payments/off_session_payments").to_return( + body: '{"amount_requested":{"currency":"USD","value":47},"cadence":"unscheduled","compartment_id":"compartment_id","created":"1970-01-12T21:42:34.472Z","customer":"customer","failure_reason":null,"id":"obj_123","last_authorization_attempt_error":null,"latest_payment_attempt_record":null,"livemode":true,"metadata":{"undefined":"metadata"},"object":"v2.payments.off_session_payment","on_behalf_of":null,"payment_method":"payment_method","payment_record":null,"retry_details":{"attempts":542738246,"retry_strategy":"none"},"statement_descriptor":null,"statement_descriptor_suffix":null,"status":"pending","test_clock":null,"transfer_data":null}', + status: 200 + ) + client = Stripe::StripeClient.new("sk_test_123") + + off_session_payment = client.v2.payments.off_session_payments.create({ + amount: { + currency: "USD", + value: 96, + }, + cadence: "unscheduled", + customer: "customer", + metadata: { undefined: "metadata" }, + payment_method: "payment_method", + }) + assert_requested :post, "#{Stripe::DEFAULT_API_BASE}/v2/payments/off_session_payments" + end + should "Test v2 payments off session payment get 2 (service)" do + stub_request( + :get, + "#{Stripe::DEFAULT_API_BASE}/v2/payments/off_session_payments/id_123" + ).to_return( + body: '{"amount_requested":{"currency":"USD","value":47},"cadence":"unscheduled","compartment_id":"compartment_id","created":"1970-01-12T21:42:34.472Z","customer":"customer","failure_reason":null,"id":"obj_123","last_authorization_attempt_error":null,"latest_payment_attempt_record":null,"livemode":true,"metadata":{"undefined":"metadata"},"object":"v2.payments.off_session_payment","on_behalf_of":null,"payment_method":"payment_method","payment_record":null,"retry_details":{"attempts":542738246,"retry_strategy":"none"},"statement_descriptor":null,"statement_descriptor_suffix":null,"status":"pending","test_clock":null,"transfer_data":null}', + status: 200 + ) + client = Stripe::StripeClient.new("sk_test_123") + + off_session_payment = client.v2.payments.off_session_payments.retrieve("id_123") + assert_requested :get, "#{Stripe::DEFAULT_API_BASE}/v2/payments/off_session_payments/id_123" + end + should "Test v2 payments off session payment post 2 (service)" do stub_request( :post, - "#{Stripe::DEFAULT_METER_EVENTS_BASE}/v2/billing/meter_event_stream" - ).to_return(body: "{}", status: 200) - client = Stripe::StripeClient.new("sk_test_123") - - empty_object = client.v2.billing.meter_event_stream.create({ - events: [ - { - event_name: "event_name", - identifier: "identifier", - payload: { undefined: "payload" }, - timestamp: "1970-01-01T15:18:46.294Z", - }, - ], - }) - assert_requested :post, "#{Stripe::DEFAULT_METER_EVENTS_BASE}/v2/billing/meter_event_stream" - end - should "Test v2 billing meter event post (service)" do - stub_request(:post, "#{Stripe::DEFAULT_API_BASE}/v2/billing/meter_events").to_return( - body: '{"created":"1970-01-12T21:42:34.472Z","event_name":"event_name","identifier":"identifier","object":"v2.billing.meter_event","payload":{"undefined":"payload"},"timestamp":"1970-01-01T15:18:46.294Z","livemode":true}', + "#{Stripe::DEFAULT_API_BASE}/v2/payments/off_session_payments/id_123/cancel" + ).to_return( + body: '{"amount_requested":{"currency":"USD","value":47},"cadence":"unscheduled","compartment_id":"compartment_id","created":"1970-01-12T21:42:34.472Z","customer":"customer","failure_reason":null,"id":"obj_123","last_authorization_attempt_error":null,"latest_payment_attempt_record":null,"livemode":true,"metadata":{"undefined":"metadata"},"object":"v2.payments.off_session_payment","on_behalf_of":null,"payment_method":"payment_method","payment_record":null,"retry_details":{"attempts":542738246,"retry_strategy":"none"},"statement_descriptor":null,"statement_descriptor_suffix":null,"status":"pending","test_clock":null,"transfer_data":null}', status: 200 ) client = Stripe::StripeClient.new("sk_test_123") - meter_event = client.v2.billing.meter_events.create({ - event_name: "event_name", - payload: { undefined: "payload" }, - }) - assert_requested :post, "#{Stripe::DEFAULT_API_BASE}/v2/billing/meter_events" + off_session_payment = client.v2.payments.off_session_payments.cancel("id_123") + assert_requested :post, "#{Stripe::DEFAULT_API_BASE}/v2/payments/off_session_payments/id_123/cancel" end should "Test v2 test helpers financial address post (service)" do stub_request( @@ -8560,61 +8615,6 @@ module Stripe financial_address_generated_microdeposits = client.v2.test_helpers.financial_addresses.generate_microdeposits("id_123") assert_requested :post, "#{Stripe::DEFAULT_API_BASE}/v2/test_helpers/financial_addresses/id_123/generate_microdeposits" end - should "Test v2 payments off session payment post (service)" do - stub_request( - :post, - "#{Stripe::DEFAULT_API_BASE}/v2/payments/off_session_payments/id_123/cancel" - ).to_return( - body: '{"amount_requested":{"currency":"USD","value":47},"cadence":"unscheduled","compartment_id":"compartment_id","created":"1970-01-12T21:42:34.472Z","customer":"customer","failure_reason":null,"id":"obj_123","last_authorization_attempt_error":null,"latest_payment_attempt_record":null,"livemode":true,"metadata":{"undefined":"metadata"},"object":"v2.payments.off_session_payment","on_behalf_of":null,"payment_method":"payment_method","payment_record":null,"retry_details":{"attempts":542738246,"retry_strategy":"none"},"statement_descriptor":null,"statement_descriptor_suffix":null,"status":"pending","test_clock":null,"transfer_data":null}', - status: 200 - ) - client = Stripe::StripeClient.new("sk_test_123") - - off_session_payment = client.v2.payments.off_session_payments.cancel("id_123") - assert_requested :post, "#{Stripe::DEFAULT_API_BASE}/v2/payments/off_session_payments/id_123/cancel" - end - should "Test v2 payments off session payment post 2 (service)" do - stub_request(:post, "#{Stripe::DEFAULT_API_BASE}/v2/payments/off_session_payments").to_return( - body: '{"amount_requested":{"currency":"USD","value":47},"cadence":"unscheduled","compartment_id":"compartment_id","created":"1970-01-12T21:42:34.472Z","customer":"customer","failure_reason":null,"id":"obj_123","last_authorization_attempt_error":null,"latest_payment_attempt_record":null,"livemode":true,"metadata":{"undefined":"metadata"},"object":"v2.payments.off_session_payment","on_behalf_of":null,"payment_method":"payment_method","payment_record":null,"retry_details":{"attempts":542738246,"retry_strategy":"none"},"statement_descriptor":null,"statement_descriptor_suffix":null,"status":"pending","test_clock":null,"transfer_data":null}', - status: 200 - ) - client = Stripe::StripeClient.new("sk_test_123") - - off_session_payment = client.v2.payments.off_session_payments.create({ - amount: { - currency: "USD", - value: 96, - }, - cadence: "unscheduled", - customer: "customer", - metadata: { undefined: "metadata" }, - payment_method: "payment_method", - }) - assert_requested :post, "#{Stripe::DEFAULT_API_BASE}/v2/payments/off_session_payments" - end - should "Test v2 payments off session payment get (service)" do - stub_request(:get, "#{Stripe::DEFAULT_API_BASE}/v2/payments/off_session_payments").to_return( - body: '{"data":[{"amount_requested":{"currency":"USD","value":47},"cadence":"unscheduled","compartment_id":"compartment_id","created":"1970-01-12T21:42:34.472Z","customer":"customer","failure_reason":null,"id":"obj_123","last_authorization_attempt_error":null,"latest_payment_attempt_record":null,"livemode":true,"metadata":{"undefined":"metadata"},"object":"v2.payments.off_session_payment","on_behalf_of":null,"payment_method":"payment_method","payment_record":null,"retry_details":{"attempts":542738246,"retry_strategy":"none"},"statement_descriptor":null,"statement_descriptor_suffix":null,"status":"pending","test_clock":null,"transfer_data":null}],"next_page_url":null,"previous_page_url":null}', - status: 200 - ) - client = Stripe::StripeClient.new("sk_test_123") - - off_session_payments = client.v2.payments.off_session_payments.list - assert_requested :get, "#{Stripe::DEFAULT_API_BASE}/v2/payments/off_session_payments" - end - should "Test v2 payments off session payment get 2 (service)" do - stub_request( - :get, - "#{Stripe::DEFAULT_API_BASE}/v2/payments/off_session_payments/id_123" - ).to_return( - body: '{"amount_requested":{"currency":"USD","value":47},"cadence":"unscheduled","compartment_id":"compartment_id","created":"1970-01-12T21:42:34.472Z","customer":"customer","failure_reason":null,"id":"obj_123","last_authorization_attempt_error":null,"latest_payment_attempt_record":null,"livemode":true,"metadata":{"undefined":"metadata"},"object":"v2.payments.off_session_payment","on_behalf_of":null,"payment_method":"payment_method","payment_record":null,"retry_details":{"attempts":542738246,"retry_strategy":"none"},"statement_descriptor":null,"statement_descriptor_suffix":null,"status":"pending","test_clock":null,"transfer_data":null}', - status: 200 - ) - client = Stripe::StripeClient.new("sk_test_123") - - off_session_payment = client.v2.payments.off_session_payments.retrieve("id_123") - assert_requested :get, "#{Stripe::DEFAULT_API_BASE}/v2/payments/off_session_payments/id_123" - end should "Test temporary session expired error (service)" do stub_request( :post,