From 80f1000ffe721acfe90997cf6e61099aa294e98c Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Mon, 14 Jul 2025 16:54:42 +0000 Subject: [PATCH] Update generated code for v1839 and 2025-06-30.preview --- OPENAPI_VERSION | 2 +- lib/stripe/resources/payment_intent.rb | 173 ++++++++ lib/stripe/services/payment_intent_service.rb | 173 ++++++++ rbi/stripe.rbi | 384 +++++++++++++++++- rbi/stripe/resources/payment_intent.rbi | 192 ++++++++- .../services/payment_intent_service.rbi | 192 ++++++++- 6 files changed, 1111 insertions(+), 5 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 05e1eecb..5dd641dc 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1838 \ No newline at end of file +v1839 \ No newline at end of file diff --git a/lib/stripe/resources/payment_intent.rb b/lib/stripe/resources/payment_intent.rb index 71056f6c..9162886e 100644 --- a/lib/stripe/resources/payment_intent.rb +++ b/lib/stripe/resources/payment_intent.rb @@ -14224,6 +14224,159 @@ module Stripe end class IncrementAuthorizationParams < Stripe::RequestParams + class AmountDetails < Stripe::RequestParams + class LineItem < Stripe::RequestParams + class PaymentMethodOptions < Stripe::RequestParams + class Card < Stripe::RequestParams + # Identifier that categorizes the items being purchased using a standardized commodity scheme such as (but not limited to) UNSPSC, NAICS, NAPCS, etc. + attr_accessor :commodity_code + + def initialize(commodity_code: nil) + @commodity_code = commodity_code + end + end + + class CardPresent < Stripe::RequestParams + # Identifier that categorizes the items being purchased using a standardized commodity scheme such as (but not limited to) UNSPSC, NAICS, NAPCS, etc. + attr_accessor :commodity_code + + def initialize(commodity_code: nil) + @commodity_code = commodity_code + end + end + + class Klarna < Stripe::RequestParams + # URL to an image for the product. Max length, 4096 characters. + attr_accessor :image_url + # URL to the product page. Max length, 4096 characters. + attr_accessor :product_url + # Reference for the subscription this line item is for. + attr_accessor :subscription_reference + + def initialize(image_url: nil, product_url: nil, subscription_reference: nil) + @image_url = image_url + @product_url = product_url + @subscription_reference = subscription_reference + end + end + + class Paypal < Stripe::RequestParams + # Type of the line item. + attr_accessor :category + # Description of the line item. + attr_accessor :description + # The Stripe account ID of the connected account that sells the item. + attr_accessor :sold_by + + def initialize(category: nil, description: nil, sold_by: nil) + @category = category + @description = description + @sold_by = sold_by + end + end + # This sub-hash contains line item details that are specific to `card` payment method." + attr_accessor :card + # This sub-hash contains line item details that are specific to `card_present` payment method." + attr_accessor :card_present + # This sub-hash contains line item details that are specific to `klarna` payment method." + attr_accessor :klarna + # This sub-hash contains line item details that are specific to `paypal` payment method." + attr_accessor :paypal + + def initialize(card: nil, card_present: nil, klarna: nil, paypal: nil) + @card = card + @card_present = card_present + @klarna = klarna + @paypal = paypal + end + end + + class Tax < Stripe::RequestParams + # The total tax on an item. Non-negative integer. + 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 + # Payment method-specific information for line items. + attr_accessor :payment_method_options + # 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 + # A unit of measure for the line item, such as gallons, feet, meters, etc. + attr_accessor :unit_of_measure + + def initialize( + discount_amount: nil, + payment_method_options: nil, + product_code: nil, + product_name: nil, + quantity: nil, + tax: nil, + unit_cost: nil, + unit_of_measure: nil + ) + @discount_amount = discount_amount + @payment_method_options = payment_method_options + @product_code = product_code + @product_name = product_name + @quantity = quantity + @tax = tax + @unit_cost = unit_cost + @unit_of_measure = unit_of_measure + 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 an item 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 Hooks < Stripe::RequestParams class Inputs < Stripe::RequestParams class Tax < Stripe::RequestParams @@ -14249,6 +14402,18 @@ module Stripe end end + class PaymentDetails < Stripe::RequestParams + # Some customers might be required by their company or organization to provide this information. If so, provide this value. Otherwise you can ignore this field. + attr_accessor :customer_reference + # A unique value assigned by the business to identify the transaction. + attr_accessor :order_reference + + def initialize(customer_reference: nil, order_reference: nil) + @customer_reference = customer_reference + @order_reference = order_reference + end + end + class PaymentMethodOptions < Stripe::RequestParams class Card < Stripe::RequestParams # Request partial authorization on this PaymentIntent. @@ -14276,6 +14441,8 @@ module Stripe end # The updated total amount that you intend to collect from the cardholder. This amount must be greater than the currently authorized amount. attr_accessor :amount + # Provides industry-specific information about the amount. + attr_accessor :amount_details # The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. The amount of the application fee collected will be capped at the total amount captured. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). attr_accessor :application_fee_amount # An arbitrary string attached to the object. Often useful for displaying to users. @@ -14286,6 +14453,8 @@ module Stripe attr_accessor :hooks # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. attr_accessor :metadata + # Provides industry-specific information about the charge. + attr_accessor :payment_details # Payment method-specific configuration for this PaymentIntent. attr_accessor :payment_method_options # Text that appears on the customer's statement as the statement descriptor for a non-card or card charge. This value overrides the account's default statement descriptor. For information about requirements, including the 22-character limit, see [the Statement Descriptor docs](https://docs.stripe.com/get-started/account/statement-descriptors). @@ -14296,21 +14465,25 @@ module Stripe def initialize( amount: nil, + amount_details: nil, application_fee_amount: nil, description: nil, expand: nil, hooks: nil, metadata: nil, + payment_details: nil, payment_method_options: nil, statement_descriptor: nil, transfer_data: nil ) @amount = amount + @amount_details = amount_details @application_fee_amount = application_fee_amount @description = description @expand = expand @hooks = hooks @metadata = metadata + @payment_details = payment_details @payment_method_options = payment_method_options @statement_descriptor = statement_descriptor @transfer_data = transfer_data diff --git a/lib/stripe/services/payment_intent_service.rb b/lib/stripe/services/payment_intent_service.rb index 27495c3d..8e4f9f82 100644 --- a/lib/stripe/services/payment_intent_service.rb +++ b/lib/stripe/services/payment_intent_service.rb @@ -12255,6 +12255,159 @@ module Stripe end class IncrementAuthorizationParams < Stripe::RequestParams + class AmountDetails < Stripe::RequestParams + class LineItem < Stripe::RequestParams + class PaymentMethodOptions < Stripe::RequestParams + class Card < Stripe::RequestParams + # Identifier that categorizes the items being purchased using a standardized commodity scheme such as (but not limited to) UNSPSC, NAICS, NAPCS, etc. + attr_accessor :commodity_code + + def initialize(commodity_code: nil) + @commodity_code = commodity_code + end + end + + class CardPresent < Stripe::RequestParams + # Identifier that categorizes the items being purchased using a standardized commodity scheme such as (but not limited to) UNSPSC, NAICS, NAPCS, etc. + attr_accessor :commodity_code + + def initialize(commodity_code: nil) + @commodity_code = commodity_code + end + end + + class Klarna < Stripe::RequestParams + # URL to an image for the product. Max length, 4096 characters. + attr_accessor :image_url + # URL to the product page. Max length, 4096 characters. + attr_accessor :product_url + # Reference for the subscription this line item is for. + attr_accessor :subscription_reference + + def initialize(image_url: nil, product_url: nil, subscription_reference: nil) + @image_url = image_url + @product_url = product_url + @subscription_reference = subscription_reference + end + end + + class Paypal < Stripe::RequestParams + # Type of the line item. + attr_accessor :category + # Description of the line item. + attr_accessor :description + # The Stripe account ID of the connected account that sells the item. + attr_accessor :sold_by + + def initialize(category: nil, description: nil, sold_by: nil) + @category = category + @description = description + @sold_by = sold_by + end + end + # This sub-hash contains line item details that are specific to `card` payment method." + attr_accessor :card + # This sub-hash contains line item details that are specific to `card_present` payment method." + attr_accessor :card_present + # This sub-hash contains line item details that are specific to `klarna` payment method." + attr_accessor :klarna + # This sub-hash contains line item details that are specific to `paypal` payment method." + attr_accessor :paypal + + def initialize(card: nil, card_present: nil, klarna: nil, paypal: nil) + @card = card + @card_present = card_present + @klarna = klarna + @paypal = paypal + end + end + + class Tax < Stripe::RequestParams + # The total tax on an item. Non-negative integer. + 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 + # Payment method-specific information for line items. + attr_accessor :payment_method_options + # 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 + # A unit of measure for the line item, such as gallons, feet, meters, etc. + attr_accessor :unit_of_measure + + def initialize( + discount_amount: nil, + payment_method_options: nil, + product_code: nil, + product_name: nil, + quantity: nil, + tax: nil, + unit_cost: nil, + unit_of_measure: nil + ) + @discount_amount = discount_amount + @payment_method_options = payment_method_options + @product_code = product_code + @product_name = product_name + @quantity = quantity + @tax = tax + @unit_cost = unit_cost + @unit_of_measure = unit_of_measure + 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 an item 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 Hooks < Stripe::RequestParams class Inputs < Stripe::RequestParams class Tax < Stripe::RequestParams @@ -12280,6 +12433,18 @@ module Stripe end end + class PaymentDetails < Stripe::RequestParams + # Some customers might be required by their company or organization to provide this information. If so, provide this value. Otherwise you can ignore this field. + attr_accessor :customer_reference + # A unique value assigned by the business to identify the transaction. + attr_accessor :order_reference + + def initialize(customer_reference: nil, order_reference: nil) + @customer_reference = customer_reference + @order_reference = order_reference + end + end + class PaymentMethodOptions < Stripe::RequestParams class Card < Stripe::RequestParams # Request partial authorization on this PaymentIntent. @@ -12307,6 +12472,8 @@ module Stripe end # The updated total amount that you intend to collect from the cardholder. This amount must be greater than the currently authorized amount. attr_accessor :amount + # Provides industry-specific information about the amount. + attr_accessor :amount_details # The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. The amount of the application fee collected will be capped at the total amount captured. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). attr_accessor :application_fee_amount # An arbitrary string attached to the object. Often useful for displaying to users. @@ -12317,6 +12484,8 @@ module Stripe attr_accessor :hooks # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. attr_accessor :metadata + # Provides industry-specific information about the charge. + attr_accessor :payment_details # Payment method-specific configuration for this PaymentIntent. attr_accessor :payment_method_options # Text that appears on the customer's statement as the statement descriptor for a non-card or card charge. This value overrides the account's default statement descriptor. For information about requirements, including the 22-character limit, see [the Statement Descriptor docs](https://docs.stripe.com/get-started/account/statement-descriptors). @@ -12327,21 +12496,25 @@ module Stripe def initialize( amount: nil, + amount_details: nil, application_fee_amount: nil, description: nil, expand: nil, hooks: nil, metadata: nil, + payment_details: nil, payment_method_options: nil, statement_descriptor: nil, transfer_data: nil ) @amount = amount + @amount_details = amount_details @application_fee_amount = application_fee_amount @description = description @expand = expand @hooks = hooks @metadata = metadata + @payment_details = payment_details @payment_method_options = payment_method_options @statement_descriptor = statement_descriptor @transfer_data = transfer_data diff --git a/rbi/stripe.rbi b/rbi/stripe.rbi index e07ab4a0..f70e4738 100644 --- a/rbi/stripe.rbi +++ b/rbi/stripe.rbi @@ -61612,6 +61612,172 @@ module Stripe ); end end class IncrementAuthorizationParams < Stripe::RequestParams + class AmountDetails < Stripe::RequestParams + class LineItem < Stripe::RequestParams + class PaymentMethodOptions < Stripe::RequestParams + class Card < Stripe::RequestParams + # Identifier that categorizes the items being purchased using a standardized commodity scheme such as (but not limited to) UNSPSC, NAICS, NAPCS, etc. + sig { returns(T.nilable(String)) } + attr_accessor :commodity_code + sig { params(commodity_code: T.nilable(String)).void } + def initialize(commodity_code: nil); end + end + class CardPresent < Stripe::RequestParams + # Identifier that categorizes the items being purchased using a standardized commodity scheme such as (but not limited to) UNSPSC, NAICS, NAPCS, etc. + sig { returns(T.nilable(String)) } + attr_accessor :commodity_code + sig { params(commodity_code: T.nilable(String)).void } + def initialize(commodity_code: nil); end + end + class Klarna < Stripe::RequestParams + # URL to an image for the product. Max length, 4096 characters. + sig { returns(T.nilable(String)) } + attr_accessor :image_url + # URL to the product page. Max length, 4096 characters. + sig { returns(T.nilable(String)) } + attr_accessor :product_url + # Reference for the subscription this line item is for. + sig { returns(T.nilable(String)) } + attr_accessor :subscription_reference + sig { + params(image_url: T.nilable(String), product_url: T.nilable(String), subscription_reference: T.nilable(String)).void + } + def initialize(image_url: nil, product_url: nil, subscription_reference: nil); end + end + class Paypal < Stripe::RequestParams + # Type of the line item. + sig { returns(T.nilable(String)) } + attr_accessor :category + # Description of the line item. + sig { returns(T.nilable(String)) } + attr_accessor :description + # The Stripe account ID of the connected account that sells the item. + sig { returns(T.nilable(String)) } + attr_accessor :sold_by + sig { + params(category: T.nilable(String), description: T.nilable(String), sold_by: T.nilable(String)).void + } + def initialize(category: nil, description: nil, sold_by: nil); end + end + # This sub-hash contains line item details that are specific to `card` payment method." + sig { + returns(T.nilable(::Stripe::PaymentIntent::IncrementAuthorizationParams::AmountDetails::LineItem::PaymentMethodOptions::Card)) + } + attr_accessor :card + # This sub-hash contains line item details that are specific to `card_present` payment method." + sig { + returns(T.nilable(::Stripe::PaymentIntent::IncrementAuthorizationParams::AmountDetails::LineItem::PaymentMethodOptions::CardPresent)) + } + attr_accessor :card_present + # This sub-hash contains line item details that are specific to `klarna` payment method." + sig { + returns(T.nilable(::Stripe::PaymentIntent::IncrementAuthorizationParams::AmountDetails::LineItem::PaymentMethodOptions::Klarna)) + } + attr_accessor :klarna + # This sub-hash contains line item details that are specific to `paypal` payment method." + sig { + returns(T.nilable(::Stripe::PaymentIntent::IncrementAuthorizationParams::AmountDetails::LineItem::PaymentMethodOptions::Paypal)) + } + attr_accessor :paypal + sig { + params(card: T.nilable(::Stripe::PaymentIntent::IncrementAuthorizationParams::AmountDetails::LineItem::PaymentMethodOptions::Card), card_present: T.nilable(::Stripe::PaymentIntent::IncrementAuthorizationParams::AmountDetails::LineItem::PaymentMethodOptions::CardPresent), klarna: T.nilable(::Stripe::PaymentIntent::IncrementAuthorizationParams::AmountDetails::LineItem::PaymentMethodOptions::Klarna), paypal: T.nilable(::Stripe::PaymentIntent::IncrementAuthorizationParams::AmountDetails::LineItem::PaymentMethodOptions::Paypal)).void + } + def initialize(card: nil, card_present: nil, klarna: nil, paypal: nil); end + end + class Tax < Stripe::RequestParams + # The total tax on an item. Non-negative integer. + sig { returns(Integer) } + attr_accessor :total_tax_amount + sig { params(total_tax_amount: Integer).void } + def initialize(total_tax_amount: nil); end + end + # The amount an item was discounted for. Positive integer. + sig { returns(T.nilable(Integer)) } + attr_accessor :discount_amount + # Payment method-specific information for line items. + sig { + returns(T.nilable(::Stripe::PaymentIntent::IncrementAuthorizationParams::AmountDetails::LineItem::PaymentMethodOptions)) + } + attr_accessor :payment_method_options + # Unique identifier of the product. At most 12 characters long. + sig { returns(T.nilable(String)) } + attr_accessor :product_code + # Name of the product. At most 100 characters long. + sig { returns(String) } + attr_accessor :product_name + # Number of items of the product. Positive integer. + sig { returns(Integer) } + attr_accessor :quantity + # Contains information about the tax on the item. + sig { + returns(T.nilable(::Stripe::PaymentIntent::IncrementAuthorizationParams::AmountDetails::LineItem::Tax)) + } + attr_accessor :tax + # Cost of the product. Non-negative integer. + sig { returns(Integer) } + attr_accessor :unit_cost + # A unit of measure for the line item, such as gallons, feet, meters, etc. + sig { returns(T.nilable(String)) } + attr_accessor :unit_of_measure + sig { + params(discount_amount: T.nilable(Integer), payment_method_options: T.nilable(::Stripe::PaymentIntent::IncrementAuthorizationParams::AmountDetails::LineItem::PaymentMethodOptions), product_code: T.nilable(String), product_name: String, quantity: Integer, tax: T.nilable(::Stripe::PaymentIntent::IncrementAuthorizationParams::AmountDetails::LineItem::Tax), unit_cost: Integer, unit_of_measure: T.nilable(String)).void + } + def initialize( + discount_amount: nil, + payment_method_options: nil, + product_code: nil, + product_name: nil, + quantity: nil, + tax: nil, + unit_cost: nil, + unit_of_measure: nil + ); end + end + class Shipping < Stripe::RequestParams + # Portion of the amount that is for shipping. + sig { returns(T.nilable(T.nilable(T.any(String, Integer)))) } + attr_accessor :amount + # The postal code that represents the shipping source. + sig { returns(T.nilable(T.nilable(String))) } + attr_accessor :from_postal_code + # The postal code that represents the shipping destination. + sig { returns(T.nilable(T.nilable(String))) } + attr_accessor :to_postal_code + sig { + params(amount: T.nilable(T.nilable(T.any(String, Integer))), from_postal_code: T.nilable(T.nilable(String)), to_postal_code: T.nilable(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(Integer) } + attr_accessor :total_tax_amount + sig { params(total_tax_amount: Integer).void } + def initialize(total_tax_amount: nil); end + end + # The amount an item was discounted for. + sig { returns(T.nilable(T.nilable(T.any(String, Integer)))) } + 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. + sig { + returns(T.nilable(T.nilable(T.any(String, T::Array[::Stripe::PaymentIntent::IncrementAuthorizationParams::AmountDetails::LineItem])))) + } + attr_accessor :line_items + # Contains information about the shipping portion of the amount. + sig { + returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::IncrementAuthorizationParams::AmountDetails::Shipping)))) + } + attr_accessor :shipping + # Contains information about the tax portion of the amount. + sig { + returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::IncrementAuthorizationParams::AmountDetails::Tax)))) + } + attr_accessor :tax + sig { + params(discount_amount: T.nilable(T.nilable(T.any(String, Integer))), line_items: T.nilable(T.nilable(T.any(String, T::Array[::Stripe::PaymentIntent::IncrementAuthorizationParams::AmountDetails::LineItem]))), shipping: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::IncrementAuthorizationParams::AmountDetails::Shipping))), tax: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::IncrementAuthorizationParams::AmountDetails::Tax)))).void + } + def initialize(discount_amount: nil, line_items: nil, shipping: nil, tax: nil); end + end class Hooks < Stripe::RequestParams class Inputs < Stripe::RequestParams class Tax < Stripe::RequestParams @@ -61641,6 +61807,18 @@ module Stripe } def initialize(inputs: nil); end end + class PaymentDetails < Stripe::RequestParams + # Some customers might be required by their company or organization to provide this information. If so, provide this value. Otherwise you can ignore this field. + sig { returns(T.nilable(T.nilable(String))) } + attr_accessor :customer_reference + # A unique value assigned by the business to identify the transaction. + sig { returns(T.nilable(T.nilable(String))) } + attr_accessor :order_reference + sig { + params(customer_reference: T.nilable(T.nilable(String)), order_reference: T.nilable(T.nilable(String))).void + } + def initialize(customer_reference: nil, order_reference: nil); end + end class PaymentMethodOptions < Stripe::RequestParams class Card < Stripe::RequestParams # Request partial authorization on this PaymentIntent. @@ -61669,6 +61847,11 @@ module Stripe # The updated total amount that you intend to collect from the cardholder. This amount must be greater than the currently authorized amount. sig { returns(Integer) } attr_accessor :amount + # Provides industry-specific information about the amount. + sig { + returns(T.nilable(::Stripe::PaymentIntent::IncrementAuthorizationParams::AmountDetails)) + } + attr_accessor :amount_details # The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. The amount of the application fee collected will be capped at the total amount captured. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). sig { returns(T.nilable(Integer)) } attr_accessor :application_fee_amount @@ -61684,6 +61867,11 @@ module Stripe # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. sig { returns(T.nilable(T::Hash[String, String])) } attr_accessor :metadata + # Provides industry-specific information about the charge. + sig { + returns(T.nilable(::Stripe::PaymentIntent::IncrementAuthorizationParams::PaymentDetails)) + } + attr_accessor :payment_details # Payment method-specific configuration for this PaymentIntent. sig { returns(T.nilable(::Stripe::PaymentIntent::IncrementAuthorizationParams::PaymentMethodOptions)) @@ -61699,15 +61887,17 @@ module Stripe } attr_accessor :transfer_data sig { - params(amount: Integer, application_fee_amount: T.nilable(Integer), description: T.nilable(String), expand: T.nilable(T::Array[String]), hooks: T.nilable(::Stripe::PaymentIntent::IncrementAuthorizationParams::Hooks), metadata: T.nilable(T::Hash[String, String]), payment_method_options: T.nilable(::Stripe::PaymentIntent::IncrementAuthorizationParams::PaymentMethodOptions), statement_descriptor: T.nilable(String), transfer_data: T.nilable(::Stripe::PaymentIntent::IncrementAuthorizationParams::TransferData)).void + params(amount: Integer, amount_details: T.nilable(::Stripe::PaymentIntent::IncrementAuthorizationParams::AmountDetails), application_fee_amount: T.nilable(Integer), description: T.nilable(String), expand: T.nilable(T::Array[String]), hooks: T.nilable(::Stripe::PaymentIntent::IncrementAuthorizationParams::Hooks), metadata: T.nilable(T::Hash[String, String]), payment_details: T.nilable(::Stripe::PaymentIntent::IncrementAuthorizationParams::PaymentDetails), payment_method_options: T.nilable(::Stripe::PaymentIntent::IncrementAuthorizationParams::PaymentMethodOptions), statement_descriptor: T.nilable(String), transfer_data: T.nilable(::Stripe::PaymentIntent::IncrementAuthorizationParams::TransferData)).void } def initialize( amount: nil, + amount_details: nil, application_fee_amount: nil, description: nil, expand: nil, hooks: nil, metadata: nil, + payment_details: nil, payment_method_options: nil, statement_descriptor: nil, transfer_data: nil @@ -158959,6 +159149,172 @@ module Stripe ); end end class IncrementAuthorizationParams < Stripe::RequestParams + class AmountDetails < Stripe::RequestParams + class LineItem < Stripe::RequestParams + class PaymentMethodOptions < Stripe::RequestParams + class Card < Stripe::RequestParams + # Identifier that categorizes the items being purchased using a standardized commodity scheme such as (but not limited to) UNSPSC, NAICS, NAPCS, etc. + sig { returns(T.nilable(String)) } + attr_accessor :commodity_code + sig { params(commodity_code: T.nilable(String)).void } + def initialize(commodity_code: nil); end + end + class CardPresent < Stripe::RequestParams + # Identifier that categorizes the items being purchased using a standardized commodity scheme such as (but not limited to) UNSPSC, NAICS, NAPCS, etc. + sig { returns(T.nilable(String)) } + attr_accessor :commodity_code + sig { params(commodity_code: T.nilable(String)).void } + def initialize(commodity_code: nil); end + end + class Klarna < Stripe::RequestParams + # URL to an image for the product. Max length, 4096 characters. + sig { returns(T.nilable(String)) } + attr_accessor :image_url + # URL to the product page. Max length, 4096 characters. + sig { returns(T.nilable(String)) } + attr_accessor :product_url + # Reference for the subscription this line item is for. + sig { returns(T.nilable(String)) } + attr_accessor :subscription_reference + sig { + params(image_url: T.nilable(String), product_url: T.nilable(String), subscription_reference: T.nilable(String)).void + } + def initialize(image_url: nil, product_url: nil, subscription_reference: nil); end + end + class Paypal < Stripe::RequestParams + # Type of the line item. + sig { returns(T.nilable(String)) } + attr_accessor :category + # Description of the line item. + sig { returns(T.nilable(String)) } + attr_accessor :description + # The Stripe account ID of the connected account that sells the item. + sig { returns(T.nilable(String)) } + attr_accessor :sold_by + sig { + params(category: T.nilable(String), description: T.nilable(String), sold_by: T.nilable(String)).void + } + def initialize(category: nil, description: nil, sold_by: nil); end + end + # This sub-hash contains line item details that are specific to `card` payment method." + sig { + returns(T.nilable(::Stripe::PaymentIntentService::IncrementAuthorizationParams::AmountDetails::LineItem::PaymentMethodOptions::Card)) + } + attr_accessor :card + # This sub-hash contains line item details that are specific to `card_present` payment method." + sig { + returns(T.nilable(::Stripe::PaymentIntentService::IncrementAuthorizationParams::AmountDetails::LineItem::PaymentMethodOptions::CardPresent)) + } + attr_accessor :card_present + # This sub-hash contains line item details that are specific to `klarna` payment method." + sig { + returns(T.nilable(::Stripe::PaymentIntentService::IncrementAuthorizationParams::AmountDetails::LineItem::PaymentMethodOptions::Klarna)) + } + attr_accessor :klarna + # This sub-hash contains line item details that are specific to `paypal` payment method." + sig { + returns(T.nilable(::Stripe::PaymentIntentService::IncrementAuthorizationParams::AmountDetails::LineItem::PaymentMethodOptions::Paypal)) + } + attr_accessor :paypal + sig { + params(card: T.nilable(::Stripe::PaymentIntentService::IncrementAuthorizationParams::AmountDetails::LineItem::PaymentMethodOptions::Card), card_present: T.nilable(::Stripe::PaymentIntentService::IncrementAuthorizationParams::AmountDetails::LineItem::PaymentMethodOptions::CardPresent), klarna: T.nilable(::Stripe::PaymentIntentService::IncrementAuthorizationParams::AmountDetails::LineItem::PaymentMethodOptions::Klarna), paypal: T.nilable(::Stripe::PaymentIntentService::IncrementAuthorizationParams::AmountDetails::LineItem::PaymentMethodOptions::Paypal)).void + } + def initialize(card: nil, card_present: nil, klarna: nil, paypal: nil); end + end + class Tax < Stripe::RequestParams + # The total tax on an item. Non-negative integer. + sig { returns(Integer) } + attr_accessor :total_tax_amount + sig { params(total_tax_amount: Integer).void } + def initialize(total_tax_amount: nil); end + end + # The amount an item was discounted for. Positive integer. + sig { returns(T.nilable(Integer)) } + attr_accessor :discount_amount + # Payment method-specific information for line items. + sig { + returns(T.nilable(::Stripe::PaymentIntentService::IncrementAuthorizationParams::AmountDetails::LineItem::PaymentMethodOptions)) + } + attr_accessor :payment_method_options + # Unique identifier of the product. At most 12 characters long. + sig { returns(T.nilable(String)) } + attr_accessor :product_code + # Name of the product. At most 100 characters long. + sig { returns(String) } + attr_accessor :product_name + # Number of items of the product. Positive integer. + sig { returns(Integer) } + attr_accessor :quantity + # Contains information about the tax on the item. + sig { + returns(T.nilable(::Stripe::PaymentIntentService::IncrementAuthorizationParams::AmountDetails::LineItem::Tax)) + } + attr_accessor :tax + # Cost of the product. Non-negative integer. + sig { returns(Integer) } + attr_accessor :unit_cost + # A unit of measure for the line item, such as gallons, feet, meters, etc. + sig { returns(T.nilable(String)) } + attr_accessor :unit_of_measure + sig { + params(discount_amount: T.nilable(Integer), payment_method_options: T.nilable(::Stripe::PaymentIntentService::IncrementAuthorizationParams::AmountDetails::LineItem::PaymentMethodOptions), product_code: T.nilable(String), product_name: String, quantity: Integer, tax: T.nilable(::Stripe::PaymentIntentService::IncrementAuthorizationParams::AmountDetails::LineItem::Tax), unit_cost: Integer, unit_of_measure: T.nilable(String)).void + } + def initialize( + discount_amount: nil, + payment_method_options: nil, + product_code: nil, + product_name: nil, + quantity: nil, + tax: nil, + unit_cost: nil, + unit_of_measure: nil + ); end + end + class Shipping < Stripe::RequestParams + # Portion of the amount that is for shipping. + sig { returns(T.nilable(T.nilable(T.any(String, Integer)))) } + attr_accessor :amount + # The postal code that represents the shipping source. + sig { returns(T.nilable(T.nilable(String))) } + attr_accessor :from_postal_code + # The postal code that represents the shipping destination. + sig { returns(T.nilable(T.nilable(String))) } + attr_accessor :to_postal_code + sig { + params(amount: T.nilable(T.nilable(T.any(String, Integer))), from_postal_code: T.nilable(T.nilable(String)), to_postal_code: T.nilable(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(Integer) } + attr_accessor :total_tax_amount + sig { params(total_tax_amount: Integer).void } + def initialize(total_tax_amount: nil); end + end + # The amount an item was discounted for. + sig { returns(T.nilable(T.nilable(T.any(String, Integer)))) } + 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. + sig { + returns(T.nilable(T.nilable(T.any(String, T::Array[::Stripe::PaymentIntentService::IncrementAuthorizationParams::AmountDetails::LineItem])))) + } + attr_accessor :line_items + # Contains information about the shipping portion of the amount. + sig { + returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::IncrementAuthorizationParams::AmountDetails::Shipping)))) + } + attr_accessor :shipping + # Contains information about the tax portion of the amount. + sig { + returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::IncrementAuthorizationParams::AmountDetails::Tax)))) + } + attr_accessor :tax + sig { + params(discount_amount: T.nilable(T.nilable(T.any(String, Integer))), line_items: T.nilable(T.nilable(T.any(String, T::Array[::Stripe::PaymentIntentService::IncrementAuthorizationParams::AmountDetails::LineItem]))), shipping: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::IncrementAuthorizationParams::AmountDetails::Shipping))), tax: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::IncrementAuthorizationParams::AmountDetails::Tax)))).void + } + def initialize(discount_amount: nil, line_items: nil, shipping: nil, tax: nil); end + end class Hooks < Stripe::RequestParams class Inputs < Stripe::RequestParams class Tax < Stripe::RequestParams @@ -158988,6 +159344,18 @@ module Stripe } def initialize(inputs: nil); end end + class PaymentDetails < Stripe::RequestParams + # Some customers might be required by their company or organization to provide this information. If so, provide this value. Otherwise you can ignore this field. + sig { returns(T.nilable(T.nilable(String))) } + attr_accessor :customer_reference + # A unique value assigned by the business to identify the transaction. + sig { returns(T.nilable(T.nilable(String))) } + attr_accessor :order_reference + sig { + params(customer_reference: T.nilable(T.nilable(String)), order_reference: T.nilable(T.nilable(String))).void + } + def initialize(customer_reference: nil, order_reference: nil); end + end class PaymentMethodOptions < Stripe::RequestParams class Card < Stripe::RequestParams # Request partial authorization on this PaymentIntent. @@ -159016,6 +159384,11 @@ module Stripe # The updated total amount that you intend to collect from the cardholder. This amount must be greater than the currently authorized amount. sig { returns(Integer) } attr_accessor :amount + # Provides industry-specific information about the amount. + sig { + returns(T.nilable(::Stripe::PaymentIntentService::IncrementAuthorizationParams::AmountDetails)) + } + attr_accessor :amount_details # The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. The amount of the application fee collected will be capped at the total amount captured. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). sig { returns(T.nilable(Integer)) } attr_accessor :application_fee_amount @@ -159033,6 +159406,11 @@ module Stripe # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. sig { returns(T.nilable(T::Hash[String, String])) } attr_accessor :metadata + # Provides industry-specific information about the charge. + sig { + returns(T.nilable(::Stripe::PaymentIntentService::IncrementAuthorizationParams::PaymentDetails)) + } + attr_accessor :payment_details # Payment method-specific configuration for this PaymentIntent. sig { returns(T.nilable(::Stripe::PaymentIntentService::IncrementAuthorizationParams::PaymentMethodOptions)) @@ -159048,15 +159426,17 @@ module Stripe } attr_accessor :transfer_data sig { - params(amount: Integer, application_fee_amount: T.nilable(Integer), description: T.nilable(String), expand: T.nilable(T::Array[String]), hooks: T.nilable(::Stripe::PaymentIntentService::IncrementAuthorizationParams::Hooks), metadata: T.nilable(T::Hash[String, String]), payment_method_options: T.nilable(::Stripe::PaymentIntentService::IncrementAuthorizationParams::PaymentMethodOptions), statement_descriptor: T.nilable(String), transfer_data: T.nilable(::Stripe::PaymentIntentService::IncrementAuthorizationParams::TransferData)).void + params(amount: Integer, amount_details: T.nilable(::Stripe::PaymentIntentService::IncrementAuthorizationParams::AmountDetails), application_fee_amount: T.nilable(Integer), description: T.nilable(String), expand: T.nilable(T::Array[String]), hooks: T.nilable(::Stripe::PaymentIntentService::IncrementAuthorizationParams::Hooks), metadata: T.nilable(T::Hash[String, String]), payment_details: T.nilable(::Stripe::PaymentIntentService::IncrementAuthorizationParams::PaymentDetails), payment_method_options: T.nilable(::Stripe::PaymentIntentService::IncrementAuthorizationParams::PaymentMethodOptions), statement_descriptor: T.nilable(String), transfer_data: T.nilable(::Stripe::PaymentIntentService::IncrementAuthorizationParams::TransferData)).void } def initialize( amount: nil, + amount_details: nil, application_fee_amount: nil, description: nil, expand: nil, hooks: nil, metadata: nil, + payment_details: nil, payment_method_options: nil, statement_descriptor: nil, transfer_data: nil diff --git a/rbi/stripe/resources/payment_intent.rbi b/rbi/stripe/resources/payment_intent.rbi index d92c2537..5139bcea 100644 --- a/rbi/stripe/resources/payment_intent.rbi +++ b/rbi/stripe/resources/payment_intent.rbi @@ -15576,6 +15576,172 @@ module Stripe ); end end class IncrementAuthorizationParams < Stripe::RequestParams + class AmountDetails < Stripe::RequestParams + class LineItem < Stripe::RequestParams + class PaymentMethodOptions < Stripe::RequestParams + class Card < Stripe::RequestParams + # Identifier that categorizes the items being purchased using a standardized commodity scheme such as (but not limited to) UNSPSC, NAICS, NAPCS, etc. + sig { returns(T.nilable(String)) } + attr_accessor :commodity_code + sig { params(commodity_code: T.nilable(String)).void } + def initialize(commodity_code: nil); end + end + class CardPresent < Stripe::RequestParams + # Identifier that categorizes the items being purchased using a standardized commodity scheme such as (but not limited to) UNSPSC, NAICS, NAPCS, etc. + sig { returns(T.nilable(String)) } + attr_accessor :commodity_code + sig { params(commodity_code: T.nilable(String)).void } + def initialize(commodity_code: nil); end + end + class Klarna < Stripe::RequestParams + # URL to an image for the product. Max length, 4096 characters. + sig { returns(T.nilable(String)) } + attr_accessor :image_url + # URL to the product page. Max length, 4096 characters. + sig { returns(T.nilable(String)) } + attr_accessor :product_url + # Reference for the subscription this line item is for. + sig { returns(T.nilable(String)) } + attr_accessor :subscription_reference + sig { + params(image_url: T.nilable(String), product_url: T.nilable(String), subscription_reference: T.nilable(String)).void + } + def initialize(image_url: nil, product_url: nil, subscription_reference: nil); end + end + class Paypal < Stripe::RequestParams + # Type of the line item. + sig { returns(T.nilable(String)) } + attr_accessor :category + # Description of the line item. + sig { returns(T.nilable(String)) } + attr_accessor :description + # The Stripe account ID of the connected account that sells the item. + sig { returns(T.nilable(String)) } + attr_accessor :sold_by + sig { + params(category: T.nilable(String), description: T.nilable(String), sold_by: T.nilable(String)).void + } + def initialize(category: nil, description: nil, sold_by: nil); end + end + # This sub-hash contains line item details that are specific to `card` payment method." + sig { + returns(T.nilable(::Stripe::PaymentIntent::IncrementAuthorizationParams::AmountDetails::LineItem::PaymentMethodOptions::Card)) + } + attr_accessor :card + # This sub-hash contains line item details that are specific to `card_present` payment method." + sig { + returns(T.nilable(::Stripe::PaymentIntent::IncrementAuthorizationParams::AmountDetails::LineItem::PaymentMethodOptions::CardPresent)) + } + attr_accessor :card_present + # This sub-hash contains line item details that are specific to `klarna` payment method." + sig { + returns(T.nilable(::Stripe::PaymentIntent::IncrementAuthorizationParams::AmountDetails::LineItem::PaymentMethodOptions::Klarna)) + } + attr_accessor :klarna + # This sub-hash contains line item details that are specific to `paypal` payment method." + sig { + returns(T.nilable(::Stripe::PaymentIntent::IncrementAuthorizationParams::AmountDetails::LineItem::PaymentMethodOptions::Paypal)) + } + attr_accessor :paypal + sig { + params(card: T.nilable(::Stripe::PaymentIntent::IncrementAuthorizationParams::AmountDetails::LineItem::PaymentMethodOptions::Card), card_present: T.nilable(::Stripe::PaymentIntent::IncrementAuthorizationParams::AmountDetails::LineItem::PaymentMethodOptions::CardPresent), klarna: T.nilable(::Stripe::PaymentIntent::IncrementAuthorizationParams::AmountDetails::LineItem::PaymentMethodOptions::Klarna), paypal: T.nilable(::Stripe::PaymentIntent::IncrementAuthorizationParams::AmountDetails::LineItem::PaymentMethodOptions::Paypal)).void + } + def initialize(card: nil, card_present: nil, klarna: nil, paypal: nil); end + end + class Tax < Stripe::RequestParams + # The total tax on an item. Non-negative integer. + sig { returns(Integer) } + attr_accessor :total_tax_amount + sig { params(total_tax_amount: Integer).void } + def initialize(total_tax_amount: nil); end + end + # The amount an item was discounted for. Positive integer. + sig { returns(T.nilable(Integer)) } + attr_accessor :discount_amount + # Payment method-specific information for line items. + sig { + returns(T.nilable(::Stripe::PaymentIntent::IncrementAuthorizationParams::AmountDetails::LineItem::PaymentMethodOptions)) + } + attr_accessor :payment_method_options + # Unique identifier of the product. At most 12 characters long. + sig { returns(T.nilable(String)) } + attr_accessor :product_code + # Name of the product. At most 100 characters long. + sig { returns(String) } + attr_accessor :product_name + # Number of items of the product. Positive integer. + sig { returns(Integer) } + attr_accessor :quantity + # Contains information about the tax on the item. + sig { + returns(T.nilable(::Stripe::PaymentIntent::IncrementAuthorizationParams::AmountDetails::LineItem::Tax)) + } + attr_accessor :tax + # Cost of the product. Non-negative integer. + sig { returns(Integer) } + attr_accessor :unit_cost + # A unit of measure for the line item, such as gallons, feet, meters, etc. + sig { returns(T.nilable(String)) } + attr_accessor :unit_of_measure + sig { + params(discount_amount: T.nilable(Integer), payment_method_options: T.nilable(::Stripe::PaymentIntent::IncrementAuthorizationParams::AmountDetails::LineItem::PaymentMethodOptions), product_code: T.nilable(String), product_name: String, quantity: Integer, tax: T.nilable(::Stripe::PaymentIntent::IncrementAuthorizationParams::AmountDetails::LineItem::Tax), unit_cost: Integer, unit_of_measure: T.nilable(String)).void + } + def initialize( + discount_amount: nil, + payment_method_options: nil, + product_code: nil, + product_name: nil, + quantity: nil, + tax: nil, + unit_cost: nil, + unit_of_measure: nil + ); end + end + class Shipping < Stripe::RequestParams + # Portion of the amount that is for shipping. + sig { returns(T.nilable(T.nilable(T.any(String, Integer)))) } + attr_accessor :amount + # The postal code that represents the shipping source. + sig { returns(T.nilable(T.nilable(String))) } + attr_accessor :from_postal_code + # The postal code that represents the shipping destination. + sig { returns(T.nilable(T.nilable(String))) } + attr_accessor :to_postal_code + sig { + params(amount: T.nilable(T.nilable(T.any(String, Integer))), from_postal_code: T.nilable(T.nilable(String)), to_postal_code: T.nilable(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(Integer) } + attr_accessor :total_tax_amount + sig { params(total_tax_amount: Integer).void } + def initialize(total_tax_amount: nil); end + end + # The amount an item was discounted for. + sig { returns(T.nilable(T.nilable(T.any(String, Integer)))) } + 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. + sig { + returns(T.nilable(T.nilable(T.any(String, T::Array[::Stripe::PaymentIntent::IncrementAuthorizationParams::AmountDetails::LineItem])))) + } + attr_accessor :line_items + # Contains information about the shipping portion of the amount. + sig { + returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::IncrementAuthorizationParams::AmountDetails::Shipping)))) + } + attr_accessor :shipping + # Contains information about the tax portion of the amount. + sig { + returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::IncrementAuthorizationParams::AmountDetails::Tax)))) + } + attr_accessor :tax + sig { + params(discount_amount: T.nilable(T.nilable(T.any(String, Integer))), line_items: T.nilable(T.nilable(T.any(String, T::Array[::Stripe::PaymentIntent::IncrementAuthorizationParams::AmountDetails::LineItem]))), shipping: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::IncrementAuthorizationParams::AmountDetails::Shipping))), tax: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntent::IncrementAuthorizationParams::AmountDetails::Tax)))).void + } + def initialize(discount_amount: nil, line_items: nil, shipping: nil, tax: nil); end + end class Hooks < Stripe::RequestParams class Inputs < Stripe::RequestParams class Tax < Stripe::RequestParams @@ -15605,6 +15771,18 @@ module Stripe } def initialize(inputs: nil); end end + class PaymentDetails < Stripe::RequestParams + # Some customers might be required by their company or organization to provide this information. If so, provide this value. Otherwise you can ignore this field. + sig { returns(T.nilable(T.nilable(String))) } + attr_accessor :customer_reference + # A unique value assigned by the business to identify the transaction. + sig { returns(T.nilable(T.nilable(String))) } + attr_accessor :order_reference + sig { + params(customer_reference: T.nilable(T.nilable(String)), order_reference: T.nilable(T.nilable(String))).void + } + def initialize(customer_reference: nil, order_reference: nil); end + end class PaymentMethodOptions < Stripe::RequestParams class Card < Stripe::RequestParams # Request partial authorization on this PaymentIntent. @@ -15633,6 +15811,11 @@ module Stripe # The updated total amount that you intend to collect from the cardholder. This amount must be greater than the currently authorized amount. sig { returns(Integer) } attr_accessor :amount + # Provides industry-specific information about the amount. + sig { + returns(T.nilable(::Stripe::PaymentIntent::IncrementAuthorizationParams::AmountDetails)) + } + attr_accessor :amount_details # The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. The amount of the application fee collected will be capped at the total amount captured. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). sig { returns(T.nilable(Integer)) } attr_accessor :application_fee_amount @@ -15648,6 +15831,11 @@ module Stripe # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. sig { returns(T.nilable(T::Hash[String, String])) } attr_accessor :metadata + # Provides industry-specific information about the charge. + sig { + returns(T.nilable(::Stripe::PaymentIntent::IncrementAuthorizationParams::PaymentDetails)) + } + attr_accessor :payment_details # Payment method-specific configuration for this PaymentIntent. sig { returns(T.nilable(::Stripe::PaymentIntent::IncrementAuthorizationParams::PaymentMethodOptions)) @@ -15663,15 +15851,17 @@ module Stripe } attr_accessor :transfer_data sig { - params(amount: Integer, application_fee_amount: T.nilable(Integer), description: T.nilable(String), expand: T.nilable(T::Array[String]), hooks: T.nilable(::Stripe::PaymentIntent::IncrementAuthorizationParams::Hooks), metadata: T.nilable(T::Hash[String, String]), payment_method_options: T.nilable(::Stripe::PaymentIntent::IncrementAuthorizationParams::PaymentMethodOptions), statement_descriptor: T.nilable(String), transfer_data: T.nilable(::Stripe::PaymentIntent::IncrementAuthorizationParams::TransferData)).void + params(amount: Integer, amount_details: T.nilable(::Stripe::PaymentIntent::IncrementAuthorizationParams::AmountDetails), application_fee_amount: T.nilable(Integer), description: T.nilable(String), expand: T.nilable(T::Array[String]), hooks: T.nilable(::Stripe::PaymentIntent::IncrementAuthorizationParams::Hooks), metadata: T.nilable(T::Hash[String, String]), payment_details: T.nilable(::Stripe::PaymentIntent::IncrementAuthorizationParams::PaymentDetails), payment_method_options: T.nilable(::Stripe::PaymentIntent::IncrementAuthorizationParams::PaymentMethodOptions), statement_descriptor: T.nilable(String), transfer_data: T.nilable(::Stripe::PaymentIntent::IncrementAuthorizationParams::TransferData)).void } def initialize( amount: nil, + amount_details: nil, application_fee_amount: nil, description: nil, expand: nil, hooks: nil, metadata: nil, + payment_details: nil, payment_method_options: nil, statement_descriptor: nil, transfer_data: nil diff --git a/rbi/stripe/services/payment_intent_service.rbi b/rbi/stripe/services/payment_intent_service.rbi index 7e40fe9a..3306f0f3 100644 --- a/rbi/stripe/services/payment_intent_service.rbi +++ b/rbi/stripe/services/payment_intent_service.rbi @@ -13163,6 +13163,172 @@ module Stripe ); end end class IncrementAuthorizationParams < Stripe::RequestParams + class AmountDetails < Stripe::RequestParams + class LineItem < Stripe::RequestParams + class PaymentMethodOptions < Stripe::RequestParams + class Card < Stripe::RequestParams + # Identifier that categorizes the items being purchased using a standardized commodity scheme such as (but not limited to) UNSPSC, NAICS, NAPCS, etc. + sig { returns(T.nilable(String)) } + attr_accessor :commodity_code + sig { params(commodity_code: T.nilable(String)).void } + def initialize(commodity_code: nil); end + end + class CardPresent < Stripe::RequestParams + # Identifier that categorizes the items being purchased using a standardized commodity scheme such as (but not limited to) UNSPSC, NAICS, NAPCS, etc. + sig { returns(T.nilable(String)) } + attr_accessor :commodity_code + sig { params(commodity_code: T.nilable(String)).void } + def initialize(commodity_code: nil); end + end + class Klarna < Stripe::RequestParams + # URL to an image for the product. Max length, 4096 characters. + sig { returns(T.nilable(String)) } + attr_accessor :image_url + # URL to the product page. Max length, 4096 characters. + sig { returns(T.nilable(String)) } + attr_accessor :product_url + # Reference for the subscription this line item is for. + sig { returns(T.nilable(String)) } + attr_accessor :subscription_reference + sig { + params(image_url: T.nilable(String), product_url: T.nilable(String), subscription_reference: T.nilable(String)).void + } + def initialize(image_url: nil, product_url: nil, subscription_reference: nil); end + end + class Paypal < Stripe::RequestParams + # Type of the line item. + sig { returns(T.nilable(String)) } + attr_accessor :category + # Description of the line item. + sig { returns(T.nilable(String)) } + attr_accessor :description + # The Stripe account ID of the connected account that sells the item. + sig { returns(T.nilable(String)) } + attr_accessor :sold_by + sig { + params(category: T.nilable(String), description: T.nilable(String), sold_by: T.nilable(String)).void + } + def initialize(category: nil, description: nil, sold_by: nil); end + end + # This sub-hash contains line item details that are specific to `card` payment method." + sig { + returns(T.nilable(::Stripe::PaymentIntentService::IncrementAuthorizationParams::AmountDetails::LineItem::PaymentMethodOptions::Card)) + } + attr_accessor :card + # This sub-hash contains line item details that are specific to `card_present` payment method." + sig { + returns(T.nilable(::Stripe::PaymentIntentService::IncrementAuthorizationParams::AmountDetails::LineItem::PaymentMethodOptions::CardPresent)) + } + attr_accessor :card_present + # This sub-hash contains line item details that are specific to `klarna` payment method." + sig { + returns(T.nilable(::Stripe::PaymentIntentService::IncrementAuthorizationParams::AmountDetails::LineItem::PaymentMethodOptions::Klarna)) + } + attr_accessor :klarna + # This sub-hash contains line item details that are specific to `paypal` payment method." + sig { + returns(T.nilable(::Stripe::PaymentIntentService::IncrementAuthorizationParams::AmountDetails::LineItem::PaymentMethodOptions::Paypal)) + } + attr_accessor :paypal + sig { + params(card: T.nilable(::Stripe::PaymentIntentService::IncrementAuthorizationParams::AmountDetails::LineItem::PaymentMethodOptions::Card), card_present: T.nilable(::Stripe::PaymentIntentService::IncrementAuthorizationParams::AmountDetails::LineItem::PaymentMethodOptions::CardPresent), klarna: T.nilable(::Stripe::PaymentIntentService::IncrementAuthorizationParams::AmountDetails::LineItem::PaymentMethodOptions::Klarna), paypal: T.nilable(::Stripe::PaymentIntentService::IncrementAuthorizationParams::AmountDetails::LineItem::PaymentMethodOptions::Paypal)).void + } + def initialize(card: nil, card_present: nil, klarna: nil, paypal: nil); end + end + class Tax < Stripe::RequestParams + # The total tax on an item. Non-negative integer. + sig { returns(Integer) } + attr_accessor :total_tax_amount + sig { params(total_tax_amount: Integer).void } + def initialize(total_tax_amount: nil); end + end + # The amount an item was discounted for. Positive integer. + sig { returns(T.nilable(Integer)) } + attr_accessor :discount_amount + # Payment method-specific information for line items. + sig { + returns(T.nilable(::Stripe::PaymentIntentService::IncrementAuthorizationParams::AmountDetails::LineItem::PaymentMethodOptions)) + } + attr_accessor :payment_method_options + # Unique identifier of the product. At most 12 characters long. + sig { returns(T.nilable(String)) } + attr_accessor :product_code + # Name of the product. At most 100 characters long. + sig { returns(String) } + attr_accessor :product_name + # Number of items of the product. Positive integer. + sig { returns(Integer) } + attr_accessor :quantity + # Contains information about the tax on the item. + sig { + returns(T.nilable(::Stripe::PaymentIntentService::IncrementAuthorizationParams::AmountDetails::LineItem::Tax)) + } + attr_accessor :tax + # Cost of the product. Non-negative integer. + sig { returns(Integer) } + attr_accessor :unit_cost + # A unit of measure for the line item, such as gallons, feet, meters, etc. + sig { returns(T.nilable(String)) } + attr_accessor :unit_of_measure + sig { + params(discount_amount: T.nilable(Integer), payment_method_options: T.nilable(::Stripe::PaymentIntentService::IncrementAuthorizationParams::AmountDetails::LineItem::PaymentMethodOptions), product_code: T.nilable(String), product_name: String, quantity: Integer, tax: T.nilable(::Stripe::PaymentIntentService::IncrementAuthorizationParams::AmountDetails::LineItem::Tax), unit_cost: Integer, unit_of_measure: T.nilable(String)).void + } + def initialize( + discount_amount: nil, + payment_method_options: nil, + product_code: nil, + product_name: nil, + quantity: nil, + tax: nil, + unit_cost: nil, + unit_of_measure: nil + ); end + end + class Shipping < Stripe::RequestParams + # Portion of the amount that is for shipping. + sig { returns(T.nilable(T.nilable(T.any(String, Integer)))) } + attr_accessor :amount + # The postal code that represents the shipping source. + sig { returns(T.nilable(T.nilable(String))) } + attr_accessor :from_postal_code + # The postal code that represents the shipping destination. + sig { returns(T.nilable(T.nilable(String))) } + attr_accessor :to_postal_code + sig { + params(amount: T.nilable(T.nilable(T.any(String, Integer))), from_postal_code: T.nilable(T.nilable(String)), to_postal_code: T.nilable(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(Integer) } + attr_accessor :total_tax_amount + sig { params(total_tax_amount: Integer).void } + def initialize(total_tax_amount: nil); end + end + # The amount an item was discounted for. + sig { returns(T.nilable(T.nilable(T.any(String, Integer)))) } + 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. + sig { + returns(T.nilable(T.nilable(T.any(String, T::Array[::Stripe::PaymentIntentService::IncrementAuthorizationParams::AmountDetails::LineItem])))) + } + attr_accessor :line_items + # Contains information about the shipping portion of the amount. + sig { + returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::IncrementAuthorizationParams::AmountDetails::Shipping)))) + } + attr_accessor :shipping + # Contains information about the tax portion of the amount. + sig { + returns(T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::IncrementAuthorizationParams::AmountDetails::Tax)))) + } + attr_accessor :tax + sig { + params(discount_amount: T.nilable(T.nilable(T.any(String, Integer))), line_items: T.nilable(T.nilable(T.any(String, T::Array[::Stripe::PaymentIntentService::IncrementAuthorizationParams::AmountDetails::LineItem]))), shipping: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::IncrementAuthorizationParams::AmountDetails::Shipping))), tax: T.nilable(T.nilable(T.any(String, ::Stripe::PaymentIntentService::IncrementAuthorizationParams::AmountDetails::Tax)))).void + } + def initialize(discount_amount: nil, line_items: nil, shipping: nil, tax: nil); end + end class Hooks < Stripe::RequestParams class Inputs < Stripe::RequestParams class Tax < Stripe::RequestParams @@ -13192,6 +13358,18 @@ module Stripe } def initialize(inputs: nil); end end + class PaymentDetails < Stripe::RequestParams + # Some customers might be required by their company or organization to provide this information. If so, provide this value. Otherwise you can ignore this field. + sig { returns(T.nilable(T.nilable(String))) } + attr_accessor :customer_reference + # A unique value assigned by the business to identify the transaction. + sig { returns(T.nilable(T.nilable(String))) } + attr_accessor :order_reference + sig { + params(customer_reference: T.nilable(T.nilable(String)), order_reference: T.nilable(T.nilable(String))).void + } + def initialize(customer_reference: nil, order_reference: nil); end + end class PaymentMethodOptions < Stripe::RequestParams class Card < Stripe::RequestParams # Request partial authorization on this PaymentIntent. @@ -13220,6 +13398,11 @@ module Stripe # The updated total amount that you intend to collect from the cardholder. This amount must be greater than the currently authorized amount. sig { returns(Integer) } attr_accessor :amount + # Provides industry-specific information about the amount. + sig { + returns(T.nilable(::Stripe::PaymentIntentService::IncrementAuthorizationParams::AmountDetails)) + } + attr_accessor :amount_details # The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. The amount of the application fee collected will be capped at the total amount captured. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). sig { returns(T.nilable(Integer)) } attr_accessor :application_fee_amount @@ -13237,6 +13420,11 @@ module Stripe # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. sig { returns(T.nilable(T::Hash[String, String])) } attr_accessor :metadata + # Provides industry-specific information about the charge. + sig { + returns(T.nilable(::Stripe::PaymentIntentService::IncrementAuthorizationParams::PaymentDetails)) + } + attr_accessor :payment_details # Payment method-specific configuration for this PaymentIntent. sig { returns(T.nilable(::Stripe::PaymentIntentService::IncrementAuthorizationParams::PaymentMethodOptions)) @@ -13252,15 +13440,17 @@ module Stripe } attr_accessor :transfer_data sig { - params(amount: Integer, application_fee_amount: T.nilable(Integer), description: T.nilable(String), expand: T.nilable(T::Array[String]), hooks: T.nilable(::Stripe::PaymentIntentService::IncrementAuthorizationParams::Hooks), metadata: T.nilable(T::Hash[String, String]), payment_method_options: T.nilable(::Stripe::PaymentIntentService::IncrementAuthorizationParams::PaymentMethodOptions), statement_descriptor: T.nilable(String), transfer_data: T.nilable(::Stripe::PaymentIntentService::IncrementAuthorizationParams::TransferData)).void + params(amount: Integer, amount_details: T.nilable(::Stripe::PaymentIntentService::IncrementAuthorizationParams::AmountDetails), application_fee_amount: T.nilable(Integer), description: T.nilable(String), expand: T.nilable(T::Array[String]), hooks: T.nilable(::Stripe::PaymentIntentService::IncrementAuthorizationParams::Hooks), metadata: T.nilable(T::Hash[String, String]), payment_details: T.nilable(::Stripe::PaymentIntentService::IncrementAuthorizationParams::PaymentDetails), payment_method_options: T.nilable(::Stripe::PaymentIntentService::IncrementAuthorizationParams::PaymentMethodOptions), statement_descriptor: T.nilable(String), transfer_data: T.nilable(::Stripe::PaymentIntentService::IncrementAuthorizationParams::TransferData)).void } def initialize( amount: nil, + amount_details: nil, application_fee_amount: nil, description: nil, expand: nil, hooks: nil, metadata: nil, + payment_details: nil, payment_method_options: nil, statement_descriptor: nil, transfer_data: nil