Update generated code for v2113 and

This commit is contained in:
Stripe OpenAPI 2025-11-07 17:43:35 +00:00
parent 828695b8d4
commit a259e8ca3c
19 changed files with 142 additions and 688 deletions

View File

@ -1 +1 @@
6d15a7f20cb77c2c22091a30e499cb89d7e3248c
6e09523f05606953bb23892f6c4e3fe58fe5ce92

View File

@ -1 +1 @@
v2112
v2113

View File

@ -108,6 +108,10 @@ module Stripe
Events::V2MoneyManagementTransactionCreatedEvent,
Events::V2MoneyManagementTransactionUpdatedEvent.lookup_type =>
Events::V2MoneyManagementTransactionUpdatedEvent,
Events::V2PaymentsOffSessionPaymentAttemptFailedEvent.lookup_type =>
Events::V2PaymentsOffSessionPaymentAttemptFailedEvent,
Events::V2PaymentsOffSessionPaymentAttemptStartedEvent.lookup_type =>
Events::V2PaymentsOffSessionPaymentAttemptStartedEvent,
Events::V2PaymentsOffSessionPaymentAuthorizationAttemptFailedEvent.lookup_type =>
Events::V2PaymentsOffSessionPaymentAuthorizationAttemptFailedEvent,
Events::V2PaymentsOffSessionPaymentAuthorizationAttemptStartedEvent.lookup_type =>
@ -241,6 +245,10 @@ module Stripe
Events::V2MoneyManagementTransactionCreatedEventNotification,
Events::V2MoneyManagementTransactionUpdatedEventNotification.lookup_type =>
Events::V2MoneyManagementTransactionUpdatedEventNotification,
Events::V2PaymentsOffSessionPaymentAttemptFailedEventNotification.lookup_type =>
Events::V2PaymentsOffSessionPaymentAttemptFailedEventNotification,
Events::V2PaymentsOffSessionPaymentAttemptStartedEventNotification.lookup_type =>
Events::V2PaymentsOffSessionPaymentAttemptStartedEventNotification,
Events::V2PaymentsOffSessionPaymentAuthorizationAttemptFailedEventNotification.lookup_type =>
Events::V2PaymentsOffSessionPaymentAuthorizationAttemptFailedEventNotification,
Events::V2PaymentsOffSessionPaymentAuthorizationAttemptStartedEventNotification.lookup_type =>

View File

@ -0,0 +1,44 @@
# File generated from our OpenAPI spec
# frozen_string_literal: true
module Stripe
module Events
# Sent after a failed attempt if there are still retries available on the OffSessionPayment.
class V2PaymentsOffSessionPaymentAttemptFailedEvent < Stripe::V2::Core::Event
def self.lookup_type
"v2.payments.off_session_payment.attempt_failed"
end
# Retrieves the related object from the API. Makes an API request on every call.
def fetch_related_object
_request(
method: :get,
path: related_object.url,
base_address: :api,
opts: { stripe_context: context }
)
end
attr_reader :related_object
end
# Sent after a failed attempt if there are still retries available on the OffSessionPayment.
class V2PaymentsOffSessionPaymentAttemptFailedEventNotification < Stripe::V2::Core::EventNotification
def self.lookup_type
"v2.payments.off_session_payment.attempt_failed"
end
attr_reader :related_object
# Retrieves the OffSessionPayment related to this EventNotification from the Stripe API. Makes an API request on every call.
def fetch_related_object
resp = @client.raw_request(
:get,
related_object.url,
opts: { stripe_context: context },
usage: ["fetch_related_object"]
)
@client.deserialize(resp.http_body, api_mode: Util.get_api_mode(related_object.url))
end
end
end
end

View File

@ -0,0 +1,46 @@
# File generated from our OpenAPI spec
# frozen_string_literal: true
module Stripe
module Events
# Sent when our internal scheduling system kicks off an attempt, whether it's a
# retry or an initial attempt.
class V2PaymentsOffSessionPaymentAttemptStartedEvent < Stripe::V2::Core::Event
def self.lookup_type
"v2.payments.off_session_payment.attempt_started"
end
# Retrieves the related object from the API. Makes an API request on every call.
def fetch_related_object
_request(
method: :get,
path: related_object.url,
base_address: :api,
opts: { stripe_context: context }
)
end
attr_reader :related_object
end
# Sent when our internal scheduling system kicks off an attempt, whether it's a
# retry or an initial attempt.
class V2PaymentsOffSessionPaymentAttemptStartedEventNotification < Stripe::V2::Core::EventNotification
def self.lookup_type
"v2.payments.off_session_payment.attempt_started"
end
attr_reader :related_object
# Retrieves the OffSessionPayment related to this EventNotification from the Stripe API. Makes an API request on every call.
def fetch_related_object
resp = @client.raw_request(
:get,
related_object.url,
opts: { stripe_context: context },
usage: ["fetch_related_object"]
)
@client.deserialize(resp.http_body, api_mode: Util.get_api_mode(related_object.url))
end
end
end
end

View File

@ -4,6 +4,7 @@
module Stripe
module Events
# Sent after a failed authorization if there are still retries available on the OffSessionPayment.
# This event has been renamed this to attempt_failed, but we are keeping this around for backwards compatibility.
class V2PaymentsOffSessionPaymentAuthorizationAttemptFailedEvent < Stripe::V2::Core::Event
def self.lookup_type
"v2.payments.off_session_payment.authorization_attempt_failed"
@ -22,6 +23,7 @@ module Stripe
end
# Sent after a failed authorization if there are still retries available on the OffSessionPayment.
# This event has been renamed this to attempt_failed, but we are keeping this around for backwards compatibility.
class V2PaymentsOffSessionPaymentAuthorizationAttemptFailedEventNotification < Stripe::V2::Core::EventNotification
def self.lookup_type
"v2.payments.off_session_payment.authorization_attempt_failed"

View File

@ -5,6 +5,7 @@ module Stripe
module Events
# Sent when our internal scheduling system kicks off an attempt at authorization, whether it's a
# retry or an initial authorization.
# This event has been renamed this to attempt_failed, but we are keeping this around for backwards compatibility.
class V2PaymentsOffSessionPaymentAuthorizationAttemptStartedEvent < Stripe::V2::Core::Event
def self.lookup_type
"v2.payments.off_session_payment.authorization_attempt_started"
@ -24,6 +25,7 @@ module Stripe
# Sent when our internal scheduling system kicks off an attempt at authorization, whether it's a
# retry or an initial authorization.
# This event has been renamed this to attempt_failed, but we are keeping this around for backwards compatibility.
class V2PaymentsOffSessionPaymentAuthorizationAttemptStartedEventNotification < Stripe::V2::Core::EventNotification
def self.lookup_type
"v2.payments.off_session_payment.authorization_attempt_started"

View File

@ -3,7 +3,7 @@
module Stripe
module Events
# Off-Session payment requires capture event definition.
# Sent when the off-session payment becomes available for capture.
class V2PaymentsOffSessionPaymentRequiresCaptureEvent < Stripe::V2::Core::Event
def self.lookup_type
"v2.payments.off_session_payment.requires_capture"
@ -21,7 +21,7 @@ module Stripe
attr_reader :related_object
end
# Off-Session payment requires capture event definition.
# Sent when the off-session payment becomes available for capture.
class V2PaymentsOffSessionPaymentRequiresCaptureEventNotification < Stripe::V2::Core::EventNotification
def self.lookup_type
"v2.payments.off_session_payment.requires_capture"

View File

@ -14,13 +14,9 @@ module Stripe
# and must be a positive integer representing how much to transfer in the smallest
# currency unit (e.g., 100 cents to charge $1.00).
attr_accessor :amount
# The account (if any) that the payment is attributed to for tax reporting, and
# where funds from the payment are transferred to after payment success.
attr_accessor :destination
def initialize(amount: nil, destination: nil)
def initialize(amount: nil)
@amount = amount
@destination = destination
end
end
# The amount to capture.

View File

@ -5,86 +5,6 @@ module Stripe
module V2
module Payments
class OffSessionPaymentCreateParams < ::Stripe::RequestParams
class AmountDetails < ::Stripe::RequestParams
class LineItem < ::Stripe::RequestParams
class Tax < ::Stripe::RequestParams
# Total portion of the amount that is for tax.
attr_accessor :total_tax_amount
def initialize(total_tax_amount: nil)
@total_tax_amount = total_tax_amount
end
end
# The amount an item was discounted for. Positive integer.
attr_accessor :discount_amount
# Unique identifier of the product. At most 12 characters long.
attr_accessor :product_code
# Name of the product. At most 100 characters long.
attr_accessor :product_name
# Number of items of the product. Positive integer.
attr_accessor :quantity
# Contains information about the tax on the item.
attr_accessor :tax
# Cost of the product. Non-negative integer.
attr_accessor :unit_cost
def initialize(
discount_amount: nil,
product_code: nil,
product_name: nil,
quantity: nil,
tax: nil,
unit_cost: nil
)
@discount_amount = discount_amount
@product_code = product_code
@product_name = product_name
@quantity = quantity
@tax = tax
@unit_cost = unit_cost
end
end
class Shipping < ::Stripe::RequestParams
# Portion of the amount that is for shipping.
attr_accessor :amount
# The postal code that represents the shipping source.
attr_accessor :from_postal_code
# The postal code that represents the shipping destination.
attr_accessor :to_postal_code
def initialize(amount: nil, from_postal_code: nil, to_postal_code: nil)
@amount = amount
@from_postal_code = from_postal_code
@to_postal_code = to_postal_code
end
end
class Tax < ::Stripe::RequestParams
# Total portion of the amount that is for tax.
attr_accessor :total_tax_amount
def initialize(total_tax_amount: nil)
@total_tax_amount = total_tax_amount
end
end
# The amount the total transaction was discounted for.
attr_accessor :discount_amount
# A list of line items, each containing information about a product in the PaymentIntent. There is a maximum of 100 line items.
attr_accessor :line_items
# Contains information about the shipping portion of the amount.
attr_accessor :shipping
# Contains information about the tax portion of the amount.
attr_accessor :tax
def initialize(discount_amount: nil, line_items: nil, shipping: nil, tax: nil)
@discount_amount = discount_amount
@line_items = line_items
@shipping = shipping
@tax = tax
end
end
class Capture < ::Stripe::RequestParams
# The method to use to capture the payment.
attr_accessor :capture_method
@ -157,14 +77,10 @@ module Stripe
end
# The “presentment amount” to be collected from the customer.
attr_accessor :amount
# Provides industry-specific information about the amount.
attr_accessor :amount_details
# The frequency of the underlying payment.
attr_accessor :cadence
# Details about the capture configuration for the OffSessionPayment.
attr_accessor :capture
# Whether the OffSessionPayment should be captured automatically or manually.
attr_accessor :capture_method
# ID of the Customer to which this OffSessionPayment belongs.
attr_accessor :customer
# Set of [key-value pairs](https://docs.corp.stripe.com/api/metadata) that you can
@ -198,10 +114,8 @@ module Stripe
def initialize(
amount: nil,
amount_details: nil,
cadence: nil,
capture: nil,
capture_method: nil,
customer: nil,
metadata: nil,
on_behalf_of: nil,
@ -215,10 +129,8 @@ module Stripe
transfer_data: nil
)
@amount = amount
@amount_details = amount_details
@cadence = cadence
@capture = capture
@capture_method = capture_method
@customer = customer
@metadata = metadata
@on_behalf_of = on_behalf_of

View File

@ -256,6 +256,8 @@ require "stripe/events/v2_money_management_received_debit_succeeded_event"
require "stripe/events/v2_money_management_received_debit_updated_event"
require "stripe/events/v2_money_management_transaction_created_event"
require "stripe/events/v2_money_management_transaction_updated_event"
require "stripe/events/v2_payments_off_session_payment_attempt_failed_event"
require "stripe/events/v2_payments_off_session_payment_attempt_started_event"
require "stripe/events/v2_payments_off_session_payment_authorization_attempt_failed_event"
require "stripe/events/v2_payments_off_session_payment_authorization_attempt_started_event"
require "stripe/events/v2_payments_off_session_payment_canceled_event"

View File

@ -2741,6 +2741,8 @@ module Stripe
attr_reader :fees_collector
# A value indicating who is responsible for losses when this Account cant pay back negative balances from payments.
attr_reader :losses_collector
# A value indicating responsibility for collecting requirements on this account.
attr_reader :requirements_collector
def self.inner_class_types
@inner_class_types = {}
@ -3890,7 +3892,8 @@ module Stripe
attr_reader :inquiry
# If `resource` is the type, the resource token.
attr_reader :resource
# The type of the reference. An additional hash is included with a name matching the type. It contains additional information specific to the type.
# The type of the reference. If the type is "inquiry", the inquiry token can be found in the "inquiry" field.
# Otherwise the type is an API resource, the token for which can be found in the "resource" field.
attr_reader :type
def self.inner_class_types
@ -3970,8 +3973,6 @@ module Stripe
@field_remappings = {}
end
end
# A value indicating responsibility for collecting requirements on this account.
attr_reader :collector
# A list of requirements for the Account.
attr_reader :entries
# An object containing an overview of requirements for the Account.

View File

@ -11,89 +11,6 @@ module Stripe
"v2.payments.off_session_payment"
end
class AmountDetails < ::Stripe::StripeObject
class LineItem < ::Stripe::StripeObject
class Tax < ::Stripe::StripeObject
# Total portion of the amount that is for tax.
attr_reader :total_tax_amount
def self.inner_class_types
@inner_class_types = {}
end
def self.field_remappings
@field_remappings = {}
end
end
# The amount an item was discounted for. Positive integer.
attr_reader :discount_amount
# Unique identifier of the product. At most 12 characters long.
attr_reader :product_code
# Name of the product. At most 100 characters long.
attr_reader :product_name
# Number of items of the product. Positive integer.
attr_reader :quantity
# Contains information about the tax on the item.
attr_reader :tax
# Cost of the product. Non-negative integer.
attr_reader :unit_cost
def self.inner_class_types
@inner_class_types = { tax: Tax }
end
def self.field_remappings
@field_remappings = {}
end
end
class Shipping < ::Stripe::StripeObject
# Portion of the amount that is for shipping.
attr_reader :amount
# The postal code that represents the shipping source.
attr_reader :from_postal_code
# The postal code that represents the shipping destination.
attr_reader :to_postal_code
def self.inner_class_types
@inner_class_types = {}
end
def self.field_remappings
@field_remappings = {}
end
end
class Tax < ::Stripe::StripeObject
# Total portion of the amount that is for tax.
attr_reader :total_tax_amount
def self.inner_class_types
@inner_class_types = {}
end
def self.field_remappings
@field_remappings = {}
end
end
# The amount the total transaction was discounted for.
attr_reader :discount_amount
# A list of line items, each containing information about a product in the PaymentIntent. There is a maximum of 100 line items.
attr_reader :line_items
# Contains information about the shipping portion of the amount.
attr_reader :shipping
# Contains information about the tax portion of the amount.
attr_reader :tax
def self.inner_class_types
@inner_class_types = { line_items: LineItem, shipping: Shipping, tax: Tax }
end
def self.field_remappings
@field_remappings = {}
end
end
class Capture < ::Stripe::StripeObject
# The timestamp when this payment is no longer eligible to be captured.
attr_reader :capture_before
@ -162,16 +79,12 @@ module Stripe
end
# The amount available to be captured.
attr_reader :amount_capturable
# Provides industry-specific information about the amount.
attr_reader :amount_details
# The “presentment amount” to be collected from the customer.
attr_reader :amount_requested
# The frequency of the underlying payment.
attr_reader :cadence
# Details about the capture configuration for the OffSessionPayment.
attr_reader :capture
# Whether the OffSessionPayment should be captured automatically or manually.
attr_reader :capture_method
# ID of the owning compartment.
attr_reader :compartment_id
# Creation time of the OffSessionPayment. Represented as a RFC 3339 date & time UTC
@ -225,7 +138,6 @@ module Stripe
def self.inner_class_types
@inner_class_types = {
amount_details: AmountDetails,
capture: Capture,
payments_orchestration: PaymentsOrchestration,
retry_details: RetryDetails,

View File

@ -61282,6 +61282,9 @@ module Stripe
# A value indicating who is responsible for losses when this Account cant pay back negative balances from payments.
sig { returns(String) }
def losses_collector; end
# A value indicating responsibility for collecting requirements on this account.
sig { returns(String) }
def requirements_collector; end
def self.inner_class_types
@inner_class_types = {}
end
@ -62482,7 +62485,8 @@ module Stripe
# If `resource` is the type, the resource token.
sig { returns(T.nilable(String)) }
def resource; end
# The type of the reference. An additional hash is included with a name matching the type. It contains additional information specific to the type.
# The type of the reference. If the type is "inquiry", the inquiry token can be found in the "inquiry" field.
# Otherwise the type is an API resource, the token for which can be found in the "resource" field.
sig { returns(String) }
def type; end
def self.inner_class_types
@ -62562,9 +62566,6 @@ module Stripe
@field_remappings = {}
end
end
# A value indicating responsibility for collecting requirements on this account.
sig { returns(String) }
def collector; end
# A list of requirements for the Account.
sig { returns(T.nilable(T::Array[Entry])) }
def entries; end
@ -65304,91 +65305,6 @@ module Stripe
module Payments
# OffSessionPayment resource.
class OffSessionPayment < APIResource
class AmountDetails < ::Stripe::StripeObject
class LineItem < ::Stripe::StripeObject
class Tax < ::Stripe::StripeObject
# Total portion of the amount that is for tax.
sig { returns(T.nilable(Integer)) }
def total_tax_amount; end
def self.inner_class_types
@inner_class_types = {}
end
def self.field_remappings
@field_remappings = {}
end
end
# The amount an item was discounted for. Positive integer.
sig { returns(T.nilable(Integer)) }
def discount_amount; end
# Unique identifier of the product. At most 12 characters long.
sig { returns(T.nilable(String)) }
def product_code; end
# Name of the product. At most 100 characters long.
sig { returns(String) }
def product_name; end
# Number of items of the product. Positive integer.
sig { returns(Integer) }
def quantity; end
# Contains information about the tax on the item.
sig { returns(T.nilable(Tax)) }
def tax; end
# Cost of the product. Non-negative integer.
sig { returns(Integer) }
def unit_cost; end
def self.inner_class_types
@inner_class_types = {tax: Tax}
end
def self.field_remappings
@field_remappings = {}
end
end
class Shipping < ::Stripe::StripeObject
# Portion of the amount that is for shipping.
sig { returns(T.nilable(Integer)) }
def amount; end
# The postal code that represents the shipping source.
sig { returns(T.nilable(String)) }
def from_postal_code; end
# The postal code that represents the shipping destination.
sig { returns(T.nilable(String)) }
def to_postal_code; end
def self.inner_class_types
@inner_class_types = {}
end
def self.field_remappings
@field_remappings = {}
end
end
class Tax < ::Stripe::StripeObject
# Total portion of the amount that is for tax.
sig { returns(T.nilable(Integer)) }
def total_tax_amount; end
def self.inner_class_types
@inner_class_types = {}
end
def self.field_remappings
@field_remappings = {}
end
end
# The amount the total transaction was discounted for.
sig { returns(T.nilable(Integer)) }
def discount_amount; end
# A list of line items, each containing information about a product in the PaymentIntent. There is a maximum of 100 line items.
sig { returns(T::Array[LineItem]) }
def line_items; end
# Contains information about the shipping portion of the amount.
sig { returns(T.nilable(Shipping)) }
def shipping; end
# Contains information about the tax portion of the amount.
sig { returns(T.nilable(Tax)) }
def tax; end
def self.inner_class_types
@inner_class_types = {line_items: LineItem, shipping: Shipping, tax: Tax}
end
def self.field_remappings
@field_remappings = {}
end
end
class Capture < ::Stripe::StripeObject
# The timestamp when this payment is no longer eligible to be captured.
sig { returns(T.nilable(String)) }
@ -65455,9 +65371,6 @@ module Stripe
# The amount available to be captured.
sig { returns(T.nilable(::Stripe::V2::Amount)) }
def amount_capturable; end
# Provides industry-specific information about the amount.
sig { returns(T.nilable(AmountDetails)) }
def amount_details; end
# The “presentment amount” to be collected from the customer.
sig { returns(::Stripe::V2::Amount) }
def amount_requested; end
@ -65467,9 +65380,6 @@ module Stripe
# Details about the capture configuration for the OffSessionPayment.
sig { returns(T.nilable(Capture)) }
def capture; end
# Whether the OffSessionPayment should be captured automatically or manually.
sig { returns(T.nilable(String)) }
def capture_method; end
# ID of the owning compartment.
sig { returns(String) }
def compartment_id; end
@ -199404,130 +199314,6 @@ module Stripe
module V2
module Payments
class OffSessionPaymentCreateParams < ::Stripe::RequestParams
class AmountDetails < ::Stripe::RequestParams
class LineItem < ::Stripe::RequestParams
class Tax < ::Stripe::RequestParams
# Total portion of the amount that is for tax.
sig { returns(T.nilable(Integer)) }
def total_tax_amount; end
sig { params(_total_tax_amount: T.nilable(Integer)).returns(T.nilable(Integer)) }
def total_tax_amount=(_total_tax_amount); end
sig { params(total_tax_amount: T.nilable(Integer)).void }
def initialize(total_tax_amount: nil); end
end
# The amount an item was discounted for. Positive integer.
sig { returns(T.nilable(Integer)) }
def discount_amount; end
sig { params(_discount_amount: T.nilable(Integer)).returns(T.nilable(Integer)) }
def discount_amount=(_discount_amount); end
# Unique identifier of the product. At most 12 characters long.
sig { returns(T.nilable(String)) }
def product_code; end
sig { params(_product_code: T.nilable(String)).returns(T.nilable(String)) }
def product_code=(_product_code); end
# Name of the product. At most 100 characters long.
sig { returns(String) }
def product_name; end
sig { params(_product_name: String).returns(String) }
def product_name=(_product_name); end
# Number of items of the product. Positive integer.
sig { returns(Integer) }
def quantity; end
sig { params(_quantity: Integer).returns(Integer) }
def quantity=(_quantity); end
# Contains information about the tax on the item.
sig {
returns(T.nilable(V2::Payments::OffSessionPaymentCreateParams::AmountDetails::LineItem::Tax))
}
def tax; end
sig {
params(_tax: T.nilable(V2::Payments::OffSessionPaymentCreateParams::AmountDetails::LineItem::Tax)).returns(T.nilable(V2::Payments::OffSessionPaymentCreateParams::AmountDetails::LineItem::Tax))
}
def tax=(_tax); end
# Cost of the product. Non-negative integer.
sig { returns(Integer) }
def unit_cost; end
sig { params(_unit_cost: Integer).returns(Integer) }
def unit_cost=(_unit_cost); end
sig {
params(discount_amount: T.nilable(Integer), product_code: T.nilable(String), product_name: String, quantity: Integer, tax: T.nilable(V2::Payments::OffSessionPaymentCreateParams::AmountDetails::LineItem::Tax), unit_cost: Integer).void
}
def initialize(
discount_amount: nil,
product_code: nil,
product_name: nil,
quantity: nil,
tax: nil,
unit_cost: nil
); end
end
class Shipping < ::Stripe::RequestParams
# Portion of the amount that is for shipping.
sig { returns(T.nilable(Integer)) }
def amount; end
sig { params(_amount: T.nilable(Integer)).returns(T.nilable(Integer)) }
def amount=(_amount); end
# The postal code that represents the shipping source.
sig { returns(T.nilable(String)) }
def from_postal_code; end
sig { params(_from_postal_code: T.nilable(String)).returns(T.nilable(String)) }
def from_postal_code=(_from_postal_code); end
# The postal code that represents the shipping destination.
sig { returns(T.nilable(String)) }
def to_postal_code; end
sig { params(_to_postal_code: T.nilable(String)).returns(T.nilable(String)) }
def to_postal_code=(_to_postal_code); end
sig {
params(amount: T.nilable(Integer), from_postal_code: T.nilable(String), to_postal_code: T.nilable(String)).void
}
def initialize(amount: nil, from_postal_code: nil, to_postal_code: nil); end
end
class Tax < ::Stripe::RequestParams
# Total portion of the amount that is for tax.
sig { returns(T.nilable(Integer)) }
def total_tax_amount; end
sig { params(_total_tax_amount: T.nilable(Integer)).returns(T.nilable(Integer)) }
def total_tax_amount=(_total_tax_amount); end
sig { params(total_tax_amount: T.nilable(Integer)).void }
def initialize(total_tax_amount: nil); end
end
# The amount the total transaction was discounted for.
sig { returns(T.nilable(Integer)) }
def discount_amount; end
sig { params(_discount_amount: T.nilable(Integer)).returns(T.nilable(Integer)) }
def discount_amount=(_discount_amount); end
# A list of line items, each containing information about a product in the PaymentIntent. There is a maximum of 100 line items.
sig {
returns(T::Array[V2::Payments::OffSessionPaymentCreateParams::AmountDetails::LineItem])
}
def line_items; end
sig {
params(_line_items: T::Array[V2::Payments::OffSessionPaymentCreateParams::AmountDetails::LineItem]).returns(T::Array[V2::Payments::OffSessionPaymentCreateParams::AmountDetails::LineItem])
}
def line_items=(_line_items); end
# Contains information about the shipping portion of the amount.
sig {
returns(T.nilable(V2::Payments::OffSessionPaymentCreateParams::AmountDetails::Shipping))
}
def shipping; end
sig {
params(_shipping: T.nilable(V2::Payments::OffSessionPaymentCreateParams::AmountDetails::Shipping)).returns(T.nilable(V2::Payments::OffSessionPaymentCreateParams::AmountDetails::Shipping))
}
def shipping=(_shipping); end
# Contains information about the tax portion of the amount.
sig {
returns(T.nilable(V2::Payments::OffSessionPaymentCreateParams::AmountDetails::Tax))
}
def tax; end
sig {
params(_tax: T.nilable(V2::Payments::OffSessionPaymentCreateParams::AmountDetails::Tax)).returns(T.nilable(V2::Payments::OffSessionPaymentCreateParams::AmountDetails::Tax))
}
def tax=(_tax); end
sig {
params(discount_amount: T.nilable(Integer), line_items: T::Array[V2::Payments::OffSessionPaymentCreateParams::AmountDetails::LineItem], shipping: T.nilable(V2::Payments::OffSessionPaymentCreateParams::AmountDetails::Shipping), tax: T.nilable(V2::Payments::OffSessionPaymentCreateParams::AmountDetails::Tax)).void
}
def initialize(discount_amount: nil, line_items: nil, shipping: nil, tax: nil); end
end
class Capture < ::Stripe::RequestParams
# The method to use to capture the payment.
sig { returns(String) }
@ -199582,11 +199368,11 @@ module Stripe
sig { params(_retry_policy: T.nilable(String)).returns(T.nilable(String)) }
def retry_policy=(_retry_policy); end
# Indicates the strategy for how you want Stripe to retry the payment.
sig { returns(String) }
sig { returns(T.nilable(String)) }
def retry_strategy; end
sig { params(_retry_strategy: String).returns(String) }
sig { params(_retry_strategy: T.nilable(String)).returns(T.nilable(String)) }
def retry_strategy=(_retry_strategy); end
sig { params(retry_policy: T.nilable(String), retry_strategy: String).void }
sig { params(retry_policy: T.nilable(String), retry_strategy: T.nilable(String)).void }
def initialize(retry_policy: nil, retry_strategy: nil); end
end
class TransferData < ::Stripe::RequestParams
@ -199615,13 +199401,6 @@ module Stripe
def amount; end
sig { params(_amount: ::Stripe::V2::Amount).returns(::Stripe::V2::Amount) }
def amount=(_amount); end
# Provides industry-specific information about the amount.
sig { returns(T.nilable(V2::Payments::OffSessionPaymentCreateParams::AmountDetails)) }
def amount_details; end
sig {
params(_amount_details: T.nilable(V2::Payments::OffSessionPaymentCreateParams::AmountDetails)).returns(T.nilable(V2::Payments::OffSessionPaymentCreateParams::AmountDetails))
}
def amount_details=(_amount_details); end
# The frequency of the underlying payment.
sig { returns(String) }
def cadence; end
@ -199634,11 +199413,6 @@ module Stripe
params(_capture: T.nilable(V2::Payments::OffSessionPaymentCreateParams::Capture)).returns(T.nilable(V2::Payments::OffSessionPaymentCreateParams::Capture))
}
def capture=(_capture); end
# Whether the OffSessionPayment should be captured automatically or manually.
sig { returns(T.nilable(String)) }
def capture_method; end
sig { params(_capture_method: T.nilable(String)).returns(T.nilable(String)) }
def capture_method=(_capture_method); end
# ID of the Customer to which this OffSessionPayment belongs.
sig { returns(String) }
def customer; end
@ -199715,14 +199489,12 @@ module Stripe
}
def transfer_data=(_transfer_data); end
sig {
params(amount: ::Stripe::V2::Amount, amount_details: T.nilable(V2::Payments::OffSessionPaymentCreateParams::AmountDetails), cadence: String, capture: T.nilable(V2::Payments::OffSessionPaymentCreateParams::Capture), capture_method: T.nilable(String), customer: String, metadata: T::Hash[String, String], on_behalf_of: T.nilable(String), payment_method: String, payment_method_options: T.nilable(V2::Payments::OffSessionPaymentCreateParams::PaymentMethodOptions), payments_orchestration: T.nilable(V2::Payments::OffSessionPaymentCreateParams::PaymentsOrchestration), retry_details: T.nilable(V2::Payments::OffSessionPaymentCreateParams::RetryDetails), statement_descriptor: T.nilable(String), statement_descriptor_suffix: T.nilable(String), test_clock: T.nilable(String), transfer_data: T.nilable(V2::Payments::OffSessionPaymentCreateParams::TransferData)).void
params(amount: ::Stripe::V2::Amount, cadence: String, capture: T.nilable(V2::Payments::OffSessionPaymentCreateParams::Capture), customer: String, metadata: T::Hash[String, String], on_behalf_of: T.nilable(String), payment_method: String, payment_method_options: T.nilable(V2::Payments::OffSessionPaymentCreateParams::PaymentMethodOptions), payments_orchestration: T.nilable(V2::Payments::OffSessionPaymentCreateParams::PaymentsOrchestration), retry_details: T.nilable(V2::Payments::OffSessionPaymentCreateParams::RetryDetails), statement_descriptor: T.nilable(String), statement_descriptor_suffix: T.nilable(String), test_clock: T.nilable(String), transfer_data: T.nilable(V2::Payments::OffSessionPaymentCreateParams::TransferData)).void
}
def initialize(
amount: nil,
amount_details: nil,
cadence: nil,
capture: nil,
capture_method: nil,
customer: nil,
metadata: nil,
on_behalf_of: nil,
@ -199772,19 +199544,13 @@ module Stripe
def amount; end
sig { params(_amount: T.nilable(Integer)).returns(T.nilable(Integer)) }
def amount=(_amount); end
# The account (if any) that the payment is attributed to for tax reporting, and
# where funds from the payment are transferred to after payment success.
sig { returns(String) }
def destination; end
sig { params(_destination: String).returns(String) }
def destination=(_destination); end
sig { params(amount: T.nilable(Integer), destination: String).void }
def initialize(amount: nil, destination: nil); end
sig { params(amount: T.nilable(Integer)).void }
def initialize(amount: nil); end
end
# The amount to capture.
sig { returns(Integer) }
sig { returns(T.nilable(Integer)) }
def amount_to_capture; end
sig { params(_amount_to_capture: Integer).returns(Integer) }
sig { params(_amount_to_capture: T.nilable(Integer)).returns(T.nilable(Integer)) }
def amount_to_capture=(_amount_to_capture); end
# Set of [key-value pairs](https://docs.corp.stripe.com/api/metadata) that you can
# attach to an object. This can be useful for storing additional information about
@ -199817,7 +199583,7 @@ module Stripe
}
def transfer_data=(_transfer_data); end
sig {
params(amount_to_capture: Integer, metadata: T::Hash[String, String], statement_descriptor: T.nilable(String), statement_descriptor_suffix: T.nilable(String), transfer_data: T.nilable(V2::Payments::OffSessionPaymentCaptureParams::TransferData)).void
params(amount_to_capture: T.nilable(Integer), metadata: T::Hash[String, String], statement_descriptor: T.nilable(String), statement_descriptor_suffix: T.nilable(String), transfer_data: T.nilable(V2::Payments::OffSessionPaymentCaptureParams::TransferData)).void
}
def initialize(
amount_to_capture: nil,

View File

@ -18,19 +18,13 @@ module Stripe
def amount; end
sig { params(_amount: T.nilable(Integer)).returns(T.nilable(Integer)) }
def amount=(_amount); end
# The account (if any) that the payment is attributed to for tax reporting, and
# where funds from the payment are transferred to after payment success.
sig { returns(String) }
def destination; end
sig { params(_destination: String).returns(String) }
def destination=(_destination); end
sig { params(amount: T.nilable(Integer), destination: String).void }
def initialize(amount: nil, destination: nil); end
sig { params(amount: T.nilable(Integer)).void }
def initialize(amount: nil); end
end
# The amount to capture.
sig { returns(Integer) }
sig { returns(T.nilable(Integer)) }
def amount_to_capture; end
sig { params(_amount_to_capture: Integer).returns(Integer) }
sig { params(_amount_to_capture: T.nilable(Integer)).returns(T.nilable(Integer)) }
def amount_to_capture=(_amount_to_capture); end
# Set of [key-value pairs](https://docs.corp.stripe.com/api/metadata) that you can
# attach to an object. This can be useful for storing additional information about
@ -63,7 +57,7 @@ module Stripe
}
def transfer_data=(_transfer_data); end
sig {
params(amount_to_capture: Integer, metadata: T::Hash[String, String], statement_descriptor: T.nilable(String), statement_descriptor_suffix: T.nilable(String), transfer_data: T.nilable(V2::Payments::OffSessionPaymentCaptureParams::TransferData)).void
params(amount_to_capture: T.nilable(Integer), metadata: T::Hash[String, String], statement_descriptor: T.nilable(String), statement_descriptor_suffix: T.nilable(String), transfer_data: T.nilable(V2::Payments::OffSessionPaymentCaptureParams::TransferData)).void
}
def initialize(
amount_to_capture: nil,

View File

@ -6,130 +6,6 @@ module Stripe
module V2
module Payments
class OffSessionPaymentCreateParams < ::Stripe::RequestParams
class AmountDetails < ::Stripe::RequestParams
class LineItem < ::Stripe::RequestParams
class Tax < ::Stripe::RequestParams
# Total portion of the amount that is for tax.
sig { returns(T.nilable(Integer)) }
def total_tax_amount; end
sig { params(_total_tax_amount: T.nilable(Integer)).returns(T.nilable(Integer)) }
def total_tax_amount=(_total_tax_amount); end
sig { params(total_tax_amount: T.nilable(Integer)).void }
def initialize(total_tax_amount: nil); end
end
# The amount an item was discounted for. Positive integer.
sig { returns(T.nilable(Integer)) }
def discount_amount; end
sig { params(_discount_amount: T.nilable(Integer)).returns(T.nilable(Integer)) }
def discount_amount=(_discount_amount); end
# Unique identifier of the product. At most 12 characters long.
sig { returns(T.nilable(String)) }
def product_code; end
sig { params(_product_code: T.nilable(String)).returns(T.nilable(String)) }
def product_code=(_product_code); end
# Name of the product. At most 100 characters long.
sig { returns(String) }
def product_name; end
sig { params(_product_name: String).returns(String) }
def product_name=(_product_name); end
# Number of items of the product. Positive integer.
sig { returns(Integer) }
def quantity; end
sig { params(_quantity: Integer).returns(Integer) }
def quantity=(_quantity); end
# Contains information about the tax on the item.
sig {
returns(T.nilable(V2::Payments::OffSessionPaymentCreateParams::AmountDetails::LineItem::Tax))
}
def tax; end
sig {
params(_tax: T.nilable(V2::Payments::OffSessionPaymentCreateParams::AmountDetails::LineItem::Tax)).returns(T.nilable(V2::Payments::OffSessionPaymentCreateParams::AmountDetails::LineItem::Tax))
}
def tax=(_tax); end
# Cost of the product. Non-negative integer.
sig { returns(Integer) }
def unit_cost; end
sig { params(_unit_cost: Integer).returns(Integer) }
def unit_cost=(_unit_cost); end
sig {
params(discount_amount: T.nilable(Integer), product_code: T.nilable(String), product_name: String, quantity: Integer, tax: T.nilable(V2::Payments::OffSessionPaymentCreateParams::AmountDetails::LineItem::Tax), unit_cost: Integer).void
}
def initialize(
discount_amount: nil,
product_code: nil,
product_name: nil,
quantity: nil,
tax: nil,
unit_cost: nil
); end
end
class Shipping < ::Stripe::RequestParams
# Portion of the amount that is for shipping.
sig { returns(T.nilable(Integer)) }
def amount; end
sig { params(_amount: T.nilable(Integer)).returns(T.nilable(Integer)) }
def amount=(_amount); end
# The postal code that represents the shipping source.
sig { returns(T.nilable(String)) }
def from_postal_code; end
sig { params(_from_postal_code: T.nilable(String)).returns(T.nilable(String)) }
def from_postal_code=(_from_postal_code); end
# The postal code that represents the shipping destination.
sig { returns(T.nilable(String)) }
def to_postal_code; end
sig { params(_to_postal_code: T.nilable(String)).returns(T.nilable(String)) }
def to_postal_code=(_to_postal_code); end
sig {
params(amount: T.nilable(Integer), from_postal_code: T.nilable(String), to_postal_code: T.nilable(String)).void
}
def initialize(amount: nil, from_postal_code: nil, to_postal_code: nil); end
end
class Tax < ::Stripe::RequestParams
# Total portion of the amount that is for tax.
sig { returns(T.nilable(Integer)) }
def total_tax_amount; end
sig { params(_total_tax_amount: T.nilable(Integer)).returns(T.nilable(Integer)) }
def total_tax_amount=(_total_tax_amount); end
sig { params(total_tax_amount: T.nilable(Integer)).void }
def initialize(total_tax_amount: nil); end
end
# The amount the total transaction was discounted for.
sig { returns(T.nilable(Integer)) }
def discount_amount; end
sig { params(_discount_amount: T.nilable(Integer)).returns(T.nilable(Integer)) }
def discount_amount=(_discount_amount); end
# A list of line items, each containing information about a product in the PaymentIntent. There is a maximum of 100 line items.
sig {
returns(T::Array[V2::Payments::OffSessionPaymentCreateParams::AmountDetails::LineItem])
}
def line_items; end
sig {
params(_line_items: T::Array[V2::Payments::OffSessionPaymentCreateParams::AmountDetails::LineItem]).returns(T::Array[V2::Payments::OffSessionPaymentCreateParams::AmountDetails::LineItem])
}
def line_items=(_line_items); end
# Contains information about the shipping portion of the amount.
sig {
returns(T.nilable(V2::Payments::OffSessionPaymentCreateParams::AmountDetails::Shipping))
}
def shipping; end
sig {
params(_shipping: T.nilable(V2::Payments::OffSessionPaymentCreateParams::AmountDetails::Shipping)).returns(T.nilable(V2::Payments::OffSessionPaymentCreateParams::AmountDetails::Shipping))
}
def shipping=(_shipping); end
# Contains information about the tax portion of the amount.
sig {
returns(T.nilable(V2::Payments::OffSessionPaymentCreateParams::AmountDetails::Tax))
}
def tax; end
sig {
params(_tax: T.nilable(V2::Payments::OffSessionPaymentCreateParams::AmountDetails::Tax)).returns(T.nilable(V2::Payments::OffSessionPaymentCreateParams::AmountDetails::Tax))
}
def tax=(_tax); end
sig {
params(discount_amount: T.nilable(Integer), line_items: T::Array[V2::Payments::OffSessionPaymentCreateParams::AmountDetails::LineItem], shipping: T.nilable(V2::Payments::OffSessionPaymentCreateParams::AmountDetails::Shipping), tax: T.nilable(V2::Payments::OffSessionPaymentCreateParams::AmountDetails::Tax)).void
}
def initialize(discount_amount: nil, line_items: nil, shipping: nil, tax: nil); end
end
class Capture < ::Stripe::RequestParams
# The method to use to capture the payment.
sig { returns(String) }
@ -184,11 +60,11 @@ module Stripe
sig { params(_retry_policy: T.nilable(String)).returns(T.nilable(String)) }
def retry_policy=(_retry_policy); end
# Indicates the strategy for how you want Stripe to retry the payment.
sig { returns(String) }
sig { returns(T.nilable(String)) }
def retry_strategy; end
sig { params(_retry_strategy: String).returns(String) }
sig { params(_retry_strategy: T.nilable(String)).returns(T.nilable(String)) }
def retry_strategy=(_retry_strategy); end
sig { params(retry_policy: T.nilable(String), retry_strategy: String).void }
sig { params(retry_policy: T.nilable(String), retry_strategy: T.nilable(String)).void }
def initialize(retry_policy: nil, retry_strategy: nil); end
end
class TransferData < ::Stripe::RequestParams
@ -217,13 +93,6 @@ module Stripe
def amount; end
sig { params(_amount: ::Stripe::V2::Amount).returns(::Stripe::V2::Amount) }
def amount=(_amount); end
# Provides industry-specific information about the amount.
sig { returns(T.nilable(V2::Payments::OffSessionPaymentCreateParams::AmountDetails)) }
def amount_details; end
sig {
params(_amount_details: T.nilable(V2::Payments::OffSessionPaymentCreateParams::AmountDetails)).returns(T.nilable(V2::Payments::OffSessionPaymentCreateParams::AmountDetails))
}
def amount_details=(_amount_details); end
# The frequency of the underlying payment.
sig { returns(String) }
def cadence; end
@ -236,11 +105,6 @@ module Stripe
params(_capture: T.nilable(V2::Payments::OffSessionPaymentCreateParams::Capture)).returns(T.nilable(V2::Payments::OffSessionPaymentCreateParams::Capture))
}
def capture=(_capture); end
# Whether the OffSessionPayment should be captured automatically or manually.
sig { returns(T.nilable(String)) }
def capture_method; end
sig { params(_capture_method: T.nilable(String)).returns(T.nilable(String)) }
def capture_method=(_capture_method); end
# ID of the Customer to which this OffSessionPayment belongs.
sig { returns(String) }
def customer; end
@ -317,14 +181,12 @@ module Stripe
}
def transfer_data=(_transfer_data); end
sig {
params(amount: ::Stripe::V2::Amount, amount_details: T.nilable(V2::Payments::OffSessionPaymentCreateParams::AmountDetails), cadence: String, capture: T.nilable(V2::Payments::OffSessionPaymentCreateParams::Capture), capture_method: T.nilable(String), customer: String, metadata: T::Hash[String, String], on_behalf_of: T.nilable(String), payment_method: String, payment_method_options: T.nilable(V2::Payments::OffSessionPaymentCreateParams::PaymentMethodOptions), payments_orchestration: T.nilable(V2::Payments::OffSessionPaymentCreateParams::PaymentsOrchestration), retry_details: T.nilable(V2::Payments::OffSessionPaymentCreateParams::RetryDetails), statement_descriptor: T.nilable(String), statement_descriptor_suffix: T.nilable(String), test_clock: T.nilable(String), transfer_data: T.nilable(V2::Payments::OffSessionPaymentCreateParams::TransferData)).void
params(amount: ::Stripe::V2::Amount, cadence: String, capture: T.nilable(V2::Payments::OffSessionPaymentCreateParams::Capture), customer: String, metadata: T::Hash[String, String], on_behalf_of: T.nilable(String), payment_method: String, payment_method_options: T.nilable(V2::Payments::OffSessionPaymentCreateParams::PaymentMethodOptions), payments_orchestration: T.nilable(V2::Payments::OffSessionPaymentCreateParams::PaymentsOrchestration), retry_details: T.nilable(V2::Payments::OffSessionPaymentCreateParams::RetryDetails), statement_descriptor: T.nilable(String), statement_descriptor_suffix: T.nilable(String), test_clock: T.nilable(String), transfer_data: T.nilable(V2::Payments::OffSessionPaymentCreateParams::TransferData)).void
}
def initialize(
amount: nil,
amount_details: nil,
cadence: nil,
capture: nil,
capture_method: nil,
customer: nil,
metadata: nil,
on_behalf_of: nil,

View File

@ -2803,6 +2803,9 @@ module Stripe
# A value indicating who is responsible for losses when this Account cant pay back negative balances from payments.
sig { returns(String) }
def losses_collector; end
# A value indicating responsibility for collecting requirements on this account.
sig { returns(String) }
def requirements_collector; end
def self.inner_class_types
@inner_class_types = {}
end
@ -4003,7 +4006,8 @@ module Stripe
# If `resource` is the type, the resource token.
sig { returns(T.nilable(String)) }
def resource; end
# The type of the reference. An additional hash is included with a name matching the type. It contains additional information specific to the type.
# The type of the reference. If the type is "inquiry", the inquiry token can be found in the "inquiry" field.
# Otherwise the type is an API resource, the token for which can be found in the "resource" field.
sig { returns(String) }
def type; end
def self.inner_class_types
@ -4083,9 +4087,6 @@ module Stripe
@field_remappings = {}
end
end
# A value indicating responsibility for collecting requirements on this account.
sig { returns(String) }
def collector; end
# A list of requirements for the Account.
sig { returns(T.nilable(T::Array[Entry])) }
def entries; end

View File

@ -7,91 +7,6 @@ module Stripe
module Payments
# OffSessionPayment resource.
class OffSessionPayment < APIResource
class AmountDetails < ::Stripe::StripeObject
class LineItem < ::Stripe::StripeObject
class Tax < ::Stripe::StripeObject
# Total portion of the amount that is for tax.
sig { returns(T.nilable(Integer)) }
def total_tax_amount; end
def self.inner_class_types
@inner_class_types = {}
end
def self.field_remappings
@field_remappings = {}
end
end
# The amount an item was discounted for. Positive integer.
sig { returns(T.nilable(Integer)) }
def discount_amount; end
# Unique identifier of the product. At most 12 characters long.
sig { returns(T.nilable(String)) }
def product_code; end
# Name of the product. At most 100 characters long.
sig { returns(String) }
def product_name; end
# Number of items of the product. Positive integer.
sig { returns(Integer) }
def quantity; end
# Contains information about the tax on the item.
sig { returns(T.nilable(Tax)) }
def tax; end
# Cost of the product. Non-negative integer.
sig { returns(Integer) }
def unit_cost; end
def self.inner_class_types
@inner_class_types = {tax: Tax}
end
def self.field_remappings
@field_remappings = {}
end
end
class Shipping < ::Stripe::StripeObject
# Portion of the amount that is for shipping.
sig { returns(T.nilable(Integer)) }
def amount; end
# The postal code that represents the shipping source.
sig { returns(T.nilable(String)) }
def from_postal_code; end
# The postal code that represents the shipping destination.
sig { returns(T.nilable(String)) }
def to_postal_code; end
def self.inner_class_types
@inner_class_types = {}
end
def self.field_remappings
@field_remappings = {}
end
end
class Tax < ::Stripe::StripeObject
# Total portion of the amount that is for tax.
sig { returns(T.nilable(Integer)) }
def total_tax_amount; end
def self.inner_class_types
@inner_class_types = {}
end
def self.field_remappings
@field_remappings = {}
end
end
# The amount the total transaction was discounted for.
sig { returns(T.nilable(Integer)) }
def discount_amount; end
# A list of line items, each containing information about a product in the PaymentIntent. There is a maximum of 100 line items.
sig { returns(T::Array[LineItem]) }
def line_items; end
# Contains information about the shipping portion of the amount.
sig { returns(T.nilable(Shipping)) }
def shipping; end
# Contains information about the tax portion of the amount.
sig { returns(T.nilable(Tax)) }
def tax; end
def self.inner_class_types
@inner_class_types = {line_items: LineItem, shipping: Shipping, tax: Tax}
end
def self.field_remappings
@field_remappings = {}
end
end
class Capture < ::Stripe::StripeObject
# The timestamp when this payment is no longer eligible to be captured.
sig { returns(T.nilable(String)) }
@ -158,9 +73,6 @@ module Stripe
# The amount available to be captured.
sig { returns(T.nilable(::Stripe::V2::Amount)) }
def amount_capturable; end
# Provides industry-specific information about the amount.
sig { returns(T.nilable(AmountDetails)) }
def amount_details; end
# The “presentment amount” to be collected from the customer.
sig { returns(::Stripe::V2::Amount) }
def amount_requested; end
@ -170,9 +82,6 @@ module Stripe
# Details about the capture configuration for the OffSessionPayment.
sig { returns(T.nilable(Capture)) }
def capture; end
# Whether the OffSessionPayment should be captured automatically or manually.
sig { returns(T.nilable(String)) }
def capture_method; end
# ID of the owning compartment.
sig { returns(String) }
def compartment_id; end

View File

@ -8955,10 +8955,7 @@ module Stripe
off_session_payment = client.v2.payments.off_session_payments.capture(
"id_123",
{
amount_to_capture: 1_374_310_455,
metadata: { key: "metadata" },
}
{ metadata: { key: "metadata" } }
)
assert_requested :post, "#{Stripe::DEFAULT_API_BASE}/v2/payments/off_session_payments/id_123/capture"
end