diff --git a/CHANGELOG.md b/CHANGELOG.md index 98118923e..57a13135e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -68,6 +68,34 @@ This release changes the pinned API version to 2026-06-24.preview. * Add support for `cancel_pricing_lines` and `proration_behavior` on `V2::Billing::ContractCancelParams` * Add support for event notifications `V2MoneyManagementDebitDisputeFailedEvent`, `V2MoneyManagementDebitDisputeSubmittedEvent`, and `V2MoneyManagementDebitDisputeSucceededEvent` with related object `V2::MoneyManagement::DebitDispute` +## 19.3.0 - 2026-06-24 +This release changes the pinned API version to 2026-06-24.dahlia. + +* [#1896](https://github.com/stripe/stripe-ruby/pull/1896) Update generated code + * Add support for `release_details` on `Reserve::Hold` + * Change `Billing::CreditGrant.priority` to be required + * Add support for `buyer_id` on `Charge::PaymentMethodDetail::Bizum`, `ConfirmationToken::PaymentMethodPreview::Bizum`, `ConfirmationToken::PaymentMethodPreview::Blik`, `PaymentAttemptRecord::PaymentMethodDetail::Bizum`, `PaymentMethod::Bizum`, `PaymentMethod::Blik`, and `PaymentRecord::PaymentMethodDetail::Bizum` + * Add support for `transaction_link_id` on `Charge::PaymentMethodDetail::Card` + * Add support for `fingerprint` on `Charge::PaymentMethodDetail::Pix`, `ConfirmationToken::PaymentMethodPreview::Pix`, `PaymentMethod::Pix`, and `SetupAttempt::PaymentMethodDetail::Pix` + * Add support for `sunbit` on `Checkout::Session::PaymentMethodOption`, `Checkout::SessionCreateParams::PaymentMethodOption`, `PaymentIntent::PaymentMethodOption`, `PaymentIntentConfirmParams::PaymentMethodOption`, `PaymentIntentCreateParams::PaymentMethodOption`, and `PaymentIntentUpdateParams::PaymentMethodOption` + * Add support for `billing_cycle_anchor_config` on `Checkout::SessionCreateParams::SubscriptionDatum` + * Add support for `wechat_pay` on `Checkout::Session::PaymentMethodOption` + * Add support for `mastercard_compliance` on `Dispute::Evidence::EnhancedEvidence`, `Dispute::EvidenceDetail::EnhancedEligibility`, and `DisputeUpdateParams::Evidence::EnhancedEvidence` + * Add support for `status_details` on `FinancialConnections::Account` + * ⚠️ Remove support for `stored_credential_usage` on `PaymentAttemptRecord::PaymentMethodDetail::Card` and `PaymentRecord::PaymentMethodDetail::Card` + * ⚠️ Change `PaymentAttemptRecord::PaymentMethodDetail::Card.description` and `PaymentRecord::PaymentMethodDetail::Card.description` to be optional + * ⚠️ Change `PaymentAttemptRecord::PaymentMethodDetail::Card.iin` and `PaymentRecord::PaymentMethodDetail::Card.iin` to be optional + * ⚠️ Change `PaymentAttemptRecord::PaymentMethodDetail::Card.issuer` and `PaymentRecord::PaymentMethodDetail::Card.issuer` to be optional + * Add support for `setup_future_usage` on `PaymentIntent::PaymentMethodOption::Satispay`, `PaymentIntentConfirmParams::PaymentMethodOption::Satispay`, `PaymentIntentCreateParams::PaymentMethodOption::Satispay`, and `PaymentIntentUpdateParams::PaymentMethodOption::Satispay` + * Change `PaymentRecordReportRefundParams.refunded` to be optional + * Add support for `satispay` on `SetupAttempt::PaymentMethodDetail` + * Add support for `custom_fields`, `description`, and `footer` on `Subscription::InvoiceSetting`, `SubscriptionCreateParams::InvoiceSetting`, and `SubscriptionUpdateParams::InvoiceSetting` + * Add support for `payment_method_options` and `payment_method` on `TopupCreateParams` + * Add support for `mode` on `V2::Commerce::ProductCatalogImport` + * Add support for `sunbit_payments` on `V2::Core::Account::Configuration::Merchant::Capability`, `V2::Core::AccountCreateParams::Configuration::Merchant::Capability`, and `V2::Core::AccountUpdateParams::Configuration::Merchant::Capability` + * Add support for `crypto_money_manager` and `money_manager` on `V2::Core::AccountUpdateParams::Identity::Attestation::TermsOfService` + * ⚠️ Remove support for `crypto_storer` and `storer` on `V2::Core::AccountUpdateParams::Identity::Attestation::TermsOfService` + ## 19.3.0-alpha.4 - 2026-06-17 * [#1878](https://github.com/stripe/stripe-ruby/pull/1878) Update generated code for private-preview * Add support for `retrieve` method on resource `Radar::CustomerEvaluation` diff --git a/CODEGEN_VERSION b/CODEGEN_VERSION index 96d41d6ac..ccbf912af 100644 --- a/CODEGEN_VERSION +++ b/CODEGEN_VERSION @@ -1 +1 @@ -7dcbffa9da7d760e864ed104012ca01ad08d6f8a \ No newline at end of file +e1d478e1eb9a108a07dce2bc9440521a24c68885 \ No newline at end of file diff --git a/lib/stripe/params/v2/iam/api_key_create_params.rb b/lib/stripe/params/v2/iam/api_key_create_params.rb index d34899b8e..b679e30d1 100644 --- a/lib/stripe/params/v2/iam/api_key_create_params.rb +++ b/lib/stripe/params/v2/iam/api_key_create_params.rb @@ -27,10 +27,16 @@ def initialize(id: nil, pem_key: nil) @pem_key = pem_key end end + # List of connect permissions for this API key. + attr_accessor :connect_permissions + # Timestamp at which the key expires. If not provided, the key never expires. + attr_accessor :expires_at # Name for the API key. attr_accessor :name # Note or description for the API key. attr_accessor :note + # List of permissions for this API key. + attr_accessor :permissions # Public key for encrypting the API key secret. # This must a PEM-formatted RSA key suitable for encryption, >= 2048 bits. # A public key is required when creating secret keys. @@ -39,9 +45,20 @@ def initialize(id: nil, pem_key: nil) # Type of the API key to create (secret or publishable). attr_accessor :type - def initialize(name: nil, note: nil, public_key: nil, type: nil) + def initialize( + connect_permissions: nil, + expires_at: nil, + name: nil, + note: nil, + permissions: nil, + public_key: nil, + type: nil + ) + @connect_permissions = connect_permissions + @expires_at = expires_at @name = name @note = note + @permissions = permissions @public_key = public_key @type = type end diff --git a/lib/stripe/params/v2/iam/api_key_update_params.rb b/lib/stripe/params/v2/iam/api_key_update_params.rb index faff6ac11..1ba37072c 100644 --- a/lib/stripe/params/v2/iam/api_key_update_params.rb +++ b/lib/stripe/params/v2/iam/api_key_update_params.rb @@ -5,14 +5,20 @@ module Stripe module V2 module Iam class ApiKeyUpdateParams < ::Stripe::RequestParams + # List of connect permissions for this API key. + attr_accessor :connect_permissions # Name to set for the API key. If blank, the field is left unchanged. attr_accessor :name # Note or description to set for the API key. If blank, the field is left unchanged. attr_accessor :note + # List of permissions for this API key. + attr_accessor :permissions - def initialize(name: nil, note: nil) + def initialize(connect_permissions: nil, name: nil, note: nil, permissions: nil) + @connect_permissions = connect_permissions @name = name @note = note + @permissions = permissions end end end diff --git a/lib/stripe/resources/v2/iam/api_key.rb b/lib/stripe/resources/v2/iam/api_key.rb index f188a651c..9ec4bdcc0 100644 --- a/lib/stripe/resources/v2/iam/api_key.rb +++ b/lib/stripe/resources/v2/iam/api_key.rb @@ -83,6 +83,8 @@ def self.field_remappings @field_remappings = {} end end + # List of connect permissions for this API key. + attr_reader :connect_permissions # Timestamp when the API key was created. attr_reader :created # Timestamp when the API key expires. @@ -103,6 +105,8 @@ def self.field_remappings attr_reader :note # String representing the object's type. Objects of the same type share the same value of the object field. attr_reader :object + # List of permissions for this API key. + attr_reader :permissions # Token set for a publishable key. attr_reader :publishable_key # Token set for a secret key. diff --git a/lib/stripe/resources/v2/money_management/financial_account.rb b/lib/stripe/resources/v2/money_management/financial_account.rb index 7eb1e2cad..7f0e27215 100644 --- a/lib/stripe/resources/v2/money_management/financial_account.rb +++ b/lib/stripe/resources/v2/money_management/financial_account.rb @@ -43,6 +43,47 @@ def self.field_remappings end end + class Credit < ::Stripe::StripeObject + class FundedBy < ::Stripe::StripeObject + class Platform < ::Stripe::StripeObject + # The platform FinancialAccount used to fund this credit FinancialAccount. + attr_reader :financial_account + + def self.inner_class_types + @inner_class_types = {} + end + + def self.field_remappings + @field_remappings = {} + end + end + # Details for platform-funded credit FinancialAccounts. + attr_reader :platform + # The type of funding source for this credit FinancialAccount. + attr_reader :type + + def self.inner_class_types + @inner_class_types = { platform: Platform } + end + + def self.field_remappings + @field_remappings = {} + end + end + # Details about how this credit FinancialAccount is funded. + attr_reader :funded_by + # The currencies supported by this credit FinancialAccount. + attr_reader :supported_currencies + + def self.inner_class_types + @inner_class_types = { funded_by: FundedBy } + end + + def self.field_remappings + @field_remappings = {} + end + end + class ManagedBy < ::Stripe::StripeObject # Enum describing the Stripe product that is managing this FinancialAccount. attr_reader :type @@ -233,6 +274,8 @@ def self.field_remappings attr_reader :country # Time at which the object was created. attr_reader :created + # If this is a `credit` FinancialAccount, this hash includes details specific to `credit` FinancialAccounts. + attr_reader :credit # A descriptive name for the FinancialAccount, up to 50 characters long. This name will be used in the Stripe Dashboard and embedded components. attr_reader :display_name # Unique identifier for the object. @@ -266,6 +309,7 @@ def self.inner_class_types @inner_class_types = { accrued_fees: AccruedFees, balance: Balance, + credit: Credit, managed_by: ManagedBy, multiprocessor_settlement: MultiprocessorSettlement, other: Other, diff --git a/lib/stripe/resources/v2/money_management/inbound_transfer.rb b/lib/stripe/resources/v2/money_management/inbound_transfer.rb index 45e70462a..aeb4c374c 100644 --- a/lib/stripe/resources/v2/money_management/inbound_transfer.rb +++ b/lib/stripe/resources/v2/money_management/inbound_transfer.rb @@ -165,7 +165,7 @@ def self.field_remappings attr_reader :receipt_url # A nested object containing information about the destination of the InboundTransfer. attr_reader :to - # A list of history objects, representing changes in the state of the InboundTransfer. + # A list of history objects, representing changes in the state of the InboundTransfer. The most recent entry's type indicates the current status of the InboundTransfer. attr_reader :transfer_history def self.inner_class_types diff --git a/lib/stripe/resources/v2/money_management/transaction.rb b/lib/stripe/resources/v2/money_management/transaction.rb index 1e8be2c3b..691e55533 100644 --- a/lib/stripe/resources/v2/money_management/transaction.rb +++ b/lib/stripe/resources/v2/money_management/transaction.rb @@ -42,6 +42,8 @@ def self.field_remappings end class Flow < ::Stripe::StripeObject + # If applicable, the connected account associated with this Transaction's flow. + attr_reader :account # If applicable, the ID of the Adjustment that created this Transaction. attr_reader :adjustment # If applicable, the ID of the Application Fee that created this Transaction. @@ -60,6 +62,12 @@ class Flow < ::Stripe::StripeObject attr_reader :fee_transaction # If applicable, the ID of the InboundTransfer that created this Transaction. attr_reader :inbound_transfer + # If applicable, the ID of the Issuing authorization that created this Transaction. + attr_reader :issuing_authorization + # If applicable, the ID of the Issuing dispute that created this Transaction. + attr_reader :issuing_dispute + # If applicable, the ID of the Issuing transaction that created this Transaction. + attr_reader :issuing_transaction # If applicable, the ID of the OutboundPayment that created this Transaction. attr_reader :outbound_payment # If applicable, the ID of the OutboundTransfer that created this Transaction. diff --git a/lib/stripe/resources/v2/money_management/transaction_entry.rb b/lib/stripe/resources/v2/money_management/transaction_entry.rb index b0b0a8871..75f142423 100644 --- a/lib/stripe/resources/v2/money_management/transaction_entry.rb +++ b/lib/stripe/resources/v2/money_management/transaction_entry.rb @@ -30,6 +30,8 @@ def self.field_remappings class TransactionDetails < ::Stripe::StripeObject class Flow < ::Stripe::StripeObject + # If applicable, the connected account associated with this Transaction's flow. + attr_reader :account # If applicable, the ID of the Adjustment that created this Transaction. attr_reader :adjustment # If applicable, the ID of the Application Fee that created this Transaction. @@ -48,6 +50,12 @@ class Flow < ::Stripe::StripeObject attr_reader :fee_transaction # If applicable, the ID of the InboundTransfer that created this Transaction. attr_reader :inbound_transfer + # If applicable, the ID of the Issuing authorization that created this Transaction. + attr_reader :issuing_authorization + # If applicable, the ID of the Issuing dispute that created this Transaction. + attr_reader :issuing_dispute + # If applicable, the ID of the Issuing transaction that created this Transaction. + attr_reader :issuing_transaction # If applicable, the ID of the OutboundPayment that created this Transaction. attr_reader :outbound_payment # If applicable, the ID of the OutboundTransfer that created this Transaction. diff --git a/rbi/stripe.rbi b/rbi/stripe.rbi index 6e1594911..65fad308c 100644 --- a/rbi/stripe.rbi +++ b/rbi/stripe.rbi @@ -102186,6 +102186,9 @@ module Stripe @field_remappings = {} end end + # List of connect permissions for this API key. + sig { returns(T.nilable(T::Array[String])) } + def connect_permissions; end # Timestamp when the API key was created. sig { returns(String) } def created; end @@ -102216,6 +102219,9 @@ module Stripe # String representing the object's type. Objects of the same type share the same value of the object field. sig { returns(String) } def object; end + # List of permissions for this API key. + sig { returns(T.nilable(T::Array[String])) } + def permissions; end # Token set for a publishable key. sig { returns(T.nilable(PublishableKey)) } def publishable_key; end @@ -102497,6 +102503,45 @@ module Stripe @field_remappings = {} end end + class Credit < ::Stripe::StripeObject + class FundedBy < ::Stripe::StripeObject + class Platform < ::Stripe::StripeObject + # The platform FinancialAccount used to fund this credit FinancialAccount. + sig { returns(String) } + def financial_account; end + def self.inner_class_types + @inner_class_types = {} + end + def self.field_remappings + @field_remappings = {} + end + end + # Details for platform-funded credit FinancialAccounts. + sig { returns(Platform) } + def platform; end + # The type of funding source for this credit FinancialAccount. + sig { returns(String) } + def type; end + def self.inner_class_types + @inner_class_types = {platform: Platform} + end + def self.field_remappings + @field_remappings = {} + end + end + # Details about how this credit FinancialAccount is funded. + sig { returns(T.nilable(FundedBy)) } + def funded_by; end + # The currencies supported by this credit FinancialAccount. + sig { returns(T::Array[String]) } + def supported_currencies; end + def self.inner_class_types + @inner_class_types = {funded_by: FundedBy} + end + def self.field_remappings + @field_remappings = {} + end + end class ManagedBy < ::Stripe::StripeObject # Enum describing the Stripe product that is managing this FinancialAccount. sig { returns(String) } @@ -102684,6 +102729,9 @@ module Stripe # Time at which the object was created. sig { returns(String) } def created; end + # If this is a `credit` FinancialAccount, this hash includes details specific to `credit` FinancialAccounts. + sig { returns(T.nilable(Credit)) } + def credit; end # A descriptive name for the FinancialAccount, up to 50 characters long. This name will be used in the Stripe Dashboard and embedded components. sig { returns(T.nilable(String)) } def display_name; end @@ -103232,7 +103280,7 @@ module Stripe # A nested object containing information about the destination of the InboundTransfer. sig { returns(To) } def to; end - # A list of history objects, representing changes in the state of the InboundTransfer. + # A list of history objects, representing changes in the state of the InboundTransfer. The most recent entry's type indicates the current status of the InboundTransfer. sig { returns(T::Array[TransferHistory]) } def transfer_history; end end @@ -105285,6 +105333,9 @@ module Stripe end class TransactionDetails < ::Stripe::StripeObject class Flow < ::Stripe::StripeObject + # If applicable, the connected account associated with this Transaction's flow. + sig { returns(T.nilable(String)) } + def account; end # If applicable, the ID of the Adjustment that created this Transaction. sig { returns(T.nilable(String)) } def adjustment; end @@ -105312,6 +105363,15 @@ module Stripe # If applicable, the ID of the InboundTransfer that created this Transaction. sig { returns(T.nilable(String)) } def inbound_transfer; end + # If applicable, the ID of the Issuing authorization that created this Transaction. + sig { returns(T.nilable(String)) } + def issuing_authorization; end + # If applicable, the ID of the Issuing dispute that created this Transaction. + sig { returns(T.nilable(String)) } + def issuing_dispute; end + # If applicable, the ID of the Issuing transaction that created this Transaction. + sig { returns(T.nilable(String)) } + def issuing_transaction; end # If applicable, the ID of the OutboundPayment that created this Transaction. sig { returns(T.nilable(String)) } def outbound_payment; end @@ -105464,6 +105524,9 @@ module Stripe end end class Flow < ::Stripe::StripeObject + # If applicable, the connected account associated with this Transaction's flow. + sig { returns(T.nilable(String)) } + def account; end # If applicable, the ID of the Adjustment that created this Transaction. sig { returns(T.nilable(String)) } def adjustment; end @@ -105491,6 +105554,15 @@ module Stripe # If applicable, the ID of the InboundTransfer that created this Transaction. sig { returns(T.nilable(String)) } def inbound_transfer; end + # If applicable, the ID of the Issuing authorization that created this Transaction. + sig { returns(T.nilable(String)) } + def issuing_authorization; end + # If applicable, the ID of the Issuing dispute that created this Transaction. + sig { returns(T.nilable(String)) } + def issuing_dispute; end + # If applicable, the ID of the Issuing transaction that created this Transaction. + sig { returns(T.nilable(String)) } + def issuing_transaction; end # If applicable, the ID of the OutboundPayment that created this Transaction. sig { returns(T.nilable(String)) } def outbound_payment; end @@ -307252,6 +307324,18 @@ module Stripe } def initialize(id: nil, pem_key: nil); end end + # List of connect permissions for this API key. + sig { returns(T.nilable(T::Array[String])) } + def connect_permissions; end + sig { + params(_connect_permissions: T.nilable(T::Array[String])).returns(T.nilable(T::Array[String])) + } + def connect_permissions=(_connect_permissions); end + # Timestamp at which the key expires. If not provided, the key never expires. + sig { returns(T.nilable(String)) } + def expires_at; end + sig { params(_expires_at: T.nilable(String)).returns(T.nilable(String)) } + def expires_at=(_expires_at); end # Name for the API key. sig { returns(T.nilable(String)) } def name; end @@ -307262,6 +307346,13 @@ module Stripe def note; end sig { params(_note: T.nilable(String)).returns(T.nilable(String)) } def note=(_note); end + # List of permissions for this API key. + sig { returns(T.nilable(T::Array[String])) } + def permissions; end + sig { + params(_permissions: T.nilable(T::Array[String])).returns(T.nilable(T::Array[String])) + } + def permissions=(_permissions); end # Public key for encrypting the API key secret. # This must a PEM-formatted RSA key suitable for encryption, >= 2048 bits. # A public key is required when creating secret keys. @@ -307278,9 +307369,17 @@ module Stripe sig { params(_type: String).returns(String) } def type=(_type); end sig { - params(name: T.nilable(String), note: T.nilable(String), public_key: T.nilable(::Stripe::V2::Iam::ApiKeyCreateParams::PublicKey), type: String).void + params(connect_permissions: T.nilable(T::Array[String]), expires_at: T.nilable(String), name: T.nilable(String), note: T.nilable(String), permissions: T.nilable(T::Array[String]), public_key: T.nilable(::Stripe::V2::Iam::ApiKeyCreateParams::PublicKey), type: String).void } - def initialize(name: nil, note: nil, public_key: nil, type: nil); end + def initialize( + connect_permissions: nil, + expires_at: nil, + name: nil, + note: nil, + permissions: nil, + public_key: nil, + type: nil + ); end end end end @@ -307298,6 +307397,13 @@ module Stripe module V2 module Iam class ApiKeyUpdateParams < ::Stripe::RequestParams + # List of connect permissions for this API key. + sig { returns(T.nilable(T::Array[String])) } + def connect_permissions; end + sig { + params(_connect_permissions: T.nilable(T::Array[String])).returns(T.nilable(T::Array[String])) + } + def connect_permissions=(_connect_permissions); end # Name to set for the API key. If blank, the field is left unchanged. sig { returns(T.nilable(String)) } def name; end @@ -307308,8 +307414,17 @@ module Stripe def note; end sig { params(_note: T.nilable(String)).returns(T.nilable(String)) } def note=(_note); end - sig { params(name: T.nilable(String), note: T.nilable(String)).void } - def initialize(name: nil, note: nil); end + # List of permissions for this API key. + sig { returns(T.nilable(T::Array[String])) } + def permissions; end + sig { + params(_permissions: T.nilable(T::Array[String])).returns(T.nilable(T::Array[String])) + } + def permissions=(_permissions); end + sig { + params(connect_permissions: T.nilable(T::Array[String]), name: T.nilable(String), note: T.nilable(String), permissions: T.nilable(T::Array[String])).void + } + def initialize(connect_permissions: nil, name: nil, note: nil, permissions: nil); end end end end diff --git a/rbi/stripe/params/v2/iam/api_key_create_params.rbi b/rbi/stripe/params/v2/iam/api_key_create_params.rbi index d99c522db..88ffacea7 100644 --- a/rbi/stripe/params/v2/iam/api_key_create_params.rbi +++ b/rbi/stripe/params/v2/iam/api_key_create_params.rbi @@ -38,6 +38,18 @@ module Stripe } def initialize(id: nil, pem_key: nil); end end + # List of connect permissions for this API key. + sig { returns(T.nilable(T::Array[String])) } + def connect_permissions; end + sig { + params(_connect_permissions: T.nilable(T::Array[String])).returns(T.nilable(T::Array[String])) + } + def connect_permissions=(_connect_permissions); end + # Timestamp at which the key expires. If not provided, the key never expires. + sig { returns(T.nilable(String)) } + def expires_at; end + sig { params(_expires_at: T.nilable(String)).returns(T.nilable(String)) } + def expires_at=(_expires_at); end # Name for the API key. sig { returns(T.nilable(String)) } def name; end @@ -48,6 +60,13 @@ module Stripe def note; end sig { params(_note: T.nilable(String)).returns(T.nilable(String)) } def note=(_note); end + # List of permissions for this API key. + sig { returns(T.nilable(T::Array[String])) } + def permissions; end + sig { + params(_permissions: T.nilable(T::Array[String])).returns(T.nilable(T::Array[String])) + } + def permissions=(_permissions); end # Public key for encrypting the API key secret. # This must a PEM-formatted RSA key suitable for encryption, >= 2048 bits. # A public key is required when creating secret keys. @@ -64,9 +83,17 @@ module Stripe sig { params(_type: String).returns(String) } def type=(_type); end sig { - params(name: T.nilable(String), note: T.nilable(String), public_key: T.nilable(::Stripe::V2::Iam::ApiKeyCreateParams::PublicKey), type: String).void + params(connect_permissions: T.nilable(T::Array[String]), expires_at: T.nilable(String), name: T.nilable(String), note: T.nilable(String), permissions: T.nilable(T::Array[String]), public_key: T.nilable(::Stripe::V2::Iam::ApiKeyCreateParams::PublicKey), type: String).void } - def initialize(name: nil, note: nil, public_key: nil, type: nil); end + def initialize( + connect_permissions: nil, + expires_at: nil, + name: nil, + note: nil, + permissions: nil, + public_key: nil, + type: nil + ); end end end end diff --git a/rbi/stripe/params/v2/iam/api_key_update_params.rbi b/rbi/stripe/params/v2/iam/api_key_update_params.rbi index c42d2d73f..d13ec95c9 100644 --- a/rbi/stripe/params/v2/iam/api_key_update_params.rbi +++ b/rbi/stripe/params/v2/iam/api_key_update_params.rbi @@ -6,6 +6,13 @@ module Stripe module V2 module Iam class ApiKeyUpdateParams < ::Stripe::RequestParams + # List of connect permissions for this API key. + sig { returns(T.nilable(T::Array[String])) } + def connect_permissions; end + sig { + params(_connect_permissions: T.nilable(T::Array[String])).returns(T.nilable(T::Array[String])) + } + def connect_permissions=(_connect_permissions); end # Name to set for the API key. If blank, the field is left unchanged. sig { returns(T.nilable(String)) } def name; end @@ -16,8 +23,17 @@ module Stripe def note; end sig { params(_note: T.nilable(String)).returns(T.nilable(String)) } def note=(_note); end - sig { params(name: T.nilable(String), note: T.nilable(String)).void } - def initialize(name: nil, note: nil); end + # List of permissions for this API key. + sig { returns(T.nilable(T::Array[String])) } + def permissions; end + sig { + params(_permissions: T.nilable(T::Array[String])).returns(T.nilable(T::Array[String])) + } + def permissions=(_permissions); end + sig { + params(connect_permissions: T.nilable(T::Array[String]), name: T.nilable(String), note: T.nilable(String), permissions: T.nilable(T::Array[String])).void + } + def initialize(connect_permissions: nil, name: nil, note: nil, permissions: nil); end end end end diff --git a/rbi/stripe/resources/v2/iam/api_key.rbi b/rbi/stripe/resources/v2/iam/api_key.rbi index f0bc66750..564905ad9 100644 --- a/rbi/stripe/resources/v2/iam/api_key.rbi +++ b/rbi/stripe/resources/v2/iam/api_key.rbi @@ -77,6 +77,9 @@ module Stripe @field_remappings = {} end end + # List of connect permissions for this API key. + sig { returns(T.nilable(T::Array[String])) } + def connect_permissions; end # Timestamp when the API key was created. sig { returns(String) } def created; end @@ -107,6 +110,9 @@ module Stripe # String representing the object's type. Objects of the same type share the same value of the object field. sig { returns(String) } def object; end + # List of permissions for this API key. + sig { returns(T.nilable(T::Array[String])) } + def permissions; end # Token set for a publishable key. sig { returns(T.nilable(PublishableKey)) } def publishable_key; end diff --git a/rbi/stripe/resources/v2/money_management/financial_account.rbi b/rbi/stripe/resources/v2/money_management/financial_account.rbi index f226c9afa..1d1e7266c 100644 --- a/rbi/stripe/resources/v2/money_management/financial_account.rbi +++ b/rbi/stripe/resources/v2/money_management/financial_account.rbi @@ -38,6 +38,45 @@ module Stripe @field_remappings = {} end end + class Credit < ::Stripe::StripeObject + class FundedBy < ::Stripe::StripeObject + class Platform < ::Stripe::StripeObject + # The platform FinancialAccount used to fund this credit FinancialAccount. + sig { returns(String) } + def financial_account; end + def self.inner_class_types + @inner_class_types = {} + end + def self.field_remappings + @field_remappings = {} + end + end + # Details for platform-funded credit FinancialAccounts. + sig { returns(Platform) } + def platform; end + # The type of funding source for this credit FinancialAccount. + sig { returns(String) } + def type; end + def self.inner_class_types + @inner_class_types = {platform: Platform} + end + def self.field_remappings + @field_remappings = {} + end + end + # Details about how this credit FinancialAccount is funded. + sig { returns(T.nilable(FundedBy)) } + def funded_by; end + # The currencies supported by this credit FinancialAccount. + sig { returns(T::Array[String]) } + def supported_currencies; end + def self.inner_class_types + @inner_class_types = {funded_by: FundedBy} + end + def self.field_remappings + @field_remappings = {} + end + end class ManagedBy < ::Stripe::StripeObject # Enum describing the Stripe product that is managing this FinancialAccount. sig { returns(String) } @@ -225,6 +264,9 @@ module Stripe # Time at which the object was created. sig { returns(String) } def created; end + # If this is a `credit` FinancialAccount, this hash includes details specific to `credit` FinancialAccounts. + sig { returns(T.nilable(Credit)) } + def credit; end # A descriptive name for the FinancialAccount, up to 50 characters long. This name will be used in the Stripe Dashboard and embedded components. sig { returns(T.nilable(String)) } def display_name; end diff --git a/rbi/stripe/resources/v2/money_management/inbound_transfer.rbi b/rbi/stripe/resources/v2/money_management/inbound_transfer.rbi index ae10d56b4..8c6e76a8f 100644 --- a/rbi/stripe/resources/v2/money_management/inbound_transfer.rbi +++ b/rbi/stripe/resources/v2/money_management/inbound_transfer.rbi @@ -167,7 +167,7 @@ module Stripe # A nested object containing information about the destination of the InboundTransfer. sig { returns(To) } def to; end - # A list of history objects, representing changes in the state of the InboundTransfer. + # A list of history objects, representing changes in the state of the InboundTransfer. The most recent entry's type indicates the current status of the InboundTransfer. sig { returns(T::Array[TransferHistory]) } def transfer_history; end end diff --git a/rbi/stripe/resources/v2/money_management/transaction.rbi b/rbi/stripe/resources/v2/money_management/transaction.rbi index 1d8956997..225e2c16f 100644 --- a/rbi/stripe/resources/v2/money_management/transaction.rbi +++ b/rbi/stripe/resources/v2/money_management/transaction.rbi @@ -36,6 +36,9 @@ module Stripe end end class Flow < ::Stripe::StripeObject + # If applicable, the connected account associated with this Transaction's flow. + sig { returns(T.nilable(String)) } + def account; end # If applicable, the ID of the Adjustment that created this Transaction. sig { returns(T.nilable(String)) } def adjustment; end @@ -63,6 +66,15 @@ module Stripe # If applicable, the ID of the InboundTransfer that created this Transaction. sig { returns(T.nilable(String)) } def inbound_transfer; end + # If applicable, the ID of the Issuing authorization that created this Transaction. + sig { returns(T.nilable(String)) } + def issuing_authorization; end + # If applicable, the ID of the Issuing dispute that created this Transaction. + sig { returns(T.nilable(String)) } + def issuing_dispute; end + # If applicable, the ID of the Issuing transaction that created this Transaction. + sig { returns(T.nilable(String)) } + def issuing_transaction; end # If applicable, the ID of the OutboundPayment that created this Transaction. sig { returns(T.nilable(String)) } def outbound_payment; end diff --git a/rbi/stripe/resources/v2/money_management/transaction_entry.rbi b/rbi/stripe/resources/v2/money_management/transaction_entry.rbi index 3826bc039..5d78cbc1f 100644 --- a/rbi/stripe/resources/v2/money_management/transaction_entry.rbi +++ b/rbi/stripe/resources/v2/money_management/transaction_entry.rbi @@ -26,6 +26,9 @@ module Stripe end class TransactionDetails < ::Stripe::StripeObject class Flow < ::Stripe::StripeObject + # If applicable, the connected account associated with this Transaction's flow. + sig { returns(T.nilable(String)) } + def account; end # If applicable, the ID of the Adjustment that created this Transaction. sig { returns(T.nilable(String)) } def adjustment; end @@ -53,6 +56,15 @@ module Stripe # If applicable, the ID of the InboundTransfer that created this Transaction. sig { returns(T.nilable(String)) } def inbound_transfer; end + # If applicable, the ID of the Issuing authorization that created this Transaction. + sig { returns(T.nilable(String)) } + def issuing_authorization; end + # If applicable, the ID of the Issuing dispute that created this Transaction. + sig { returns(T.nilable(String)) } + def issuing_dispute; end + # If applicable, the ID of the Issuing transaction that created this Transaction. + sig { returns(T.nilable(String)) } + def issuing_transaction; end # If applicable, the ID of the OutboundPayment that created this Transaction. sig { returns(T.nilable(String)) } def outbound_payment; end diff --git a/test/stripe/generated_examples_test.rb b/test/stripe/generated_examples_test.rb index c9b00bae2..b8f1e8e0d 100644 --- a/test/stripe/generated_examples_test.rb +++ b/test/stripe/generated_examples_test.rb @@ -10177,7 +10177,7 @@ class CodegennedExampleTest < Test::Unit::TestCase ) client = Stripe::StripeClient.new("sk_test_123") - financial_account = client.v2.money_management.financial_accounts.create({ type: "storage" }) + financial_account = client.v2.money_management.financial_accounts.create({ type: "credit" }) assert_requested :post, "#{Stripe::DEFAULT_API_BASE}/v2/money_management/financial_accounts" end should "Test v2 money management financial account get 2 (service)" do @@ -10862,7 +10862,7 @@ class CodegennedExampleTest < Test::Unit::TestCase 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":[{"object":"v2.money_management.transaction","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":"inbound_transfer_reversal","created":"1970-01-12T21:42:34.472Z","financial_account":"financial_account","id":"obj_123","livemode":true,"status":"pending","status_transitions":{}}],"next_page_url":null,"previous_page_url":null}', + body: '{"data":[{"object":"v2.money_management.transaction","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":"platform_earning_refund","created":"1970-01-12T21:42:34.472Z","financial_account":"financial_account","id":"obj_123","livemode":true,"status":"pending","status_transitions":{}}],"next_page_url":null,"previous_page_url":null}', status: 200 ) client = Stripe::StripeClient.new("sk_test_123") @@ -10875,7 +10875,7 @@ class CodegennedExampleTest < Test::Unit::TestCase :get, "#{Stripe::DEFAULT_API_BASE}/v2/money_management/transactions/id_123" ).to_return( - body: '{"object":"v2.money_management.transaction","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":"inbound_transfer_reversal","created":"1970-01-12T21:42:34.472Z","financial_account":"financial_account","id":"obj_123","livemode":true,"status":"pending","status_transitions":{}}', + body: '{"object":"v2.money_management.transaction","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":"platform_earning_refund","created":"1970-01-12T21:42:34.472Z","financial_account":"financial_account","id":"obj_123","livemode":true,"status":"pending","status_transitions":{}}', status: 200 ) client = Stripe::StripeClient.new("sk_test_123") @@ -10888,7 +10888,7 @@ class CodegennedExampleTest < Test::Unit::TestCase :get, "#{Stripe::DEFAULT_API_BASE}/v2/money_management/transaction_entries" ).to_return( - body: '{"data":[{"object":"v2.money_management.transaction_entry","balance_impact":{"available":{"currency":"USD","value":35},"inbound_pending":{"currency":"USD","value":11},"outbound_pending":{"currency":"USD","value":60}},"created":"1970-01-12T21:42:34.472Z","effective_at":"1970-01-03T20:38:28.043Z","id":"obj_123","livemode":true,"transaction":"transaction","transaction_details":{"category":"inbound_transfer_reversal","financial_account":"financial_account"}}],"next_page_url":null,"previous_page_url":null}', + body: '{"data":[{"object":"v2.money_management.transaction_entry","balance_impact":{"available":{"currency":"USD","value":35},"inbound_pending":{"currency":"USD","value":11},"outbound_pending":{"currency":"USD","value":60}},"created":"1970-01-12T21:42:34.472Z","effective_at":"1970-01-03T20:38:28.043Z","id":"obj_123","livemode":true,"transaction":"transaction","transaction_details":{"category":"platform_earning_refund","financial_account":"financial_account"}}],"next_page_url":null,"previous_page_url":null}', status: 200 ) client = Stripe::StripeClient.new("sk_test_123") @@ -10901,7 +10901,7 @@ class CodegennedExampleTest < Test::Unit::TestCase :get, "#{Stripe::DEFAULT_API_BASE}/v2/money_management/transaction_entries/id_123" ).to_return( - body: '{"object":"v2.money_management.transaction_entry","balance_impact":{"available":{"currency":"USD","value":35},"inbound_pending":{"currency":"USD","value":11},"outbound_pending":{"currency":"USD","value":60}},"created":"1970-01-12T21:42:34.472Z","effective_at":"1970-01-03T20:38:28.043Z","id":"obj_123","livemode":true,"transaction":"transaction","transaction_details":{"category":"inbound_transfer_reversal","financial_account":"financial_account"}}', + body: '{"object":"v2.money_management.transaction_entry","balance_impact":{"available":{"currency":"USD","value":35},"inbound_pending":{"currency":"USD","value":11},"outbound_pending":{"currency":"USD","value":60}},"created":"1970-01-12T21:42:34.472Z","effective_at":"1970-01-03T20:38:28.043Z","id":"obj_123","livemode":true,"transaction":"transaction","transaction_details":{"category":"platform_earning_refund","financial_account":"financial_account"}}', status: 200 ) client = Stripe::StripeClient.new("sk_test_123") @@ -11471,7 +11471,7 @@ class CodegennedExampleTest < Test::Unit::TestCase client = Stripe::StripeClient.new("sk_test_123") assert_raises Stripe::AlreadyExistsError do - financial_account = client.v2.money_management.financial_accounts.create({ type: "storage" }) + financial_account = client.v2.money_management.financial_accounts.create({ type: "credit" }) end assert_requested :post, "#{Stripe::DEFAULT_API_BASE}/v2/money_management/financial_accounts" end